diff options
author | Lev A. Serebryakov <lev@FreeBSD.org> | 2008-10-25 09:06:21 +0000 |
---|---|---|
committer | Lev A. Serebryakov <lev@FreeBSD.org> | 2008-10-25 09:06:21 +0000 |
commit | c5f24792a6bff6baeb790d51557c51b58d5b3df4 (patch) | |
tree | 83b77ef7a4570b719c49cfb7453d1c9253116364 /devel/subversion/Makefile | |
parent | 0f99064e49be8af2168323e53fdf62dad4034237 (diff) | |
download | ports-c5f24792a6bff6baeb790d51557c51b58d5b3df4.tar.gz ports-c5f24792a6bff6baeb790d51557c51b58d5b3df4.zip |
Notes
Diffstat (limited to 'devel/subversion/Makefile')
-rw-r--r-- | devel/subversion/Makefile | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/devel/subversion/Makefile b/devel/subversion/Makefile index 1fc3e76cc38d..39aeb2884761 100644 --- a/devel/subversion/Makefile +++ b/devel/subversion/Makefile @@ -108,10 +108,10 @@ pre-everything:: @${ECHO_MSG} "" .endif .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 @@ -133,7 +133,7 @@ pre-everything:: @${ECHO_MSG} "asvn will be installed" @${ECHO_MSG} "" .endif - @${ECHO_MSG} "Many useful scripts will be installed into ${DATADIR}}" + @${ECHO_MSG} "Many useful scripts will be installed into ${DATADIR}" pre-configure: @if [ ! -x ${APR_APU_DIR}/${APR_CONFIG} -o ! -x ${APR_APU_DIR}/${APU_CONFIG} ] ; then \ @@ -203,17 +203,29 @@ _mkrepos: .USE ${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; \ + 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}/db/$$i; \ + *) ${CHOWN} -R ${SVNUSER}:${SVNGROUP} ${SVNREPOS}/db/$$i; \ ${CHMOD} -R g+w ${SVNREPOS}/db/$$i; \ ;; \ esac; \ |