subversion doesn't includes a /etc/init.d/svnserve script

Bug #58625 reported by David Gómez
60
This bug affects 10 people
Affects Status Importance Assigned to Milestone
subversion (Debian)
New
Unknown
subversion (Ubuntu)
Confirmed
Wishlist
Unassigned
Nominated for Lucid by Jarl

Bug Description

Binary package hint: subversion

A init script to launch subversion it's really important a should be included in the subversion package to allow to launch the subversion server in a fast way. Not everybody wants to launch their svnserver thru xinetd or apache.

Revision history for this message
In , David Kimdon (david-kimdon) wrote : Re: Bug#232584: /usr/bin/svnserve: Need an init.d script?

On Fri, Feb 13, 2004 at 09:45:59PM +0000, Benedict Adamson wrote:
> Package: subversion
> Version: 0.37.0-2
> Severity: wishlist
> File: /usr/bin/svnserve

My expectation is that in most cases svnserve is used on conjunction
with ssh or is started via inetd. In that case no init.d script is
needed since the login session or inetd invokes svnserve. Should
there be a commented entry in /etc/inetd.conf? Would you consider
that enough? If you can describe a bit how you are using svnserve
we can probably find something that makes sense.

Thanks for the report,

-David
>
> For a serious development computer, the subversion server
> should be started on boot. That is, there should be an
> /etc/init.d script for starting svnserve
> (apache2 is already started, of, course, for those that use WebDAV).
> It would be nice if the Debian package included (at least)
> a skeleton version of that script.
>
>
> -- System Information:
> Debian Release: testing/unstable
> APT prefers unstable
> APT policy: (500, 'unstable'), (500, 'testing')
> Architecture: i386 (i686)
> Kernel: Linux 2.4.24-1-k7
> Locale: LANG=C, LC_CTYPE=C
>
> Versions of packages subversion depends on:
> ii db4.2-util 4.2.52-10 Berkeley v4.2 Database Utilities
> ii libapr0 2.0.48-4 The Apache Portable Runtime
> ii libc6 2.3.2.ds1-10 GNU C Library: Shared libraries an
> ii libdb4.2 4.2.52-9 Berkeley v4.2 Database Libraries [
> ii libexpat1 1.95.6-6 XML parsing C library - runtime li
> ii libldap2 2.1.23-1 OpenLDAP libraries
> ii libneon24 0.24.4-3 An HTTP and WebDAV client library
> ii libssl0.9.7 0.9.7c-5 SSL shared libraries
> ii libsvn0 0.37.0-2 Subversion shared libraries
> ii libxml2 2.6.5-1 GNOME XML library
> ii patch 2.5.9-1 Apply a diff file to an original
> ii zlib1g 1:1.2.1-3 compression library - runtime
>
> -- no debconf information
>
>
>

Revision history for this message
In , Benedict Adamson (badamson) wrote :

David Kimdon wrote:
...
> My expectation is that in most cases svnserve is used on conjunction
> with ssh or is started via inetd. In that case no init.d script is
> needed

I see what you mean. I didn't realise that was the intention.

..
> Should
> there be a commented entry in /etc/inetd.conf?

That would help. Perhaps an installation configuration question asking
the user whether they want svnserve to be started by inetd would be better?

> If you can describe a bit how you are using svnserve
> we can probably find something that makes sense.

I've created my own /etc/init.d/svn and /etc/default/svnserve
I could post them if you want them.
However, svnserve seems rather lightweight so far, so inetd could be
entirely adequate.

Revision history for this message
In , Pierre THIERRY (pierre-thierry) wrote :

> My expectation is that in most cases svnserve is used on conjunction
> with ssh or is started via inetd

No, in the contrary, the SSH tunneling is more an option than the main
use case. Taken from the SVN website (http://subversion.tigris.org/) :

  "Subversion also offers a standalone server option using a custom
  protocol (not everyone wants to run Apache 2.x). The standalone server
  can run as an inetd service, or in daemon mode, and offers basic
  authentication and authorization. It can also be tunnelled over ssh."

> Should there be a commented entry in /etc/inetd.conf?

There should be a debconf question to invoke update-inetd.

But the package should also provide an init.d script, and debconf
questions about starting a standalone server or with inetd...

Alternatively,
le Moine Fou
--
<email address hidden>
OpenPGP 0xD9D50D8A

Revision history for this message
In , David Kimdon (dwhedon) wrote : merging 253323 232584

# Automatically generated email from bts, devscripts version 2.7.95.1
merge 253323 232584

Revision history for this message
In , Guilherme de S. Pastore (fatalerror) wrote : subversion

merge 242368 259226
merge 253323 276426

--
Guilherme de S. Pastore (fatalerror)
<email address hidden>

Revision history for this message
David Gómez (davidge) wrote :

Binary package hint: subversion

A init script to launch subversion it's really important a should be included in the subversion package to allow to launch the subversion server in a fast way. Not everybody wants to launch their svnserver thru xinetd or apache.

Changed in subversion:
status: Unknown → Unconfirmed
Revision history for this message
David Solbach (d-vidsolbach) wrote :

I second that.
Just installed the subversion package and googling on how to start svnserv in (k)ubuntu led me here.
I'm used to having a /etc/init.d/svn file or similar.

Micah Cowan (micahcowan)
Changed in subversion:
status: Unconfirmed → Confirmed
Revision history for this message
In , Andreas Tille (tillea) wrote : Re: /usr/bin/svnserve: Need an init.d script?

Hi,

I also stumbled upon this problem. Any news since three years?
It is just unusual if Debian provides a package that contains
server features but there is not even a hint in the docs
(for instance README.Debian) how to start the server. If I
personally would maintain such a package I would even split up
the package into two (perhaps three): subversion-client and
subversion-server (perhaps subversion-common).

Kind regards

          Andreas.

--
http://fam-tille.de

Revision history for this message
Bill Robinson (airbaggins) wrote :

Yes this script is always missing from all distributions. It is quite annoying that it's never included and I believe it's quite a trivial script to include.

Revision history for this message
Michele Renda (mic-renda) wrote :

Also I think there is need of a start script, also if it will not be enabled by default when installing subversion.

Here I attach a script that can be used (It was not written by me)

Changed in subversion:
importance: Undecided → Medium
Revision history for this message
Structed (sht-alien) wrote :

@ David Solbach:

But most people DO use Apache or xinetd (afaik). It should be included in the package, but should not start automatically. or at least, the user should be noticed that an init-script has been installed (this is especially useful for users having installed the package quite often who count on not having an init-script).

Revision history for this message
David Solbach (d-vidsolbach) wrote :

Yep, Structed is right. A disabled init script would be fine. Maybe in /usr/share/doc/svn or so...

Daniel T Chen (crimsun)
Changed in subversion:
importance: Medium → Wishlist
Revision history for this message
In , Olaf van der Spek (olaf-xwis) wrote : Ping

Hi,

Any updates?

Revision history for this message
In , JurgenD (jurgen-debo) wrote : Subversion init.d script debian

#!/bin/bash
#
# /etc/rc.d/init.d/subversion
#
# Starts the Subversion Daemon
#
# chkconfig: 2345 90 10
# description: Subversion Daemon
# processname: svnserve
# pidfile: /var/lock/subsys/svnserve

source /lib/lsb/init-functions

[ -x /usr/bin/svnserve ] || exit 1

### Default variables
SYSCONFIG="/etc/sysconfig/subversion"

### Read configuration
[ -r "$SYSCONFIG" ] && source "$SYSCONFIG"

RETVAL=0
prog="svnserve"
desc="Subversion Daemon"
pidfile="/var/run/$prog.pid"

start() {
   echo -n $"Starting $desc ($prog): "
# daemon $prog -d $OPTIONS --pid-file $pidfile
   /usr/bin/$prog -d $OPTIONS --pid-file $pidfile
   RETVAL=$?
   if [ $RETVAL -eq 0 ]; then
     touch /var/lock/subsys/$prog
   fi
   echo
}

obtainpid() {
   pidstr=`pgrep $prog`
   pidcount=`awk -v name="$pidstr" 'BEGIN{split(name,a," "); print length(a)}'`
   if [ ! -r "$pidfile" ] && [ $pidcount -ge 2 ]; then
 pid=`awk -v name="$pidstr" 'BEGIN{split(name,a," "); print a[1]}'`
 echo $prog is already running and it was not started by the init script.
   fi
}

stop() {
   echo -n $"Shutting down $desc ($prog): "
   if [ -r "$pidfile" ]; then
 pid=`cat $pidfile`
 kill -s 3 $pid
 RETVAL=$?
   else
 RETVAL=1
   fi
   [ $RETVAL -eq 0 ] && success || failure
   echo
   if [ $RETVAL -eq 0 ]; then
     rm -f /var/lock/subsys/$prog
     rm -f $pidfile
   fi
   return $RETVAL
}

restart() {
 stop
 start
}

forcestop() {
   echo -n $"Shutting down $desc ($prog): "

   kill -s 3 $pid
   RETVAL=$?
   [ $RETVAL -eq 0 ] && success || failure
   echo
   if [ $RETVAL -eq 0 ]; then
     rm -f /var/lock/subsys/$prog
     rm -f $pidfile
   fi

   return $RETVAL
}

status() {
   if [ -r "$pidfile" ]; then
 pid=`cat $pidfile`
   fi
   if [ $pid ]; then
           echo "$prog (pid $pid) is running..."
   else
        echo "$prog is stopped"
   fi
}

obtainpid

case "$1" in
  start)
   start
   ;;
  stop)
   stop
   ;;
  restart)
   restart
   RETVAL=$?
   ;;
  condrestart)
   [ -e /var/lock/subsys/$prog ] && restart
   RETVAL=$?
   ;;
  status)
   status
   ;;
  forcestop)
   forcestop
   ;;
  *)
   echo $"Usage: $0 {start|stop|forcestop|restart|condrestart|status}"
   RETVAL=1
esac

exit $RETVAL

Revision history for this message
In , JurgenD (jurgen-debo) wrote : Credits
Revision history for this message
In , JurgenD (jurgen-debo) wrote : Some corrections

You need to verify this script to make it perfect.

There are $OPTIONS in the start section.
I needed to put this line to make it work:

/usr/bin/$prog --daemon --pid-file $pidfile --root=/var/lib/svn/ $OPTIONS

So review this script before integration.
Maybe it should be tweaked to use standard, tunneling by ssh, with the
--tunnel option and allow read-only by direct access to the daemon
running at localhost.

Revision history for this message
In , Marcus Better (mbetter) wrote : found 232584 in 1.6.3dfsg-1, found 232584 in 1.6.5dfsg-1

found 232584 1.6.3dfsg-1
found 232584 1.6.5dfsg-1

Revision history for this message
In , Marco Solieri (soujak) wrote : New Subversion init.d script

I have written a new version of a init.d script from the skeleton
provided from Jurgen DEBO. The initscript has a LSB compliant header
and uses external options from a default configuration file
(/etc/default).

It can be easily extended for setting up a default non-start policy,
target to the medium user. I would like this script to be integrated in
newer version of the package.

--
Marco Solieri
 aka SoujaK

Revision history for this message
Jarl (jarl-dk) wrote :

The documentation (https://help.ubuntu.com/community/Subversion#Start svnserve at bootup) reccomends to use this script: http://odyniec.net/articles/ubuntu-subversion-server/svnserve

So one should expect that script to be very close to official supported script.

Jarl

Revision history for this message
Jarl (jarl-dk) wrote :

There are many comments that indicates that people would like to see this bug fixed, however, few of you have marked the bug as affecting you, please mark it as affected as this would indicate your interest.

Revision history for this message
larsen (larsen007) wrote :
Revision history for this message
In , Igor A Tarasov (dicr) wrote :

Morend way is to use /etc/default/${service} file with "ENABLED=no" instead of commenting out entries in init scripts.
Initscript is missing for included svnserve component.

Revision history for this message
Igor A Tarasov (dicr) wrote :

7 years (since 2004) is not enough to create init script for package :)
good job ! :)

Revision history for this message
Ben Coleman (b-coleman) wrote :

What's holding this up?

Revision history for this message
Hontvári József Levente (hontvari) wrote :

A separate subversion-daemon package which depends on the core subversion package, and contains nothing else than the daemon script is useful for those of us who runs svnserve without Apache, and it does not stand in the way of others.

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

You can find here how to setup svnserve with systemd: https://bugs.launchpad.net/ubuntu/+source/subversion/+bug/1915047

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.