These are my steps and notes to adopt/update a FreeBSD port.

Wednesday, February 28, 2007

Final part of Imgseek

After having problems creating the pkg-plist of Imgseek, I consulted with Andrew and I asked him how does he create that file?

He answered me the following:

He issued the following command to the two directories (imgseek-0.8.4 and 0.8.6)

#diff -rq imgSeek-0.8.* | grep \^Only

Output:

=Only in imgSeek-0.8.4: debian
=Only in imgSeek-0.8.6/imgSeekLib: ImageDB.py
=Only in imgSeek-0.8.4/imgSeekLib: ImgDB.py
=Only in imgSeek-0.8.6/imgSeekLib: imgseek_pt_BR.qm
=Only in imgSeek-0.8.6/imgSeekLib: jpegloader-win.cpp
=Only in imgSeek-0.8.6/imgSeekLib: jpegloader.cpp
=Only in imgSeek-0.8.6/imgSeekLib: jpegloader.h
=Only in imgSeek-0.8.6/imgSeekLib: sqlitedb.py
=Only in imgSeek-0.8.4/imgSeekLib: tdict.py

That command shows what files appeared or disappeared from the the old version to the new version. In this case ImageDB.py changed to ImgDB.py. So that change should be included in the pkg-plist.

From the output, he also sees file imgseek_pt_BR.qm. A quick look into setup.py file(this file you can find it after you untar imgseek-0.8.6.tar.bz2), he noticed that the file will be installed in share/imgseek. That is another addition to the pkg-plist.

After that, he issues this command:

#make install package && make deinstall find /usr/local -iname \*imgseek\*

With the output of that command, he finished creating the pkg-plist. One important note from him is that this way of creating the pkg-plist is not a perfect method. In my case, this a good starting point when I will try to update the next port.

Finally, he mentioned these following links which can help me in this process of updating a port:

http://www.freebsd.org/doc/en_US.ISO8859-1/articles/contributing-ports/index.html
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/contributing/index.html
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/problem-reports/index.html
http://www.freebsd.org/doc/en_US.ISO8859-1/books/dev-model/index.html

A quick look at the freshport site and I can see that my port is up-to-date

Wednesday, February 21, 2007

Back again

This last steps took time. Anyway here are my notes:

When we install a port, these are the steps that the process goes to:


|fetch |----> |extract| ----> |patch|----> |configure|---->|build|


Add to the recommendations: join mailing list freebsd-post. Whenever in need, there is a group of people that can help to adopt/update your port. Special note to Andrew Pantyukhin for his patience and time.

I made a tmp file in my home directory.

In it, I created a directory with the name of my port : imgseek

I copy from /usr/port/graphics/imgseek two files: Makefile and pkg-desc.

Then I started editing Makefile file.

PORTNAME= imgseek
There is no change

PORTREVISION=1
Andrew point out to the handbook to see if I should change this option. From it I read: "PORTREVISION should be increased each time a change is made to the port which significantly affects the content or structure of the derived package."
Therefore, no change

PORTVERSION=0.8.6
In my case, I just had to update the version from 0.8.4 to 0.8.6

Master_SITES=SFE
I didn't know what SFE meant.

I quick search on /usr/ports/Mk/bsd.sites.mk: "more bsd.sites.mk | grep SFE" made me understand that SFE stands for SourceForge Extended. In other words, the fetch process will look into a sourceforge/$portname site and get the file.

and that is all for Makefile

File pkg-desc
No change

To create the distinfo file, I copy the tar file imgseek-0.8.6.tar.bz2 to usr/ports/distfiles and then I went to my imgseek directory cd ~/tmp/imgseek and issued the command "make checksum". That created my distinfo file.

Last file to create is pkg-plist

The handbook section 7.5 mentions the "Automated package list creation"

I started by issuing this command: "mkdir /var/tmp/$(make -V imgseek)

I got following error: "illegal variable name" :(

I quick email to Andrew asking how he creates the pkg-plist file and he reponded me that depending on the application he uses "sed".

So far no pkg-plist created yet and I haven't tested if the port build up successfully.

More to come...

Tuesday, February 6, 2007

Search continues

After a long break due to a problem with portversion. I am back working to adopt a port. By the way, I learned a new way to update my ports instead of using CVS.

For me it is much faster do the following:

1.- Install portsnap---> pkg_add -r portsnap
2.- Fetch the latest snap ---> portsnap fetch
3.- Extract the the snapshot into the port tree --> portsnap extract (Issue this only if you are geeting the port tree for the first time). Thanks therek
4.- Update port tree ---> portsnap update

My next project will be to write a small script like BSD HACKS #80 (thank you Dru) to automate this process.

I did some checking with my adopted port (fluxconf).
So far it is up-to-date. This means that the version in the ports
is equal to the the latest from the developer. No much to do here :(

I went back to the list of ports and I noticed that the ports that need an update are in purple.

I found the following port imgseek. The port version is 0.84 and the latest from the developer is 0.8.6

I guess I will be updating this one.

After all these, I came to the conclusion that depending of your time you can contribute to FreeBSD by:

1.- Become maintainer of an up-to-date port
2.- Find a port and update it to the latest version
3.- Find an application that does not have a port and make one.

Note: I just installed imgseek and when I tried to run it I get the following:

Starting imgSeek, please wait ...
Version 0.8.4
--------- Traceback ------------------
Traceback (most recent call last):
File "/usr/local/bin/imgSeek", line 26, in ?
from imgSeekLib import imgSeekApp
File"/usr/local/lib/python2.4/site-packages/imgSeekLib/imgSeekApp.py", line 2793, in ?w = DlgMain(a) # create main window
File"/usr/local/lib/python2.4/site-packages/imgSeekLib/imgSeekApp.py", line 53, in __init__MainForm.__init__(self, parent, name, fl)
File"/usr/local/lib/python2.4/site-packages/imgSeekLib/MainForm.py"

--------------------------------------
You have found a bug, please help us by submitting the text above and a precise description of how you caused it to "http://imgseek.sourceforge.net/bugs"

What do I do in this case, once I become the maintainer of this port???

Thursday, February 1, 2007

Recommendations

1.- Have a hard copy of porter's Handbook
2.- Print out the Makefile of your port, become familiar with it as you are reading the handbook
3.- Print out the following man pages: diff(1), patch(1), PKG_VERSION(1) and send-pr(1)
4.- Print out file bsd.port.mk which is located at /usr/ports/MK/ in your system
5.- Update your system and install the latest port. That will show the latest info on your port
6.- I also download the source of the port. Look around and try to see how it all works

Last point makes me think, if there is a bug in the program, who has to fix it?
developer, committer or maintainer...

Also, I am thinking of getting into learning C language.

Can anybody recommend me a good book?

Tuesday, January 30, 2007

Day 2

25% of the Handbook already read.

In the meantime, I visited this site
There, I found a list of ports that require a maintainer.

The list of ports is in order of Category :

Archivers
Astro
Benchmarks
Biology
Cad
Chinese
Comms
Converters
Databases
Deskutils
Devel
DNS
Editors
Emulators
Finance
French
FTP
Games
Graphics
IRC
Japanese
Java
Korean
Lang
Mail
Math
Misc
Multimedia
Net
Net-mgmt
Net-p2p
News
Palm
Print
Russian
Science
Security
Shells
Sysutils
Textproc
WWW
X11
X11-clocks
X11-fm
X11-fonts
X11-servers
X11-themes
X11-toolkits
X11-wm

I went through some of them and specially those one
that I could use on my PC.

I found this one: fluxconf. This is a gtk application that
helps you configure Fluxbox.

Then, I sent an email to ports@FreeBSD.org
asking to be the maintainer of that port.

:0 This morning I received an email advising me
that I am now the maintainer of that port.

Now I am the adopter of this port

Monday, January 29, 2007

Day 1

Read, read, read

Following a blog post from one of my favorites bloggers link
I will try to contribute to FreeBSD by adopting a port.

First step, read the documentation FreeBSD porter's Handbook

About Me