summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2015-06-30 21:20:45 +0100
committerV3n3RiX <venerix@rogentos.ro>2015-06-30 21:20:45 +0100
commita18e45c0248545699fbbd4519a44f56f1f4b74c5 (patch)
treea442001c65620bd75caa0cc09c31215b351358fe
parentb05187a9be4b19660d3073f7018f970b29f3d0c6 (diff)
drop tinderbox, we don't use matter or antimatter
-rwxr-xr-xtinderbox/antimatter-scheduler23
-rwxr-xr-xtinderbox/glsa-scheduler21
-rwxr-xr-xtinderbox/matter-build.sh94
-rwxr-xr-xtinderbox/matter-scheduler64
4 files changed, 0 insertions, 202 deletions
diff --git a/tinderbox/antimatter-scheduler b/tinderbox/antimatter-scheduler
deleted file mode 100755
index 690ac5a..0000000
--- a/tinderbox/antimatter-scheduler
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-
-unset PORTAGE
-unset PORTAGE_TMPDIR
-
-set -e
-
-if [ "${#}" != "3" ]; then
- echo "Invalid arguments." >&2
- exit 1
-fi
-
-CHROOT_PATH="${1}"
-ARCH_NAME="${2}"
-CHROOT_PREFIX="${3}"
-
-(
- ${CHROOT_PREFIX} chroot "${CHROOT_PATH}" \
- /kogaion/bin/antimatter-digest
-) | mail -a "MIME-Version: 1.0" \
- -a "Content-Type: text/html" \
- -s "AntiMatter tracker of $(date +%Y-%m-%d) for ${ARCH_NAME}" \
- entropy@rogentos.ro
diff --git a/tinderbox/glsa-scheduler b/tinderbox/glsa-scheduler
deleted file mode 100755
index 69b5027..0000000
--- a/tinderbox/glsa-scheduler
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-unset PORTAGE
-unset PORTAGE_TMPDIR
-
-set -e
-
-if [ "${#}" != "3" ]; then
- echo "Invalid arguments." >&2
- exit 1
-fi
-
-CHROOT_PATH="${1}"
-ARCH_NAME="${2}"
-CHROOT_PREFIX="${3}"
-
-(
- ${CHROOT_PREFIX} chroot "${CHROOT_PATH}" \
- /kogaion/bin/glsa-digest 2>&1
-) | mail -s "GLSA tracker of $(date +%Y-%m-%d) for ${ARCH_NAME}" \
- entropy@rogentos.ro
diff --git a/tinderbox/matter-build.sh b/tinderbox/matter-build.sh
deleted file mode 100755
index 7d80366..0000000
--- a/tinderbox/matter-build.sh
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/bash
-
-show_help() {
- echo "${0} <schedule> <pre-chroot (linux32, linux64)> <chroot dir> <chroot name>"
-}
-
-ARGS="${@}"
-schedule="${1}"
-if [ "${schedule}" != "weekly" ] && [ "${schedule}" != "monthly" ] && [ "${schedule}" != "daily" ]; then
- echo "schedule is invalid, must be either weekly, monthly, daily"
- show_help
- exit 1
-fi
-PRE_CHROOT="${2}"
-if [ "${PRE_CHROOT}" != "linux32" ] && [ "${PRE_CHROOT}" != "linux64" ]; then
- echo "pre-chroot is invalid, must be either linux32, linux64"
- show_help
- exit 1
-fi
-CHROOT_DIR="${3}"
-if [ -z "${CHROOT_DIR}" ] || [ ! -d "${CHROOT_DIR}" ]; then
- echo "chroot dir is invalid"
- show_help
- exit 1
-fi
-CHROOT_NAME="${4:-unknown}"
-shift 4
-
-LOCK_FILE="${CHROOT_DIR}/.matter-build.lock"
-LVM_LOCK_FILE="/entropy_LOCKS/vg_chroots-lv_chroots-snapshot.lock"
-LOG_FILE=/var/log/particles/$(basename "${CHROOT_DIR}")-${schedule}-$(date +%Y%m%d).log
-
-# Make sure th have these directories in place
-mkdir -p /var/log/particles /entropy_LOCKS || exit 1
-
-# Drop these settings from the environment as they could interfere
-# with interactive processing
-unset PORTDIR PORTAGE_TMPDIR
-
-echo "CHROOT_DIR: ${CHROOT_DIR}"
-echo "PRE_CHROOT: ${PRE_CHROOT}"
-echo "LOG_FILE: ${LOG_FILE}.bz2"
-
-echo "Acquiring locks at ${LOCK_FILE} and ${LVM_LOCK_FILE} in blocking mode, waiting until we're ready"
-(
- flock -s --timeout=$((3600 * 12)) 10
- if [ "${?}" != "0" ]; then
- echo "Tried to acquire the LVM lock in shared mode." >&2
- echo "After 12 hours, I give up. This is really wrong," >&2
- echo "since the backup script should not hold the lock for" >&2
- echo "this long." >&2
- exit 1
- fi
-
- flock -x --timeout=36000 9
- rc="${?}"
- if [ "${rc}" != "0" ]; then
- echo "CANNOT ACQUIRE LOCK, QUITTING" >&2
- else
- echo "Lock acquired, let's go"
- echo "Starting matter-scheduler at $(date)..."
- export ETP_NO_COLOR="1"
-
- pre_post="--pre /particles/hooks/pre.sh --post /particles/hooks/post.sh"
- # Place standard outout and standard error together to make
- # tee happy. Filter out stdout because it gets to mail
- PARTICLES_DIR="/particles/${schedule}" \
- MATTER_ARGS="--commit --blocking --gentle --disable-preserved-libs ${pre_post} ${@}" "${PRE_CHROOT}" \
- /build/tinderbox/matter-scheduler "${CHROOT_DIR}" 2>&1 3>&1 | tee "${LOG_FILE}" > /dev/null
- rc=${?}
- echo "Completed matter-scheduler at $(date) with exit status: ${rc}"
- fi
-
- bzip2 -f -k "${LOG_FILE}"
- # send mail
- echo "Hello boys and girls,
-this is andromeda.rogentos.ro informing you that a new matter run has been
-eventually executed.
-
-Call : ${ARGS}
-Exit : ${rc}
-Log : ${LOG_FILE}.bz2
-
-Do not forget to check logs before touching repositories.
-Thanks for reading." | mutt -s "${schedule} matter run, $(basename ${LOG_FILE})" -a "${LOG_FILE}.bz2" -- entropy-team@lists.rogentos.ro
-
- # spawn GLSA and ignore any failures
- /build/tinderbox/glsa-scheduler "${CHROOT_DIR}" "${CHROOT_NAME}" "${PRE_CHROOT}" > /dev/null
- # spawn AntiMatter and ignore any failures
- /build/tinderbox/antimatter-scheduler "${CHROOT_DIR}" "${CHROOT_NAME}" "${PRE_CHROOT}" > /dev/null
-
- exit ${rc}
-
-) 9> "${LOCK_FILE}" 10> "${LVM_LOCK_FILE}"
diff --git a/tinderbox/matter-scheduler b/tinderbox/matter-scheduler
deleted file mode 100755
index 55055ce..0000000
--- a/tinderbox/matter-scheduler
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/python
-
-import os
-import sys
-import argparse
-import subprocess
-
-if __name__ == "__main__":
-
- DEFAULT_PARTICLES_DIR = "/particles"
- PARTICLES_DIR = os.getenv("PARTICLES_DIR", DEFAULT_PARTICLES_DIR)
- DEFAULT_BUILD_DIR = "/kogaion"
- BUILD_DIR = os.getenv("BUILD_GIT_DIR", DEFAULT_BUILD_DIR)
- DEFAULT_MATTER_ARGS = "--commit --gentle --push --sync --sync-best-effort"
- MATTER_ARGS = os.getenv("MATTER_ARGS", DEFAULT_MATTER_ARGS)
-
- CHROOT_SCRIPT = "/kogaion/bin/matter-scheduler-chroot" # this is in build.git
- ENV_VARS_HELP = """\
-Environment variables:
-%s = path inside chroot containing Matter spec files (also called particles)
- default: %s
-%s = path inside chroot containing the build.git repository checkout
- default: %s
-%s = custom "matter" arguments
- default: %s
-""" % (
- "PARTICLES_DIR",
- DEFAULT_PARTICLES_DIR,
- "BUILD_GIT_DIR",
- DEFAULT_BUILD_DIR,
- "MATTER_ARGS",
- DEFAULT_MATTER_ARGS,)
-
- parser = argparse.ArgumentParser(
- description='Entropy Matter, execution scheduler',
- epilog=ENV_VARS_HELP,
- formatter_class=argparse.RawDescriptionHelpFormatter)
-
- parser.add_argument("chroot", metavar="<chroot>",
- help="path to chroot")
-
- nsargs = parser.parse_args(sys.argv[1:])
-
- chroot_dir = nsargs.chroot
- if not os.path.isdir(chroot_dir):
- sys.stderr.write("chroot directory is not available\n")
- raise SystemExit(1)
-
- if os.getuid() != 0:
- sys.stderr.write("root access required\n")
- raise SystemExit(1)
-
- os.environ["PARTICLES_DIR"] = PARTICLES_DIR
- os.environ["BUILD_GIT_DIR"] = BUILD_DIR
- os.environ["MATTER_ARGS"] = MATTER_ARGS
- os.chroot(chroot_dir)
- os.chdir("/")
- try:
- rc = subprocess.call(CHROOT_SCRIPT)
- except Exception as err:
- sys.stderr.write(repr(err) + "\n")
- rc = 1
-
- raise SystemExit(rc)