Skip to content

Commit

Permalink
Merge pull request #9 from sensu/exclude-fs-dirs
Browse files Browse the repository at this point in the history
Exclude filesystem directories from RPM spec
  • Loading branch information
cwjohnston authored Jul 24, 2017
2 parents 0fd81e3 + 6173a13 commit 78c12b5
Showing 1 changed file with 3 additions and 5 deletions.
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

0 comments on commit 78c12b5

Please sign in to comment.