These have appeared in desktop.mk, regular.mk, vm.mk over time, and there are two problems around. The minor one is that mixins have been introduced as handy reusable bits close in context of their use; this practically means that they fall under the same class restrictions as their parent targets, that is a mixin coming from regular.mk will only be available for "distro" IMAGE_CLASS, and so on. The major one is probably the worst design flaw in m-p: building images from ground up, where ground is a valid standalone buildable target as well. Life has shown that we rather want to build up images the other way around, choosing what essentials go in first and then fitting the fine details along with the packaging. The first sign of this difference appeared with ARMv7 Simply: we had a well-built configuration aiming for x86 ISO, still we needed roughly the same app/environment configuration put into armh disk image. Those platforms were different enough that we didn't actually plan shipping *lots* of distributions but the problem was clear, and it was much alike to the one that sprang m-p to life in the first place (when we had a range of "common" distros and needed to create and maintain a set of "school" ones that mostly had similar or even identical difference to their respective base ones -- and we couldn't do something like conf.d/p8.mk does now). So mixins are going to become the softer way to turn m-p's target configuration chain upside down to considerable extent: build up what you're going to mix into the various deliverables, and make it as portable across image classes, hardware platforms, repository branches as feasible so that total maintenance effort needed goes down or at least doesn't spike too bad. And here's the first strike at that.
46 lines
1.3 KiB
Makefile
46 lines
1.3 KiB
Makefile
# virtual machines
|
|
ifeq (vm,$(IMAGE_CLASS))
|
|
|
|
# NB: interactivesystem pulls in network-config-subsystem anyways
|
|
vm/bare: vm/.bare +sysvinit
|
|
@$(call add,BASE_PACKAGES,apt)
|
|
|
|
vm/systemd: vm/.bare +systemd
|
|
@$(call add,BASE_PACKAGES,apt)
|
|
|
|
# handle ROOTPW (through deflogin)
|
|
vm/net: vm/bare use/net-eth/dhcp use/net-ssh \
|
|
use/repo use/control/sudo-su use/deflogin
|
|
@$(call add,BASE_PACKAGES,su)
|
|
|
|
vm/systemd-net: vm/systemd use/net-eth/networkd-dhcp use/net-ssh \
|
|
use/repo use/control/sudo-su use/deflogin
|
|
@$(call add,BASE_PACKAGES,su)
|
|
|
|
# vm/net or vm/systemd-net
|
|
vm/cloud-systemd: vm/systemd-net mixin/cloud-init use/vmguest/kvm
|
|
@$(call add,DEFAULT_SERVICES_DISABLE,consolesaver)
|
|
@$(call set,KFLAVOURS,un-def)
|
|
@$(call add,THE_KMODULES,kdbus)
|
|
|
|
vm/cloud-sysv: vm/net mixin/cloud-init use/vmguest/kvm use/power/acpi/button; @:
|
|
|
|
# NB: use/x11 employs some installer-feature packages
|
|
vm/.desktop-bare: vm/net use/x11/xorg use/cleanup/installer use/repo; @:
|
|
|
|
vm/.desktop-base: vm/.desktop-bare \
|
|
use/deflogin/altlinuxroot use/x11-autologin; @:
|
|
|
|
vm/icewm: vm/.desktop-base mixin/icewm; @:
|
|
|
|
vm/icewm-setup: vm/.desktop-bare mixin/icewm use/oem use/x11-autostart
|
|
@$(call set,BRANDING,simply-linux)
|
|
@$(call add,THE_BRANDING,graphics)
|
|
@$(call add,THE_LISTS,$(call tags,base l10n))
|
|
|
|
# some arbitrary gigabyte
|
|
vm/vagrant-base: vm/net use/vagrant
|
|
@$(call set,VM_SIZE,10737418240)
|
|
|
|
endif
|