-
Notifications
You must be signed in to change notification settings - Fork 298
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 directories owned by the filesystem package #666
base: main
Are you sure you want to change the base?
Conversation
Hello @eoly, thanks for your work so far on this! Omitting the systems directories will cause compatibility issues with |
Hi @yzl, After looking a little deeper the issue I was running into in #663 happens because I was doing it wrong. I was trying to install my systemd unit file into /lib/systemd/system but should have been using /usr/lib/systemd/system. See RHEL Docs Manually copying the unit file was working because /lib symlinks to /usr/lib. However the RPM builder code does not handle the symlink properly and results in a conflict when trying to install the package. I'm not sure that any code changes need to be made. If you agree please feel free to close this out. Thanks, (details below)
In my project definition I was declaring:
Which causes /lib to get added the RPM SPEC like so:
That seems to be where the conflict with the filesystem package happens. By changing the extra_package_file definition of the systemd service to:
The RPM SPEC sets the proper permissions on the /usr and /usr/lib dirs:
The code here handles the /usr/lib permissions properly but not /lib as it is a symllink. |
hacky see: chef#666 could really do with omnibus passing in config file options much as the brilliant fpm does
We've found that RHEL 5 ships with mode 0755 on /usr/bin, while RHEL 6 and 7 ship with mode 0555. As a result, installing packages built for RHEL 6 or 7 contain files destined for /usr/bin will fail thusly: ``` file /usr/bin from install of sensu-1:0.27.0.beta.2-1.el7.x86_64 conflicts with file from package filesystem-3.2-20.el7.x86_64 ``` An solution solution would be to implement an approach which considers the permissions specified by the system's `filesystem` package at build time (see chef#666 (comment)). For now, we'll kick the can down the road a bit. Signed-off-by: Cameron Johnston <cameron@rootdown.net>
We've found that RHEL 5 ships with mode 0755 on /usr/bin, while RHEL 6 and 7 ship with mode 0555. As a result, installing packages built for RHEL 6 or 7 contain files destined for /usr/bin will fail thusly: ``` file /usr/bin from install of sensu-1:0.27.0.beta.2-1.el7.x86_64 conflicts with file from package filesystem-3.2-20.el7.x86_64 ``` An solution solution would be to implement an approach which considers the permissions specified by the system's `filesystem` package at build time (see chef#666 (comment)). For now, we'll kick the can down the road a bit. Signed-off-by: Cameron Johnston <cameron@rootdown.net>
We've found that RHEL 5 ships with mode 0755 on /usr/bin, while RHEL 6 and 7 ship with mode 0555. As a result, installing packages built for RHEL 6 or 7 contain files destined for /usr/bin will fail thusly: ``` file /usr/bin from install of sensu-1:0.27.0.beta.2-1.el7.x86_64 conflicts with file from package filesystem-3.2-20.el7.x86_64 ``` An solution solution would be to implement an approach which considers the permissions specified by the system's `filesystem` package at build time (see chef#666 (comment)). For now, we'll kick the can down the road a bit. Signed-off-by: Cameron Johnston <cameron@rootdown.net>
We've found that RHEL 5 ships with mode 0755 on /usr/bin, while RHEL 6 and 7 ship with mode 0555. As a result, installing packages built for RHEL 6 or 7 contain files destined for /usr/bin will fail thusly: ``` file /usr/bin from install of sensu-1:0.27.0.beta.2-1.el7.x86_64 conflicts with file from package filesystem-3.2-20.el7.x86_64 ``` An solution solution would be to implement an approach which considers the permissions specified by the system's `filesystem` package at build time (see chef#666 (comment)). For now, we'll kick the can down the road a bit. Signed-off-by: Cameron Johnston <cameron@rootdown.net>
Description
This addresses #663.
Directories owned by the filesystem package should be excluded from the RPM produced by Omnibus.
From: https://fedoraproject.org/wiki/Packaging:Guidelines#File_and_Directory_Ownership
/cc @chef/omnibus-maintainers <- This ensures the Omnibus Maintainers team are notified to review this PR.