rpms/coreutils/devel coreutils-colorls.csh, 1.9, 1.10 coreutils-colorls.sh, 1.9, 1.10 coreutils-selinux.patch, 1.40, 1.41 coreutils.spec, 1.194, 1.195

Ondrej Vasik (ovasik) fedora-extras-commits at redhat.com
Mon Feb 18 14:37:39 UTC 2008


Author: ovasik

Update of /cvs/extras/rpms/coreutils/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10589

Modified Files:
	coreutils-colorls.csh coreutils-colorls.sh 
	coreutils-selinux.patch coreutils.spec 
Log Message:
use default security context in install(#319231) + some colorls sh/csh optimalizations(#433189, #433190)


Index: coreutils-colorls.csh
===================================================================
RCS file: /cvs/extras/rpms/coreutils/devel/coreutils-colorls.csh,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- coreutils-colorls.csh	14 Feb 2008 14:43:46 -0000	1.9
+++ coreutils-colorls.csh	18 Feb 2008 14:37:04 -0000	1.10
@@ -40,6 +40,6 @@
 unset color_none
 
 finish:
-alias ll 'ls -l --color=tty'
-alias l. 'ls -d .* --color=tty'
-alias ls 'ls --color=tty'
+alias ll 'ls -l --color=auto'
+alias l. 'ls -d .* --color=auto'
+alias ls 'ls --color=auto'


Index: coreutils-colorls.sh
===================================================================
RCS file: /cvs/extras/rpms/coreutils/devel/coreutils-colorls.sh,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- coreutils-colorls.sh	14 Feb 2008 14:43:46 -0000	1.9
+++ coreutils-colorls.sh	18 Feb 2008 14:37:04 -0000	1.10
@@ -1,25 +1,40 @@
 # color-ls initialization
+
+#do not override user LS_COLORS, but use them.
 if [ -z "$LS_COLORS" ]; then
-  #do not override user LS_COLORS, so perform only for zero sized LS_COLORS
+  
   alias ll='ls -l' 2>/dev/null
   alias l.='ls -d .*' 2>/dev/null
 
-  COLORS=/etc/DIR_COLORS
-  [ -e "/etc/DIR_COLORS.$TERM" ] && COLORS="/etc/DIR_COLORS.$TERM"
-  [ -e "/etc/DIR_COLORS.256color" ] && \
-     [ "`tput colors 2>/dev/null`" == "256" ] && \
-     COLORS="/etc/DIR_COLORS.256color"
-  [ -e "$HOME/.dircolors" ] && COLORS="$HOME/.dircolors"
-  [ -e "$HOME/.dir_colors" ] && COLORS="$HOME/.dir_colors"
-  [ -e "$HOME/.dircolors.$TERM" ] && COLORS="$HOME/.dircolors.$TERM"
-  [ -e "$HOME/.dir_colors.$TERM" ] && COLORS="$HOME/.dir_colors.$TERM"
-  [ -e "$COLORS" ] || return
+
+  # Skip the rest for noninteractive shells.
+  [ -z "$PS1" ] && return
+
+  COLORS=
+
+  for colors in "$HOME/.dir_colors.$TERM" "$HOME/.dircolors.$TERM" \
+      "$HOME/.dir_colors" "$HOME/.dircolors"; do
+    [ -e "$colors" ] && COLORS="$colors" && break
+  done
+
+  [ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS.256color" ] && \
+      [ "`tput colors 2>/dev/null`" == "256" ] && \
+      COLORS="/etc/DIR_COLORS.256color"
+
+  if [ -z "$COLORS" ]; then
+    for colors in "/etc/DIR_COLORS.$TERM" "/etc/DIR_COLORS" ; do
+      [ -e "$colors" ] && COLORS="$colors" && break
+    done
+  fi
+
+  # Existence of $COLORS already checked above.
+  [ -n "$COLORS" ] || return
 
   eval `dircolors --sh "$COLORS" 2>/dev/null`
   [ -z "$LS_COLORS" ] && return
   egrep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null && return
 fi
 
-alias ll='ls -l --color=tty' 2>/dev/null
-alias l.='ls -d .* --color=tty' 2>/dev/null
-alias ls='ls --color=tty' 2>/dev/null
+alias ll='ls -l --color=auto' 2>/dev/null
+alias l.='ls -d .* --color=auto' 2>/dev/null
+alias ls='ls --color=auto' 2>/dev/null

coreutils-selinux.patch:

Index: coreutils-selinux.patch
===================================================================
RCS file: /cvs/extras/rpms/coreutils/devel/coreutils-selinux.patch,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- coreutils-selinux.patch	7 Feb 2008 15:10:39 -0000	1.40
+++ coreutils-selinux.patch	18 Feb 2008 14:37:04 -0000	1.41
@@ -489,6 +489,37 @@
    x->recursive = false;
    x->sparse_mode = SPARSE_AUTO;
    x->symbolic_link = false;
+@@ -199,7 +199,6 @@ cp_option_init (struct cp_options *x)
+   x->src_info = NULL;
+ }
+ 
+-#ifdef ENABLE_WHEN_MATCHPATHCON_IS_MORE_EFFICIENT
+ /* Modify file context to match the specified policy.
+    If an error occurs the file will remain with the default directory
+    context.  */
+@@ -266,13 +265,6 @@ setdefaultfilecon (char const *file)
+   freecon (scontext);
+   return;
+ }
+-#else
+-static void
+-setdefaultfilecon (char const *file)
+-{
+-  (void) file;
+-}
+-#endif
+ 
+ /* FILE is the last operand of this command.  Return true if FILE is a
+    directory.  But report an error there is a problem accessing FILE,
+@@ -346,7 +338,7 @@ main (int argc, char **argv)
+      we'll actually use backup_suffix_string.  */
+   backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
+ 
+-  while ((optc = getopt_long (argc, argv, "bcsDdg:m:o:pt:TvS:Z:", long_options,
++  while ((optc = getopt_long (argc, argv, "bcsDdg:m:o:pPt:TvS:Z:", long_options,
+ 			      NULL)) != -1)
+     {
+       switch (optc)
 @@ -408,6 +409,7 @@ main (int argc, char **argv)
  	  no_target_directory = true;
  	  break;


Index: coreutils.spec
===================================================================
RCS file: /cvs/extras/rpms/coreutils/devel/coreutils.spec,v
retrieving revision 1.194
retrieving revision 1.195
diff -u -r1.194 -r1.195
--- coreutils.spec	11 Feb 2008 14:46:16 -0000	1.194
+++ coreutils.spec	18 Feb 2008 14:37:04 -0000	1.195
@@ -1,7 +1,7 @@
 Summary: The GNU core utilities: a set of tools commonly used in shell scripts
 Name:    coreutils
 Version: 6.10
-Release: 7%{?dist}
+Release: 8%{?dist}
 License: GPLv3+
 Group:   System Environment/Base
 Url:     http://www.gnu.org/software/coreutils/
@@ -291,6 +291,12 @@
 /sbin/runuser
 
 %changelog
+* Mon Feb 18 2008 Ondrej Vasik <ovasik at redhat.com> - 6.10-8
+- use default security context in install - broken by 
+  coreutils-6.10 update(#319231)
+- some sh/csh scripts optimalizations(by ville.skytta at iki.fi,
+  - #433189, #433190)
+
 * Mon Feb 11 2008 Ondrej Vasik <ovasik at redhat.com> - 6.10-7
 - keep old csh/sh usermodified colorls shell scripts
   but use the new ones(#432154)




More information about the fedora-extras-commits mailing list