summaryrefslogtreecommitdiffstats
path: root/git-interface
AgeCommit message (Collapse)AuthorFilesLines
2015-06-27git-update: Allow privileged users to bypass blacklistJohannes Löthberg1-1/+2
Fixes FS#45410. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27git-serve: Drop direct AccountType checking, use AUR_PRIVILEGEDJohannes Löthberg1-2/+1
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27git-auth: Set AUR_PRIVILEGED env var for TUs & devsJohannes Löthberg1-2/+4
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27git: Use AUR_USER env var instead of ForceCommand argumentJohannes Löthberg2-3/+24
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-27git: Use .format everywhere instead of %Johannes Löthberg3-47/+47
% 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-20Make url and pkgdesc fields optionalJohannes Löthberg1-2/+6
The url and pkgdesc PKGBUILD variables are optional, so they should be in the AUR as well. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-20git-update: Remove regex matching of URLJohannes Löthberg1-3/+0
The regex check that a URL is either http or ftp doesn't really have any use, and it forces you to leave proper URLs for eg projects hosted on gopher empty. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-14git-update: Fix parsing of versioned optdependsLukas Fleischer1-4/+12
Fixes FS#43649. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-14aurinfo: Fix bug with space indents creating split packagesJohannes Löthberg1-1/+5
If a .SRCINFO line doesn't start with a tab, check if the key is pkgname before adding it as a package. Fixes a bug where if you have accidentally gotten a line indented with spaces, from that line forward it will think it is a split package, instead of erroring out. Reported-by: Raansu <Gero3977@gmail.com> Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-12git-serve: Support cloning with simplified pathsJohannes Löthberg1-2/+4
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-11git-update: Allow non-fast-forwards for TUsLukas Fleischer1-6/+9
Although we theoretically never want to lose history, there may be rare occasions when a forced push is required (e.g. if illegal data is pushed). Allow Trusted Users and Developers to perform non-fast-forward pushes. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11git-update: Deny non-fast-forwardsLukas Fleischer1-0/+9
To make sure we never lose any history, non-fast-forwards are forbidden. Instead of relying on receive.denyNonFastForwards, add a simple check to the update hook. This has the added benefit of more flexibility. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11Support exceptions in the maintenance modeLukas Fleischer1-1/+4
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-11Implement a maintenance modeLukas Fleischer1-0/+5
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-11Do not use symrefs for manually created Git refsLukas Fleischer2-17/+10
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-08git-update: Avoid duplicate notificationsLukas Fleischer1-2/+6
Fixes FS#45254. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-08git-update: Drop writing git description fileJohannes Löthberg1-6/+0
All PKGBUILDs are stored in a single repository now, so there is no use for writing out a description file for the repo anymore. This fixes a bug where pkgdescs containing UTF-8 characters are rejected due to it trying to write the file out using ASCII. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-08git-update: Improve error message for non-blob objectsLukas Fleischer1-1/+10
When a repository contains a directory, a user is currently faced with the following error message: remote: Traceback (most recent call last): remote: File "hooks/update", line 194, in <module> remote: if repo[treeobj.id].size > 250000: remote: AttributeError: '_pygit2.Tree' object has no attribute 'size' remote: error: hook declined to update refs/heads/master Explicitly check for directories and other non-blob objects and display a more intuitive message. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-08Use extract_arch_fields when checking for source filesJohannes Löthberg1-1/+2
This fixes a bug where pushes are rejected in split PKGBUILDs if there are no arch-independent source array. Fixes FS#45253 Reported-by: Marti <marti@juffo.org> Reported-by: Maxime Gauduin <alucryd@archlinux.org> Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-08git-update: Increase maximum blob size to 250kBLukas Fleischer1-2/+2
Large blobs are needed in some packages, such as customized Linux kernels including kernel configurations. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-08git-serve: Use `pkgbase` for errors about invalid namesWieland Hoffmann1-1/+1
`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-04git-update: Prevent from overwriting packagesLukas Fleischer1-1/+11
Make sure we do not overwrite a package belonging to another package base. We forgot to add this check to git-update when porting the package submission script to Python in commit 74edb6f (Use Git repositories to store packages, 2014-06-06). Reported-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-04git-update: Only check HEAD for blacklisted packagesLukas Fleischer1-4/+6
When a part of a package base is moved to the official repositories, it needs to be dropped from the AUR package. However, we want to allow that the moved packages still appear in the history. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-04git-update: Only check HEAD for matching pkgbaseLukas Fleischer1-1/+6
When renaming a package base, we want to keep commits of the former package. Move the check that compares the package base name with the repository name such that only HEAD is validated. Fixes FS#45065. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-02config.proto: CleanupLukas Fleischer1-1/+0
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-02Setup Git repositories even if package base existsLukas Fleischer1-7/+17
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-02Add a Makefile for the git-auth wrapperLukas Fleischer4-3/+22
Avoid manual editing of the wrapper script when a non-standard path is used. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-02Restructure scriptsLukas Fleischer5-0/+675
* Move scripts/git-integration/ to git-interface/. * Move scripts/aurblup/aurblup.py to scripts/aurblup.py. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>