← Back to team overview

kicad-developers team mailing list archive

Re: library problem in Cvpcb

 

----- Original Message -----

> From: Lorenzo Marcantonio <l.marcantonio@xxxxxxxxxxxx>
> To: Kicad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
> Cc: 
> Sent: Thursday, February 13, 2014 2:48 AM
> Subject: Re: [Kicad-developers] library problem in Cvpcb
> 
> On Wed, Feb 12, 2014 at 03:59:48PM +0100, Fabrizio Tappero wrote:
>>  Hello,
>>  after some reading it looks like Debian does not support the execution of
>>  scripts saved in /etc/profile.d/
> 
> Uhmm... that's strange... while surely not POSIX (which only mandates
> /etc/profile), the LSB core explicitly requires it, in the sh
> description:
> 
>     Note: This specification requires that the sh utility shall also
>     read and execute commands in its current execution environment from
>     all the shell scripts in the directory /etc/profile.d. Such scripts
>     are read and executed as a part of reading and executing
>     /etc/profile.
> 
> I personally find debatable to mandate such behaviour (after all
> everyone can put whatever he want in its /etc/profile), there is a clear
> standard recommendation for it. Usually Debian is compliant... OTOH LSB
> also mandate to be RPM based, so maybe there are exceptions:
> just read the lsb package readme, it says:
>     
>     Debian policy forbids the use of /etc/profile.d by Debian packages,
>     so it is unlikely this will change (as it might be seen as
>     encouragement for Debian developers to do use it.)
> 
> The 'official' solution is described in the debian policy 9.9:
> 
>     If a program usually depends on environment variables for its
>     configuration, the program should be changed to fall back to
>     a reasonable default configuration if these environment variables
>     are not present. If this cannot be done easily (e.g., if the source
>     code of a non-free program is not available), the program must be
>     replaced by a small "wrapper" shell script which sets the
>     environment variables if they are not already defined, and calls the
>     original program.
> 
> Probably slackware has the same issue :P
> 
> *if* environment variables are really needed I personally like the
> approach used by ISE (a script to be sourced manually, eventually to be
> integrated in the user .profile)
> 
> -- 
> Lorenzo Marcantonio
> Logos Srl
> 
> 


This is not so unusual; one of the few uses of globally executed profiles
is to run the message-of-the-day. If you do anything more than that you'll
probably break something and have a hundred UNIX users cursing you. The
best solution I think is to install a setup script which individual users
can run; that script in turn should make changes to the user's .bash_rc
and .profile files. Such a scheme would be acceptable on a generic UNIX
installation (though I wonder how many KiCad users have it installed on
a multi-user system). 

- Cirilo



Follow ups

References