summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2016-10-17Make maintenance scripts installableLukas Fleischer
Add wrappers for the maintenance scripts to the setuptools configuration. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29tuvotereminder: Wait for notify processesLukas Fleischer
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29aurblup: Drop support for multiple serversLukas Fleischer
Support for multiple servers has never been used by the official aurweb setup and the current implementation makes it impossible to use server URIs that contain spaces. For simplicity, change the implementation such that only a single server is supported. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29scripts: Do not use UNIX_TIMESTAMPLukas Fleischer
Avoid using UNIX_TIMESTAMP which is not part of the SQL standard. See f2a6bd2 (git-interface: Do not use UNIX_TIMESTAMP, 2016-08-05) for related changes. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29mkpkglists: Make output files configurableLukas Fleischer
Instead of writing the output to hardcoded files (relative to the document root), make the output paths of mkpkglists configurable. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Use config and db in scriptsLukas Fleischer
Instead of using configparser and mysql.connector directly, change all Python scripts to use the config and db Python modules which are now accessible from a common location. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Use setuptools to install Python modulesLukas Fleischer
Instead of using relative imports, add support for installing the config and db Python modules to a proper location using setuptools. Change all git-interface scripts to access those modules from the search path. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Add a main() method to all Python scriptsLukas Fleischer
Move the main program logic of all scripts to main() methods such that they can be used as modules and easily be invoked by setuptools wrapper scripts. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Send reminders before the TU voting period endsLukas Fleischer
Add a new script that checks for TU votes ending within the next 48 hours and sends reminder emails to all Trusted Users who did not cast their votes yet. The script is designed to be executed as a cron job, such that the check is performed periodically. Since the script does not remember users it already sent emails to, the interval should not be chosen too small to avoid spamming. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-06-30Distinguish auto-accepted requestsLukas Fleischer
Before commit 9746a65 (Port notification routines to Python, 2015-06-27), notification emails for automatically closed requests explicitly stated that the action was taken "automatically by the Arch User Repository package request system". When porting the notification routines to Python, this feature was overlooked and emails sent by the new script always reported that the requester triggered the acceptance or rejection of a request. This patch reimplements the old behavior such that notifications no longer look as if the requester had accepted the request himself. Reported-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-05-18Use the official provider list to detect duplicatesLukas Fleischer
Instead of automatically adding packages from the official binary repositories to the package blacklist, use the official provider list to prevent users from uploading duplicates. This does not only result in reduced disk usage but also has a nice visible side effect. The error messages printed by the update hook now look like error: package already provided by [community]: powerline-fonts instead of error: package is blacklisted: powerline-fonts which was confusing to most end users. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-05-18Add repository information to official providersLukas Fleischer
When updating the list of packages provided by the official repositories, also save the repository names.
2016-03-01Merge branch 'maint'Lukas Fleischer
2016-03-01popupdate: Avoid NULL entries in the popularity fieldLukas Fleischer
The popularity field is declared as "NOT NULL" in the database schema. Fix the popularity update query such that it uses a popularity of 0.0 instead of NULL for packages with no votes. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-21Send notifications when changing ownershipLukas Fleischer
Add a new option that makes it possible to subscribe to package ownership changes (adoption/disownment). Fixes FS#15412. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-19notify: Fix notification of request initiatorLukas Fleischer
Reimplement get_request_recipients() such that it always returns the email addresses of the package base maintainer and the request initiator, instead of the email address of the user triggering the request status change. Fixes FS#48238. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-19notify: Reintroduce Message-ID againLukas Fleischer
In commit 7b57e0e (Set Message-ID when sending package request emails, 2014-07-01), we changed the code responsible for sending notifications such that the value of the Message-ID header is set deterministically in the first email referring to a request. Unfortunately, this was forgotten when porting the notification routines to Python in 9746a65 (Port notification routines to Python, 2015-06-27) and later fixed by 092e00f (notify: Fix references in request notifications, 2015-10-10). However, when fixing another bug, the old behavior of not setting a Message-ID was restored by d87b138 (notify: Fix merging of header dicts, 2015-10-26). Revert that particular change once more and add a comment such that the line gets extra attention, should it be changed in the future. Fixes FS#48239. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-07Add support for package update notificationsLukas Fleischer
Introduce a new notification option to receive notifications when a new commit is pushed to a package repository. Implements FS#30109. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-07Add global comment notification settingLukas Fleischer
Add a configuration option to the account edit page that allows for globally enabling/disabling package base comment notifications. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-07Rename the CommentNotify table to PackageNotificationsLukas Fleischer
As a preparatory step to adding support for package notifications on events other than comments, rename the database table accordingly. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-06Fix issues reported by pyflakesLukas Fleischer
Fix several style issues and remove unneeded imports/assignments. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13notify: Do not break overly long wordsLukas Fleischer
Fixes FS#46937. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13notify: Do not pass notification texts via pipesLukas Fleischer
Directly retrieve comments from the database instead of additionally passing them via stdin. Fixes FS#46742. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-11-12notify: Fix merging of header dictsLukas Fleischer
Fixes another regression introduced in c764999 (notify: Split out email header generation, 2015-10-10). Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-24aurblup: Strip version suffixes from provisionsLukas Fleischer
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 Fleischer
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 Fleischer
Implements FS#45590. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-17notify: Fix welcome/flag notificationsLukas Fleischer
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 Fleischer
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 Fleischer
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03notify: Do not wrap referencesLukas Fleischer
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 Fleischer
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 Fleischer
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 Fleischer
Implements FS#42827. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08notify: Reword notification emailsLukas Fleischer
* 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 Fleischer
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 Fleischer
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27Exclude hidden packages from mkpkglists.pyJohannes Löthberg
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 Fleischer
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 Fleischer
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 Fleischer
Fixes a regression introduced in commit 10ecd39 (Restructure scripts, 2015-06-01). Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-02Restructure scriptsLukas Fleischer
* 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 Fleischer
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 Fleischer
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 Fleischer
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 Fleischer
Extended AuthorizedKeysCommand parameters are now officially supported by OpenSSH. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-04-11Update the OpenSSH patchLukas Fleischer
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 Fleischer
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 Fleischer
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 Fleischer
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>