Bug 161728 - xscreensaver installs with incorrect dir perms
xscreensaver installs with incorrect dir perms
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: xscreensaver (Show other bugs)
4
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Ray Strode [halfline]
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-26 13:45 EDT by W Agtail
Modified: 2007-11-30 17:11 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-12-05 10:34:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to write dir names explicitly to base.files etc. (7.05 KB, patch)
2005-12-05 03:44 EST, Mamoru TASAKA
no flags Details | Diff
base.files after the patch above is applied. (2.87 KB, text/plain)
2005-12-05 03:57 EST, Mamoru TASAKA
no flags Details

  None (edit)
Description W Agtail 2005-06-26 13:45:43 EDT
Description of problem:
dir /usr/libexec/xscreensaver/ is created with incorrect file perms.
is created with 0750 when should be 0755.

0750 perms prevents xscreensaver from being used

Version-Release number of selected component (if applicable):
xscreensaver-base-4.21-4
xscreensaver-extras-4.21-4
xscreensaver-gl-extras-4.21-4

How reproducible:
always

Steps to Reproduce:
1. install above mentioned rpms from ISO
2.
3.
  
Actual results:
xscreensaver-demo is unable to access above mentioned dir and run screen savers

Expected results:
run xscreensaver

Additional info:
Comment 1 Ray Strode [halfline] 2005-06-26 16:37:04 EDT
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.
Comment 2 W Agtail 2005-06-27 07:51:38 EDT
I guess that would do it. I changed umask from 0022 to 0027. Thanks.
Comment 3 Ralf Corsepius 2005-09-27 02:16:55 EDT
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
Comment 4 Ralf Corsepius 2005-09-27 02:19:18 EDT
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

Comment 5 Mamoru TASAKA 2005-12-05 03:44:23 EST
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...).
Comment 6 Mamoru TASAKA 2005-12-05 03:57:22 EST
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.)
Comment 7 Ray Strode [halfline] 2005-12-05 10:34:33 EST
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?
Comment 8 Mamoru TASAKA 2005-12-06 10:26:18 EST
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.
Comment 9 Jamie Zawinski 2006-02-08 20:56:46 EST
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...
Comment 10 Mamoru TASAKA 2006-02-09 09:55:33 EST
Hello Jamie.
I sent you a mail to explain what my patch and changing list_files() description
meant.

Note You need to log in before you can comment on or make changes to this bug.