Macros in Source fields (was: Re: Prelink success story :))

Michael Schwendt ms-nospam-0306 at arcor.de
Fri Feb 27 00:20:02 UTC 2004


On Thu, 26 Feb 2004 18:25:03 -0500, Toshio wrote:

> Coupled with Ville's comment that package QA people really
> should be checking out web pages and so forth to make sure they have
> a canonical source rather than cut 'n paste, macros in Source: make more
> and more sense to me.  (Although I'll definitely miss cut and paste when
> I'm QA'ing an update package and I already checked out the canonicalness
> in the previous version.)

Macros in URLs simply don't work. If you want macros in Source tags,
cut off everything up to the file name like

  Source0: %name-%version.tar.gz

and put an example download URL as a comment, e.g.

  # ftp://ftp.foo.bar/foo/foo-1.0.tar.gz
  Source0: %name-%version.tar.gz

Certainly much better than weird constructs like

  Source0: http://www.foo.bar/%name/%version/%name-%{version}rc1.tar.gz

(note the ugly "rc1" hack)

Also note that only the expanded file name will appear in the RPM header,
not the URL prefix.

-- 





More information about the fedora-devel-list mailing list