Browse files

(please read full commit message) upgrade behaviour changed

    **upgrades no longer touch the config or the keydir**

When you first install gitolite, the easy install script has to do two
*distinct* things:

  * install the software
  * create and seed the gitolite-admin repo with a minimum config file
    and the newly created pubkey

That's fine for an install, because nothing exists yet anyway.

Subsequent invocations of the script should only do the first task (so
that gitolite itself can be upgraded), and not attempt to fiddle with
the config file and pubkeys.

Unfortunately, until now I had not been separating these two activities
cleanly enough.  For instance, the commit message for 8e47e01 said:

    IMPORTANT: we assume that $admin_name remains the same in an upgrade
    -- that's how we detect it is an upgrade!  Change that name or his
    pubkey, and you're toast!


So now I decided to clean things up.  The "Usage" message tells you
clearly what to do for an upgrade.

Should have been like this from the beginning, but hey we got there
eventually :)


Code-wise, this is a major refactor of the easy install script.  It uses
an old forgotten trick to get forward refs for bash functions ;-) and in
the process cleans up the flow quite a bit.
  • Loading branch information...
Sitaram Chamarty
Sitaram Chamarty committed Nov 6, 2009
1 parent 130478e commit c4069dd85f9d48d02b70c157cabcc111bbe8337e
Showing with 358 additions and 242 deletions.
  1. +17 −0 doc/0-INSTALL.mkd
  2. +341 −242 src/
@@ -16,6 +16,7 @@ In this document:
* advantages over the older install methods
* disadvantages
* manual install
+ * upgrades
* other notes
* next steps
@@ -75,6 +76,22 @@ If you don't have bash, it's not very complicated to do it manually. Just
open the file `src/` in a nice, syntax coloring, text
editor, and follow the instructions marked "MANUAL" :-)
+### upgrades
+Upgrading gitolite is easy.
+To upgrade, pull the latest "master" (or other) branch in your gitolite repo
+clone, then run the same exact command you ran to do the install, except you
+can leave out the last argument.
+And you might want to add a `-q` to speed things up :-)
+Note that this only upgrades the software. Unlike earlier versions, it does
+**not** touch the `conf/gitolite.conf` file or the contents of `keydir` in any
+way. I decided that it is not possible to **safely** let an upgrade do
+something meaningful with them -- fiddling with existing config files (as
+opposed to merely creating one which did not exist) is best left to a human.
### other notes
* if you run `src/` without the `-q` option, you will be
Oops, something went wrong.

0 comments on commit c4069dd

Please sign in to comment.