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

Updates to support --rpm-use-file-permissions #377

Merged
merged 1 commit into from Mar 21, 2013

Conversation

@withnale
Copy link

withnale commented Mar 6, 2013

I remember a while back looking at file ownership issues with FPM built RPMs and looking on the issues list I can see this is still a problem...

I thought I'd have a quick look and see if I could fix it. Attached is a pull-request for ensuring that file modes and owner/groups are preserved when outputing an RPM. It only applies if --rpm-use-file-permissions is specified.

I'm aware this may well be specific to my use case (dir -> rpm) so it might need some additional work for more generic cases.

cheers

jordansissel added a commit that referenced this pull request Mar 21, 2013
Updates to support --rpm-use-file-permissions
@jordansissel jordansissel merged commit 1c17d27 into jordansissel:master Mar 21, 2013
1 check failed
1 check failed
default The Travis build failed
Details
@jordansissel

This comment has been minimized.

Copy link
Owner

jordansissel commented Mar 21, 2013

This patch results in errors in the test suite:

error: File must begin with "/": [] {:level=>:error, :file=>"cabin/mixins/pipe.rb", 
:line=>"46", :method=>"block in pipe"}

Among others. Digging now.

@jordansissel

This comment has been minimized.

Copy link
Owner

jordansissel commented Mar 21, 2013

The spec results like this:

%files
%defattr(-,root,root,-)
["/home/jls/.zshrc\n"]
@@ -146,7 +146,7 @@ cp <%= source_safe %> <%= target_safe %>
.collect { |f| f.gsub("*", "[*]") } \
.collect { |f| f.gsub("?", "[?]") } \
.collect { |f| f.gsub("%", "[%]") } \
.join("\n")

This comment has been minimized.

Copy link
@jordansissel

jordansissel Mar 21, 2013

Owner

removing the .join("\n") was the problem here.

@jordansissel

This comment has been minimized.

Copy link
Owner

jordansissel commented Mar 21, 2013

31f97b3 fixes; easy. Woo :)

prof-milki pushed a commit to prof-milki/xpm that referenced this pull request Dec 18, 2014
Updates to support --rpm-use-file-permissions
prof-milki pushed a commit to prof-milki/xpm that referenced this pull request Dec 27, 2014
Updates to support --rpm-use-file-permissions
jordansissel added a commit that referenced this pull request Apr 24, 2015
Updates to support --rpm-use-file-permissions
jordansissel added a commit that referenced this pull request Jun 20, 2016
Updates to support --rpm-use-file-permissions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.