ports/78379: [PATCH] repository target, fsfs support in devel/subversion
Roman Neuhauser
neuhauser at chello.cz
Thu Mar 3 21:20:21 UTC 2005
>Number: 78379
>Category: ports
>Synopsis: [PATCH] repository target, fsfs support in devel/subversion
>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: Thu Mar 03 21:20:20 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Roman Neuhauser
>Release: FreeBSD 4.10-STABLE i386
>Organization:
>Environment:
System: FreeBSD isis.wad.cz 4.10-STABLE FreeBSD 4.10-STABLE #3: Sat Aug 7 16:06:48 CEST 2004 roman at isis.wad.cz:/usr/obj/usr/src/sys/FREEPUPPY2_6 i386
>Description:
(Maintainer cc'd.)
The attached patch for devel/subversion/Makefile adds a "repository"
target (allowing for repository creation independently of installing
the port) as well as support for creating fsfs repositories. The default
type of created repositories is changed to fsfs.
I sent a slightly different version of the patch to lev@ (maintainer)
and ports@ two weeks ago with request for comments but got zero replies,
so here it is. I've only tested it on 4.x i386 machines but the change
has no platform- or branch-dependent consequences I'm aware of.
http://marc.theaimsgroup.com/?l=freebsd-ports&m=110874699621097&w=2
http://codex.sigpipe.cz/FreeBSD/ports/devel::subversion.repository,2.patch
>How-To-Repeat:
cd $PORTSDIR
patch < .../devel::subversion.repository,2.patch
cd devel/subversion
make repository [SVNFSTYPE={bdb|fsfs}] [SVNREPOS=/some/path] [-DWITH_SVNSERVE_WRAPPER [SVNGROUP=agroup]]
as well as (on a machine without subversion installed):
make install -DWITH_REPOSITORY_CREATION [...]
>Fix:
--- devel::subversion.repository,2.patch begins here ---
Index: devel/subversion/Makefile
===================================================================
RCS file: /home/ncvs/ports/devel/subversion/Makefile,v
retrieving revision 1.74
diff -u -u -r1.74 Makefile
--- devel/subversion/Makefile 3 Feb 2005 20:21:53 -0000 1.74
+++ devel/subversion/Makefile 3 Mar 2005 20:51:51 -0000
@@ -43,6 +43,15 @@
.include <bsd.port.pre.mk>
SVNREPOS?= /home/svn/repos
+SVNFSTYPE?= fsfs
+
+.if make(repository)
+WITH_REPOSITORY_CREATION= yes
+.endif
+
+.if defined(WITH_REPOSITORY_CREATION)
+MKREPOS_TARGET= _mkrepos
+.endif
.if defined(WITH_MAINTAINER_DEBUG)
CONFIGURE_ARGS+=--enable-maintainer-mode \
@@ -318,7 +327,7 @@
${APXS} -e -S LIBEXECDIR=${PREFIX}/libexec/apache2 -a -n dav libexec/apache2/mod_dav.so
.endif
-post-install:
+post-install: ${MKREPOS_TARGET}
@${MKDIR} ${PREFIX}/share/subversion
cd ${WRKSRC}/tools ; \
tar --exclude '*.in' -cf - * | tar -C ${PREFIX}/share/subversion -xf -
@@ -350,7 +359,14 @@
.if defined(WITH_SVNSERVE_WRAPPER)
@${INSTALL_SCRIPT} ${FILESDIR}/svnserve.wrapper ${PREFIX}/bin/svnserve
.endif
-.if defined(WITH_REPOSITORY_CREATION) && !exists(${SVNREPOS})
+
+repository: _mkrepos
+
+_SVNGRPFILES= dav db locks locks/db.lock locks/db-logs.lock
+SVNGRPFILES= ${_SVNGRPFILES:S,^,${SVNREPOS}/,}
+
+_mkrepos: .USE
+.if !exists(${SVNREPOS})
. if defined(WITH_SVNSERVE_WRAPPER)
@if /usr/sbin/pw groupshow "${SVNGROUP}" >/dev/null 2>&1; then \
${ECHO_MSG} "You already have a group \"${SVNGROUP}\", so I will use it."; \
@@ -366,18 +382,20 @@
fi
. endif
@${MKDIR} ${SVNREPOS}
- @${PREFIX}/bin/svnadmin create ${SVNREPOS}
- @${CHGRP} ${SVNGROUP} ${SVNREPOS}/db ${SVNREPOS}/locks/db.lock ${SVNREPOS}/dav
- @${CHMOD} g+w ${SVNREPOS}/db ${SVNREPOS}/locks/db.lock ${SVNREPOS}/dav
+ @${PREFIX}/bin/svnadmin create --fs-type ${SVNFSTYPE} ${SVNREPOS}
+. if defined(WITH_SVNSERVE_WRAPPER)
+ @${CHGRP} ${SVNGROUP} ${SVNGRPFILES}
+ @${CHMOD} g+w ${SVNGRPFILES}
@for i in ${SVNREPOS}/db/* ; do \
i=$${i##*/}; \
case $$i in \
- DB_CONFIG) ;; \
- *) ${CHGRP} ${SVNGROUP} ${SVNREPOS}/db/$$i; \
- ${CHMOD} g+w ${SVNREPOS}/db/$$i; \
+ DB_CONFIG|fs-type|uuid) ;; \
+ *) ${CHGRP} -R ${SVNGROUP} ${SVNREPOS}/db/$$i; \
+ ${CHMOD} -R g+w ${SVNREPOS}/db/$$i; \
;; \
esac; \
done
+. endif
.endif
post-deinstall:
--- devel::subversion.repository,2.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list