RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Pinto Elia Root: /v/rpm/cvs Email: devzero2...@rpm5.org Module: rpm Date: 09-May-2011 16:10:09 Branch: HEAD Handle: 2011050914100900 Modified files: rpm CHANGES rpm/doc/manual spec Log: document arbitrary tags in the spec manual Summary: Revision Changes Path 1.3629 +1 -0 rpm/CHANGES 1.9 +46 -0 rpm/doc/manual/spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.3628 -r1.3629 CHANGES --- rpm/CHANGES 9 May 2011 13:53:26 -0000 1.3628 +++ rpm/CHANGES 9 May 2011 14:10:09 -0000 1.3629 @@ -1,4 +1,5 @@ 5.4.0 -> 5.4.1: + - devzero2000: document arbitrary tags in the spec manual - devzero2000: added arbitrary tag for security description and reference. Fix a typo in arbitrary_tag_tests also. - devzero2000: fix typo, add more info to per_transaction_dependecies doc. @@ . patch -p0 <<'@@ .' Index: rpm/doc/manual/spec ============================================================================ $ cvs diff -u -r1.8 -r1.9 spec --- rpm/doc/manual/spec 11 Mar 2011 15:59:29 -0000 1.8 +++ rpm/doc/manual/spec 9 May 2011 14:10:09 -0000 1.9 @@ -223,4 +223,50 @@ BuildConflicts: gcc <= 2.7.2.1 \endverbatim +Perhaps the most important syntax change introduced with RPM5 in the last years +was the so-called "arbitrary tags". + +These are configurable tagname/tokens that can then be used in *.spec files. + +The tag you want to add goes into this permitted syntax tuple: +\verbatim + %_arbitrary_tags_debian Priority:Essential:Depends:Predepends:Recommends:Suggests:Enhances:Breaks: + %_arbitrary_tags_tests Foo:Bar + %_arbitrary_tags_security CVEID:RHSA:RHBZ:MDVSA:SUSE-SA:CVSSv2 + %_arbitrary_tags Class:Track:Trackprog:Depflags:Transflags:%{_arbitrary_tags_debian}:%{_arbitrary_tags_tests} +\endverbatim +This is what i happen to have checked-in in the principal rpm macro configuration file. +Configure what tags you wish in your vendor macro file under macros.d, or in a specific +macro definition file, depending how you have configurated rpm with the configure +--with-path-macros=<list of path separated from :> option. + +Once the tag is permitted it can be used in the spec file either as +\verbatim + Foo: some string value +\endverbatim +or +\verbatim + %foo + some longer string value. +\endverbatim +Multiple occurences of an arbitrary tag will convert to an argv array from a string. +So if you have defined, for this example, the arbitrary tag Foo as: +\verbatim + Foo: string1 + Foo: string2 + Foo: string3 +\endverbatim +After you've installed the package, by running the command +\verbatim + rpm -q --qf '[Foo: %{Foo}\n]' +\endverbatim +you have this result +\verbatim +Foo: string1 +Foo: string2 +Foo: string3 +\endverbatim + + + */ @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org