Hi Jeff,
On Sat, Jul 29, 2006 at 11:25:27AM -0400, Jeff Johnson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> On Jul 29, 2006, at 5:53 AM, Axel Thimm wrote:
>
> >On Sat, Jul 29, 2006 at 11:59:02AM +1000, John Pye wrote:
> >>Hi all
> >>
> >>What's the right way to build an RPM so that it outputs
> >> mypackage-1.0-1.fc4.i386.rpm and
> >> mypackage-1.0-1.src.rpm
> >>when I build it on FC4, but
> >> mypackage-1.0-1.fc5.i386.rpm and
> >> mypackage-1.0-1.src.rpm
> >>when I build it on FC5?
> >>
> >>I want the binary packages to be labelled with the different
> >>distribution tags, but I want the src RPM not to be labelled with the
> >>distribution.
> >>
> >>Up til now, I've been using
> >>Release: 1.%{dist}
> >>and I've defined %dist fc4 in my ~/.rpmmacros file.
> >>
> >>Is there a better way?
> >
> >Redefine macros that come up in the Release on the command line to
> >rpmbuild, e.g.
> >
> >rpmbuild -bs --define 'dist %{nil}' ...
> >rpmbuild -bb --define 'dist superdistro9' ...
> >
> >You should make sure no spurious dot remains. And the binary rpm will
> >lie that it was built from a src.rpm with a distro in the Release
> >tag. But that's aesthetics.
>
> Building for a distro, rather than for specific differences and
> incompatibilities, is intrinsically flawed and broken.
Agree 100%
> Every build that tests the value of %{dist} needs to be repaired
noone suggested using the information about the distro other than
being part of the Release tag, I agree that the distro name/version
should not abused as you outline.
> Fix known problems in the software itself with patches, not fiddling
> around with the build packaging.
The probable reason for the request (can't guess the OP's motivation,
but it very much looks so) is to ensure proper upgrade paths within
"fc" when rebuilding the same src.rpm package on different releases of
the distro, which is a very handy method to support/maintain several
releases with one specfile, and which has spread all over the repos by
now.
--
Axel.Thimm at ATrpms.net
Attachment:
pgpbbC8ok589w.pgp
Description: PGP signature