Bug 161728
Summary: | xscreensaver installs with incorrect dir perms | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | W Agtail <crash70> | ||||||
Component: | xscreensaver | Assignee: | Ray Strode [halfline] <rstrode> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 4 | CC: | jwz, mtasaka, rc040203 | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | x86_64 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2005-12-05 15:34:33 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
W Agtail
2005-06-26 17:45:43 UTC
Hmm. It's probably created with the system configured default umask. Did you change that? Shouldn't be hard to fix the rpm to use specific permissions. I guess that would do it. I changed umask from 0022 to 0027. Thanks. I think, the actual cause of this issue is a packaging bug: The directories are not owned by any rpm, which causes them to be created with a root's default umask instead of using permissions from the rpm: # find /usr/share/xscreensaver -type d | xargs rpm -qf file /usr/share/xscreensaver is not owned by any package file /usr/share/xscreensaver/config is not owned by any package file /usr/share/xscreensaver/glade is not owned by any package Sorry, wrong directory, but the same considerations apply to both /usr/share/xscreensaver and /usr/libexec/xscreensaver: # find /usr/libexec/xscreensaver/ -type d | xargs rpm -qf file /usr/libexec/xscreensaver is not owned by any package Created attachment 121836 [details]
Patch to write dir names explicitly to base.files etc.
As Ralf commented, xscreensaver rpms should own the directories
where xscreensaver-related files are installed.
Proposal fixes:
This patch is aimed that the installation process echoes the
directory names where files will be installed.
And the list_files() in spec file will be:
list_files() {
echo "%%defattr(-,root,root)"
make -s install_prefix=${RPM_BUILD_ROOT} INSTALL=true "$@" \
| sed -e 's@.*directory.* \(/[^ ]*\)$@ \1DIR@' \
| sed -e 's@.*-m 4755.* \([^ ]*\)$@ \1SETUID@'\
| sed -n -e 's@.* \(/[^ ]*\)$@\1@p' \
| sed -e "s@^${RPM_BUILD_ROOT}@@" \
-e "s@/[a-z][a-z]*/\.\./@/@" \
| sed -e '/DIR$/!s@\(.*/man/.*\)@\1\*@' \
| sed -e '/DIR$/!s@\(.*/app-defaults/\)@%config \1@' \
-e '/DIR$/!s@\(.*/pam\.d/\)@%config(missingok) \1@' \
| sed -e 's@\(.*\)DIR$@%dir \1@' \
| sed -e 's@\(.*\)SETUID$@%attr(4755,root,root) \1@' \
| sort
}
for example (although in fedora rpm, there is no file with setuid...).
Created attachment 121841 [details]
base.files after the patch above is applied.
base.files used to make xscreensaver-base created
after the patch above is applied.
The directories where the files are installed are listed in
base.files (and extras, gl-extras.files as well).
(I think that README* files can be includes in xscreensaver-base
rpm. Simply "echo "%%doc README*" >> $dd/base.files" will do
this.)
Hi Mamoru, Thanks for the updated list_files function. I've added it to the spec file and am pushing it through the build system now. Jamie, does this look suitable to get in the upstream spec file? I verified xscreensaver-4.22-21 but the problem still remained. I meant in the comment 5 that, for my idea of fixing this bug, BOTH the patch and list_files change is needed. My patch (id=121836) is for writing out the directories name where some files are installed (with messages like "Installing *** in the directory ***") and the messages are catched by the new list_files ( The part "sed -e 's@.*directory.* \(/[^ ]*\)$@ \1DIR@'" is for dealing with the message "in the directory ***" newly added by the patch). So, as of my proposal fixes, only changing list_files makes no effect. I'm afraid I don't understand what's going on here -- if there's something you think I should change in my upstream .spec file, can you send me a diff against 4.23? Thanks... Hello Jamie. I sent you a mail to explain what my patch and changing list_files() description meant. |