From ed7bf0db9f8827af9885a7a381ce6a946280f3e1 Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Mon, 26 Mar 2012 22:23:28 +0300 Subject: [PATCH] initial ISO9660 metadata support As was noted by Alexey Shabalin in libosinfo context, current ALT Linux images tend to lack ISO9660 metadata -- which they did have back in the day of Master 2.4. Please note that the data collection occurs this way due to mkimage's config.mk resetting the values to be empty; this was worked around by using another config file, $(BUILDDIR)lib/iso.mk, and including it later but that would require a separate target with per-target CONFIG variable which isn't elegant at all given the need to actually build up the metadata set. So the variables were changed (to be more readable anyways) and then proxied back to BOOT_*. This might be cleaned up some day after the inclusion order is tweaked or mkimage defaults get set-if-unset-yet (?=). --- features.in/build-distro/README | 3 ++- features.in/build-distro/lib/build-distro.mk | 12 +++++++++++- features.in/build-ve/README | 3 ++- features.in/dos/config.mk | 4 ++++ features.in/syslinux/config.mk | 1 + lib/distro.mk | 8 +++++++- 6 files changed, 27 insertions(+), 4 deletions(-) diff --git a/features.in/build-distro/README b/features.in/build-distro/README index 5fe49e35..d3827ef3 100644 --- a/features.in/build-distro/README +++ b/features.in/build-distro/README @@ -1,4 +1,5 @@ Эта фича конфигурирует создание образа дистрибутива, включая работу с субпрофилями -- которая сейчас нужна только дистрибутивным целям. -Дополняет финальную стадию сборки (lib/, scripts.d/). +Дополняет финальную стадию сборки (lib/, scripts.d/) +и тесно с ней связана. diff --git a/features.in/build-distro/lib/build-distro.mk b/features.in/build-distro/lib/build-distro.mk index 98c4c6ac..8dc188e8 100644 --- a/features.in/build-distro/lib/build-distro.mk +++ b/features.in/build-distro/lib/build-distro.mk @@ -4,7 +4,17 @@ # take the latter part SUBDIRS = $(notdir $(SUBPROFILES)) -BOOT_TYPE = isolinux +# proxy over the ISO metadata collected; see also genisoimagerc(5) +BOOT_SYSI := $(META_SYSTEM_ID) +BOOT_PUBL := $(META_PUBLISHER) +BOOT_PREP := $(META_PREPARER) +BOOT_APPI := $(META_APP_ID) +BOOT_VOLI := $(META_VOL_ID) +BOOT_VOLS := $(META_VOL_SET) +BOOT_BIBL := $(META_BIBLIO) +BOOT_ABST := $(META_ABSTRACT) + +BOOT_TYPE := isolinux # Metadata/ needed only for installers (and not for e.g. syslinux.iso) # FIXME: installable live needs it too, don't move to install2 feature diff --git a/features.in/build-ve/README b/features.in/build-ve/README index aa9949b3..26cd5f18 100644 --- a/features.in/build-ve/README +++ b/features.in/build-ve/README @@ -1,3 +1,4 @@ Эта фича конфигурирует создание образа виртуального окружения (VE). -Дополняет финальную стадию сборки (lib/, image-scripts.d/). +Дополняет финальную стадию сборки (lib/, image-scripts.d/) +и тесно с ней связана. diff --git a/features.in/dos/config.mk b/features.in/dos/config.mk index e63c5e24..cc6b43f3 100644 --- a/features.in/dos/config.mk +++ b/features.in/dos/config.mk @@ -1,5 +1,9 @@ +# tries to fill in ISO metadata in case it's the only inhabitant use/dos: use/syslinux @$(call add_feature) @$(call add,SYSLINUX_CFG,dos) @$(call add,SYSLINUX_FILES,/usr/lib/syslinux/memdisk) @$(call add,STAGE1_PACKAGES,make-freedos-floppy glibc-gconv-modules) + @$(call try,META_SYSTEM_ID,DOS) + @$(call try,META_VOL_ID,FreeDOS 2.88M) + @$(call try,META_VOL_SET,FreeDOS) diff --git a/features.in/syslinux/config.mk b/features.in/syslinux/config.mk index 31c0c253..879addbb 100644 --- a/features.in/syslinux/config.mk +++ b/features.in/syslinux/config.mk @@ -2,6 +2,7 @@ use/syslinux: sub/stage1 @$(call add_feature) @$(call add,STAGE1_PACKAGES,syslinux) + @$(call try,META_SYSTEM_ID,SYSLINUX) # UI is overwritten use/syslinux/ui-%: use/syslinux diff --git a/lib/distro.mk b/lib/distro.mk index 6177d069..831894de 100644 --- a/lib/distro.mk +++ b/lib/distro.mk @@ -16,12 +16,18 @@ boot/%: # fundamental targets -distro/.init: profile/bare; @: +distro/.init: profile/bare + @$(call try,META_PREPARER,mkimage-profiles) + @$(call try,META_APP_ID,$(IMAGE_NAME)) + @$(call set,META_PUBLISHER,ALT Linux Team) # NB: the last flavour in KFLAVOURS gets to be the default one; # the kernel packages regexp evaluation has to take place at build stage distro/.base: distro/.init @$(call set,KFLAVOURS,std-def) + @$(call set,META_SYSTEM_ID,LINUX) + @$(call set,META_VOL_ID,ALT Linux $(ARCH)) + @$(call set,META_VOL_SET,ALT Linux) # something marginally useful (as a network-only installer) # NB: doesn't carry stage3 thus cannot use/bootloader