Re: using rpmmacros to automatically update release

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/27/07, Sebastien BLAISOT <sblaisot@xxxxxxxxxxx> wrote:
>
> Try in ~/.rpmmacros
>   %release yadda
>
> Or from command line
>    --define 'release yadda'

not working here because, I think, release is defined in the spec file.
do you know af another way to solve this ?


My bad for thinking out loud. Passing (at least) Release: from a --define
is basically a question of choosing the CLI macro or the spec file
text to add to a header.

That's like a 3-5 line change to rpmbuild.
Which I haven't done.
Yet.

>> are we sure that the spec file is always on last position ?


Another brain fart of mine. At one point in time (like rpm-4.0) the
spec file was always last. Source rpm headers now sort file
paths so that bsearch can be used to process the next file
in an archive (which is also sorted in the same order, but does
not have entries for say %ghost files, or deleted files that were
not added to a repackaged rpm.

So the spec file is no longer the last file.

> The position is deterministic iirc.

ok, thanks.

>> > There's also a file flag that marks a spec file in a src rpm iirc.
>>
>> Humm, very interesting.
>> I'll look a bit further in that direction.
>
> The flag is in RPMTAG_FILEFLAGS with value
>    RPMFILE_SPECFILE    = (1 <<  5)
>
> Testing whether the bit is on is left as an exercise ...

yes, found.


The RPMFILE_SPECFILE flag is the most reliable marker. It's highly
likely there is only a single .spec file extension in all source rpm's
however. And its rather easy to fix whatever insanity one might find
in the wild.

73 de Jeff

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux