rpms/setup/F-12 setup-2.8.9-changes.patch, NONE, 1.1 setup.spec, 1.85, 1.86

Ondrej Vasik ovasik at fedoraproject.org
Fri Apr 16 10:55:43 UTC 2010


Author: ovasik

Update of /cvs/pkgs/rpms/setup/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv13642

Modified Files:
	setup.spec 
Added Files:
	setup-2.8.9-changes.patch 
Log Message:
Selective cumulative update from rawhide

setup-2.8.9-changes.patch:
 bashrc    |    3 ++-
 csh.login |   10 ++++------
 profile   |   22 +++++++++++-----------
 3 files changed, 17 insertions(+), 18 deletions(-)

--- NEW FILE setup-2.8.9-changes.patch ---
diff -urNp setup-2.8.9-orig/bashrc setup-2.8.9/bashrc
--- setup-2.8.9-orig/bashrc	2009-09-08 08:55:46.000000000 +0200
+++ setup-2.8.9/bashrc	2010-03-31 12:56:44.000000000 +0200
@@ -54,8 +54,9 @@ fi
 
 if ! shopt -q login_shell ; then # We're not a login shell
     # Need to redefine pathmunge, it get's undefined at the end of /etc/profile
+    # Ok to use faster bashism here as /etc/bashrc is used only by bash
     pathmunge () {
-        if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
+        if [[ ! "$PATH" =~ "(^|:)$1(:|$)" ]];then
             if [ "$2" = "after" ] ; then
                 PATH=$PATH:$1
             else
diff -urNp setup-2.8.9-orig/csh.login setup-2.8.9/csh.login
--- setup-2.8.9-orig/csh.login	2009-09-08 08:55:46.000000000 +0200
+++ setup-2.8.9/csh.login	2010-03-31 12:56:44.000000000 +0200
@@ -2,15 +2,13 @@
 
 # System wide environment and startup programs, for login setup
 
-if ($?PATH) then
-	if ( "${path}" !~ */usr/X11R6/bin* ) then
-		setenv PATH "${PATH}:/usr/X11R6/bin"
-        endif
+if ( $?PATH ) then
+  #do not override user specified PATH
 else
 	if ( $uid == 0 ) then
-		setenv PATH "/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"
+		setenv PATH "/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin"
 	else
-		setenv PATH "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/X11R6/bin"
+		setenv PATH "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin"
 	endif
 endif
 
diff -urNp setup-2.8.9-orig/profile setup-2.8.9/profile
--- setup-2.8.9-orig/profile	2009-09-08 08:55:46.000000000 +0200
+++ setup-2.8.9/profile	2010-03-31 12:56:44.000000000 +0200
@@ -9,7 +9,7 @@
 # prevent need for merging in future updates.
 
 pathmunge () {
-    if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
+    if ! echo $PATH | /bin/grep -qE "(^|:)$1($|:)" ; then
        if [ "$2" = "after" ] ; then
           PATH=$PATH:$1
        else
@@ -18,10 +18,16 @@ pathmunge () {
     fi
 }
 
-# ksh workaround
-if [ -z "$EUID" -a -x /usr/bin/id ]; then
-    EUID=`id -u`
-    UID=`id -ru`
+
+if [ -x /usr/bin/id ]; then
+    if [ -z "$EUID" ]; then
+        # ksh workaround
+        EUID=`id -u`
+        UID=`id -ru`
+    fi
+    USER="`id -un`"
+    LOGNAME=$USER
+    MAIL="/var/spool/mail/$USER"
 fi
 
 # Path manipulation
@@ -35,12 +41,6 @@ else
     pathmunge /sbin after
 fi
 
-if [ -x /usr/bin/id ]; then
-    USER="`id -un`"
-    LOGNAME=$USER
-    MAIL="/var/spool/mail/$USER"
-fi
-
 HOSTNAME=`/bin/hostname 2>/dev/null`
 HISTSIZE=1000
 HISTCONTROL="ignoreboth"


Index: setup.spec
===================================================================
RCS file: /cvs/pkgs/rpms/setup/F-12/setup.spec,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -p -r1.85 -r1.86
--- setup.spec	8 Sep 2009 07:02:07 -0000	1.85
+++ setup.spec	16 Apr 2010 10:55:43 -0000	1.86
@@ -1,11 +1,12 @@
 Summary: A set of system configuration and setup files
 Name: setup
 Version: 2.8.9
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: Public Domain
 Group: System Environment/Base
 URL: https://fedorahosted.org/setup/
 Source0: https://fedorahosted.org/releases/s/e/%{name}/%{name}-%{version}.tar.bz2
+Patch1: setup-2.8.9-changes.patch
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
 BuildRequires: bash tcsh perl
@@ -17,6 +18,7 @@ setup files, such as passwd, group, and 
 
 %prep
 %setup -q
+%patch1 -p1
 ./shadowconvert.sh
 
 %build
@@ -64,21 +66,21 @@ end
 %verify(not md5 size mtime) %config(noreplace) /etc/group
 %verify(not md5 size mtime) %attr(0000,root,root) %config(noreplace,missingok) /etc/shadow
 %verify(not md5 size mtime) %attr(0000,root,root) %config(noreplace,missingok) /etc/gshadow
-%verify(not md5 size mtime) %config(noreplace) /etc/services
+%config(noreplace) /etc/services
 %verify(not md5 size mtime) %config(noreplace) /etc/exports
 %config(noreplace) /etc/aliases
 %config(noreplace) /etc/environment
 %config(noreplace) /etc/filesystems
 %config(noreplace) /etc/host.conf
 %verify(not md5 size mtime) %config(noreplace) /etc/hosts
-%verify(not md5 size mtime) %config(noreplace) /etc/hosts.allow
-%verify(not md5 size mtime) %config(noreplace) /etc/hosts.deny
+%config(noreplace) /etc/hosts.allow
+%config(noreplace) /etc/hosts.deny
 %verify(not md5 size mtime) %config(noreplace) /etc/motd
 %config(noreplace) /etc/printcap
 %verify(not md5 size mtime) %config(noreplace) /etc/inputrc
 %config(noreplace) /etc/bashrc
 %config(noreplace) /etc/profile
-%verify(not md5 size mtime) %config(noreplace) /etc/protocols
+%config(noreplace) /etc/protocols
 %attr(0600,root,root) %config(noreplace,missingok) /etc/securetty
 %config(noreplace) /etc/csh.login
 %config(noreplace) /etc/csh.cshrc
@@ -89,6 +91,17 @@ end
 %ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab
 
 %changelog
+* Fri Apr 16 2010 Ondrej Vasik <ovasik at redhat.com> 2.8.9-2
+- avoid one /usr/bin/id stat call in /etc/profile(#549056)
+- speed up pathmunge inside bashrc (#544652)
+- do not use deprecated egrep in profile
+- drop X11R6 hierarchy dir from tcsh path (#576940)
+- verify md5sum/size/mtime in the case of /etc/hosts.allow
+  and /etc/hosts.deny (#578263)
+- do the same for /etc/services and /etc/protocols, we
+  provide (almost) complete IANA set, so no reason to modify
+  it in most cases outside of setup package
+
 * Tue Sep 08 2009 Ondrej Vasik <ovasik at redhat.com> 2.8.9-1
 - reserve uidgid pair 108:108 for ovirt from libvirt (#513261)
 - reserve uidgid pair 111:111 for saned from sane-backends



More information about the scm-commits mailing list