We help IT Professionals succeed at work.

Create File LIst for RPM Build

aaeandcee asked

I'm new to building RPMs.  I have an application I can use Installshield to install, but my organization has a need to have it as an automated install.  The feature of Installshield to use an answer file is broken in this version, thus the reason for an RPM.  What I would like to do is install the application on my Red Hat 5.5 platform and then generate a list of all the files that were installed.  I have seen that you can use touch filename, but other posts suggest this may be a problem.  I've also seen you can use Tripwire, but the system I'm installing to is pretty stripped down so I may not be able to install it.  Any suggestions on how to get a list of files installed would be great!  Thank you
Watch Question

By default one would build RPM packages as unprivileged user. Inside the .spec file that drives 'rpmbuild' a "buildroot" is defined. On "%install" the 'make install prefix=${RPM_BUILD_ROOT}' then populates the directory hierarchy with files as any regular installation would. Running 'find' in the $RPM_BUILD_ROOT directory should show all files. These "installed" files should be entered in the .spec file "%files" section to be included in the package (or use auto-fill: http://docs.fedoraproject.org/drafts/rpm-guide-en/ch09s05.html).

* Note that when building from source when you run 'make -n install' ("-n" as in "--dry-run") after compiling this will present output from which you could extract files to be installed.

If you're new to building packages then please consult the documentation your distribution provides. A simple introduction to building packages can also be read at the IBM DeveloperWorks: http://www.ibm.com/developerworks/library/l-rpm1/.

** It is possible to just install from source on a development workstation, create a tarball from the resultant files (checkinstall, installwatch?) and use that as input for building a RPM package. While such a shortcut may seem tempting it should not be used as it is not a standard procedure nor will the package conform to quality standards.

Also before you continue please ensure that installing your own packages does not negatively impact any official support if you bought any.


Thank you.  I have reviewed some of these guides.  However, I am not compiling from source.  What I have is a pice of software that is installed using Installshield.  I need to determine how to create a list of files that we installed by Installshield, as well as their location.


I also wanted to add that this is not for introduction into a repo, or to be used widely.  This is a departmental installation.

Have a look at checkinstall (http://asic-linux.com.mx/~izto/checkinstall/).
Find the exact RPM package name by:
rpm -qa | grep <package name>

Then do:
rpm -ql <package name>

e.g. rpm -ql httpd-2.0.52-41.ent.7

This will give you a list of all files in the RPM and the location on the disk