Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Jeremy Olexa <darkside@g.o>
Subject: Re: On shebangs of scripts
Date: Wed, 23 Sep 2009 09:09:23 -0500
On Wed, Sep 23, 2009 at 2:53 AM, Fabian Groffen <grobian@g.o> wrote:
> Hi all,
>
> Recently, we added a new QA check in Gentoo Prefix' Portage to check
> shebangs (the #! things) of scripts before they are installed.  We
> basically did this simply because we don't want to use say
> /usr/bin/perl and because this executable might not exist (e.g. on
> vanilla FreeBSD).  Even if it does exist, we still don't want to use it,
> since we installed a newer/better version, that also can find the
> installed packages.  This basically does not affect Gentoo Linux,
> however, we do run into several other cases right now that do affect
> Gentoo Linux:
>
> - shebangs like #!python, these are invalid and used by some python
>  packages
> - shebangs like #!/usr/local/bin/python, this is not a good idea, used
>  IIRC by python itself
> - shebangs like #!/bin/csh or #!/bin/tcsh that are correct in itself,
>  but basically need tcsh to be installed to run, e.g. vim does this
>
> The problem with these is that they are executable scripts, e.g. a user
> could expect them to be able to run, IMO.  Solving this can be done by
> fixing the shebang (as for the first two cases), adding a runtime
> dependency (for the last case), or by removing the executable bit of the
> scripts so they no longer can be run, and they merely become
> examples/documentation.

Should there ever be executable scripts in /usr/share? If the
consensus is 'no', could portage remove the +x bit automatically?

Other distros debate about +x in /usr/share/doc too:
https://bugzilla.redhat.com/show_bug.cgi?id=487527#c3 - From what I
gather, other distros decided that they can be +x if they work
properly (meaning, proper dependencies)

>
> Should we start filing bugs on these issues?  In the end, they are
> broken scripts on the system.  Is there interest for porting the Prefix
> shebang QA check to normal Portage?
>
>
> --
> Fabian Groffen
> Gentoo on a different level
>
>


Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: On shebangs of scripts
Next by thread:
[RFC] Dropping (or enabling only on request) bootstrap from SCM eclasses
Previous by date:
Re: On shebangs of scripts
Next by date:
[RFC] Dropping (or enabling only on request) bootstrap from SCM eclasses


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.