gitolite/doc/g2migr.mkd

108 lines
3.8 KiB
Markdown
Raw Normal View History

2012-03-16 02:54:47 +01:00
## #g2migr migrating from g2
<font color="red">
**This document is a *MUST* read if you are currently using g2 and want to
move to g3.**
</font>
First things first: g2 will be supported for a good long time. My current
*expert* users do not cause me any load anyway.
Migration should be straightforward, but it is not automatic. You should run
the "check-g2-compat" program first, to see any *major* differences that
affect you. The bulk of the changes are in the RC file, which must be
manually handled (links below). The conf files have very few changes -- they
apply only if you use "NAME/" or delegation.
2012-03-16 02:54:47 +01:00
You must first read about [incompatible][g2incompat] features and
[dropped][g2dropped] features. Some features have been replaced with
[alternatives][g2alt].
Since the majority of changes are in the rc file, they're all listed
[here][g2rcdiff].
2012-03-16 02:54:47 +01:00
The rest of this page describes the completely standalone "check-g2-compat"
script that you can find in the repo root (i.e., not in "src/").
2012-03-16 02:54:47 +01:00
### the "check-g2-compat" program
2012-03-16 02:54:47 +01:00
This program checks a few things only, not everything. In particular, it
looks for settings and status that might:
2012-03-16 02:54:47 +01:00
* make g3 unusable for lots of users
* make g3 give *more* access than g2 under some conditions.
2012-03-16 02:54:47 +01:00
It does NOT look for or warn about anything else; you're expected to read (and
act upon, if needed) the rest of the migration guide links given a few paras
above to cover everything else.
2012-03-16 02:54:47 +01:00
Here's an explanation of those messages that the check-g2-compat program may
put that contain the words "see docs":
2012-03-16 02:54:47 +01:00
* `GL_ADMINDIR in the wrong place -- aborting`
2012-03-16 02:54:47 +01:00
It expects to find `GL_ADMINDIR` and `REPO_BASE` pointing to the right
places. It aborts if these conditions are not met and does not scan
further since that sort of guesswork is not good. If you are in that
position, make a symlink from the real location to the expected location,
change the RC accordingly, and re-try.
2012-03-16 02:54:47 +01:00
* `REPO_BASE in the wrong place -- aborting`
2012-03-16 02:54:47 +01:00
same as above
2012-03-16 02:54:47 +01:00
* `fallthru in NAME rules`
2012-03-16 02:54:47 +01:00
**This is a significant difference and affects access badly (gives access
that would otherwise not be given)**. Please see the [list of non-RC
incompatibilities][g2incompat].
2012-03-16 02:54:47 +01:00
* `subconf command in admin repo`
2012-03-16 02:54:47 +01:00
This is not so bad security wise but it might *reduce* access by not
processing files you intended to. Again, see the same link as in the
previous bullet.
2012-03-16 02:54:47 +01:00
* `found N gl-creater files`
2012-03-16 02:54:47 +01:00
These need to be renamed to `gl-creator` (the correct spelling at last,
hooray!). Suggested command sequence:
2012-03-16 02:54:47 +01:00
cd $HOME/repositories
find . -type d -name "*.git" -prune | while read r
do
mv \$r/gl-creater \$r/gl-creator
done 2>/dev/null
2012-03-16 02:54:47 +01:00
Once you do this, the g2 will not work completely unless you change them
back.
2012-03-16 02:54:47 +01:00
* `found N gl-perms files with R or RW`
2012-03-16 02:54:47 +01:00
Setting perms of R and RW will no longer work; you have to say READERS and
WRITERS now. Suggested command:
2012-03-16 02:54:47 +01:00
The following variables need to be [preset][rc-preset] in the rc file
**before** running `gitolite setup`. Otherwise the default actions will
clobber something and require some recovery.
2012-03-16 02:54:47 +01:00
* `GL_NO_SETUP_AUTHKEYS` (default will clobber your authkeys file)
2012-03-16 02:54:47 +01:00
* `GL_NO_DAEMON_NO_GITWEB` (default will clobber your projects.list file and
git-daemon-export-ok files)
2012-03-16 02:54:47 +01:00
* `UPDATE_CHAINS_TO` (default will fail to run this extra check when users
push)
2012-03-16 02:54:47 +01:00
* `ADMIN_POST_UPDATE_CHAINS_TO` (severity depends on what your code is
doing; see [g2rcdiff][] for how to fix this)
2012-03-16 02:54:47 +01:00
* `GL_ALL_INCLUDES_SPECIAL` (default will allow gitweb and daemon to be able
to read any repos that have `R = @all`)
2012-03-16 02:54:47 +01:00
* `GIT_PATH` (presumably your git is in some non-std path so unless you
preset `$ENV{PATH}` per instructions in the [rc file
differences][g2rcdiff] doc, nothing will work).