[Fedora-packaging] port opening and PATH modification in rpm spec file

Garrett Holmstrom gholms at fedoraproject.org
Fri Mar 26 14:59:40 UTC 2010


On 3/26/2010 9:15, Manuel Wolfshant wrote:
> this is an example for sh/bash. in your kindness you should also adapt
> it for ksh / csh
>
> #! /bin/bash
>
> export PATH=$PATH:/my/new/folder/
> export
> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/new/path/to/be/added/to/this/variable
>
>
>
>      Mind that adding a global LD_LIBRARY_PATH is not at all a good idea
> (it might interfere with other existing applications) so you'd better
> just provide a script, available in the normal path of the users, which
> would set this variable only when needed and for the period of time that
> is needed.

When packaging you should add a file to /etc/ld.so.conf.d [1, 2] or 
possibly use an RPATH [3] rather than editing environment variables.

[1] https://fedoraproject.org/wiki/Packaging/Guidelines#AlternativeRpath
[2] https://fedoraproject.org/wiki/Packaging/Guidelines#Shared_Libraries
[3] 
https://fedoraproject.org/wiki/Packaging/Guidelines#Rpath_for_Internal_Libraries


More information about the packaging mailing list