Skip to content
This repository was archived by the owner on Oct 19, 2021. It is now read-only.

epm fails to package filenames containing $ signs #62

Closed
jklippel opened this issue Jan 19, 2018 · 1 comment
Closed

epm fails to package filenames containing $ signs #62

jklippel opened this issue Jan 19, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@jklippel
Copy link

vagrant@debian9:~/test-files$ dd if=/dev/urandom of=test\$file bs=1M count=1
1+0 Datensätze ein
1+0 Datensätze aus
1048576 Bytes (1,0 MB, 1,0 MiB) kopiert, 0,00585626 s, 179 MB/s

vagrant@debian9:~/test-files$ ls -l
insgesamt 1024
-rw-r--r-- 1 vagrant vagrant 1048576 Jan 19 14:42 test$file

vagrant@debian9:~/test-files$ mkepmlist .
f 644 vagrant vagrant /test\$file ./test\$file

vagrant@debian9:~/test-files$ echo "# Product information
> %product test
> %copyright n/a
> %vendor n/a
> %license ./COPYING
> %readme ./README
> %version 0.1
> %packager n/a
> %description test
> " > test.list

vagrant@debian9:~/test-files$ mkepmlist . >> test.list

vagrant@debian9:~/test-files$ touch COPYING README

vagrant@debian9:~/test-files$ epm test
epm: Variable "file" undefined.
epm: Variable "file" undefined.
epm: Expected character after backslash.
epm: Expected destination after group: f 644 vagrant vagrant /test\ ./test\
epm: Error - no files for installation in list file!

vagrant@debian9:~/test-files$ sed -i 's/\\\$/$$/g' test.list 

vagrant@debian9:~/test-files$ cat test.list 
# Product information
%product test
%copyright n/a
%vendor n/a
%license ./COPYING
%readme ./README
%version 0.1
%packager n/a
%description test

f 644 vagrant vagrant /test$$file ./test$$file

vagrant@debian9:~/test-files$ epm test

vagrant@debian9:~/test-files$ echo $?
0

vagrant@debian9:~/test-files$ epm --version
ESP Package Manager v4.4.1
Copyright 1999-2017 by Michael R Sweet.

EPM is free software and comes with ABSOLUTELY NO WARRANTY; for details
see the GNU General Public License in the file COPYING or at
"http://www.fsf.org/gpl.html".  Report all problems to
"https://github.com/michaelrsweet/epm/issues".

Observed behaviour:
mkepmlist output escapes $ sign with \$:

f 644 vagrant vagrant /test\$file ./test\$file

Expected behaviour:
mkepmlist escapes the $ sign with $$

f 644 vagrant vagrant /test$$file ./test$$file
@michaelrsweet michaelrsweet self-assigned this Feb 7, 2018
@michaelrsweet michaelrsweet added this to the Stable milestone Feb 7, 2018
michaelrsweet added a commit that referenced this issue Jul 3, 2019
Make -Wno-format-truncation option conditional.

Update copyrights.
@michaelrsweet
Copy link
Owner

[master 10e8f09] Fix mkepmlist support for filenames with $ in them (Issue #62)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants