[Rpm-maint] Reserve ALT RPM tags range
Vladimir D. Seleznev
vseleznv at altlinux.org
Tue Mar 6 16:29:01 UTC 2018
On Wed, Feb 28, 2018 at 05:54:27AM -0500, Jeff Johnson wrote:
> > You might try the convention of assigning tags in the 1Gb space from 0x40000000 to 0x4fffffff as you wish.
> >
> > (aside)
> > RPM5 has something called "arbitrary tags" in the 0x40000000 -> 0x4fffffff range.
> >
> > Short answer:
> > Choose any tagno in that range and do what you wish.
> >
> > Longer answer:
> >
> > Choose a tag name string.
> >
> > The tagno is computed from a (configurable) tag name string as follows:
> >
> > 1) the tag name plain text is canonicalized (leading alphabetic, alphanumeric characters, 1st letter uppercase, rest lowercase). E.g. "Mynewtag42"
> >
> > 2) the 4 binary bytes of the SHA1 of the canonical string are copied into a uint32 (which needs to be swabbed on big endian platforms).
> >
> > 3) the tagno is assigned by then masking on the 0x40000000 arbitrary tag identifier onto the least significant 30 bits of the uint32.
Thank you for the suggestion, I think we shall follow this!
--
With best regards,
Vladimir D. Seleznev
More information about the Rpm-maint
mailing list