-
Notifications
You must be signed in to change notification settings - Fork 0
/
debian_glue
282 lines (243 loc) · 10.8 KB
/
debian_glue
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
# Example configuration file for the jenkins-debian-glue software.
# Install this file as /etc/jenkins/debian_glue to enable it.
# Set GnuPG ID that should be used for signing the reprepro repository.
# If you build packages for Squeeze your reprepro repositories *MUST* be
# signed and the keyring that holds the public key (REPOSITORY_KEYRING)
# must be set.
# Expected format: DEADBEEF
if [ "$release" = "leste" ]; then
KEY_ID=4AA81E3E026EFE82E47D6901545FEC4E0927F6FD
else
# extras
KEY_ID=89F632F52BFE13EBBB2EBD0D2700BD8E6604EC2E
fi
# If TRUNK_RELEASE is set then the package(s) of the repository
# receiving the packages that are built will be copied to the
# repository specified in TRUNK_RELEASE. This provides the option
# to have all recent versions of packages in a central repository.
# TRUNK_RELEASE='release-trunk'
# If packages are build for more than one architecture you can
# decide which architecture should build the "Architecture: all"
# packages. On all other architectures only the arch specific
# packages will be build then.
# If unset it will default to the architecture of the host system.
MAIN_ARCHITECTURE="amd64"
# Hook scripts for pbuilder/cowbuilder, used e.g. for autopkgtest.
# Default:
# PBUILDER_HOOKDIR=/usr/share/jenkins-debian-glue/pbuilder-hookdir/
# To enable a pbuilder configuration file for usage as documented
# in man pbuilder(8) under --configfile set this option.
# By default no user specific pbuilder configuration file is used.
# PBUILDER_CONFIG=/etc/jenkins/pbuilderrc
# Base directory for reprepro repositories, can be overwritten
# via REPOSITORY on demand
# Default:
DEFAULT_REPOSITORY='/srv/repository'
# In order to keep the build versions unique and to ensure that there
# are no duplicates, the version number from the changelog is padded
# with the date and the build number.
# To override this behaviour and preserve the version number from the
# changelog, set USE_ORIG_VERSION to true.
USE_ORIG_VERSION=true
SKIP_DCH=true
DCH_OPTS="--multimaint-merge --ignore-branch"
#DCH_EXTRA_OPTS="--distribution=maemo7 --force-distribution -R"
#DCH_EXTRA_OPTS="
#maybe? line 103 in /usr/bin/generate-git-snapshot
UNRELEASEAD_APPEND_COMMIT="false"
# By default reprepro repositories are not verified but assumed to be
# trustworthy.
# Please note that if you build packages for Squeeze, the reprepro
# repositories *MUST* be signed and verifiable. I.e. you need to set
# KEY_ID and the corresponding keyring in REPOSITORY_KEYRING that
# holds the public key portion for that KEY_ID.
# REPOSITORY_KEYRING=/etc/apt/trusted.gpg.d/my-custom-keyring.gpg
REPOSITORY_KEYRING=/var/lib/jenkins/.gnupg/keyring.gpg
#release=${release:-kawai}
#REPOSITORY=/srv/repository
# If $release is set then "${REPOSITORY}/release/${release}"
# is used as release repository. If you want to use a different
# directory set RELEASE_REPOSITORY accordingly.
# Default:
# RELEASE_REPOSITORY="${REPOSITORY}/release/${release}"
RELEASE_REPOSITORY="${DEFAULT_REPOSITORY}/${release}"
# Remove packages from a $release before processing incoming
# This allows to rebuild and provide versions already existent
# in the release repository they are built for.
# Default:
# REMOVE_FROM_RELEASE=false
# By default the underlying build system (cowbuilder/pbuilder)
# automatically destroys the build environment, even if building
# fails for whatever reason. If DEB_KEEP_BUILD_ENV is set then
# a copy of the build environment is created under
# /var/cache/pbuilder/build/debug.$JOBNAME
# Please be aware that those build environments usually require
# quite some disk space, so do not forget to remove them.
# If unset the build environment won't be kept if building fails.
# DEB_KEEP_BUILD_ENV=true
# Comma separated list of extra repositories for resolving dependencies.
# Usage example:
# REPOSITORY_EXTRA='deb http://security.debian.org/ wheezy/updates main,deb-src http://security.debian.org/ wheezy/updates main'
# Default:
# REPOSITORY_EXTRA=
PARENT_DISTRO=
DEVUAN_BUILD=
case "$distribution" in
stretch*)
PARENT_DISTRO=ascii
;;
buster*)
PARENT_DISTRO=beowulf
;;
bullseye*)
PARENT_DISTRO=chimaera
;;
bookworm*)
PARENT_DISTRO=daedalus
;;
*)
DEVUAN_BUILD=1
esac
if [ -z "$DEVUAN_BUILD" ]; then
# Debian
MIRROR="http://deb.debian.org/debian"
SECURITY_MIRROR="http://security.debian.org/debian-security"
SECURITY_FOLDER="${distribution}/updates"
# This option is needed for pbuilder to work nice in Devuan environment
PBUILDER_CONFIG=/etc/jenkins/debian_mirror
# Initialize it with command:
# echo 'MIRRORSITE=http://deb.debian.org/debian' > /etc/jenkins/debian_mirror
else
# Devuan
MIRROR="http://pkgmaster.devuan.org/merged"
SECURITY_MIRROR="${MIRROR}"
SECURITY_FOLDER="${distribution}-security"
fi
REPOSITORY_EXTRA="deb ${MIRROR} ${distribution}-updates main contrib non-free"
REPOSITORY_EXTRA="${REPOSITORY_EXTRA},deb ${SECURITY_MIRROR} ${SECURITY_FOLDER} main contrib non-free"
REPOSITORY_EXTRA="${REPOSITORY_EXTRA},deb http://maedevu.maemo.org/${release} ${distribution} main contrib non-free"
# Pull in deps from -testing when building -testing
if [ "$ENABLE_MAEMO_TESTING" = "yes" ]; then
REPOSITORY_EXTRA="${REPOSITORY_EXTRA},deb http://maedevu.maemo.org/${release} ${distribution}-testing main contrib non-free"
fi
# Pull in deps from -devel when building -devel
if [ "$ENABLE_MAEMO_DEVEL" = "yes" ]; then
REPOSITORY_EXTRA="${REPOSITORY_EXTRA},deb http://maedevu.maemo.org/${release} ${distribution}-devel main contrib non-free"
fi
if [ "$ENABLE_MAEMO_EXPERIMENTAL" = "yes" ]; then
REPOSITORY_EXTRA="${REPOSITORY_EXTRA},deb http://maedevu.maemo.org/${release} ${distribution}-experimental main contrib non-free"
#if [ -n "${architecture-}" ]; then
# if [ "${architecture}" = "armhf" ]; then
# DEB_CFLAGS_APPEND="-mfpu=neon -march=armv7-a+neon-fp16 -mtune=cortex-a8"
# DEB_CXXFLAGS_APPEND="-mfpu=neon -march=armv7-a+neon-fp16 -mtune=cortex-a8"
# export DEB_CFLAGS_APPEND
# export DEB_CXXFLAGS_APPEND
# fi
#fi
fi
if [ -n "$distribution" ]; then
if [ "$distribution" = "chimaera" ]; then
# For armhf, add these flags
if [ -n "${architecture-}" ]; then
if [ "${architecture}" = "armhf" ]; then
#DEB_CFLAGS_APPEND="-mfpu=neon -march=armv7-a"
#DEB_CXXFLAGS_APPEND="-mfpu=neon -march=armv7-a"
DEB_CFLAGS_APPEND="-mfpu=neon -march=armv7-a+neon-fp16 -mtune=cortex-a8"
DEB_CXXFLAGS_APPEND="-mfpu=neon -march=armv7-a+neon-fp16 -mtune=cortex-a8"
export DEB_CFLAGS_APPEND
export DEB_CXXFLAGS_APPEND
fi
fi
fi
if [ "$distribution" = "daedalus" ]; then
# For armhf, add these flags
if [ -n "${architecture-}" ]; then
if [ "${architecture}" = "armhf" ]; then
#DEB_CFLAGS_APPEND="-mfpu=neon -march=armv7-a"
#DEB_CXXFLAGS_APPEND="-mfpu=neon -march=armv7-a"
DEB_CFLAGS_APPEND="-mfpu=neon -march=armv7-a+neon-fp16 -mtune=cortex-a8"
DEB_CXXFLAGS_APPEND="-mfpu=neon -march=armv7-a+neon-fp16 -mtune=cortex-a8"
export DEB_CFLAGS_APPEND
export DEB_CXXFLAGS_APPEND
fi
fi
fi
fi
# Pull in deps from the main repo when building extras
if [ "$release" = "extras" ]; then
REPOSITORY_EXTRA="${REPOSITORY_EXTRA},deb http://maedevu.maemo.org/leste ${distribution} main contrib non-free"
fi
# Pull in deps from main repo when building for Debian
if [ -n "$PARENT_DISTRO" ]; then
REPOSITORY_EXTRA="${REPOSITORY_EXTRA},deb http://maedevu.maemo.org/leste ${PARENT_DISTRO} main contrib non-free"
fi
# Device specifics
backports_jobs="mesa marian-lite dh-python"
#n900_jobs="libmatchbox2-n900 hildon-desktop-n900"
echo "job_name: $JOB_NAME"
case "$JOB_NAME" in
*-source)
_curpkgname="$(echo $JOB_NAME | sed 's,-source$,,')"
;;
*-binaries/*)
_curpkgname="$(echo $JOB_NAME | cut -d '/' -f1 | sed 's,-binaries$,,')"
;;
*-repos/*)
_curpkgname="$(echo $JOB_NAME | cut -d '/' -f1 | sed 's,-repos$,,')"
;;
*)
_curpkgname="irrelevant"
;;
esac
if echo "$backports_jobs" | grep -qw "$_curpkgname"; then
case "$distribution" in
ascii*|stretch*|beowulf*|buster*|chimaera*|bullseye*|daedalus*|bookworm*)
REPOSITORY_EXTRA="${REPOSITORY_EXTRA},deb ${MIRROR} ${distribution}-backports main contrib non-free"
;;
esac
fi
#if echo "$n900_jobs" | grep -qw "$_curpkgname"; then
# REPOSITORY_EXTRA="${REPOSITORY_EXTRA},deb http://maedevu.maemo.org/${release} ${distribution} n900"
#fi
network_jobs="pine64-uboot zkgroup signald anbox-image"
if echo "$network_jobs" | grep -qw "$_curpkgname"; then
PBUILDER_USENETWORK=yes
fi
# Comma separated list of URLs with keys for extra repositories.
# Usage example:
# REPOSITORY_EXTRA_KEYS='http://foorepo.domain.com/key1.gpg,http://barrepo.domain.com/key2.gpg'
# Default:
# REPOSITORY_EXTRA_KEYS=
REPOSITORY_EXTRA_KEYS='http://maedevu.maemo.org/testing-key.asc,http://maedevu.maemo.org/extras-key.asc'
# autopkgtests are executed automatically inside the cowbuilder environment by
# default, corresponding to the ADT='internal' setting or if ADT is unset.
# To execute autopkgtests also externally via adt-run you need to set ADT to
# either 'external' (no internal runs) or 'all' (internal + external runs).
# The external autopkgtests depend on a configured ADT_RUNNER setting.
# To skip internal as well as external autopkgtests set ADT='skip'.
# Usage example (see adt-virt-qemu(1) for details regarding image setup):
# ADT='external'
# ADT_RUNNER="adt-virt-qemu /srv/adt-${distribution:-}-${architecture:-}.img"
# Default:
# ADT=
# Control usage of eatmydata to speed up builds. If eatmydata is present on the
# host system and when building for a recent distribution (Debian/jessie +
# Ubuntu/vivid or newer) eatmydata is enabled automatically.
# To force its usage (skipping any host + distribution checks) set it to 'true'.
# To disable its usage set it to 'false'.
# USE_EATMYDATA=true
# Enable ccache (compiler cache for fast recompilation of C/C++ code)
# to speed up builds.
USE_CCACHE=true
# Specify the format (as accepted by the 'date' command) for the generated
# build timestamp.
# Default: %Y%m%d%H%M%S
# TIMESTAMP_FORMAT="%Y%m%d%H%M%S"
# In case you are explicitly marking your new package version as "UNRELEASED"
# inside the debian/changelog file, you may not get a package build version
# number containing the SCM commit. Set this to 'true' in order to work around
# this.
# Default: false
# UNRELEASED_APPEND_COMMIT=false
# XXX: MW: 2024-01-12: add --git-submodules
GBP_OPTS=" -nc --git-force-create --git-ignore-new --git-ignore-branch -S -us -uc --git-verbose --git-builder=/bin/true --git-cleaner=/bin/true --git-export-dir= --git-submodules"