OSDN Git Service

Functionalized running customize script
[alterlinux/LFBS.git] / lfbs
1 #!/usr/bin/env bash
2
3 # SPDX-License-Identifier: GPL-3.0
4 #
5 # kokkiemouse
6 # Twitter: @kokkiemouse
7 # Email  : kokkiemouse@gmail.com
8 #
9 # lfbs
10 #
11
12 set -e
13 # set -u
14
15 #export LANG=C
16
17 script_path=$(readlink -f "${0%/*}")
18 work_dir="${script_path}/work"
19 channels_dir="${script_path}/channels"
20 nfb_dir="${script_path}/nfb"
21 codename="32"
22 os_name="Fedora"
23 iso_name="Fedora"
24 language="ja_JP.UTF-8"
25 channel_name="lxde"
26
27 arch=x86_64
28
29 out_dir="${script_path}/out"
30 iso_label="${os_name}_${codename}_${arch}"
31 iso_publisher='Fascode Network <https://fascode.net>'
32 iso_application="${os_name} Live/Rescue CD"
33 iso_version="${codename}-$(date +%Y.%m.%d)"
34 iso_filename="${iso_name}-${iso_version}-${arch}.iso"
35 liveuser_name=fedora
36 liveuser_password=fedora
37 liveuser_shell="/usr/bin/zsh"
38
39 #-- language config --#
40
41 # Sets the default locale for the live environment.
42 # You can also place a package list for that locale name and install packages specific to that locale.
43 locale_name="en"
44 locale_gen_name="en_US.UTF-8"
45 locale_version="gl"
46 locale_time="UTC"
47 locale_fullname="global"
48
49 debug=false
50 cache_only=false
51
52
53 start_time="$(date +%s)"
54
55 _msg_common() {
56     if [[ "${debug}" = true ]]; then
57         local _current_time
58         local _time
59         _current_time="$(date +%s)"
60         _time="$(("${_current_time}"-"${start_time}"))"
61
62         if [[ "${_time}" -ge 3600 ]]; then
63             echo "[$(date -d @${_time} +%H:%M.%S)]$("${script_path}/echo_color" -t 6 "[LFBS Core]")"
64         elif [[ "${_time}" -ge 60 ]]; then
65             echo "[00:$(date -d @${_time} +%M.%S)]$("${script_path}/echo_color" -t 6 "[LFBS Core]")"
66         else
67             echo "[00:00.$(date -d @${_time} +%S)] $("${script_path}/echo_color" -t 6 "[LFBS Core]")"
68         fi
69     else
70         "${script_path}/echo_color" -t 6 "[LFBS Core]"
71     fi
72 }
73
74 # Show an INFO message
75 # _msg_info <message>
76 _msg_info() {
77     local _msg
78     _msg="${@}"
79     echo "$(_msg_common)  $("${script_path}/echo_color" -t 2 "Info:") ${_msg}"
80 }
81
82 # Show an debug message
83 # _msg_debug <message>
84 _msg_debug() {
85     if [[ "${debug}" = true ]]; then
86         local _msg
87         _msg="${@}"
88         echo "$(_msg_common)  $("${script_path}/echo_color" -t 3 "Debug:") ${_msg}"
89     fi
90 }
91
92 # Show an ERROR message then exit with status
93 # _msg_error <message> <exit code>
94 _msg_error() {
95     local _msg
96     local _error
97     _msg="${1}"
98     _error=${2}
99     echo "$(_msg_common)  $("${script_path}/echo_color" -t 1 "Error:") ${_msg}"
100
101     if [[ ! ${_error} = 0 ]]; then
102         exit ${_error}
103     fi
104 }
105
106 # Unmount chroot dir
107 umount_chroot () {
108     local mount
109
110     for mount in $(mount | awk '{print $3}' | grep "$(realpath "${work_dir}")" | sort -r); do
111         if [[ ! "${mount}" == "${work_dir}/airootfs" ]]; then
112             _msg_info "Unmounting ${mount}"
113             umount -fl "${mount}"
114         fi
115     done
116 }
117
118 # Unmount chroot dir and airootfs
119 umount_chroot_airootfs () {
120     local mount
121
122     for mount in $(mount | awk '{print $3}' | grep "$(realpath "${work_dir}")" | sort -r); do
123         _msg_info "Unmounting ${mount}"
124         umount -fl "${mount}"
125     done
126 }
127 # Helper function to run make_*() only one time.
128 run_once() {
129     local name
130     umount_chroot
131     name="$1"
132
133     if [[ ! -e "${work_dir}/build.${name}" ]]; then
134         _msg_info "$(echo $name | sed "s@_@ @g") is starting."
135         "${1}"
136         _msg_info "$(echo $name | sed "s@_@ @g") was done!"
137         touch "${work_dir}/build.${name}"
138     fi
139 }
140
141 run_cmd() {
142     local mount
143
144     for mount in "dev" "dev/pts" "proc" "sys" "etc/resolv.conf"; do
145     #for mount in "dev" "dev/pts" "proc" "sys" ; do
146         if [[ "${mount}" == "etc/resolv.conf" ]]; then
147             cp /etc/resolv.conf "${work_dir}/airootfs/${mount}"
148         else
149             mount --bind /${mount} "${work_dir}/airootfs/${mount}"
150         fi
151     done
152     
153     chroot "${work_dir}/airootfs" "${@}"
154
155     for mount in $(mount | awk '{print $3}' | grep "$(realpath "${work_dir}")" | sort -r); do
156         if [[ ! "${mount}" == "${work_dir}/airootfs" ]]; then
157             umount -fl "${mount}"
158         fi
159     done
160 }
161
162 _dnf_install() {
163     run_cmd dnf install -y ${@}
164 }
165
166 # rm helper
167 # Delete the file if it exists.
168 # For directories, rm -rf is used.
169 # If the file does not exist, skip it.
170 # remove <file> <file> ...
171 remove() {
172     local _list
173     local _file
174     _list=($(echo "$@"))
175
176     for _file in "${_list[@]}"; do
177         _msg_debug "Removeing ${_file}"
178
179         if [[ -f ${_file} ]]; then
180             rm -f "${_file}"
181         elif [[ -d ${_file} ]]; then
182             rm -rf "${_file}"
183         fi
184     done
185 }
186
187 # Show help
188 _usage () {
189     echo "usage ${0} [options] [channel]"
190     echo
191     echo " General options:"
192     echo
193     echo "    -a | --arch <str>      Set architecture"
194     echo "                           Default: ${arch}"
195     echo "    -c | --codename <str>  Set ubuntu codename"
196     echo "                           Default: ${codename}"
197     echo "    -l | --lang <lang>     Specifies the default language for the live environment"
198     echo "                           Default: ${locale_name}"
199     echo "    -m | --mirror <url>    Set apt mirror server."
200     echo "                           Default: ${mirror}"
201     echo "    -o | --out <out_dir>   Set the output directory"
202     echo "                           Default: ${out_dir}"
203     echo "    -w | --work <work_dir> Set the working directory"
204     echo "                           Default: ${work_dir}"
205     echo
206     echo "    -d | --debug           "
207     echo "    -h | --help            This help message and exit"
208     echo
209     echo "You can switch between installed packages, files included in images, etc. by channel."
210     echo
211     echo " Language for each architecture:"
212     for _list in ${script_path}/system/locale-* ; do
213         _arch="${_list#${script_path}/system/locale-}"
214         echo -n "    ${_arch}"
215         for i in $( seq 1 $(( ${blank} - 4 - ${#_arch} )) ); do
216             echo -ne " "
217         done
218         _locale_name_list=$(cat ${_list} | grep -h -v ^'#' | awk '{print $1}')
219         for _lang in ${_locale_name_list[@]};do
220             echo -n "${_lang} "
221         done
222         echo
223     done
224     echo " Channel:"
225     
226     local _channel
227     local channel_list
228     local description
229
230     for _channel in $(ls -l "${channels_dir}" | awk '$1 ~ /d/ {print $9 }'); do
231         if [[ -n $(ls "${channels_dir}/${_channel}") ]] && [[ ! "${_channel}" = "share" ]]; then
232             channel_list+=( "${_channel}" )
233         fi
234     done
235
236     for _channel in ${channel_list[@]}; do
237         if [[ -f "${channels_dir}/${_channel}/description.txt" ]]; then
238             description=$(cat "${channels_dir}/${_channel}/description.txt")
239         else
240             description="This channel does not have a description.txt."
241         fi
242
243         echo -ne "    ${_channel}"
244
245         for i in $( seq 1 $(( 23 - ${#_channel} )) ); do
246             echo -ne " "
247         done
248         
249         echo -ne "${description}\n"
250     done
251 }
252
253 dnfstrap() {
254     dnf --installroot="${work_dir}/airootfs" $(${script_path}/system/repository-json-parser.py ${script_path}/system/repository.json) install ${@} -y
255 }
256
257
258 make_basefs() {
259     _msg_info "Installing Fedora to '${work_dir}/airootfs'..."
260     dnfstrap @Core
261     _msg_info "${codename} installed successfully!"
262     
263     echo 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PATH}' > "${work_dir}/airootfs/etc/bash.bashrc"
264     run_cmd dnf update -y
265     run_cmd dnf -y remove $(run_cmd dnf repoquery --installonly --latest-limit=-1 -q)
266     # run_cmd apt-get upgrade
267 }
268
269
270 # Parse files
271 parse_files() {
272     #-- ロケールを解析、設定 --#
273     local _get_locale_line_number _locale_config_file _locale_name_list _locale_line_number _locale_config_line
274
275     # 選択されたロケールの設定が描かれた行番号を取得
276     _locale_config_file="${script_path}/system/locale-${arch}"
277     _locale_name_list=($(cat "${_locale_config_file}" | grep -h -v ^'#' | awk '{print $1}'))
278     _get_locale_line_number() {
279         local _lang _count=0
280         for _lang in ${_locale_name_list[@]}; do
281             _count=$(( _count + 1 ))
282             if [[ "${_lang}" == "${locale_name}" ]]; then echo "${_count}"; return 0; fi
283         done
284         echo -n "failed"
285     }
286     _locale_line_number="$(_get_locale_line_number)"
287
288     # 不正なロケール名なら終了する
289     [[ "${_locale_line_number}" == "failed" ]] && msg_error "${locale_name} is not a valid language." "1"
290
291     # ロケール設定ファイルから該当の行を抽出
292     _locale_config_line=($(cat "${_locale_config_file}" | grep -h -v ^'#' | grep -v ^$ | head -n "${_locale_line_number}" | tail -n 1))
293
294     # 抽出された行に書かれた設定をそれぞれの変数に代入
295     # ここで定義された変数のみがグローバル変数
296     locale_name="${_locale_config_line[0]}"
297     locale_gen_name="${_locale_config_line[1]}"
298     locale_version="${_locale_config_line[2]}"
299     locale_time="${_locale_config_line[3]}"
300     locale_fullname="${_locale_config_line[4]}"
301 }
302
303 prepare_build() {
304     if [[ ${EUID} -ne 0 ]]; then
305         _msg_error "This script must be run as root." 1
306     fi
307     umount_chroot_airootfs
308     # Check codename
309     if [[ -z "$(grep -h -v ^'#' ${channels_dir}/${channel_name}/codename.${arch} | grep -x ${codename})" ]]; then
310         _msg_error "This codename (${channel_name}) is not supported on this channel (${codename})."
311     fi
312     if [[ ! -d "${work_dir}/squashfsroot/LiveOS/" ]]; then
313         mkdir -p "${work_dir}/squashfsroot/LiveOS/"
314         mkdir -p "${work_dir}/airootfs/"
315         _msg_info "Make rootfs image..."
316         truncate -s 5G "${work_dir}/squashfsroot/LiveOS/rootfs.img"
317         _msg_info "Format rootfs image..."
318         mkfs.ext4 -F "${work_dir}/squashfsroot/LiveOS/rootfs.img"
319     fi    
320     mkdir -p "${out_dir}"
321     _msg_info "Mount rootfs image..."
322     mount -o loop,rw,sync "${work_dir}/squashfsroot/LiveOS/rootfs.img" "${work_dir}/airootfs"
323
324 }
325
326 make_systemd() {
327     _dnf_install dbus-tools
328     run_cmd dbus-uuidgen --ensure=/etc/machine-id
329     if [[ ! -d "${work_dir}/airootfs/var/lib/dbus" ]]; then
330         run_cmd mkdir /var/lib/dbus
331     fi
332     run_cmd ln -sf /etc/machine-id /var/lib/dbus/machine-id
333 }
334 make_dnf_packages() {
335     remove "${work_dir}/airootfs/dnfpkglist"
336     #_apt_install initramfs-tools
337     # run_cmd env -i bash -c 'DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade --yes'
338
339     if [[ -f "${channels_dir}/share/packages.${arch}" ]]; then
340         grep -h -v ^'#' "${channels_dir}/share/packages.${arch}" | grep -v "^$" >> "${work_dir}/airootfs/dnfpkglist"
341     fi
342     if [[ -f "${channels_dir}/share/packages-${locale_name}.${arch}" ]]; then
343         grep -h -v ^'#' "${channels_dir}/share/packages-${locale_name}.${arch}" | grep -v "^$" >> "${work_dir}/airootfs/dnfpkglist"
344     fi
345
346     if [[ -f "${channels_dir}/${channel_name}/packages.${arch}" ]]; then
347         grep -h -v ^'#' "${channels_dir}/${channel_name}/packages.${arch}" | grep -v "^$" >> "${work_dir}/airootfs/dnfpkglist"
348     fi
349
350     if [[ -f "${channels_dir}/${channel_name}/packages-${locale_name}.${arch}" ]]; then
351         grep -h -v ^'#' "${channels_dir}/${channel_name}/packages-${locale_name}.${arch}" | grep -v "^$" >> "${work_dir}/airootfs/dnfpkglist"
352     fi
353
354     if [[ -s "${work_dir}/airootfs/dnfpkglist" ]]; then
355         run_cmd env -i bash -c 'dnf -y --nogpgcheck install $(echo $(<dnfpkglist))'
356     fi
357
358     remove "${work_dir}/airootfs/dnfpkglist"
359 }
360
361 make_cp_airootfs() {
362     local _copy_airootfs
363
364     _copy_airootfs() {
365         local _dir="${1%/}"
366         if [[ -d "${_dir}" ]]; then
367             cp -af "${_dir}"/* "${work_dir}/airootfs"
368         fi
369     }
370     _copy_airootfs "${channels_dir}/share/airootfs"
371     _copy_airootfs "${channels_dir}/share/airootfs.${locale_name}"
372     _copy_airootfs "${channels_dir}/${channel_name}/airootfs"
373     _copy_airootfs "${channels_dir}/${channel_name}/airootfs.${locale_name}"
374 }
375
376 make_config() {
377
378     # customize_airootfs options
379     # -b                        : Enable boot splash.
380     # -d                        : Enable debug mode.
381     # -g <locale_gen_name>      : Set locale-gen.
382     # -i <inst_dir>             : Set install dir
383     # -k <kernel config line>   : Set kernel name.
384     # -o <os name>              : Set os name.
385     # -p <password>             : Set password.
386     # -s <shell>                : Set user shell.
387     # -t                        : Set plymouth theme.
388     # -u <username>             : Set live user name.
389     # -x                        : Enable bash debug mode.
390     # -r                        : Enable rebuild.
391     # -z <locale_time>          : Set the time zone.
392     # -l <locale_name>          : Set language.
393     #
394     # -j is obsolete in AlterISO3 and cannot be used.
395     # -k changed in AlterISO3 from passing kernel name to passing kernel configuration.
396     local _airootfs_script_options _run_script
397     _airootfs_script_options="-p ${liveuser_password} -u ${liveuser_name} -o ${os_name} -s ${liveuser_shell} -a ${arch} -g ${locale_gen_name} -l ${locale_name} -z ${locale_time} "
398
399     _run_script() {
400         local _file
401         for _file in ${@}; do
402             chmod 755 "${_file}"
403             if [[ -f "${_file}" ]]; then run_cmd "${_file}" ${_airootfs_script_options}; fi
404         done
405     }
406
407     _run_script "/root/customize_airootfs.sh" "/root/customize_airootfs_${channel_name}.sh"
408
409     run_cmd ln -sf /usr/share/zoneinfo/${locale_time} /etc/localtime
410     echo "LANG=${locale_gen_name}" > "${work_dir}/airootfs/etc/locale.conf"
411     run_cmd truncate -s 0 /etc/machine-id
412     run_cmd passwd -u -f root
413 }
414
415 make_clean() {
416     run_cmd dnf -y remove $(run_cmd dnf repoquery --installonly --latest-limit=-1 -q)
417     run_cmd dnf clean all
418 }
419
420 make_squashfs() {
421     # prepare
422     [[ -d "${bootfiles_dir}" ]] && rm -r "${bootfiles_dir}"
423     mkdir -p "${bootfiles_dir}"/{grub,LiveOS,boot,isolinux}
424     #generate initrd
425     _msg_info "make initrd..."
426     run_cmd dracut --xz --add "dmsquash-live convertfs pollcdrom" --omit plymouth --no-hostonly --no-early-microcode /boot/initrd0 `run_cmd ls /lib/modules`
427     cp ${work_dir}/airootfs/boot/vmlinuz-$(run_cmd ls /lib/modules) ${bootfiles_dir}/boot/vmlinuz
428     mv ${work_dir}/airootfs/boot/initrd0 ${bootfiles_dir}/boot/initrd
429     #cp isolinux
430     cp "${nfb_dir}"/isolinux/* "${bootfiles_dir}/isolinux/"
431     # make squashfs
432     rm -rf "${work_dir}/airootfs/boot"
433     umount "${work_dir}/airootfs"
434     _msg_info "Minimize rootfs..."
435     resize2fs -M "${work_dir}/squashfsroot/LiveOS/rootfs.img"
436     _msg_info "Compress rootfs.."
437     mksquashfs "${work_dir}/squashfsroot/" "${bootfiles_dir}/LiveOS/squashfs.img"
438 }
439
440 make_nfb() {
441     touch "${bootfiles_dir}/fedora_lfbs"
442     # isolinux setup
443     sed "s|%OS_NAME%|${os_name}|g" "${nfb_dir}/isolinux.cfg" | sed "s|%CD_LABEL%|${iso_label}|g"  > "${bootfiles_dir}/isolinux/isolinux.cfg"
444     #grub
445     sed "s|%OS_NAME%|${os_name}|g" "${nfb_dir}/grub.cfg" | sed "s|%CD_LABEL%|${iso_label}|g" > "${bootfiles_dir}/grub/grub.cfg"
446 }
447 make_efi() {
448     # UEFI 32bit (ia32)
449     grub-mkstandalone \
450         --format=i386-efi \
451         --output="${bootfiles_dir}/grub/bootia32.efi" \
452         --locales="" \
453         --fonts="" \
454         "boot/grub/grub.cfg=${bootfiles_dir}/grub/grub.cfg"
455     
456     # UEFI 64bit (x64)
457     grub-mkstandalone \
458         --format=x86_64-efi \
459         --output="${bootfiles_dir}/grub/bootx64.efi" \
460         --locales="" \
461         --fonts="" \
462         "boot/grub/grub.cfg=${bootfiles_dir}/grub/grub.cfg"
463
464     # create efiboot.img
465     truncate -s 200M "${bootfiles_dir}/grub/efiboot.img"
466     mkfs.fat -F 16 -f 1 -r 112 "${bootfiles_dir}/grub/efiboot.img"
467     mkdir "${bootfiles_dir}/mnt"
468     mount "${bootfiles_dir}/grub/efiboot.img" "${bootfiles_dir}/mnt"
469     mkdir -p "${bootfiles_dir}/mnt/efi/boot"
470     cp "${bootfiles_dir}/grub/bootia32.efi" "${bootfiles_dir}/mnt/efi/boot"
471     cp "${bootfiles_dir}/grub/bootx64.efi" "${bootfiles_dir}/mnt/efi/boot"
472     umount -d "${bootfiles_dir}/mnt"
473     rm -r "${bootfiles_dir}/mnt"
474 }
475 make_iso() {
476     cd "${bootfiles_dir}"
477
478     # create checksum (using at booting)
479     bash -c "(find . -type f -print0 | xargs -0 md5sum | grep -v "\./md5sum.txt" > md5sum.txt)"
480
481     # create iso
482     xorriso \
483         -as mkisofs \
484         -iso-level 3 \
485         -full-iso9660-filenames \
486         -volid "${iso_label}" \
487         -appid "${iso_application}" \
488         -publisher "${iso_publisher}" \
489         -preparer "prepared by LFBS" \
490         -b isolinux/isolinux.bin \
491             -no-emul-boot \
492             -boot-load-size 4 \
493             -boot-info-table \
494         -eltorito-alt-boot \
495             -eltorito-platform efi \
496             -eltorito-boot EFI/efiboot.img \
497             -no-emul-boot \
498         -isohybrid-mbr "${bootfiles_dir}/isolinux/isohdpfx.bin" \
499         -isohybrid-gpt-basdat \
500         -eltorito-catalog isolinux/boot.cat \
501         -output "${out_dir}/${iso_filename}" \
502         -graft-points \
503             "." \
504             "/isolinux/isolinux.bin=isolinux/isolinux.bin" \
505             "/EFI/efiboot.img=grub/efiboot.img"
506     
507     cd - > /dev/null
508 }
509
510 make_checksum() {
511     cd "${out_dir}"
512     _msg_info "Creating md5 checksum ..."
513     md5sum "${iso_filename}" > "${iso_filename}.md5"
514
515     _msg_info "Creating sha256 checksum ..."
516     sha256sum "${iso_filename}" > "${iso_filename}.sha256"
517     cd - > /dev/null 2>&1
518     umount_chroot_airootfs
519 }
520
521 # 引数解析()
522 # 参考記事:https://0e0.pw/ci83 https://0e0.pw/VJlg
523
524 _opt_short="w:l:o:ha:-:m:c:d"
525 _opt_long="help,arch:,codename:,debug,help,lang,mirror:,out:,work,cache-only"
526 OPT=$(getopt -o ${_opt_short} -l ${_opt_long} -- "${@}")
527
528 if [[ ${?} != 0 ]]; then
529     exit 1
530 fi
531
532 eval set -- "${OPT}"
533
534 while :; do
535     case ${1} in
536         -a | --arch)
537             arch="${2}"
538             shift 2
539             ;;
540         -c | --codename)
541             codename="${2}"
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             mirror="${2}"
554             shift 2
555             ;;
556         -l | --lang)
557             locale_name="${2}"
558             shift 2
559             ;;
560         -o | --out)
561             out_dir="${2}"
562             shift 2
563             ;;
564         -w | --work)
565             work_dir="${2}"
566             shift 2
567             ;;
568         --cache-only)
569             cache_only=true
570             shift 1
571             ;;
572         --)
573             shift
574             break
575             ;;
576         *)
577             _msg_error "Invalid argument '${1}'"
578             _usage 1
579             ;;
580     esac
581 done
582
583 bootfiles_dir="${work_dir}/bootfiles"
584 trap  umount_chroot 0 2 15
585
586 if [[ -n "${1}" ]]; then
587     channel_name="${1}"
588     if [[ "${channel_name}" = "umount" ]]; then
589         umount_chroot_airootfs
590         exit 0
591     fi
592     if [[ "${channel_name}" = "clean" ]]; then
593         umount_chroot_airootfs
594         _msg_info "deleting work dir..."
595         rm -rf "${work_dir}"
596         exit 0
597     fi
598     check_channel() {
599         local channel_list
600         local i
601         channel_list=()
602         
603         for _channel in $(ls -l "${channels_dir}" | awk '$1 ~ /d/ {print $9 }'); do
604             if [[ -n "$(ls "${channels_dir}/${_channel}")" ]] && [[ ! "${_channel}" = "share" ]]; then
605                 channel_list+=( "${_channel}" )
606             fi
607         done
608
609         for i in ${channel_list[@]}; do
610             if [[ "${i}" = "${channel_name}" ]]; then
611                 echo -n "true"
612                 return 0
613             fi
614         done
615
616         echo -n "false"
617         return 1
618     }
619
620     if [[ "$(check_channel ${channel_name})" = false ]]; then
621         _msg_error "Invalid channel ${channel_name}"
622         exit 1
623     fi
624 fi
625 iso_filename="${iso_name}-${codename}-${channel_name}-${locale_name}-$(date +%Y.%m.%d)-${arch}.iso"
626 umount_chroot_airootfs
627 if [[ -d "${work_dir}" ]]; then
628     _msg_info "deleting work dir..."
629     rm -rf "${work_dir}"
630 fi
631 prepare_build
632 parse_files
633 run_once make_basefs
634 run_once make_systemd
635 run_once make_dnf_packages
636 run_once make_cp_airootfs
637 run_once make_config
638 run_once make_clean
639 run_once make_squashfs
640 run_once make_nfb
641 run_once make_efi
642 run_once make_iso
643 run_once make_checksum