Subject: pkg/35931: monotone-server package's "monotone-server-init" script broken
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 03/05/2007 23:50:01
>Number:         35931
>Category:       pkg
>Synopsis:       monotone-server-init seems to do the wrong thing
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 05 23:50:00 +0000 2007
>Release:        NetBSD 4.0_BETA2
System: NetBSD 4.0_BETA2 NetBSD 4.0_BETA2 (GENERIC) #0: Thu Jan 4 10:19:03 PST 2007 i386
Architecture: i386
Machine: i386
	After installing the devel/monotone-server pkg, it says to
	run "monotone-server-init", which seems to get things about
	the monotone user's home directory wrong, and results in
	a not-properly-set-up environment.
	- install monotone-server package (and monotone-0.33) as
	  binary packages

	- run 'monotone-server-init' using sudo, like this:

wiki:riz  ~> sudo monotone-server-init
The following user and group will be used to run the monotone server
process under a restricted account:

    User name `monotone', UID `1003'
    Group name `monotone', GID `1002'

If either the UID or the GID are inappropriate, please abort this
script now, correct them and restart the utility so that all the
files are created with the correct ownerships.

Press RETURN to continue or CTRL-C to abort.

The monotone package is currently configured to use the
/var/monotone directory to hold the public database.
You may now change this default path to something else that is
more suitable for your system, if you wish.

Enter home directory [/var/monotone]: 

In order to serve a collection, you must now create a public/private key
pair to access the database.  This has to be _different_ to the key pair
you use for development; it will only be used by the server process.

The key name should be in the form of an email address.  Typicall, it will
be something like monotone@your_host_name.

I have determined that is probably a good choice.

Enter key name []: 
Initializing new home directory: `/var/monotone'
Initializing database: `/var/monotone/monotone.db'
su: no directory

Monotone will now ask you for a passphrase to protect the key pair we are
creating.  Choose a hard one and write it down temporarily; you will need
to put it in one of the configuration files in a later step.  After that,
you can forget about it (assuming you have a safe copy).

su: no directory
su: no directory
su: no directory
chown: monotone.db: No such file or directory
chown: No such file or directory
chown: No such file or directory
chmod: monotone.db: No such file or directory
chmod: No such file or directory
chmod: No such file or directory

Initialization process finished!

You should now backup the following file and store it in a safe place.
It contains the key pair that authenticates your server:


At last, edit the following files to finish the configuration of your
new server:


Once finished, use the installed rc.d script (monotone) to start the
dedicated server process.

	I haven't worked out a fix yet - I just wanted to get this
	documented before I forget.