Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 318635 - Add variable to support prefixing shebangs at custom positions
Summary: Add variable to support prefixing shebangs at custom positions
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-05 15:54 UTC by Justin Lecher (RETIRED)
Modified: 2011-12-15 18:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lecher (RETIRED) gentoo-dev 2010-05-05 15:54:37 UTC
I have an ebuild, which is binary and installs a couple of shell scripts in EPREFIX/opt/foo/scripts. It would be nice to have a variable to define dirs and/or files,  which contains files to shebang fix.
Comment 1 Fabian Groffen gentoo-dev 2010-05-05 19:36:45 UTC
hmmm, that wouldn't be too hard to implement.

I take it the semantics would be that for each file (also dirs?) listed:
- the shebang MUST be fixable, or
- the shebang MUST be already ok
- otherwise the ebuild dies (like it does for scripts in $PATH)

Any suggestions for a variable that does this?
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-05-13 21:25:58 UTC
(In reply to comment #1)
> hmmm, that wouldn't be too hard to implement.
> 
> I take it the semantics would be that for each file (also dirs?) listed:
> - the shebang MUST be fixable, or
> - the shebang MUST be already ok
> - otherwise the ebuild dies (like it does for scripts in $PATH)
> 
> Any suggestions for a variable that does this?
> 

EEXTRA_SHEBANG ? being a list (array?) or files and/or dirs.
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2010-10-04 06:56:26 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > hmmm, that wouldn't be too hard to implement.
> > 
> > I take it the semantics would be that for each file (also dirs?) listed:
> > - the shebang MUST be fixable, or
> > - the shebang MUST be already ok
> > - otherwise the ebuild dies (like it does for scripts in $PATH)
> > 
> > Any suggestions for a variable that does this?
> > 
> 
> EEXTRA_SHEBANG ? being a list (array?) or files and/or dirs.
> 

List or array depends on the best way for implementation. But I would suggest support for files and dirs, as well as wildcards. If possible
Comment 4 Fabian Groffen gentoo-dev 2011-04-24 12:22:37 UTC
maybe it's much cleaner to just implement this in prefix.eclass as some "convert shebang" func.
Comment 5 Fabian Groffen gentoo-dev 2011-12-15 18:57:41 UTC
prefix.eclass is the place to do hacky stuff like this.