From owner-freebsd-ports@FreeBSD.ORG Fri Feb 18 17:16:25 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 117F016A4CE; Fri, 18 Feb 2005 17:16:25 +0000 (GMT) Received: from smradoch.ath.cx (r2g224.chello.upc.cz [62.245.70.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5214443D66; Fri, 18 Feb 2005 17:16:24 +0000 (GMT) (envelope-from neuhauser@chello.cz) Received: by smradoch.ath.cx (Postfix, from userid 1001) id 9278C1F87BEE; Fri, 18 Feb 2005 18:16:23 +0100 (CET) Date: Fri, 18 Feb 2005 18:16:23 +0100 From: Roman Neuhauser To: freebsd-ports Message-ID: <20050218171623.GB4579@isis.wad.cz> Mail-Followup-To: freebsd-ports , lev@freebsd.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="9amGYk9869ThD9tj" Content-Disposition: inline User-Agent: Mutt/1.5.6i cc: lev@freebsd.org Subject: [PATCH] devel/subversion repository target, fsfs support X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2005 17:16:25 -0000 --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Oops, I did it again. This time, the patch *is* attached. The attached patch devel/subversion/Makefile adds a "repository" target and support for fsfs repositories. If you use the -DWITH_REPOSITORY_CREATION functionality of devel/subversion but have been missing a possibility of having the repository created at will as opposed at just the install time, look no further. :) I'm not submitting this as a PR yet because I can only test fsfs repository creation with -DWITH_SVNSERVE_WRAPPER, so please, try it out if you access subversion through apache/dav or some other funky way. Also, I would be very thankful if someone who uses the wrapper with a bdb repository could confirm that everything works with a repository created with the patch applied (look for the usual commits stuck because of wrong permissions on files or directories). Changes: - SVNFSTYPE variable affects the type of repository that gets created, defaults to "fsfs" - the repository target allows for repository creation at any moment - db/fs-type and db/uuid are excluded from chgrp/chmod like db/DB_CONFIG -- If you cc me or remove the list(s) completely I'll most likely ignore your message. see http://www.eyrie.org./~eagle/faqs/questions.html --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="devel::subversion.repository,1.patch" Index: devel/subversion/Makefile =================================================================== RCS file: /home/ncvs/ports/devel/subversion/Makefile,v retrieving revision 1.74 diff -u -r1.74 Makefile --- devel/subversion/Makefile 3 Feb 2005 20:21:53 -0000 1.74 +++ devel/subversion/Makefile 18 Feb 2005 15:58:40 -0000 @@ -6,6 +6,7 @@ PORTNAME= subversion PORTVERSION= 1.1.3 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://subversion.tigris.org/tarballs/ @@ -43,6 +44,11 @@ .include SVNREPOS?= /home/svn/repos +SVNFSTYPE?= fsfs + +.if defined(WITH_REPOSITORY_CREATION) +MKREPOS_TARGET= _mkrepos +.endif .if defined(WITH_MAINTAINER_DEBUG) CONFIGURE_ARGS+=--enable-maintainer-mode \ @@ -318,7 +324,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 +356,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 +379,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: --9amGYk9869ThD9tj--