-----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.
Look at what happens when either differences or incompatibilites are
removed (by, say, an
upgrade of a package), or new differences/incompatibilities are
introduced (by, again, upgrade
or a package).
Every build that tests the value of %{dist} needs to be repaired when
differences/incompatibilities
or other distro quirks are tracked implicitly by logic in a spec file
to build for different distros.
The far far better fix is to patch the software to explicitly handle
known differences.
Fix known problems in the software itself with patches, not fiddling
around with the build packaging.
73 de Jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFEy33xuHNkGyA5spERAjOQAJ0SugdVO3/mZa6WpA5v0Uurc7uY7QCeMEyw
lRxoM2O/SnwgmZpVt5ZFCbU=
=WpnN
-----END PGP SIGNATURE-----
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list