Age | Commit message (Collapse) | Author | Files | Lines |
|
Automatically detect references to Flyspray bug reports in comments and
convert them to links to the Arch Linux bug tracker.
Implements FS#52008.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
Use `/usr/bin/env python3` instead of `/usr/bin/python3` in the shebang
of Python scripts. This adds support for non-standard Python interpreter
paths such as the paths used in virtualenv environments.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
Add a missing space to the SQL statement performing the disown
operation.
Fixes FS#55068.
Note that the broken query was not discovered by the test suite since
SQLite parses "?AND" inside prepared statements gracefully while MySQL
does not.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
In addition to the packages list and the package base list, also create
a list of registered user names.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
AUR_PRIVILEGED allows people with privileged AUR accounts to evade the
block on non-fast-forward commits. While valid in this case, we should
not do so by default, since in at least one case a TU did this without
realizing there was an existing package.
( https://aur.archlinux.org/packages/rtmidi/ )
Switch to using allow_overwrite to check for destructive actions.
Use .ssh/config "SendEnv" on the TU's side and and sshd_config
"AcceptEnv" in the AUR server to specifically request overwrite access.
TUs should use: `AUR_OVERWRITE=1 git push --force`
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
This was broken in commit 8914a41db938194efc021f842c89d47ff6b522c9 which
refactored the argument parsing. Instead of checking for at least the
set-keywords command and a pkgbase name, we were checking for *exactly*
the command and pkgbase name, leaving no room for keywords...
As a result, while we could clear the keywords, we could not set them.
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
Since commit 09cb61a (schema: Remove invalid default values for TEXT
columns, 2017-04-15), the PackageBases.FlaggerComment field no longer
has a default value. Initialize this field explicitly whenever a new row
is added to the PackageBases table.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
With the new Markdown support, text paragraphs are now properly
converted to HTML paragraphs, so we no longer need to keep line breaks.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
Automatically detect Git commit identifiers, shorten them, and make them
link to the cgit interface.
Implements FS#43290.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
Before switching to the new comment rendering script and Markdown, no
special syntax was needed to make URLs clickable. Reintroduce this
feature and automatically detect links in addition to the hyperlink
syntax already supported by Markdown.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
Support Markdown syntax in package comments. Among other things, this
makes it easier to paste command line output and patches.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
Instead of converting package comments from plain text to HTML code when
they are displayed, do the conversion when the comment is posted and
store the rendered result in the database. The conversion itself is done
by a Python script which uses Bleach for sanitizing the text.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
Split optional dependency descriptions from dependency names before
storing them in the database and use a separate column to store the
descriptions.
This allows us to simplify and optimize the SQL queries in
pkg_dependencies() as well as pkg_required().
Suggested-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
Reject commits containing .SRCINFO files without any pkgname entries.
Suggested-by: Bruno Pagani <bruno.n.pagani@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
Currently, IP address bans affect the web interface only. Make sure they
are honored in the SSH interface as well.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
In addition to logging the last login date and IP address on the web
interface, store the time stamp and IP address of the last SSH login in
the database.
This simplifies user banning if one of the new SSH interface features,
such as the voting mechanism implemented in 7ee2fdd (git-serve: Add
support for (un-)voting, 2017-01-23), is abused.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
Add support for voting for packages and removing votes from the SSH
interface. The syntax is `vote <pkgbase>` resp. `unvote <pkgbase>`.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
Make it easier to reuse the helper functions provided by git-serve from
another Python script by throwing exceptions instead of terminating the
program on errors.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
Add support for flagging or unflagging packages from the SSH interface.
The syntax is `flag <pkgbase> <comment>` resp. `unflag <pkgbase>`.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
Do not use the EXCEPT clause which is unsupported in MySQL. Instead, use
a subquery which is standard-compliant and makes the query easier to
read at the same time.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
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>
|
|
Add wrappers for the maintenance scripts to the setuptools
configuration.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
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>
|
|
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
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>
|
|
Bail out early if the source array contains an entry with more than 8000
characters.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
|
|
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>
|
|
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>
|
|
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>
|