Re: using rpmmacros to automatically update release

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

 




On Mar 27, 2007, at 6:02 AM, Sebastien BLAISOT wrote:

Hi all,

I'm trying to build a bunch of .src.rpm files that are not maintained by me and that I don't want to modify.

This can be done without problem.

But I also want to update all package releases to release.repo (say repo is MY repository name (like .rf in rpmforge packages), or if it could be the distro against which the package has been build (like .EL4 in some redhat packages))

is there a way to define a macro saying something like
Release: %{release}.repo


That should work exactly as is.

(aside) I suggest choosing a name other than %{release} becuase
the value of %{release} will be different before and after
    Release: %[release}.repo
i.e. Release: redefines %{release} when parsed.

i don't want to edit all spec files by hand and maintain a fork for each package.

alternatively, if there is no solution with an rpm macro, I will have to script it. is there a way to know the name of the spec file from a srp.rpm source package ?


Generating a spec file is likely less hassle than using a macro imho.

This is likely easiest way to extract the name of the spec file:

    $ rpm -qlp rpm-4.4.9-0.1.src.rpm | grep 'spec$'
    rpm.spec

Note that "foo.spec" is just a convention even if widely used.

The spec file is always in the same location iirc, so this is likely to work:

    $ rpm -qlp rpm-4.4.9-0.1.src.rpm | tail -1
    rpm.spec

There's also a file flag that marks a spec file in a src rpm iirc.

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