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

Packages support file permissions and ownership #23

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

shore
Copy link
Contributor

@shore shore commented Jun 10, 2024

In support of SMRE-216, this PR adds inputs to the action so product teams can specify file ownership and permissions for the contents of the generated packages. These are global settings that apply to all files within the package, finer granularity is not supported at this time.

Self-test package results:

Note: while this PR fixes ownership and permissions validation failures for RPM packages, it does not address Linux Capabilities (P flag in outputs below). It appears nfpm is not capable of setting these values at this time.

Sample verification outputs:
EL7:

# rpm -vV vault-enterprise
.........  c /etc/vault.d/vault.env
.........  c /etc/vault.d/vault.hcl
........P    /usr/bin/vault
.........  c /usr/lib/systemd/system/vault.service

fedora-40:

# rpm -vV vault-enterprise
.........  c /etc/vault.d/vault.env
.........  c /etc/vault.d/vault.hcl
........P    /usr/bin/vault
.........  c /usr/lib/systemd/system/vault.service

@shore shore force-pushed the bshore/packages-support-file-permissions-and-ownership branch from 1130ae8 to 81c4f37 Compare June 11, 2024 15:50
@shore shore marked this pull request as ready for review June 11, 2024 15:55
@shore shore requested review from a team and sarahethompson and removed request for a team June 11, 2024 16:03

- name: dump RPM
run: |
echo "::group::maybe install rpm" 1>&2
Copy link

@jeanneryan jeanneryan Jun 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe install rpm

Is this a group name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, the group is just to hide the output from the package install if it happens, because that's almost never a part of the output we'll want to see. Click the twisty in the unlikely event you want to see oodles of output from apt 😆

Screenshot 2024-06-11 at 12 40 00

Copy link

@jeanneryan jeanneryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@shore shore merged commit 35f4725 into main Jun 12, 2024
5 checks passed
@shore shore deleted the bshore/packages-support-file-permissions-and-ownership branch June 12, 2024 17:16
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 this pull request may close these issues.

2 participants