Compare commits
22 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79a14131c2 | ||
|
|
90d6eddcc4 | ||
|
|
5888b9681f | ||
|
|
b41c8f4826 | ||
|
|
dfc97cd2c2 | ||
|
|
0f50c69374 | ||
|
|
70a9dae56a | ||
|
|
dc95645d5d | ||
|
|
4a90566118 | ||
|
|
05961076e4 | ||
|
|
6b3a50cfe2 | ||
|
|
76bbddd1b8 | ||
|
|
afd58a1441 | ||
|
|
07eab3520f | ||
|
|
80aa58c260 | ||
|
|
31b1f6260a | ||
|
|
51bb053a7f | ||
|
|
7e520fa20b | ||
|
|
f70aa1f255 | ||
|
|
7411863ae2 | ||
|
|
febca2a257 | ||
|
|
4d23324fad |
11 changed files with 423 additions and 73 deletions
|
|
@ -1 +0,0 @@
|
|||
monotone-0.30.tar.gz
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
monotone-0.42.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
|
||||
|
|
|
|||
90
monotone-0.42-gcc44.patch
Normal file
90
monotone-0.42-gcc44.patch
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
diff -up monotone-0.42/key_store.cc.orig monotone-0.42/key_store.cc
|
||||
--- monotone-0.42/key_store.cc.orig 2008-12-14 00:02:12.000000000 +0100
|
||||
+++ monotone-0.42/key_store.cc 2009-02-07 17:23:27.000000000 +0100
|
||||
@@ -460,30 +460,30 @@ key_store::cache_decrypted_key(const rsa
|
||||
|
||||
void
|
||||
key_store::create_key_pair(database & db,
|
||||
- rsa_keypair_id const & id,
|
||||
+ rsa_keypair_id const & ident,
|
||||
utf8 const * maybe_passphrase,
|
||||
id * maybe_pubhash,
|
||||
id * maybe_privhash)
|
||||
{
|
||||
conditional_transaction_guard guard(db);
|
||||
|
||||
- bool exists = key_pair_exists(id);
|
||||
+ bool exists = key_pair_exists(ident);
|
||||
if (db.database_specified())
|
||||
{
|
||||
guard.acquire();
|
||||
- exists = exists || db.public_key_exists(id);
|
||||
+ exists = exists || db.public_key_exists(ident);
|
||||
}
|
||||
- N(!exists, F("key '%s' already exists") % id);
|
||||
+ N(!exists, F("key '%s' already exists") % ident);
|
||||
|
||||
utf8 prompted_passphrase;
|
||||
if (!maybe_passphrase)
|
||||
{
|
||||
- get_passphrase(prompted_passphrase, id, true, true);
|
||||
+ get_passphrase(prompted_passphrase, ident, true, true);
|
||||
maybe_passphrase = &prompted_passphrase;
|
||||
}
|
||||
|
||||
// okay, now we can create the key
|
||||
- P(F("generating key-pair '%s'") % id);
|
||||
+ P(F("generating key-pair '%s'") % ident);
|
||||
RSA_PrivateKey priv(*s->rng, static_cast<Botan::u32bit>(constants::keylen));
|
||||
|
||||
// serialize and maybe encrypt the private key
|
||||
@@ -514,20 +514,20 @@ key_store::create_key_pair(database & db
|
||||
% kp.priv().size());
|
||||
|
||||
// and save it.
|
||||
- P(F("storing key-pair '%s' in %s/") % id % get_key_dir());
|
||||
- put_key_pair(id, kp);
|
||||
+ P(F("storing key-pair '%s' in %s/") % ident % get_key_dir());
|
||||
+ put_key_pair(ident, kp);
|
||||
|
||||
if (db.database_specified())
|
||||
{
|
||||
- P(F("storing public key '%s' in %s") % id % db.get_filename());
|
||||
- db.put_key(id, kp.pub);
|
||||
+ P(F("storing public key '%s' in %s") % ident % db.get_filename());
|
||||
+ db.put_key(ident, kp.pub);
|
||||
guard.commit();
|
||||
}
|
||||
|
||||
if (maybe_pubhash)
|
||||
- key_hash_code(id, kp.pub, *maybe_pubhash);
|
||||
+ key_hash_code(ident, kp.pub, *maybe_pubhash);
|
||||
if (maybe_privhash)
|
||||
- key_hash_code(id, kp.priv, *maybe_privhash);
|
||||
+ key_hash_code(ident, kp.priv, *maybe_privhash);
|
||||
}
|
||||
|
||||
void
|
||||
diff -up monotone-0.42/key_store.hh.orig monotone-0.42/key_store.hh
|
||||
--- monotone-0.42/key_store.hh.orig 2008-10-03 15:30:21.000000000 +0200
|
||||
+++ monotone-0.42/key_store.hh 2009-02-07 17:21:54.000000000 +0100
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
|
||||
void cache_decrypted_key(rsa_keypair_id const & id);
|
||||
|
||||
- void create_key_pair(database & db, rsa_keypair_id const & id,
|
||||
+ void create_key_pair(database & db, rsa_keypair_id const & ident,
|
||||
utf8 const * maybe_passphrase = NULL,
|
||||
id * maybe_pubhash = NULL,
|
||||
id * maybe_privhash = NULL);
|
||||
diff -up monotone-0.42/sanity.hh.orig monotone-0.42/sanity.hh
|
||||
--- monotone-0.42/sanity.hh.orig 2008-11-23 22:32:49.000000000 +0100
|
||||
+++ monotone-0.42/sanity.hh 2009-02-07 17:21:42.000000000 +0100
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <stdexcept>
|
||||
#include <ostream>
|
||||
+#include <cstdio>
|
||||
|
||||
#include "boost/current_function.hpp"
|
||||
|
||||
101
monotone-0.42-netsync.patch
Normal file
101
monotone-0.42-netsync.patch
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
diff -up monotone-0.42/netsync.cc.orig monotone-0.42/netsync.cc
|
||||
--- monotone-0.42/netsync.cc.orig 2009-02-04 13:53:00.000000000 +0100
|
||||
+++ monotone-0.42/netsync.cc 2009-02-04 13:53:49.000000000 +0100
|
||||
@@ -353,7 +353,7 @@ unsigned int reactable::count = 0;
|
||||
|
||||
class session_base : public reactable
|
||||
{
|
||||
- bool read_some();
|
||||
+ void read_some(bool & failed, bool & eof);
|
||||
bool write_some();
|
||||
void mark_recent_io()
|
||||
{
|
||||
@@ -468,10 +468,12 @@ session_base::which_events()
|
||||
return ret;
|
||||
}
|
||||
|
||||
-bool
|
||||
-session_base::read_some()
|
||||
+void
|
||||
+session_base::read_some(bool & failed, bool & eof)
|
||||
{
|
||||
I(inbuf.size() < constants::netcmd_maxsz);
|
||||
+ eof = false;
|
||||
+ failed = false;
|
||||
char tmp[constants::bufsz];
|
||||
Netxx::signed_size_type count = str->read(tmp, sizeof(tmp));
|
||||
if (count > 0)
|
||||
@@ -479,17 +481,38 @@ session_base::read_some()
|
||||
L(FL("read %d bytes from fd %d (peer %s)")
|
||||
% count % str->get_socketfd() % peer_id);
|
||||
if (encountered_error)
|
||||
- {
|
||||
- L(FL("in error unwind mode, so throwing them into the bit bucket"));
|
||||
- return true;
|
||||
- }
|
||||
+ L(FL("in error unwind mode, so throwing them into the bit bucket"));
|
||||
+
|
||||
inbuf.append(tmp,count);
|
||||
mark_recent_io();
|
||||
note_bytes_in(count);
|
||||
- return true;
|
||||
+ }
|
||||
+ else if (count == 0)
|
||||
+ {
|
||||
+ // Returning 0 bytes after select() marks the file descriptor as
|
||||
+ // ready for reading signifies EOF.
|
||||
+
|
||||
+ switch (protocol_state)
|
||||
+ {
|
||||
+ case working_state:
|
||||
+ P(F("peer %s IO terminated connection in working state (error)")
|
||||
+ % peer_id);
|
||||
+ break;
|
||||
+
|
||||
+ case shutdown_state:
|
||||
+ P(F("peer %s IO terminated connection in shutdown state "
|
||||
+ "(possibly client misreported error)")
|
||||
+ % peer_id);
|
||||
+ break;
|
||||
+
|
||||
+ case confirmed_state:
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ eof = true;
|
||||
}
|
||||
else
|
||||
- return false;
|
||||
+ failed = true;
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -531,11 +554,14 @@ bool
|
||||
session_base::do_io(Netxx::Probe::ready_type what)
|
||||
{
|
||||
bool ok = true;
|
||||
+ bool eof = false;
|
||||
try
|
||||
{
|
||||
if (what & Netxx::Probe::ready_read)
|
||||
{
|
||||
- if (!read_some())
|
||||
+ bool failed;
|
||||
+ read_some(failed, eof);
|
||||
+ if (failed)
|
||||
ok = false;
|
||||
}
|
||||
if (what & Netxx::Probe::ready_write)
|
||||
@@ -578,7 +604,11 @@ session_base::do_io(Netxx::Probe::ready_
|
||||
% peer_id);
|
||||
ok = false;
|
||||
}
|
||||
- return ok;
|
||||
+
|
||||
+ // Return false in case we reached EOF, so as to prevent further calls
|
||||
+ // to select()s on this stream, as recommended by the select_tut man
|
||||
+ // page.
|
||||
+ return ok && !eof;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
12
monotone-0.42-netsync2.patch
Normal file
12
monotone-0.42-netsync2.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up monotone-0.42/netsync.cc.orig monotone-0.42/netsync.cc
|
||||
--- monotone-0.42/netsync.cc.orig 2008-12-14 00:02:12.000000000 +0100
|
||||
+++ monotone-0.42/netsync.cc 2009-02-27 19:19:37.000000000 +0100
|
||||
@@ -374,7 +374,7 @@ protected:
|
||||
}
|
||||
bool output_overfull() const
|
||||
{
|
||||
- return outbuf.size() > constants::bufsz * 10;
|
||||
+ return outbuf_size > constants::bufsz * 10;
|
||||
}
|
||||
public:
|
||||
string peer_id;
|
||||
|
|
@ -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"
|
||||
|
|
|
|||
194
monotone.spec
194
monotone.spec
|
|
@ -1,17 +1,24 @@
|
|||
Name: monotone
|
||||
Version: 0.30
|
||||
Release: 1%{?dist}
|
||||
Version: 0.42
|
||||
Release: 5%{?dist}
|
||||
|
||||
Summary: A free, distributed version control system
|
||||
Group: Development/Tools
|
||||
License: GPL
|
||||
License: GPLv2+
|
||||
|
||||
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
|
||||
|
||||
# rediffed changeset f18abebd.. from upstream
|
||||
Patch0: monotone-0.42-netsync.patch
|
||||
# rediffed changesets 33022690.. and 76e258cb.. from upstream
|
||||
Patch1: monotone-0.42-gcc44.patch
|
||||
# rediffed changeset 16184688.. from upstream
|
||||
Patch2: monotone-0.42-netsync2.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: zlib-devel
|
||||
|
|
@ -36,7 +43,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,22 +57,39 @@ functions to client-side RSA certificates.
|
|||
%package server
|
||||
Summary: Standalone server setup for monotone
|
||||
Requires: monotone = %{version}-%{release}
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): chkconfig
|
||||
Requires(preun): initscripts, chkconfig
|
||||
Requires(postun): initscripts
|
||||
Group: Development/Tools
|
||||
|
||||
%description server
|
||||
This package provides an easy-to-use standalone server setup for monotone.
|
||||
|
||||
%package -n perl-Monotone
|
||||
Summary: Perl Module for monotone
|
||||
Requires: monotone = %{version}-%{release}
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
Group: Development/Tools
|
||||
|
||||
%description -n perl-Monotone
|
||||
This is a simple Perl module to start a monotone automate sub-process
|
||||
and then pass commands to it.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .gcc44
|
||||
%patch1 -p1 -b .netsync
|
||||
%patch2 -p1 -b .netsync2
|
||||
|
||||
%build
|
||||
%configure --with-bundled-lua=%{bundled_lua} \
|
||||
--with-bundled-sqlite=%{bundled_sqlite}
|
||||
--with-bundled-sqlite=%{bundled_sqlite}
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
make check || { cat tester_dir/tester.log; false; }
|
||||
# disable parallel runs in the testsuite for now
|
||||
make check || { cat tester_dir/*.log; false; }
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
|
|
@ -75,32 +99,42 @@ 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}/rc.d/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} .
|
||||
|
||||
%{__install} -D -m 0644 -p contrib/Monotone.pm \
|
||||
%{buildroot}%{perl_vendorlib}/Monotone.pm
|
||||
|
||||
%clean
|
||||
rm -f README.monotone-server
|
||||
rm -rf %{buildroot}
|
||||
|
|
@ -108,13 +142,13 @@ rm -rf %{buildroot}
|
|||
%post
|
||||
if [ $1 -eq 1 ]
|
||||
then
|
||||
/sbin/install-info %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || :
|
||||
/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 || :
|
||||
/sbin/install-info --delete %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%files -f %{name}.lang
|
||||
|
|
@ -123,47 +157,135 @@ fi
|
|||
%doc monotone.html
|
||||
|
||||
%{_bindir}/mtn
|
||||
%{_bindir}/mtnopt
|
||||
%{_infodir}/monotone.info*
|
||||
%{_mandir}/man1/mtn.1*
|
||||
%{_datadir}/emacs/site-lisp/monotone*.el*
|
||||
%{_sysconfdir}/bash_completion.d
|
||||
|
||||
%files -n perl-Monotone
|
||||
%defattr(-,root,root,-)
|
||||
%{perl_vendorlib}/Monotone.pm
|
||||
|
||||
%files server
|
||||
%doc README.monotone-server
|
||||
%defattr(-,root,root,-)
|
||||
%doc README.monotone-server
|
||||
%{_sbindir}/monotone-server
|
||||
%{_sysconfdir}/init.d/monotone
|
||||
%{_sysconfdir}/rc.d/init.d/monotone
|
||||
%dir %attr(0755,monotone,monotone) %{_localstatedir}/run/monotone
|
||||
%config %{_sysconfdir}/sysconfig/monotone
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/monotone
|
||||
%dir %attr(0755,root,monotone) %{_sysconfdir}/monotone
|
||||
%dir %attr(0750,root,monotone) %{_sysconfdir}/monotone/private-keys
|
||||
%attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/monotone/monotonerc
|
||||
%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
|
||||
/sbin/chkconfig --add monotone
|
||||
|
||||
# Restart the running server, which will update its db format when needed.
|
||||
/sbin/service monotone condrestart
|
||||
|
||||
%preun server
|
||||
if [ $1 = 0 ]; then
|
||||
/sbin/service monotone stop > /dev/null 2>&1
|
||||
/sbin/chkconfig --del monotone
|
||||
/sbin/service monotone stop > /dev/null 2>&1
|
||||
/sbin/chkconfig --del monotone
|
||||
fi
|
||||
|
||||
%postun
|
||||
if [ $1 -gt 1 ]; then
|
||||
# Restart the running server: updates its db format when needed.
|
||||
/sbin/service monotone condrestart > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Feb 27 2009 Thomas Moschny <thomas.moschny@gmx.de> - 0.42-5
|
||||
- Add one more netsync related patch from trunk.
|
||||
|
||||
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.42-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Mon Feb 9 2009 Thomas Moschny <thomas.moschny@gmx.de> - 0.42-3
|
||||
- Disable %%{_smp_mflags} in the testsuite, causes strange errors.
|
||||
- Fix two issues with gcc44.
|
||||
- Add patch from upstream fixing netsync printing an error message of
|
||||
the form "peer [...] IO failed in confirmed state (success)".
|
||||
|
||||
* Fri Jan 2 2009 Thomas Moschny <thomas.moschny@gmx.de> - 0.42-2
|
||||
- Pack Monotone.pm (in a subpackage). (#450267)
|
||||
|
||||
* Fri Jan 2 2009 Thomas Moschny <thomas.moschny@gmx.de> - 0.42-1
|
||||
- Updated for 0.42 release.
|
||||
|
||||
* Fri Sep 12 2008 Thomas Moschny <thomas.moschny@gmx.de> - 0.41-1
|
||||
- Updated for 0.41 release.
|
||||
- Added mtnopt helper.
|
||||
|
||||
* Mon Aug 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.40-2
|
||||
- fix license tag
|
||||
|
||||
* Mon Apr 14 2008 Roland McGrath <roland@redhat.com> - 0.40-1
|
||||
- Updated for 0.40 release.
|
||||
- Tweaked trivia for packaging guidelines nits.
|
||||
|
||||
* Mon Feb 25 2008 Roland McGrath <roland@redhat.com> - 0.39-1
|
||||
- Updated for 0.39 release.
|
||||
|
||||
* 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
|
||||
c8e916d674b6608369d9f447700a8830 monotone-0.42.tar.gz
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue