RPM Tips:
http://www.rpm.org/max-rpm/index.html
---
Building an RPM.
It's a pain in the ass.
if you get this:
warning: user ... does not exist - using root
warning: group ... does not exist - using root
---
You can stick:
%files
%defattr(-, root, root)
into the rpm
---
Adding a script into %build or %install? Either way. Just make sure that the
directory or files you are adding are included in the %files section.
---
Setting:
AutoReqProv: No
Allows you to build an rpm build no dependency check being done at build time
- convenient when you're building RPMs on AIX.
---
Building a Relocatable Package:
Prefix: /opt
Things under the %files section stay as is but every time it sees
/opt/bin/baz
it'll replace it with the user specified prefix such as "/usr/local/opt" and /bin/baz.
All files under the %files section MUST begin with Prefix (in this example /opt).
---
Extracting files from an RPM:
rpm2cpio pgpcmdln-9.0.3.1010-1.aix5.2.ppc.rpm | cpio -i --make-directories
rpm2cpio ovidclient-deploy-2.7.0.1012-1.i386.rpm | cpio -idv
---
http://sial.org/howto/rpm/sign/
Signature Problems
RedHat Package Manager (RPM) built with old versions of rpmbuild cannot be
signed, due to bugs in the old rpmbuild command. Worse, signing the bad RPM
corrupts the file. To fix, the source RPM should be rebuilt with a modern
version of rpmbuild. If no source RPM is available, the package will have to
be handled specially, as it cannot be used where clients check for valid
Pretty Good Privacy (PGP) signatures, for example on Yellowdog Updater,
Modified (YUM) client systems.
$ wget -q --passive-ftp ftp://ftp.compaq.com/pub/products/servers/\
supportsoftware/linux/hpacucli-7.50-18.linux.rpm
$ rpm -K hpacucli-7.50-18.linux.rpm
hpacucli-7.50-18.linux.rpm: md5 OK
$ rpm --addsign hpacucli-7.50-18.linux.rpm
Enter pass phrase:
Pass phrase is good.
hpacucli-7.50-18.linux.rpm:
$ rpm -K hpacucli-7.50-18.linux.rpm
error: hpacucli-7.50-18.linux.rpm: rpmReadSignature failed: region
trailer: BAD, tag 61 type 7 offset 48 count 16
---
Package Order:
anaconda-runtime/pkgorder . i386
% createrepo RPMS
% cd RPMS
% cd repodata
% pkgorder
or
% rpm -qa --last