Commit graph

1745 commits

Author SHA1 Message Date
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
124ad00997 Add a Makefile for the git-auth wrapper
Avoid manual editing of the wrapper script when a non-standard path is
used.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-02 10:49:33 +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
Lukas Fleischer
451e60d91d git-update: Check for missing install and source files
Suggested-by: Marcel Korpel <marcel.korpel@gmail.com>
Suggested-by: carstene1ns <arch@carsten-teibes.de>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-01 23:25:59 +02:00
Lukas Fleischer
b44411fb53 Use gitnamespaces for efficient storage
Instead of using one Git repository per package, use a single large
object storage for space efficiency. The refs of the individual package
bases are divided using gitnamespaces(7) which allows for exposing each
namespace as an independent repository easily. Also, git-serve is
modified to create a branch for each package, allowing to browse the
large repository with cgit.

Helped-by: Florian Pritz <bluewind@xinu.at>
Helped-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-01 23:24:52 +02:00
Lukas Fleischer
ecfa27e406 Do not show the activity check box when registering
Creating an inactive account does not make sense. Hide the activity
check box from the registration page.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-31 19:33:13 +02:00
Lukas Fleischer
8885796e80 Show the SSH key field on the registration page
Now that we have a short explanation on how we use the SSH public key,
we can show that field on the registration page.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-31 19:31:36 +02:00
Lukas Fleischer
5b5950e51d Add more details on the SSH public key field
Also, reorder the fields such that optional fields come last.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-31 19:26:07 +02:00
Lukas Fleischer
86352459ab Allow for resetting the SSH public key
Use NULL instead of an empty string if the SSH public key field is left
empty. Additionally, do not check for duplicate keys in that case.

Fixes FS#45109.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-31 19:16:31 +02:00
Lukas Fleischer
8c4428de5d config.proto: Fix default value of ssh-cmdline
We no longer use port 2222 for SSH.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-23 15:29:14 +02:00
Lukas Fleischer
40461eb738 Include user name in password reset emails
Fixes FS#44320.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 22:32:43 +02:00
Lukas Fleischer
dd3eb28a8c Update co-maintainer list when promoting a user
When a user disowns a package and promotes a co-maintainer, remove that
new maintainer from the list of package co-maintainers. Since only the
package maintainer can manage co-maintainers, this must happen before
the actual disown operation.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 21:14:26 +02:00
Lukas Fleischer
c6e09def2b Fix processing of pkgbase_get_comaintainers()
pkgbase_get_comaintainers() returns an array of user names, not an array
of user IDs.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 21:14:24 +02:00
Lukas Fleischer
0b8c11a37a Move package disowning to a separate page
The disown link in the package actions box leads to a new page
(pkgdisown.php) that can be used to confirm package disowning.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 21:13:43 +02:00
Lukas Fleischer
422d8026da Update co-maintainers when disowning a package
When a user disowns a package, the co-maintainer with the highest
priority automatically becomes the new maintainer. When the package is
disowned by a Trusted User or a Developer, the list of co-maintainers is
cleared.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 17:09:26 +02:00
Lukas Fleischer
0dcdc23a7f Fix the permission check in pkgbase_adopt()
Filter the affected package bases before closing any package requests.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 17:09:26 +02:00
Lukas Fleischer
2b909cb3f6 Store co-maintainer priorities
In addition to saving the list of package co-maintainers, also save
their order. This makes it possible to define a "primary" co-maintainer.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 17:09:26 +02:00
Lukas Fleischer
2db1a55922 Support boolean operators in search queries
This adds very basic support for boolean search queries such as "video
or movie" or "lin and not linux". However, nested queries such as
"(video or movie) and editing" are not (yet) supported.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 17:09:26 +02:00
Lukas Fleischer
0f48341ed6 Do not allow more than 20 terms in search queries
Specifying a huge number of search terms currently results in complex
SQL queries. In practice, queries with more than 20 terms are rarely
needed. Ignore everything apart from the first 20 keywords to prevent
from potential abuse.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 17:09:25 +02:00
Lukas Fleischer
20b838a90c Use keyword search by default
Change the default search mode such that packages that contain all of
the space-separated search terms are returned. For example, the query

    image edit "command line"

returns all packages where "image", "edit" and "command line" occurs in
the package name or description. This is much more convenient and
general than a simple substring search (one can still perform a
substring search by quoting the whole search term).

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 13:08:06 +02:00
Lukas Fleischer
913367606e Update upgrade instructions for 4.0.0
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 10:54:15 +02:00
Lukas Fleischer
01bfae82ce Make the type parameter of pkgreq_by_pkgbase() optional
This simplifies the code a bit, improves maintainability and reduces the
number of SQL queries when deleting a package.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-21 17:10:33 +02:00
Lukas Fleischer
c3614c4f09 Change default configuration to use SSH port 22
We no longer run a separate SSH daemon on port 2222. Change the default
configuration accordingly. Also remove some configuration files that are
no longer needed.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-21 11:20:17 +02:00
Lukas Fleischer
42b9e4dd28 Remove the OpenSSH patch
Extended AuthorizedKeysCommand parameters are now officially supported
by OpenSSH.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-21 10:54:20 +02:00
Lukas Fleischer
75923205af Fix email body of password reset emails
When the password reset function was factored out in 5d31bb2 (Move reset
key submission to a separate function, 2013-03-19), a semicolon was
accidentally replaced by a concatenation operator. As a result of this,
all password reset emails sent since mid-2013 only contained a password
reset link without any description. Fix this by terminating the
assignment with a semicolon again.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-21 09:33:58 +02:00
Lukas Fleischer
ef1f3798a0 Update the OpenSSH patch
Use the latest version of Damien Miller's patch to extend the parameters
to the AuthorizedKeysCommand.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-04-11 14:08:30 +02:00
Lukas Fleischer
4f4cfff620 README: Fix some inconsistencies
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-04-11 12:51:35 +02:00
Lukas Fleischer
d4ef469884 Update maintainer email address
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-04-11 12:48:15 +02:00
Lukas Fleischer
a53241a2f1 Automatically close requests
Close requests automatically when a package is deleted or orphaned.

Implements FS#43799.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-03-04 12:20:21 +01:00
Lukas Fleischer
5dca715c46 Allow users to delete their own packages
Allow users to remove their own package bases for a short period of time
after initial submission (defaults to one day).

Implements FS#43648.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-03-04 12:16:33 +01:00
Lukas Fleischer
84061604aa Update .gitignore
* Remove user-specific configuration.
* Update with latest changes to the configuration file and templates.
* Order entries alphabetically.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-02-04 18:46:55 +01:00
Lukas Fleischer
cc1e8aed30 Rename the AUR software to aurweb
Rename the project to help differentiate between the software providing
access to the Arch User Repository and the collection of source packages
itself.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-02-04 09:50:01 +01:00
Lukas Fleischer
a28d4f8e3e AUTHORS: Add past maintainers
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-19 17:47:12 +01:00
Lukas Fleischer
3488581046 git-update.py: Check for mandatory fields
Check explicitly whether pkgver, pkgrel, pkgname, pkgdesc and url are
available in each package. If any of these is missing, an exception
might occur when parsing the meta data later.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-15 09:35:01 +01:00
Lukas Fleischer
4dbd562b8e Use custom templates for Git repositories
Do not waste disk space by copying dozens of unneeded sample hooks. Use
a custom template directory that only includes the git-update hook.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-11 18:44:01 +01:00
Lukas Fleischer
cb661cd971 Add to notification list on repository creation
Since commit bf7717a (git-serve.py: Adopt repositories on creation,
2015-01-06), newly created package bases are no longer orphan and
therefore, they are not adopted when pushing the first commit which also
means that the initial submitter is not added to the notification list
automatically. To remedy this, add the owner to the notification list
when setting up a new repository.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-11 01:06:35 +01:00
Lukas Fleischer
85b48ceb12 Link to the cgit log from package details
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-09 17:50:39 +01:00
Lukas Fleischer
5adb5b8ebd config.proto: Add prototype for ssh-cmdline
This should have been added in 1b627a3 (git-serve.py: Improve error
messages, 2015-01-01).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-09 17:47:05 +01:00
Lukas Fleischer
3c171d353f Rewrite aurblup in Python
The AUR backend already uses several Python scripts, rewrite the aurblup
helper as well. This has several advantages:

* We can easily use the main configuration file without using any shell
  script wrappers.

* aurblup does not need to be recompiled on libalpm soname bumps.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-09 13:14:02 +01:00
Lukas Fleischer
7dd78de3fd Merge branch 'maint' 2015-01-09 09:38:56 +01:00
Lukas Fleischer
5816cc7faa aurblup: Do not blacklist provides
This partly reverts commit ddc5435 (Add packages' provides and replaces
to the blacklist in aurblup., 2011-02-08). While adding replaces is
fine, blacklisting provides prevents from uploading alternative
implementations of a program which is not what we want.

Fixes FS#43381.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-09 09:38:10 +01:00
Lukas Fleischer
2d96b51cb5 git-update.py: Do not wipe repository descriptions
Only update repository descriptions if there is at least one package in
the package base meta data.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-08 09:18:40 +01:00
Lukas Fleischer
ed7fb91f41 git-update.py: Reject blacklisted packages
Reject commits adding packages which are in the official repositories
already.

Fixes FS#43371.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-08 09:18:40 +01:00
Lukas Fleischer
492a5db229 Merge branch 'maint' 2015-01-07 17:35:59 +01:00
Lukas Fleischer
80ef14caa8 Fix link to package base voters
Reported-by: Bartłomiej Piotrowski <b@bpiotrowski.pl>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-07 17:35:46 +01:00
Lukas Fleischer
ebf8f5d16f git-serve.py: Allow TUs to push to any repository
Implements FS#32807.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-07 12:21:22 +01:00
Lukas Fleischer
fc23a9bd50 Add support for package base co-maintainers
This allows for having multiple co-maintainers for AUR packages.
Co-maintainers have push access to the package base Git repository but
are not allowed to change the package base category, disown the package
or modify the list of co-maintainers. The primary maintainer of an AUR
package can edit the list of co-maintainers from the Package Actions
box.

Implements FS#17911.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-07 12:21:21 +01:00
Lukas Fleischer
b32458cb8a git-update.py: Support architecture-specific fields
Fixes FS#43356.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-07 10:41:44 +01:00
Lukas Fleischer
bf7717ac13 git-serve.py: Adopt repositories on creation
Automatically assign ownership when creating a new (empty) repository.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-06 23:33:43 +01:00