Discussion:
basic question - space in file name
Paul Flores
2006-09-11 20:27:23 UTC
Permalink
Hello,

I am trying to build an RPM package but one of the file I put in my SPEC file has spaces in its name i.e. Read this First.txt and I end up getting a multiple files on one line erro rmessage. Can someone please point me in the right direction?

Thanks!

Paul


---------------------------------
Stay in the know. Pulse on the new Yahoo.com. Check it out.
Federico Lucifredi
2006-09-11 20:45:19 UTC
Permalink
Hey Paul,
I Never tried in a spec file, but I presume the usual paths -- i.e
quoting the filename OR escaping (\) the space are the things you want
to try.

best -F
Post by Paul Flores
Hello,
I am trying to build an RPM package but one of the file I put in my
SPEC file has spaces in its name i.e. Read this First.txt and I end up
getting a multiple files on one line erro rmessage. Can someone
please point me in the right direction?
Thanks!
Paul
______________________________________________________________________
Stay in the know. Pulse on the new Yahoo.com. Check it out.
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
--
_________________________________________
-- "'Problem' is a bleak word for challenge" - Richard Fish
(Federico L. Lucifredi) - http://www.lucifredi.com
Jeff Johnson
2006-09-11 20:50:07 UTC
Permalink
Post by Federico Lucifredi
Hey Paul,
I Never tried in a spec file, but I presume the usual paths -- i.e
quoting the filename OR escaping (\) the space are the things you want
to try.
Double quote the path, escaping doesn't.

73 de Jeff
Paul Flores
2006-09-14 21:29:05 UTC
Permalink
Thanks for the feedback the use of quotes does seem to get me through the prep and build stages of the rpmbuild command but it fails in the install stage.

Anyone have any ideas how to 'influence' the behavior of the install stage?

Thanks!

Paul
Post by Federico Lucifredi
Hey Paul,
I Never tried in a spec file, but I presume the usual paths -- i.e
quoting the filename OR escaping (\) the space are the things you want
to try.
Double quote the path, escaping doesn't.

73 de Jeff

_______________________________________________
Rpm-list mailing list
Rpm-***@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list



---------------------------------
Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.
Paul Flores
2006-10-30 21:12:57 UTC
Permalink
Double quoting doesn't work or at least I can't get it too work!

In documentation the implication is that the expectation is that filenames in a SPEC file can be space delimited allowing for more than one file to be included on one line. It appears that the rpmbuild command is explicitly looking for spaces which defeats both double quoting and escaping spaces.

To quote a famous WWII General - "Nuts!"
Post by Federico Lucifredi
Hey Paul,
I Never tried in a spec file, but I presume the usual paths -- i.e
quoting the filename OR escaping (\) the space are the things you want
to try.
Double quote the path, escaping doesn't.

73 de Jeff

_______________________________________________
Rpm-list mailing list
Rpm-***@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list



---------------------------------
Want to start your own business? Learn how on Yahoo! Small Business.
Jeff Johnson
2006-10-31 13:25:08 UTC
Permalink
Post by Paul Flores
Double quoting doesn't work or at least I can't get it too work!
In documentation the implication is that the expectation is that filenames
in a SPEC file can be space delimited allowing for more than one file to be
included on one line. It appears that the rpmbuild command is explicitly
looking for spaces which defeats both double quoting and escaping spaces.
WORKSFORME.

I just checked a spec file with

%install
...
touch %{buildroot}%{_bindir}/file\ with\ spaces
...

%files
...
"%{_bindir}/file with spaces"

and produced this package

$ rpm -qpl foo*.i386.rpm
...
/usr/bin/file with spaces

73 de Jeff
Luciano Miguel Ferreira Rocha
2006-10-31 14:02:16 UTC
Permalink
Post by Jeff Johnson
Post by Paul Flores
Double quoting doesn't work or at least I can't get it too work!
In documentation the implication is that the expectation is that filenames
in a SPEC file can be space delimited allowing for more than one file to be
included on one line. It appears that the rpmbuild command is explicitly
looking for spaces which defeats both double quoting and escaping spaces.
WORKSFORME.
Doesn't work for me:

spec:
Source3: "mk dump rd"

rpmbuild:
error: line 10: Tag takes single token only: Source3: "mk dump rd"

'mk dump rd' and mk\ dump\ rd also don't work.

Note that I'm not the original poster, but I think this was the case he
was refering to.
--
lfr
0/0
Jeff Johnson
2006-10-31 14:42:46 UTC
Permalink
Post by Luciano Miguel Ferreira Rocha
Post by Jeff Johnson
Post by Paul Flores
Double quoting doesn't work or at least I can't get it too work!
In documentation the implication is that the expectation is that filenames
in a SPEC file can be space delimited allowing for more than one file to be
included on one line. It appears that the rpmbuild command is explicitly
looking for spaces which defeats both double quoting and escaping spaces.
WORKSFORME.
Source3: "mk dump rd"
Yep. Rename the file to remove the spaces. Not impossibly hard.

73 de Jeff
Paul Flores
2006-10-31 14:52:33 UTC
Permalink
I have a file named "Release Notes.txt" in a Linux (RHEL 3) environment. The Perl module I'm using successfully creates a SPEC file with the name of the file either double quoted or escaped.

The following is an excerpt of the results in test area where the file name is escaped....

+ cd Test-1.0
+ mkdir -p /home/pflore/TestArea/rpm_buildroot/software
+ cp -fR products /home/pflore/TestArea/rpm_buildroot/software
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip
+ /usr/lib/rpm/brp-strip-static-archive
+ /usr/lib/rpm/brp-strip-comment-note
Processing files: Test-1.0-1
error: Two files on one line: /software/products/Test/A\
error: File must begin with "/": definite\
error: Two files on one line: /software/products/Test/A\
error: File must begin with "/": problem.txt

RPM build errors:
Two files on one line: /software/products/Test/A\
File must begin with "/": definite\
Two files on one line: /software/products/Test/A\
File must begin with "/": problem.txt
genrpm: RPM Build return
genrpm: DIE! ERROR! No rpms found! Check "/home/pflore/TestArea/rpm_buildroot" for the correct files.

The error message is consistent whether the spaces are escaped or double quoted....

If you'd like a copy of the code reply to me seperately and I'll send you the Perl module....
Post by Jeff Johnson
Post by Paul Flores
Double quoting doesn't work or at least I can't get it too work!
In documentation the implication is that the expectation is that filenames
in a SPEC file can be space delimited allowing for more than one file to be
included on one line. It appears that the rpmbuild command is explicitly
looking for spaces which defeats both double quoting and escaping spaces.
WORKSFORME.
Doesn't work for me:

spec:
Source3: "mk dump rd"

rpmbuild:
error: line 10: Tag takes single token only: Source3: "mk dump rd"

'mk dump rd' and mk\ dump\ rd also don't work.

Note that I'm not the original poster, but I think this was the case he
was refering to.
--
lfr
0/0
_______________________________________________
Rpm-list mailing list
Rpm-***@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Luciano Miguel Ferreira Rocha
2006-10-31 15:03:18 UTC
Permalink
Post by Paul Flores
I have a file named "Release Notes.txt" in a Linux (RHEL 3) environment. The Perl module I'm using successfully creates a SPEC file with the name of the file either double quoted or escaped.
The error message is consistent whether the spaces are escaped or double quoted....
Double quoting, and only double quoting ("), does work for me (in %files
section).
Post by Paul Flores
If you'd like a copy of the code reply to me seperately and I'll send you the Perl module....
Send it to my email, and I'll take a look at it. Send also any data
files needed to recreate your environment.
--
lfr
0/0
Loading...