[Rpm-maint] [rpm-software-management/rpm] Use the real user/group name in BUILDROOT if we set %attr(-, -, -) explicitly (Issue #1933)
licunlong
notifications at github.com
Wed Feb 23 08:59:44 UTC 2022
We use rpmrebuild to rebuild rpm packages. And rpmrebuild provides `--keep-perm` option which allows users to keep installed files permission, uid and gid in the new rebuilt package. rpmrebuild does this by specifing `%attr(-,-,-)` for each file in the spec file, and rebuilds the spec file by `rpmbuild`.
But apparently, this doesn't work well. `%attr(-,-,-)` will be reset to `%attr(-,root,root)` by `%defattr(-,root,root)`. In <http://ftp.rpm.org/max-rpm/s1-rpm-anywhere-specifying-file-attributes.html> it said:
> If a particular file attribute doesn't need to be specified, that attribute can be replaced with a dash "-" and %attr will not change it.
So I think may be rpm shouldn't change `%attr(-,-,-)` if we have explicitly set it.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1933
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/1933 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220223/f57f8dba/attachment.html>
More information about the Rpm-maint
mailing list