monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Debian package enhancements


From: Matthew A. Nicholson
Subject: Re: [Monotone-devel] Debian package enhancements
Date: Thu, 19 May 2005 07:55:42 -0500
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050404)

Thanks for your feedback.  This is just a prelimnary verson of these
modifications.  Eventually once I have my postinstall and stuff set up, monotone
will generate the config, modify /etc/default/monotone, built a db and keys, and
  create a user for monotone to run under.

I will go ahead an make the other changes you suggested.  If you wanna help with
the postinstall stuff by all means do.  I just think having this stuff in place,
will go a long way towards people using monotone, as it will greatly simplify
setting up a proper server.  See below:

Tomas Fasth wrote:
> Matthew, all,
> 
> I have a few comments to your suggested patch.
> 
> The debian files have changed in repository since the release of
> monotone 0.19. You may want to update your patch to reflect those
> changes.

How can I sync up with these changes?  I am guessing they are in a monotone
server some where.

> I would not recommend to run a monotone service as root. As far as I
> know, there's nothing in monotone that require root priviledges.
> 
> It seem to me that running monotone in serve mode will only be
> applicable to single user machines, right? It seem to me that
> monotone can only serve one set of collections given before hand,
> and that the network port is not configurable at run time (only at
> compile time). In practice this should mean that you can only run
> one predefined set of collections on each machine unless you have
> more than one ip address bound to the same machine.
> 
> Because of this, I am not entirely convinced that the monotone
> Debian package should provide a network service "out-of-the-box".
> 
> More comments interlaced below.
> 
> Matthew A. Nicholson wrote:
> 
>>>This patch fixes a missing build-dep of texinfo and adds init script
>>>support for monotone.  This patch is not complete as it does not create
>>>a hooks file or create a database.  Once I am finished (if ever) I will
>>>have the necessary postinstall hooks to do those tasks.  If some one
>>>else feels the need go ahead and build from my work.
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>diff -ruN monotone-0.19/debian/control monotone-0.19.new/debian/control
>>>--- monotone-0.19/debian/control     2005-04-05 00:44:20.000000000 -0500
>>>+++ monotone-0.19.new/debian/control 2005-05-18 10:31:42.919667632 -0500
>>>@@ -2,7 +2,7 @@
>>> Section: devel
>>> Priority: optional
>>> Maintainer: graydon hoare <address@hidden>
>>>-Build-Depends: debhelper (>> 4.0.0), libboost-dev (>= 1.30.2), 
>>>libboost-regex-dev (>= 1.30.2), libboost-date-time-dev (>= 1.30.2), 
>>>libboost-test-dev (>= 1.30.2), libboost-filesystem-dev (>= 1.31.0)
>>>+Build-Depends: debhelper (>> 4.0.0), libboost-dev (>= 1.30.2), 
>>>libboost-regex-dev (>= 1.30.2), libboost-date-time-dev (>= 1.30.2), 
>>>libboost-test-dev (>= 1.30.2), libboost-filesystem-dev (>= 1.31.0), texinfo
>>> Standards-Version: 3.5.9
>>> 
>>> Package: monotone
>>>diff -ruN monotone-0.19/debian/monotone.default 
>>>monotone-0.19.new/debian/monotone.default
>>>--- monotone-0.19/debian/monotone.default    1969-12-31 18:00:00.000000000 
>>>-0600
>>>+++ monotone-0.19.new/debian/monotone.default        2005-05-18 
>>>09:58:58.213348392 -0500
>>>@@ -0,0 +1,17 @@
>>>+# init.d config file for monotone
>>>+
>>>+# this must be set to 1 for monotone to start
>>>+START=0
>>>+
>>>+# the address and or port (ADDRESS[:PORT]) monotone should listen on
>>>+ADDRESS=0.0.0.0
>>>+
>>>+# the database to use
>>>+DB=/var/lib/monotone/default.db
>>>+
>>>+# Collections that monotone should serve (seperated by white space)
>>>+COLLECTIONS="com.collection                     \
>>>+             com.collection.branch              \
>>>+             collection.com                     \
>>>+             collection.com/branch"
>>>+
>>>diff -ruN monotone-0.19/debian/monotone.init 
>>>monotone-0.19.new/debian/monotone.init
>>>--- monotone-0.19/debian/monotone.init       1969-12-31 18:00:00.000000000 
>>>-0600
>>>+++ monotone-0.19.new/debian/monotone.init   2005-05-18 10:02:47.287523824 
>>>-0500
>>>@@ -0,0 +1,114 @@
>>>+#! /bin/sh
>>>+#
>>>+# monotone  Monotone server init script.
>>>+#
>>>+# Author:   Matthew A. Nicholson <address@hidden>.
>>>+#
>>>+# Version:  v0.0.1  March 29, 2005  address@hidden
>>>+#
>>>+### BEGIN INIT INFO
>>>+# Provides: monotone
>>>+# Required-Start: $network $local_fs
>>>+# Required-Stop: $network $local_fs
>>>+# Default-Start: 3 4 5
>>>+# Default-Stop: 0 1 2 6
> 
> 
> Just a side note; The default runlevel in Debian is 2. But you
> probably knew that already. I'm not sure why Debian wasn't designed
> to use run level 2 for local services and 3 for network services.

Debian does not use the LSB INIT INFO stuff yet.  The run levels in there are
the lsb standard stuff.

>>>+# Short-Description: Monotone server.
>>>+### END INIT INFO
>>>+
>>>+set -e
>>>+
>>>+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
>>>+DESC="Monotone Server"
>>>+NAME=monotone
>>>+DAEMON=/usr/bin/$NAME
>>>+PIDFILE=/var/run/$NAME.pid
>>>+SCRIPTNAME=/etc/init.d/$NAME
>>>+
>>>+# Gracefully exit if the package has been removed.
>>>+test -x $DAEMON || exit 0
>>>+
>>>+# Read config file 
>>>+. /etc/default/$NAME
> 
> 
> You should not try to read the file if it does not exist. The
> following construct is suggested in /etc/init.d/skeleton.

> # Read config file if it is present.
> #if [ -r /etc/default/$NAME ]
> #then
> #       . /etc/default/$NAME
> #fi

Will do.

>>>+
>>>+if [ $START -ne 1 ]; then
> 
> 
> You should test that the $START variable is defined, or at least put
> it inside quotes like this:
> 
> if [ "$START" -ne 1 ]; then

Will do.



-- 
Matthew A. Nicholson
Matt-land.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]