ports/124553: [PATCH] net/rsync: time-limit patch

Adrian Thearle adrian at thearle.com.au
Fri Jun 13 13:20:03 UTC 2008


>Number:         124553
>Category:       ports
>Synopsis:       [PATCH] net/rsync: time-limit patch
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 13 13:20:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Adrian Thearle
>Release:        FreeBSD 7.0-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD albert.thearle.com.au 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #0: Fri Jun  6 18:37:47 EST
>Description:
I discovered that the time-limit patch got removed... I google and could not find a reason, so I added it back in... It got removed from the port when it got up
graded to rsync version 3(port CVS rev 1.125), perhaps the patches were still out dated at the time. Unfortunently it broke my backup scripts. The patch seems t
o still be part of the distribution and seems to work quite ok for me...

I found that the patches flags and timelimit conflicted so in pre-patch if both are enabled i attempt to fix the flags patchfile. I'm not sure if this is the co
rrect way to do this, but i figure i learnt something inthe process... and if its wrong someone will let me know the correct way...


Added file(s):
- files/timelimit_fileflags_patch-proto.h

Port maintainer (ehaupt at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- rsync-3.0.2_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/net/rsync/Makefile /usr/ports/user/rsync/Makefile
--- /usr/ports/net/rsync/Makefile	2008-06-02 18:11:52.000000000 +1000
+++ /usr/ports/user/rsync/Makefile	2008-06-13 22:45:59.000000000 +1000
@@ -39,6 +39,7 @@
 MAN5=		rsyncd.conf.5
 
 OPTIONS=	POPT_PORT "Use popt from devel/popt instead of bundled one" off \
+		TIMELIMIT "Time limit patch" on \
 		SSH       "Use SSH instead of RSH" on \
 		FLAGS     "File system flags support patch, adds --fileflags" off \
 		ACL       "Add backward-compatibility for the --acls option" off \
@@ -46,7 +47,12 @@
 
 .include <bsd.port.pre.mk>
 
-.if defined(WITH_ICONV) || defined(WITH_FLAGS) || defined(WITH_ACL) || make(makesum)
+.if !defined(WITHOUT_TIMELIMIT)
+PATCH_STRIP=	-p1
+EXTRA_PATCHES+=	${WRKSRC}/patches/time-limit.diff
+.endif
+
+.if defined(WITH_ICONV) || defined(WITH_FLAGS) || defined(WITH_ACL) || make(makesum) || defined(WITH_TIMELIMIT)
 DISTFILES+=	${PORTNAME}-patches-${PORTVERSION}${EXTRACT_SUFX}
 .endif
 
@@ -83,6 +89,11 @@
 CONFIGURE_ARGS+=	--with-rsh=rsh
 .endif
 
+.if defined( WITH_TIMELIMIT ) && defined( WITH_FLAGS )
+pre-patch:
+	${PATCH} -d ${PATCH_WRKSRC} --forward --quiet -E < ${PATCHDIR}/timelimit_fileflags_patch-proto.h
+.endif
+
 # guard against CFLAGS damage by MAKE_ENV
 post-patch:
 	@${REINPLACE_CMD} -e 's|CFLAGS|CONFIGUREDCFLAGS|' ${WRKSRC}/Makefile.in
diff -ruN --exclude=CVS /usr/ports/net/rsync/files/timelimit_fileflags_patch-proto.h /usr/ports/user/rsync/files/timelimit_fileflags_patch-proto.h
--- /usr/ports/net/rsync/files/timelimit_fileflags_patch-proto.h	1970-01-01 10:00:00.000000000 +1000
+++ /usr/ports/user/rsync/files/timelimit_fileflags_patch-proto.h	2008-06-13 22:43:37.000000000 +1000
@@ -0,0 +1,10 @@
+--- patches/fileflags.diff.orig	2008-06-13 22:23:51.000000000 +1000
++++ patches/fileflags.diff	2008-06-13 22:24:55.000000000 +1000
+@@ -1135,6 +1135,7 @@
+  void print_child_argv(const char *prefix, char **cmd);
+  NORETURN void out_of_memory(const char *str);
+  NORETURN void overflow_exit(const char *str);
++ time_t parse_time(const char *arg);
+ -int set_modtime(const char *fname, time_t modtime, mode_t mode);
+ +int set_modtime(const char *fname, time_t modtime, mode_t mode, uint32 fileflags);
+  int mkdir_defmode(char *fname);
--- rsync-3.0.2_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list