summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2007-06-24 20:55:27 +0000
committerjmmv <jmmv@pkgsrc.org>2007-06-24 20:55:27 +0000
commitd387b0550a71915578e24a0df96caafa5a406882 (patch)
tree3a4950c2708a1c6c4254f1c955d755e52f6114d2 /devel
parentc12a34c8700baca29d99761dc8b7281c171d3521 (diff)
downloadpkgsrc-d387b0550a71915578e24a0df96caafa5a406882.tar.gz
Fix this package to adhere to the "new" monotone behavior. It has probably
been broken since monotone 0.32...
Diffstat (limited to 'devel')
-rw-r--r--devel/monotone-server/Makefile11
-rw-r--r--devel/monotone-server/PLIST3
-rw-r--r--devel/monotone-server/files/monotone-server-init.sh26
-rw-r--r--devel/monotone-server/files/monotone.sh12
4 files changed, 21 insertions, 31 deletions
diff --git a/devel/monotone-server/Makefile b/devel/monotone-server/Makefile
index 83212e7a645..b488acad535 100644
--- a/devel/monotone-server/Makefile
+++ b/devel/monotone-server/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.31 2007/05/13 10:45:37 jmmv Exp $
+# $NetBSD: Makefile,v 1.32 2007/06/24 20:55:27 jmmv Exp $
#
DISTNAME= monotone-server-0.35
+PKGREVISION= 1
CATEGORIES= devel scm
MASTER_SITES= # empty
DISTFILES= # empty
@@ -26,10 +27,7 @@ OWN_DIRS_PERMS= ${PKG_SYSCONFDIR}/keys \
BUILD_DEFS+= MONOTONE_GROUP MONOTONE_USER
EXAMPLEDIR= ${PREFIX}/share/examples/monotone-server
-CONF_FILES_PERMS= ${EXAMPLEDIR}/branches.conf \
- ${PKG_SYSCONFDIR}/branches.conf \
- ${MONOTONE_USER} ${MONOTONE_GROUP} 600
-CONF_FILES_PERMS+= ${EXAMPLEDIR}/hooks.conf \
+CONF_FILES_PERMS= ${EXAMPLEDIR}/hooks.conf \
${PKG_SYSCONFDIR}/hooks.conf \
${MONOTONE_USER} ${MONOTONE_GROUP} 600
CONF_FILES_PERMS+= ${EXAMPLEDIR}/read-permissions \
@@ -65,7 +63,7 @@ FILES_SUBST+= MONOTONE_USER=${MONOTONE_USER:Q}
INSTALLATION_DIRS= sbin
do-extract:
-.for f in branches.conf hooks.conf monotone-server-init.sh read-permissions \
+.for f in hooks.conf monotone-server-init.sh read-permissions \
write-permissions
${CP} ${FILESDIR}/${f} ${WRKSRC}
.endfor
@@ -74,7 +72,6 @@ do-install:
${INSTALL_SCRIPT} ${WRKSRC}/monotone-server-init.sh \
${PREFIX}/sbin/monotone-server-init
${INSTALL_DATA_DIR} ${EXAMPLEDIR}
- ${INSTALL_DATA} ${WRKSRC}/branches.conf ${EXAMPLEDIR}/branches.conf
${INSTALL_DATA} ${WRKSRC}/hooks.conf ${EXAMPLEDIR}/hooks.conf
${INSTALL_DATA} ${WRKSRC}/read-permissions \
${EXAMPLEDIR}/read-permissions
diff --git a/devel/monotone-server/PLIST b/devel/monotone-server/PLIST
index 4418dd476c7..621c2e1efbd 100644
--- a/devel/monotone-server/PLIST
+++ b/devel/monotone-server/PLIST
@@ -1,6 +1,5 @@
-@comment $NetBSD: PLIST,v 1.3 2006/02/21 16:09:16 jmmv Exp $
+@comment $NetBSD: PLIST,v 1.4 2007/06/24 20:55:28 jmmv Exp $
sbin/monotone-server-init
-share/examples/monotone-server/branches.conf
share/examples/monotone-server/hooks.conf
share/examples/monotone-server/read-permissions
share/examples/monotone-server/write-permissions
diff --git a/devel/monotone-server/files/monotone-server-init.sh b/devel/monotone-server/files/monotone-server-init.sh
index f3433ace9ea..353951d556e 100644
--- a/devel/monotone-server/files/monotone-server-init.sh
+++ b/devel/monotone-server/files/monotone-server-init.sh
@@ -1,6 +1,6 @@
#!@SH@
#
-# $NetBSD: monotone-server-init.sh,v 1.3 2006/02/21 16:09:16 jmmv Exp $
+# $NetBSD: monotone-server-init.sh,v 1.4 2007/06/24 20:55:29 jmmv Exp $
#
progname=$(basename $0)
@@ -81,7 +81,7 @@ cd ${home}
echo "Initializing database: \`${home}/monotone.db'"
su - ${MONOTONE_USER} -c "${MONOTONE} --confdir=${PKG_SYSCONFDIR} \
- --db=monotone.db db init"
+ --db=monotone.db --keydir=${PKG_SYSCONFDIR}/keys db init"
cat <<EOF
@@ -93,17 +93,11 @@ you can forget about it (assuming you have a safe copy).
EOF
su - ${MONOTONE_USER} -c "${MONOTONE} --confdir=${PKG_SYSCONFDIR} \
- --db=monotone.db genkey ${keyname}"
-su - ${MONOTONE_USER} -c "${MONOTONE} --confdir=${PKG_SYSCONFDIR} \
- --db=monotone.db pubkey ${keyname} >${keyname}-public"
-su - ${MONOTONE_USER} -c "${MONOTONE} --confdir=${PKG_SYSCONFDIR} \
- --db=monotone.db privkey ${keyname} >${keyname}-private"
+ --db=monotone.db --keydir=${PKG_SYSCONFDIR}/keys \
+ genkey ${keyname}"
-chown ${MONOTONE_USER}:${MONOTONE_GROUP} monotone.db \
- ${keyname}-public ${keyname}-private
+chown ${MONOTONE_USER}:${MONOTONE_GROUP} monotone.db
chmod 600 monotone.db
-chmod 444 ${keyname}-public
-chmod 400 ${keyname}-private
cat <<EOF
@@ -114,14 +108,18 @@ It contains the key pair that authenticates your server:
${PKG_SYSCONFDIR}/keys/${keyname}
-At last, edit the following files to finish the configuration of your
-new server:
+Then, edit the following files to finish the configuration of your new
+server:
- ${PKG_SYSCONFDIR}/branches.conf
${PKG_SYSCONFDIR}/hooks.conf
${PKG_SYSCONFDIR}/read-permissions
${PKG_SYSCONFDIR}/write-permissions
+At last, do not forget to register the public keys for the users with
+write access by using a command similar to:
+
+ monotone --db=${home}/monotone.db read < file-with-public-keys
+
Once finished, use the installed rc.d script (monotone) to start the
dedicated server process.
EOF
diff --git a/devel/monotone-server/files/monotone.sh b/devel/monotone-server/files/monotone.sh
index 66e77f3e763..94fb46025c7 100644
--- a/devel/monotone-server/files/monotone.sh
+++ b/devel/monotone-server/files/monotone.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: monotone.sh,v 1.4 2006/04/10 17:46:31 jmmv Exp $
+# $NetBSD: monotone.sh,v 1.5 2007/06/24 20:55:30 jmmv Exp $
#
# PROVIDE: monotone
# REQUIRE: DAEMON
@@ -11,10 +11,6 @@ if [ -f "@PKG_SYSCONFDIR@/rc.conf" ]; then
. @PKG_SYSCONFDIR@/rc.conf
fi
-if [ -f "@PKG_SYSCONFDIR@/branches.conf" ]; then
- monotone_branches=$(cat @PKG_SYSCONFDIR@/branches.conf | grep -v '^#')
-fi
-
: ${monotone_group=@MONOTONE_GROUP@}
: ${monotone_home=@VARBASE@/monotone}
: ${monotone_user=@MONOTONE_USER@}
@@ -25,12 +21,12 @@ command="@PREFIX@/bin/mtn"
command_args="--norc \
--confdir=@PKG_SYSCONFDIR@ \
--db=${monotone_home}/monotone.db \
+ --keydir=@PKG_SYSCONFDIR@/keys \
--rcfile=@PKG_SYSCONFDIR@/hooks.conf \
- serve ${monotone_branches} \
+ serve \
>>${monotone_home}/monotone.log 2>&1 &"
required_dirs="@PKG_SYSCONFDIR@/keys"
-required_files="@PKG_SYSCONFDIR@/branches.conf \
- @PKG_SYSCONFDIR@/hooks.conf \
+required_files="@PKG_SYSCONFDIR@/hooks.conf \
@PKG_SYSCONFDIR@/read-permissions \
@PKG_SYSCONFDIR@/write-permissions \
${monotone_home}/monotone.db"