rpms/deltarpm/FC-6 deltarpm-3.4-multilib-include-colored.patch, NONE, 1.1 deltarpm.spec, 1.6, 1.7

Jonathan Dieter (jdieter) fedora-extras-commits at redhat.com
Wed Jul 11 14:18:36 UTC 2007


Author: jdieter

Update of /cvs/extras/rpms/deltarpm/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29579

Modified Files:
	deltarpm.spec 
Added Files:
	deltarpm-3.4-multilib-include-colored.patch 
Log Message:
Deal with colored files correctly for multilib


deltarpm-3.4-multilib-include-colored.patch:

--- NEW FILE deltarpm-3.4-multilib-include-colored.patch ---
diff -ur deltarpm-3.4/makedeltarpm.c deltarpm/makedeltarpm.c
--- deltarpm-3.4/makedeltarpm.c	2007-03-06 08:35:55.000000000 -0500
+++ deltarpm/makedeltarpm.c	2007-05-30 11:43:19.000000000 -0400
@@ -413,6 +413,21 @@
     }
 }
 
+static int 
+in_multilib_dir(char *fn)
+{
+  char *dirs[] = { "lib/", "lib64/", "lib32/", NULL };
+  int i;
+
+  for (i=0; dirs[i] != NULL; i++)
+    {
+      if (strstr(fn, dirs[i]) != NULL)
+	return 1;
+    }
+
+  return 0;
+}
+
 int
 main(int argc, char **argv)
 {
@@ -422,7 +437,7 @@
   char *nevr;
   int filecnt;
   char **filenames, **filemd5s, **filelinktos;
-  unsigned int *fileflags, *filemodes, *filerdevs, *filesizes, *fileverify;
+  unsigned int *fileflags, *filemodes, *filerdevs, *filesizes, *fileverify, *filecolors;
   int i, fd, l, l2, l3;
   struct cfile *bfd;
   struct cpiophys cph;
@@ -439,6 +454,7 @@
   int skipped_badsize = 0;
   int skipped_fileflags = 0;
   int skipped_verifyflags = 0;
+  int skipped_multilib = 0;
   int skipped_all = 0;
   int pinfo = 0;
   struct rpmlfile *files1 = 0;
@@ -735,6 +751,7 @@
   filemodes = headint16(h, TAG_FILEMODES, (int *)0);
   fileverify = headint32(h, TAG_FILEVERIFY, (int *)0);
   filelinktos = headstringarray(h, TAG_FILELINKTOS, (int *)0);
+  filecolors = headint32(h, TAG_FILECOLORS, (int *)0);
 
   if (alone)
     {
@@ -893,6 +910,12 @@
 		    fprintf(vfp, "skipping %s: bad verify flags %x\n", np, fileverify[i]);
 		  skipped_verifyflags++;
 		}
+	      else if (filecolors && (filecolors[i] & (RPMFC_ELF32 | RPMFC_ELF64)) != 0 && !in_multilib_dir(np))
+		{
+		  if (verbose > 1)
+		    fprintf(vfp, "skipping %s: colored file in non-multilib dir\n", np);
+		  skipped_multilib++;
+		}
 	      else
 		{
 		  if (verbose > 1)
@@ -1049,6 +1072,8 @@
 	    fprintf(vfp, "  file flags:   %4d/%d = %.1f%%\n", skipped_fileflags, skipped_all, skipped_fileflags * 100. / skipped_all);
 	  if (skipped_verifyflags)
 	    fprintf(vfp, "  verify flags: %4d/%d = %.1f%%\n", skipped_verifyflags, skipped_all, skipped_verifyflags * 100. / skipped_all);
+	  if (skipped_multilib)
+	    fprintf(vfp, "  colored-not-in-multidir: %4d/%d = %.1f%%\n", skipped_multilib, skipped_all, skipped_multilib * 100. / skipped_all);
 	}
       addtoseq(-1);
       if (verbose > 1)
@@ -1073,6 +1098,7 @@
   fileverify = xfree(fileverify);
   filelinktos = xfree(filelinktos);
   filenames = xfree(filenames);
+  filecolors = xfree(filecolors);
   if (!alone)
     h = xfree(h);
 
diff -ur deltarpm-3.4/Makefile deltarpm/Makefile
--- deltarpm-3.4/Makefile	2007-03-06 08:35:55.000000000 -0500
+++ deltarpm/Makefile	2007-05-30 11:14:31.000000000 -0400
@@ -3,7 +3,7 @@
 mandir=$(prefix)/man
 rpmdumpheader=$(bindir)/rpmdumpheader
 zlibdir=zlib-1.2.2.f-rsyncable
-CFLAGS = -O2 -Wall
+CFLAGS = -O2 -Wall -g
 CPPFLAGS = -DDELTARPM_64BIT -DBSDIFF_NO_SUF -DRPMDUMPHEADER=\"$(rpmdumpheader)\" -I$(zlibdir)
 LDLIBS = -lbz2 $(zlibdir)/libz.a
 LDFLAGS =
diff -ur deltarpm-3.4/rpmhead.h deltarpm/rpmhead.h
--- deltarpm-3.4/rpmhead.h	2007-03-06 08:35:55.000000000 -0500
+++ deltarpm/rpmhead.h	2007-05-30 11:14:31.000000000 -0400
@@ -27,6 +27,7 @@
 #define TAG_DIRNAMES    1118
 #define TAG_PAYLOADFORMAT 1124
 #define TAG_PAYLOADCOMPRESSOR 1125
+#define TAG_FILECOLORS  1140
 
 #define SIGTAG_SIZE     1000
 #define SIGTAG_MD5      1004
@@ -42,6 +43,9 @@
 #define VERIFY_MD5      (1 << 0)
 #define VERIFY_FILESIZE (1 << 1)
 
+#define RPMFC_ELF32     (1 << 0)
+#define RPMFC_ELF64     (1 << 1)
+
 #define devmajor(rdev) (((rdev) >> 8) & 0xfff)
 #define devminor(rdev) (((rdev) & 0xff) | (((rdev) >> 12) & 0xfff00))
 


Index: deltarpm.spec
===================================================================
RCS file: /cvs/extras/rpms/deltarpm/FC-6/deltarpm.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- deltarpm.spec	7 Jun 2007 18:09:04 -0000	1.6
+++ deltarpm.spec	11 Jul 2007 14:18:03 -0000	1.7
@@ -1,7 +1,7 @@
 Summary: Create deltas between rpms
 Name: deltarpm
 Version: 3.4
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: BSD
 Group: System Environment/Base
 URL: http://www.novell.com/products/linuxpackages/professional/deltarpm.html
@@ -12,6 +12,7 @@
 BuildRequires: bzip2-devel, rpm-devel
 
 Patch0: deltarpm-3.4-multilib-workaround.patch
+Patch1: deltarpm-3.4-multilib-include-colored.patch
 
 %description
 A deltarpm contains the difference between an old
@@ -23,6 +24,7 @@
 %prep
 %setup -q
 %patch0 -p0 -b .multilib
+%patch1 -p1 -b .multicolor
 
 %build
 %{__make} %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" \
@@ -49,6 +51,10 @@
 %{_bindir}/rpmdumpheader
 
 %changelog
+* Tue Jun  5 2007 Jeremy Katz <katzj at redhat.com> - 3.4-3
+- include colored binaries from non-multilib-dirs so that deltas can work 
+  on multilib platforms
+
 * Wed May 09 2007 Adam Jackson <ajax at redhat.com> 3.4-2
 - Add -a flag to work around multilib ignorance. (#238964)
 




More information about the scm-commits mailing list