From b26cfd82cf84a60bc21a1419f66b90fd5e442534 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 21 Jan 2020 15:46:14 -0500 Subject: [PATCH] import setup-2.12.2-5.el8 --- SOURCES/setup-2.12.2-empty-path.patch | 47 ++++++++ ...2-lang.csh-prevent-grep-from-failing.patch | 13 ++ SOURCES/setup-2.12.2-lang.csh-typos.patch | 88 ++++++++++++++ SOURCES/setup-2.12.2-nrpe-services.patch | 13 ++ SOURCES/setup-2.12.2-pcp-aliases.patch | 12 ++ ....12.2-use-full-path-for-non-builtins.patch | 113 ++++++++++++++++++ SPECS/setup.spec | 31 ++++- 7 files changed, 316 insertions(+), 1 deletion(-) create mode 100644 SOURCES/setup-2.12.2-empty-path.patch create mode 100644 SOURCES/setup-2.12.2-lang.csh-prevent-grep-from-failing.patch create mode 100644 SOURCES/setup-2.12.2-lang.csh-typos.patch create mode 100644 SOURCES/setup-2.12.2-nrpe-services.patch create mode 100644 SOURCES/setup-2.12.2-pcp-aliases.patch create mode 100644 SOURCES/setup-2.12.2-use-full-path-for-non-builtins.patch diff --git a/SOURCES/setup-2.12.2-empty-path.patch b/SOURCES/setup-2.12.2-empty-path.patch new file mode 100644 index 0000000..2849f6e --- /dev/null +++ b/SOURCES/setup-2.12.2-empty-path.patch @@ -0,0 +1,47 @@ +diff --git a/csh.login b/csh.login +index 51902e8..e4b1990 100644 +--- a/csh.login ++++ b/csh.login +@@ -2,20 +2,28 @@ + + # System wide environment and startup programs, for login setup + +-#add sbin directories to the path +-foreach p ( /usr/local/sbin /usr/sbin ) +- switch (":${PATH}:") +- case "*:${p}:*": +- breaksw +- default: +- if ( $uid == 0 ) then +- set path = ( ${p} ${path:q} ) +- else +- set path = ( ${path:q} ${p} ) +- endif +- breaksw +- endsw +-end ++if ( ! ${?PATH} ) then ++ if ( $uid == 0 ) then ++ setenv PATH "/usr/local/sbin:/usr/sbin:/usr/local/bin:/usr/bin" ++ else ++ setenv PATH "/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin" ++ endif ++else ++ #add sbin directories to the path ++ foreach p ( /usr/local/sbin /usr/sbin ) ++ switch (":${PATH}:") ++ case "*:${p}:*": ++ breaksw ++ default: ++ if ( $uid == 0 ) then ++ set path = ( ${p} ${path:q} ) ++ else ++ set path = ( ${path:q} ${p} ) ++ endif ++ breaksw ++ endsw ++ end ++endif + + setenv HOSTNAME `/usr/bin/hostname` + set history=1000 diff --git a/SOURCES/setup-2.12.2-lang.csh-prevent-grep-from-failing.patch b/SOURCES/setup-2.12.2-lang.csh-prevent-grep-from-failing.patch new file mode 100644 index 0000000..de13b02 --- /dev/null +++ b/SOURCES/setup-2.12.2-lang.csh-prevent-grep-from-failing.patch @@ -0,0 +1,13 @@ +diff --git a/lang.csh b/lang.csh +index 1dc78f8..695c1bc 100644 +--- a/lang.csh ++++ b/lang.csh +@@ -36,7 +36,7 @@ set in_console=`tty | grep -vc -e '/dev/tty'` + + if (${?LANG} && ${?TERM}) then + if (${TERM} == 'linux' && $in_console == 0) then +- set utf8_used=`echo ${LANG} | grep --quiet -E -i -e '^.+\.utf-?8$'; echo $?` ++ set utf8_used=`echo ${LANG} | grep -vc -E -i -e '^.+\.utf-?8$'` + + if (${utf8_used} == 0) then + switch (${LANG}) diff --git a/SOURCES/setup-2.12.2-lang.csh-typos.patch b/SOURCES/setup-2.12.2-lang.csh-typos.patch new file mode 100644 index 0000000..eb69497 --- /dev/null +++ b/SOURCES/setup-2.12.2-lang.csh-typos.patch @@ -0,0 +1,88 @@ +diff --git a/lang.csh b/lang.csh +index 67faefc..1dc78f8 100644 +--- a/lang.csh ++++ b/lang.csh +@@ -34,45 +34,47 @@ endif + # The ${LANG} manipulation is necessary only in virtual terminal (a.k.a. console - /dev/tty*): + set in_console=`tty | grep -vc -e '/dev/tty'` + +-if (${?LANG} && ${TERM} == 'linux' && in_console == 0) then +- set utf8_used=`echo ${LANG} | grep --quiet -E -i -e '^.+\.utf-?8$'; echo $?` ++if (${?LANG} && ${?TERM}) then ++ if (${TERM} == 'linux' && $in_console == 0) then ++ set utf8_used=`echo ${LANG} | grep --quiet -E -i -e '^.+\.utf-?8$'; echo $?` + +- if (${utf8_used} == 0) then +- switch (${LANG}) +- case en_IN*: +- breaksw ++ if (${utf8_used} == 0) then ++ switch (${LANG}) ++ case en_IN*: ++ breaksw + +- case ja*: +- case ko*: +- case si*: +- case zh*: +- case ar*: +- case fa*: +- case he*: +- case *_IN*: +- setenv LANG en_US.UTF-8 +- breaksw +- endsw +- else +- switch (${LANG}) +- case en_IN*: +- breaksw +- case ja*: +- case ko*: +- case si*: +- case zh*: +- m case ar*: +- case fa*: +- case he*: +- case *_IN*: +- setenv LANG en_US +- breaksw +- endsw +- endif ++ case ja*: ++ case ko*: ++ case si*: ++ case zh*: ++ case ar*: ++ case fa*: ++ case he*: ++ case *_IN*: ++ setenv LANG en_US.UTF-8 ++ breaksw ++ endsw ++ else ++ switch (${LANG}) ++ case en_IN*: ++ breaksw ++ case ja*: ++ case ko*: ++ case si*: ++ case zh*: ++ case ar*: ++ case fa*: ++ case he*: ++ case *_IN*: ++ setenv LANG en_US ++ breaksw ++ endsw ++ endif + +- # NOTE: We are not exporting the ${LANG} here again on purpose. +- # If user starts GUI session from console manually, then +- # the previously set LANG should be okay to use. ++ # NOTE: We are not exporting the ${LANG} here again on purpose. ++ # If user starts GUI session from console manually, then ++ # the previously set LANG should be okay to use. ++ endif + endif + + unset in_console utf8_used diff --git a/SOURCES/setup-2.12.2-nrpe-services.patch b/SOURCES/setup-2.12.2-nrpe-services.patch new file mode 100644 index 0000000..abb45fc --- /dev/null +++ b/SOURCES/setup-2.12.2-nrpe-services.patch @@ -0,0 +1,13 @@ +diff --git a/services b/services +index b9eb06c..470bf86 100644 +--- a/services ++++ b/services +@@ -8828,7 +8828,7 @@ cssc 5637/tcp # Symantec CSSC + flcrs 5638/tcp # Symantec Fingerprint Lookup and Container Reference + ics 5639/tcp # Symantec Integrity Checking + vfmobile 5646/tcp # Ventureforth Mobile +-###UNAUTHORIZED USE: Port 5666 used by SAIC NRPE############ ++nrpe 5666/tcp # Nagios Remote Plugin Executor + filemq 5670/tcp # ZeroMQ file + zre-disc 5670/udp # Local area discovery and msging over ZeroMQ + amqps 5671/tcp # amqp protocol over TLS/SSL diff --git a/SOURCES/setup-2.12.2-pcp-aliases.patch b/SOURCES/setup-2.12.2-pcp-aliases.patch new file mode 100644 index 0000000..1bafc56 --- /dev/null +++ b/SOURCES/setup-2.12.2-pcp-aliases.patch @@ -0,0 +1,12 @@ +diff --git a/aliases b/aliases +index 7f99300..5d7b9e2 100644 +--- a/aliases ++++ b/aliases +@@ -63,6 +63,7 @@ desktop: root + rpcuser: root + rpc: root + nfsnobody: root ++pcp: root + + ingres: root + system: root diff --git a/SOURCES/setup-2.12.2-use-full-path-for-non-builtins.patch b/SOURCES/setup-2.12.2-use-full-path-for-non-builtins.patch new file mode 100644 index 0000000..9a128a1 --- /dev/null +++ b/SOURCES/setup-2.12.2-use-full-path-for-non-builtins.patch @@ -0,0 +1,113 @@ +diff --git a/bashrc b/bashrc +index ddc4699..d19a7c1 100644 +--- a/bashrc ++++ b/bashrc +@@ -71,7 +71,7 @@ if [ -z "$BASHRCSOURCED" ]; then + # Current threshold for system reserved uid/gids is 200 + # You could check uidgid reservation validity in + # /usr/share/doc/setup-*/uidgid file +- if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then ++ if [ $UID -gt 199 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; then + umask 002 + else + umask 022 +diff --git a/csh.cshrc b/csh.cshrc +index d6fae9d..b83d5da 100644 +--- a/csh.cshrc ++++ b/csh.cshrc +@@ -7,7 +7,7 @@ + # Current threshold for system reserved uid/gids is 200 + # You could check uidgid reservation validity in + # /usr/share/doc/setup-*/uidgid file +-if ($uid > 199 && "`id -gn`" == "`id -un`") then ++if ($uid > 199 && "`/usr/bin/id -gn`" == "`/usr/bin/id -un`") then + umask 002 + else + umask 022 +@@ -20,7 +20,7 @@ if ($?prompt) then + # make completion work better by default + set autolist + else +- set prompt=\[$user@`hostname -s`\]\$\ ++ set prompt=\[$user@`/usr/bin/hostname -s`\]\$\ + endif + endif + +diff --git a/lang.csh b/lang.csh +index 695c1bc..94c4625 100644 +--- a/lang.csh ++++ b/lang.csh +@@ -8,7 +8,7 @@ endif + foreach config (/etc/locale.conf "${HOME}/.i18n") + if (-f "${config}") then + # NOTE: We are using eval & sed here to avoid invoking of any commands & functions from those files. +- eval `sed -r -e 's/^[[:blank:]]*([[:upper:]_]+)=([[:print:][:digit:]\._-]+|"[[:print:][:digit:]\._-]+")/setenv \1 \2;/;t;d' ${config}` ++ eval `/usr/bin/sed -r -e 's/^[[:blank:]]*([[:upper:]_]+)=([[:print:][:digit:]\._-]+|"[[:print:][:digit:]\._-]+")/setenv \1 \2;/;t;d' ${config}` + endif + end + +@@ -32,11 +32,11 @@ if (${?LC_ALL}) then + endif + + # The ${LANG} manipulation is necessary only in virtual terminal (a.k.a. console - /dev/tty*): +-set in_console=`tty | grep -vc -e '/dev/tty'` ++set in_console=`/usr/bin/tty | /usr/bin/grep -vc -e '/dev/tty'` + + if (${?LANG} && ${?TERM}) then + if (${TERM} == 'linux' && $in_console == 0) then +- set utf8_used=`echo ${LANG} | grep -vc -E -i -e '^.+\.utf-?8$'` ++ set utf8_used=`echo ${LANG} | /usr/bin/grep -vc -E -i -e '^.+\.utf-?8$'` + + if (${utf8_used} == 0) then + switch (${LANG}) +diff --git a/lang.sh b/lang.sh +index 0252b0f..c9022d0 100644 +--- a/lang.sh ++++ b/lang.sh +@@ -8,7 +8,7 @@ fi + for config in /etc/locale.conf "${HOME}/.i18n"; do + # NOTE: We are using eval & sed here to avoid invoking of any commands & functions from those files. + if [ -f "${config}" ]; then +- eval $(sed -r -e 's/^[[:blank:]]*([[:upper:]_]+)=([[:print:][:digit:]\._-]+|"[[:print:][:digit:]\._-]+")/export \1=\2/;t;d' ${config}) ++ eval $(/usr/bin/sed -r -e 's/^[[:blank:]]*([[:upper:]_]+)=([[:print:][:digit:]\._-]+|"[[:print:][:digit:]\._-]+")/export \1=\2/;t;d' ${config}) + fi + done + +@@ -32,8 +32,8 @@ if [ -n "${LC_ALL}" ]; then + fi + + # The ${LANG} manipulation is necessary only in virtual terminal (a.k.a. console - /dev/tty*): +-if [ -n "${LANG}" ] && [ "${TERM}" = 'linux' ] && tty | grep --quiet -e '/dev/tty'; then +- if grep --quiet -E -i -e '^.+\.utf-?8$' <<< "${LANG}"; then ++if [ -n "${LANG}" ] && [ "${TERM}" = 'linux' ] && /usr/bin/tty | /usr/bin/grep --quiet -e '/dev/tty'; then ++ if /usr/bin/grep --quiet -E -i -e '^.+\.utf-?8$' <<< "${LANG}"; then + case ${LANG} in + ja*) LANG=en_US.UTF-8 ;; + ko*) LANG=en_US.UTF-8 ;; +diff --git a/profile b/profile +index 1feb987..16b2e69 100644 +--- a/profile ++++ b/profile +@@ -25,10 +25,10 @@ pathmunge () { + if [ -x /usr/bin/id ]; then + if [ -z "$EUID" ]; then + # ksh workaround +- EUID=`id -u` +- UID=`id -ru` ++ EUID=`/usr/bin/id -u` ++ UID=`/usr/bin/id -ru` + fi +- USER="`id -un`" ++ USER="`/usr/bin/id -un`" + LOGNAME=$USER + MAIL="/var/spool/mail/$USER" + fi +@@ -56,7 +56,7 @@ export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL + # Current threshold for system reserved uid/gids is 200 + # You could check uidgid reservation validity in + # /usr/share/doc/setup-*/uidgid file +-if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then ++if [ $UID -gt 199 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; then + umask 002 + else + umask 022 diff --git a/SPECS/setup.spec b/SPECS/setup.spec index acd6d95..a9081ef 100644 --- a/SPECS/setup.spec +++ b/SPECS/setup.spec @@ -1,7 +1,7 @@ Summary: A set of system configuration and setup files Name: setup Version: 2.12.2 -Release: 2%{?dist} +Release: 5%{?dist} License: Public Domain Group: System Environment/Base URL: https://pagure.io/setup/ @@ -13,12 +13,27 @@ Requires: system-release Conflicts: filesystem < 3 Conflicts: initscripts < 4.26, bash <= 2.0.4-21 +Patch1: setup-2.12.2-lang.csh-typos.patch +Patch2: setup-2.12.2-pcp-aliases.patch +Patch3: setup-2.12.2-empty-path.patch +Patch4: setup-2.12.2-lang.csh-prevent-grep-from-failing.patch +Patch5: setup-2.12.2-use-full-path-for-non-builtins.patch +Patch6: setup-2.12.2-nrpe-services.patch + %description The setup package contains a set of important system configuration and setup files, such as passwd, group, and profile. %prep %setup -q + +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 + ./shadowconvert.sh %build @@ -100,6 +115,20 @@ end %ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/fstab %changelog +* Wed Oct 30 2019 Martin Osvald - 2.12.2-5 +- rebuilt to fix version + +* Wed Oct 09 2019 Martin Osvald - 2.12.2-3 +- add pcp user to /etc/aliases (#1744089) +- set PATH if it is empty in csh.login (#1744104) +- lang.csh: prevent grep from failing so scripts do not end + prematurely when tcsh -e option in use (#1678706) +- use full path for non-builtins (#1688302) +- add nrpe tcp port 5666 to /etc/services (#1730396) + +* Wed Sep 25 2019 Martin Osvald - 2.12.2-2.1 +- fix lang.csh script so .cshrc gets read again (#1755360) + * Sat Mar 16 2019 Ondrej Vasik - 2.12.2-2 - do not ship /etc/hosts.allow and /etc/hosts.deny (no need for them as we don't allow tcp_wrappers in RHEL8, #1663556)