From 03d5776a6ce27cc33f7a541f1f3b24440850cedc Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 09 2023 05:34:56 +0000 Subject: import environment-modules-5.0.1-2.el9 --- diff --git a/SOURCES/environment-modules-profilesh-misdetects-login-shell.patch b/SOURCES/environment-modules-profilesh-misdetects-login-shell.patch new file mode 100644 index 0000000..0d03552 --- /dev/null +++ b/SOURCES/environment-modules-profilesh-misdetects-login-shell.patch @@ -0,0 +1,18 @@ +diff --git a/init/profile.sh.in b/init/profile.sh.in +index faa468639..64d21dbcd 100644 +--- a/init/profile.sh.in ++++ b/init/profile.sh.in +@@ -3,7 +3,11 @@ + # get current shell name by querying shell variables or looking at parent + # process name + if [ -n "${BASH:-}" ]; then +- shell=${BASH##*/} ++ if [ "${BASH##*/}" = 'sh' ]; then ++ shell='sh' ++ else ++ shell='bash' ++ fi + elif [ -n "${ZSH_NAME:-}" ]; then + shell=$ZSH_NAME + else + diff --git a/SPECS/environment-modules.spec b/SPECS/environment-modules.spec index 33ed3e0..8ed1092 100644 --- a/SPECS/environment-modules.spec +++ b/SPECS/environment-modules.spec @@ -3,13 +3,15 @@ Name: environment-modules Version: 5.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Provides dynamic modification of a user's environment License: GPLv2+ URL: http://modules.sourceforge.net/ Source0: http://downloads.sourceforge.net/modules/modules-%{version}.tar.bz2 +Patch1: environment-modules-profilesh-misdetects-login-shell.patch + BuildRequires: tcl BuildRequires: dejagnu BuildRequires: make @@ -57,7 +59,7 @@ NOTE: You will need to get a new shell after installing this package to have access to the module alias. %prep -%setup -q -n modules-%{version} +%autosetup -p1 -n modules-%{version} %build @@ -160,6 +162,9 @@ fi %{vimdatadir}/syntax/modulefile.vim %changelog +* Thu Sep 22 2022 Lukáš Zaoral - 5.0.1-2 +- Fix profile.sh login shell misdetection (#2128975) + * Mon Dec 6 2021 Lukáš Zaoral - 5.0.1-1 - Update to 5.0.1 (#2004402)