Commit graph

1605 commits

Author SHA1 Message Date
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
e9ebcc4479 Add a time stamp to package base votes
This can potentially be used to identify trending packages.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-16 18:15:45 +02:00
Lukas Fleischer
c986ba0c52 Merge branch 'maint' 2014-10-11 11:27:04 +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
01fed360c2 Use proper email address in send_resetkey()
Fixes FS#41860.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-10 10:20:57 +02:00
Lukas Fleischer
2786c16bd5 Merge branch 'maint' 2014-10-03 13:18:04 +02:00
Lukas Fleischer
55586d9c22 Include proper timestamp in auto-accept emails
Fixes a regression introduced in c70b340 (Close requests before
accepting, 2014-07-29).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-03 13:17:38 +02:00
Lukas Fleischer
76872d8b08 Fix permission check in pkgreq_close()
Make sure that requests can be auto-accepted if filed by a regular user.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-03 13:17:38 +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
2b29fa4bb0 Group dependencies by dependency type
Implements FS#40888.

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
d61b34f255 Fix the return value of save_salt()
Return true if and only if the SQL query was executed successfully.
Logins with an unsalted password no longer fail now.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-08 11:38:00 +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
13693fbdbc Release 3.4.3
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-02 15:27:42 +02:00
Balló György
92e827330c Count users in "Trusted User & Developer" group as TU
This reflects the changes in 3610f3c.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-02 15:25:46 +02:00
Lukas Fleischer
6d5c936540 Release 3.4.2
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 18:33:54 +02:00
Lukas Fleischer
7283d0fcc2 Lock fresh orphan requests
Trusted Users should almost always wait for two weeks before accepting
an orphan request. Lock orphan requests during the first two weeks.
Package bases can still be orphaned and package requests can still be
closed manually during that period of time.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 18:14:46 +02:00
Lukas Fleischer
c70b340c41 Close requests before accepting
When auto-accepting a request, we need to close the package request
before performing the actual action (disown/deletion/merge). Otherwise,
the former maintainer is not included in the Cc list of the
acceptance/rejection notification email.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 17:59:26 +02:00
Lukas Fleischer
98235c834b Remove duplicate recipients from Cc
When a user files a request for a package maintained by himself, he is
currently included in the Cc list twice. Use array_unique() to omit
repeated entries.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 17:52:09 +02:00
Lukas Fleischer
d136d7c874 Allow users to delete their own comments
Fixes a regression introduced in 03c6304 (Rework permission handling,
2014-07-15). Fixes FS#41379.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 15:17:58 +02:00
Lukas Fleischer
63f95bd86f Release 3.4.1
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 14:39:41 +02:00
Lukas Fleischer
4b5f8da5be Suppress PHP notice in process_account_form()
Add a check to remove a notice which is displayed after registration
since commit 03c6304 (Rework permission handling, 2014-07-15).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 14:39:10 +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
97b7e077f1 Do not show deletion link on the registration page
In 7df8dc8 (Add support for deleting user accounts, 2014-07-25), a link
to the account deletion page was added to the account edit form. Make
sure we only show this link if the user actually wants to edit an
account and do not show this link on the account registration page.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 14:20:57 +02:00
Lukas Fleischer
430bf97ca6 Release 3.4.0
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-28 14:30:37 +02:00
Lukas Fleischer
34aa226c66 Do not allow regular users to edit all accounts
Fixes a regression introduced in 03c6304 (Rework permission handling,
2014-07-15).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-25 11:30:33 +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
f4ee1278e5 Clean up user references in user_delete()
Explicitly clean up all references before deleting a user.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-25 11:30:32 +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
446d4537d4 pkgreq_results.php: Only show non-empty merge targets
In the column that contains the merge target, only display the
parentheses if the merge target is a non-empty string.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 15:25:37 +02:00
Lukas Fleischer
ed1e747847 Verify that the target of merge operations exists
Make sure that the target of a merge operation is either empty or an
existing package base name.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 15:11:59 +02:00
Lukas Fleischer
68abf41b94 Display correct comment count on package base page
Show the correct number of package base comments in the tool tip message
of the "Latest Comments" link.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 11:14:40 +02:00
Lukas Fleischer
088aab44ea Drop comment count from translatable message
The title "View all %s comments" becomes "View all %s comment" when
adding plural support (which is needed for other languages that have
more than one plural form). Simply remove the comment count from the
message and add it in parentheses.

Suggested-by: Safa Alfulaij <safa1996alfulaij@gmail.com>
Suggested-by: Sebastian Wilzbach <sebi@wilzbach.me>
Suggested-by: kachelaqa <kachelaqa@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 11:09:40 +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
c36f0e885a Automatically accept orphan requests for old packages
If an orphan request is filed for a package that has been flagged
out-of-date for at least 180 days, it is disowned automatically.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-17 16:57:04 +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
Lukas Fleischer
e9b13cef3f Mention the target of merge requests in emails
When sending the initial notification email for a merge request, include
the name of the package base that is the target of the requested merge
operation.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-16 11:11:23 +02:00
Lukas Fleischer
42d927366a Use Cc instead of Bcc in request notifications
Add the request creator and the current package maintainer to Cc instead
of Bcc when sending notification emails for package requests. This
allows users to forward any discussion to both of them by using the
"Group Reply" function of their MUA.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-16 11:09:55 +02:00
Lukas Fleischer
bfb253ef72 Bcc notification emails to the request creator
Add both the request creator and the current package maintainer to the
Bcc list of notification emails for package requests.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-16 11:09:30 +02:00
Lukas Fleischer
f8343e5a68 Remove unused function pkg_details_by_name()
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-16 10:33:01 +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