When installing gitolite I find that:
# aptitude install gitolite
The following NEW packages will be installed:
gitolite
0 packages upgraded, 1 newly installed, 0 to remove and 29 not upgraded.
Need to get 114 kB of archives. After unpacking 348 kB will be used.
Get:1 http://security.debian.org/ squeeze/updates/main gitolite all 1.5.4-2+squeeze1 [114 kB]
Fetched 114 kB in 0s (202 kB/s)
Preconfiguring packages ...
Selecting previously deselected package gitolite.
(Reading database ... 30593 files and directories currently installed.)
Unpacking gitolite (from .../gitolite_1.5.4-2+squeeze1_all.deb) ...
Setting up gitolite (1.5.4-2+squeeze1) ...
No adminkey given - not initializing gitolite in /var/lib/gitolite.
The last line is of interest to me. If I run dpkg-reconfigure -plow gitolite
I am presented with a dialog and can modify:
- the system user name for gitolite,
- the location of the gitolite repositories and
- provide the admin pubkey.
I'd prefer to use the git
system user and provide the admin pubkey on installation, say something of the sort:
# aptitude install gitolite --user git --admin-pubkey 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDAc7kCAi2WkvqpAL1fK1sIw6xjpatJ+Ms2nrwLJPhdovEY3MPZF7mtH+rv1CHFDn66fLGiWevOFp...'
That, of course, doesn't work. Can something similar be done? How do I determine the configuration parameters ahead of time? This would be remarkably useful, for instance, when installing gitolite automatically, via puppet or chef.
I haven't tested this, but I believe that after you run your
dpkg-reconfigure
on an example machine, you can rundebconf-get-selections | egrep "^gitolite\s"
to get what was set. (it's in thedebconf-utils
package if you don't have it).Then on the CLI,
debconf-set-selections $FILENAME
before running apt.Then with puppet it would be something like:
More info on puppet's site:
I suspect Chef has a similar mechanism for specifying a responsefile or preseed file or something like that, but I'm not a Chef user.
You need to provide a preseed to work around this. See how it is done for Java in this module. I find that the easiest way to get a preseed file is to do a manual installation and configuration first, and then getting the seed from that. This blog has a good example of this.
I was searching for a way to do this with the ttf-mscorefonts-installer package on Ubuntu. Using the above instructions came up with this puppet recipe: