Lines 20-26
Link Here
|
20 |
LICENSE="Subversion GPL-2" |
20 |
LICENSE="Subversion GPL-2" |
21 |
SLOT="0" |
21 |
SLOT="0" |
22 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
22 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
23 |
IUSE="apache2 berkdb ctypes-python debug doc +dso extras gnome-keyring +http java kde nls perl python ruby sasl test vim-syntax" |
23 |
IUSE="apache2 berkdb ctypes-python debug doc +dso extras gnome-keyring +http java kde nls perl python ruby sasl server test vim-syntax" |
24 |
|
24 |
|
25 |
COMMON_DEPEND=">=dev-db/sqlite-3.7.12 |
25 |
COMMON_DEPEND=">=dev-db/sqlite-3.7.12 |
26 |
>=dev-libs/apr-1.3:1 |
26 |
>=dev-libs/apr-1.3:1 |
Lines 384-402
Link Here
|
384 |
newbin tools/backup/hot-backup.py svn-hot-backup |
384 |
newbin tools/backup/hot-backup.py svn-hot-backup |
385 |
rm -fr tools/backup |
385 |
rm -fr tools/backup |
386 |
|
386 |
|
387 |
# Install svnserve init-script and xinet.d snippet, bug 43245. |
387 |
if use server; then |
388 |
newinitd "${FILESDIR}"/svnserve.initd3 svnserve |
388 |
# Install svnserve init-script and xinet.d snippet, bug 43245. |
389 |
newconfd "${FILESDIR}"/svnserve.confd svnserve |
389 |
newinitd "${FILESDIR}"/svnserve.initd3 svnserve |
390 |
insinto /etc/xinetd.d |
390 |
newconfd "${FILESDIR}"/svnserve.confd svnserve |
391 |
newins "${FILESDIR}"/svnserve.xinetd svnserve |
391 |
insinto /etc/xinetd.d |
392 |
|
392 |
newins "${FILESDIR}"/svnserve.xinetd svnserve |
393 |
#adjust default user and group with disabled apache2 USE flag, bug 381385 |
393 |
|
394 |
use apache2 || sed -e "s\USER:-apache\USER:-svn\g" \ |
394 |
# Adjust default user and group with disabled apache2 USE flag, bug 381385 |
395 |
-e "s\GROUP:-apache\GROUP:-svnusers\g" \ |
395 |
use apache2 || sed -e "s\USER:-apache\USER:-svn\g" \ |
396 |
-i "${ED}"etc/init.d/svnserve || die |
396 |
-e "s\GROUP:-apache\GROUP:-svnusers\g" \ |
397 |
use apache2 || sed -e "0,/apache/s//svn/" \ |
397 |
-i "${ED}"etc/init.d/svnserve || die |
398 |
-e "s:apache:svnusers:" \ |
398 |
use apache2 || sed -e "0,/apache/s//svn/" \ |
399 |
-i "${ED}"etc/xinetd.d/svnserve || die |
399 |
-e "s:apache:svnusers:" \ |
|
|
400 |
-i "${ED}"etc/xinetd.d/svnserve || die |
401 |
fi |
400 |
|
402 |
|
401 |
# Install documentation. |
403 |
# Install documentation. |
402 |
dodoc CHANGES COMMITTERS README |
404 |
dodoc CHANGES COMMITTERS README |
Lines 458-465
Link Here
|
458 |
ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos" |
460 |
ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos" |
459 |
ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" |
461 |
ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" |
460 |
fi |
462 |
fi |
461 |
|
463 |
|
462 |
ewarn "If you run subversion as a daemon, you will need to restart it to avoid module mismatches." |
464 |
if use server; then |
|
|
465 |
ewarn "If you run subversion as a daemon, you will need to restart it to avoid module mismatches." |
466 |
fi |
463 |
} |
467 |
} |
464 |
|
468 |
|
465 |
pkg_postrm() { |
469 |
pkg_postrm() { |
Lines 467-501
Link Here
|
467 |
} |
471 |
} |
468 |
|
472 |
|
469 |
pkg_config() { |
473 |
pkg_config() { |
470 |
# Remember: Don't use ${EROOT}${SVN_REPOS_LOC} since ${SVN_REPOS_LOC} |
474 |
if use server; then |
471 |
# already has EPREFIX in it |
475 |
# Remember: Don't use ${EROOT}${SVN_REPOS_LOC} since ${SVN_REPOS_LOC} |
472 |
einfo "Initializing the database in ${SVN_REPOS_LOC}..." |
476 |
# already has EPREFIX in it |
473 |
if [[ -e "${SVN_REPOS_LOC}/repos" ]] ; then |
477 |
einfo "Initializing the database in ${SVN_REPOS_LOC}..." |
474 |
echo "A Subversion repository already exists and I will not overwrite it." |
478 |
if [[ -e "${SVN_REPOS_LOC}/repos" ]] ; then |
475 |
echo "Delete \"${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version." |
479 |
echo "A Subversion repository already exists and I will not overwrite it." |
476 |
else |
480 |
echo "Delete \"${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version." |
477 |
mkdir -p "${SVN_REPOS_LOC}/conf" |
|
|
478 |
|
479 |
einfo "Populating repository directory..." |
480 |
# Create initial repository. |
481 |
"${EROOT}usr/bin/svnadmin" create "${SVN_REPOS_LOC}/repos" |
482 |
|
483 |
einfo "Setting repository permissions..." |
484 |
SVNSERVE_USER="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")" |
485 |
SVNSERVE_GROUP="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")" |
486 |
if use apache2 ; then |
487 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache" |
488 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache" |
489 |
else |
481 |
else |
490 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn" |
482 |
mkdir -p "${SVN_REPOS_LOC}/conf" |
491 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers" |
483 |
|
|
|
484 |
einfo "Populating repository directory..." |
485 |
# Create initial repository. |
486 |
"${EROOT}usr/bin/svnadmin" create "${SVN_REPOS_LOC}/repos" |
487 |
|
488 |
einfo "Setting repository permissions..." |
489 |
SVNSERVE_USER="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")" |
490 |
SVNSERVE_GROUP="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")" |
491 |
if use apache2 ; then |
492 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache" |
493 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache" |
494 |
else |
495 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn" |
496 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers" |
497 |
fi |
498 |
chmod -Rf go-rwx "${SVN_REPOS_LOC}/conf" |
499 |
chmod -Rf o-rwx "${SVN_REPOS_LOC}/repos" |
500 |
echo "Please create \"${SVNSERVE_GROUP}\" group if it does not exist yet." |
501 |
echo "Afterwards please create \"${SVNSERVE_USER}\" user with homedir \"${SVN_REPOS_LOC}\"" |
502 |
echo "and as part of the \"${SVNSERVE_GROUP}\" group if it does not exist yet." |
503 |
echo "Finally, execute \"chown -Rf ${SVNSERVE_USER}:${SVNSERVE_GROUP} ${SVN_REPOS_LOC}/repos\"" |
504 |
echo "to finish the configuration." |
492 |
fi |
505 |
fi |
493 |
chmod -Rf go-rwx "${SVN_REPOS_LOC}/conf" |
|
|
494 |
chmod -Rf o-rwx "${SVN_REPOS_LOC}/repos" |
495 |
echo "Please create \"${SVNSERVE_GROUP}\" group if it does not exist yet." |
496 |
echo "Afterwards please create \"${SVNSERVE_USER}\" user with homedir \"${SVN_REPOS_LOC}\"" |
497 |
echo "and as part of the \"${SVNSERVE_GROUP}\" group if it does not exist yet." |
498 |
echo "Finally, execute \"chown -Rf ${SVNSERVE_USER}:${SVNSERVE_GROUP} ${SVN_REPOS_LOC}/repos\"" |
499 |
echo "to finish the configuration." |
500 |
fi |
506 |
fi |
501 |
} |
507 |
} |