-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
feat(rpm): support %config(missingok) #854
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow dnf running on AlmaLinux 8.10 is still complaining with a warning, though.
fav32.png
is a config|missingok
and grafana_icon.svg
is a config|noreplace
in a little Toy example:
Running transaction
Preparing : 1/1
Erasing : grafana-re-configuration-0.0.1-1.x86_64 1/1
warning: file /tmp/grafana_icon.svg: remove failed: No such file or directory
warning: file /tmp/fav32.png: remove failed: No such file or directory
Verifying : grafana-re-configuration-0.0.1-1.x86_64 1/1
Removed:
grafana-re-configuration-0.0.1-1.x86_64
I will try to reproduce the toy example with a classic specfile and see if dnf complains with the warning here, too. But what for sure is possible with the specfile is to combine missingok
and noreplace
in a %config(missingok,noreplace)
directive.
Was pleasantly surprised that direnv was asking me to allow the Nix devShell after checking out the repo 👍
Small follow-up:
I did with the following spec file:
And the removal of the build RPM with a missing/moved
No warnings here. Is there some place where I could have a peak at the generated spec file before "building" the RPM in the source code? |
we don't create a spec file, that's why you don't need to have rpm installed to use this. that said, I double checked https://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/pkgformat.html#AEN27560 and google/rpmpack (which we use) and everything seems correct... maybe its a bug on rpmpack? not sure yet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just went through the examples and verified the file flags and those were set correctly.
rpm -qp --qf '[%{FILENAMES} %{FILEFLAGS:fflags}\n]' example-0.0.1-1.x86_64.rpm
/tmp/fav32.png cm
/tmp/grafana_icon.svg cn
And dnf is happy with all missing files with the newly introduced cn
file flag 📦 🎉
Thanks a lot for the blazing fast implementation!
The duplicated line is fine?
closes #853