Jeff Johnson a écrit :
is there a way to define a macro saying something like
Release: %{release}.repo
That should work exactly as is.
Humm, I think I'm doing something wrong.
I've put the above line in my ~/.rpmmacro file and... nothing.
release remains what is defined in the spec file.
what I want is simply rpmbuild --rebuild foo-1.0-1.src.rpm and obtain
foo-1.0-1.repo.arch.rpm and rpm -qp foo-1.0-1.repo.arch.rpm respond
foo-1.0-1.repo.rpm
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.
generating a new spec file for each package I have to recompile and
*maintaining* it requires too much work from me...
I just want to use the src rpms as the integrators give them to me and
have a "rpm building chain" that automatically add what I need in the
release field.
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
not if there is a file in the SOURCES that's named something.spec (by
example, the rpm package could include an example.spec file in its
source package that would be added in a doc directory as an example)
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
humm, interresting.
are we sure that the spec file is always on last position ?
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.
thanks a lot, jeff
73 de Jeff
51
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list