diff --git a/build-aux/install-buildreqs b/build-aux/install-buildreqs index 448ddd8..8173435 100755 --- a/build-aux/install-buildreqs +++ b/build-aux/install-buildreqs @@ -18,10 +18,24 @@ test -r $OS_RELEASE_FILE || exit . $OS_RELEASE_FILE case $ID in + almalinux) + case $VERSION_ID in + 8*) + enable_repos='plus powertools' + ;; + 9*) + enable_repos='plus crb' + ;; + esac + $SUDO dnf --assumeyes config-manager --set-enabled $enable_repos + $SUDO dnf --assumeyes --refresh install epel-release + $SUDO dnf --assumeyes --refresh install --allowerasing $pkgs_common + ;; alpine) $SUDO apk update $SUDO apk add $pkgs_common ;; + centos) case $VERSION_ID in 7) @@ -43,6 +57,7 @@ case $ID in $SUDO dnf --assumeyes --refresh install $repo_pkgs $SUDO dnf --assumeyes --refresh install --allowerasing $pkgs_common $pkgs_centos ;; + debian|ubuntu) $SUDO apt-get --assume-yes update $SUDO apt-get --assume-yes install $pkgs_common diff --git a/build-aux/install-reqs b/build-aux/install-reqs index 1a43d12..2895bec 100755 --- a/build-aux/install-reqs +++ b/build-aux/install-reqs @@ -71,6 +71,20 @@ test -r $OS_RELEASE_FILE || exit . $OS_RELEASE_FILE case $ID in + almalinux) + pkgs_centos="$pkgs_centos clang-tools-extra platform-python-devel" + case $VERSION_ID in + 8*) + enable_repos='plus powertools' + ;; + 9*) + enable_repos='plus crb' + ;; + esac + $SUDO dnf --assumeyes config-manager --set-enabled $enable_repos + $SUDO dnf --assumeyes --refresh install epel-release + $SUDO dnf --assumeyes --refresh install --allowerasing $pkgs_common $pkgs_centos + ;; alpine) $SUDO apk add $pkgs_common $pkgs_alpine ;; diff --git a/configure.ac b/configure.ac index decdec4..dfdeff7 100644 --- a/configure.ac +++ b/configure.ac @@ -134,7 +134,7 @@ QH_VAR_ENSURE([PS1_AWS_COLOR], [bash prompt aws profile color], [$_ec_ps1_aws_d # # cmake3 # AC_ARG_VAR([CMAKE], [cmake program]) -AC_CHECK_PROGS([CMAKE], [cmake3 cmake], [cmake]) +AC_CHECK_PROGS([CMAKE], [cmake cmake3], [no]) AM_CONDITIONAL([HAVE_CMAKE3], [test "x$CMAKE" = xcmake3]) AM_COND_IF([HAVE_CMAKE3], [AC_CONFIG_FILES([data/bash/common/bashrc.d/cmake3.sh])]) diff --git a/data/bash/common/.bash_profile.in b/data/bash/common/.bash_profile.in index cc3962b..435ad5e 100644 --- a/data/bash/common/.bash_profile.in +++ b/data/bash/common/.bash_profile.in @@ -15,10 +15,4 @@ if [ -f "@pkgconfdir@/$_toolbox_name/profile" ]; then source "@pkgconfdir@/$_toolbox_name/profile" fi -# Set PATH so it includes user's private bin dirs if they exist -if type -t pathmung &>/dev/null; then - pathmung @bindir@ - pathmung @sbindir@ -fi - unset _toolbox_name diff --git a/data/bash/common/profile.d/.gitignore b/data/bash/common/profile.d/.gitignore index f51b151..b693037 100644 --- a/data/bash/common/profile.d/.gitignore +++ b/data/bash/common/profile.d/.gitignore @@ -11,3 +11,4 @@ info.sh python.sh scl.sh vim.sh +zz-path.sh diff --git a/data/bash/common/profile.d/Makefile.am b/data/bash/common/profile.d/Makefile.am index e82e41b..9df41fe 100644 --- a/data/bash/common/profile.d/Makefile.am +++ b/data/bash/common/profile.d/Makefile.am @@ -17,6 +17,7 @@ macosx = macosx.sh python = python.sh scl = scl.sh vim = vim.sh +zz_path = zz-path.sh # static data/scripts (not generated; require explicit distribution) static_data = $(bash_completion) \ @@ -49,7 +50,8 @@ DISTCLEANFILES = $(conf_data) make_data = $(go) \ $(info) \ $(python) \ - $(vim) + $(vim) \ + $(zz_path) if ENABLE_CONAN make_data += $(conan) @@ -83,4 +85,5 @@ EDIT = -e 's:@bindir[@]:$(bindir):g' \ -e 's:@GOPATH[@]:$(GOPATH):g' \ -e 's:@infodir[@]:$(infodir):g' \ -e 's:@prefix[@]:$(prefix):g' \ + -e 's:@sbindir[@]:$(sbindir):g' \ -e 's:@vimdir[@]:$(vimdir):g' diff --git a/data/bash/common/profile.d/zz-path.sh.in b/data/bash/common/profile.d/zz-path.sh.in new file mode 100644 index 0000000..79b72fe --- /dev/null +++ b/data/bash/common/profile.d/zz-path.sh.in @@ -0,0 +1,3 @@ +# Set PATH so it includes user's private bin dirs if they exist +pathmung @bindir@ +pathmung @sbindir@ diff --git a/m4/envconf.m4 b/m4/envconf.m4 index 4497cfd..4a5bc87 100644 --- a/m4/envconf.m4 +++ b/m4/envconf.m4 @@ -17,14 +17,17 @@ AS_VAR_SET_IF([$1], QH_OS_RELEASE AS_ECHO_N(['setting $1 to computed value... ']) AS_CASE([$ID], - [alpine], [AS_VAR_SET([$1], [detwiler])], - [centos], [AS_CASE([$VERSION_ID], - [7|8], [AS_VAR_SET([$1], [detwiler])], - [AS_VAR_SET([$1], [ycm-core])])], - [ubuntu], [AS_CASE([$VERSION_ID], - [18.04], [AS_VAR_SET([$1], [detwiler])], - [AS_VAR_SET([$1], [ycm-core])])], - [AS_VAR_SET([$1], [ycm-core])]) + [almalinux], [AS_CASE([$VERSION_ID], + [8*], [AS_VAR_SET([$1], [detwiler])], + [AS_VAR_SET([$1], [ycm-core])])], + [alpine], [AS_VAR_SET([$1], [detwiler])], + [centos], [AS_CASE([$VERSION_ID], + [7|8], [AS_VAR_SET([$1], [detwiler])], + [AS_VAR_SET([$1], [ycm-core])])], + [ubuntu], [AS_CASE([$VERSION_ID], + [18.04], [AS_VAR_SET([$1], [detwiler])], + [AS_VAR_SET([$1], [ycm-core])])], + [AS_VAR_SET([$1], [ycm-core])]) AS_VAR_COPY([VERSION], [_ec_version]) AC_MSG_RESULT([$$1])]) ]) # EC_VIM_YCM_OWNER @@ -46,19 +49,22 @@ AS_VAR_SET_IF([$1], QH_OS_RELEASE AS_ECHO_N(['setting $1 to computed value... ']) AS_CASE([$ID], - [alpine], [AS_CASE([$VERSION_ID], - [3.13*], [AS_VAR_SET([$1], [llvm-10])], - [3.14*], [AS_VAR_SET([$1], [llvm-11])], - [3.15*], [AS_VAR_SET([$1], [llvm-12])], - [AS_VAR_SET([$1], [master])])], - [centos], [AS_CASE([$VERSION_ID], - [7], [AS_VAR_SET([$1], [vim-7.4.143])], - [8], [AS_VAR_SET([$1], [vim-7.4.1578])], - [AS_VAR_SET([$1], [master])])], - [ubuntu], [AS_CASE([$VERSION_ID], - [18.04], [AS_VAR_SET([$1], [vim-7.4.1578])], - [AS_VAR_SET([$1], [master])])], - [AS_VAR_SET([$1], [master])]) + [almalinux], [AS_CASE([$VERSION_ID], + [8*], [AS_VAR_SET([$1], [vim-7.4.1578])], + [AS_VAR_SET([$1], [master])])], + [alpine], [AS_CASE([$VERSION_ID], + [3.13*], [AS_VAR_SET([$1], [llvm-10])], + [3.14*], [AS_VAR_SET([$1], [llvm-11])], + [3.15*], [AS_VAR_SET([$1], [llvm-12])], + [AS_VAR_SET([$1], [master])])], + [centos], [AS_CASE([$VERSION_ID], + [7], [AS_VAR_SET([$1], [vim-7.4.143])], + [8], [AS_VAR_SET([$1], [vim-7.4.1578])], + [AS_VAR_SET([$1], [master])])], + [ubuntu], [AS_CASE([$VERSION_ID], + [18.04], [AS_VAR_SET([$1], [vim-7.4.1578])], + [AS_VAR_SET([$1], [master])])], + [AS_VAR_SET([$1], [master])]) AS_VAR_COPY([VERSION], [_ec_version]) AC_MSG_RESULT([$$1])]) ]) # EC_VIM_YCM_REF @@ -80,18 +86,21 @@ AS_VAR_SET_IF([$1], QH_OS_RELEASE AS_ECHO_N(['setting $1 to computed value... ']) AS_CASE([$ID], - [alpine], [AS_CASE([$VERSION_ID], - [3.13*], [AS_VAR_SET([$1], [--clangd-completer])], - [3.14*], [AS_VAR_SET([$1], [--clangd-completer])], - [AS_VAR_SET([$1], ['--clangd-completer --force-sudo'])])], - [centos], [AS_CASE([$VERSION_ID], - [7], [AS_VAR_SET([$1], [--clang-completer])], - [8], [AS_VAR_SET([$1], [--clangd-completer])], - [AS_VAR_SET([$1], ['--clangd-completer --force-sudo'])])], - [ubuntu], [AS_CASE([$VERSION_ID], - [18.04], [AS_VAR_SET([$1], [--clangd-completer])], - [AS_VAR_SET([$1], ['--clangd-completer --force-sudo'])])], - [AS_VAR_SET([$1], ['--clangd-completer --force-sudo'])]) + [almalinux], [AS_CASE([$VERSION_ID], + [8*], [AS_VAR_SET([$1], [--clangd-completer])], + [AS_VAR_SET([$1], ['--clangd-completer --force-sudo'])])], + [alpine], [AS_CASE([$VERSION_ID], + [3.13*], [AS_VAR_SET([$1], [--clangd-completer])], + [3.14*], [AS_VAR_SET([$1], [--clangd-completer])], + [AS_VAR_SET([$1], ['--clangd-completer --force-sudo'])])], + [centos], [AS_CASE([$VERSION_ID], + [7], [AS_VAR_SET([$1], [--clang-completer])], + [8], [AS_VAR_SET([$1], [--clangd-completer])], + [AS_VAR_SET([$1], ['--clangd-completer --force-sudo'])])], + [ubuntu], [AS_CASE([$VERSION_ID], + [18.04], [AS_VAR_SET([$1], [--clangd-completer])], + [AS_VAR_SET([$1], ['--clangd-completer --force-sudo'])])], + [AS_VAR_SET([$1], ['--clangd-completer --force-sudo'])]) AS_VAR_COPY([VERSION], [_ec_version]) AC_MSG_RESULT([$$1])]) ]) # EC_VIM_YCM_ARGS @@ -146,28 +155,30 @@ QH_OS_RELEASE AS_CASE([$TERM], [*256*], [AS_CASE([$_ec_user_id], [0], [AS_VAR_SET([_ec_ps1_user_default], ['38;5;9'])], - [AS_VAR_SET([_ec_ps1_user_default], ['38;5;28'])]) + [AS_VAR_SET([_ec_ps1_user_default], ['38;5;28'])]) AS_CASE([$ID], - [alpine], [AS_VAR_SET([_ec_ps1_host_default], ['38;5;24'])], - [centos], [AS_VAR_SET([_ec_ps1_host_default], ['38;5;214'])], - [debian], [AS_VAR_SET([_ec_ps1_host_default], ['38;5;161'])], - [fedora], [AS_VAR_SET([_ec_ps1_host_default], ['38;5;33'])], - [rhel], [AS_VAR_SET([_ec_ps1_host_default], ['38;5;196'])], - [ubuntu], [AS_VAR_SET([_ec_ps1_host_default], ['38;5;202'])], - [AS_VAR_SET([_ec_ps1_host_default], ['38;5;6'])]) + [almalinux], [AS_VAR_SET([_ec_ps1_host_default], ['38;5;214'])], + [alpine], [AS_VAR_SET([_ec_ps1_host_default], ['38;5;24'])], + [centos], [AS_VAR_SET([_ec_ps1_host_default], ['38;5;214'])], + [debian], [AS_VAR_SET([_ec_ps1_host_default], ['38;5;161'])], + [fedora], [AS_VAR_SET([_ec_ps1_host_default], ['38;5;33'])], + [rhel], [AS_VAR_SET([_ec_ps1_host_default], ['38;5;196'])], + [ubuntu], [AS_VAR_SET([_ec_ps1_host_default], ['38;5;202'])], + [AS_VAR_SET([_ec_ps1_host_default], ['38;5;6'])]) AS_VAR_SET([_ec_ps1_git_default], ['38;5;202']) AS_VAR_SET([_ec_ps1_aws_default], ['38;5;214'])], [AS_CASE([$_ec_user_id], [0], [AS_VAR_SET([_ec_ps1_user_default], [31])], - [AS_VAR_SET([_ec_ps1_user_default], [32])]) + [AS_VAR_SET([_ec_ps1_user_default], [32])]) AS_CASE([$ID], - [alpine], [AS_VAR_SET([_ec_ps1_host_default], [36])], - [centos], [AS_VAR_SET([_ec_ps1_host_default], [33])], - [debian], [AS_VAR_SET([_ec_ps1_host_default], [35])], - [fedora], [AS_VAR_SET([_ec_ps1_host_default], [34])], - [rhel], [AS_VAR_SET([_ec_ps1_host_default], [31])], - [ubuntu], [AS_VAR_SET([_ec_ps1_host_default], [35])], - [AS_VAR_SET([_ec_ps1_host_default], [32])]) + [almalinux], [AS_VAR_SET([_ec_ps1_host_default], [33])], + [alpine], [AS_VAR_SET([_ec_ps1_host_default], [36])], + [centos], [AS_VAR_SET([_ec_ps1_host_default], [33])], + [debian], [AS_VAR_SET([_ec_ps1_host_default], [35])], + [fedora], [AS_VAR_SET([_ec_ps1_host_default], [34])], + [rhel], [AS_VAR_SET([_ec_ps1_host_default], [31])], + [ubuntu], [AS_VAR_SET([_ec_ps1_host_default], [35])], + [AS_VAR_SET([_ec_ps1_host_default], [32])]) AS_VAR_SET([_ec_ps1_git_default], [31]) AS_VAR_SET([_ec_ps1_aws_default], [33])]) AS_VAR_COPY([VERSION], [_ec_version])