From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jun 3 03:31:36 2006 Return-Path: X-Original-To: freebsd-ports-bugs@FreeBSD.org Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from localhost (hub.freebsd.org [216.136.204.18]) by hub.freebsd.org (Postfix) with ESMTP id A260016A41F; Sat, 3 Jun 2006 03:31:35 +0000 (UTC) (envelope-from rushani@FreeBSD.org) Date: Sat, 03 Jun 2006 12:31:32 +0900 (JST) Message-Id: <20060603.123132.104029872.rushani@FreeBSD.org> To: ueda@drweb.jp From: Hideyuki KURASHINA In-Reply-To: <20060509205435.GB1116@k7.mavetju> References: <200604250144.k3P1iEGF098700@freefall.freebsd.org> <20060510.003409.74730619.rushani@FreeBSD.org> <20060509205435.GB1116@k7.mavetju> X-URL: http://www.rushani.jp/ X-PGP-Public-Key: http://www.rushani.jp/rushani.asc X-PGP-Fingerprint: A052 6F98 6146 6FE3 91E2 DA6B F2FA 2088 439A DC57 X-RC5-72-Stats: http://stats.distributed.net/participant/psummary.php?project_id=8&id=432320 X-Mailer: Mew version 5.0.50 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-ports-bugs@FreeBSD.org, edwin@mavetju.org, FreeBSD-gnats-submit@FreeBSD.org, ""@FreeBSD.org Subject: Re: ports/96295: shells/scponly cannot work with rsync X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2006 03:31:36 -0000 Uesa-san, apology for my late response... I confirmed the patch you suggested fixes the problem. Edwin or any other committers, could you please commit attached patch? The Commit log candidate is below: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Unbreak rsync comatibility when long opts ("--server", "--sender" and "--delete" in this case) specified. Suggested by: ueda _at_ drweb dot jp Obtained from: https://lists.ccs.neu.edu/pipermail/scponly/2006-March/001287.html PR: ports/96295 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- rushani (as port maintainer of scponly) Index: Makefile =================================================================== RCS file: /home/pcvs/ports/shells/scponly/Makefile,v retrieving revision 1.24 diff -u -r1.24 Makefile --- Makefile 3 Jun 2006 02:59:04 -0000 1.24 +++ Makefile 3 Jun 2006 03:23:23 -0000 @@ -71,6 +71,7 @@ PORTNAME= scponly PORTVERSION= 4.6 +PORTREVISION= 1 CATEGORIES= shells MASTER_SITES= http://www.sublimation.org/scponly/ \ ${MASTER_SITE_SOURCEFORGE} @@ -85,6 +86,8 @@ GNU_CONFIGURE= yes PLIST_SUB+= SCPONLY_CHROOT="@comment " +PATCH_STRIP= -p1 + .include .if defined(SCPONLY_DEFAULT_CHDIR) && !empty(SCPONLY_DEFAULT_CHDIR) @@ -105,7 +108,6 @@ .endif .if defined(WITH_SCPONLY_RSYNC) -BROKEN= The Rsync compatibility is broken BUILD_DEPENDS+= rsync:${PORTSDIR}/net/rsync RUN_DEPENDS+= ${BUILD_DEPENDS} CONFIGURE_ARGS+=--enable-rsync-compat Index: files/patch-ae =================================================================== RCS file: files/patch-ae diff -N files/patch-ae --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-ae 3 Jun 2006 03:23:23 -0000 @@ -0,0 +1,97 @@ +--- scponly-4.6/helper.c.orig Tue Jan 31 22:04:16 2006 ++++ scponly-4.6/helper.c Thu Mar 23 00:53:01 2006 +@@ -133,6 +133,78 @@ + char **tmpptr=av; + int ch; + int ac=0; ++ char **av2 = NULL; ++ ++ /* ++ * first count the arguments in the vector ++ */ ++ tmpptr=av; ++ while (*tmpptr!=NULL) ++ { ++ *tmpptr++; ++ ac++; ++ } ++ ++#ifdef PROG_RSYNC ++ if (exact_match(PROG_RSYNC, av[0])) ++ { ++ /* ++ * these are the long opts (beginning "--") which we ++ * allow for rsync ++ */ ++ char *permitted_long_opts[] = { ++ "--server", ++ "--sender", ++ "--delete", ++ NULL /* last element must be NULL */ ++ }; ++ ++ /* ++ * make a copy of the args excluding any permitted long ++ * options ++ */ ++ int i, j; ++ av2 = malloc(ac * sizeof *av2); ++ av2[0] = av[0]; ++ for (i = 1, j = 1; i < ac; ++i) ++ { ++ if (0 == strncmp(av[i], "--", 2)) ++ { ++ char **p; ++ /* ++ * test against permitted opts ++ */ ++ for (p = permitted_long_opts; *p; ++p) ++ { ++ if (exact_match(av[i], *p)) ++ break; ++ } ++ ++ if (*p) ++ { ++ /* ++ * permitted; skip this one ++ */ ++ continue; ++ } ++ else ++ { ++ /* ++ * no match ++ */ ++ syslog(LOG_ERR, "option %s is not permitted for use with %s (%s)", ++ av[i], cmdarg->name, logstamp()); ++ return 1; ++ } ++ } ++ av2[j++] = av[i]; ++ ++ } ++ av2[j] = NULL; ++ ac = j; ++ av = av2; ++ } ++#endif /* PROG_RSYNC */ + + while (cmdarg != NULL) + { +@@ -151,15 +223,6 @@ + */ + if (1 == cmdarg->getoptflag) + { +- /* +- * first count the arguments in the vector +- */ +- tmpptr=av; +- while (*tmpptr!=NULL) +- { +- *tmpptr++; +- ac++; +- } + /* + * now use getopt to look for our problem option + */