New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FPM expand variables in file names #416

Closed
bigon opened this Issue Apr 18, 2013 · 9 comments

Comments

Projects
None yet
4 participants
@bigon

bigon commented Apr 18, 2013

Hi,

I'm trying to package a file that is named /foo/bar/%name%

fpm is failing with an error "File not found: /tmp//foo/bar/packagename%

So it seems that FPM is expanding filename with macro/variables

@bigon

This comment has been minimized.

bigon commented Apr 18, 2013

Just to be clear %name% is a directory and I'm using the --directories parameter because I want to preserve the directories ownership

@skottler

This comment has been minimized.

skottler commented Apr 18, 2013

You may be able to glob escape in this case. Try [%]name[%].

@jordansissel

This comment has been minimized.

Owner

jordansissel commented Apr 18, 2013

This is a bug, fpm is supposed to escape this stuff to work around bugs and misfeatures in RPM such as this.

@jordansissel

This comment has been minimized.

Owner

jordansissel commented Apr 18, 2013

(also, this is probably just rpm expanding %n or something dumb)

I'll work on a fix as well as a test case.

@jordansissel

This comment has been minimized.

Owner

jordansissel commented Apr 18, 2013

@bigon what version of fpm are you using?

jordansissel added a commit that referenced this issue Apr 18, 2013

- Add test coverage for '%' in filenames
- Verify the rpm has the expected file paths when testing escapes and
  other stuff.
  (done during investigation of #416)
@jordansissel

This comment has been minimized.

Owner

jordansissel commented Apr 18, 2013

I wrote a test to check for proper % escaping, f11408c, it passes. I cannot reproduce this problem.

@r4um

This comment has been minimized.

Contributor

r4um commented Apr 19, 2013

Doesn't work with --directories since then its never added to file list, hence never escaped.
Similar issue #413. PR #414 has the fix for these cases.

@bigon

This comment has been minimized.

bigon commented Apr 29, 2013

Hi,

I can confirm that it's now working with git HEAD

@r4um

This comment has been minimized.

Contributor

r4um commented May 7, 2013

Fixed in 0.4.34.

@r4um r4um closed this May 7, 2013

prof-milki pushed a commit to prof-milki/xpm that referenced this issue Dec 18, 2014

jls
- Add test coverage for '%' in filenames
- Verify the rpm has the expected file paths when testing escapes and
  other stuff.
  (done during investigation of jordansissel#416)

prof-milki pushed a commit to prof-milki/xpm that referenced this issue Dec 27, 2014

- Add test coverage for '%' in filenames
- Verify the rpm has the expected file paths when testing escapes and
  other stuff.
  (done during investigation of jordansissel#416)

jordansissel added a commit that referenced this issue Apr 24, 2015

- Add test coverage for '%' in filenames
- Verify the rpm has the expected file paths when testing escapes and
  other stuff.
  (done during investigation of #416)

jordansissel added a commit that referenced this issue Jun 20, 2016

- Add test coverage for '%' in filenames
- Verify the rpm has the expected file paths when testing escapes and
  other stuff.
  (done during investigation of #416)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment