Skip to content
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

An issue with fpm 1.16 in OL8 not reading the special character in dir name #2087

Open
Manish2481983 opened this issue Dec 19, 2024 · 6 comments · May be fixed by #2088
Open

An issue with fpm 1.16 in OL8 not reading the special character in dir name #2087

Manish2481983 opened this issue Dec 19, 2024 · 6 comments · May be fixed by #2088

Comments

@Manish2481983
Copy link

I encountered an issue with fpm 1.16 where directory names with {{ label }} enclosed in quotes do not work as expected. When the directory name is in quotes, it causes the following file-not-found error:

error: File not found: /tmp/package-rpm-build-d14a72e6d0fc6578070ae6940bf08df171015f7714de4e0a9ff4cd7d1b69/BUILD/opt/sfw/foo-79.4/lib/python3.6/site-packages/cement/cli/templates/generate/plugin/{{?label?}}/controllers/__init__.py {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe"}
error: File not found: /tmp/package-rpm-build-d14a72e6d0fc6578070ae6940bf08df171015f7714de4e0a9ff4cd7d1b69/BUILD/opt/sfw/foo-79.4/lib/python3.6/site-packages/cement/cli/templates/generate/plugin/{{?label?}}/controllers/__pycache__/__init__.cpython-36.pyc {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe"}

However, if the quotes around the directory name {{ label }} are removed or dir is removed, everything works fine. It seems that fpm 1.16 has trouble processing directory names that contain {{ label }} in quotes.

Please let me know if there is a known workaround or if further investigation is needed.

I am using fpm 1.16

jordansissel added a commit that referenced this issue Dec 19, 2024
* Add test coverage for escaping { and } filename characters

Fixes #2087
@jordansissel jordansissel linked a pull request Dec 19, 2024 that will close this issue
@jordansissel
Copy link
Owner

Sorry you're having trouble. FPM should be able to package this, but in this case, it has a problem telling rpmbuild about the file - this is a bug in fpm, sorta, because rpmbuild makes it difficult to express filenames with spaces or non-alphanumeric characters.

I've opened #2088 with a patch that fixes this for me when I try to use the same files as in the Python cement library.

@jordansissel
Copy link
Owner

@Manish2481983 Do you know what version of rpmbuild you have installed? I found a solution, but it only works to build rpms on systems which have rpm version 4.19 or newer.

@Manish2481983
Copy link
Author

Thanks @jordansissel for investigating this.
I am having RPM version 4.14.3 on OL8

rpmbuild --version
RPM version 4.14.3

@Manish2481983
Copy link
Author

Hi @jordansissel Any update on this ?

@jordansissel
Copy link
Owner

#2088 should now work on older rpm version, but I still have a few changes to make before merging. I don't have any ETA on merging as this work is on spare time which is small these days.

@Manish2481983
Copy link
Author

Thanks @jordansissel for this update. will wait till then.

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

Successfully merging a pull request may close this issue.

2 participants