Commit graph

11 commits

Author SHA1 Message Date
Johannes Löthberg
e93f198ede git-serve: Drop direct AccountType checking, use AUR_PRIVILEGED
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Johannes Löthberg
e9485531be git: Use AUR_USER env var instead of ForceCommand argument
Also add an utility function for formatting the ForceCommand, using
shlex.quote to quote the value.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Johannes Löthberg
ae2907a57e git: Use .format everywhere instead of %
% formatting is deprecated, and .format should be used instead.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Johannes Löthberg
3158e038c8 git-serve: Support cloning with simplified paths
This commit adds support for cloning repositories over SSH without a
leading slash or with a trailing .git

Fixes FS#45260

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-12 16:58:00 +02:00
Lukas Fleischer
078f7256e3 Support exceptions in the maintenance mode
Allow for excluding certain IP addresses from the maintenance mode. This
allows administrators to view the web page while the site is still under
maintenance for the rest of the world.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11 14:48:01 +02:00
Lukas Fleischer
a45b5073ca Implement a maintenance mode
Add support for a maintenance mode that disables both the website and
the SSH interface and can be enabled easily using a configuration
option.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11 14:32:21 +02:00
Lukas Fleischer
2164750f1e Do not use symrefs for manually created Git refs
When creating the refs for the package base branch and the HEAD ref
workaround, directly use commit IDs instead of symrefs. It looks like
Git cannot pack symrefs, so this is expected to improve space
efficiency. Also, since the refs are now only created (or updated) when
new objects are actually received, this fixes a problem with dangling
refs that were created when a user initialized a repository but did not
push anything.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11 14:03:56 +02:00
Wieland Hoffmann
d5beada7c3 git-serve: Use pkgbase for errors about invalid names
`repo` is not defined at the point it's used, so you would get errors
like

> Traceback (most recent call last):
>   File "/srv/http/vhosts/aur-dev.archlinux.org/public/git-interface/git-serve.py", line 138, in <module>
>     die('%s: invalid repository name: %s' % (action, repo))
> NameError: name 'repo' is not defined

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-08 12:43:58 +02:00
Lukas Fleischer
c38f95f632 config.proto: Cleanup
Remove the template-path and git-update-hook options which are no longer
used. Update the git_clone_uri_anon default value.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-02 15:16:24 +02:00
Lukas Fleischer
6fe8792508 Setup Git repositories even if package base exists
Sometimes, we need to initialize the Git repository even if the package
base already exists (e.g. when using a non-empty package database with
empty repositories during the AUR 4.0.0 migration period). Make sure
that the package branch and the namespaced HEAD ref is always created.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-02 15:12:00 +02:00
Lukas Fleischer
10ecd3982d Restructure scripts
* Move scripts/git-integration/ to git-interface/.
* Move scripts/aurblup/aurblup.py to scripts/aurblup.py.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-02 10:34:34 +02:00
Renamed from scripts/git-integration/git-serve.py (Browse further)