Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-25 10:50:24 +0200
committerErich Eckner <git@eckner.net>2018-05-25 10:50:24 +0200
commit80103377b779450c3a470ddaa2d620c9fdf75491 (patch)
tree9f73ce05f392fbb5c8ef16f27faf055f93cb77ed /conf
parent673592f9fd24a26565fc6ebfbd4db6832d4b2b38 (diff)
conf/default.conf -> lib/load-configuration; conf/local.conf -> conf/{common,master,slave}.conf
Diffstat (limited to 'conf')
-rw-r--r--conf/.gitignore2
-rwxr-xr-xconf/common.conf.example14
-rwxr-xr-xconf/default.conf146
-rwxr-xr-xconf/master.conf.example50
-rwxr-xr-xconf/slave.conf.example33
5 files changed, 98 insertions, 147 deletions
diff --git a/conf/.gitignore b/conf/.gitignore
index 9eef7aa..988ee56 100644
--- a/conf/.gitignore
+++ b/conf/.gitignore
@@ -1,2 +1,2 @@
-local.conf
+*.conf
admin-gpg-keys
diff --git a/conf/common.conf.example b/conf/common.conf.example
new file mode 100755
index 0000000..a26a82a
--- /dev/null
+++ b/conf/common.conf.example
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# configurable variables used on the build slaves and on the build master
+# default values are given as comments
+
+# To change variables from their default, copy this file to common.conf,
+# uncomment and change the desired variables.
+
+#work_dir="${base_dir}/work"
+
+#repo_names='packages community archlinux32'
+#repo_paths__packages="${work_dir}/repos/packages"
+#repo_paths__community="${work_dir}/repos/community"
+#repo_paths__archlinux32="${work_dir}/repos/packages32"
diff --git a/conf/default.conf b/conf/default.conf
deleted file mode 100755
index daa1955..0000000
--- a/conf/default.conf
+++ /dev/null
@@ -1,146 +0,0 @@
-#!/bin/sh
-
-# set up some common variables
-
-# shellcheck disable=SC2034
-
-set -e
-export LANG=C
-
-# TODO: This should become lib/load-configuration to avoid confusion.
-# Additionally, there should be conf/common.conf.example,
-# conf/master.conf.example and conf/slave.conf.example.
-
-# dirty hack to get this stuff debugable from a bash
-if [ "x${0##*/}" = "x-bash" ] || [ "x${0##*/}" = "xbash" ] || [ "x${0##*/}" = "xdash" ]; then
- base_dir=$(pwd)
-else
- base_dir=$(printf '%s/..' "$(dirname "$(readlink -f "$0")")")
-fi
-
-work_dir="${base_dir}/work"
-
-# shellcheck source=../lib/common-functions
-. "${base_dir}/lib/common-functions"
-
-# if mysqld is not running, we're either on a build slave and don't need
-# lib/mysql-functions or we're on the build master and something is wrong
-# anyway
-if pgrep -x mysqld >/dev/null 2>&1; then
- # shellcheck source=../lib/mysql-functions
- . "${base_dir}/lib/mysql-functions"
-fi
-
-# TODO: some of this should be read from the database instead
-repo_names='packages community archlinux32'
-repo_paths__packages="${work_dir}/repos/packages"
-repo_paths__community="${work_dir}/repos/community"
-repo_paths__archlinux32="${work_dir}/repos/packages32"
-
-master_build_server="buildmaster.archlinux32.org"
-master_build_server_port="22"
-master_build_server_user="slave"
-master_build_server_identity="${work_dir}/.ssh/id_rsa"
-
-repo_key='0xdeadbeef'
-package_key='0x15eebadc0de'
-
-# to access the master mirror via rsync
-master_mirror_rsync_command='rsync --password-file=/home/slave/rsync.password'
-master_mirror_rsync_directory='rsync://buildmaster@mirror.archlinux32.org/packages32'
-
-# to access the master mirror via sftp
-master_mirror_sftp_command='sftp -b- user@mirror'
-
-# mirror of sources, identified (solely) by hash
-source_by_hash_mirror='http://sources.archlinux32.org/'
-
-# what should be tried in what order to somehow repair a broken build
-straws_that_might_repair_failing_builds=$(
- printf '%s\n' \
- ':' \
- ':clean_chroot:' \
- ':mirrored_source_by_hash:' \
- ':mirrored_source:' \
- ':with_build_support:' \
- ':with_build_support:clean_chroot:'
-)
-
-# root directory of the webserver
-webserver_directory='/srv/http'
-
-# directory to keep the build log files in
-build_log_directory='/srv/http/build-logs'
-
-# known package repositories
-standalone_package_repositories=$(
- printf '%s\n' 'build-support' 'gnome-unstable' 'kde-unstable'
-)
-stable_package_repositories=$(
- printf '%s\n' 'community' 'core' 'extra'
-)
-testing_package_repositories=$(
- printf '%s\n' 'community-testing' 'testing'
-)
-staging_package_repositories=$(
- printf '%s\n' 'community-staging' 'staging'
-)
-
-# irc client configuration
-irc_dir='/home/slave/irc/irc.freenode.net'
-irc_password='top_secret'
-
-# commands to run to update the i686 package mirror used for installing i686 packages,
-# e.g. the one from /etc/pacman.d/mirrorlist32 (useful on build slaves which do not
-# have the master mirror in the mirrorlist32)
-mirror_update_command=''
-
-# list of urls to trigger updates of the respective mirrors (used on build master only)
-mirror_refresh_trigger_urls=''
-
-# command to access the mysql database
-mysql_command='mysql buildmaster'
-
-# possibly pull in custom modifications
-
-# shellcheck source=/dev/null
-[ -r "${base_dir}/conf/local.conf" ] && . "${base_dir}/conf/local.conf"
-
-# check / set up environment
-
-if [ -z "${build_list_lock_file}" ]; then
- build_list_lock_file="${work_dir}/build-list.lock"
-fi
-
-if [ -z "${sanity_check_lock_file}" ]; then
- sanity_check_lock_file="${work_dir}/sanity-check.lock"
-fi
-
-if [ -z "${package_database_lock_file}" ]; then
- package_database_lock_file="${work_dir}/package-database.lock"
-fi
-
-mkdir -p "${work_dir}"
-
-for repo in ${repo_names}; do
-
- eval repo_path='"${repo_paths__'"${repo}"'}"'
-
- mkdir -p "${repo_path%/*}"
-
- if ! git -C "${repo_path}" rev-parse --git-dir > /dev/null 2>&1; then
- if [ "${repo}" = "archlinux32" ]; then
- repo_source='https://github.com/archlinux32/packages.git'
- else
- repo_source="git://git.archlinux.org/svntogit/${repo}.git"
- fi
- git clone --bare "${repo_source}" "${repo_path}"
- fi
-
-done
-
-if [ "${master_build_server_identity}" = "${work_dir}/.ssh/id_rsa" ] && \
- [ ! -f "${master_build_server_identity}" ]; then
- mkdir -p "${master_build_server_identity%/*}"
- ssh-keygen -b4096 -f "${master_build_server_identity}"
-fi
diff --git a/conf/master.conf.example b/conf/master.conf.example
new file mode 100755
index 0000000..4e708f3
--- /dev/null
+++ b/conf/master.conf.example
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# configurable variables used on the build master
+# default values are given as comments
+
+# To change variables from their default, copy this file to common.conf,
+# uncomment and change the desired variables.
+
+#repo_key='0xdeadbeef'
+
+# to access the master mirror via rsync
+#master_mirror_rsync_command='rsync --password-file=/home/slave/rsync.password'
+#master_mirror_rsync_directory='rsync://buildmaster@mirror.archlinux32.org/packages32'
+
+# to access the master mirror via sftp
+#master_mirror_sftp_command='sftp -b- user@mirror'
+
+# root directory of the webserver
+#webserver_directory='/srv/http'
+
+# directory to keep the build log files in
+#build_log_directory='/srv/http/build-logs'
+
+# known package repositories
+#standalone_package_repositories=$(
+# printf '%s\n' 'build-support' 'gnome-unstable' 'kde-unstable'
+#)
+#stable_package_repositories=$(
+# printf '%s\n' 'community' 'core' 'extra'
+#)
+#testing_package_repositories=$(
+# printf '%s\n' 'community-testing' 'testing'
+#)
+#staging_package_repositories=$(
+# printf '%s\n' 'community-staging' 'staging'
+#)
+
+# irc client configuration
+#irc_dir='/home/slave/irc/irc.freenode.net'
+#irc_password='top_secret'
+
+# list of urls to trigger updates of the respective mirrors
+#mirror_refresh_trigger_urls=''
+
+# command to access the mysql database
+#mysql_command='mysql buildmaster'
+
+#build_list_lock_file="${work_dir}/build-list.lock"
+#sanity_check_lock_file="${work_dir}/sanity-check.lock"
+#package_database_lock_file="${work_dir}/package-database.lock"
diff --git a/conf/slave.conf.example b/conf/slave.conf.example
new file mode 100755
index 0000000..cda556b
--- /dev/null
+++ b/conf/slave.conf.example
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# configurable variables used on the build slaves
+# default values are given as comments
+
+# To change variables from their default, copy this file to common.conf,
+# uncomment and change the desired variables.
+
+#master_build_server="buildmaster.archlinux32.org"
+#master_build_server_port="22"
+#master_build_server_user="slave"
+#master_build_server_identity="${work_dir}/.ssh/id_rsa"
+
+#package_key='0x15eebadc0de'
+
+# mirror of sources, identified (solely) by hash
+#source_by_hash_mirror='http://sources.archlinux32.org/'
+
+# what should be tried in what order to somehow repair a broken build
+#straws_that_might_repair_failing_builds=$(
+# printf '%s\n' \
+# ':' \
+# ':clean_chroot:' \
+# ':mirrored_source_by_hash:' \
+# ':mirrored_source:' \
+# ':with_build_support:' \
+# ':with_build_support:clean_chroot:'
+#)
+
+# commands to run to update the i686 package mirror used for installing i686 packages,
+# e.g. the one from /etc/pacman.d/mirrorlist32 (useful on build slaves which do not
+# have the master mirror in the mirrorlist32)
+#mirror_update_command=''