From b63c004e3e64bcdda348bf92a804091f5b7d50d6 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 23 2022 16:13:26 +0000 Subject: import environment-modules-4.5.2-3.el8 --- 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 f4d38d8..4283ab8 100644 --- a/SPECS/environment-modules.spec +++ b/SPECS/environment-modules.spec @@ -3,7 +3,7 @@ Name: environment-modules Version: 4.5.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Provides dynamic modification of a user's environment Group: System Environment/Base @@ -12,6 +12,7 @@ URL: http://modules.sourceforge.net/ Source0: http://downloads.sourceforge.net/modules/modules-%{version}.tar.bz2 Patch0001: environment-modules-configure.patch Patch0002: environment-modules-moulespath-initrc.patch +Patch0003: environment-modules-profilesh-misdetects-login-shell.patch BuildRequires: tcl-devel, libX11-devel BuildRequires: dejagnu, sed, procps, hostname, man, less @@ -58,7 +59,7 @@ This package provides Environment Modules compatibility version (3.2). %prep -%autosetup -n modules-%{version} +%autosetup -p1 -n modules-%{version} %build @@ -191,6 +192,9 @@ fi %changelog +* Wed Sep 21 2022 Lukáš Zaoral - 4.5.2-3 +- Fix profile.sh login shell misdetection (#1815047) + * Tue Jun 07 2022 Lukáš Zaoral - 4.5.2-2 - Evaluate both modulespath and initrc during initialization (#1894870)