On Nov 5, 2010, at 2:25 PM, Sriram Narayanan wrote:

> Hello:
> 
> For backward compatibility and collaboration reasons, the Belenix team
> needs to pull in spec files that were created for pkgbuild.
> 
> For various reasons, the pkgbuild spec files have some extra tags that
> make sense to pkgbuild. These are tags such as:
> SUNW_BaseDir:
>    corresponds to BASEDIR in the pkginfo(4) file, default: /
> 
>  SUNW_Pkg:
>    the package abbreviation (PKG parameter) in the pkginfo(4),
>    defaults to %{name}
> 
>  SUNW_ProdName:
>    SUNW_PRODNAME in pkginfo(4), omitted from pkginfo if not defined.
> IPS_Package_Name:
>    Defines the name of the IPS package.  Default: %name
> 
>  IPS_SourcePackage:
>    Defines the name IPS source package.  Default: %{name}/src
> 
> 
> A complete list is given here [1] in the section "4.1  pkgbuild-specific tags"
> 
> How do we add support for custom tags in rpm5 ?
> 

There's two ways:

1) Allocate a new tag in rpmdb/rpmtag.h and roll in some simple syntax.

2) Add an arbitrary tag through configuration:

        %_arbitrary_tags        
Sunw_pkg:Sunw_prodname:Ips_package_name:Ips_sourcepackage

which can then be used immediately in *.spec files as
        SUNW_Pkg:       whatever
        SUNW_ProdName:  whatever
etc etc.

There's no real reason a priori to prefer one or the other method, because
both approaches end up with tagno's (i.e. a numeric, not a string, identifier)
added to *.rpm packages.

The decision criteria is largely what type of data is being mapped into 
packages,
like is
        Is the metadata to be distributed with SRPM's? or RPMS? or both?
and
        What is the metadata to be used for semantically?

I can work through either path for OpenIndiana if/when you need the tags wired 
up.

73 de Jeff

        

______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        [email protected]

Reply via email to