From 81efd3d8cd39d07930b18dcd8f904153500bfbf3 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 29 Dec 2008 13:30:00 -0800 Subject: Allow devlist-mailer to send to alternate addresses Signed-off-by: Aaron Griffin --- cron-jobs/devlist-mailer | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cron-jobs') diff --git a/cron-jobs/devlist-mailer b/cron-jobs/devlist-mailer index b24d530..671cbbb 100755 --- a/cron-jobs/devlist-mailer +++ b/cron-jobs/devlist-mailer @@ -7,8 +7,12 @@ LIST="arch-dev-public@archlinux.org" FROM="repomaint@archlinux.org" SUBJECT="Repository Maintenance $(date +"%d-%m-%Y %H:%M")" -if [ $# -eq 1 ]; then - SUBJECT="$1" +if [ $# -ge 1 ]; then + SUBJECT="$1 $(date +"%d-%m-%Y %H:%M")" +fi + +if [ $# -ge 2 ]; then + LIST="$2" fi stdin="$(cat)" -- cgit v1.2.3-24-g4f1b From d39b68ede8567fb2ee15f45995ddab8f4710e9dc Mon Sep 17 00:00:00 2001 From: Xavier Chantry Date: Sat, 3 Jan 2009 13:22:57 +0100 Subject: check_packages : add --arch option. The parsing script didn't set CARCH previously, and the flashplugin PKGBUILD exited in this case. First override the exit function to prevent the whole script to exit, and add a --arch option to be able to set CARCH correctly. To be used like this : For core and extra : ./check_packages.py --abs-tree=/home/abs/rsync/i686 --repos=core,extra --arch=i686 ./check_packages.py --abs-tree=/home/abs/rsync/x86_64 --repos=core,extra --arch=x86_64 For community : ./check_packages.py --abs-tree=/home/abs/rsync/i686 --repos=community --arch=i686 ./check_packages.py --abs-tree=/home/abs/rsync/x86_64 --repos=community --arch=x86_64 Signed-off-by: Xavier Chantry Signed-off-by: Aaron Griffin --- cron-jobs/check_archlinux/check_packages.py | 23 ++++++++++++++--------- cron-jobs/check_archlinux/parse_pkgbuilds.sh | 9 ++++++++- 2 files changed, 22 insertions(+), 10 deletions(-) (limited to 'cron-jobs') diff --git a/cron-jobs/check_archlinux/check_packages.py b/cron-jobs/check_archlinux/check_packages.py index 69b14c3..f0fd4a5 100755 --- a/cron-jobs/check_archlinux/check_packages.py +++ b/cron-jobs/check_archlinux/check_packages.py @@ -49,11 +49,11 @@ class Depend: self.version = version self.mod = mod -def parse_pkgbuilds(repos): +def parse_pkgbuilds(repos,arch): oldcwd = os.getcwd() os.chdir(absroot) for repo in repos: - data = commands.getoutput(oldcwd + '/parse_pkgbuilds.sh ' + repo) + data = commands.getoutput(oldcwd + '/parse_pkgbuilds.sh ' + arch + ' ' + repo) parse_data(repo,data) os.chdir(oldcwd) @@ -292,24 +292,27 @@ def print_usage(): print "Usage: ./check_packages.py [OPTION]" print "" print "Options:" - print " --abs-tree= Check specified tree (default : /var/abs)" - print " --repos= Check specified repos (default : core,extra)" + print " --abs-tree= Check the specified tree (default : /var/abs)" + print " --repos= Check the specified repos (default : core,extra)" + print " --arch= Check the specified arch (default : i686)" print " -h, --help Show this help and exit" print "" print "Examples:" print "\n Check core and extra in existing abs tree:" - print " ./check_packages.py --abs-tree=/var/abs --repos=core,extra" + print " ./check_packages.py --abs-tree=/var/abs --repos=core,extra --arch=i686" print "\n Check community:" - print " ./check_packages.py --abs-tree=/var/abs --repos=community" + print " ./check_packages.py --abs-tree=/var/abs --repos=community --arch=i686" print "" ## Default path to the abs root directory absroot = "/var/abs" ## Default list of repos to check repos = ['core', 'extra'] +## Default arch +arch = "i686" try: - opts, args = getopt.getopt(sys.argv[1:], "", ["abs-tree=", "repos="]) + opts, args = getopt.getopt(sys.argv[1:], "", ["abs-tree=", "repos=", "arch="]) except getopt.GetoptError: print_usage() sys.exit() @@ -319,6 +322,8 @@ if opts != []: absroot = a elif o in ("--repos"): repos = a.split(",") + elif o in ("--arch"): + arch = a else: print_usage() sys.exit() @@ -339,11 +344,11 @@ loadrepos = set([]) for repo in repos: loadrepos = loadrepos | set(get_repo_hierarchy(repo)) -print_heading("Integrity Check") +print_heading("Integrity Check " + arch + " of " + ",".join(repos)) print "\nPerforming integrity checks..." print "==> parsing pkgbuilds" -parse_pkgbuilds(loadrepos) +parse_pkgbuilds(loadrepos,arch) repopkgs = {} for name,pkg in packages.iteritems(): diff --git a/cron-jobs/check_archlinux/parse_pkgbuilds.sh b/cron-jobs/check_archlinux/parse_pkgbuilds.sh index d4205ae..47aec89 100755 --- a/cron-jobs/check_archlinux/parse_pkgbuilds.sh +++ b/cron-jobs/check_archlinux/parse_pkgbuilds.sh @@ -1,5 +1,10 @@ #!/bin/bash +# Usage : parse_pkgbuilds.sh arch +# Example : parse_pkgbuilds.sh i686 /var/abs/core /var/abs/extra + +exit() { return; } + parse() { unset pkgname pkgver pkgrel unset depends makedepends conflicts provides @@ -67,10 +72,12 @@ find_pkgbuilds() { fi } -if [ -z "$*" ]; then +if [ -z "$1" -o -z "$2" ]; then exit 1 fi +CARCH=$1 +shift for dir in "$@"; do find_pkgbuilds $dir done -- cgit v1.2.3-24-g4f1b From 5f64e9993a494040b0280ed0f1daa38f68f9c46b Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Wed, 14 Jan 2009 13:31:11 -0800 Subject: Remove HH:MM from devlist-mailer subject lines This was extraneous info. Not needed as higher granularity can be gleaned from the mail's date Signed-off-by: Aaron Griffin --- cron-jobs/devlist-mailer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cron-jobs') diff --git a/cron-jobs/devlist-mailer b/cron-jobs/devlist-mailer index 671cbbb..ca2e46b 100755 --- a/cron-jobs/devlist-mailer +++ b/cron-jobs/devlist-mailer @@ -6,9 +6,9 @@ LIST="arch-dev-public@archlinux.org" #LIST="aaronmgriffin@gmail.com" FROM="repomaint@archlinux.org" -SUBJECT="Repository Maintenance $(date +"%d-%m-%Y %H:%M")" +SUBJECT="Repository Maintenance $(date +"%d-%m-%Y")" if [ $# -ge 1 ]; then - SUBJECT="$1 $(date +"%d-%m-%Y %H:%M")" + SUBJECT="$1 $(date +"%d-%m-%Y")" fi if [ $# -ge 2 ]; then -- cgit v1.2.3-24-g4f1b