From 52f68973188d3cc7b0968f88a31c05795a166d37 Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Thu, 10 Nov 2011 21:15:50 +0200 Subject: [PATCH] initial isomd5sum feature This is a base for "media check" to become available: using this feature will implant a checksum into the image so that it can be verified during install. Also added a test/demo distro/live-isomd5sum target. For real distros an alterator module is probably due. --- conf.d/live.mk | 3 +++ features.in/isomd5sum/README | 3 +++ features.in/isomd5sum/config.mk | 3 +++ features.in/isomd5sum/lib/build-isomd5sum.mk | 4 ++++ image.in/Makefile | 2 +- 5 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 features.in/isomd5sum/README create mode 100644 features.in/isomd5sum/config.mk create mode 100644 features.in/isomd5sum/lib/build-isomd5sum.mk diff --git a/conf.d/live.mk b/conf.d/live.mk index bcea2424..0807db2d 100644 --- a/conf.d/live.mk +++ b/conf.d/live.mk @@ -5,6 +5,9 @@ distro/live: distro/.base use/live/base use/power/acpi/cpufreq distro/rescue: distro/.base use/rescue use/syslinux/ui-menu distro/dos: distro/.init use/dos use/syslinux/ui-menu +distro/live-isomd5sum: distro/.base use/live/base use/isomd5sum + @$(call add,LIVE_PACKAGES,livecd-isomd5sum) + distro/live-builder: distro/.base sub/main \ use/live/base use/dev/mkimage use/power/acpi/button @$(call add,LIVE_LISTS,$(call tags,base && (server || builder))) diff --git a/features.in/isomd5sum/README b/features.in/isomd5sum/README new file mode 100644 index 00000000..ea61a5bd --- /dev/null +++ b/features.in/isomd5sum/README @@ -0,0 +1,3 @@ +Эта фича конфигурирует внедрение контрольной суммы в образ +инсталятора после его сборки с целью проверки целостности +на ранней стадии установки. diff --git a/features.in/isomd5sum/config.mk b/features.in/isomd5sum/config.mk new file mode 100644 index 00000000..f0999e5a --- /dev/null +++ b/features.in/isomd5sum/config.mk @@ -0,0 +1,3 @@ +use/isomd5sum: + @$(call add,FEATURES,isomd5sum) + @$(call add,POSTPROCESS_TARGETS,isomd5sum) diff --git a/features.in/isomd5sum/lib/build-isomd5sum.mk b/features.in/isomd5sum/lib/build-isomd5sum.mk new file mode 100644 index 00000000..6deba1b4 --- /dev/null +++ b/features.in/isomd5sum/lib/build-isomd5sum.mk @@ -0,0 +1,4 @@ +CHROOT_PACKAGES += isomd5sum + +postprocess-isomd5sum: + @implantisomd5 "$(IMAGEDIR)/$(IMAGE_OUTFILE)" diff --git a/image.in/Makefile b/image.in/Makefile index 733af6b3..f3ffe34c 100644 --- a/image.in/Makefile +++ b/image.in/Makefile @@ -47,7 +47,7 @@ pack-image: imagedir imagedir: @mkdir -p "$(IMAGEDIR)" -postprocess: +postprocess: $(addprefix postprocess-,$(POSTPROCESS_TARGETS)) @OUTPATH="$(IMAGEDIR)/$(IMAGE_OUTFILE)"; \ echo "** image: $$OUTPATH" >&2 && \ ln -sf "$(IMAGE_OUTFILE)" "$(IMAGEDIR)/$(IMAGE_LINK)" && \