RPM Community Forums

Mailing List Message of <rpm-users>

Re: Spaces in filenames in a spec file???

From: Mark Hatle <mark.hatle@windriver.com>
Date: Mon 13 Jul 2009 - 16:07:45 CEST
Message-ID: <4A5B3FB1.4040702@windriver.com>
See comments below inline..

Michael Lasevich wrote:
> =======================
> Name: vj_space_tester
> Version: 1.2
> Release: 090712_1925
> License: None
> Group: None
> BuildRoot: /data/yum/factory/space_tester/root
> AutoReqProv: no
> Summary: No Summary
> BuildArch: noarch
> Requires: vj_base
> 
> # Finished header
> 
> %description
> 
> space_tester

Due to the way macros are processed, having anything that starts w/ a "%" in a 
comment is not guaranteed to be ignored.  If you'd like a rationale: macros are 
always expanded.. and may be multiple lines once expanded, only the first line 
would be commented out.

> # Description done
> #%prep
> #%build
> #%install
> #%post

In the above remove the "%" or make it "%%prep"  (%% translates to a literal "%" 
and avoids expansion.)

> %files
> %defattr (755,root,root)
> %dir ""
> %attr(644,root,root) "/fileWithoutSpaces"
> %dir "/dirWithoutSpaces"
> %attr(644,root,root) "/File With Spaces"
> %dir "/dir With Spaces"
> #%pre
> #%preun
> %changelog

I suspect the #%pre or #%preun may be part of the problem.  Remove them, or 
again change the "%".

Also an empty changelog MIGHT cause problems.. (I'm not sure.)

--Mark

> ============================
> 
> Relevant error output is:
> ============================
> Processing files: vj_space_tester-1.2-090712_1925
> error: File must begin with "/":
> Checking for unpackaged file(s): /usr/lib/rpm/check-files 
> /data/yum/factory/space_tester/root
> 
> 
> RPM build errors:
>    File must begin with "/":
> ============================
Received on Mon Jul 13 16:08:10 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.