From 6fadf7e0e920eb93407d1ec860e95b8d211e8215 Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Mon, 12 Dec 2011 17:34:00 +0200 Subject: [PATCH] initial isohybrid support Here we go with postprocessing priorities along the way as ISO hybridization has to occur before implanting final MD5 sum (which must happen earlier than e.g. some external MD5SUM file generation). Unfortunately proper dependencies aren't applicable here (though I'd like to be proved wrong on this one). Please note that this needs propagator > 20101130-alt9 for automatic mode to work (has also been worked around in gfxboot case with design-bootloader-source-6.0-alt1). Thanks rom_as@ for asking about the hybrid image status and helping out with testing. --- doc/variables.txt | 5 +++++ features.in/isohybrid/README | 9 +++++++++ features.in/isohybrid/config.mk | 3 +++ features.in/isohybrid/lib/build-isohybrid.mk | 4 ++++ features.in/isomd5sum/config.mk | 2 +- features.in/isomd5sum/lib/build-isomd5sum.mk | 2 +- features.in/pack/config.mk | 4 +++- image.in/Makefile | 2 +- 8 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 features.in/isohybrid/README create mode 100644 features.in/isohybrid/config.mk create mode 100644 features.in/isohybrid/lib/build-isohybrid.mk diff --git a/doc/variables.txt b/doc/variables.txt index 7d4cb575..2db9681f 100644 --- a/doc/variables.txt +++ b/doc/variables.txt @@ -39,6 +39,11 @@ + значение: пусто (по умолчанию), 1 или 2 + см. ../lib/log.mk +- ISOHYBRID + + включает постобработку ISO-образа isohybrid + + значение: пусто (по умолчанию) либо любая строка + + см. ../features.in/pack/config.mk + - NICE + понижает нагрузку системы сборочной задачей + значение: пусто (по умолчанию) либо любая строка diff --git a/features.in/isohybrid/README b/features.in/isohybrid/README new file mode 100644 index 00000000..2d2480ec --- /dev/null +++ b/features.in/isohybrid/README @@ -0,0 +1,9 @@ +Эта фича производит постобработку ISO-образа утилитой isohybrid +с целью обеспечения возможности его загрузки как с CD/DVD, +так и с USB-флэшки. + +Можно указать в цепочке зависимостей дистрибутива явно с тем, +чтобы гарантировать гибридный вид образа; в экспериментальном +порядке сделана возможность запросить включение этой фичи при +сборке конфигурации произвольного дистрибутива +(ISOHYBRID=1, см. ../pack/config.mk). diff --git a/features.in/isohybrid/config.mk b/features.in/isohybrid/config.mk new file mode 100644 index 00000000..eb597003 --- /dev/null +++ b/features.in/isohybrid/config.mk @@ -0,0 +1,3 @@ +use/isohybrid: + @$(call add_feature) + @$(call add,POSTPROCESS_TARGETS,80isohybrid) diff --git a/features.in/isohybrid/lib/build-isohybrid.mk b/features.in/isohybrid/lib/build-isohybrid.mk new file mode 100644 index 00000000..a167224f --- /dev/null +++ b/features.in/isohybrid/lib/build-isohybrid.mk @@ -0,0 +1,4 @@ +CHROOT_PACKAGES += syslinux + +postprocess-80isohybrid: + @isohybrid "$(IMAGEDIR)/$(IMAGE_OUTFILE)" diff --git a/features.in/isomd5sum/config.mk b/features.in/isomd5sum/config.mk index be87053c..dc33899c 100644 --- a/features.in/isomd5sum/config.mk +++ b/features.in/isomd5sum/config.mk @@ -1,3 +1,3 @@ use/isomd5sum: @$(call add_feature) - @$(call add,POSTPROCESS_TARGETS,isomd5sum) + @$(call add,POSTPROCESS_TARGETS,90isomd5sum) diff --git a/features.in/isomd5sum/lib/build-isomd5sum.mk b/features.in/isomd5sum/lib/build-isomd5sum.mk index 6deba1b4..3baecc5a 100644 --- a/features.in/isomd5sum/lib/build-isomd5sum.mk +++ b/features.in/isomd5sum/lib/build-isomd5sum.mk @@ -1,4 +1,4 @@ CHROOT_PACKAGES += isomd5sum -postprocess-isomd5sum: +postprocess-90isomd5sum: @implantisomd5 "$(IMAGEDIR)/$(IMAGE_OUTFILE)" diff --git a/features.in/pack/config.mk b/features.in/pack/config.mk index 74dd2ed9..521b52f7 100644 --- a/features.in/pack/config.mk +++ b/features.in/pack/config.mk @@ -3,7 +3,9 @@ DISTRO_EXTS := .iso use/pack: @$(call add_feature) -use/pack/iso: use/pack boot/isolinux +# conventional ISO9660 image hybridization +# for direct bootable usbflash imaging +use/pack/iso: use/pack boot/isolinux $(ISOHYBRID:%=use/isohybrid) ifeq (distro,$(IMAGE_CLASS)) @$(call set,IMAGE_PACKTYPE,isoboot) else diff --git a/image.in/Makefile b/image.in/Makefile index f3ffe34c..0b4011c6 100644 --- a/image.in/Makefile +++ b/image.in/Makefile @@ -47,7 +47,7 @@ pack-image: imagedir imagedir: @mkdir -p "$(IMAGEDIR)" -postprocess: $(addprefix postprocess-,$(POSTPROCESS_TARGETS)) +postprocess: | $(addprefix postprocess-,$(sort $(POSTPROCESS_TARGETS))) @OUTPATH="$(IMAGEDIR)/$(IMAGE_OUTFILE)"; \ echo "** image: $$OUTPATH" >&2 && \ ln -sf "$(IMAGE_OUTFILE)" "$(IMAGEDIR)/$(IMAGE_LINK)" && \