Rpm
Aus SchnallIchNet
(Weitergeleitet von Rpmbuild)
Inhaltsverzeichnis
rpm
some rpm commands
rpm (query)
rpm -qa
list all installed packages
rpm -qf /usr/bin/sar sysstat-9.0.4-22.el6.x86_64
show rpm-package name which installed file '/usr/bin/sar'
rpm -ql php-stomp-1.0 /usr/share/php/Stomp /usr/share/php/Stomp.php /usr/share/php/Stomp/Exception.php /usr/share/php/Stomp/Frame.php /usr/share/php/Stomp/Message /usr/share/php/Stomp/Message.php /usr/share/php/Stomp/Message/Bytes.php /usr/share/php/Stomp/Message/Map.php
show files contained in package: php-stomp-1.0
rpmbuild
to sign a package while generating with rpmbuild use '--sign'
rpmbuild --sign -bb SPECS/zendstudio.spec
for --sign the 'rpmmacros'-file should contain the following.
the best way is to use ~/.rpmmacros in your home directory
%_signature gpg %_gpg_name [THE NAME AND EMAILADDRESS OF THE KEY TO USE] %_gpgbin /usr/bin/gpg
rpmmacros
my full rpmmacros file looks like this:
%_topdir /usr/src/redhat %_unpackaged_files_terminate_build 0 %_missing_doc_files_terminate_build 0 %_signature gpg %_gpg_name [THE NAME AND EMAILADDRESS OF THE KEY TO USE] %_gpgbin /usr/bin/gpg
and the contents of the directory '%_topdir' looks like that:
./BUILD ./RPMS ./SOURCES ./SPECS ./SRPMS
rpmlint
check for errors in rpm-packages
rpmlint ./path/to/package.rpm
rpm2cpio
extract a rpm-package:
- download package
- extract with:
rpm2cpio ./libstdc++-4.3.2-7.i386.rpm | cpio -i --make-directories