At this stage of SBR600, we are going to create our own spec file to build some package from the source tar ball. I started with Bind. Then jumped to other packages. Finally I decide to stick to Wireshark.
My first stop is GTK+ package. The build exit with error because I didn't have GTK+ installed. I run yum install gtk+. Then run rpmbuild again. I still got the same error. The requirement of GTK+ is version 2.4.0+, and what I installed is version 1.9.2. I didn't know what to do. I left it there.
During the lab time, I got help from the teacher that I should install gtk2. Now the build went further. Then I run into rpant(?) error, which is about hard coded library file names. I stopped there since lab time is up.
I picked it up again at home. My home computer is 32 bit kernel. I didn't get the error I got from the school computer. (I will investigate that error when I have spare time.) So I played with %file section a little bit and I got my first build through without errors. The rpm How to page is very helpful.
Then I run rpmlint on the rpm file. From SPECS dir run: rpmlint -i ../RPMS/i686/*. I got 47 errors and 42 warnings. There are three types of major errors. One is about debug info. It complains that "/usr/lib/debug/usr/lib/wireshark/..."; another type of error complains some library files didn't call ldconfig; yet another type was that "standard library file was included in the package". I didn't have much idea how to deal with them. I went to IRC try to get help from Chris Tyler. He suggested me to remove all the debug files. For calling ldconfig, he told me to add %post and %postun sections and call ldconfig there. I also modified %{_mandir} setting to address the standard library complains.
So that's it. I got 5 warnings and no errors when I run rpmlint again. The warning mainly about devel files packed into normal lib files. I don't know how to deal with it. I have my spec file and rpm file in my matrix account: (do I need put other files?)
matrix.senecac.on.ca/~zwang98/SPECS
matrix.senecac.on.ca/~zwang98/RPMS
In conclusion, I spent quite some time to accomplish this task. It was frustrating at some point. Also, if each build run 8 - 10 minutes, 2, 3 hours go very fast. In the end, however, I feel I scratch the surface of rpm build process. I may consider to do a quick reading of Maximum RPM. I don't know ...
No comments:
Post a Comment