From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Apr 21 19:40:01 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EB861065672 for ; Mon, 21 Apr 2008 19:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7176A8FC13 for ; Mon, 21 Apr 2008 19:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m3LJe1lR041506 for ; Mon, 21 Apr 2008 19:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m3LJe10N041505; Mon, 21 Apr 2008 19:40:01 GMT (envelope-from gnats) Resent-Date: Mon, 21 Apr 2008 19:40:01 GMT Resent-Message-Id: <200804211940.m3LJe10N041505@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Chris St Denis Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B6C01065677 for ; Mon, 21 Apr 2008 19:31:05 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 606248FC1C for ; Mon, 21 Apr 2008 19:31:05 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m3LJUi01098165 for ; Mon, 21 Apr 2008 19:30:44 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m3LJUiX2098164; Mon, 21 Apr 2008 19:30:44 GMT (envelope-from nobody) Message-Id: <200804211930.m3LJUiX2098164@www.freebsd.org> Date: Mon, 21 Apr 2008 19:30:44 GMT From: Chris St Denis To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/122972: svnserve requires user svn, should be automatically created and rc script's default path differs from Makefile's 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: Mon, 21 Apr 2008 19:40:01 -0000 >Number: 122972 >Category: ports >Synopsis: svnserve requires user svn, should be automatically created and rc script's default path differs from Makefile's >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: Mon Apr 21 19:40:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Chris St Denis >Release: n/a >Organization: >Environment: n/a >Description: To use svnserve daemon a user and group must be created. The group can be auto created with WITH_REPOSITORY_CREATION however no user is created. I have attached a patch that also creates the user in the same way the group is already created. Also, the svnserve daemon's rc script defaults the path to %%PREFIX%%/repositories where as the Makefile (for the purposes of WITH_REPOSITORY_CREATION) defaults to /home/svn/repos. One of these should be changed. The second attached patch changes the RC script to /home/svn/repos >How-To-Repeat: >Fix: Patch for makefile (not heavily tested) ------------------- drs# diff -u Makefile.old Makefile --- Makefile.old Mon Apr 21 12:16:50 2008 +++ Makefile Mon Apr 21 12:20:46 2008db/$$i; \ + *) ${CHOWN} -R ${SVNUSER}:${SVNGROUP} $ @@ -159,10 +159,12 @@ CONFIGURE_ARGS+= --with-apxs=${APXS} PLIST_SUB+= MOD_DAV_SVN="" SVNGROUP?= www +SVNUSER?= www .else PLIST_SUB+= MOD_DAV_SVN="@comment " PKGDEINSTALL= NONEXISTENT SVNGROUP?= svn +SVNUSER?= svn .endif .if defined(WITH_APACHE2_APR) @@ -300,10 +302,10 @@ .endif @${ECHO_MSG} "" .if defined(WITH_REPOSITORY_CREATION) - @${ECHO_MSG} "I will create (or use, if it exists) \"${SVNGROUP}\" group." + @${ECHO_MSG} "I will create (or use, if it exists) \"${SVNUSER}\" user and \"${SVNGROUP}\" group." @${ECHO_MSG} "Make sure that all committers are its members." @${ECHO_MSG} "" - @${ECHO_MSG} "Repository will be created at '${SVNREPOS}' with group '${SVNGROUP}'." + @${ECHO_MSG} "Repository will be created at '${SVNREPOS}' with user \"${SVNUSER}\" and group '${SVNGROUP}'." @${ECHO_MSG} "Type of repository will be '${SVNFSTYPE}'." @${ECHO_MSG} "You could change these settings by defining SVNREPOS, SVNGROUP and SVNFSTYPE." .else @@ -449,17 +451,29 @@ ${FALSE}; \ fi; \ fi + @if /usr/sbin/pw usershow "${SVNUSER}" >/dev/null 2>&1; then \ + ${ECHO_MSG} "You already have a user \"${SVNUSER}\", so I will use it."; \ + else \ + if /usr/sbin/pw useradd ${SVNUSER} -h -; \ + then \ + ${ECHO_MSG} "Added user \"${SVNUSER}\"."; \ + else \ + ${ECHO_MSG} "Adding user \"${SVNUSER}\" failed..."; \ + ${ECHO_MSG} "Please create it, and try again."; \ + ${FALSE}; \ + fi; \ + .endif @${MKDIR} ${SVNREPOS} @${PREFIX}/bin/svnadmin create --fs-type ${SVNFSTYPE} ${SVNREPOS} .if defined(WITH_SVNSERVE_WRAPPER) - @${CHGRP} ${SVNGROUP} ${SVNGRPFILES} + @${CHOWN} ${SVNUSER}:${SVNGROUP} ${SVNGRPFILES} @${CHMOD} g+w ${SVNGRPFILES} @for i in ${SVNREPOS}/db/* ; do \ i=$${i##*/}; \ case $$i in \ DB_CONFIG|fs-type|uuid) ;; \ - *) ${CHGRP} -R ${SVNGROUP} ${SVNREPOS}/{SVNREPOS}/db/$$i; \ ${CHMOD} -R g+w ${SVNREPOS}/db/$$i; \ ;; \ esac; \ Second patch ------------ drs# diff -u svnserve.in.old svnserve.in --- svnserve.in.old Mon Apr 21 12:30:42 2008 +++ svnserve.in Mon Apr 21 12:30:51 2008 @@ -22,7 +22,7 @@ # Set some defaults svnserve_enable=${svnserve_enable:-"NO"} svnserve_flags=${svnserve_flags:-"-d --listen-port=3690"} -svnserve_data=${svnserve_data:-"%%PREFIX%%/repositories"} +svnserve_data=${svnserve_data:-"/home/svn/repos"} svnserve_user=${svnserve_user:-"svn"} svnserve_group=${svnserve_group:-"svn"} >Release-Note: >Audit-Trail: >Unformatted: