rpms/coreutils/F-11 coreutils-silentmv.patch, NONE, 1.1 coreutils-i18n.patch, 1.33, 1.34 coreutils.spec, 1.257, 1.258

Ondrej Vasik ovasik at fedoraproject.org
Wed Jul 8 14:44:11 UTC 2009


Author: ovasik

Update of /cvs/extras/rpms/coreutils/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16788

Modified Files:
	coreutils-i18n.patch coreutils.spec 
Added Files:
	coreutils-silentmv.patch 
Log Message:
cumulative F-11 coreutils update - fixes for multibyte patch and selinux/xattr support

coreutils-silentmv.patch:

--- NEW FILE coreutils-silentmv.patch ---
diff -urNp coreutils-7.2-orig/src/copy.c coreutils-7.2/src/copy.c
--- coreutils-7.2-orig/src/copy.c	2009-07-08 16:21:46.000000000 +0200
+++ coreutils-7.2/src/copy.c	2009-07-08 16:31:43.000000000 +0200
@@ -139,6 +139,22 @@ copy_attr_error (struct error_context *c
   int err = errno;
   va_list ap;
 
+  if (errno != ENOTSUP && errno != ENODATA)
+    {
+      /* use verror module to print error message */
+      va_start (ap, fmt);
+      verror (0, err, fmt, ap);
+      va_end (ap);
+    }
+}
+
+static void
+copy_attr_allerror (struct error_context *ctx ATTRIBUTE_UNUSED,
+		 char const *fmt, ...)
+{
+  int err = errno;
+  va_list ap;
+
   /* use verror module to print error message */
   va_start (ap, fmt);
   verror (0, err, fmt, ap);
@@ -163,12 +179,13 @@ copy_attr_by_fd (char const *src_path, i
 {
   struct error_context ctx =
   {
-    .error = copy_attr_error,
+    .error = x->require_preserve_xattr ? copy_attr_allerror : copy_attr_error,
     .quote = copy_attr_quote,
     .quote_free = copy_attr_free
   };
   return 0 == attr_copy_fd (src_path, src_fd, dst_path, dst_fd, 0,
-                            x->reduce_diagnostics ? NULL : &ctx);
+                            (x->reduce_diagnostics
+                             && !x->require_preserve_xattr) ? NULL : &ctx);
 }
 
 static bool
@@ -177,12 +194,13 @@ copy_attr_by_name (char const *src_path,
 {
   struct error_context ctx =
   {
-    .error = copy_attr_error,
+    .error = x->require_preserve_xattr ? copy_attr_allerror : copy_attr_error,
     .quote = copy_attr_quote,
     .quote_free = copy_attr_free
   };
   return 0 == attr_copy_file (src_path, dst_path, 0,
-                              x-> reduce_diagnostics ? NULL :&ctx);
+                              (x-> reduce_diagnostics
+                               && !x->require_preserve_xattr) ? NULL :&ctx);
 }
 #else /* USE_XATTR */
 
@@ -465,7 +483,7 @@ copy_reg (char const *src_name, char con
 	  security_context_t con = NULL;
 	  if (getfscreatecon (&con) < 0)
 	    {
-	      if (!x->reduce_diagnostics)
+	      if (!x->reduce_diagnostics || x->require_preserve_context)
 	        error (0, errno, _("failed to get file system create context"));
 	      if (x->require_preserve_context)
 		{
@@ -478,7 +496,7 @@ copy_reg (char const *src_name, char con
 	    {
 	      if (fsetfilecon (dest_desc, con) < 0)
 		{
-		  if (!x->reduce_diagnostics)
+		  if (!x->reduce_diagnostics || x->require_preserve_context)
 		    error (0, errno,
 			   _("failed to set the security context of %s to %s"),
 			   quote_n (0, dst_name), quote_n (1, con));
@@ -1731,7 +1749,7 @@ copy_internal (char const *src_name, cha
 	{
 	  if (setfscreatecon (con) < 0)
 	    {
-	      if (!x->reduce_diagnostics)
+	      if (!x->reduce_diagnostics || x->require_preserve_context)
 	        error (0, errno,
 		       _("failed to set default file creation context to %s"),
 		       quote (con));
@@ -1745,9 +1763,9 @@ copy_internal (char const *src_name, cha
 	}
       else
 	{
-	  if (errno != ENOTSUP && errno != ENODATA)
+	  if ((errno != ENOTSUP && errno != ENODATA) || x->require_preserve_context)
 	    {
-	      if (!x->reduce_diagnostics)
+	      if (!x->reduce_diagnostics || x->require_preserve_context)
 	        error (0, errno,
 		       _("failed to get security context of %s"),
 		       quote (src_name));

coreutils-i18n.patch:

Index: coreutils-i18n.patch
===================================================================
RCS file: /cvs/extras/rpms/coreutils/F-11/coreutils-i18n.patch,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -p -r1.33 -r1.34
--- coreutils-i18n.patch	1 Apr 2009 11:14:30 -0000	1.33
+++ coreutils-i18n.patch	8 Jul 2009 14:44:10 -0000	1.34
@@ -433,7 +433,7 @@ diff -urN coreutils-6.12-orig/tests/Make
 +
 +  memset (&state, 0, sizeof (mbstate_t));
 +
-+  if (ptr == lim)
++  if (ptr >= lim)
 +    return;
 +
 +  if (tab != NULL)
@@ -464,7 +464,7 @@ diff -urN coreutils-6.12-orig/tests/Make
 +		}
 +	    }
 +
-+	  if (sep == lim)
++	  if (sep >= lim)
 +	    break;
 +
 +	  extract_field (line, ptr, sep - ptr);
@@ -505,7 +505,7 @@ diff -urN coreutils-6.12-orig/tests/Make
 +	  mblength = (mblength < 1) ? 1 : mblength;
 +
 +	  sep = ptr + mblength;
-+	  while (sep != lim)
++	  while (sep < lim)
 +	    {
 +	      state_bak = state;
 +	      mblength = mbrtowc (&wc, sep, lim - sep + 1, &state);
@@ -524,7 +524,7 @@ diff -urN coreutils-6.12-orig/tests/Make
 +	    }
 +
 +	  extract_field (line, ptr, sep - ptr);
-+	  if (sep == lim)
++	  if (sep >= lim)
 +	    return;
 +
 +	  state_bak = state;
@@ -538,7 +538,7 @@ diff -urN coreutils-6.12-orig/tests/Make
 +	  mblength = (mblength < 1) ? 1 : mblength;
 +
 +	  ptr = sep + mblength;
-+	  while (ptr != lim)
++	  while (ptr < lim)
 +	    {
 +	      state_bak = state;
 +	      mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state);
@@ -556,7 +556,7 @@ diff -urN coreutils-6.12-orig/tests/Make
 +	      ptr += mblength;
 +	    }
 +	}
-+      while (ptr != lim);
++      while (ptr < lim);
 +    }
 +
 +  extract_field (line, ptr, lim - ptr);
@@ -2204,7 +2204,7 @@ diff -urNp coreutils-6.11-orig/src/join.
  {
    struct keyfield const *key = keylist;
  
-@@ -1875,6 +2265,179 @@
+@@ -1875,6 +2265,181 @@
    return key->reverse ? -diff : diff;
  }
  
@@ -2254,6 +2254,8 @@ diff -urNp coreutils-6.11-orig/src/join.
 +		(texta, textb));
 +	  *lima = savea, *limb = saveb;
 +	}
++      else if (key->version)
++	diff = compare_version (texta, lena, textb, lenb);
 +      else if (key->month)
 +	diff = getmonth (texta, lena) - getmonth (textb, lenb);
 +      else
@@ -2384,7 +2386,7 @@ diff -urNp coreutils-6.11-orig/src/join.
  /* Compare two lines A and B, returning negative, zero, or positive
     depending on whether A compares less than, equal to, or greater than B. */
 
-@@ -2744,7 +3305,7 @@
+@@ -2744,7 +3307,7 @@
    initialize_exit_failure (SORT_FAILURE);
  
    hard_LC_COLLATE = hard_locale (LC_COLLATE);
@@ -2393,7 +2395,7 @@ diff -urNp coreutils-6.11-orig/src/join.
    hard_LC_TIME = hard_locale (LC_TIME);
  #endif
  
-@@ -2765,6 +3326,27 @@
+@@ -2765,6 +3328,27 @@
        thousands_sep = -1;
    }
  
@@ -2421,7 +2423,7 @@ diff -urNp coreutils-6.11-orig/src/join.
    have_read_stdin = false;
    inittables ();
  
-@@ -3015,13 +3597,35 @@
+@@ -3015,13 +3599,35 @@
  
  	case 't':
  	  {
@@ -2461,7 +2463,7 @@ diff -urNp coreutils-6.11-orig/src/join.
  		else
  		  {
  		    /* Provoke with `sort -txx'.  Complain about
-@@ -3032,9 +3636,12 @@
+@@ -3032,9 +3638,12 @@
  			   quote (optarg));
  		  }
  	      }


Index: coreutils.spec
===================================================================
RCS file: /cvs/extras/rpms/coreutils/F-11/coreutils.spec,v
retrieving revision 1.257
retrieving revision 1.258
diff -u -p -r1.257 -r1.258
--- coreutils.spec	1 Apr 2009 11:14:30 -0000	1.257
+++ coreutils.spec	8 Jul 2009 14:44:11 -0000	1.258
@@ -1,7 +1,7 @@
 Summary: A set of basic GNU tools commonly used in shell scripts
 Name:    coreutils
 Version: 7.2
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv3+
 Group:   System Environment/Base
 Url:     http://www.gnu.org/software/coreutils/
@@ -23,6 +23,7 @@ Source203:  coreutils-runuser-l.pamd
 # Our patches
 Patch100: coreutils-6.10-configuration.patch
 Patch101: coreutils-6.10-manpages.patch
+Patch102: coreutils-silentmv.patch
 
 # sh-utils
 Patch703: sh-utils-2.0.11-dateman.patch
@@ -102,6 +103,7 @@ the old GNU fileutils, sh-utils, and tex
 # Our patches
 %patch100 -p1 -b .configure
 %patch101 -p1 -b .manpages
+%patch102 -p1 -b .silentmv
 
 # sh-utils
 %patch703 -p1 -b .dateman
@@ -309,6 +311,16 @@ fi
 /sbin/runuser
 
 %changelog
+* Wed Jul 09 2009 Ondrej Vasik <ovasik at redhat.com> 7.2-2
+- do not ignore sort's version sort for multibyte locales
+  (#509688)
+- fix segfaults in join (i18n patch) when using multibyte
+  locales(#497368)
+- make mv xattr support failures silent (as is done for
+  cp -a) - #496142
+- do not silence xattr/selinux failures when preserving
+  those attributes is required
+
 * Tue Mar 31 2009 Ondrej Vasik <ovasik at redhat.com> 7.2-1
 - New upstream bugfix release 7.2
 - removed applied patches




More information about the fedora-extras-commits mailing list