back on the job....

This commit is contained in:
eric 2004-10-19 22:31:29 +00:00
parent 63fe7babb2
commit f35f720686
5 changed files with 137 additions and 11 deletions

View file

@ -8,8 +8,13 @@ Setup on ArchLinux:
127.0.0.1 localhost aur
3) Configure Apache
- Edit /etc/httpd/conf/httpd.conf and append the following:
Replace MYUSER with your username.
- Edit /etc/httpd/conf/httpd.conf and make sure that PHP
support is enabled by uncommenting the LoadModule line
that specifies the PHP module.
- Also append the following snippet to enable the aur
Virtual Host (Replace MYUSER with your username).
<VirtualHost aur:80>
Servername aur

View file

@ -4,18 +4,32 @@ include("submit_po.inc"); # use some form of this for i18n support
set_lang(); # this sets up the visitor's language
check_sid(); # see if they're still logged in
html_header(); # print out the HTML header
print "<center>\n";
# Debugging
$DBUG = 1;
# this is the directory that new packages will be uploaded to
#
$UPLOAD_DIR = "/tmp/aur/temp/";
$INCOMING_DIR = "/tmp/aur/incoming/";
function exitError($msg) {
print "<span class='error'>" . $msg . "</span><br />\n";
print "</center>\n";
html_footer("\$Id$");
exit();
}
if ($_COOKIE["AURSID"]) {
# track upload errors
#
$error = "";
if ($DBUG) {
print "</center><pre>\n";
print_r($_REQUEST);
print "</pre><center>\n";
}
if ($_REQUEST["pkgsubmit"]) {
# If this var is set, then the visitor is uploading a file...
@ -32,8 +46,10 @@ if ($_COOKIE["AURSID"]) {
}
}
if (!$_REQUEST["comments"] && !$error) {
if (!$error && (!$_REQUEST["comments"] || $_REQUEST["comments"] == '')) {
$error = __("You must supply a comment.");
} else {
print exitError($error);
}
if (!$error) {
@ -53,7 +69,9 @@ if ($_COOKIE["AURSID"]) {
array("<b>", $pkg_name, "</b>"));
}
}
}
} else {
print exitError($error);
}
if (!$error) {
# no errors checking upload permissions, go ahead and try to process
@ -75,16 +93,18 @@ if ($_COOKIE["AURSID"]) {
#
$error = __("Error trying to upload file - please try again.");
}
}
} else {
print exitError($error);
}
# at this point, we can safely unpack the uploaded file and parse
# its contents.
#
if (!mkdir($INCOMING_DIR.$pkg_name)) {
if (!@mkdir($INCOMING_DIR.$pkg_name)) {
$error = __("Could not create incoming directory: %s.",
array($INCOMING_DIR.$pkg_name));
} else {
if (!chdir($INCOMING_DIR.$pkg_name)) {
if (!@chdir($INCOMING_DIR.$pkg_name)) {
$error = __("Could not change directory to %s.",
array($INCOMING_DIR.$pkg_name));
} else {
@ -101,6 +121,9 @@ if ($_COOKIE["AURSID"]) {
}
}
}
if ($error) {
print exitError($error);
}
# At this point, if no error exists, the package has been extracted
# There should be a $INCOMING_DIR.$pkg_name."/".$pkg_name directory
@ -122,7 +145,7 @@ if ($_COOKIE["AURSID"]) {
# try and create $INCOMING_DIR.$pkg_name."/".$pkg_name and
# move package contents into the new dir
#
if (!mkdir($INCOMING_DIR.$pkg_name."/".$pkg_name)) {
if (!@mkdir($INCOMING_DIR.$pkg_name."/".$pkg_name)) {
$error = __("Could not create directory %s.",
array($INCOMING_DIR.$pkg_name."/".$pkg_name));
} else {
@ -131,7 +154,7 @@ if ($_COOKIE["AURSID"]) {
$error = __("Error exec'ing the mv command.");
}
}
if (!chdir($INCOMING_DIR.$pkg_name."/".$pkg_name)) {
if (!@chdir($INCOMING_DIR.$pkg_name."/".$pkg_name)) {
$error = __("Could not change to directory %s.",
array($INCOMING_DIR.$pkg_name."/".$pkg_name));
}
@ -191,6 +214,10 @@ if ($_COOKIE["AURSID"]) {
}
fclose($fp);
# Now process the lines and put any var=val lines into the
# 'pkgbuild' array. Also check to make sure it has the build()
# function.
#
$seen_build_function = 0;
while (list($k, $line) = each($lines)) {
@ -243,7 +270,15 @@ if ($_COOKIE["AURSID"]) {
$error = __("Package names do not match.");
}
}
}
}
if ($error) {
print exitError($error);
}
print "Groovy!!! - We're all set to populate the database!!<br />\n";
print "</center>\n";
html_footer("\$Id$");
exit();
# update the backend database if there are no errors
#

Binary file not shown.

View file

@ -0,0 +1,57 @@
# $Id: PKGBUILD,v 1.5 2004/05/24 18:09:09 eric Exp $
# Maintainer: eric <eric@archlinux.org>
# Contributor: Damir Perisa <damir.perisa@bluewin.ch>
# 0.2 Upgrade: Lukas Sabota <punkrockguy318@comcast.net>
pkgname=xmms-skins
pkgver=0.2
pkgrel=2
pkgdesc="An assortment of skins for XMMS"
url="http://www.xmms.org/skins.php http://www.spacefem.com/xmms.shtml"
depends=('xmms' 'unzip')
install=$pkgname.install
source=(http://spacefem.com/skins/ChalkItUp.tar.gz \
http://www.xmms.org/files/Skins/Winamp_X_XMMS_1.01.tar.gz \
http://www.xmms.org/files/Skins/arctic_Xmms.zip \
http://www.xmms.org/files/Skins/chaos_XMMS.zip \
http://www.xmms.org/files/Skins/detone_green.zip \
http://gd.tuwien.ac.at/mm/xmms/Skins/titanium.zip \
http://www.xmms.org/files/Skins/xmms-256.zip \
http://themes.freshmeat.net/redir/acquaxmms/33610/url_tgz/acquaxmms-default-1.0.tar.gz \
http://themes.freshmeat.net/redir/4dweorng/31359/url_tgz/4dweorng-default-1.0.tar.gz \
http://themes.freshmeat.net/redir/bhxmms/29592/url_tgz/bhxmms-1.0.tar.gz \
http://themes.freshmeat.net/redir/chaos2-xmms/34064/url_tgz/chaos2-xmms-default-1.4.tar.gz \
http://www.xmms.org/files/Skins/Eclipse.tar.gz \
http://themes.freshmeat.net/redir/jvcamp/34423/url_zip/jvcamp.zip \
http://themes.freshmeat.net/redir/kenwood/34424/url_zip/kenwood1.zip \
http://themes.freshmeat.net/redir/myxmms/45828/url_tgz/myxmms-default-1.01.tar.gz \
http://themes.freshmeat.net/redir/ojxmms/29453/url_tgz/ojxmms-1.0.tar.gz \
http://themes.freshmeat.net/redir/philipsxmms/34426/url_zip/radical.zip \
http://themes.freshmeat.net/redir/pioneerlite/34425/url_zip/pioneerlite.zip \
http://themes.freshmeat.net/redir/succubamp/35024/url_tgz/succubamp-default-1.0.tar.gz \
http://themes.freshmeat.net/redir/ultraclean-xmms/46461/url_tgz/ultraclean-xmms-default.tar.gz \
http://gd.tuwien.ac.at/mm/xmms/Skins/xmms_skin-0.9.zip \
http://havardk.xmms.org/skins/xmmsskins-1.0.tar.gz)
md5sums=('1a541ca4fbcbd60eaffac97a8e01a514' '60b5249618067baba41093d566f56c9f'
'2eef6028cb492eb6c61e3d4833f050d1' 'ae60e6fd170737af35caf219ddf859ec'
'd3d5e43860db73a73b37a4949eebfe4f' 'a38d448ac059f42bd32e52f3999a6ca5'
'93891ba6259280d07a8781cd89234703' '92dd1ae652c43ea514764460b852f42c'
'9f79f309e5859b878b0cdcfb3d97a8b0' '55b6ada4b963132bb561156eddd47615'
'880be0a9dbbd9a3a458739063c6e0904' '89c7acb342bee6c7977047669ba195d7'
'7caaa4977c73c23e70c758a94c4104ef' '96340dd2f5634a6d49c9a314c1db7ad1'
'83f2cdc3d2cd2fbd5f3a4f92eba8d932' '108266865bcf9509edea839ca0a76d57'
'2b2fee8ce2ba18074dc202a50372ce95' 'acb8bf4189ad7d00a36ca74514686f8e'
'a770f9e537a0cec3818b331696d7ffff' 'b90c21851264fd273bb06196fb157a7a'
'aaaed9cd81b233e4fe5f896e9353443e' 'f625e06f82d8132209ed947c6d8502a4')
build() {
cd $startdir/src/
/bin/mkdir -p $startdir/pkg/usr/share/xmms/Skins
/bin/cp *.zip $startdir/pkg/usr/share/xmms/Skins
/bin/cp *.gz $startdir/pkg/usr/share/xmms/Skins
/bin/rm $startdir/pkg/usr/share/xmms/Skins/ultraclean-xmms-default.tar.gz
/bin/rm $startdir/pkg/usr/share/xmms/Skins/xmmsskins-1.0.tar.gz
}
# vim: ts=2 sw=2 et ft=sh

View file

@ -0,0 +1,29 @@
# arg 1: the new package version
post_install() {
echo "=> If you are upgrading from SpamAssassin 2.x, please see the notes"
echo "=> at http://spamassassin.apache.org/full/3.0.x/dist/UPGRADE"
echo "=> In particular, you may need to update your bayes db with:"
echo "=> sa-learn --sync"
echo "=> Also, you may want to set your LANG environment variable to"
echo "=> a non-utf8 value such as LANG=en_US prior to calling SA"
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
/bin/true
}
# arg 1: the old package version
pre_remove() {
/bin/true
}
# arg 1: the old package version
post_remove() {
/bin/true
}
op=$1
shift
$op $*