[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Proposed work for running svnserve as a Windows service

From: Arlie Davis <adavis_at_stonestreetone.com>
Date: 2006-02-20 17:31:16 CET

This message is a summary of the work I propose to do to add support to
svnserve for running as a Windows Service. If you are interested in this
feature, please read through this, and provide your (constructive) comments,
either on-list or privately to me.

Summary
-------

svnserve would be modified to add support for running "natively" as a
Windows service. This allows svnserve to be managed like any other Windows
service (start / stop from "Services" management tool, see status, manage it
remotely, etc.), to be reliably started when the system boots, and to be
reliably stopped when the system shuts down.

Support will be provided for installing, enumerating, and uninstalling
instances of svnserve services. The implementation would support any number
of svnserve repositories; there will not be any limitation on the number of
installed services.

Command-line Changes
--------------------

svnserve would be modified to support these new command-line parameters:

        --service
                Causes the process to run as a Windows service. Users do
                not specify this switch; this switch will only be present
                when the service is launched by the Windows Service Control
                Manager (SCM). This flag is mutually exclusive with the
                other start-mode flags, such as --inetd, --tunnel, --daemon,
                and so on. Does not require any parameters.

        --create-service <name> --root <root> [--auto | --demand]
                Installs a new Windows Service for a given Subversion
                repository. The service is created, but is intentionally
                not started. The usual Windows procedures for starting
                and stopping the service apply ("net start <name>" and
                "net stop <name>", or using the standard Windows service
                management GUI). The --auto switch indicates that the
                service will start when the system boots, and is the
                default. The --demand switch indicates that the service
                will not automatically start when the system boots.
                This behavior can later be changed using the standard
                Windows service management UI.

        --delete-service <name> --root <root>
                Deletes a service that was created using --create-srevice.
                As a safe-guard, the user must provide the same root path
                that was specified during --create-service, in order to
                insure that the correct service instance is being deleted.

Code changes
------------

svnserve/main.c
        - Will add command-line parameters for installing,
                enumerating, and uninstalling svnserve service instances.
        - Will add command-line parameters for running the process *as*
                a service. This command-line parameter will only be used
                when the Win32 Service Control Manager launches the process,
                not when users launch it.

Configuration Data
------------------

svnserve would be modified to store and read the path to the repository
directory in the registry key for the service. This allows svnserve to
start without requiring the --root parameter when it is started by the
Service Control Manager. The --root parameter could still be used to
override the repository path.

No other values would be stored in the registry.

Installer GUI
-------------

In addition to the command-line support for creating and managing
service instances, I'll contribute a GUI app for doing the same thing.

Doc changes
-----------

I'll document the procedures for installing, managing, and uninstalling
svnserve services.

Licensing / Intellectual Property
---------------------------------

I will contribute this work free of charge, no strings attached, in
perpetuity, blah blah blah to the Subversion project, such that the work is
compatible with the existing Subversion license.

Request for Comments
--------------------

If anyone is interested in this work, please send me feedback, either
off-list or on-list.
I want to do this work because 1) So far, I'm very pleased with Subversion,
and now use it
as my primary revision control system, and 2) I have many, many years of
experience writing
Windows services, and know that I can do this "right".

-- arlie

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Feb 21 16:41:21 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.