summaryrefslogtreecommitdiff
path: root/CONF.sh
blob: 1d12ad8d5517270307230806d372b806e325d9d4 (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
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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
#
# This file will have to be sourced where needed
#

# Unset all optional variables first to start from a clean state
unset NONFREE           || true
unset CONTRIB           || true
unset EXTRANONFREE      || true
unset RESTRICTED        || true
unset UNIVERSE          || true
unset MULTIVERSE        || true
# allow configuration on command line
#unset LOCAL             || true
#unset LOCALDEBS         || true
unset SECURED           || true
unset GPG_HOMEDIR       || true
unset SIGNING_KEYID     || true
unset SECURITY          || true
unset BOOTDIR           || true
unset SYMLINK           || true
unset COPYLINK          || true
unset MKISOFS           || true
unset MKISOFS_OPTS      || true
unset ISOLINUX          || true
unset EXCLUDE           || true
unset SRCEXCLUDE        || true
unset NODEPENDS         || true
unset NORECOMMENDS      || true
unset NOSUGGESTS        || true
unset DEFBINSIZE        || true
unset DEFSRCSIZE        || true
unset FASTSUMS          || true
unset DI_CODENAME       || true
unset OMIT_MANUAL	    || true
unset OMIT_RELEASE_NOTES || true

if [ -z "$PROJECT" ]; then
  PROJECT=ubuntu
fi
if [ -z "$CAPPROJECT" ]; then
  CAPPROJECT="$(echo "$PROJECT" | perl -ne 'print ucfirst')"
fi

if [ -z "$DIST" ]; then
  DIST=karmic
fi

# The debian-cd dir
# Where I am (hoping I'm in the debian-cd dir)
export BASEDIR=`pwd`

case $DIST in
  trusty)
    export PREV_CODENAME=precise
    export CODENAME=trusty
    export CAPCODENAME='Trusty Tahr'
    export DEBVERSION="14.04.6 LTS"
    export BACKPORT_KERNEL=xenial
    export OFFICIAL="Release"
    ;;
  xenial)
    export PREV_CODENAME=wily
    export CODENAME=xenial
    export CAPCODENAME='Xenial Xerus'
    export DEBVERSION="16.04.7 LTS"
    export BACKPORT_KERNEL="hwe-16.04"
    export OFFICIAL="Release"
    ;;
  bionic)
    export PREV_CODENAME=artful
    export CODENAME=bionic
    export CAPCODENAME='Bionic Beaver'
    export DEBVERSION="18.04.6 LTS"
    export BACKPORT_KERNEL="hwe-18.04"
    export OFFICIAL="Release"
    ;;
  focal)
    export PREV_CODENAME=eoan
    export CODENAME=focal
    export CAPCODENAME='Focal Fossa'
    export DEBVERSION="20.04.6 LTS"
    export BACKPORT_KERNEL="hwe-20.04"
    export OFFICIAL="Release"
    ;;
  jammy)
    export PREV_CODENAME=impish
    export CODENAME=jammy
    export CAPCODENAME='Jammy Jellyfish'
    export DEBVERSION="22.04.3 LTS"
    export OFFICIAL="Release"
    ;;
  lunar)
    export PREV_CODENAME=kinetic
    export CODENAME=lunar
    export CAPCODENAME='Lunar Lobster'
    export DEBVERSION="23.04"
    export OFFICIAL="Release"
    ;;
  mantic)
    export PREV_CODENAME=lunar
    export CODENAME=mantic
    export CAPCODENAME='Mantic Minotaur'
    export DEBVERSION="23.10.1"
    export OFFICIAL="Release"
    ;;
  noble)
    export PREV_CODENAME=mantic
    export CODENAME=noble
    export CAPCODENAME='Noble Numbat'
    export DEBVERSION="24.04 LTS"
    export OFFICIAL="Daily"
    ;;

esac

# By default use Debian installer packages from $CODENAME
if [ ! "$DI_CODENAME" ]
then
  export DI_CODENAME=$CODENAME
fi

# If set, controls where the d-i components are downloaded from.
# This may be an url, or "default", which will make it use the default url
# for the daily d-i builds. If not set, uses the official d-i images from
# the Debian mirror.
#export DI_WWW_HOME=default

# installer for properly uploaded debian-installer builds, daily-installer
# for autobuilt dailies. The newest available version is selected
# automatically; this is an override.
#export DI_TYPE=installer

# ... for arch  
export ARCH=`dpkg --print-architecture`

export FULLARCH=$ARCH${SUBARCH:++$SUBARCH}

# IMPORTANT : The 4 following paths must be on the same partition/device.
#	      If they aren't then you must set COPYLINK below to 1. This
#	      takes a lot of extra room to create the sandbox for the ISO
#	      images, however. Also, if you are using an NFS partition for
#	      some part of this, you must use this option.
# Paths to the mirrors
export MIRROR=${MIRROR:-$CDIMAGE_ROOT/ftp}

# Path of the temporary directory
export TDIR=$CDIMAGE_ROOT/scratch/$PROJECT/$DIST/$IMAGE_TYPE/tmp

# Path where the images will be written
export OUT=$CDIMAGE_ROOT/scratch/$PROJECT/$DIST/$IMAGE_TYPE/debian-cd

# Where we keep the temporary apt stuff.
# This cannot reside on an NFS mount.
export APTTMP=$CDIMAGE_ROOT/scratch/$PROJECT/$DIST/$IMAGE_TYPE/apt
export APT_STATE=$APTTMP/$CODENAME-$FULLARCH/apt-state/
export APT_CACHE=$APTTMP/$CODENAME-$FULLARCH/apt-cache/

# Where extracted debootstrap scripts live
export DEBOOTSTRAP=$CDIMAGE_ROOT/scratch/$PROJECT/$DIST/$IMAGE_TYPE/debootstrap

# Where live filesystem images live
export LIVEIMAGES=$CDIMAGE_ROOT/scratch/$PROJECT/$DIST/$IMAGE_TYPE/live

# Do I want to have NONFREE merged in the CD set
# export NONFREE=1

# Do I want to have CONTRIB merged in the CD set
#export CONTRIB=1

# Do I want to have NONFREE on a separate CD (the last CD of the CD set)
# WARNING: Don't use NONFREE and EXTRANONFREE at the same time !
# export EXTRANONFREE=1

if [ -z "$CDIMAGE_ONLYFREE" ]; then
  export RESTRICTED=1
fi

if [ "$CDIMAGE_UNSUPPORTED" ]; then
  export UNIVERSE=1
  if [ -z "$CDIMAGE_ONLYFREE" ]; then
    export MULTIVERSE=1
  fi
fi

# If you have a $MIRROR/dists/$CODENAME/local/binary-$ARCH dir with 
# local packages that you want to put on the CD set then
# uncomment the following line 
# export LOCAL=1

# If your local packages are not under $MIRROR, but somewhere else, 
# you can uncomment this line and edit to to point to a directory
# containing dists/$CODENAME/local/binary-$ARCH
# export LOCALDEBS=$CDIMAGE_ROOT/local/packages

case $DIST in
  warty) ;;
  hoary|breezy|dapper|edgy|feisty|gutsy|hardy|intrepid|jaunty|karmic|lucid|maverick|natty|oneiric|precise|quantal|raring|saucy|trusty|utopic|vivid|wily)
    export GPG_HOMEDIR=$CDIMAGE_ROOT/secret/dot-gnupg/
    export SIGNING_KEYID=C5986B4F1257FFA86632CBA746181433FBB75451
    ;;
  *)
    export GPG_HOMEDIR=$CDIMAGE_ROOT/secret/dot-gnupg/
    export SIGNING_KEYID=843938DF228D22F7B3742BC0D94AA3F0EFE21092
    ;;
esac

# Use post-release updates?
export UPDATES=1

# Sparc only : bootdir (location of cd.b and second.b)
# export BOOTDIR=/boot

# Symlink farmers should uncomment this line :
# export SYMLINK=1

# Use this to force copying the files instead of symlinking or hardlinking
# them. This is useful if your destination directories are on a different
# partition than your source files.
# export COPYLINK=1

# Options
# export MKISOFS=/usr/bin/mkisofs
# export MKISOFS_OPTS="-r"		#For normal users
# export MKISOFS_OPTS="-r -F ."	#For symlink farmers

# Override for i386 and amd64 to use xorriso instead of
# mkisofs/genisoimage. Allows creation of isohybrid images: ISO images
# that will burn correctly onto a CD and also can be written raw to a
# USB stick. xorriso 0.6.5 and later has working support for this.
export i386_MKISOFS="xorriso"
export i386_MKISOFS_OPTS="-as mkisofs -r"
export amd64_MKISOFS="xorriso"
export amd64_MKISOFS_OPTS="-as mkisofs -r -iso-level 3"
export arm64_MKISOFS="xorriso"
export arm64_MKISOFS_OPTS="-as mkisofs -r"

case $DIST in
  bionic|focal)
    # temporary hack until such time as we can upgrade all builds to 1.4.2
    new_xorriso="/home/cdimage/xorriso/xorriso-1.2.4/xorriso/xorriso"
    if [ -x "$new_xorriso" ]; then
      export amd64_MKISOFS="$new_xorriso"
      export arm64_MKISOFS="$new_xorriso"
    fi
    ;;
  *)
    # switch to modern xorriso for all arches
    export MKISOFS=xorriso
    export MKISOFS_OPTS="-as mkisofs -r"
    ;;
esac

# ISOLinux support for multiboot on CD1 for i386
export ISOLINUX=1

# uncomment this to if you want to see more of what the Makefile is doing
#export VERBOSE_MAKE=1

# uncoment this to make build_all.sh try to build a simple CD image if
# the proper official CD run does not work
#ATTEMPT_FALLBACK=yes

# Set your disk size here in MB. Used in calculating package and
# source file layouts in build.sh and build_all.sh. Defaults are for
# CD-R.  For DVD-R the size limit is 4700372992 (see ubuntu-cdimage
# lib/cdimage/tree.py:DailyTreePublisher.size_limit) but we express here
# in MiB, so round down to 4482MiB (4699717632 bytes).  If we round up to
# 4483MiB we will *probably* still fit, but the limit would be 384KiB above
# the actual limit so there's some risk of being oversize for media.
if [ "$CDIMAGE_DVD" = 1 ]; then
  export DEFBINSIZE=4482
  export DEFSRCSIZE=4482
else
  #export DEFBINSIZE=700
  #export DEFSRCSIZE=645
  export DEFBINSIZE=4600
  export DEFSRCSIZE=4600
fi

# We don't want certain packages to take up space on CD1...
#export EXCLUDE="$BASEDIR"/tasks/exclude-sarge
# ...but they are okay for other CDs (UNEXCLUDEx == may be included on CD >= x)
#export UNEXCLUDE2="$BASEDIR"/tasks/unexclude-CD2-sarge
# Any packages listed in EXCLUDE but not in any UNEXCLUDE will be
# excluded completely.

# We also exclude some source packages
#export SRCEXCLUDE="$BASEDIR"/tasks/exclude-src-potato

export NODEPENDS=1

# Set this if the recommended packages should be skipped when adding 
# package on the CD.  The default is 'false'.
export NORECOMMENDS=1

# Set this if the suggested packages should be skipped when adding 
# package on the CD.  The default is 'true'.
export NOSUGGESTS=1

# Image format:
# iso  = Output an image in ISO 9660 format (.iso)
# img  = Output a raw partitioned disk image (.img)
if [ -z "$IMAGE_FORMAT" ]; then
  export IMAGE_FORMAT=iso
fi

# If set, use the md5sums from the main archive, rather than calculating
# them locally
export FASTSUMS=1

# Parameters to pass to kernel when the CD boots. Not currently supported
# for all architectures.
#export KERNEL_PARAMS="priority=critical"

# If set to 0, never overflow binary CDs (for when you only want a single CD
# and want to know when it overflows).
export OVERFLOWBINCDS=0

# If set, overrides the boot picture used.
if [ -z "$SPLASHRLE" ]; then
	export SPLASHRLE="$BASEDIR/data/$DI_CODENAME/splash.rle"
fi
if [ -z "$GFXSPLASH" ]; then
	export GFXSPLASH="$BASEDIR/data/$DI_CODENAME/splash.pcx"
fi
if [ -z "$SPLASHPNG" ]; then
	export SPLASHPNG="$BASEDIR/data/$DI_CODENAME/splash.png"
fi

# Used by build.sh to determine what to build, this is the name of a target
# in the Makefile. Use bin-official_images to build only binary CDs. The
# default, official_images, builds everything.
IMAGETARGET=bin-official_images

# Set to 1 to save space by omitting the installation manual. 
# If so the README will link to the manual on the web site.
#export OMIT_MANUAL=1

# Set to 1 to save space by omitting the release notes
# If so we will link to them on the web site.
export OMIT_RELEASE_NOTES=0

# Set this to override the defaul location
#export RELEASE_NOTES_LOCATION="http://www.debian.org/releases/$CODENAME"

COMPLETE=0