[Slackbuilds-users] Call for Bug Fixes, Patches, etc

Ryan P.C. McQuen ryan.q at linux.com
Sun Mar 13 00:23:17 UTC 2016


>
> > On 24/02/16 07:37, Kyle Guinn wrote:
> > > On 2/23/16, Andrzej Telszewski <atelszewski at gmail.com> wrote:
> > >> On 05/02/16 13:48, Martijn Dekker wrote:
> > >>> 2. The following horrible, broken and obsolete eyesore:
> > >>>
> > >>> find -L . \
> > >>>    \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm
> > >>> 555 \ -o -perm 511 \) -exec chmod 755 {} \; -o \
> > >>>    \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm
> > >>> 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
> > >>>
> > >>> can be replaced by:
> > >>>
> > >>>      chmod -R a-st,u+rwX,go-w+rX .
> > >>
> > >> I advocate this solution.
> > >> Can we switch for it?
> > >> Or at least would the SlackBuild be accepted if I used this
> > >> construct?
> > >
> > > Even shorter and simpler to understand:
> > > chmod -R u+w,go-w,a+rX-st .
> > >
>
> These 'hammer everything' solutions change permissions on files that
> the find command specifically misses, which may have been set on purpose
> by upstream.
>
> Note that I'm not adverse to submissions using a single chmod line,
> many of my scripts did this in the past. It requires an extra level
> of awareness though, that might be a trap for new players. For the
> template, we should leave the find command in place. Bulk swapping
> them out in the repo is not an option.
>



Erik,

Are you opposed to this solution?

find -L . \
 \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  -o -perm 511 \) -print0 | \
  xargs -0 chmod 755
find -L . \
 \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  -o -perm 440 -o -perm 400 \) -print0 | \
  xargs -0 chmod 644

It was proposed by B. Watson here:

https://lists.slackbuilds.org/pipermail/slackbuilds-users/2015-November/015210.html

It seems to work the same as the current template, but is just less
resource intensive ... but I don't know for sure.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20160313/5bd353c1/attachment.html>


More information about the SlackBuilds-users mailing list