[Opendnssec-user] Re: scripts without she-bang in /usr/lib/packagename/ (fwd)

Paul Wouters paul at xelerance.com
Thu Nov 17 20:28:30 UTC 2011


FYI, that's what I will do

Paul
-------------- next part --------------
On Thu, Nov 17, 2011 at 01:09:47PM -0500, Paul Wouters wrote:
> On Thu, 17 Nov 2011, Toshio Kuratomi wrote:
> 
> > When you talk about scripts, do you mean that the code calling these scripts
> > does the equivalent of this (note, I generated my examples by reading up on
> > ruby on the web just prior to posting... please allow for this perhaps not
> > being real ruby code :-))::
> >
> >  system('/usr/lib/packagename/foo.rb')
> >
> > or this::
> >
> >  require '/usr/lib/packagename/foo.rb'
> 
> This is what is used.
> 
> >  Foo::run()
> >
> > or this::
> >
> >  system('/usr/bin/ruby /usr/lib/packagename/foo.rb')
> >
> > The first example needs a shebang.  The second example should be mode 0644
> > and you could place them in /usr/share/packagename/.
> 
> Ahh. I thought /usr/share should not contain any executable code, including
> modules. But I cannot find a clear reference to that on 
> http://fedoraproject.org/wiki/Packaging:Guidelines
> 
> I'll talk to upstream about the default install location, as I think it would
> not be wise for the fedora package the hack those paths.
> 
<nod>  And also note -- the use of /usr/lib (*not* %{_libdir}) vs /usr/share
is debatable (I said "could" above rather than should).  The modules that go
into the default search path, for python, perl, and ruby, for instance, all
end up in /usr/lib if they're written purely in the scripting language.

The arguments for either side are:

/usr/share => shareable between architectures.  Thus a sysadmin can save on
disk space by network mounting /usr/share and all the files it contains on
any of the systems they manage.  Most scripting language modules fit into
this.

/usr/lib => for object files, libraries, and internal binaries.  The script
modules are code being used inside of an executable.  So there is a case to
be made to have them fall under the "libraries" definition.

I don't think this is something to get into a big fight with upstream about;
leaving the files 0644 and ignoring rpmlint is valid in this case.

-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.opendnssec.org/pipermail/opendnssec-user/attachments/20111117/080a1728/attachment.bin>
-------------- next part --------------
-- 
devel mailing list
devel at lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


More information about the Opendnssec-user mailing list