OSDN Git Service

[update] : Create user by casper
[alterlinux/LUBS.git] / lubs
1 #!/usr/bin/env bash
2 # SPDX-License-Identifier: GPL-3.0
3 #
4 # mk-linux419
5 # Twitter: @fascoder_4
6 # Email  : m.k419sabuaka@gmail.com
7 #
8 # Yamada Hayao
9 # Twitter: @Hayao0819
10 # Email  : hayao@fascode.net
11 #
12 # (c) 2019-2020 Fascode Network.
13 #
14 # lubs
15 #
16
17 set -e
18 # set -u
19
20 export LANG=C
21
22 script_path=$(readlink -f "${0%/*}")
23
24 cache_dir="${script_path}/cache"
25 channels_dir="${script_path}/channels"
26 nfb_dir="${script_path}/nfb"
27
28 codename="focal"
29 mirror="http://linux.yz.yamagata-u.ac.jp/ubuntu/"
30 os_name="Ubuntu"
31 iso_name="ubuntu"
32
33 arch=amd64
34 work_dir="${script_path}/work"
35 out_dir="${script_path}/out"
36 iso_label="${os_name}_${codename}_${arch}"
37 iso_publisher='Fascode Network <https://fascode.net>'
38 iso_application="${os_name} Live/Rescue CD"
39 iso_version="${codename}-$(date +%Y.%m.%d)"
40 iso_filename="${iso_name}-${iso_version}-${arch}.iso"
41
42 channel_name="serene"
43
44 username="liveuser"
45 usershell="/bin/bash"
46
47 debug=false
48 cache_only=false
49
50
51 start_time="$(date +%s)"
52
53 _msg_common() {
54     if [[ "${debug}" = true ]]; then
55         local _current_time
56         local _time
57         _current_time="$(date +%s)"
58         _time="$(("${_current_time}"-"${start_time}"))"
59
60         if [[ "${_time}" -ge 3600 ]]; then
61             echo "[$(date -d @${_time} +%H:%M.%S)]$("${script_path}/echo_color" -t 6 "[LUBS Core]")"
62         elif [[ "${_time}" -ge 60 ]]; then
63             echo "[00:$(date -d @${_time} +%M.%S)]$("${script_path}/echo_color" -t 6 "[LUBS Core]")"
64         else
65             echo "[00:00.$(date -d @${_time} +%S)] $("${script_path}/echo_color" -t 6 "[LUBS Core]")"
66         fi
67     else
68         "${script_path}/echo_color" -t 6 "[LUBS Core]"
69     fi
70 }
71
72 # Show an INFO message
73 # _msg_info <message>
74 _msg_info() {
75     local _msg
76     _msg="${@}"
77     echo "$(_msg_common)  $("${script_path}/echo_color" -t 2 "Info:") ${_msg}"
78 }
79
80 # Show an debug message
81 # _msg_debug <message>
82 _msg_debug() {
83     if [[ "${debug}" = true ]]; then
84         local _msg
85         _msg="${@}"
86         echo "$(_msg_common)  $("${script_path}/echo_color" -t 3 "Debug:") ${_msg}"
87     fi
88 }
89
90 # Show an ERROR message then exit with status
91 # _msg_error <message> <exit code>
92 _msg_error() {
93     local _msg
94     local _error
95     _msg="${1}"
96     _error=${2}
97     echo "$(_msg_common)  $("${script_path}/echo_color" -t 1 "Error:") ${_msg}"
98
99     if [[ ! ${_error} = 0 ]]; then
100         exit ${_error}
101     fi
102 }
103
104 # Unmount chroot dir
105 umount_chroot () {
106     local mount
107
108     for mount in $(mount | awk '{print $3}' | grep "$(realpath "${work_dir}")" | sort -r); do
109         _msg_info "Unmounting ${mount}"
110         umount -fl "${mount}"
111     done
112 }
113
114 # Helper function to run make_*() only one time.
115 run_once() {
116     local name
117     umount_chroot
118     name="$1"
119
120     if [[ ! -e "${work_dir}/build.${name}" ]]; then
121         _msg_info "$(echo $name | sed "s@_@ @g") is starting."
122         "${1}"
123         _msg_info "$(echo $name | sed "s@_@ @g") was done!"
124         touch "${work_dir}/build.${name}"
125     fi
126 }
127
128 run_cmd() {
129     local mount
130
131     for mount in "dev" "dev/pts" "proc" "sys" "run/systemd/resolve/stub-resolv.conf"; do
132         if [[ "${mount}" == "run/systemd/resolve/stub-resolv.conf" ]]; then
133             mount --bind /etc/resolv.conf "${work_dir}/airootfs/${mount}"
134         else
135             mount --bind /${mount} "${work_dir}/airootfs/${mount}"
136         fi
137     done
138     
139     chroot "${work_dir}/airootfs" "${@}"
140
141     for mount in $(mount | awk '{print $3}' | grep "$(realpath "${work_dir}")" | sort -r); do
142         umount -fl "${mount}"
143     done
144 }
145
146 _apt_install() {
147     run_cmd apt-get --no-install-recommends --yes install ${@}
148 }
149
150 # rm helper
151 # Delete the file if it exists.
152 # For directories, rm -rf is used.
153 # If the file does not exist, skip it.
154 # remove <file> <file> ...
155 remove() {
156     local _list
157     local _file
158     _list=($(echo "$@"))
159
160     for _file in "${_list[@]}"; do
161         _msg_debug "Removeing ${_file}"
162
163         if [[ -f ${_file} ]]; then
164             rm -f "${_file}"
165         elif [[ -d ${_file} ]]; then
166             rm -rf "${_file}"
167         fi
168     done
169 }
170
171 # Show help
172 _usage () {
173     echo "usage ${0} [options] [channel]"
174     echo
175     echo " General options:"
176     echo
177     echo "    -a | --arch <str>      Set architecture"
178     echo "                           Default: ${arch}"
179     echo "    -c | --codename <str>  Set ubuntu codename"
180     echo "                           Default: ${codename}"
181     echo "    -m | --mirror <url>    Set apt mirror server."
182     echo "                           Default: ${mirror}"
183     echo "    -o | --out <out_dir>   Set the output directory"
184     echo "                           Default: ${out_dir}"
185     echo "    -w | --work <work_dir> Set the working directory"
186     echo "                           Default: ${work_dir}"
187     echo
188     echo "    -d | --debug           "
189     echo "    -h | --help            This help message and exit"
190     echo
191     echo "You can switch between installed packages, files included in images, etc. by channel."
192     echo
193     echo " Channel:"
194     
195     local _channel
196     local channel_list
197     local description
198
199     for _channel in $(ls -l "${channels_dir}" | awk '$1 ~ /d/ {print $9 }'); do
200         if [[ -n $(ls "${channels_dir}/${_channel}") ]] && [[ ! "${_channel}" = "share" ]]; then
201             channel_list+=( "${_channel}" )
202         fi
203     done
204
205     for _channel in ${channel_list[@]}; do
206         if [[ -f "${channels_dir}/${_channel}/description.txt" ]]; then
207             description=$(cat "${channels_dir}/${_channel}/description.txt")
208         else
209             description="This channel does not have a description.txt."
210         fi
211
212         echo -ne "    ${_channel}"
213
214         for i in $( seq 1 $(( 23 - ${#_channel} )) ); do
215             echo -ne " "
216         done
217         
218         echo -ne "${description}\n"
219     done
220 }
221
222
223 prepare_build() {
224     if [[ ${EUID} -ne 0 ]]; then
225         _msg_error "This script must be run as root." 1
226     fi
227
228     [[ ! -d "${work_dir}" ]] && mkdir -p "${work_dir}"
229     [[ ! -d "${out_dir}" ]] && mkdir -p "${out_dir}"
230     umount_chroot
231
232     # Check codename
233     if [[ -z $(grep -h -v ^'#' ${channels_dir}/${channel_name}/codename.${arch} | grep -x ${codename}) ]]; then
234         _msg_error "This codename (${channel_name}) is not supported on this channel (${codename})."
235     fi
236
237 }
238
239
240 make_basefs() {
241     local debootstrap_status
242     statusfile="${cache_dir}/${codename}/status"
243
244     debootstrap_status() {
245         if [[ ! -d "$(dirname ${statusfile})" ]]; then
246             mkdir -p "$(dirname ${statusfile})"
247         fi
248         echo "${1}" > "${statusfile}"
249     }
250
251     if [[ -f "${statusfile}" ]] && [[ $(cat "${statusfile}" 2> /dev/null) = "Done" ]]; then
252         _msg_info "${codename} cache is found."
253     else
254         remove "${cache_dir}/${codename}"
255         debootstrap_status "Running"
256         _msg_info "Installing Ubuntu to '${cache_dir}/${codename}/airootfs'..."
257         mkdir -p "${cache_dir}/${codename}/airootfs"
258         debootstrap --arch="${arch}" --verbose --merged-usr "${codename}" "${cache_dir}/${codename}/airootfs" "${mirror}"
259         _msg_info "${codename} installed successfully!"
260         debootstrap_status "Done"
261     fi
262
263     if [[ "${cache_only}" = true ]]; then
264         exit 0
265     fi
266
267     rm -rf "${work_dir}/airootfs" && mkdir -p "${work_dir}/airootfs"
268     _msg_info "copy base files from '${cache_dir}/${codename}/airootfs' to '${work_dir}/airootfs'..."
269     rsync  -au "${cache_dir}/${codename}/airootfs/" "${work_dir}/airootfs"
270     echo 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PATH}' >> "${work_dir}/airootfs/etc/bash.bashrc"
271     run_cmd apt-get update
272     # run_cmd apt-get upgrade
273 }
274
275 make_sourcelist() {
276     cp ${script_path}/source.list.d/${codename}/* ${work_dir}/airootfs/etc/apt
277     sed -i "s@http://archive.ubuntu.com/ubuntu/@${mirror}@g"  ${work_dir}/airootfs/etc/apt/sources.list
278     run_cmd apt-get update
279
280     if [[ -n $(find ${channels_dir}/*/repo -type f) ]]; then
281         _apt_install gnupg
282
283         for repo in $(find ${channels_dir}/*/repo -name '*.list'); do
284             key="$(dirname ${repo})/$(basename ${repo} | sed "s/list/key/")"
285
286             if [[ -f "${key}" ]]; then
287                 if file ${key} | grep -q "PGP/GPG key"; then
288                     cp "${key}" "${work_dir}/airootfs/$(basename ${key})"
289                 else
290                     wget -q -O "${work_dir}/airootfs/$(basename ${key})" "$(cat ${key})"
291                 fi
292
293                 run_cmd apt-key add "$(basename ${key})"
294                 rm "${work_dir}/airootfs/$(basename ${key})"
295                 cp "${repo}" "${work_dir}/airootfs/etc/apt/sources.list.d"
296             fi
297         done
298         run_cmd apt-get update
299     fi
300
301     # PPA
302     local PPA_FILELIST
303     local _PPA_FILE
304     local _ppa
305     PPA_FILELIST=("${channels_dir}/share/ppa_list.${arch}" "${channels_dir}/${channel_name}/ppa_list.${arch}")
306     _apt_install software-properties-common
307
308     for _PPA_FILE in ${PPA_FILELIST[@]}; do
309         if [[ -f "${_PPA_FILE}" ]]; then
310             for _ppa in $(grep -h -v ^'#' ${_PPA_FILE}); do
311                 run_cmd add-apt-repository --yes "${_ppa}"
312             done
313         fi
314     done
315 }
316
317 make_systemd() {
318     _apt_install systemd-sysv
319     run_cmd dbus-uuidgen --ensure=/etc/machine-id
320     run_cmd ln -sf /etc/machine-id /var/lib/dbus/machine-id
321 }
322
323 make_apt_packages() {
324     remove "${work_dir}/airootfs/aptpkglist"
325     _apt_install initramfs-tools
326     run_cmd env -i bash -c 'DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade --yes'
327
328     if [[ -f "${channels_dir}/share/packages.${arch}" ]]; then
329         grep -h -v ^'#' "${channels_dir}/share/packages.${arch}" | grep -v "^$" >> "${work_dir}/airootfs/aptpkglist"
330     fi
331
332     if [[ -f "${channels_dir}/${channel_name}/packages.${arch}" ]]; then
333         grep -h -v ^'#' "${channels_dir}/${channel_name}/packages.${arch}" | grep -v "^$" >> "${work_dir}/airootfs/aptpkglist"
334     fi
335
336     if [[ -s "${work_dir}/airootfs/aptpkglist" ]]; then
337         run_cmd env -i bash -c 'DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends --yes install $(echo $(<aptpkglist))'
338     fi
339
340     remove "${work_dir}/airootfs/aptpkglist"
341 }
342
343 make_snap_packages() {
344     remove "${work_dir}/airootfs/snappkglist"
345
346     if [[ -f "${channels_dir}/share/snap-packages.${arch}" ]]; then
347         grep -h -v ^'#' "${channels_dir}/share/snap-packages.${arch}" | grep -v "^$" >> "${work_dir}/airootfs/snappkglist"
348     fi
349
350     if [[ -f "${channels_dir}/${channel_name}/snap-packages.${arch}" ]]; then
351         grep -h -v ^'#' "${channels_dir}/${channel_name}/snap-packages.${arch}" | grep -v "^$" >> "${work_dir}/airootfs/snappkglist"
352     fi
353
354     if [[ -s "${work_dir}/airootfs/snappkglist" ]]; then
355         _apt_install snapd
356         run_cmd env -i bash -c 'snap install $(echo $(<snappkglist))'
357     fi
358
359     remove "${work_dir}/airootfs/snappkglist"
360 }
361
362 make_config() {
363     # Locales
364     run_cmd env -i bash -c 'DEBIAN_FRONTEND=noninteractive LANG=en_US.UTF-8 LC_ALL=C LANGUAGE=en_US.UTF-8 dpkg-reconfigure locales'
365
366     # resolvconf
367     run_cmd env -i bash -c 'DEBIAN_FRONTEND=noninteractive dpkg-reconfigure resolvconf'
368
369     # NetworkManager
370     cp ${channels_dir}/share/airootfs/etc/NetworkManager/NetworkManager.conf ${work_dir}/airootfs/etc/NetworkManager/NetworkManager.conf
371
372     # Timezone
373     #run_cmd echo -ne "UTC" > '/etc/timezone'
374     #run_cmd dpkg-reconfigure -f noninteractive tzdata
375
376     run_cmd env -i bash -c 'DEBIAN_FRONTEND=noninteractive dpkg-reconfigure network-manager'
377     run_cmd truncate -s 0 /etc/machine-id
378 }
379
380 make_add_user() {
381     sed "s|%USERNAME%|${username}|g;s|%OS_NAME%|${os_name}|g" "${nfb_dir}/casper.conf" > "${work_dir}/airootfs/etc/casper.conf"
382     chmod 755 "${work_dir}"/airootfs/usr/share/initramfs-tools/scripts/casper-bottom/*adduser "${work_dir}"/airootfs/usr/share/initramfs-tools/scripts/casper-bottom/*autologin
383     run_cmd env -i bash -c 'mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`'
384 }
385
386 make_clean() {
387     sed -i "s@${mirror}@http://archive.ubuntu.com/ubuntu/@g"  ${work_dir}/airootfs/etc/apt/sources.list
388     run_cmd apt-get update
389     run_cmd apt-get clean
390     run_cmd apt-get --yes autoremove
391     run_cmd rm -rf "/tmp/* ~/.bash_history"
392 }
393
394 make_squashfs() {
395     # prepare
396     [[ -d "${bootfiles_dir}" ]] && rm -r "${bootfiles_dir}"
397     mkdir -p "${bootfiles_dir}"/{casper,isolinux,install}
398
399     # make squashfs
400     mksquashfs "${work_dir}/airootfs" "${bootfiles_dir}/casper/filesystem.squashfs"
401 }
402
403 make_nfb() {
404     # prepare
405     touch "${bootfiles_dir}/ubuntu"
406     sed "s|%OS_NAME%|${os_name}|g" "${nfb_dir}/README.diskdefines" > "${bootfiles_dir}/README.diskdefines"
407
408     # casper setup
409     cp "${work_dir}/airootfs/boot/vmlinuz" "${bootfiles_dir}/casper/vmlinuz"
410     cp "${work_dir}/airootfs/boot/initrd.img" "${bootfiles_dir}/casper/initrd"
411     run_cmd dpkg-query -W --showformat='${Package} ${Version}\n' > ${bootfiles_dir}/casper/filesystem.manifest
412     cp -v "${bootfiles_dir}/casper/filesystem.manifest" "${bootfiles_dir}/casper/filesystem.manifest-desktop"
413     sed -i '/casper/d;/discover/d;/laptop-detect/d;/os-prober/d;/ubiquity/d' "${bootfiles_dir}/casper/filesystem.manifest-desktop"
414     printf $(du -sx --block-size=1 "${work_dir}/airootfs" | cut -f1) > "${bootfiles_dir}/casper/filesystem.size"
415
416     # isolinux setup
417     cp "${work_dir}"/airootfs/usr/lib/syslinux/modules/bios/*.c32 "${bootfiles_dir}/isolinux/"
418     cp "${work_dir}/airootfs/usr/lib/ISOLINUX/isolinux.bin" "${bootfiles_dir}/isolinux/"
419     cp "${work_dir}/airootfs/usr/lib/ISOLINUX/isohdpfx.bin" "${bootfiles_dir}/isolinux/"
420     sed "s|%OS_NAME%|${os_name}|g" "${nfb_dir}/grub.cfg" > "${bootfiles_dir}/isolinux/grub.cfg"
421     sed "s|%OS_NAME%|${os_name}|g" "${nfb_dir}/isolinux.cfg" > "${bootfiles_dir}/isolinux/isolinux.cfg"
422
423     # memtest86+ setup
424     _apt_install memtest86+
425     cp "${work_dir}/airootfs/boot/memtest86+.bin" "${bootfiles_dir}/install/memtest86+"
426
427     # memtest86 setup
428     if [[ ! -f "${cache_dir}/memtest86-usb.zip" ]]; then
429         wget -O "${cache_dir}/memtest86-usb.zip" "https://www.memtest86.com/downloads/memtest86-usb.zip"
430         bash -c "(unzip -p ${cache_dir}/memtest86-usb.zip memtest86-usb.img > ${cache_dir}/memtest86)"
431     fi
432
433     cp "${cache_dir}/memtest86" "${bootfiles_dir}/install/memtest86"
434 }
435
436 make_efi() {
437     # UEFI 32bit (ia32)
438     grub-mkstandalone \
439         --format=i386-efi \
440         --output="${bootfiles_dir}/isolinux/bootia32.efi" \
441         --locales="" \
442         --fonts="" \
443         "boot/grub/grub.cfg=${bootfiles_dir}/isolinux/grub.cfg"
444     
445     # UEFI 64bit (x64)
446     grub-mkstandalone \
447         --format=x86_64-efi \
448         --output="${bootfiles_dir}/isolinux/bootx64.efi" \
449         --locales="" \
450         --fonts="" \
451         "boot/grub/grub.cfg=${bootfiles_dir}/isolinux/grub.cfg"
452
453     # create efiboot.img
454     truncate -s 10M "${bootfiles_dir}/isolinux/efiboot.img"
455     mkfs.fat -F 16 -f 1 -r 112 "${bootfiles_dir}/isolinux/efiboot.img"
456     mkdir "${bootfiles_dir}/mnt"
457     mount "${bootfiles_dir}/isolinux/efiboot.img" "${bootfiles_dir}/mnt"
458     mkdir -p "${bootfiles_dir}/mnt/efi/boot"
459     cp "${bootfiles_dir}/isolinux/bootia32.efi" "${bootfiles_dir}/mnt/efi/boot"
460     cp "${bootfiles_dir}/isolinux/bootx64.efi" "${bootfiles_dir}/mnt/efi/boot"
461     umount -d "${bootfiles_dir}/mnt"
462     rm -r "${bootfiles_dir}/mnt"
463 }
464
465 make_iso() {
466     cd "${bootfiles_dir}"
467
468     # create checksum (using at booting)
469     bash -c "(find . -type f -print0 | xargs -0 md5sum | grep -v "\./md5sum.txt" > md5sum.txt)"
470
471     # create iso
472     xorriso \
473         -as mkisofs \
474         -iso-level 3 \
475         -full-iso9660-filenames \
476         -volid "${iso_label}" \
477         -appid "${iso_application}" \
478         -publisher "${iso_publisher}" \
479         -preparer "prepared by LUBS" \
480         -eltorito-boot isolinux/isolinux.bin \
481             -no-emul-boot \
482             -boot-load-size 4 \
483             -boot-info-table \
484         -eltorito-alt-boot \
485             -eltorito-platform efi \
486             -eltorito-boot EFI/efiboot.img \
487             -no-emul-boot \
488         -isohybrid-mbr "${bootfiles_dir}/isolinux/isohdpfx.bin" \
489         -isohybrid-gpt-basdat \
490         -eltorito-catalog isolinux/boot.cat \
491         -output "${out_dir}/${iso_filename}" \
492         -graft-points \
493             "." \
494             "/isolinux/isolinux.bin=isolinux/isolinux.bin" \
495             "/EFI/efiboot.img=isolinux/efiboot.img"
496     
497     cd - > /dev/null
498 }
499
500 make_checksum() {
501     cd "${out_dir}"
502     _msg_info "Creating md5 checksum ..."
503     md5sum "${iso_filename}" > "${iso_filename}.md5"
504
505     _msg_info "Creating sha256 checksum ..."
506     sha256sum "${iso_filename}" > "${iso_filename}.sha256"
507     cd - > /dev/null 2>&1
508 }
509
510
511 # 引数解析()
512 # 参考記事:https://0e0.pw/ci83 https://0e0.pw/VJlg
513
514 _opt_short="w:o:ha:-:m:c:d"
515 _opt_long="help,arch:,codename:,debug,help,mirror:,out:,work,cache-only"
516 OPT=$(getopt -o ${_opt_short} -l ${_opt_long} -- "${@}")
517
518 if [[ ${?} != 0 ]]; then
519     exit 1
520 fi
521
522 eval set -- "${OPT}"
523
524 while :; do
525     case ${1} in
526         -a | --arch)
527             if [[ -z ${2} ]]; then
528                 _msg_error "Please specify the architecture."
529                 exit 1
530             else
531                 arch="${2}"
532             fi
533             shift 2
534             ;;
535         -c | --codename)
536             if [[ -z ${2} ]]; then
537                 _msg_error "Please specify the codename."
538                 exit 1
539             else
540                 codename="${2}"
541             fi
542             shift 2
543             ;;
544         -d | --debug)
545             debug=true
546             shift 1
547             ;;
548         -h | --help)
549             _usage
550             exit 0
551             ;;
552         -m | --mirror)
553             if [[ -z ${2} ]]; then
554                 _msg_error "Please specify the mirror server."
555                 exit 1
556             else
557                 mirror="${2}"
558             fi
559
560             shift 2
561             ;;
562         -o | --out)
563             if [[ -z ${2} ]]; then
564                 _msg_error "Please specify the out dir."
565                 exit 1
566             else
567                 out_dir="${2}"
568             fi
569
570             shift 2
571             ;;
572         -w | --work)
573             if [[ -z ${2} ]]; then
574                 _msg_error "Please specify the out dir."
575                 exit 1
576             else
577                 work_dir="${2}"
578             fi
579
580             shift 2
581             ;;
582         --cache-only)
583             cache_only=true
584             shift 1
585             ;;
586         --)
587             shift
588             break
589             ;;
590         *)
591             _msg_error "Invalid argument '${1}'"
592             _usage 1
593             ;;
594     esac
595 done
596
597 bootfiles_dir="${work_dir}/bootfiles"
598 trap  umount_chroot 0 2 15
599
600 if [[ -n "${1}" ]]; then
601     channel_name="${1}"
602
603     check_channel() {
604         local channel_list
605         local i
606         channel_list=()
607
608         for _channel in $(ls -l "${channels_dir}" | awk '$1 ~ /d/ {print $9 }'); do
609             if [[ -n $(ls "${channels_dir}/${_channel}") ]] && [[ ! "${_channel}" = "share" ]]; then
610                 channel_list+=( "${_channel}" )
611             fi
612         done
613
614         for i in ${channel_list[@]}; do
615             if [[ "${i}" = "${channel_name}" ]]; then
616                 echo -n "true"
617                 return 0
618             fi
619         done
620
621         echo -n "false"
622         return 1
623     }
624
625     if [[ $(check_channel ${channel_name}) = false ]]; then
626         _msg_error "Invalid channel ${channel_name}"
627         exit 1
628     fi
629 fi
630
631
632 prepare_build
633 run_once make_basefs
634 run_once make_sourcelist
635 run_once make_systemd
636 run_once make_apt_packages
637 #run_once make_snap_packages
638 run_once make_config
639 run_once make_add_user
640 run_once make_clean
641 run_once make_squashfs
642 run_once make_nfb
643 run_once make_efi
644 run_once make_iso
645 run_once make_checksum