Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hi, I am trying to create a binary rpm using the rpmbuild utility. Specifically, the software I am packaging is a vendor product provided in the form of a tar archive and a korn shell installer. I've managed to create a spec file that will invoke the installer script and copy all the files into virtual build dir (${RPM_BUILD_ROOT}). Now in the %files stanza, it appears I need to list all the files/dirs. My question is: is there an easy way to do this? I looked at different macros and examples, but most are assuming building from source and using standard Red Hat install dir structure (/usr/lib, /usr/bin etc.)/
Any help or suggestions would be greatly appreciated!
I'm usually lazy so I skip the %files section and attempt to build the package, rpmbuild will then give you a list of installed but unpackaged files. Look through the list for common directories, if the directory is app specific then include it like so:
/opt/<myapp>
If there are config files under /etc then add:
/etc/*
If there are README's and so on in the root of the tarball then use:
%doc README ...
If there are man pages then use:
%{mandir}/man1/*
..and so on until there are no files left unpackaged.
Also, please install rpmlint and run it against your package or spec file, it's output can be very helpful.
As a quick follow-up: with the help of unSpawn and kbp, I was able to build a binary rpm. Having read the docs, I understand that rpmbuild performs automatic dependency checking (I was able to turn it off using the 'AutoReqProv: no' flag). But with the auto dependency checking, when I try to test the rpm, it fails with all kinds of dependencies, even on a machine on which it is already installed! How can that be? Is it because the dependencies were presumably installed without using RPM?
[mjovanov@eset-tan SPECS]$ rpm --test -Uvh ../RPMS/x86_64/apache_custom.x86_64.rpm
error: Failed dependencies:
/usr/local/bin/python is needed by apache_custom.x86_64
libclntsh.so.10.1()(64bit) is needed by apache_custom.x86_64
libclntsh.so.9.0()(64bit) is needed by apache_custom.x86_64
libcomn_r64.so()(64bit) is needed by apache_custom.x86_64
libcs_r64.so()(64bit) is needed by apache_custom.x86_64
libct_r64.so()(64bit) is needed by apache_custom.x86_64
libhpodbc_l64.so.2()(64bit) is needed by apache_custom.x86_64
libifcli.so()(64bit) is needed by apache_custom.x86_64
libifgls.so()(64bit) is needed by apache_custom.x86_64
libifglx.so()(64bit) is needed by apache_custom.x86_64
libimqb23gl.so()(64bit) is needed by apache_custom.x86_64
libimqc23gl.so()(64bit) is needed by apache_custom.x86_64
libimqs23gl.so()(64bit) is needed by apache_custom.x86_64
libintl_r64.so()(64bit) is needed by apache_custom.x86_64
libmqcxa64.so()(64bit) is needed by apache_custom.x86_64
libmqmxa64.so()(64bit) is needed by apache_custom.x86_64
libodbc.so()(64bit) is needed by apache_custom.x86_64
libodbc.so(VERS_3.52)(64bit) is needed by apache_custom.x86_64
libodbcinst.so()(64bit) is needed by apache_custom.x86_64
libodbcinst.so(VERS_3.52)(64bit) is needed by apache_custom.x86_64
libpxicu.so()(64bit) is needed by apache_custom.x86_64
libreadline.so.4()(64bit) is needed by apache_custom.x86_64
libsybcomn_r64.so()(64bit) is needed by apache_custom.x86_64
libsybcs_r64.so()(64bit) is needed by apache_custom.x86_64
libsybct_r64.so()(64bit) is needed by apache_custom.x86_64
libsybintl_r64.so()(64bit) is needed by apache_custom.x86_64
libsybtcl_r64.so()(64bit) is needed by apache_custom.x86_64
libsybunic64.so()(64bit) is needed by apache_custom.x86_64
libtelapi.so()(64bit) is needed by apache_custom.x86_64
libwtc9.so()(64bit) is needed by apache_custom.x86_64
[p002197@eset-tan SPECS]$
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.