Commit graph

28 commits

Author SHA1 Message Date
Lukas Fleischer
73e7d97277 mkpkglists: Use the main configuration file
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-24 10:03:54 +02: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
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
676595f9bf Prefix package functions with pkg_/pkgbase_
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05 15:55:31 +02:00
Lukas Fleischer
6b1ba5e48f aurblup: Update for pacman 4.1 API changes
alpm_db_register_sync() and alpm_option_get_syncdbs() have been renamed.
Update aurblup sources accordingly.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-04-28 13:44:32 +02:00
Lukas Fleischer
6dc61e7d9e Remove aurblup configuration file parser
Drop the (very bad) PHP parser and allow for passing all necessary
configuration via command line parameters.

Also, add a convenience wrapper written in PHP that parses the
configuration file and subsequently calls aurblup with correct command
line options.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-02-15 13:25:56 +01:00
Dan McGee
99a2bb81cf aurblup: update for pacman 4 revised libalpm API
Notable changes include the necessary handle object and the splitting
of provides and replaces into alpm_depend_t objects.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-24 17:57:52 +02:00
Dan McGee
d20f90ead3 aurblup: remove use of alpm_list_getdata()
This is not strictly necessry as listitem->data is public.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-24 17:57:51 +02:00
Dan McGee
156bfbddb9 aurblup: style cleanups
Always use two lines for if statements, use a character constant rather
than the 0 integer when NULL-terminating a string, and remove the
unnecessary NULL check before free(value)- free(NULL) is a no-op and
always safe.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-24 17:57:51 +02:00
Dan McGee
f5736ace65 aurblup: remove ';' from queries
The semicolons are not necessary when performing queries via the MySQL
API, so remove them.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-24 17:57:51 +02:00
Dan McGee
c69c44050e aurblup: Update config.h.proto
* Switch to x86_64 architecture by default
* Add more repositories (including multilib)
* Update default configuration path to include .php file extension

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-08-19 10:21:14 +02:00
Lukas Fleischer
0ac8970b62 Rename package_exists() to pkgid_from_name()
Describe what this function actually does: Return the ID of a package
with a given name and return NULL if such a package doesn't exist.

The function name is chosen in a fashion similar to other functions from
"pkgfuncs.inc.php" (pkgname_from_id(), pkgnotify_from_sid(), ...).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-08-11 16:17:07 +02:00
Dan McGee
6ae2bc514f Add a upload directory transform script
This goes with the previous patch that moves uploads into segmented
subdirectories. To actually run, follow the DRYRUN instructions.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-08-10 15:23:00 +02:00
Dan McGee
9a79d2105e Segment the upload directory by package name prefix
This implements the following scheme:

* /packages/cower/ --> /packages/co/cower/
* /packages/j/     --> /packages/j/j/
* /packages/zqy/   --> /packages/zq/zqy/

We take up to the first two characters of each package name as a
intermediate subdirectory, and then the full package name lives
underneath that. Shorter named packages live in a single letter
directory.

Why, you ask? Well because earlier today the AUR hit 32,000 entries in
the unsupported/ directory, making new package uploads impossible. While
some might argue we shouldn't have so many damn packages in the repos,
we should be able to handle this case.

Why two characters instead of one? Our two biggest two-char groups, 'pe'
and 'py', both start with 'p', and have nearly 2000 packages each. Go
Python and Perl.

Still needed is a "move the existing data" script, as well as a set of
rewrite rules for those wishing to preserve backward compatible URLs for
any helper programs doing the wrong thing and relying on them.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-08-10 14:34:07 +02:00
Dan McGee
1e20af9aed scripts/cleanup: use native PHP only
No need to shell out to the system here. Also fix the script so it
actually works.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-08-10 14:34:06 +02:00
Dan McGee
2e20a7929f aurblup: use implicit make rules and adjust CFLAGS
We don't need to add rules for implicit .c -> .o conversions. Also add
-O2 to the CFLAGS as gcc doesn't print many warnings unless at least
some level of optimization is used.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-06-28 08:53:07 +02:00
Dan McGee
59c82af185 aurblup: mark all functions and global variables static
These don't need visibility outside of this compilation unit. This also
allows a C compiler to inline and optimize as it sees fit.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-06-28 08:53:07 +02:00
Dan McGee
0cb493ef2a aurblup: blacklist processing query changes
* Do all list building and freeing outside of the transaction to keep it
  as short as possible.
* Remove ability to blacklist without transactions as we now only
  support InnoDB/transactional engines with proper relations.
* No need to turn autocommit off; BEGIN TRANSACTION operates regardless
  of this setting.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-06-28 08:53:06 +02:00
Lukas Fleischer
e72f02872f Use a real sync algorithm in aurblup (fixes FS#23039).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-26 20:41:04 +01:00
Lukas Fleischer
c332c0a0f5 Update aurblup "README".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-11 14:43:24 +01:00
Lukas Fleischer
a64cd12feb Add support for MySQL transactions to aurblup.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-11 14:43:23 +01:00
Lukas Fleischer
13bcc269ff Fix typos in aurblup source and "README".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-11 14:43:23 +01:00
Lukas Fleischer
ddc54358d0 Add packages' provides and replaces to the blacklist in aurblup.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-11 14:43:23 +01:00
Lukas Fleischer
48957ef5d5 Fix memory leak in aurblup.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-11 14:43:22 +01:00
Lukas Fleischer
400d7845e4 Add AUR package blacklist updater (aurblup).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-11 14:43:22 +01:00
Dan McGee
7f5af61c88 Drop PackageLocations table and references
We don't need this anymore since all packages managed here are
well...managed here. Rip out all of the places we were using this field,
many of which depended on the magic value '2' anyway.

On the display side of things, we had a column that was always showing
'unsupported' that is now gone, and you can no longer sort by this column.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-01 12:41:08 +01:00
Loui Chang
bbc05414cf Update cleanup script to remove non-unsupported files.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-03-03 11:21:08 -05:00
Loui Chang
8d80ff50af Add a script to clean up files of deleted unsupported packages.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-11-21 13:52:04 -05:00