Compare commits
17 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbe9eefb00 | ||
|
|
9b7c090be5 | ||
|
|
438d5d36df | ||
|
|
f3be0f48f0 | ||
|
|
8e3dbbc6dd | ||
|
|
0bdcd3c555 | ||
|
|
9c0562a7e8 | ||
|
|
5fbe95f777 | ||
|
|
f9d1426958 | ||
|
|
cf74ad503a | ||
|
|
8d963ac1d7 | ||
|
|
cc9b46f305 | ||
|
|
a525ce0e93 | ||
|
|
48d734cfd7 | ||
|
|
81f77606a2 | ||
|
|
a05622afba | ||
|
|
6005118ac5 |
8 changed files with 144 additions and 62 deletions
|
|
@ -1 +0,0 @@
|
|||
monotone-0.30.tar.gz
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
monotone-0.38.tar.gz
|
||||
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: monotone
|
||||
# $Id$
|
||||
NAME := monotone
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
||||
|
|
@ -10,7 +10,7 @@ server instances from people using monotone.)
|
|||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -8,6 +8,20 @@
|
|||
# pidfile: /var/run/monotone/monotone-server.pid
|
||||
# config: /etc/sysconfig/monotone
|
||||
# config: /etc/monotone/monotonerc
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: monotone
|
||||
# Required-Start: $local_fs $network $named $time
|
||||
# Required-Stop: $local_fs $network
|
||||
# Short-Description: start and stop Monotone netsync protocol server
|
||||
# Description: Monotone is a free, distributed version control system.
|
||||
# It provides fully disconnected operation, manages complete
|
||||
# tree versions, keeps its state in a local transactional
|
||||
# database, supports overlapping branches and extensible
|
||||
# metadata, exchanges work over plain network protocols,
|
||||
# performs history-sensitive merging, and delegates trust
|
||||
# functions to client-side RSA certificates.
|
||||
### END INIT INFO
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
|
@ -29,6 +43,8 @@ MTSERVER=/usr/sbin/monotone-server
|
|||
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()
|
||||
{
|
||||
|
|
@ -39,11 +55,34 @@ random_passphrase()
|
|||
|
||||
umask 077
|
||||
|
||||
check_db_version()
|
||||
{
|
||||
db_version=`runuser -s /bin/bash - ${MONOTONE_USER:-monotone} \
|
||||
-c "LC_ALL=C \
|
||||
$MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS \
|
||||
db version"` || exit 2
|
||||
set -- $db_version
|
||||
[ "$5" == "(usable)" ]
|
||||
return $?
|
||||
}
|
||||
|
||||
# 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
|
||||
$0 migrate
|
||||
check_db_version || $0 migrate
|
||||
elif [ -e $MONOTONE_OLDDB ]; then
|
||||
echo -n $"Pre-0.26 monotone database must be migrated by hand: "
|
||||
failure
|
||||
|
|
@ -84,11 +123,11 @@ case "$1" in
|
|||
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/monotone
|
||||
echo
|
||||
;;
|
||||
restart)
|
||||
restart|force-reload)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
condrestart)
|
||||
condrestart|try-restart)
|
||||
[ -e /var/lock/subsys/monotone ] && $0 restart
|
||||
;;
|
||||
status)
|
||||
|
|
@ -97,10 +136,10 @@ case "$1" in
|
|||
;;
|
||||
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" ||
|
||||
|
|
@ -109,8 +148,14 @@ case "$1" in
|
|||
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"
|
||||
echo >&2 "$0:" $"To lose old key remove file" "$MONOTONE_PPFILE"
|
||||
exit 1
|
||||
fi
|
||||
echo -n $"Generating RSA key for server $MONOTONE_KEYID"
|
||||
tmp=/tmp/mtserver$$
|
||||
if
|
||||
|
|
@ -120,6 +165,7 @@ case "$1" in
|
|||
genkey $MONOTONE_KEYID > /dev/null 2>&1) &&
|
||||
/bin/chgrp ${MONOTONE_GROUP:-monotone} \
|
||||
"$MONOTONE_KEYDIR/$MONOTONE_KEYID" &&
|
||||
/bin/chmod 0640 "$MONOTONE_KEYDIR/$MONOTONE_KEYID" &&
|
||||
cat > $tmp <<EOF &&
|
||||
function get_passphrase(keyid)
|
||||
return "$passphrase"
|
||||
|
|
@ -137,12 +183,12 @@ EOF
|
|||
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=$?
|
||||
|
|
@ -154,7 +200,7 @@ EOF
|
|||
echo $"Checking database format in" "${MONOTONE_DBFILE}:"
|
||||
(umask 027
|
||||
$MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS $MONOTONE_PPOPTS db migrate &&
|
||||
$MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS $MONOTONE_PPOPTS db regenerate_rosters &&
|
||||
$MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS $MONOTONE_PPOPTS db regenerate_caches &&
|
||||
/bin/chgrp -R ${MONOTONE_GROUP:-monotone} $MONOTONE_KEYDIR)
|
||||
success $"database check" ||
|
||||
failure $"database check"
|
||||
|
|
|
|||
107
monotone.spec
107
monotone.spec
|
|
@ -1,13 +1,13 @@
|
|||
Name: monotone
|
||||
Version: 0.30
|
||||
Release: 1%{?dist}
|
||||
Version: 0.38
|
||||
Release: 2%{?dist}
|
||||
|
||||
Summary: A free, distributed version control system
|
||||
Group: Development/Tools
|
||||
License: GPL
|
||||
|
||||
URL: http://www.venge.net/monotone/
|
||||
Source0: http://www.venge.net/monotone/downloads/%{name}-%{version}.tar.gz
|
||||
URL: http://monotone.ca/
|
||||
Source0: http://monotone.ca/downloads/%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: monotone.init
|
||||
Source2: monotone.sysconfig
|
||||
Source3: README.monotone-server
|
||||
|
|
@ -36,7 +36,7 @@ BuildRequires: cvs
|
|||
BuildRequires: emacs
|
||||
|
||||
Requires(post): /sbin/install-info
|
||||
Requires(postun): /sbin/install-info
|
||||
Requires(preun): /sbin/install-info
|
||||
|
||||
%description
|
||||
monotone is a free, distributed version control system.
|
||||
|
|
@ -50,6 +50,9 @@ functions to client-side RSA certificates.
|
|||
%package server
|
||||
Summary: Standalone server setup for monotone
|
||||
Requires: monotone = %{version}-%{release}
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): /sbin/service, /sbin/chkconfig
|
||||
Requires(preun): /sbin/service, /sbin/chkconfig
|
||||
Group: Development/Tools
|
||||
|
||||
%description server
|
||||
|
|
@ -65,7 +68,7 @@ This package provides an easy-to-use standalone server setup for monotone.
|
|||
make %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
make check || { cat tester_dir/tester.log; false; }
|
||||
make %{?_smp_mflags} check || { cat tester_dir/*.log; false; }
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
|
|
@ -75,29 +78,35 @@ rm -f %{buildroot}%{_datadir}/doc/monotone/monotone.html
|
|||
|
||||
%find_lang %{name}
|
||||
|
||||
compldir=%{buildroot}%{_sysconfdir}/bash_completion.d
|
||||
mkdir -p ${compldir}
|
||||
%{__install} -c -m 0444 contrib/monotone.bash_completion ${compldir}
|
||||
|
||||
lispdir=%{buildroot}%{_datadir}/emacs/site-lisp
|
||||
mkdir -p ${lispdir}
|
||||
%{__install} -c -m 0444 contrib/monotone*.el ${lispdir}
|
||||
emacs -batch -f batch-byte-compile ${lispdir}
|
||||
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/init.d
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
||||
mkdir -p %{buildroot}%{_localstatedir}/db
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib
|
||||
ln -snf ../bin/mtn %{buildroot}%{_sbindir}/monotone-server
|
||||
%{__install} -c -m 0555 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/monotone
|
||||
%{__install} -c -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/monotone
|
||||
%{__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} .
|
||||
|
||||
|
|
@ -111,7 +120,7 @@ then
|
|||
/sbin/install-info %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun
|
||||
%preun
|
||||
if [ $1 -eq 0 ]
|
||||
then
|
||||
/sbin/install-info --delete %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || :
|
||||
|
|
@ -124,9 +133,8 @@ fi
|
|||
|
||||
%{_bindir}/mtn
|
||||
%{_infodir}/monotone.info*
|
||||
%{_mandir}/man1/mtn.1*
|
||||
%{_datadir}/emacs/site-lisp/monotone*.el*
|
||||
|
||||
%{_sysconfdir}/bash_completion.d
|
||||
|
||||
%files server
|
||||
%doc README.monotone-server
|
||||
|
|
@ -141,13 +149,16 @@ fi
|
|||
%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 the "monotone" user
|
||||
/usr/sbin/useradd -c "Monotone Netsync Server" \
|
||||
-s /sbin/nologin -r -d %{_localstatedir}/db/monotone monotone 2> /dev/null || :
|
||||
# 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}/lib/monotone -s /sbin/nologin \
|
||||
-c "Monotone Netsync Server" monotone
|
||||
exit 0
|
||||
|
||||
%post server
|
||||
# Register the monotone service
|
||||
|
|
@ -164,6 +175,52 @@ fi
|
|||
|
||||
|
||||
%changelog
|
||||
* Sat Dec 22 2007 Roland McGrath <roland@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@redhat.com> - 0.38-1
|
||||
- Updated for 0.38 release.
|
||||
|
||||
* Sat Oct 27 2007 Roland McGrath <roland@redhat.com> - 0.37-3
|
||||
- Updated for 0.37 release.
|
||||
- Prevent destroying old passphrase file with 'service monotone genkey'.
|
||||
- Put LSB standard comments in monotone.init for monotone-server subpackage.
|
||||
|
||||
* Tue Aug 28 2007 Roland McGrath <roland@redhat.com> - 0.36-2
|
||||
- Clean up %%pre script per packaging guidelines.
|
||||
- Disable ppc and ppc64 builds temporarily since make check fails. (#259161)
|
||||
|
||||
* Fri Aug 3 2007 Roland McGrath <roland@redhat.com> - 0.36-1
|
||||
- Updated for 0.36 release.
|
||||
|
||||
* Fri Jul 06 2007 Florian La Roche <laroche@redhat.com> - 0.35-4
|
||||
- add more requires
|
||||
|
||||
* Wed May 16 2007 Roland McGrath <roland@redhat.com> - 0.35-3
|
||||
- Fix locale dependency in monotone-server init script. (#213893)
|
||||
|
||||
* Wed May 9 2007 Roland McGrath <roland@redhat.com> - 0.35-2
|
||||
- Updated for 0.35 release.
|
||||
- Avoid unnecessary "db migrate" in monotone-server init script. (#213893)
|
||||
|
||||
* Wed Apr 4 2007 Roland McGrath <roland@redhat.com> - 0.34-1
|
||||
- Updated for 0.34 release.
|
||||
|
||||
* Thu Mar 1 2007 Roland McGrath <roland@redhat.com> - 0.33-1
|
||||
- Updated for 0.33 release.
|
||||
- Install monotone.bash_completion file.
|
||||
|
||||
* Wed Feb 28 2007 Roland McGrath <roland@redhat.com> - 0.32-1
|
||||
- Updated for 0.32 release.
|
||||
|
||||
* Thu Dec 21 2006 Kevin Fenzi <kevin@tummy.com> - 0.31-2
|
||||
- Bump and rebuild to fix upgrade path
|
||||
|
||||
* Sat Nov 11 2006 Roland McGrath <roland@redhat.com> - 0.31-1
|
||||
- Updated for 0.31 release.
|
||||
|
||||
* Tue Oct 10 2006 Roland McGrath <roland@redhat.com> - 0.30-1
|
||||
- Updated for 0.30 release.
|
||||
- Fix service script to work around buggy init.d/functions. (#198761)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
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"
|
||||
MONOTONE_DBOPTS="--db=$MONOTONE_DBFILE --keydir=$MONOTONE_KEYDIR"
|
||||
MONOTONE_PPOPTS="--rcfile=$MONOTONE_PPFILE"
|
||||
|
||||
MONOTONE_SERVE_OPTS="'*'"
|
||||
MONOTONE_SERVE_OPTS=""
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
94a1f8369162f7a7df8596b365a1d846 monotone-0.30.tar.gz
|
||||
c1a0d2619f451a664289b042c104860d monotone-0.38.tar.gz
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue