Posted on

Building grep and jwhois rpms

Building GREP RPM:
Required downloaded packages: grep-2.9.tar.xz
1)Run “rpmdev-setuptree”
2)Copy grep-2.9.tar.xz into ~/rpmbuild/SOURCES
3)Change dir to ~/rpmbuild/SPECS
4)Run “rpmdev-newspec grep”
5)Fill in data you already know into the spec file.
6)Run “rpmbuild -ba grep.spec” to try and build your package.
ERRORS:
1) (grep failed to build due to this error)
RPM build errors:
error: Installed (but unpackaged) file(s) found:
/usr/bin/egrep
/usr/bin/fgrep
/usr/bin/grep
/usr/share/info/dir
/usr/share/info/grep.info.gz
/usr/share/locale/af/LC_MESSAGES/grep.mo
/usr/share/locale/be/LC_MESSAGES/grep.mo
/usr/share/locale/bg/LC_MESSAGES/grep.mo
/usr/share/locale/ca/LC_MESSAGES/grep.mo
/usr/share/locale/cs/LC_MESSAGES/grep.mo
/usr/share/locale/da/LC_MESSAGES/grep.mo
There were more files but I’m not gonna list them to save space. To fix this, I had to add all these files to the spec file under the %files part. After that, the program built fine.
rpmlint errors:
1) grep.x86_64: E: no-changelogname-tag
Solution: Put in the changelog info in correct format into the spec file and rebuild the rpm.

2) grep.x86_64: E: info-files-without-install-info-postin /usr/share/info/grep.info.gz
AND
grep.x86_64: E: info-files-without-install-info-postun /usr/share/info/grep.info.gz
Solution to above 2 errors: Add the following in your spec file:
%post
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir ||:

%preun
If [ $1 = 0 ] ; then
/sbin/install-info –delete %{_infodir} /%{name}.info %{_infodir}/dir ||
Fi
of course, I found this on another student’s SBR blog.
3) grep.x86_64: E: info-dir-file /usr/share/info/dir
Solution from another student’s blog: http://amartinencosbr600.blogspot.ca/2012/09/creating-rpm-packages.html
Solution:
“Since need to remove one of them I looked at the other spec files of other RPMs and I noticed that most of them have this line after %make_install: rm –f $RPM_BUILD_ROOT%{_infodir}/dir and remove %{_infodir}/dir”
I tried this and it resulted in a build error, so this is the only error I couldn’t fix, along with a bunch of warnings that would take too long to fix.
RPMLINT -i showed the following:
grep.x86_64: W: incoherent-version-in-changelog Lab [‘2.9-1.fc19’, ‘2.9-1’]
grep.x86_64: W: invalid-license GNU
grep.x86_64: W: invalid-url URL: http://www.grep.com <urlopen error [Errno -2] Name or service not known>
grep.x86_64: E: info-dir-file /usr/share/info/dir
grep.x86_64: W: manual-page-warning /usr/share/man/man1/grep.1.gz 24: warning: macro `Dt’ not defined
grep.x86_64: W: file-not-in-%lang /usr/share/locale/af/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/be/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/bg/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/ca/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/cs/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/da/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/de/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/el/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/eo/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/es/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/et/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/eu/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/fi/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/fr/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/ga/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/gl/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/he/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/hr/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/hu/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/id/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/it/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/ja/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/ko/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/ky/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/lt/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/nb/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/nl/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/pl/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/pt/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/pt_BR/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/ro/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/ru/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/sk/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/sl/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/sr/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/sv/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/th/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/tr/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/uk/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/vi/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/zh_CN/LC_MESSAGES/grep.mo
grep.x86_64: W: file-not-in-%lang /usr/share/locale/zh_TW/LC_MESSAGES/grep.mo
1 packages and 0 specfiles checked; 1 errors, 46 warnings.

BUILDING JWHOIS RPM
Preparation steps are all the same as in the previous package above.
When attempting to build the RPM I got the following build error:
RPM build errors:
Installed (but unpackaged) file(s) found:
/etc/jwhois.conf
/usr/bin/jwhois
/usr/share/info/dir
/usr/share/info/jwhois.info.gz
/usr/share/locale/es/LC_MESSAGES/jwhois.mo
/usr/share/locale/fr/LC_MESSAGES/jwhois.mo
/usr/share/locale/hu/LC_MESSAGES/jwhois.mo
/usr/share/locale/id/LC_MESSAGES/jwhois.mo
/usr/share/locale/it/LC_MESSAGES/jwhois.mo
/usr/share/locale/nl/LC_MESSAGES/jwhois.mo
/usr/share/locale/pl/LC_MESSAGES/jwhois.mo
/usr/share/locale/pt_BR/LC_MESSAGES/jwhois.mo
/usr/share/locale/ro/LC_MESSAGES/jwhois.mo
/usr/share/locale/ru/LC_MESSAGES/jwhois.mo
/usr/share/locale/rw/LC_MESSAGES/jwhois.mo
/usr/share/locale/sv/LC_MESSAGES/jwhois.mo
/usr/share/locale/tr/LC_MESSAGES/jwhois.mo
/usr/share/locale/vi/LC_MESSAGES/jwhois.mo
/usr/share/locale/zh_TW/LC_MESSAGES/jwhois.mo
/usr/share/man/man1/jwhois.1.gz
/usr/share/man/sv/man1/jwhois.1.gz
Solution: Add the following list of files under the %files section of the spec file.
After doing so, the RPM was built succesfully but still had 5 errors which were:
jwhois.x86_64: E: info-files-without-install-info-postin /usr/share/info/jwhois.info.gz
jwhois.x86_64: E: info-files-without-install-info-postun /usr/share/info/jwhois.info.gz
jwhois.x86_64: E: info-dir-file /usr/share/info/dir
jwhois.x86_64: E: info-files-without-install-info-postin /usr/share/info/dir
jwhois.x86_64: E: info-files-without-install-info-postun /usr/share/info/dir

RPMLINT -i showed the following
jwhois.x86_64: W: incoherent-version-in-changelog Basatski [‘4.0-1.fc19’, ‘4.0-1’]
jwhois.x86_64: W: invalid-license GPL
jwhois.x86_64: W: invalid-url URL jwhois.com
jwhois.x86_64: W: file-not-utf8 /usr/share/man/sv/man1/jwhois.1.gz
jwhois.x86_64: W: manual-page-warning /usr/share/man/man1/jwhois.1.gz 1: warning: macro `PU’ not defined
jwhois.x86_64: W: file-not-utf8 /usr/share/info/jwhois.info.gz
jwhois.x86_64: W: non-conffile-in-etc /etc/jwhois.conf
jwhois.x86_64: E: info-dir-file /usr/share/info/dir
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/es/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/fr/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/hu/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/id/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/it/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/nl/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/pl/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/pt_BR/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/ro/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/ru/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/rw/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/sv/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/tr/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/vi/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/zh_TW/LC_MESSAGES/jwhois.mo
1 packages and 0 specfiles checked; 1 errors, 22 warnings.
[slava@localhost SPECS]$ rpmlint ~/rpmbuild/RPMS/x86_64/jwhois-4.0-1.fc19.x86_64.rpm
jwhois.x86_64: W: incoherent-version-in-changelog Basatski [‘4.0-1.fc19’, ‘4.0-1’]
jwhois.x86_64: W: invalid-license GPL
jwhois.x86_64: W: invalid-url URL jwhois.com
jwhois.x86_64: W: file-not-utf8 /usr/share/man/sv/man1/jwhois.1.gz
jwhois.x86_64: W: manual-page-warning /usr/share/man/man1/jwhois.1.gz 1: warning: macro `PU’ not defined
jwhois.x86_64: W: file-not-utf8 /usr/share/info/jwhois.info.gz
jwhois.x86_64: W: non-conffile-in-etc /etc/jwhois.conf
jwhois.x86_64: E: info-dir-file /usr/share/info/dir
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/es/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/fr/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/hu/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/id/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/it/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/nl/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/pl/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/pt_BR/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/ro/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/ru/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/rw/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/sv/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/tr/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/vi/LC_MESSAGES/jwhois.mo
jwhois.x86_64: W: file-not-in-%lang /usr/share/locale/zh_TW/LC_MESSAGES/jwhois.mo
1 packages and 0 specfiles checked; 1 errors, 22 warnings.
These are the same errors I encountered when building the grep RPM, so I went ahead and added the same stuff to the spec file. That left me with 1 dreaded error “jwhois.x86_64: E: info-dir-file /usr/share/info/dir” and I decided it was time to wrap it up. I might look into it in the future but for now I got other classes’ work going and as much of a Linux enthusiast as I am, I had to call it a night.
Overall, building an RPM was a new experience for me, and once again showed me that I know nothing about the world of computers.
Links:
grep srpm https://mega.co.nz/#!UBNAwJYK
grep rpm https://mega.co.nz/#!cBNhmJIY
grep spec https://mega.co.nz/#!0Alg2LRZ

jwhois srpm https://mega.co.nz/#!5M8AhAzY
jwhois rpm https://mega.co.nz/#!8UdFCJKb
jwhois spec https://mega.co.nz/#!5MdFBTxK

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s