summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2015-10-24aurblup: Strip version suffixes from provisionsLukas Fleischer1-1/+4
Since we cannot handle versioned provides, simply strip the version suffix and treat them as if they were not versioned. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-21Track providers in the official repositoriesLukas Fleischer1-0/+13
Maintain a list of virtual provisions of packages from the official binary package repositories. The list can be updated using the aurblup script, e.g. via a cronjob. This allows for adding proper links to package dependencies: If an AUR package depends on a package from the official repositories (or on a name provided by a package from the official repositories), add a link to the corresponding archweb package details page. If an AUR package depends on another AUR package (or on a name provided by another AUR package), add a link to the corresponding aurweb package details page. Otherwise, just display the name and do not add a link at all. Fixes FS#46549. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-17Send notifications when changing co-maintainershipLukas Fleischer1-0/+31
Implements FS#45590. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-17notify: Fix welcome/flag notificationsLukas Fleischer1-5/+5
Fixes two regressions introduced in commit 6681e56 (notify: Do not wrap references, 2015-10-03). Fixes FS#46742. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-17notify: Fix references in request notificationsLukas Fleischer1-1/+4
When sending notifications upon request creation, set an initial message ID instead of setting the Reply-To and References headers. This used to work but the behavior was unintentionally changed in 9746a65 (Port notification routines to Python, 2015-06-27). Fixes FS#46645. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-17notify: Split out email header generationLukas Fleischer1-10/+15
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03notify: Do not wrap referencesLukas Fleischer1-32/+28
When sending notifications, do not wrap lines from the references section. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-29Remove empty package bases after 24 hoursLukas Fleischer1-0/+25
By using the setup-repo command, it is currently possible to create empty package bases, which can be used to make package base reservations. Add a maintenance script to remove such empty package bases after 24 hours. Fixes FS#46279. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-16Transfer notifications when merging packagesLukas Fleischer1-4/+3
When a package base is merged into another one, followers of the old package base usually want to be notified about comments the new package base as well. Fixes FS#27687. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-11Require comments when flagging packages out-of-dateLukas Fleischer1-2/+3
Implements FS#42827. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08notify: Reword notification emailsLukas Fleischer1-26/+52
* Use numbered references for links. * Reword some messages. * Fix a typo. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08Port notification routines to PythonLukas Fleischer1-0/+232
Use a Python script for sending notification emails. The notification action and additional parameters are passed via command line arguments. For comment and package request notifications, the text is passed via stdin. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27popupdate: Drop unused variableLukas Fleischer1-2/+0
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27Exclude hidden packages from mkpkglists.pyJohannes Löthberg1-2/+4
Reported-by: Jakub Klinkovský <j.l.k@gmx.com> Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11Add a field for package base popularityLukas Fleischer1-0/+5
Create a new field Popularity in the PackageBases table. The field is updated by the popupdate script and reflects the popularity of a package. Popularity is the sum of all votes with each vote being weighted with a factor of 0.98 per day since its creation. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11Add popupdate scriptLukas Fleischer1-0/+27
This adds a simple script that can be used to recalculate the number of votes per package. It can be used in a cronjob. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-04aurblup: Fix path to configuration fileLukas Fleischer1-1/+1
Fixes a regression introduced in commit 10ecd39 (Restructure scripts, 2015-06-01). Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-02Restructure scriptsLukas Fleischer6-675/+0
* 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-01git-update: Check for missing install and source filesLukas Fleischer1-0/+11
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-01Use gitnamespaces for efficient storageLukas Fleischer4-115/+39
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-05-21Change default configuration to use SSH port 22Lukas Fleischer1-6/+0
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-21Remove the OpenSSH patchLukas Fleischer2-1094/+3
Extended AuthorizedKeysCommand parameters are now officially supported by OpenSSH. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-04-11Update the OpenSSH patchLukas Fleischer3-109/+1053
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-02-04Rename the AUR software to aurwebLukas Fleischer1-1/+1
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-01-15git-update.py: Check for mandatory fieldsLukas Fleischer1-0/+4
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-11Use custom templates for Git repositoriesLukas Fleischer3-6/+33
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-11Add to notification list on repository creationLukas Fleischer1-0/+4
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-09Rewrite aurblup in PythonLukas Fleischer8-383/+48
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-09Merge branch 'maint'Lukas Fleischer1-5/+0
2015-01-09aurblup: Do not blacklist providesLukas Fleischer1-5/+0
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-08git-update.py: Do not wipe repository descriptionsLukas Fleischer1-3/+5
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-08git-update.py: Reject blacklisted packagesLukas Fleischer1-4/+13
Reject commits adding packages which are in the official repositories already. Fixes FS#43371. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-07git-serve.py: Allow TUs to push to any repositoryLukas Fleischer1-0/+4
Implements FS#32807. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-07Add support for package base co-maintainersLukas Fleischer2-7/+12
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-07git-update.py: Support architecture-specific fieldsLukas Fleischer1-19/+32
Fixes FS#43356. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-06git-serve.py: Adopt repositories on creationLukas Fleischer1-2/+2
Automatically assign ownership when creating a new (empty) repository. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-06git-serve.py: Automatically create repositoriesLukas Fleischer1-0/+2
Create a fresh Git repository when cloning or pushing using a path that does not yet exist. Implements FS#43308. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-02git-serve.py: Relax path validationLukas Fleischer1-2/+5
Make the terminating slash in repository URLs optional. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-01git-serve.py: Add a command to list repositoriesLukas Fleischer1-0/+22
The list-repos command now lists all repositories you maintain. Empty repositories are prefixed with an asterisk. Implements FS#43288. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-01git-serve.py: Improve error messagesLukas Fleischer1-8/+22
Also, add a help command that lists available options. Implements FS#43287. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-30git-update.py: Cast epoch to an integerLukas Fleischer1-2/+5
Convert epoch values before doing integer comparisons. Also, add a sanity check for the epoch variable. Reported-by: Ido Rosen <ido@kernel.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-28Add a script to initialize Git repositoriesLukas Fleischer1-0/+51
Introduce a script that creates one repository for each package base in the database. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-28git-serve.py: Use virtual pathsLukas Fleischer1-1/+2
Pretend that all repositories are located in the root directory of the file system to achieve location transparency. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27Remove legacy scriptsLukas Fleischer2-104/+0
These are no longer needed. We use Git repositories now. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27git-update.py: Update repository descriptionLukas Fleischer1-0/+4
Use the package description of the first package as the Git repository description. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27Honor the database socket setting in Git scriptsLukas Fleischer3-4/+8
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27Add sshd setup instructionsLukas Fleischer2-0/+158
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27Add update hook templateLukas Fleischer3-0/+418
This adds a script that can be used as an update hook to check all commits for validity and to regenerate the package details page before updating a named ref. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27Add basic Git authentication/authorization scriptsLukas Fleischer2-0/+145
This adds two scripts to be used together with Git over SSH: * git-auth.py is supposed to be used as AuthorizedKeysCommand. It checks whether the public key belongs to any AUR user and invokes git-serve.py, passing the name of the corresponding user as a command line argument, if any. * git-serve.py is a wrapper around git-shell(1) that checks whether the user passed as command line argument has access to the Git repository that a push operation writes to. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27mkpkglists.py: Honor database socket settingLukas Fleischer1-1/+2
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>