From 7b76c7347218e86ee1bd9cb5e7dee86d45fb80ca Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Fri, 24 May 2013 17:29:44 +0400 Subject: [PATCH] install2: introduced +installer mixin This one is a part of a larger rewrite to move away from distro-centric build-up to configuration-centric one with the particular packaging being of secondary importance compared to actual functionality. --- conf.d/test.mk | 4 ++++ features.in/install2/README | 3 +++ features.in/install2/config.mk | 14 +++++++++++++- features.in/install2/install2/stage2cfg.mk | 4 ++++ lib/distro.mk | 9 ++------- 5 files changed, 26 insertions(+), 8 deletions(-) diff --git a/conf.d/test.mk b/conf.d/test.mk index b21078c7..85ca3db7 100644 --- a/conf.d/test.mk +++ b/conf.d/test.mk @@ -32,6 +32,10 @@ distro/server-systemd: distro/server-mini use/systemd distro/server-test: distro/server-mini use/relname @$(call set,RELNAME,Test-Server) +# something marginally useful (as a network-only installer) +# NB: doesn't carry stage3 thus cannot use/bootloader +distro/netinst: distro/.base use/install2/net; @: + # tiny network-only server-ovz installer (stage2 comes over net too) distro/server-ovz-netinst: distro/.base sub/stage1 use/stage2 \ use/syslinux/ui/menu use/syslinux/localboot.cfg use/memtest diff --git a/features.in/install2/README b/features.in/install2/README index 16141938..9f2fbd3d 100644 --- a/features.in/install2/README +++ b/features.in/install2/README @@ -2,6 +2,9 @@ специфическими для инсталяционного образа настройками и скриптовыми хуками. +Рекомендуется подключать при помощи +installer, чтобы обеспечить +включение типового набора связанных с инсталятором функций. + При добавлении скриптов в image-scripts.d/ следует позаботиться, чтобы в компактном livecd, которым является инсталятор, оказались нужные им утилиты (INSTALL2_PACKAGES). Перегружать его не следует, diff --git a/features.in/install2/config.mk b/features.in/install2/config.mk index 85e97f28..ccc74837 100644 --- a/features.in/install2/config.mk +++ b/features.in/install2/config.mk @@ -1,16 +1,28 @@ # alterator-based installer, second (livecd) stage + ++installer: use/install2/full; @: + use/install2: use/stage2 sub/stage2@install2 use/metadata use/cleanup/installer @$(call add_feature) + @$(call try,INSTALLER,altlinux-generic) # might be replaced later @$(call set,INSTALL2_PACKAGES,installer-distro-$$(INSTALLER)-stage2) @$(call add,INSTALL2_PACKAGES,branding-$$(BRANDING)-alterator) @$(call add,BASE_PACKAGES,branding-$$(BRANDING)-release) @$(call add,BASE_LISTS,$(call tags,basesystem)) @$(call xport,BASE_BOOTLOADER) +# doesn't use/install2/fs on purpose (at least so far) +use/install2/full: use/install2/packages use/install2/kms use/install2/kvm \ + use/syslinux/localboot.cfg use/syslinux/ui/menu; @: + +# stash local packages within installation media +use/install2/packages: use/install2 use/repo/main; @: + +# for alterator-pkg to use use/install2/net: use/install2 @$(call add,INSTALL2_PACKAGES,curl) -# modern free xorg drivers for mainstream hardware requires KMS support +# modern free xorg drivers for mainstream hardware require KMS support use/install2/kms: use/stage2/kms @$(call add,BASE_KMODULES_REGEXP,drm.*) diff --git a/features.in/install2/install2/stage2cfg.mk b/features.in/install2/install2/stage2cfg.mk index 327cf0bb..1ec3bdda 100644 --- a/features.in/install2/install2/stage2cfg.mk +++ b/features.in/install2/install2/stage2cfg.mk @@ -1,5 +1,9 @@ # stage2 mod: build install2 subprofile (installer "live" part) +ifndef INSTALLER +$(error install2 feature enabled but INSTALLER undefined) +endif + IMAGE_PACKAGES = $(INSTALL2_PACKAGES) \ udev e2fsprogs glibc-nss diff --git a/lib/distro.mk b/lib/distro.mk index 8f0b2f65..d28ad1db 100644 --- a/lib/distro.mk +++ b/lib/distro.mk @@ -28,12 +28,7 @@ distro/.base: distro/.init use/kernel @$(call set,META_VOL_ID,ALT Linux $(IMAGE_NAME)/$(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 -distro/installer: distro/.base use/syslinux/localboot.cfg \ - use/install2 use/install2/kms use/firmware use/install2/kvm - @$(call set,INSTALLER,altlinux-generic) - -distro/.installer: distro/installer use/bootloader/grub use/repo/main; @: +# this one should not be fundamental as it appears (think armh) +distro/.installer: distro/.base use/bootloader/grub +installer; @: endif