[Slackbuilds-users] vpnc bash4 fix

xgizzmo at slackbuilds.org xgizzmo at slackbuilds.org
Tue Apr 20 21:28:07 UTC 2010


On Tuesday 20 April 2010 16:57:04 B Watson wrote:
> On 4/19/10, caio <elcaio at gmail.com> wrote:
> 
> > Just a reminder for those who want to install vpnc using
> > bash4....,remember to add " || true" at the end of each (find ... |
> > strip...) line on the sbo script.
> 
> Looks like there going to be a lot of these in the near future...
> 
> A suggestion, to whoever maintains the template.SlackBuild: try adding
> the -r option to xargs. That'll avoid running the strip command at all,
> if the find|grep stuff doesn't find any files (which should keep bash4
> happy, although I haven't installed bash4 to actually test it yet).
> 
> Another idea would be to see if bash4 has a "set" option to restore
> the old behaviour for subshells, and add it to the "set -e" line that's
> already in the template.
> 
> Apologies if I'm being redundant (am sure this has been discussed
> already).

We are fixing these as we do updates. There are a few ways to fix it. 
Our template has been updated so all submissions should be using the 
updated template in addition to using the approved version of the build
for all updates.

Replace:
( cd $PKG
  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
    xargs strip --strip-unneeded 2> /dev/null || true
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
    xargs strip --strip-unneeded 2> /dev/null 
)

With this:
( cd $PKG
  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
    xargs strip --strip-unneeded 2> /dev/null || true
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
    xargs strip --strip-unneeded 2> /dev/null || true
)

Or this:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

I prefer the latter.
--dsomero



More information about the SlackBuilds-users mailing list