mirror of
https://github.com/nchevsky/systemrescue-zfs.git
synced 2025-12-06 07:12:01 +01:00
add sysresccd/.imageinfo file to the iso image, allows systemrescue-usbwriter to determine compatibility
The upcoming systemrescue-usbwriter should work mostly independent of SystemRescue .iso version and one systemrescue-usbwriter version should work for a wide range of SystemRescue versions. For this to work, it has to exactly determine compatibility without any crude guesswork. The necessary info for this is stored in the imageinfo file. It also contains a "FORMAT_EPOCH" field that allows to explicitly declare incompatibility to older versions of systemrescue-usbwriter in case automatic compatibility detection based on syslinux version etc. doesn't work.
This commit is contained in:
parent
100032695d
commit
00ccef7a07
16
build.sh
16
build.sh
|
|
@ -12,6 +12,7 @@ iso_label="RESCUE${iso_mainver//.}"
|
||||||
iso_publisher="SystemRescue <http://www.system-rescue.org>"
|
iso_publisher="SystemRescue <http://www.system-rescue.org>"
|
||||||
iso_application="SystemRescue"
|
iso_application="SystemRescue"
|
||||||
install_dir=sysresccd
|
install_dir=sysresccd
|
||||||
|
image_info_file="${install_dir}/.imageinfo"
|
||||||
work_dir=work
|
work_dir=work
|
||||||
out_dir=out
|
out_dir=out
|
||||||
gpg_key=
|
gpg_key=
|
||||||
|
|
@ -385,6 +386,20 @@ make_prepare() {
|
||||||
# rm -rf ${work_dir}/${arch}/airootfs (if low space, this helps)
|
# rm -rf ${work_dir}/${arch}/airootfs (if low space, this helps)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Create the .imageinfo file, used by systemrescue-usbwriter to check compatibility
|
||||||
|
make_imageinfo() {
|
||||||
|
local syslinux_ver=$(grep -E "^syslinux " "${work_dir}/${arch}/airootfs/root/packages-list.txt" | sed -e "s#syslinux \(.*\)#\1#")
|
||||||
|
|
||||||
|
echo "# SystemRescue imageinfo - used by systemrescue-usbwriter to check compatibility" >"${work_dir}/iso/${image_info_file}"
|
||||||
|
echo "NAME=SystemRescue" >>"${work_dir}/iso/${image_info_file}"
|
||||||
|
echo "VERSION=${iso_version}" >>"${work_dir}/iso/${image_info_file}"
|
||||||
|
echo "ARCH=${arch}" >>"${work_dir}/iso/${image_info_file}"
|
||||||
|
echo "SYSLINUX_VERSION=${syslinux_ver}" >>"${work_dir}/iso/${image_info_file}"
|
||||||
|
echo "" >>"${work_dir}/iso/${image_info_file}"
|
||||||
|
echo "# FORMAT_EPOCH can be used to explicitly declare incompatibility" >>"${work_dir}/iso/${image_info_file}"
|
||||||
|
echo "FORMAT_EPOCH=1" >>"${work_dir}/iso/${image_info_file}"
|
||||||
|
}
|
||||||
|
|
||||||
# Build ISO
|
# Build ISO
|
||||||
make_iso() {
|
make_iso() {
|
||||||
# Copy version file
|
# Copy version file
|
||||||
|
|
@ -451,4 +466,5 @@ run_once make_isolinux
|
||||||
run_once make_efi
|
run_once make_efi
|
||||||
run_once make_efiboot
|
run_once make_efiboot
|
||||||
run_once make_prepare
|
run_once make_prepare
|
||||||
|
run_once make_imageinfo
|
||||||
run_once make_iso
|
run_once make_iso
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue