There's nothing like writing php code in the dead hours of the night when you're stoked on sugar. That being said, I finally integrated my pkgbuild parsing code into a (almost completely) rewritten pkgsubmit.php. Here are some highlights (off the top of my head):
- Now uses PEAR::Archive_Tar - Integrates my previous pkgbuild parsing script - Any GNU/Tar file will work, including .tar, .tar.gz, .tar.bz2 - Raw PKGBUILDs may be submitted as well (and only PKGBUILDs. PKGBUILDs that come with patches, install scripts, etc will need to be archived) - Absolutely ZERO exec/system commands
There are some major and small changes to the submission process as well: - PKGBUILDs are thoroughly checked against Arch Packaging Standards (surprise surprise) - Uploaded archives are assumed to be correct (e.g. files in foo/PKGBUILD, foo/foo.install, etc), else rejected - The comment box has been removed. I've never seen the reason to always have to write "Initial upload" for a package - Overwrite option is gone. We check for permissions anyway, hence it's redundant
There are some other tiny changes that just make the process a bit easier, but I'll leave that to your discovery. And now for the hard part, testing. I only got a handful of responses for my previous request, but I'm crossing my fingers this time. I've set up an adequate test site here:
Testers will probably need to register an account (just like in AUR), then submit packages.
Possible bugs: - When I tried this on a local setup, uploaded files have 0600. The testing site maintains permissions, but I'm not sure what it is for the real AUR - Apparently there has to be a AUR syncdb script that moves files from INCOMING_DIR to URL_DIR. If someone can point me in the right direction for this, I'd be grateful (currently I'm reading from INCOMING_DIR)
Since this not just any bugfix, but quite a rewrite, feedback is important. I'd like to open this up to discussion =]
- Any GNU/Tar file will work, including .tar, .tar.gz, .tar.bz2
I think that for consistency with Archlinux there should be a check for only .tar.gz But maybe make it easy to allow other types, or to switch to a single other type. (if anyone wants to use AUR outside Archlinux with a different archive type for some reason)
- Uploaded archives are assumed to be correct (e.g. files in foo/PKGBUILD,
foo/foo.install, etc), else rejected
If you assume them to be correct how can you reject them?
- Overwrite option is gone. We check for permissions anyway, hence it's
Is it possible for TUs and devs to overwrite any package? If so this should be enabled for those types of users.
Refactored the usage documentation out into the the top level rpc page. Cleaned up a couple of other things too.