use spec syntax hiliting --- https://www.pld-linux.org/rpm5?rev=1353773690 +++ https://www.pld-linux.org/rpm5 @@ -25,10 +25,11 @@ ==== Querying database ==== The semantics of rpm query option **-f** (**--file**) has changed in rpm 5.x; '''rpm -q -f <file-with-path>''' will **not** resolve all symlinks in queried file's path. So the query (assuming ///usr/src/linux// is a symlink to ///usr/src/linux-A.B.C-R//): - <file>rpm -q -f /usr/src/linux/include/linux/fs.h - </file> + <code>rpm -q -f /usr/src/linux/include/linux/fs.h + </code> + That returned //kernel-headers-A.B.C-R.arch.rpm// with old rpm, will return nothing with rpm 5.x. You have to do '''readlink -f''' first, or change to symlinked directory and do relative path query. @@ -57,45 +58,46 @@ * **Stack Smashing Protector** is also enabled by default, if you really MUST disable SSP then undefine **_ssp_cflags** macro ==== Loading additional macros in .spec files ==== - With old rpm 4.x several macro files were loaded in .spec files via **#include** directive: + With old rpm 4.x several macro files were loaded in .spec files via **#include** directive: - <file>%include /usr/lib/rpm/macros.perl + <file rpmspec>%include /usr/lib/rpm/macros.perl </file> - In rpm 5.x those macro files have been moved to ''/usr/lib/rpm/macros.d/'' directory, and must be loaded using %{load:} directive. However the old statement still works, as it contains the same code to load the macros. + In rpm 5.x those macro files have been moved to ''/usr/lib/rpm/macros.d/'' directory, and must be loaded using %{load:} directive. However the old statement still works, as it contains the same code to load the macros. - <file>%{load:/usr/lib/rpm/macros.d/perl} + <file rpmspec>%{load:/usr/lib/rpm/macros.d/perl} </file> ==== Excluding dependencies ==== Regexp patterns for '''%%_noauto*%%''' macros changed slightly, and '(' must be escaped now, for example: - <file> + <file rpmspec> %define _noautoreq 'perl\\(something::.*\\)' </file> rpm-build-tools [[http://git.pld-linux.org/?p=packages/rpm-build-macros.git;a=commitdiff;h=0a9bb9747529d8f89a74f6db5f317abe1454d8ac|v1.654]] adds handy macros to have same syntax for rpm4/5 .specs: - <code> + <code rpmspec> BuildRequires: rpmbuild(macros) >= 1.654 %define _noautoreq_pear Excluded.php PEAR/Something.php %define _noautoreq_perl Apache::.* </code> + ==== noarch subpackages ==== Rpm 5.x supports **noarch** subpackages, a feature that can save space on ftp server and mirrors and ease use of multiarch packages. To use it within a package, add in the preamble of a subpackage that should be/is architecture independent: - <file> + <file rpmspec> # noarch subpackages only when building with rpm5 %if "%{_rpmversion}" >= "5" BuildArch: noarch %endif </file>
Diff URL: https://www.pld-linux.org/rpm5?do=diff&r1=1353773690&r2=1353775142 -- This mail was generated by DokuWiki at https://www.pld-linux.org/ _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
