Re: [RFH] rpm packaging failure
- From
Todd Zullinger <tmz@pobox.com>
- Date
- Jan 31, 2010, 04:12 UTC
- Message-ID
- <20100131041236.GP29188@inocybe.localdomain>
- In-Reply-To
- <7vd40rjks4.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> To allow us to go forward a bit easier, I am planning to use the > attached, as we would need some parts of it when we do start > generating a separate package, I think.
Sounds good. One minor nit, below... ;)
> %define path_settings ETC_GITCONFIG=/etc/gitconfig prefix=%{_prefix} mandir=%{_mandir} htmldir=%{_docdir}/%{name}-%{version}
> +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}It is probably better to use %global rather than %define here. The Fedora packaging guidelines now recommend this:
http://fedoraproject.org/wiki/Packaging/Guidelines#.25global_preferred_over_.25define
The rationale is that %define only really lasts until the closing brace, while %global persists. A bug in rpm has masked this for a long time, but it now fixed in upstream rpm, which is packaged for Fedora's rawhide and possible other rpm-based distros. A bit more detail is available at:
https://www.redhat.com/archives/fedora-devel-list/2010-January/msg00093.html
(Which is linked, with an incorrect trailing '|' character from the Fedora guidelines URL above.)
Using %global should work on older rpm versions as well as current versions, so there should be no downside to using s/%define/%global in most cases.
--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The secret to success is knowing who to blame for your failures.
-- Demotivators (www.despair.com)