Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 161728 - xscreensaver installs with incorrect dir perms
Summary: xscreensaver installs with incorrect dir perms
Alias: None
Product: Fedora
Classification: Fedora
Component: xscreensaver
Version: 4
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-06-26 17:45 UTC by W Agtail
Modified: 2007-11-30 22:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-12-05 15:34:33 UTC

Attachments (Terms of Use)
Patch to write dir names explicitly to base.files etc. (deleted)
2005-12-05 08:44 UTC, Mamoru TASAKA
no flags Details | Diff
base.files after the patch above is applied. (deleted)
2005-12-05 08:57 UTC, Mamoru TASAKA
no flags Details

Description W Agtail 2005-06-26 17:45:43 UTC
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):

How reproducible:

Steps to Reproduce:
1. install above mentioned rpms from ISO
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 20:37:04 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.

Comment 2 W Agtail 2005-06-27 11:51:38 UTC
I guess that would do it. I changed umask from 0022 to 0027. Thanks.

Comment 3 Ralf Corsepius 2005-09-27 06:16:55 UTC
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 06:19:18 UTC
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 08:44:23 UTC
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 08:57:22 UTC
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 

Comment 7 Ray Strode [halfline] 2005-12-05 15:34:33 UTC
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 15:26:18 UTC
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-09 01:56:46 UTC
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 14:55:33 UTC
Hello Jamie.
I sent you a mail to explain what my patch and changing list_files() description

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