From 0775e7d444aaf38ced6b80aa39d7bc1c17016b52 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Mon, 15 Sep 2025 11:59:04 +0000 Subject: [PATCH] import CS gcc-toolset-14-14.0-2.el9 --- SOURCES/sudo.sh | 41 --------------------------------------- SPECS/gcc-toolset-14.spec | 17 ++++++---------- 2 files changed, 6 insertions(+), 52 deletions(-) delete mode 100644 SOURCES/sudo.sh diff --git a/SOURCES/sudo.sh b/SOURCES/sudo.sh deleted file mode 100644 index 7feaa8f..0000000 --- a/SOURCES/sudo.sh +++ /dev/null @@ -1,41 +0,0 @@ -#! /bin/bash - -# Emulate /usr/bin/sudo, so that SCL environment variables -# are passed through via an /bin/env wrapper. -# Includes work by Andy Fong - -cmd_started=false -is_option_param_next=false -for arg in "$@" -do - case "$arg" in - *\'*) - arg= ;; - esac - if [ "$cmd_started" = true ]; then - cmd_options="$cmd_options '$arg'" - elif [ "$is_option_param_next" = true ]; then - sudo_options="$sudo_options $arg" - is_option_param_next=false - elif [[ $arg == -* ]]; then - sudo_options="$sudo_options $arg" - case "$arg" in - # all the options that take a parameter - "-g" | "-h" | "-p" | "-u" | "-U" | "-C" | "-s" | "-r" | "-t" | "-T") - is_option_param_next=true - ;; - "--") - cmd_started=true - ;; - esac - elif [[ $arg == *=* ]]; then - sudo_options="$sudo_options $arg" - else - cmd_options="$cmd_options '$arg'" - cmd_started=true - fi -done -if [ "$sudo_options" == "" ]; then - sudo_options="-E" -fi -exec /usr/bin/sudo $sudo_options env LD_LIBRARY_PATH=$LD_LIBRARY_PATH PATH=$PATH scl enable %{scl} "$cmd_options" diff --git a/SPECS/gcc-toolset-14.spec b/SPECS/gcc-toolset-14.spec index bb3f85c..fea7a8b 100644 --- a/SPECS/gcc-toolset-14.spec +++ b/SPECS/gcc-toolset-14.spec @@ -8,13 +8,12 @@ BuildRequires: scl-utils-build Summary: Package that installs %scl Name: %scl_name Version: 14.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/File BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source0: README -Source1: sudo.sh -Source2: gts-annobin-plugin-select.sh +Source1: gts-annobin-plugin-select.sh Requires: %{scl_prefix}runtime Requires: %{scl_prefix}gcc %{scl_prefix}gcc-c++ %{scl_prefix}gcc-gfortran @@ -106,12 +105,6 @@ export LD_LIBRARY_PATH=%{_scl_root}\$rpmlibdir\$rpmlibdir64\$rpmlibdir32\${LD_LI export PKG_CONFIG_PATH=%{_libdir}/pkgconfig\${PKG_CONFIG_PATH:+:\${PKG_CONFIG_PATH}} EOF -# Sudo script -# =========== -cat <<'EOF' > sudo -%{expand:%(cat %{SOURCE1})} -EOF - %install (%{scl_install}) @@ -130,7 +123,6 @@ install -d -m 755 %{buildroot}%{_scl_scripts} install -p -m 755 enable %{buildroot}%{_scl_scripts}/ install -d -m 755 %{buildroot}%{_scl_scripts} -install -p -m 755 sudo %{buildroot}%{_bindir}/ # Other directories that should be owned by the runtime install -d -m 755 %{buildroot}%{_datadir}/appdata @@ -145,7 +137,7 @@ install -p -m 644 %{?scl_name}.7 %{buildroot}%{_mandir}/man7/ # Install the plugin selector trigger script. mkdir -p %{buildroot}%{rrcdir} -install -p -m 755 %{SOURCE2} %{buildroot}%{rrcdir}/ +install -p -m 755 %{SOURCE1} %{buildroot}%{rrcdir}/ # This trigger is used to decide which version of the annobin plugin for gcc # should be used. See comments in the script for full details. @@ -191,6 +183,9 @@ if [ $1 = 0 ]; then fi %changelog +* Wed May 21 2025 Siddhesh Poyarekar - 14.0-2 +- Drop the sudo wrapper script (RHEL-90066) + * Wed Aug 14 2024 Marek Polacek - 14.0-1 - don't require gdb on RHEL9 (RHEL-54245)