git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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)
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 11 in “[RFH] rpm packaging failure”
  1. Junio C HamanoJan 30, 2010
  2. Todd ZullingerJan 30, 2010
  3. Junio C HamanoJan 30, 2010
  4. Todd ZullingerJan 30, 2010
  5. Junio C HamanoJan 30, 2010
  6. Todd ZullingerJan 31, 2010
  7. Junio C HamanoJan 31, 2010
  8. David AguilarJan 31, 2010
  9. David AguilarJan 31, 2010
  10. Johan HerlandJan 31, 2010
  11. Sverre RabbelierJan 31, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.