rpms/monotone/F-8 README.monotone-server, 1.2, 1.3 monotone.init, 1.13, 1.14 monotone.spec, 1.33, 1.34 monotone.sysconfig, 1.4, 1.5
Roland McGrath (roland)
fedora-extras-commits at redhat.com
Sat Dec 22 23:55:04 UTC 2007
Author: roland
Update of /cvs/pkgs/rpms/monotone/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4561
Modified Files:
README.monotone-server monotone.init monotone.spec
monotone.sysconfig
Log Message:
Fix some monotone-server packaging bugs.
Index: README.monotone-server
===================================================================
RCS file: /cvs/pkgs/rpms/monotone/F-8/README.monotone-server,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- README.monotone-server 11 Apr 2006 21:10:32 -0000 1.2
+++ README.monotone-server 22 Dec 2007 23:54:29 -0000 1.3
@@ -10,7 +10,7 @@
The /etc/monotone directory serves as ~/.monotone for the server. This
directory and its contents are not writable by the "monotone" user ID under
-which the network server runs. The database lives in /var/db/monotone,
+which the network server runs. The database lives in /var/lib/monotone,
which the "monotone" user ID must write to.
The init.d script will generate a private key for the server to use, if
Index: monotone.init
===================================================================
RCS file: /cvs/pkgs/rpms/monotone/F-8/monotone.init,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- monotone.init 22 Dec 2007 00:04:12 -0000 1.13
+++ monotone.init 22 Dec 2007 23:54:29 -0000 1.14
@@ -43,6 +43,8 @@
MONOTONE_PIDFILE=/var/run/monotone/monotone-server.pid
MONOTONE_LOGFILE=${MONOTONE_LOGFILE:-/var/log/monotone.log}
MONOTONE_OLDDB=/var/db/monotone/server.db
+MONOTONE_OLDDBFILE=/var/db/monotone/server.mtn
+MONOTONE_OLDPPFILE=/var/db/monotone/passphrase.lua
random_passphrase()
{
@@ -67,6 +69,18 @@
# See how we were called.
case "$1" in
start)
+ if [ -e $MONOTONE_OLDDBFILE -a ! -e $MONOTONE_DBFILE ]; then
+ echo -n $"Moving" "$MONOTONE_OLDDBFILE" $"to" "$MONOTONE_DBFILE"
+ if mv "$MONOTONE_OLDDBFILE" "$MONOTONE_DBFILE"; then
+ failure
+ echo
+ exit
+ else
+ success
+ echo
+ fi
+ rmdir 2> /dev/null /var/db/monotone
+ fi
if [ -e $MONOTONE_DBFILE ]; then
check_db_version || $0 migrate
elif [ -e $MONOTONE_OLDDB ]; then
@@ -122,10 +136,10 @@
;;
init)
echo -n $"Initializing database" "${MONOTONE_DBFILE}: "
- { [ -d /var/db/monotone ] ||
+ { [ -d /var/lib/monotone ] ||
/usr/bin/install -o ${MONOTONE_USER:-monotone} \
-g ${MONOTONE_GROUP:-monotone} \
- -m 0770 -d /var/db/monotone; } &&
+ -m 0770 -d /var/lib/monotone; } &&
runuser -s /bin/bash - ${MONOTONE_USER:-monotone} -c "umask 007; \
$MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS db init" &&
success $"database initialization" ||
@@ -134,8 +148,8 @@
echo
;;
genkey)
- MONOTONE_KEYID=${2:-${MONOTONE_KEYID:-`/bin/hostname -f`}}
- MONOTONE_PPFILE=${MONOTONE_PPFILE:-/var/db/monotone/passphrase.lua}
+ MONOTONE_KEYID=${2:-${MONOTONE_KEYID:-monotone@`/bin/hostname -f`}}
+ MONOTONE_PPFILE=${MONOTONE_PPFILE:-/etc/monotone/passphrase.lua}
if [ -s "$MONOTONE_PPFILE" -a -s "$MONOTONE_KEYDIR/$MONOTONE_KEYID" ]
then
echo >&2 "$0:" $"Server key already installed"
@@ -169,12 +183,12 @@
echo
;;
migrate)
- oppfile=/var/db/monotone/passphrase.lua
RETVAL=0
- if [ ! -e $MONOTONE_PPFILE ] && [ -e $oppfile ]; then
+ if [ ! -e $MONOTONE_PPFILE ] && [ -e $MONOTONE_OLDPPFILE ]; then
echo -n $"Moving old server passphrase file to new location: "
/usr/bin/install -o root -g ${MONOTONE_GROUP:-monotone} \
- -m 0440 $oppfile ${MONOTONE_PPFILE} &&
+ -m 0440 \
+ $MONOTONE_OLDPPFILE ${MONOTONE_PPFILE} &&
success $"move passphrase file" ||
failure $"move passphrase file"
RETVAL=$?
Index: monotone.spec
===================================================================
RCS file: /cvs/pkgs/rpms/monotone/F-8/monotone.spec,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- monotone.spec 22 Dec 2007 00:04:12 -0000 1.33
+++ monotone.spec 22 Dec 2007 23:54:29 -0000 1.34
@@ -1,6 +1,6 @@
Name: monotone
Version: 0.38
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A free, distributed version control system
Group: Development/Tools
@@ -88,21 +88,25 @@
emacs -batch -f batch-byte-compile ${lispdir}
mkdir -p %{buildroot}%{_sbindir}
-mkdir -p %{buildroot}%{_localstatedir}/db
+mkdir -p %{buildroot}%{_localstatedir}/lib
ln -snf ../bin/mtn %{buildroot}%{_sbindir}/monotone-server
%{__install} -D -m 0555 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/monotone
%{__install} -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/monotone
%{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/monotone
%{__install} -d -m 0750 %{buildroot}%{_sysconfdir}/monotone/private-keys
-%{__install} -d -m 0770 %{buildroot}%{_localstatedir}/db/monotone
+%{__install} -d -m 0770 %{buildroot}%{_localstatedir}/lib/monotone
%{__install} -d -m 0755 %{buildroot}%{_localstatedir}/run/monotone
# These do not actually wind up in the package, due to %%ghost.
-%{__install} -c -m 0440 /dev/null %{buildroot}%{_sysconfdir}/monotone/passphrase.lua
-%{__install} -c -m 0640 /dev/null %{buildroot}%{_sysconfdir}/monotone/read-permissions
-%{__install} -c -m 0640 /dev/null %{buildroot}%{_sysconfdir}/monotone/write-permissions
-%{__install} -c -m 0644 /dev/null %{buildroot}%{_sysconfdir}/monotone/monotonerc
-touch %{buildroot}%{_localstatedir}/db/monotone/server.mtn
+%{__install} -c -m 0440 /dev/null \
+ %{buildroot}%{_sysconfdir}/monotone/passphrase.lua
+%{__install} -c -m 0640 /dev/null \
+ %{buildroot}%{_sysconfdir}/monotone/read-permissions
+%{__install} -c -m 0640 /dev/null \
+ %{buildroot}%{_sysconfdir}/monotone/write-permissions
+%{__install} -c -m 0644 /dev/null \
+ %{buildroot}%{_sysconfdir}/monotone/monotonerc
+touch %{buildroot}%{_localstatedir}/lib/monotone/server.mtn
cp %{SOURCE3} .
@@ -145,15 +149,15 @@
%attr(0440,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/monotone/passphrase.lua
%attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/monotone/read-permissions
%attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/monotone/write-permissions
-%dir %attr(0770,monotone,monotone) %{_localstatedir}/db/monotone
-%attr(0660,monotone,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_localstatedir}/db/monotone/server.mtn
+%dir %attr(0770,monotone,monotone) %{_localstatedir}/lib/monotone
+%attr(0660,monotone,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_localstatedir}/lib/monotone/server.mtn
%pre server
# Add "monotone" user per http://fedoraproject.org/wiki/Packaging/UsersAndGroups
getent group monotone > /dev/null || groupadd -r monotone
getent passwd monotone > /dev/null ||
-useradd -r -g monotone -r -d %{_localstatedir}/db/monotone -s /sbin/nologin \
- -c "Monotone Netsync Server"
+useradd -r -g monotone -r -d %{_localstatedir}/lib/monotone -s /sbin/nologin \
+ -c "Monotone Netsync Server" monotone
exit 0
%post server
@@ -171,6 +175,11 @@
%changelog
+* Sat Dec 22 2007 Roland McGrath <roland at redhat.com> - 0.38-2
+- Fix monotone-server user creation. (#426607)
+- Moved monotone-server database to /var/lib. (#426608)
+- Use monotone@ in server key name. (#426609)
+
* Fri Dec 21 2007 Roland McGrath <roland at redhat.com> - 0.38-1
- Updated for 0.38 release.
Index: monotone.sysconfig
===================================================================
RCS file: /cvs/pkgs/rpms/monotone/F-8/monotone.sysconfig,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- monotone.sysconfig 28 Feb 2007 21:37:42 -0000 1.4
+++ monotone.sysconfig 22 Dec 2007 23:54:29 -0000 1.5
@@ -1,6 +1,6 @@
MONOTONE_CONFDIR=/etc/monotone
MONOTONE_KEYDIR=/etc/monotone/private-keys
-MONOTONE_DBFILE=/var/db/monotone/server.mtn
+MONOTONE_DBFILE=/var/lib/monotone/server.mtn
MONOTONE_PPFILE=/etc/monotone/passphrase.lua
MONOTONE_RCOPTS="--confdir=$MONOTONE_CONFDIR"
More information about the fedora-extras-commits
mailing list