kernel day

- drop hardwired kernel flavour from pkglists
- today's std-ng lacks aufs, let's switch to un-def
- second assault at KERNEL_PACKAGES_REGEXP
- re-introduced kpackages (builds ok)

PS: base lists: switch to grub, add udev, cleanup
This commit is contained in:
Michael Shigorin 2010-10-29 12:11:03 +03:00
parent 62f7ad5bcc
commit 16e763e9ea
12 changed files with 47 additions and 22 deletions

View File

@ -30,23 +30,26 @@ distro/.init:
@$(call try,MKIMAGE_PREFIX,/usr/share/mkimage) @$(call try,MKIMAGE_PREFIX,/usr/share/mkimage)
@$(call try,GLOBAL_VERBOSE,) @$(call try,GLOBAL_VERBOSE,)
# 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 sub/stage1 use/syslinux use/syslinux/localboot.cfg distro/.base: distro/.init sub/stage1 use/syslinux use/syslinux/localboot.cfg
@$(call set,KFLAVOUR,std-def)
@$(call set,IMAGE_INIT_LIST,+branding-$$(BRANDING)-release) @$(call set,IMAGE_INIT_LIST,+branding-$$(BRANDING)-release)
@$(call set,BRANDING,altlinux-desktop) ### @$(call set,BRANDING,altlinux-desktop) ###
@$(call set,KERNEL_PACKAGES,kernel-image-$$(KFLAVOUR)) @$(call set,KFLAVOURS,std-def)
@$(call set,KMODULES,drm)
distro/installer: distro/.base sub/install2 use/syslinux/install2.cfg distro/installer: distro/.base sub/install2 use/syslinux/install2.cfg
@#$(call put,BRANDING=altlinux-sisyphus) ### @#$(call put,BRANDING=altlinux-sisyphus) ###
@$(call set,BASE_LISTS,base kernel) @$(call set,BASE_LISTS,base)
@$(call set,INSTALL2_PACKAGES,installer-distro-server-light-stage2) ### @$(call set,INSTALL2_PACKAGES,installer-distro-server-light-stage2) ###
distro/server-base: distro/installer sub/main use/syslinux/ui-menu use/memtest distro/server-base: distro/installer sub/main use/syslinux/ui-menu use/memtest
@$(call add,BASE_LISTS,server-base kernel-server) @$(call add,BASE_LISTS,server-base)
distro/server-light: distro/server-base use/hdt distro/server-light: distro/server-base use/hdt
@$(call set,KFLAVOUR,ovz-smp) # override default
@$(call set,BRANDING,sisyphus-server-light) @$(call set,BRANDING,sisyphus-server-light)
@$(call set,KFLAVOURS,ovz-smp el-smp) # override default
@$(call add,KMODULES,igb ipset kvm ndiswrapper pf_ring rtl8192 xtables-addons)
@$(call add,DISK_LISTS,kernel-wifi) @$(call add,DISK_LISTS,kernel-wifi)
@$(call add,BASE_LISTS,$(call tags,base server)) @$(call add,BASE_LISTS,$(call tags,base server))
@$(call add,GROUPS,dns-server http-server ftp-server kvm-server) @$(call add,GROUPS,dns-server http-server ftp-server kvm-server)
@ -54,7 +57,7 @@ distro/server-light: distro/server-base use/hdt
@$(call add,GROUPS,monitoring diag-tools) @$(call add,GROUPS,monitoring diag-tools)
distro/minicd: distro/server-base distro/minicd: distro/server-base
@$(call set,KFLAVOUR,std-ng) # we might need the most recent drivers @$(call set,KFLAVOURS,un-def) # we might need the most recent drivers (NB: std-ng lacks aufs2)
@$(call add,MAIN_PACKAGES,etcnet-full) @$(call add,MAIN_PACKAGES,etcnet-full)
@$(call set,BRANDING,sisyphus-server-light) @$(call set,BRANDING,sisyphus-server-light)

View File

@ -40,4 +40,5 @@ define log_body
{ grep -q '^# $@$$' "$(CONFIG)" || printf '# %s\n' '$@' >> "$(CONFIG)"; } { grep -q '^# $@$$' "$(CONFIG)" || printf '# %s\n' '$@' >> "$(CONFIG)"; }
endef endef
# convert tag list into a list of relative package list paths
tags = $(addprefix tagged/,$(shell echo "$(1)" | bin/tags2lists)) tags = $(addprefix tagged/,$(shell echo "$(1)" | bin/tags2lists))

View File

@ -1,4 +1,5 @@
include functions.mk include functions.mk
include $(GLOBAL_BUILDDIR)/functions.mk
include $(GLOBAL_BUILDDIR)/.config.mk include $(GLOBAL_BUILDDIR)/.config.mk
include $(MKIMAGE_PREFIX)/config.mk include $(MKIMAGE_PREFIX)/config.mk
@ -42,6 +43,9 @@ disk-info:
metadata: metadata:
@mkdir -p files/Metadata @mkdir -p files/Metadata
@rm -f files/Metadata/pkg-groups.tar @rm -f files/Metadata/pkg-groups.tar
# FIXME: KERNEL_PACKAGES deprecated, this is broken now! -- or not?..
@echo "DEBUG: image.in/Makefile" >&2
@echo -e "\n# auto-added in image.in/Makefile\n$(call kpackages)" >> $(call list,.base)
tar -cvf files/Metadata/pkg-groups.tar \ tar -cvf files/Metadata/pkg-groups.tar \
-C $(PKGDIR) \ -C $(PKGDIR) \
$$(echo $(call list,.base) $(call list,$(GROUPS)) $(call group,$(GROUPS)) | sed 's,$(PKGDIR)/*,,g') $$(echo $(call list,.base) $(call list,$(GROUPS)) $(call group,$(GROUPS)) | sed 's,$(PKGDIR)/*,,g')

View File

@ -5,3 +5,13 @@ list = $(1:%=$(PKGDIR)/lists/%)
# prefix/suffix group name to form a path # prefix/suffix group name to form a path
group = $(1:%=$(PKGDIR)/groups/%.directory) group = $(1:%=$(PKGDIR)/groups/%.directory)
# map first argument (a function) onto second one (an argument list)
map = $(foreach a,$(2),$(call $(1),$(a)))
# kernel package list generation; see also #24669
NULL :=
SPACE := $(NULL) # the officially documented way of getting a space
# NB: sort() shouldn't be applied here as kernel image order matters
list2re = $(subst $(SPACE),|,$(strip $(1)))
kpackages = ^kernel-(image|modules-($(call list2re,$(KMODULES))))-($(call list2re,$(KFLAVOURS)))$$

View File

@ -1,11 +1,11 @@
basesystem basesystem
#kernel-image-std-def udev
interactivesystem interactivesystem
apt-conf-sisyphus apt-conf-sisyphus
apt apt
alterator-lilo alterator-grub
alterator-root alterator-root
alterator-users alterator-users
alterator-net-eth alterator-net-eth

View File

@ -1,5 +1 @@
interactivesystem interactivesystem
apt-conf-sisyphus
apt
alterator-lilo

View File

@ -1 +0,0 @@
kernel-image-std-def

View File

@ -1 +0,0 @@
#kernel-modules-igb-std-def

View File

@ -1,2 +0,0 @@
basesystem
kernel-image-std-def

View File

@ -4,8 +4,13 @@ include $(GLOBAL_BUILDDIR)/.config.mk
include $(GLOBAL_BUILDDIR)/functions.mk include $(GLOBAL_BUILDDIR)/functions.mk
include $(MKIMAGE_PREFIX)/config.mk include $(MKIMAGE_PREFIX)/config.mk
IMAGE_PACKAGES = $(KERNEL_PACKAGES) \ # FIXME: hardwired
$(COMMON_PACKAGES) \ #IMAGE_PACKAGES_REGEXP = $(call kimage)
# NB: due to #24669, IMAGE_PACKAGES_REGEXP does need quoting here
IMAGE_PACKAGES_REGEXP = "$(call kpackages)"
#IMAGE_PACKAGES_REGEXP = "$(KERNEL_PACKAGES_REGEXP)"
#IMAGE_PACKAGES_REGEXP = ^kernel-image-(std-def|el-smp)$$
IMAGE_PACKAGES = $(COMMON_PACKAGES) \
$(INSTALL2_PACKAGES) \ $(INSTALL2_PACKAGES) \
./packages ./packages

View File

@ -9,9 +9,14 @@ include $(MKIMAGE_PREFIX)/config.mk
CHROOT_PACKAGES = apt-utils rsync CHROOT_PACKAGES = apt-utils rsync
PACKAGES_EXPAND_METHOD=regexp PACKAGES_EXPAND_METHOD=regexp
# FIXME: hardwired
#IMAGE_PACKAGES_REGEXP = "$(KERNEL_PACKAGES_REGEXP)"
# NB: due to #24669, IMAGE_PACKAGES_REGEXP does need quoting here
IMAGE_PACKAGES_REGEXP = "$(call kpackages)"
#IMAGE_PACKAGES_REGEXP = $(call kimage) $(call kmodules)
#IMAGE_PACKAGES_REGEXP = ^kernel-image-(std-def|el-smp)$$ ^kernel-modules-(ipset|kvm|ndiswrapper|pf_ring|xtables-addons)-(el-smp|ovz-smp)$$
# TODO: map() list() onto these # TODO: map() list() onto these
IMAGE_PACKAGES = $(KERNEL_PACKAGES) \ IMAGE_PACKAGES = $(call list,.base) \
$(call list,.base) \
$(COMMON_PACKAGES) \ $(COMMON_PACKAGES) \
$(MAIN_PACKAGES) \ $(MAIN_PACKAGES) \
$(call list,$(BASE_LISTS)) \ $(call list,$(BASE_LISTS)) \

View File

@ -2,7 +2,13 @@ include $(GLOBAL_BUILDDIR)/.config.mk
include $(GLOBAL_BUILDDIR)/functions.mk include $(GLOBAL_BUILDDIR)/functions.mk
include $(MKIMAGE_PREFIX)/config.mk include $(MKIMAGE_PREFIX)/config.mk
CHROOT_PACKAGES = $(KERNEL_PACKAGES) $(STAGE1_PACKAGES) $(COMMON_PACKAGES) # FIXME: hardwired
#CHROOT_PACKAGES_REGEXP = $(call kimage)
# NB: see #24669, CHROOT_PACKAGES_REGEXP does NOT need quoting here
CHROOT_PACKAGES_REGEXP = $(call kpackages)
#CHROOT_PACKAGES_REGEXP = "$(KERNEL_PACKAGES_REGEXP)"
#CHROOT_PACKAGES_REGEXP = ^kernel-image-(std-def|el-smp)$$ ^kernel-modules-(ipset|kvm|ndiswrapper|pf_ring|xtables-addons)-(el-smp|ovz-smp)$$
CHROOT_PACKAGES = $(STAGE1_PACKAGES) $(COMMON_PACKAGES)
MKI_PACK_RESULTS = data MKI_PACK_RESULTS = data
### ###
@ -14,4 +20,3 @@ COPY_TREE = ./files
include $(MKIMAGE_PREFIX)/targets.mk include $(MKIMAGE_PREFIX)/targets.mk
all: build-propagator copy-tree copy-isolinux run-scripts pack-image all: build-propagator copy-tree copy-isolinux run-scripts pack-image