summaryrefslogtreecommitdiff
path: root/conf/default.conf
blob: 4260921d194a7d05da4b4fb89aa1281e44aea137 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#!/bin/sh

# set up some common variables

# shellcheck disable=SC2034

set -e
export LANG=C

# 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

# shellcheck source=bin/common-functions
. "${base_dir}/bin/common-functions"

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"

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'

# what can be done via the email interface
possible_email_actions='stabilize block unblock schedule'

# how many lines of email logs should be kept maximally
max_mail_log_lines=10

# who can do above actions
if [ -s "${base_dir}/conf/admin-gpg-keys" ]; then
  admin_gpg_keys=$(
    sed 's|\s*#.*$||' "${base_dir}/conf/admin-gpg-keys"
  )
fi

# How long should packages in the pipeline be considered "fresh" (in days)?
# If a package surpasses this limit, it will be considered unimportant and won't
# block other packages anymore
max_package_age_build_list=7
max_package_age_staging=2
max_package_age_broken_testing=14
# after how many days will a package in testing be automatically marked as
# tested (if there is no open bug against it)
max_package_age_testing=7

# 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'
)

# 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}"
touch "${work_dir}/build-list"
touch "${work_dir}/deletion-list"
mkdir -p "${work_dir}/build-list.loops"

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='git@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