[opensuse-packaging] setting a system variable and compiler options
Dear all, I could use some input for a progam I packaging at the moment, which requires two system variables to run. 1. path to binaries The documentation says, that /usr/local/program/bin/ needs to be in the PATH - variable. That shouldn't be needed, if those binaries are installed into "/usr/bin" by the package. If that doesn't work, I'll use links from "/usr/bin/" 2. path to libraries Looks like this is needed: MYLIBPATHVAR is required to point to the library of the program in "/usr/lib/program/lib/" or "/usr/share/program/lib/" How do I introduce a new system wide environment variable - available for all users? 3. Compiler options for optimization to improve the performance of the program, the compiler could get some performance settings like -O3 -mtune=corei7 -march=corei7 etc. to get the full capability for calculations (sse4.2). How does that effect the packaging? Do I need to splitt off a -SSE3/4 package and how does that work? Could somebody point me to some wiki page / sample package to see how to achieve that? You'll see the package in obs https://build.opensuse.org/package/show?package=radiance&project=home%3Alumnis cheers, Denny -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wed, 24 Oct 2012 20:39, Denny Beyer <opensuse@...> wrote:
Dear all,
I could use some input for a progam I packaging at the moment, which requires two system variables to run.
1. path to binaries The documentation says, that /usr/local/program/bin/ needs to be in the PATH - variable. That shouldn't be needed, if those binaries are installed into "/usr/bin" by the package. If that doesn't work, I'll use links from "/usr/bin/"
First: "/usr/local/program/..." looks wrong (HFS), either "/usr/local/share/program/..." or "/usr/local/lib/program/..." Second: There should be a param during setup/config before compile/install to decide the BASE (defaults to /usr/local/, can be set to /usr/).
2. path to libraries Looks like this is needed: MYLIBPATHVAR is required to point to the library of the program in "/usr/lib/program/lib/" or "/usr/share/program/lib/" How do I introduce a new system wide environment variable - available for all users?
Does /etc/profile.d/... parsing still work? Should be, if yes, that would be the location, see python.* and alljava.* files there for examples. Please ask for a security review if you use this 'public' dir.
3. Compiler options for optimization [snip] Can't help there.
-- Yamaban. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
El 24/10/12 15:39, Denny Beyer escribió:
Dear all,
I could use some input for a progam I packaging at the moment, which requires two system variables to run.
1. path to binaries The documentation says, that /usr/local/program/bin/ needs to be in the PATH - variable. That shouldn't be needed, if those binaries are installed into "/usr/bin" by the package.
Correct.
2. path to libraries Looks like this is needed: MYLIBPATHVAR is required to point to the library of the program in "/usr/lib/program/lib/" or "/usr/share/program/lib/" How do I introduce a new system wide environment variable - available for all users?
You don't, the program must known where to find its stuff.
3. Compiler options for optimization to improve the performance of the program, the compiler could get some performance settings like -O3 -mtune=corei7 -march=corei7 etc. to get the full capability for calculations (sse4.2). How does that effect the packaging? Do I need to splitt off a -SSE3/4 package and how does that work?
In the ideal world.. using BuildArch: corei7 in the spec file. However I do not think that will work currently. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wed, 24 Oct 2012 20:39:44 +0200, Denny Beyer <opensuse@dennybeyer.de> wrote:
1. path to binaries The documentation says, that /usr/local/program/bin/ needs to be in the PATH - variable. That shouldn't be needed, if those binaries are installed into "/usr/bin" by the package. If that doesn't work, I'll use links from "/usr/bin/"
Packages meant for the build service must not install to /usr/local and will thus be rejected for factory.
2. path to libraries Looks like this is needed: MYLIBPATHVAR is required to point to the library of the program in "/usr/lib/program/lib/" or "/usr/share/program/lib/" How do I introduce a new system wide environment variable - available for all users?
Like Christian wrote, you don't. If it's the application you're building as part of the package needs to know the path you should make that a compile time configuration issue. If the library is installed in a non standard directory (e.g. in a directory not found in /etc/ld.so.conf) and is needed by third party apps using the library you can teach ld.so the new path by dropping a file with that path or those paths into /etc/ld.so.conf.d. See /etc/ld.so.conf.d/graphviz.conf from the graphviz package for an example.
3. Compiler options for optimization to improve the performance of the program, the compiler could get some performance settings like -O3 -mtune=corei7 -march=corei7 etc. to get the full capability for calculations (sse4.2). How does that effect the packaging? Do I need to splitt off a -SSE3/4 package and how does that work?
Compiler options are normally selected at compile time, depending on the way you configure a package. Otherwise you shouldn't do so, at least not in a package that is meant to be part of openSUSE. Remember that you don't know on what type of system your package is going to be installed and I do not know if rpm can indeed distinguish the processor and thus select the appropriate package to install.
You'll see the package in obs https://build.opensuse.org/package/show?package=radiance&project=home%3Alumnis
If time permits I'll have a look at it. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Dnia środa, 24 października 2012 20:39:44 Denny Beyer pisze:
Dear all,
I could use some input for a progam I packaging at the moment, which requires two system variables to run.
1. path to binaries The documentation says, that /usr/local/program/bin/ needs to be in the PATH - variable. That shouldn't be needed, if those binaries are installed into "/usr/bin" by the package. If that doesn't work, I'll use links from "/usr/bin/"
2. path to libraries Looks like this is needed: MYLIBPATHVAR is required to point to the library of the program in "/usr/lib/program/lib/" or "/usr/share/program/lib/" How do I introduce a new system wide environment variable - available for all users?
You hide the executable and write a script that sets the environment and calls it, e.g.. R or Mozilla Firefox. Note that the shared library cases causes problems because any program that links to that library must be called via the script and, if it is a libexec program, all clients must be told to use the script instead. The library is just being uncoöperative; live with it or fix it upstream but do not pollute the global namespace for every other application. Chris -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (5)
-
Cristian Rodríguez
-
Denny Beyer
-
Krzysztof Żelechowski
-
Philipp Thomas
-
Yamaban