rpms/cpdup/EL-5 cpdup-1.11-explicit_sizes.patch, NONE, 1.1 cpdup-1.11-unused.patch, NONE, 1.1 Makefile.linux, 1.1, 1.2 cpdup.spec, 1.2, 1.3

Michel Alexandre Salim (salimma) fedora-extras-commits at redhat.com
Wed Jun 11 20:47:37 UTC 2008


Author: salimma

Update of /cvs/pkgs/rpms/cpdup/EL-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13089/EL-5

Modified Files:
	Makefile.linux cpdup.spec 
Added Files:
	cpdup-1.11-explicit_sizes.patch cpdup-1.11-unused.patch 
Log Message:
Fix builds on 64-bit archs (bz #435508)


cpdup-1.11-explicit_sizes.patch:

--- NEW FILE cpdup-1.11-explicit_sizes.patch ---
--- cpdup-1.11/hcproto.c.explicit_sizes	2008-05-22 19:34:41.000000000 -0400
+++ cpdup-1.11/hcproto.c	2008-06-11 14:40:46.000000000 -0400
@@ -336,7 +336,7 @@
     struct HCHead *head;
     struct HCLeaf *item;
     struct dirent *den;
-    int desc = 0;
+    size_t desc = 0;
 
     if (hc == NULL || hc->host == NULL)
 	return(opendir(path));
@@ -355,7 +355,7 @@
 	}
     }
     if (hcc_get_descriptor(hc, desc, HC_DESC_DIR)) {
-	fprintf(stderr, "hc_opendir: remote reused active descriptor %d\n",
+	fprintf(stderr, "hc_opendir: remote reused active descriptor %zd\n",
 		desc);
 	return(NULL);
     }
@@ -406,12 +406,12 @@
 	return(readdir(dir));
 
     trans = hcc_start_command(hc, HC_READDIR);
-    hcc_leaf_int32(trans, LC_DESCRIPTOR, (int)dir);
+    hcc_leaf_int32(trans, LC_DESCRIPTOR, (size_t)dir);
     if ((head = hcc_finish_command(trans)) == NULL)
 	return(NULL);
     if (head->error)
 	return(NULL);	/* XXX errno */
-    den = hcc_get_descriptor(hc, (int)dir, HC_DESC_DIR);
+    den = hcc_get_descriptor(hc, (size_t)dir, HC_DESC_DIR);
     if (den == NULL)
 	return(NULL);	/* XXX errno */
     if (den->d_name)
@@ -476,13 +476,13 @@
 
     if (hc == NULL || hc->host == NULL)
 	return(closedir(dir));
-    den = hcc_get_descriptor(hc, (int)dir, HC_DESC_DIR);
+    den = hcc_get_descriptor(hc, (size_t)dir, HC_DESC_DIR);
     if (den) {
 	free(den);
-	hcc_set_descriptor(hc, (int)dir, NULL, HC_DESC_DIR);
+	hcc_set_descriptor(hc, (size_t)dir, NULL, HC_DESC_DIR);
 
 	trans = hcc_start_command(hc, HC_CLOSEDIR);
-	hcc_leaf_int32(trans, LC_DESCRIPTOR, (int)dir);
+	hcc_leaf_int32(trans, LC_DESCRIPTOR, (size_t)dir);
 	if ((head = hcc_finish_command(trans)) == NULL)
 	    return(-1);
 	if (head->error)
--- cpdup-1.11/cpdup.c.explicit_sizes	2008-05-24 13:21:36.000000000 -0400
+++ cpdup-1.11/cpdup.c	2008-06-11 14:49:59.000000000 -0400
@@ -304,7 +304,7 @@
      * make any required connections.
      */
     if (src && (ptr = strchr(src, ':')) != NULL) {
-	asprintf(&SrcHost.host, "%*.*s", ptr - src, ptr - src, src);
+	asprintf(&SrcHost.host, "%*.*s", (int)(ptr - src), (int)(ptr - src), src);
 	src = ptr + 1;
 	if (UseCpFile) {
 	    fprintf(stderr, "The cpignore options are not currently supported for remote sources\n");
@@ -318,7 +318,7 @@
 	    exit(1);
     }
     if (dst && (ptr = strchr(dst, ':')) != NULL) {
-	asprintf(&DstHost.host, "%*.*s", ptr - dst, ptr - dst, dst);
+	asprintf(&DstHost.host, "%*.*s", (int)(ptr - dst), (int)(ptr - dst), dst);
 	dst = ptr + 1;
 	if (UseFSMIDOpt) {
 	    fprintf(stderr, "The FSMID options are not currently supported for remote targets\n");
--- cpdup-1.11/fsmid.c.explicit_sizes	2008-05-22 19:05:08.000000000 -0400
+++ cpdup-1.11/fsmid.c	2008-06-11 15:07:50.000000000 -0400
@@ -35,8 +35,8 @@
 
 	    for (node = FSMIDBase; node; node = node->fid_Next) {
 		if (node->fid_Accessed && node->fid_Code) {
-		    fprintf(fo, "%016llx %d %s\n", 
-			node->fid_Code, 
+		    fprintf(fo, "%016llx %zd %s\n", 
+			(long long unsigned)node->fid_Code, 
 			strlen(node->fid_Name),
 			node->fid_Name
 		    );

cpdup-1.11-unused.patch:

--- NEW FILE cpdup-1.11-unused.patch ---
--- cpdup-1.11/hcproto.c.unused	2008-06-11 15:08:19.000000000 -0400
+++ cpdup-1.11/hcproto.c	2008-06-11 15:44:51.000000000 -0400
@@ -143,7 +143,7 @@
 }
 
 static int
-rc_hello(hctransaction_t trans, struct HCHead *head __unused)
+rc_hello(hctransaction_t trans, struct HCHead *head __cpdup_unused)
 {
     char hostbuf[256];
 
@@ -879,7 +879,7 @@
 }
 
 static int
-rc_remove(hctransaction_t trans __unused, struct HCHead *head)
+rc_remove(hctransaction_t trans __cpdup_unused, struct HCHead *head)
 {
     struct HCLeaf *item;
     const char *path = NULL;
@@ -900,7 +900,7 @@
  * MKDIR
  */
 int
-hc_mkdir(struct HostConf *hc __unused, const char *path, mode_t mode)
+hc_mkdir(struct HostConf *hc __cpdup_unused, const char *path, mode_t mode)
 {
     hctransaction_t trans;
     struct HCHead *head;
@@ -919,7 +919,7 @@
 }
 
 static int
-rc_mkdir(hctransaction_t trans __unused, struct HCHead *head)
+rc_mkdir(hctransaction_t trans __cpdup_unused, struct HCHead *head)
 {
     struct HCLeaf *item;
     const char *path = NULL;
@@ -962,7 +962,7 @@
 }
 
 static int
-rc_rmdir(hctransaction_t trans __unused, struct HCHead *head)
+rc_rmdir(hctransaction_t trans __cpdup_unused, struct HCHead *head)
 {
     struct HCLeaf *item;
     const char *path = NULL;
@@ -1003,7 +1003,7 @@
 }
 
 static int
-rc_chown(hctransaction_t trans __unused, struct HCHead *head)
+rc_chown(hctransaction_t trans __cpdup_unused, struct HCHead *head)
 {
     struct HCLeaf *item;
     const char *path = NULL;
@@ -1052,7 +1052,7 @@
 }
 
 static int
-rc_lchown(hctransaction_t trans __unused, struct HCHead *head)
+rc_lchown(hctransaction_t trans __cpdup_unused, struct HCHead *head)
 {
     struct HCLeaf *item;
     const char *path = NULL;
@@ -1100,7 +1100,7 @@
 }
 
 static int
-rc_chmod(hctransaction_t trans __unused, struct HCHead *head)
+rc_chmod(hctransaction_t trans __cpdup_unused, struct HCHead *head)
 {
     struct HCLeaf *item;
     const char *path = NULL;
@@ -1145,7 +1145,7 @@
 }
 
 static int
-rc_mknod(hctransaction_t trans __unused, struct HCHead *head)
+rc_mknod(hctransaction_t trans __cpdup_unused, struct HCHead *head)
 {
     struct HCLeaf *item;
     const char *path = NULL;
@@ -1193,7 +1193,7 @@
 }
 
 static int
-rc_link(hctransaction_t trans __unused, struct HCHead *head)
+rc_link(hctransaction_t trans __cpdup_unused, struct HCHead *head)
 {
     struct HCLeaf *item;
     const char *name1 = NULL;
@@ -1238,7 +1238,7 @@
 }
 
 static int
-rc_chflags(hctransaction_t trans __unused, struct HCHead *head)
+rc_chflags(hctransaction_t trans __cpdup_unused, struct HCHead *head)
 {
     struct HCLeaf *item;
     const char *path = NULL;
@@ -1394,7 +1394,7 @@
 }
 
 static int
-rc_symlink(hctransaction_t trans __unused, struct HCHead *head)
+rc_symlink(hctransaction_t trans __cpdup_unused, struct HCHead *head)
 {
     struct HCLeaf *item;
     const char *name1 = NULL;
@@ -1438,7 +1438,7 @@
 }
 
 static int
-rc_rename(hctransaction_t trans __unused, struct HCHead *head)
+rc_rename(hctransaction_t trans __cpdup_unused, struct HCHead *head)
 {
     struct HCLeaf *item;
     const char *name1 = NULL;
@@ -1483,7 +1483,7 @@
 }
 
 static int
-rc_utimes(hctransaction_t trans __unused, struct HCHead *head)
+rc_utimes(hctransaction_t trans __cpdup_unused, struct HCHead *head)
 {
     struct HCLeaf *item;
     struct timeval times[2];
--- cpdup-1.11/hclink.c.unused	2008-05-24 13:21:36.000000000 -0400
+++ cpdup-1.11/hclink.c	2008-06-11 15:44:30.000000000 -0400
@@ -77,7 +77,7 @@
 }
 
 static int
-rc_badop(hctransaction_t trans __unused, struct HCHead *head)
+rc_badop(hctransaction_t trans __cpdup_unused, struct HCHead *head)
 {
     head->error = EOPNOTSUPP;
     return(0);
@@ -353,7 +353,7 @@
 }
 
 void
-hcc_free_trans(struct HostConf *hc __unused)
+hcc_free_trans(struct HostConf *hc __cpdup_unused)
 {
     /* nop */
 }


Index: Makefile.linux
===================================================================
RCS file: /cvs/pkgs/rpms/cpdup/EL-5/Makefile.linux,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Makefile.linux	6 Mar 2008 00:22:07 -0000	1.1
+++ Makefile.linux	11 Jun 2008 20:45:45 -0000	1.2
@@ -4,9 +4,9 @@
 MANDIR=${PREFIX}/share/man
 
 build:
-	${CC} ${CFLAGS} -D__unused= -D_GNU_SOURCE -D__USE_FILE_OFFSET64 \
+	${CC} ${CFLAGS} -D__cpdup_unused= -D_GNU_SOURCE -D__USE_FILE_OFFSET64 \
   -DNOMD5 -c *.c
-	${CC} ${CFLAGS} -D__unused= -D_GNU_SOURCE -D__USE_FILE_OFFSET64 \
+	${CC} ${CFLAGS} -D__cpdup_unused= -D_GNU_SOURCE -D__USE_FILE_OFFSET64 \
   -DNOMD5 *.o -o cpdup
 
 install:


Index: cpdup.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cpdup/EL-5/cpdup.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cpdup.spec	5 Jun 2008 13:47:47 -0000	1.2
+++ cpdup.spec	11 Jun 2008 20:45:45 -0000	1.3
@@ -1,6 +1,6 @@
 Name:           cpdup
 Version:        1.11
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Filesystem mirroring utility
 
 Group:          Applications/Archiving
@@ -8,13 +8,10 @@
 URL:            http://apollo.backplane.com/FreeSrc/
 Source0:        http://apollo.backplane.com/FreeSrc/cpdup-%{version}.tgz
 Source1:        Makefile.linux
+Patch0:         cpdup-1.11-explicit_sizes.patch
+Patch1:         cpdup-1.11-unused.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-# bz# 435508: cpdup not 64-bit clean
-ExcludeArch:    x86_64
-# bz# 435508
-ExcludeArch:    ppc64
-
 #BuildRequires:  
 #Requires:       
 
@@ -33,6 +30,8 @@
 
 %prep
 %setup -q -n %{name}
+%patch0 -p1 -b .explicit_sizes
+%patch1 -p1 -b .unused
 rm md5.c
 
 
@@ -52,13 +51,16 @@
 
 %files
 %defattr(-,root,root,-)
-%doc 
+%doc BACKUPS
 %{_bindir}/*
 %{_mandir}/man1/*
 
 
 
 %changelog
+* Wed Jun 11 2008 Michel Alexandre Salim <salimma at fedoraproject.org> - 1.11-2
+- Fix build problems with GLIBC on 64-bit archs
+
 * Thu Jun  5 2008 Michel Alexandre Salim <salimma at fedoraproject.org> - 1.11-1
 - Update to 1.11
 




More information about the fedora-extras-commits mailing list