summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2016-11-13Send out-of-date notifications to co-maintainersLukas Fleischer1-6/+9
Currently, only package maintainers receive out-of-date notifications for their packages. Add package base co-maintainers to the list of recipients for out-of-date notifications. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-11-13test/setup.sh: Fix script pathsLukas Fleischer1-5/+5
The scripts were moved to aurweb/scripts/ in commit 3718860 (Make maintenance scripts installable, 2016-10-17). Update the paths in the test suite accordingly. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-11-10Remove extraneous quote in translator.inc.phpMark Weiman1-1/+1
The quote is a leftover of legacy code and was meant to be removed by commit e171f6f (Migrate all DB code to use PDO, 2012-08-08). Signed-off-by: Mark Weiman <mark.weiman@markzz.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-11-10Fix DB.class.php to match config and include SQLite supportMark Weiman1-7/+17
In commit baf8a22 (git-interface: Support SQLite as database backend, 2016-08-03), conf/config.proto was changed so that dsn_prefix was changed to backend and this fixes this in web/lib/DB.class.php. Since SQLite's dsn is different, this adds a check of which backend is desired and will quit if MySQL or SQLite are not the backend selected. SQLite2 may be supported, but is untested and will trigger an error if used. Signed-off-by: Mark Weiman <mark.weiman@markzz.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-11-10Remove all usage of UNIX_TIMESTAMP in web interfaceMark Weiman4-16/+16
UNIX_TIMESTAMP is not part of the SQL standard. Instead, all usage in the web interface is changed to use PHP's time() function. Signed-off-by: Mark Weiman <mark.weiman@markzz.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-17Release 4.4.1v4.4.1Lukas Fleischer1-1/+1
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-17Make maintenance scripts installableLukas Fleischer9-0/+9
Add wrappers for the maintenance scripts to the setuptools configuration. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-17Move configuration to /etc/aurweb/configLukas Fleischer5-6/+7
Since d4fe77a (Reorganize Git interface scripts, 2016-10-08), the key components of the aurweb SSH interface are installed system-wide. Update the default configuration path to point to a central location. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-17aurweb/git: Add missing __init__.py fileLukas Fleischer1-0/+0
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-17Do not show current day if registration date is unknownLukas Fleischer1-0/+4
The registration date field on the account details page currently defaults to the current day if the user's registration date is unknown. To avoid confusion, show "unknown" in these cases instead. Fixes FS#51405. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-15Release 4.4.0v4.4.0Lukas Fleischer1-1/+1
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-15Translation updates from TransifexLukas Fleischer29-237/+803
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-11git-serve: Close orphan requests upon disownLukas Fleischer2-1/+66
When disowning a package base via the SSH interface, auto-accept all pending orphan requests for the affected package. Also, add a test case that checks whether (only) orphan requests belonging to disowned packages are closed correctly. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-11upgrading/4.4.0.txt: Warn about new scriptsLukas Fleischer1-0/+5
The location of the Git interface wrapper scripts was changed by commit d4fe77a (Reorganize Git interface scripts, 2016-10-08). Add a note to the upgrade instructions to remind users to update their configuration files. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-11git-update: Catch long source URLsLukas Fleischer2-0/+19
Bail out early if the source array contains an entry with more than 8000 characters. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-11Make URL columns 8000 characters wideLukas Fleischer4-4/+33
According to RFC 7230, URLs can be up too 8000 characters long. Resize all URL fields accordingly. Also, add a test to verify that URLs with more than 8000 characters are rejected by the update hook. Reported-by: Andreas Linz <klingt.net@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-08Update message catalogLukas Fleischer1-5/+19
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-08Update .gitignoreLukas Fleischer1-3/+3
Remove obsolete files. Add byte-compiled Python files and test results. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-08Reorganize Git interface scriptsLukas Fleischer12-48/+26
Move the Git interface scripts from git-interface/ to aurweb/git/. Use setuptools to automatically create wrappers which can be installed using `python3 setup.py install`. Update the configuration files, the test suite as well as the INSTALL and README files to reflect these changes. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-08Add clone hints to 404 error pagesLukas Fleischer1-0/+33
When clicking on the linked Git clone URL of a package base, users are faced with a 404 error page since the URL is not supposed to be opened in a web browser. Add some notes to 404 error pages corresponding to Git clone URLs that explain how to use them instead. Fixes FS#51266. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-01git-serve: Support `git {receive,upload}-pack`Lukas Fleischer1-0/+4
Add support for the `git receive-pack` and `git upload-pack` commands which are aliases for git-receive-pack and git-upload-pack, respectively. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-30Update message catalogLukas Fleischer1-2/+11
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29t2200: Check that only non-voters get remindersLukas Fleischer2-0/+31
Add a test to make sure that Trusted Users, who already voted on a proposal, do not receive any reminders. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Use the notify script in testsLukas Fleischer2-10/+15
Instead of only checking whether the notification script is called with the correct parameters, actually invoke the real notify script and check whether proper notifications are generated. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29tuvotereminder: Wait for notify processesLukas Fleischer1-1/+1
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Add tests for aurblupLukas Fleischer2-0/+59
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29aurblup: Drop support for multiple serversLukas Fleischer2-3/+3
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-29Add tests for pkgmaintLukas Fleischer2-0/+27
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29scripts: Do not use UNIX_TIMESTAMPLukas Fleischer2-4/+9
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-29Add tests for tuvotereminderLukas Fleischer2-1/+29
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Add tests for mkpkglistsLukas Fleischer2-0/+52
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29mkpkglists: Make output files configurableLukas Fleischer2-4/+9
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-29Update READMELukas Fleischer1-0/+6
Add information on the new directory layout. Shared Python modules and tests now have their own subdirectories. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Reorganize testsLukas Fleischer6-1/+1
Move and rename the existing git-interface tests such that tests for other scripts can be added easily. In particular, the following changes are made: * Move the existing tests from git-interface/test/ to test/. * Rename t0001-auth.sh to t1100-git-auth.sh. * Rename t0002-serve.sh to t1200-git-serve.sh. * Rename t0003-update.sh to t1300-git-update.sh. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Make test suite paths top-level directory relativeLukas Fleischer1-5/+6
Determine the top-level directory before running tests and make all script paths relative to that directory. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Use config and db in scriptsLukas Fleischer6-250/+184
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 Fleischer10-42/+66
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-29git-update: Move entry point to a main() methodLukas Fleischer1-140/+154
Move the main program logic of git-update to a main() method such that it can be used as a module and easily be invoked by setuptools wrapper scripts. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29git-serve: Move entry point to a main() methodLukas Fleischer1-108/+114
Move the main program logic of git-serve to a main() method such that it can be used as a module and easily be invoked by setuptools wrapper scripts. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29git-serve: Pass user and privileges as parametersLukas Fleischer1-7/+7
Move the main program logic of git-server to a main() method such that it can be used as a module and easily be invoked by setuptools wrapper scripts. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29git-auth: Move entry point to a main() methodLukas Fleischer1-25/+29
Move the main program logic of git-auth to a main() method such that it can be used as a module and easily be invoked by setuptools wrapper scripts. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Add a main() method to all Python scriptsLukas Fleischer6-94/+132
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 Fleischer2-0/+55
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-09-18t0002: Add tests for adopt/disown/set-comaintainersLukas Fleischer2-0/+211
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-18git-serve: Add support for setting co-maintainersLukas Fleischer1-0/+8
Add support for changing co-maintainers from the SSH interface. The syntax is `set-comaintainers <pkgbase> <user1> <user2>...`. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-18git-serve: Add support for disowning package basesLukas Fleischer1-0/+136
Add support for disowning packages from the SSH interface. The syntax is `disown <pkgbase>`. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-17git-serve: Add support for adopting package basesLukas Fleischer1-0/+46
Add support for adopting packages from the SSH interface. The syntax is `adopt <pkgbase>`. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-17git-serve: Format usage text automaticallyLukas Fleischer2-9/+27
Remove the formatting of the usage text and add code to columnize it automatically instead. Also, add more strict tests for the usage output. These new tests ensure that the usage header is printed, commands are indented properly and no overly long lines are produced. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-12git-serve: Mark setup-repo as deprecatedLukas Fleischer1-1/+1
Since 0c1187c (git-serve: Deprecate setup-repo, 2016-07-24), it is no longer recommended to use setup-repo. Mark the command as deprecated in the usage/help text. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-08-22git-update: Do not overwrite the repo variableLukas Fleischer2-3/+2
The repo variable is already used to store the pygit2.Repository. Fixes a regression introduced in d273ee5 (Use the official provider list to detect duplicates, 2016-05-17). Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>