Commit graph

621 commits

Author SHA1 Message Date
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
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
ada3a8eab3 Use the AUR footer in cgit
Use the footer that is already used in other parts of the AUR website
instead of the footer from the main Arch Linux website.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-29 11:34:02 +01:00
Lukas Fleischer
8e06a607c8 Use a custom logo
Currently, the AUR sites are hard to distinguish from the official
website, especially when browsing Git repositories in cgit. Add "user
repository" to the logo to make it distinguishable from the official
site.

In order to avoid confusion, also change the link in the logo to the AUR
home page instead of the main Arch Linux website.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-29 11:30:04 +01:00
Lukas Fleischer
662f31cdb7 Add cgit configuration and style sheet
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-28 21:09:26 +01:00
Lukas Fleischer
74edb6fea9 Use Git repositories to store packages
* Remove package submission page from the web interface.
* Replace PKGBUILD and tarball links with links to cgit.
* Remove the "URLPath" field from RPC replies.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27 12:42:12 +01:00
Lukas Fleischer
253e76d8cc Add support for adding SSH public keys to profiles
Users can now add an SSH public key on the account edit page. This will
later be used to authenticate users via SSH.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27 12:42:12 +01:00
Lukas Fleischer
cee68a95f3 Suggest using makepkg instead of mkaurball
pacman 4.2.0 supports .SRCINFO and generates meta data by default.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-19 10:49:04 +01:00
Lukas Fleischer
b56dceaa8a Redirect to requests page after accepting deletions
Fixes FS#43100.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-13 15:58:40 +01:00
Lukas Fleischer
3b9c12715c Show user name in title on the account details page
Suggested-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-13 15:47:08 +01:00
Lukas Fleischer
5ebf534ba7 Avoid double slashes in notification email body
Refactor some of the URI generation code to avoid double slashes in
absolute URIs.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-13 15:28:54 +01:00
Lukas Fleischer
888b8d471f Check password length on the password reset form
We already check for a minimum password length on the account edit page.
Add the same check to the password reset form (which is also used to set
an initial password).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-11-21 11:43:31 +01:00
Lukas Fleischer
aa4acc9405 Add support for .SRCINFO
pacman officially supports .SRCINFO since commit 6029a77 (makepkg:
introduce .SRCINFO files for source packages, 2014-11-08).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-11-18 23:51:08 +01:00
Lukas Fleischer
76343fb915 Use an INI-style configuration file
Replace web/lib/config.inc.php with an INI-style configuration file.
This allows us to get rid of several globals and makes it easier to use
the same configuration file in external scripts.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-24 10:03:54 +02:00
Lukas Fleischer
c64b51f2ee voters.php: Show time stamps if available
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-17 09:53:02 +02:00
Lukas Fleischer
a1bee1a21e Add support for architecture-specific sources
As a follow-up to 4d7da95 (Add support for architecture-specific fields,
2014-08-10), handle architecture-specific source fields as well.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-10 12:29:18 +02:00
Lukas Fleischer
725a4778db Add a script to generate package lists
This can be used to regularly generate lists of packages and package
bases that are made available under /packages.gz and /pkgbase.gz,
respectively.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-10 10:57:47 +02:00
Lukas Fleischer
89b0fb8348 Use readfile() instead of include for static files
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-10 10:27:53 +02:00
Lukas Fleischer
2786c16bd5 Merge branch 'maint' 2014-10-03 13:18:04 +02:00
Lukas Fleischer
1b22f8046f rss.php: Include package functions
This is needed since 4426877 (Move latest_pkgs() to pkgfuncs.inc.php,
2014-05-29).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-03 13:17:38 +02:00
Lukas Fleischer
49f76cd53b Merge branch 'maint' 2014-08-11 22:50:01 +02:00
Lukas Fleischer
4d7da95906 Add support for architecture-specific fields
This adds support for architecture-specific dependencies and relations.
Support for this has recently been added to makepkg, see commit 2b556d8
(PKGBUILD: handle arch specific attributes, 2014-07-25) in the pacman
repository for details.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-10 12:32:46 +02:00
Lukas Fleischer
218ccf51e3 Add permission checks to the request feature
* Only show the request form to users that are logged in.
* Only show the close request form to Trusted Users and developers.
* Check for a valid login in pkgreq_file().

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-08 11:48:58 +02:00
Lukas Fleischer
0613a637b3 Fix notification handling on submission and adoption
Automatically add users to the notification list when adopting a
package. This used to work bug was broken by 03c6304 (Rework permission
handling, 2014-07-15). Fixes FS#41426.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-06 00:09:05 +02:00
Lukas Fleischer
237a4570e2 Add PCRE_DOLLAR_ENDONLY to preg_match()
When using preg_match() to check for a match that starts at the
beginning of the string and ends at the last character of the string, we
do not want to allow an additional newline character to sneak in.
Amongst other potential loopholes, adding the PCRE_DOLLAR_ENDONLY
modifier prevents users from registering with user names that end with a
newline character.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-06 00:00:33 +02:00
Lukas Fleischer
441498d896 Fix the registration form
Pass the right parameters to display_account_form() and
process_account_form() when showing/processing the registration form.
Fixes a regression introduced in 03c6304 (Rework permission handling,
2014-07-15).

Reported-by: Karthik K <hashken.distro@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 14:28:29 +02:00
Lukas Fleischer
7df8dc8bcb Add support for deleting user accounts
Users can now delete their own accounts by clicking a link in the
account edit form and confirming the deletion on a follow-up page.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-25 11:30:33 +02:00
Lukas Fleischer
daceef50eb Make deleted comments visible to Trusted Users
This allows Trusted Users to check whether a user posted a politically
incorrect comment, even if he already deleted it.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-25 11:30:32 +02:00
Lukas Fleischer
0a357a7d44 Add typeahead suggest to the merge request form
Add the typeahead implementation we already use for the package search
to the merge target text field. Instead of suggesting packages, suggest
package base names.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 17:53:30 +02:00
Lukas Fleischer
48ae736068 Prevent merging a package base with itself
Instead of deleting the package, show an error message if a user tries
to merge a package base with itself.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 17:53:28 +02:00
Lukas Fleischer
9048030da7 Drop support for source packages without .AURINFO
Disallow uploading source tarballs that do not contain .AURINFO. Also,
drop the PKGBUILD parser which is no longer needed.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 10:48:48 +02:00
Lukas Fleischer
d03f7a890f Fix pkgbase_votes_from_name()
In 676595f (Prefix package functions with pkg_/pkgbase_, 2014-04-05),
votes_for_pkgname() was renamed to pkgbase_votes_from_name() without
changing the semantics. Slightly adapt the implementation and interpret
the argument as a package base name instead of a package name. Also fix
the call site.

Reported-by: Felix Yan <felixonmars@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-16 19:22:58 +02:00
Johannes Dewender
2cff0d3455 home: requests should be filed in the web interface
There is a "file request" link in the "Package Actions" box
for every package.

Signed-off-by: Johannes Dewender <arch@JonnyJD.net>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-15 23:01:47 +02:00
Lukas Fleischer
03c6304e19 Rework permission handling
Add a new function has_credential() that checks whether the currently
logged in user is allowed to perform a given action. Moving all
permission handling to this central place makes adding new user groups
and adjusting permissions much more convenient.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-15 22:56:57 +02:00
Lukas Fleischer
b113764b0b Sanitize merge base name in pkgreq_file()
Move the check introduced in 06b7099 (Validate package base name when
filing requests, 2014-07-02) from pkgbase.php to pkgreq_file().

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04 11:25:37 +02:00
Lukas Fleischer
4645bcbacb Allow for adding a comment when closing a request
This allows Trusted Users to optionally add a comment when closing a
request. The comment is included in the notification email that is sent
to the requests mailing list.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04 11:10:50 +02:00
Lukas Fleischer
8a465182ba Allow for selecting a reason when closing a request
When closing a package request, Trusted Users can now pick a reason
("Accepted" or "Rejected"). This allows for marking a request as
accepted, even if the corresponding package base has already been
deleted.

Also, the notification email now always explicitly states whether a
request has been accepted or closed in the message body.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04 11:10:37 +02:00
Lukas Fleischer
436eabf39c Remove extra space from text buttons in Firefox
Fixes FS#41052.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-02 08:28:08 +02:00
Lukas Fleischer
a149fc493f Fix pagination in the package request list
This was not implemented properly in commit 8260111 (Add a package
request list, 2014-06-24).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-02 08:23:27 +02:00
Lukas Fleischer
64c4e51698 pkgbase.php: Highlight error messages
Make sure that error messages above the package list are actually
visible to the user.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-02 08:23:25 +02:00
Lukas Fleischer
06b7099357 Validate package base name when filing requests
Make sure that the package base to merge into does not contain any
invalid characters.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-02 08:22:51 +02:00
Lukas Fleischer
e141c6c38c Fix title in package requests list
Use "Requests" instead of "File Request" as title for the package
request list.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-02 08:02:41 +02:00
Lukas Fleischer
8535435595 Move user statistics table to the right
Display user statistics under the general package statistics table.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-01 21:17:14 +02:00
Lukas Fleischer
0d513e1468 Be explicit about accepted requests in emails
When sending notification emails after closing a request, be explicit
about whether the request has been accepted or not.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-01 20:06:41 +02:00
Lukas Fleischer
cf4ea0171e Simplify code to bound integer values
Suggested-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-01 19:46:16 +02:00
Lukas Fleischer
74a82bb2fb Rename package request functions to pkgreq_*()
Since these functions now reside in a separate module, use the module
name as function name prefix.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-30 08:49:46 +02:00
Lukas Fleischer
c82fc025e2 Move package request form to a template
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 21:34:39 +02:00
Lukas Fleischer
409d1c3ffd Allow regular users to file package requests
Move the permission check so that regular users can file requests,
whereas the request list is only available to Trusted Users and
developers.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 21:31:18 +02:00
Lukas Fleischer
91e6b5cb2f Add support for merge requests
This adds a new "Merge" category to the list of available request types
and also adds a new "Merge into" field that is hidden via JavaScript
when "Deletion" or "Orphan" is selected.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 11:38:02 +02:00
Lukas Fleischer
959c61a77d Add an accept button to the package request list
This button allows for accepting a request, disowning the affected
package or redirecting to the package deletion page. The request is
closed automatically when the action has been performed.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 11:36:15 +02:00