Re: Spaces in filenames in a spec file???
On Mon, Jul 13, 2009 at 1:44 AM, Michael Lasevichmisdirec...@lasevich.net wrote: Ok, my root has these files and directories (all empty): -rw-r--r-- 1 root root 0 Jul 12 19:18 File With Spaces drwxr-xr-x 2 root root 4096 Jul 12 19:12 dir With Spaces drwxr-xr-x 2 root root 4096 Jul 12 19:12 dirWithoutSpaces -rw-r--r-- 1 root root 0 Jul 12 19:18 fileWithoutSpaces Genrated spec file is: === 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 # Description done #%prep #%build #%install #%post %files %defattr (755,root,root) %dir Sorry for the delay. But the problem is this (a typo perhaps) statement - %dir -- Dropped this and with or without quoting in /dirWithoutSpaces rpmbuild work as expected in rpm 4.4.2-9.el5 Perhaps you wanted really create a directory with a blank inside? So do you have to write %dir / . And it works also regards __ RPM Package Managerhttp://rpm5.org User Communication List rpm-users@rpm5.org
Re: Spaces in filenames in a spec file???
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 /: __ RPM Package Managerhttp://rpm5.org User Communication List rpm-users@rpm5.org
Re: Spaces in filenames in a spec file???
On Fri, Jul 10, 2009 at 9:25 PM, Michael Lasevich mich...@lasevich.netwrote: I need to package an rpm that contains files with spaces in them. Sounds like it should be easy, but I am completely stuck. I tried the backslash escape, I tried putting the filename in double quotes - nothing seems to work. I ran into this a number of times over the years and normally I would just rename the file, but in this particular case that is not an option. I can't believe that rpm cannot handle this, which means there has to be an escape scheme that I am missing here. Google turned up zilch. Any help would be appreciated. If it matters, I am using rpm-4.4.2.3-9.el5 SIA. Not problem at all to answer BUT perhaps you have written to the wrong mailing list ? This is RPM5 : some years of development have passed from rpm 4.4.2.x.y.z. Just for curiosity. Thanks. -Michael __ RPM Package Managerhttp://rpm5.org User Communication List rpm-users@rpm5.org