diff --git a/features.in/isomd5sum/README b/features.in/isomd5sum/README index ea61a5bd..39420d01 100644 --- a/features.in/isomd5sum/README +++ b/features.in/isomd5sum/README @@ -1,3 +1,4 @@ -Эта фича конфигурирует внедрение контрольной суммы в образ -инсталятора после его сборки с целью проверки целостности -на ранней стадии установки. +Эта фича конфигурировала экспериментальную проверку целостности носителя; +в настоящее время является устаревшей, см. features.in/mediacheck + +# TODO: DROP diff --git a/features.in/isomd5sum/config.mk b/features.in/isomd5sum/config.mk index dc33899c..ecc2e2e8 100644 --- a/features.in/isomd5sum/config.mk +++ b/features.in/isomd5sum/config.mk @@ -1,3 +1,2 @@ -use/isomd5sum: - @$(call add_feature) - @$(call add,POSTPROCESS_TARGETS,90isomd5sum) +use/isomd5sum: use/mediacheck + @$(warning deprecated, see mediacheck feature) diff --git a/features.in/mediacheck/README b/features.in/mediacheck/README new file mode 100644 index 00000000..f4d67136 --- /dev/null +++ b/features.in/mediacheck/README @@ -0,0 +1,6 @@ +Эта фича конфигурирует внедрение контрольной суммы в образ +инсталятора после его сборки с целью проверки целостности +на ранней стадии установки. + +NB: прототип, для реального использования надо сделать +микрообраз на основе stage2. diff --git a/features.in/mediacheck/config.mk b/features.in/mediacheck/config.mk new file mode 100644 index 00000000..50834920 --- /dev/null +++ b/features.in/mediacheck/config.mk @@ -0,0 +1,3 @@ +use/mediacheck: use/stage2 sub/stage2@mediacheck use/syslinux/mediacheck.cfg + @$(call add_feature) + @$(call add,POSTPROCESS_TARGETS,90mediacheck) diff --git a/features.in/isomd5sum/lib/89-isomd5sum.mk b/features.in/mediacheck/lib/89-mediacheck.mk similarity index 74% rename from features.in/isomd5sum/lib/89-isomd5sum.mk rename to features.in/mediacheck/lib/89-mediacheck.mk index 3baecc5a..9bd12547 100644 --- a/features.in/isomd5sum/lib/89-isomd5sum.mk +++ b/features.in/mediacheck/lib/89-mediacheck.mk @@ -1,4 +1,4 @@ CHROOT_PACKAGES += isomd5sum -postprocess-90isomd5sum: +postprocess-90mediacheck: @implantisomd5 "$(IMAGEDIR)/$(IMAGE_OUTFILE)" diff --git a/features.in/mediacheck/mediacheck/image-scripts.d/98-init-mediacheck b/features.in/mediacheck/mediacheck/image-scripts.d/98-init-mediacheck new file mode 100755 index 00000000..06d576ed --- /dev/null +++ b/features.in/mediacheck/mediacheck/image-scripts.d/98-init-mediacheck @@ -0,0 +1,3 @@ +#!/bin/sh +mv -f -- /etc/inittab.mediacheck /etc/inittab +:>/etc/rc.d/rc diff --git a/features.in/mediacheck/mediacheck/image-scripts.d/99-cleanup-all b/features.in/mediacheck/mediacheck/image-scripts.d/99-cleanup-all new file mode 100755 index 00000000..bfaab3b4 --- /dev/null +++ b/features.in/mediacheck/mediacheck/image-scripts.d/99-cleanup-all @@ -0,0 +1,8 @@ +#!/bin/sh +# everything needed should have been done within initrd when this boots + +rpm -e --nodeps apt libapt rpm librpmbuild librpm 2>/dev/null ||: +rm -rf /var/lib/apt /var/cache/apt /var/lib/rpm +rm -rf /lib/modules +rm -rf /usr/share +rm -rf /usr/lib*/{locale,perl*,python*} diff --git a/features.in/mediacheck/mediacheck/stage2cfg.mk b/features.in/mediacheck/mediacheck/stage2cfg.mk new file mode 100644 index 00000000..4a80e90a --- /dev/null +++ b/features.in/mediacheck/mediacheck/stage2cfg.mk @@ -0,0 +1,8 @@ +# stage2 mod: mediacheck single-purpose "live" image + +IMAGE_PACKAGES = startup-mediacheck + +MKI_PACK_RESULTS = squash:mediacheck + +debug:: + @echo "** mediacheck: IMAGE_PACKAGES: $(IMAGE_PACKAGES)"