[MCOL-667] Installation of MCS updates the root .bashrc file Created: 2017-04-18  Updated: 2020-08-25  Resolved: 2017-10-26

Status: Closed
Project: MariaDB ColumnStore
Component/s: installation
Affects Version/s: 1.0.8
Fix Version/s: 1.1.1

Type: Bug Priority: Major
Reporter: Allan Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Environment:

Centos 7


Issue Links:
Duplicate
is duplicated by MCOL-906 Columnstore "platform" RPM modifies .... Closed
Sprint: 2017-19, 2017-20, 2017-21

 Description   

When installing MCS and running the postconfigure the root's .bashrc file is updated with MCS aliases (e.g. mcsadmin). This should be optional and hinted. Alternatively the aliases should be installed the 'modern' way in the /etc/profile.d directory.



 Comments   
Comment by David Hill (Inactive) [ 2017-10-24 ]

plans - need to move the alias and non-root ENV settings from .bashrc to files in /etc/profile.d
For non-root - new file for Env settings called columnstoreEnv and file for aliases called columnstoreAlias
root - file for aliases called columnstoreAlias

post-install/pre-uninstall - change from using .bashrc to /etc/profile.d

postConfigure - will print a new message at the end that alias are in the specific file.

Comment by David Hill (Inactive) [ 2017-10-24 ]

1 note - since this is setup in the post-install file, not adding any option to NOT setup the profile file. User can always go and delete that file, if they so choose.

Comment by David Hill (Inactive) [ 2017-10-24 ]

changes made and tested, pull request done... in review now

Comment by Ben Thompson (Inactive) [ 2017-10-25 ]

Reviewed and Merged

Comment by Daniel Lee (Inactive) [ 2017-10-26 ]

Build verified: Github source for 1.1.1

/root/columnstore/mariadb-columnstore-server
commit f6cd94ea167789970db7b5b501569a6549495d10
Merge: 3d846d3 91b2553
Author: David.Hall <david.hall@mariadb.com>
Date: Tue Oct 24 09:15:58 2017 -0500

Merge pull request #72 from mariadb-corporation/MCOL-982

MCOL-982 Merge MariaDB 10.2.9

/root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine
commit a1c82cb2b7cfc501b64843f1cc31336303e79051
Merge: 1360de6 1601d6f
Author: benthompson15 <ben.thompson@mariadb.com>
Date: Wed Oct 25 15:59:42 2017 -0500

Merge pull request #299 from mariadb-corporation/mcol-667

Mcol 667

Verified that alias are in /etc/profile.d and not in ~/.bashrc

[root@localhost ~]# cd /etc/profile.d
[root@localhost profile.d]# ls
256term.csh bash_completion.sh colorgrep.sh colorls.sh lang.csh less.csh which2.csh
256term.sh colorgrep.csh colorls.csh columnstoreAlias.sh lang.sh less.sh which2.sh
[root@localhost profile.d]# cat columnstoreAlias.sh

  1. MariaDB Columnstore Alias Commands
    #
    alias mcsmysql='/usr/local/mariadb/columnstore/mysql/bin/mysql --defaults-extra-file=/usr/local/mariadb/columnstore/mysql/my.cnf -u root'
    alias ma=/usr/local/mariadb/columnstore/bin/mcsadmin
    alias mcsadmin=/usr/local/mariadb/columnstore/bin/mcsadmin
    alias cpimport=/usr/local/mariadb/columnstore/bin/cpimport
    alias home='cd /usr/local/mariadb/columnstore'
    alias log='cd /var/log/mariadb/columnstore/'
    alias core='cd /var/log/mariadb/columnstore/corefiles'
    alias tmsg='tail -f /var/log/messages'
    alias tdebug='tail -f /var/log/mariadb/columnstore/debug.log'
    alias tinfo='tail -f /var/log/mariadb/columnstore/info.log'
    alias dbrm='cd /usr/local/mariadb/columnstore/data1/systemFiles/dbrm'
    alias module='cat /usr/local/mariadb/columnstore/local/module'
Generated at Thu Feb 08 02:22:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.