forked from ChimeraTK/DebianPackagingScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.sh
66 lines (56 loc) · 3.67 KB
/
config.sh
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
########################################################################################################################
#
# Configuration for the DebianPackagingScripts
#
# Default values are suitable for use at DESY
#
########################################################################################################################
WD=`realpath $(dirname "$0")`
# URI of the DebianBuildVersions git repository
[email protected]:ChimeraTK/DebianBuildVersions.git
# URI of the repository to connect to
# a) DESY internal repository
DebianRepository=http://doocspkgs.desy.de/
# b) DESY public repository
#DebianRepository=http://doocs.desy.de/
########################################################################################################################
# Variables used to control the installation process
DesyNimsRepo=http://nims.desy.de/
# Host name where to publish the Debian packages on. You will need ssh access to that machine and rights to execute
# reprepro with sudo as root.
InstallHost=doocspkgs.desy.de
if [ -z ${DISTRIBUTION+x} ]; then
DISTRIBUTION=${distribution};
else distribution=${DISTRIBUTION}
fi
# Debian package archive directory. This is where the new packages will be copied. Packages to be replaced will
# be first moved into ../old relativ to that directory.
PackageArchive='/home/debian/${distribution}/stable' # evalulate later
# map of repository names (as used in the CONFIG files of the projects) to target directories on the InstallHost
declare -A RepositoryDirectories
RepositoryDirectories["intern"]=/export/reprepro/intern/doocs
RepositoryDirectories["pub"]=/export/reprepro/pub/doocs
# Path to the local Debian "repository"
LOCAL_REPOS=${WD}/pbuilder-result
DEBIANREPOSITORY="${DebianRepository}"
# List of mirrors / package repositories used inside the pbuilder environment by apt
MIRRORLIST="deb [trusted=yes] file://${LOCAL_REPOS} ${distribution} main|deb [trusted=yes] ${DEBIANREPOSITORY}/pub/doocs ${distribution} main|deb http://de.archive.ubuntu.com/ubuntu/ ${distribution}-updates main universe|deb http://de.archive.ubuntu.com/ubuntu/ ${distribution}-security main universe"
ADDITIONALREPO="universe"
if [ "${distribution}" == "buster" ] || [ "${distribution}" == "stretch" ]; then
MIRRORLIST="deb [trusted=yes] file://${LOCAL_REPOS} ${distribution} main|deb [trusted=yes] ${DEBIANREPOSITORY}/pub/doocs ${distribution} main|deb [trusted=yes] ${DesyNimsRepo}/debian ${distribution}-backports main contrib non-free|deb [trusted=yes] ${DesyNimsRepo}/debian ${distribution} main contrib non-free|deb [trusted=yes] ${DesyNimsRepo}/debian-security ${distribution}/updates main contrib non-free|deb [trusted=yes] ${DesyNimsRepo}/debian ${distribution}-updates main contrib non-free|deb [trusted=yes] ${DesyNimsRepo}/extra/desy ${distribution} desy|deb [trusted=yes] ${DesyNimsRepo}/extra/hasylab.debian ${distribution} main non-free contrib"
ADDITIONALREPO="contrib"
fi
# This list is used when the pbuilder image is build the first time.
# It was introduced to install ca-certificates needed to use the DESY repository later on
INITIALPACKAGESLIST=""
# This list adds extra mirrors added initialy when the pbuilder image is created
INITIALEXTRAMIRROR=""
if [ "${distribution}" == "focal" ]; then
INITIALPACKAGESLIST="apt-transport-https ca-certificates gnupg software-properties-common wget"
INITIALEXTRAMIRROR="deb http://de.archive.ubuntu.com/ubuntu/ ${distribution}-updates main universe|deb http://de.archive.ubuntu.com/ubuntu/ ${distribution}-security main universe"
fi
# Override configuration
if [ -d "${WD}/override_config" ]; then
echo "Found directory 'override_config'. Loading additional config.sh"
source "${WD}/override_config/config.sh"
fi