--- dev-util/subversion/subversion-1.5.4.ebuild +++ dev-util/subversion/subversion-1.5.4.ebuild @@ -318,25 +318,25 @@ elog elog " - svnserve daemon: " elog " 1. Edit /etc/conf.d/svnserve" - elog " 2. Start daemon: /etc/init.d/svnserve start" - elog " 3. Make persistent: rc-update add svnserve default" + elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")" + elog " 3. Start daemon: /etc/init.d/svnserve start" + elog " 4. Make persistent: rc-update add svnserve default" elog elog " - svnserve via xinetd:" elog " 1. Edit /etc/xinetd.d/svnserve (remove disable line)" - elog " 2. Restart xinetd.d: /etc/init.d/xinetd restart" + elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")" + elog " 3. Restart xinetd.d: /etc/init.d/xinetd restart" elog elog " - svn over ssh:" - elog " 1. Fix the repository permissions:" + elog " 1. Fix the repository permissions (see \"Fixing the repository permissions\")" + elog " Additionally run:" elog " groupadd svnusers" - elog " chown -R root:svnusers ${SVN_REPOS_LOC}/repos/" - elog " chmod -R g-w ${SVN_REPOS_LOC}/repos" - elog " chmod -R g+rw ${SVN_REPOS_LOC}/repos/db" - elog " chmod -R g+rw ${SVN_REPOS_LOC}/repos/locks" + elog " chown -R root:svnusers ${SVN_REPOS_LOC}/repos" elog " 2. Create an svnserve wrapper in /usr/local/bin to set the umask you" elog " want, for example:" elog " #!/bin/bash" elog " . /etc/conf.d/svnserve" - elog " umask 002" + elog " umask 007" elog " exec /usr/bin/svnserve \${SVNSERVE_OPTS} \"\$@\"" elog @@ -345,9 +345,18 @@ elog " 1. Edit /etc/conf.d/apache2 to include both \"-D DAV\" and \"-D SVN\"" elog " 2. Create an htpasswd file:" elog " htpasswd2 -m -c ${SVN_REPOS_LOC}/conf/svnusers USERNAME" + elog " 3. Fix the repository permissions (see \"Fixing the repository permissions\")" + elog " 4. Restart Apache: /etc/init.d/apache2 restart" elog fi + elog " Fixing the repository permissions:" + elog " chmod -Rf go-rwx ${SVN_REPOS_LOC}/conf" + elog " chmod -Rf g-w,o-rwx ${SVN_REPOS_LOC}/repos" + elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/db" + elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/locks" + elog + elog "If you intend to use svn-hot-backup, you can specify the number of" elog "backups to keep per repository by specifying an environment variable." elog "If you want to keep e.g. 2 backups, do the following:" @@ -376,7 +385,7 @@ einfo ">>> Initializing the database in ${ROOT}${SVN_REPOS_LOC} ..." if [[ -e "${ROOT}${SVN_REPOS_LOC}/repos" ]] ; then echo "A Subversion repository already exists and I will not overwrite it." - echo "Delete ${ROOT}${SVN_REPOS_LOC}/repos first if you're sure you want to have a clean version." + echo "Delete \"${ROOT}${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version." else mkdir -p "${ROOT}${SVN_REPOS_LOC}/conf" @@ -394,9 +403,10 @@ [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn" [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers" enewgroup "${SVNSERVE_GROUP}" - enewuser "${SVNSERVE_USER}" -1 -1 ${SVN_REPOS_LOC} "${SVNSERVE_GROUP}" + enewuser "${SVNSERVE_USER}" -1 -1 "${SVN_REPOS_LOC}" "${SVNSERVE_GROUP}" fi chown -Rf "${SVNSERVE_USER}:${SVNSERVE_GROUP}" "${ROOT}${SVN_REPOS_LOC}/repos" - chmod -Rf 755 "${ROOT}${SVN_REPOS_LOC}/repos" + chmod -Rf go-rwx "${ROOT}${SVN_REPOS_LOC}/conf" + chmod -Rf o-rwx "${ROOT}${SVN_REPOS_LOC}/repos" fi }