Default Devtools Enabled For Users

Home » CentOS » Default Devtools Enabled For Users
CentOS 2 Comments

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

2 thoughts on - Default Devtools Enabled For Users

  • 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

LEAVE A COMMENT