mediacheck: the former isomd5sum

This one is quite different already and utility-based name
was pretty clumsy; meet the new feature and retire the old
experimental one.

Please note that quite aggressive cleanups are implemented
within this stage2-based subprofile for the simple reason
that it has a single task to do; nothing else is expected
to be configured into it for that matter.

This functionality asks to be further moved into initrd of course;
adding it there will take a few more decisions to be made, mostly
regarding user interaction in failure scenarios, and it looks like
mkimage will have to be patched in case this doesn't just go into
full.cz under some sort of conditional check.
This commit is contained in:
Michael Shigorin 2014-03-31 22:35:48 +04:00
parent 71db9c6701
commit f28a83cac6
8 changed files with 35 additions and 7 deletions

View File

@ -1,3 +1,4 @@
Эта фича конфигурирует внедрение контрольной суммы в образ
инсталятора после его сборки с целью проверки целостности
на ранней стадии установки.
Эта фича конфигурировала экспериментальную проверку целостности носителя;
в настоящее время является устаревшей, см. features.in/mediacheck
# TODO: DROP

View File

@ -1,3 +1,2 @@
use/isomd5sum:
@$(call add_feature)
@$(call add,POSTPROCESS_TARGETS,90isomd5sum)
use/isomd5sum: use/mediacheck
@$(warning deprecated, see mediacheck feature)

View File

@ -0,0 +1,6 @@
Эта фича конфигурирует внедрение контрольной суммы в образ
инсталятора после его сборки с целью проверки целостности
на ранней стадии установки.
NB: прототип, для реального использования надо сделать
микрообраз на основе stage2.

View File

@ -0,0 +1,3 @@
use/mediacheck: use/stage2 sub/stage2@mediacheck use/syslinux/mediacheck.cfg
@$(call add_feature)
@$(call add,POSTPROCESS_TARGETS,90mediacheck)

View File

@ -1,4 +1,4 @@
CHROOT_PACKAGES += isomd5sum
postprocess-90isomd5sum:
postprocess-90mediacheck:
@implantisomd5 "$(IMAGEDIR)/$(IMAGE_OUTFILE)"

View File

@ -0,0 +1,3 @@
#!/bin/sh
mv -f -- /etc/inittab.mediacheck /etc/inittab
:>/etc/rc.d/rc

View File

@ -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*}

View File

@ -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)"