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
|
#!/bin/bash
MIRROR_CHROOT=http://ftp.de.debian.org/debian
MIRROR_CHROOT_SECURITY=http://security.debian.org/
MIRROR_BINARY=http://ftp.de.debian.org/debian
MIRROR_BINARY_SECURITY=http://security.debian.org/
MIRROR_BOOTSTRAP="$MIRROR_CHROOT"
. auto/kanotix
# preset kanotix defaults
export LB_PACKAGES_LISTS="kanotix-master"
export LB_DISTRIBUTION="wheezy"
export LB_BOOTLOADER="grub2"
export LB_SYSLINUX_MENU_LIVE_ENTRY="Kanotix"
export LB_LINUX_PACKAGES="linux-image linux-headers"
echo "We build $LB_DISTRIBUTION"
# use flag for security and updates
# since bullseye the name for security has changed, disable for now
# live-build default is true
KSECURITY="true"
KUPDATES="true"
KARCHIVEAREAS="main contrib non-free non-free-firmware"
# since buster we need packages in debootstrap not avaible in earlier distributions
# for stretch also use mime-support (fix build error)
case "$LB_DISTRIBUTION" in
wheezy)
KDEBOOTSTRAPOPTIONS="--include=apt-transport-https,ca-certificates --exclude=nano"
KARCHIVEAREAS="main contrib non-free"
;;
jessie)
KDEBOOTSTRAPOPTIONS="--include=apt-transport-https,ca-certificates --exclude=nano"
KARCHIVEAREAS="main contrib non-free"
;;
stretch)
KDEBOOTSTRAPOPTIONS="--include=apt-transport-https,ca-certificates,mime-support --exclude=nano"
KARCHIVEAREAS="main contrib non-free"
;;
buster)
KDEBOOTSTRAPOPTIONS="--include=apt-transport-https,ca-certificates,gpg,gpg-agent,mime-support --exclude=nano"
KARCHIVEAREAS="main contrib non-free"
;;
bullseye)
KDEBOOTSTRAPOPTIONS="--include=apt-transport-https,ca-certificates,gpg,gpg-agent,mime-support --exclude=nano"
KARCHIVEAREAS="main contrib non-free"
KSECURITY="true"
;;
*)
KDEBOOTSTRAPOPTIONS="--include=apt-transport-https,ca-certificates,gpg,gpg-agent,mime-support --exclude=nano"
;;
esac
lb config noauto \
--iso-volume KANOTIX \
--iso-preparer kanotix.com \
--iso-publisher kanotix.com \
--binary-images iso-hybrid \
--chroot-filesystem squashfs \
--debian-installer false \
--apt apt \
--apt-recommends false \
--bootappend-live 'utc=no timezone=Europe/Berlin locales=de keyboard-layouts=de keyboard-variant=nodeadkeys splash' \
--archive-areas "${KARCHIVEAREAS}" \
--debootstrap-options "${KDEBOOTSTRAPOPTIONS}" \
--repositories "" \
--security "${KSECURITY}" \
--updates "${KUPDATES}" \
--checksums md5 \
--syslinux-timeout 5 \
--syslinux-menu true \
--syslinux-splash config/binary_syslinux/splash.png \
--memtest memtest86+ \
--mirror-bootstrap ${MIRROR_BOOTSTRAP} \
--mirror-chroot ${MIRROR_CHROOT} \
--mirror-chroot-security ${MIRROR_CHROOT_SECURITY} \
--mirror-binary ${MIRROR_BINARY} \
--mirror-binary-security ${MIRROR_BINARY_SECURITY} \
--binary-indices true \
--firmware-binary false \
--firmware-chroot false \
"${@}" || exit $?
. config/binary
. config/bootstrap
. config/chroot
# architecture and distribution depending stuff (e.g. kernel)
case "$LB_DISTRIBUTION" in
wheezy)
LB_REPOSITORIES+="dragonfire dragonfire-acritox"
case $LB_ARCHITECTURE in
amd64) LB_LINUX_PACKAGES="linux-image linux-headers"; LB_LINUX_FLAVOURS="amd64";;
i386) LB_LINUX_PACKAGES="linux-image linux-headers"; LB_LINUX_FLAVOURS="686-pae";;
esac
;;
jessie)
LB_REPOSITORIES+="dragonfire spitfire spitfire-acritox"
case $LB_ARCHITECTURE in
amd64) LB_LINUX_PACKAGES="linux-image linux-headers"; LB_LINUX_FLAVOURS="amd64";;
i386) LB_LINUX_PACKAGES="linux-image linux-headers"; LB_LINUX_FLAVOURS="686-pae";;
esac
;;
stretch)
LB_REPOSITORIES+="dragonfire spitfire steelfire"
case $LB_ARCHITECTURE in
amd64) LB_LINUX_PACKAGES="linux-image linux-headers"; LB_LINUX_FLAVOURS="amd64";;
i386) LB_LINUX_PACKAGES="linux-image linux-headers"; LB_LINUX_FLAVOURS="686-pae";;
esac
;;
buster)
LB_REPOSITORIES+="dragonfire spitfire steelfire silverfire"
case $LB_ARCHITECTURE in
amd64) LB_LINUX_PACKAGES="linux-image linux-headers"; LB_LINUX_FLAVOURS="amd64";;
i386) LB_LINUX_PACKAGES="linux-image linux-headers"; LB_LINUX_FLAVOURS="686-pae";;
esac
;;
bullseye)
LB_REPOSITORIES+="acritoxinstaller-qt4 spitfire steelfire silverfire speedfire"
case $LB_ARCHITECTURE in
amd64) LB_LINUX_PACKAGES="linux-image linux-headers"; LB_LINUX_FLAVOURS="amd64";;
i386) LB_LINUX_PACKAGES="linux-image linux-headers"; LB_LINUX_FLAVOURS="686-pae";;
esac
;;
bookworm)
LB_REPOSITORIES+="slowfire acritoxinstaller-qt4"
case $LB_ARCHITECTURE in
amd64) LB_LINUX_PACKAGES="linux-image linux-headers"; LB_LINUX_FLAVOURS="amd64";;
i386) LB_LINUX_PACKAGES="linux-image linux-headers"; LB_LINUX_FLAVOURS="686-pae";;
esac
;;
*)
LB_REPOSITORIES+="spitfire steelfire silverfire speedfire"
case $LB_ARCHITECTURE in
amd64) LB_LINUX_PACKAGES="linux-image linux-headers"; LB_LINUX_FLAVOURS="amd64";;
i386) LB_LINUX_PACKAGES="linux-image linux-headers"; LB_LINUX_FLAVOURS="686-pae";;
esac
;;
esac
if ! [ "$LB_ARCHITECTURE" = "i386" ]; then
LB_REPOSITORIES+=" lo"
fi
[ "$LB_BOOTLOADER" = "burg" ] && LB_REPOSITORIES+=" burg"
grep -wq retabell <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" retabell"
grep -wq silverfire-extra <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" silverfire-extra llvm11"
grep -wq acritox <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" acritox dragonfire-acritox"
grep -wq hellfire <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" hellfire"
grep -wq trinity <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" trinity"
grep -wq -e virtualbox -e vbox <<<"$LB_PACKAGES $LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" vbox"
grep -wq bmguck <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" bmguck"
grep -wq -e opera <<<"$LB_PACKAGES $LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" opera"
grep -wq google-chrome <<<"$LB_PACKAGES $LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" google-chrome"
grep -wq -e hangouts -e google-talkplugin <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" google-talkplugin"
grep -wq google-earth <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" google-earth"
grep -wq vivaldi <<<"$LB_PACKAGES $LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" vivaldi"
grep -wq mesa <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" mesa"
grep -wq msa9 <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" mesa-9"
grep -wq ms11 <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" mesa-11"
grep -wq msos <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" mesa-steamos"
grep -wq nvidia <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" nvidia"
grep -wq fglrx <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" fglrx"
if grep -wq steam <<<"$LB_PACKAGES_LISTS"; then
if [ "$LB_DISTRIBUTION" = "wheezy" ]; then
LB_REPOSITORIES+=" steam steam-wheezy"
else
LB_REPOSITORIES+=" steam"
fi
fi
grep -wq wine-staging <<<"$LB_PACKAGES $LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" wine-staging"
grep -wq iceweasel <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" iceweasel"
grep -wq firefox <<<"$LB_PACKAGES_LISTS"
grep -wq midori <<<"$LB_PACKAGES_LISTS"
grep -wq netsurf-gtk <<<"$LB_PACKAGES_LISTS"
grep -wq silverlight <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" silverlight"
grep -wq spotify <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" spotify"
grep -wq dropbox <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" dropbox"
grep -wq skypeforlinux <<<"$LB_PACKAGES_LISTS" && LB_REPOSITORIES+=" skype-stable"
# Languages
grep -wq extra_cz <<<"$LB_PACKAGES_LISTS"
# special hack
if grep -wq gfxdetect <<<"$LB_PACKAGES_LISTS"; then
LB_REPOSITORIES+=" nvidia mesa-11"
LB_LINUX_FLAVOURS="generic"
fi
# Build with debpool
if grep -wq debpool <<<"$LB_PACKAGES_LISTS"; then
mkdir -p config/chroot_debpool
if [ -d /tmp/debpool ]; then
cp -rf /tmp/debpool/*.deb config/chroot_debpool/
fi
cp -rf config/prepare_debpool/* config/chroot_debpool/
fi
lb config noauto --linux-packages "$LB_LINUX_PACKAGES" --linux-flavours "$LB_LINUX_FLAVOURS" --repositories "$LB_REPOSITORIES"
# Fetch kanotix-scripts if necessary
mkdir -p config/chroot_local-includes/usr/local/bin
grep -oe '^[^ #]*' scripts.urls | wget -i- -N -q -P config/chroot_local-includes/usr/local/bin
chmod 755 config/chroot_local-includes/usr/local/bin/*sh || :
case "$LB_DISTRIBUTION" in
wheezy)
MIRROR_CHROOT=http://archive.debian.org/debian
MIRROR_BINARY=http://archive.debian.org/debian
MIRROR_CHROOT_SECURITY=http://security.debian.org/
MIRROR_BINARY_SECURITY=http://security.debian.org/
MIRROR_BOOTSTRAP="$MIRROR_CHROOT"
lb config noauto \
--mirror-bootstrap ${MIRROR_BOOTSTRAP} \
--parent-mirror-bootstrap ${MIRROR_BOOTSTRAP} \
--mirror-chroot ${MIRROR_CHROOT} \
--parent-mirror-chroot ${MIRROR_CHROOT} \
--mirror-chroot-security ${MIRROR_CHROOT_SECURITY} \
--mirror-binary ${MIRROR_BINARY} \
--parent-mirror-binary ${MIRROR_BINARY} \
--mirror-binary-security ${MIRROR_BINARY_SECURITY} \
--updates false
;;
esac
|