Hi! I want to make the default environment for users the environment of devtoolset .. and i am thinking to do it this way: 1. make /bin/bash-devtools with the content scl enable devtoolset-2 bash "$@"
2. change for the prospective users the shell from /bin/bash to /bin/bash-devtoolset
Is this the best way? Do anyone see or know of any pitfalls with this?
Thanks a lot! Adrian
On Sep 14, 2014, at 10:57 AM, Adrian Sevcenco Adrian.Sevcenco@cern.ch wrote:
Hi! I want to make the default environment for users the environment of devtoolset .. and i am thinking to do it this way:
- make /bin/bash-devtools with the content
scl enable devtoolset-2 bash "$@"
- change for the prospective users the shell from /bin/bash to /bin/bash-devtoolset
Is this the best way? Do anyone see or know of any pitfalls with this?
Hi,
I suspect that'll break a couple things. Off the top of my head, you'll need to add it to /etc/shells.
You might get more milage out of putting the scl command in an /etc/profile.d/*.sh script. You could put some logic in it so non-root or certain user/groups are the only ones that load it.
-- Jonathan Billings billings@negate.org
On Sun, Sep 14, 2014 at 06:49:45PM -0400, Jonathan Billings wrote:
On Sep 14, 2014, at 10:57 AM, Adrian Sevcenco Adrian.Sevcenco@cern.ch wrote:
Hi! I want to make the default environment for users the environment of devtoolset .. and i am thinking to do it this way:
- make /bin/bash-devtools with the content
scl enable devtoolset-2 bash "$@"
- change for the prospective users the shell from /bin/bash to /bin/bash-devtoolset
Is this the best way? Do anyone see or know of any pitfalls with this?
Hi,
I suspect that'll break a couple things. Off the top of my head, you'll need to add it to /etc/shells.
You might get more milage out of putting the scl command in an /etc/profile.d/*.sh script. You could put some logic in it so non-root or certain user/groups are the only ones that load it.
yymv, but what about an environment-modules "scl" or "devtoolset" which will just: #%Module1.0##################################################################### prepend-path PATH /opt/rh/devtoolset-2/root/bin prepend-path PATH /opt/rh/devtoolset-2/root/sbin prepend-path PATH /opt/rh/devtoolset-2/root/usr/bin prepend-path PATH /opt/rh/devtoolset-2/root/usr/sbin
prepend-path MANPATH /opt/rh/devtoolset-2/root/usr/share/man
prepend-path -d " " CFLAGS "-I/opt/rh/devtoolset-2/root/usr/include" prepend-path -d " " CPPFLAGS "-I/opt/rh/devtoolset-2/root/usr/include" prepend-path -d " " CXXFLAGS "-I/opt/rh/devtoolset-2/root/usr/include"
prepend-path -d " " LDFLAGS "-L/opt/rh/devtoolset-2/root/usr/lib" prepend-path LD_RUN_PATH /opt/rh/devtoolset-2/root/usr/lib prepend-path LD_LIBRARY_PATH /opt/rh/devtoolset-2/root/usr/lib
prepend-path -d " " LDFLAGS "-L/opt/rh/devtoolset-2/root/usr/lib64" prepend-path LD_RUN_PATH /opt/rh/devtoolset-2/root/usr/lib64 prepend-path LD_LIBRARY_PATH /opt/rh/devtoolset-2/root/usr/lib64
prepend-path PERL5LIB /opt/rh/devtoolset-2/root//usr/lib64/perl5/vendor_perl prepend-path PERL5LIB /opt/rh/devtoolset-2/root//usr/lib/perl5/vendor_perl prepend-path PERL5LIB /opt/rh/devtoolset-2/root//usr/share/perl5/vendor_perl
prepend-path PYTHONPATH /opt/rh/devtoolset-2/root/usr/lib/python2.6/site-packages prepend-path PYTHONPATH /opt/rh/devtoolset-2/root/usr/lib64/python2.6/site-packages
prepend-path INFOPATH /opt/rh/devtoolset-2/root/usr/share/info
Cheers
Tru