| Summary: | mplayer documentation has incorrect permissions | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Jason Andryuk <the_deuce> |
| Component: | Current packages | Assignee: | Gentoo Media-video project <media-video> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | mr_bones_ |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | Patch to correct permissions of Documentation | ||
this would be nicer docinto foo dodoc bar nicer, but doesn't work see bug #15193 Actually, it isn't fixed, but I have the solution.
The problem is that 0644 doesn't set the executable bit for the directories,
so you cannot cd into the directories. That is why I originally tried to
set to 755. Changing 0644 to 0755 lets a user cd into the directories, but
then it lists all the regular files as executable...
So we do `chmod 0644`, but then use find to `chmod +x` the directories.
--- mplayer-0.92.ebuild.orig 2003-10-11 16:05:09.000000000 -0400
+++ mplayer-0.92.ebuild 2003-10-11 16:06:28.000000000 -0400
@@ -354,11 +354,13 @@
dodoc AUTHORS ChangeLog README
# Install the documentation; DOCS is all mixed up not just html
chmod 0644 ${S}/DOCS -R
- cp -r ${S}/DOCS ${D}/usr/share/doc/${PF}/ || die
+ find ${S}/DOCS -type d -exec chmod +x {} \;
+ cp -r ${S}/DOCS ${D}/usr/share/doc/${PF} || die
# Copy misc tools to documentation path, as they're not installed
# directly
chmod 0644 ${S}/TOOLS -R
+ find ${S}/TOOLS -type d -exec chmod +x {} \;
cp -r ${S}/TOOLS ${D}/usr/share/doc/${PF} || die
# Install the default Skin and Gnome menu entry
sorry, changed to 0755 Sorry, I guess I was not clear in my last comment.
We want different permissions for regular files and for the directories.
0644 for regular files
0755 for directories
The executable bit is needed for directories so users can CD into the directory.
But we don't want to say that some random text files is an executable.
So:
chmod 0644 ${S}/DOCS -R
find ${S}/DOCS -type d -exec chmod +x {} \;
This sets everything to 0644, what we want for regular files.
Then find changes the directories (-type d) to have the executable bit (chmod
+x). The end result of this is 0644 for regular files and 0755 for the directories.
Here's a patch file to add in the correct code, and also to update the DEPEND
line so that we are sure `find` is present.
Created attachment 19187 [details, diff]
Patch to correct permissions of Documentation
i've fixed it with your first comment
--- mplayer-0.92.ebuild.orig 2003-10-08 20:40:10.000000000 -0400
+++ mplayer-0.92.ebuild 2003-10-08 20:41:56.000000000 -0400
@@ -353,10 +353,12 @@
dodoc AUTHORS ChangeLog README
# Install the documentation; DOCS is all mixed up not just html
+ chmod 755 ${S}/DOCS
cp -r ${S}/DOCS ${D}/usr/share/doc/${PF}/ || die
# Copy misc tools to documentation path, as they're not installed
# directly
+ chmod 755 ${S}/TOOLS
cp -r ${S}/TOOLS ${D}/usr/share/doc/${PF} || die
# Install the default Skin and Gnome menu entry
works fine, and i don't want to use any special tools (find) for only change
permissions.
0755 works fine.
closing as fixed |
deuce@grendel deuce $ ls -l /usr/doc/mplayer-0.92/ total 39 -rw-r--r-- 1 root root 7412 Sep 28 20:27 AUTHORS.gz -rw-r--r-- 1 root root 22642 Sep 28 20:27 ChangeLog.gz drwx------ 9 root root 688 Sep 28 20:27 DOCS -rw-r--r-- 1 root root 3666 Sep 28 20:27 README.gz drwx------ 11 root root 1384 Sep 28 20:27 TOOLS The permission on the DOCS and TOOLS directories make them inaccessible by regular users. I tried the below fix, but it does not work. The permissions remain the same. --- mplayer-0.92.ebuild.orig 2003-10-08 20:40:10.000000000 -0400 +++ mplayer-0.92.ebuild 2003-10-08 20:41:56.000000000 -0400 @@ -353,10 +353,12 @@ dodoc AUTHORS ChangeLog README # Install the documentation; DOCS is all mixed up not just html + chmod 755 ${S}/DOCS cp -r ${S}/DOCS ${D}/usr/share/doc/${PF}/ || die # Copy misc tools to documentation path, as they're not installed # directly + chmod 755 ${S}/TOOLS cp -r ${S}/TOOLS ${D}/usr/share/doc/${PF} || die # Install the default Skin and Gnome menu entry Reproducible: Always Steps to Reproduce: