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

Exclude filesystem directories from RPM spec #9

Merged
merged 2 commits into from
Jul 24, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions lib/omnibus/packagers/rpm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -336,16 +336,14 @@ def rhel_6_or_newer?
end

#
# Mark filesystem directories with ownership and permissions specified in the filesystem package
# Do not include filesystem directories specified in the filesystem package
# https://git.fedorahosted.org/cgit/filesystem.git/plain/filesystem.spec
#
# @return [String]
#
def mark_filesystem_directories(fsdir)
if fsdir.eql?("/") || fsdir.eql?("/usr/lib") || fsdir.eql?("/usr/share/empty") || (fsdir.eql?("/usr/bin") && rhel_6_or_newer?)
return "%dir %attr(0555,root,root) #{fsdir}"
elsif filesystem_directories.include?(fsdir)
return "%dir %attr(0755,root,root) #{fsdir}"
if filesystem_directories.include?(fsdir)
return ""
else
return "%dir #{fsdir}"
end
Expand Down