Steve McIntyre [Wed, 21 Oct 2009 12:39:40 +0000 (13:39 +0100)]
Add files from the Debian packaging
It makes sense to keep these in git, alongside the code
James Morrissey [Wed, 21 Oct 2009 08:40:42 +0000 (09:40 +0100)]
Fix error in attempting to sync closed temp files
Steve McIntyre [Tue, 20 Oct 2009 13:49:04 +0000 (14:49 +0100)]
Add support for special $user repositories
Extra syntax in the config file ($user) will now denote wildcard-style
user repositories. This allows us to add support for users to have
their own public repos without having to do tedious admin work for all
of them.
This involves changes to:
* access.py to add lookups for $user access on top of normal access;
$user is treated as a wildcard where necessary when doing
filesystem path lookups, but used for permission checking too: the
magic user "$user" can now be added to the members list in
configuration groups.
* gitweb.py to add code to deal with the $user wildcards when
generating the description and project list files that gitweb
uses. Where we can determine the user's credentials locally, use
full names. Some code refactoring to fit with existing code
better. Also: don't assume that close and rename are safe: force
flush and fsync too
* example.conf to add entries for user directories. Show how the user
directories can be made to work
Steve McIntyre [Mon, 19 Oct 2009 16:20:21 +0000 (17:20 +0100)]
Fix permissions for newly-created repositories
As seen in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=544246
Newly-created repositories are not visible under gitweb or via git://,
as they are created with no access for anybody but gitosis. Creating
them with mode 0751 allows other users to at least see them.
Steve McIntyre [Mon, 19 Oct 2009 15:54:46 +0000 (16:54 +0100)]
Initial checkin of latest upstream, cloned from
git://eagain.net/gitosis.git
Tommi Virtanen [Thu, 17 Sep 2009 05:32:54 +0000 (22:32 -0700)]
Let even readonly operations init a repo if needed.
Git >=1.6.2 support cloning empty repositories; this is a good way to
bootstrap development on a new repository.
Tommi Virtanen [Thu, 17 Sep 2009 05:28:17 +0000 (22:28 -0700)]
Fix unit test failure with git >=1.6.0
Tommi Virtanen [Mon, 25 Aug 2008 16:55:45 +0000 (19:55 +0300)]
Use "git shell" instead of "git-shell", for compatibility with git 1.6.
Tommi Virtanen [Wed, 30 Jul 2008 11:20:43 +0000 (14:20 +0300)]
Add a MANIFEST.in to please setuptools sdist.
Tommi Virtanen [Thu, 26 Jun 2008 08:33:48 +0000 (11:33 +0300)]
Accept "git upload-pack" etc, for future compatibility.
Tommi Virtanen [Sat, 19 Apr 2008 16:10:36 +0000 (19:10 +0300)]
Understand the popular gitosis.conf typo "writeable".
Log a warning still, don't want that to get too common.
Tommi Virtanen [Tue, 15 Apr 2008 12:52:17 +0000 (15:52 +0300)]
Show how group sections in config can be used in example.conf.
Tommi Virtanen [Wed, 19 Mar 2008 19:49:47 +0000 (21:49 +0200)]
Allow absolute paths in repo paths, treat them as relative.
As the only convenient way to use non-standard SSH ports with git is
via the ssh://user@host:port/path syntax, and that syntax forces
absolute urls, just force convert absolute paths to relative paths;
you'll never really want absolute paths via gitosis, anyway.
Tommi Virtanen [Wed, 19 Mar 2008 19:52:03 +0000 (21:52 +0200)]
Make serve acceptable path unit tests more careful.
Tests used to trigger the wanted security exception merely by being
unquoted, that's not good enough.
Tommi Virtanen [Wed, 19 Mar 2008 19:28:46 +0000 (21:28 +0200)]
Test that incoming paths cannot contain /../
Tommi Virtanen [Tue, 19 Feb 2008 06:57:59 +0000 (08:57 +0200)]
Show alternate gitweb.conf access control config.
Tommi Virtanen [Sat, 16 Feb 2008 10:17:18 +0000 (12:17 +0200)]
State that sharing user accounts for two uses is advanced usage.
Tommi Virtanen [Tue, 5 Feb 2008 11:18:46 +0000 (13:18 +0200)]
Add mod_redirect to lighttpd example config snippet.
Tommi Virtanen [Thu, 17 Jan 2008 00:15:52 +0000 (02:15 +0200)]
Fix bug where members=@all didn't actually give access.
Tommi Virtanen [Mon, 31 Dec 2007 19:30:36 +0000 (21:30 +0200)]
Fix typo that made push fail in writeAuthorizedKeys.
Tommi Virtanen [Mon, 31 Dec 2007 19:11:22 +0000 (21:11 +0200)]
Make post-update hook reload config after writing it out.
Without this, any changes to repository settings would only be
applied after one extra (non-empty) push.
Add unit test coverage for the post-update hook.
Make SSH authorized_keys path configurable, mostly for unit tests.
Tommi Virtanen [Mon, 31 Dec 2007 17:30:27 +0000 (19:30 +0200)]
Allow using fast_import for more than initial commit.
Tommi Virtanen [Mon, 31 Dec 2007 17:18:52 +0000 (19:18 +0200)]
Don't always init repository when doing fast-import.
Tommi Virtanen [Mon, 17 Dec 2007 17:08:36 +0000 (19:08 +0200)]
Allow uppercase in usernames.
Tommi Virtanen [Tue, 11 Dec 2007 20:50:04 +0000 (22:50 +0200)]
Allow underscores, dots and dashes in SSH username local parts.
Tommi Virtanen [Tue, 11 Dec 2007 20:43:05 +0000 (22:43 +0200)]
Enforce safe usernames also when reading public key files from keydir.
Warning: if your keyfiles contain more than just a-z0-9, at sign, dots
or dashes, you will likely end up cutting off your access to your
gitosis repository with this upgrade.
Tommi Virtanen [Tue, 11 Dec 2007 20:29:43 +0000 (22:29 +0200)]
Create ~git/gitosis in gitosis-init.
This fixes problems with e.g. "No such file or directory:
'/.../git/gitosis/projects.list.42.tmp'" in generate_project_list when
running gitosis-init.
Existing users need to run::
sudo install -d -m0755 -o git -g git ~git/gitosis
adjust the user and group name if necessary. Alternatively,
just rerun gitosis-init.
Tommi Virtanen [Wed, 28 Nov 2007 22:40:34 +0000 (00:40 +0200)]
Write gitweb projects.list to ~/gitosis, not inside the gitosis-admin repo.
This allows running gitweb as a separate user without needing to allow it
read access to gitosis-admin.git. Running as separate user will still most
likely require a ``chgrp www-data`` of the relevant repositories, but
nothing not already decided public needs to be exposed.
Existing gitweb users will need to adjust their gitweb.conf to point to
the new location of the projects.list file.
Removing the old projects.list from
~git/repositories/gitosis-admin.git/projects.list is safe once gitweb
has switched to using the new location.
Tommi Virtanen [Sun, 25 Nov 2007 16:32:02 +0000 (18:32 +0200)]
Add instructions for using gitweb.
Tommi Virtanen [Sun, 25 Nov 2007 16:14:29 +0000 (18:14 +0200)]
Add instructions for using git-daemon.
Tommi Virtanen [Sun, 18 Nov 2007 16:09:35 +0000 (18:09 +0200)]
Add TODO note.
Tommi Virtanen [Sun, 18 Nov 2007 16:08:09 +0000 (18:08 +0200)]
Let *.pub files have multiple lines, each containing one SSH key.
Makes managing accounts and access for people with multiple client
machines easier.
Tommi Virtanen [Sun, 18 Nov 2007 15:50:02 +0000 (17:50 +0200)]
When autocreating repositories on push, set git-daemon-export-ok etc.
Without this, it would need a separate push to gitosis-admin.git,
after the repository is autocreated, to get it to show up and be
anonymously usable.
Tommi Virtanen [Sun, 18 Nov 2007 15:30:08 +0000 (17:30 +0200)]
Update TODO list.
In a gitosis-style setup, you can deal with most needs for cloneurl
via git_base_url_list in gitweb.conf.
Tommi Virtanen [Sat, 17 Nov 2007 15:40:34 +0000 (17:40 +0200)]
Set description from config file for gitweb use.
Tommi Virtanen [Sat, 17 Nov 2007 14:49:53 +0000 (16:49 +0200)]
Make repository.export work even with relative git_dir.
It changes the current directory, so it can't set --git-dir to a
(potentially) relative path. Make path absolute before using it.
This should fix post-update hook problems.
Tommi Virtanen [Sat, 17 Nov 2007 14:27:21 +0000 (16:27 +0200)]
Manage git-daemon-export-ok flags from gitosis config.
Tommi Virtanen [Sat, 17 Nov 2007 12:32:43 +0000 (14:32 +0200)]
Add unit test for gitweb.generate_project_list.
Garry Dolley [Sat, 17 Nov 2007 09:46:07 +0000 (01:46 -0800)]
generate_fp should be generate_project_list_fp
Tommi Virtanen [Thu, 15 Nov 2007 20:22:19 +0000 (22:22 +0200)]
Give meaningful name to gitweb projects.list generation.
Remove mentions of cancelled gitweb.conf generation from docstrings.
Tommi Virtanen [Thu, 15 Nov 2007 20:04:22 +0000 (22:04 +0200)]
Remove TODO to create gitweb.conf, that would be a security issue.
Implementing it would mean user git could run perl code as www-data,
on most setups. Not good.
Tommi Virtanen [Thu, 15 Nov 2007 20:02:31 +0000 (22:02 +0200)]
Bring TODO list up to date.
Tommi Virtanen [Thu, 15 Nov 2007 19:23:07 +0000 (21:23 +0200)]
Avoid decorators to be compatible with python2.3 (for now).
Tommi Virtanen [Thu, 15 Nov 2007 19:11:59 +0000 (21:11 +0200)]
Depend on a new enough setuptools to preserve data file access modes.
Tommi Virtanen [Thu, 15 Nov 2007 18:56:15 +0000 (20:56 +0200)]
Create leading directories when creating missing repos in gitosis-serve.
Creation is in gitosis.serve and not directly in repository.init(),
because that's the location that can tell what part of the directory
tree is allowed to be missing. Made the reconstructed git command
include the extension as that was easier to do.
haveAccess return value is now tuple, to preserve information on what
parts of the path can be missing.
Tommi Virtanen [Thu, 15 Nov 2007 18:52:47 +0000 (20:52 +0200)]
Fix copy-paste that made gitosis.gitweb use wrong logger.
Tommi Virtanen [Thu, 15 Nov 2007 17:00:02 +0000 (19:00 +0200)]
Make repository.export work with newer git.
gitosis-init and the post-update hook used to fail with
GitCheckoutIndexError, when run with git >=1.5.3, which made
checkout-index require GIT_WORK_TREE, jump through hoops to provide
it, but still be backwards compatible with older git.
Thanks to Garry Dolley for hunting the bug.
Tommi Virtanen [Thu, 15 Nov 2007 15:25:36 +0000 (17:25 +0200)]
Make gitosis-serve pass through environment to git-shell.
Tommi Virtanen [Thu, 15 Nov 2007 15:22:06 +0000 (17:22 +0200)]
Make repository.export unit tests use --git-dir= too.
Tommi Virtanen [Thu, 15 Nov 2007 15:20:39 +0000 (17:20 +0200)]
Make repository.has_initial_commit pass through environment to git.
Tommi Virtanen [Thu, 15 Nov 2007 15:17:20 +0000 (17:17 +0200)]
Make repository.export pass through environment to git.
Tommi Virtanen [Thu, 15 Nov 2007 15:10:40 +0000 (17:10 +0200)]
Make repository.fast_import pass through environment to git.
Tommi Virtanen [Thu, 15 Nov 2007 15:02:32 +0000 (17:02 +0200)]
Make repository.init pass through environment to git.
Tommi Virtanen [Tue, 30 Oct 2007 16:26:49 +0000 (18:26 +0200)]
Missed mkdir in README
Tommi Virtanen [Tue, 4 Sep 2007 04:27:03 +0000 (21:27 -0700)]
Update for release v0.2.
Tommi Virtanen [Tue, 4 Sep 2007 06:00:44 +0000 (23:00 -0700)]
Add TODO notes.
Tommi Virtanen [Tue, 4 Sep 2007 06:00:12 +0000 (23:00 -0700)]
Fix initial push syntax in README. Needs to say "refs/heads/".
Tommi Virtanen [Tue, 4 Sep 2007 05:59:55 +0000 (22:59 -0700)]
Clean up more files in debian/rules.
Tommi Virtanen [Tue, 4 Sep 2007 05:59:36 +0000 (22:59 -0700)]
Mark the generated egg as non-zip-safe.
Tommi Virtanen [Tue, 4 Sep 2007 05:58:30 +0000 (22:58 -0700)]
Ensure "git init" doesn't write to stdout, and confuse a push.
The repository autocreation functionality ends up sending the
stdout to the client side, and there a very confused git push
can't make any sense of the protocol.
Tommi Virtanen [Tue, 4 Sep 2007 04:58:01 +0000 (21:58 -0700)]
Make sure ~git/.ssh exists in gitosis-init.
Tommi Virtanen [Tue, 4 Sep 2007 04:54:20 +0000 (21:54 -0700)]
Let SSH public key user fields have a bit more varied content.
Tommi Virtanen [Tue, 4 Sep 2007 04:26:45 +0000 (21:26 -0700)]
Fix whitespace in README.
Tommi Virtanen [Tue, 4 Sep 2007 04:26:24 +0000 (21:26 -0700)]
Add a long description to setup.py
Tommi Virtanen [Tue, 4 Sep 2007 04:16:15 +0000 (21:16 -0700)]
Make gitosis-init call run_hook.post_update directly.
This avoids complexity where failing to read the config file in
gitosis-run-hook is non-fatal, but only on the first run. gitosis-init
will take care of config file reading and just pass a RawConfigParser
instance to run_hook.post_update.
Tommi Virtanen [Tue, 4 Sep 2007 03:54:14 +0000 (20:54 -0700)]
Make gitosis-init ignore error from non-existent config file.
Refactored config file reading and logging initialization to make
things nicer.
Tommi Virtanen [Tue, 4 Sep 2007 03:45:24 +0000 (20:45 -0700)]
Created user get home from somewhere, let adduser create it.
At least the Ubuntu/Debian adduser is nice enough not to make a mess
of system user home directories with skeleton files.
Tommi Virtanen [Tue, 4 Sep 2007 02:24:04 +0000 (19:24 -0700)]
Don't git init when it's not needed.
Confusion between pathnames with extensions and without made
gitosis-serve confused when it needs to create a repository
and when not.
Tommi Virtanen [Tue, 4 Sep 2007 02:17:48 +0000 (19:17 -0700)]
Oops, fix bad arguments. Sadly no unit tests for this part :(
Tommi Virtanen [Tue, 4 Sep 2007 01:30:16 +0000 (18:30 -0700)]
Add a simple "./debian/rules generate" to build debian/control.
This is ugly and annoying but alternatives are storing generated files
in version control, or manually maintaining pesky little details.
The control file will be part of the .diff.gz.
Tommi Virtanen [Tue, 4 Sep 2007 00:53:16 +0000 (17:53 -0700)]
Make debian package version match setup.py
Tommi Virtanen [Tue, 4 Sep 2007 00:52:23 +0000 (17:52 -0700)]
Make git ignore unit test coverage checking result file.
Tommi Virtanen [Tue, 4 Sep 2007 00:51:44 +0000 (17:51 -0700)]
Update documentation in preparation of release.
Tommi Virtanen [Tue, 4 Sep 2007 00:06:49 +0000 (17:06 -0700)]
Make gitosis-serve not fail with commands without arguments.
Tommi Virtanen [Tue, 4 Sep 2007 00:04:41 +0000 (17:04 -0700)]
Refactor command line utilities to share setup.
Hide internal gitosis-ssh and gitosis-gitweb, it's all in gitosis-run-hook.
Tommi Virtanen [Mon, 3 Sep 2007 21:06:51 +0000 (14:06 -0700)]
Make setuptools include templates in the egg.
Tommi Virtanen [Mon, 3 Sep 2007 04:35:07 +0000 (21:35 -0700)]
Make error messages harder to confuse with strerror(3).
Tommi Virtanen [Sun, 2 Sep 2007 20:42:55 +0000 (13:42 -0700)]
Make repository autocreate add .git extension.
Tommi Virtanen [Sun, 2 Sep 2007 20:28:41 +0000 (13:28 -0700)]
Make gitosis-serve create repositories on demand when pushing.
Tommi Virtanen [Sun, 2 Sep 2007 19:46:07 +0000 (12:46 -0700)]
Add unit tests for gitosis-serve.
Tommi Virtanen [Sun, 2 Sep 2007 01:27:25 +0000 (18:27 -0700)]
Add gitosis-init, for bootstrapping a new installation.
Tommi Virtanen [Sun, 2 Sep 2007 01:23:26 +0000 (18:23 -0700)]
Add gitosis-run-hook, to be run from git hooks.
Sadly, no unit tests on this level, for now.
Tommi Virtanen [Sun, 2 Sep 2007 01:20:16 +0000 (18:20 -0700)]
Refactor gitosis-gitweb to move temp file handling out of main.
Tommi Virtanen [Sun, 2 Sep 2007 00:47:42 +0000 (17:47 -0700)]
Add utilities for fast-import, exporting repository.
Redo subprocess error handling.
Tommi Virtanen [Sat, 1 Sep 2007 23:36:01 +0000 (16:36 -0700)]
Use separate temp directories for separate tests.
Makes unit tests for the previous commit work even when not run alone.
Should have done this from the beginning, but didn't find the trick
for getting the module name.
Tommi Virtanen [Sat, 1 Sep 2007 23:34:42 +0000 (16:34 -0700)]
Make sure re-initing a repository does not change access modes.
Tommi Virtanen [Sat, 1 Sep 2007 23:28:51 +0000 (16:28 -0700)]
Refactor to share file mode checking.
Tommi Virtanen [Sat, 1 Sep 2007 23:24:55 +0000 (16:24 -0700)]
Make gitosis.util.mkdir pass through any os.mkdir args.
Tommi Virtanen [Sat, 1 Sep 2007 20:43:22 +0000 (13:43 -0700)]
Remove unused import.
Tommi Virtanen [Sat, 1 Sep 2007 20:43:01 +0000 (13:43 -0700)]
Move commonly used functions to gitosis.util
Tommi Virtanen [Fri, 31 Aug 2007 03:00:15 +0000 (20:00 -0700)]
Add helper to create (bare) repositories with custom templates.
Tommi Virtanen [Thu, 30 Aug 2007 05:28:53 +0000 (22:28 -0700)]
Refactor unit test writeFile/readFile helpers.
Tommi Virtanen [Thu, 30 Aug 2007 04:16:17 +0000 (21:16 -0700)]
Fix gitosis-gitweb docstring to match default repository path.
Tommi Virtanen [Thu, 30 Aug 2007 04:15:32 +0000 (21:15 -0700)]
Typo in debian/control.
Tommi Virtanen [Wed, 29 Aug 2007 04:44:30 +0000 (21:44 -0700)]
Add a formal license file.
Tommi Virtanen [Wed, 29 Aug 2007 04:43:13 +0000 (21:43 -0700)]
Fix typo.
Tommi Virtanen [Wed, 29 Aug 2007 04:41:52 +0000 (21:41 -0700)]
Fix default value for gitosis.repositories config variable in gitosis-gitweb.
Tommi Virtanen [Mon, 4 Jun 2007 11:23:00 +0000 (14:23 +0300)]
Add debianization.
Tommi Virtanen [Sun, 12 Aug 2007 00:23:51 +0000 (17:23 -0700)]
Search PATH for git-shell, don't assume /usr/bin.
Tommi Virtanen [Sat, 11 Aug 2007 23:29:25 +0000 (16:29 -0700)]
Make access denied message harder to confuse with system errors.