From f35f7206869d359a1a5adbc919a8b2a9e23e4ad4 Mon Sep 17 00:00:00 2001 From: eric Date: Tue, 19 Oct 2004 22:31:29 +0000 Subject: back on the job.... --- web/README.txt | 9 +++-- web/html/pkgsubmit.php | 53 ++++++++++++++++++++++----- web/testing/xmms-skins.tar.gz | Bin 0 -> 1803 bytes web/testing/xmms-skins/PKGBUILD | 57 ++++++++++++++++++++++++++++++ web/testing/xmms-skins/xmms-skins.install | 29 +++++++++++++++ 5 files changed, 137 insertions(+), 11 deletions(-) create mode 100644 web/testing/xmms-skins.tar.gz create mode 100644 web/testing/xmms-skins/PKGBUILD create mode 100644 web/testing/xmms-skins/xmms-skins.install (limited to 'web') diff --git a/web/README.txt b/web/README.txt index af2b293..0054349 100644 --- a/web/README.txt +++ b/web/README.txt @@ -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). Servername aur diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 1094799..4439911 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -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 "
\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 "" . $msg . "
\n"; + print "
\n"; + html_footer("\$Id$"); + exit(); +} + if ($_COOKIE["AURSID"]) { # track upload errors # $error = ""; + if ($DBUG) { + print "
\n";
+    print_r($_REQUEST);
+    print "
\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("", $pkg_name, "")); } } - } + } 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!!
\n"; + print "
\n"; + html_footer("\$Id$"); + exit(); # update the backend database if there are no errors # diff --git a/web/testing/xmms-skins.tar.gz b/web/testing/xmms-skins.tar.gz new file mode 100644 index 0000000..9fb0db3 Binary files /dev/null and b/web/testing/xmms-skins.tar.gz differ diff --git a/web/testing/xmms-skins/PKGBUILD b/web/testing/xmms-skins/PKGBUILD new file mode 100644 index 0000000..e2c7b38 --- /dev/null +++ b/web/testing/xmms-skins/PKGBUILD @@ -0,0 +1,57 @@ +# $Id: PKGBUILD,v 1.5 2004/05/24 18:09:09 eric Exp $ +# Maintainer: eric +# Contributor: Damir Perisa +# 0.2 Upgrade: Lukas Sabota + +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 + diff --git a/web/testing/xmms-skins/xmms-skins.install b/web/testing/xmms-skins/xmms-skins.install new file mode 100644 index 0000000..643d98b --- /dev/null +++ b/web/testing/xmms-skins/xmms-skins.install @@ -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 $* -- cgit v1.2.3-54-g00ecf