Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Aug 2013 14:44:52 GMT
From:      Warren Block <wblock@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/181340: [patch] devel/subversion: don't overwrite modified svnserve script
Message-ID:  <201308161444.r7GEiqUP021877@oldred.freebsd.org>
Resent-Message-ID: <201308161450.r7GEo0Wf030319@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         181340
>Category:       ports
>Synopsis:       [patch] devel/subversion: don't overwrite modified svnserve script
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 16 14:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Warren Block
>Release:        9.2-PRERELEASE
>Organization:
>Environment:
FreeBSD lightning 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0 r254408: Fri Aug 16 07:38:51 MDT 2013     root@lightning:/usr/obj/usr/src/sys/LIGHTNING  amd64
>Description:
When the svnserve script is used, it must be modified to point to the repository directory with the --root= option.  The port does not recognize that this script has been modified, deleting and rewriting every time the port is updated.
>How-To-Repeat:
Install devel/subversion with the SVNSERVE_WRAPPER option enabled.  Modify /usr/local/bin/svnserve.  Reinstall the port, and the modified /usr/local/bin/svnserve is overwritten.
>Fix:
Apply attached patch.  (Thanks for assistance from nox@.)

Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 324792)
+++ Makefile	(working copy)
@@ -44,7 +44,7 @@
 
 SUB_FILES=	pkg-install \
 		pkg-deinstall
-		
+
 BOOK_VERSION=	4515
 
 .if make(repository)
@@ -69,10 +69,12 @@
 
 .if ${PORT_OPTIONS:MSVNSERVE_WRAPPER}
 PLIST_SUB+=	SVNSERVE_WRAPPER=""
+PLIST_SUB+=	NO_SVNSERVE_WRAPPER="@comment "
 SUB_LIST+=	SVNSERVE_BIN_EXT=".bin"
 EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-svnserve-wrapper
 .else
 PLIST_SUB+=	SVNSERVE_WRAPPER="@comment "
+PLIST_SUB+=	NO_SVNSERVE_WRAPPER=""
 SUB_LIST+=	SVNSERVE_BIN_EXT=""
 .endif
 
@@ -230,13 +232,13 @@
 	fi
 .endif
 .if ${PORT_OPTIONS:MSTATIC}
-	@if grep -q icui18n ${LOCALBASE}/lib/libsqlite3.la ; then \
+	@if ${GREP} -q icui18n ${LOCALBASE}/lib/libsqlite3.la ; then \
 		${ECHO_MSG} "" ; \
 		${ECHO_MSG} "You can not build static subversion if your SQLite3 is built with ICU enabled."; \
 		${ECHO_MSG} "Please, reinstall 'devel/sqlite3' port with disabled ICU support."; \
 		${ECHO_MSG} "" ; \
 		${FALSE} ; \
-	fi		
+	fi
 .endif
 
 # takes a long time, and will fail but gives maintainer a good oversight
@@ -287,7 +289,10 @@
 	${INSTALL_SCRIPT} ${WRKSRC}/contrib/client-side/asvn ${PREFIX}/bin
 .endif
 .if ${PORT_OPTIONS:MSVNSERVE_WRAPPER}
-	@${INSTALL_SCRIPT} ${FILESDIR}/svnserve.wrapper ${PREFIX}/bin/svnserve
+	@${INSTALL_SCRIPT} ${FILESDIR}/svnserve.wrapper ${PREFIX}/bin/svnserve.sample
+	@if [ ! -f "${PREFIX}/bin/svnserve" ]; then \
+		${INSTALL_SCRIPT} ${FILESDIR}/svnserve.wrapper ${PREFIX}/bin/svnserve ; \
+	fi
 .endif
 
 repository:	_mkrepos
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 324792)
+++ pkg-plist	(working copy)
@@ -5,8 +5,13 @@
 bin/svnlook
 bin/svnmucc
 bin/svnrdump
-bin/svnserve
 bin/svnsync
+bin/svnversion
+%%NO_SVNSERVE_WRAPPER%%bin/svnserve
+%%SVNSERVE_WRAPPER%%@unexec if cmp -s %D/bin/svnserve.sample %D/bin/svnserve; then rm -r %D/bin/svnserve; fi
+%%SVNSERVE_WRAPPER%%bin/svnserve.bin
+%%SVNSERVE_WRAPPER%%bin/svnserve.sample
+%%SVNSERVE_WRAPPER%%@exec if [ ! -f %D/bin/svnserve ] ; then cp -p %D/%F %B/bin/svnserve; fi
 %%ASVN%%bin/asvn
 %%TOOLS%%bin/fsfs-access-map
 %%TOOLS%%bin/fsfs-reorg
@@ -17,8 +22,6 @@
 %%TOOLS%%bin/svnauthz
 %%TOOLS%%bin/svnauthz-validate
 %%TOOLS%%bin/svnraisetreeconflict
-%%SVNSERVE_WRAPPER%%bin/svnserve.bin
-bin/svnversion
 include/subversion-1/mod_authz_svn.h
 include/subversion-1/mod_dav_svn.h
 include/subversion-1/svn-revision.txt


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308161444.r7GEiqUP021877>