You need to sign in or sign up before continuing.
Commit c36b4df2 authored by Michael Shigorin's avatar Michael Shigorin

tagged lists again

These feel quite interesting but not that obvious yet...
parent 2cc81b7e
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
# #
# TODO; consider s/-name/-path/ # TODO; consider s/-name/-path/
[ -d pkg/lists ] && cd pkg/lists
find . $(sed \ find ${1:-tagged} $(sed \
-e "s,\([^&|! ()']\+\),-name *_\1_*,g" \ -e "s,\([^&|! ()']\+\),-name *_\1_*,g" \
-e "s, *&& *, -a ,g" \ -e "s, *&& *, -a ,g" \
-e "s, *|| *, -o ,g" \ -e "s, *|| *, -o ,g" \
......
...@@ -5,14 +5,25 @@ CONFIG = $(BUILDDIR)/.config.mk ...@@ -5,14 +5,25 @@ CONFIG = $(BUILDDIR)/.config.mk
# shell will get confused by ' or args get spammed with " # shell will get confused by ' or args get spammed with "
put = $(and $(1),$(put_body)) put = $(and $(1),$(put_body))
define put_body define put_body
@printf '%s\n' '$(1)#=- $@' >> "$(CONFIG)"; @printf '%s\n' '$(1)#=- $@' >> "$(CONFIG)"
@# TODO: maybe some more logging/tracing, otherwise inline this
endef endef
tags = $(shell echo "$(1)" | bin/tags2lists)
# request particular image subprofile inclusion # request particular image subprofile inclusion
sub/%: sub/%:
$(call put,SUBPROFILES+=$(@:sub/%=%)) $(call put,SUBPROFILES+=$(@:sub/%=%))
# package list names are relative to pkg/lists/
#
# $(VAR) will be substituted before writing them to $(CONFIG);
# $$(VAR) will remain unsubstituted util $(CONFIG) is included
# and their value requested (so the variable referenced
# can change its value during configuration _before_
# it's actually used)
#
# tags do boolean expressions: (tag1 && !(tag2 || tag3))
init: init:
@echo "** starting distro configuration build process" @echo "** starting distro configuration build process"
:> $(CONFIG) :> $(CONFIG)
...@@ -34,6 +45,7 @@ distro/server-light: distro/server-base use/bootsplash ...@@ -34,6 +45,7 @@ distro/server-light: distro/server-base use/bootsplash
$(call put,KFLAVOUR=ovz-smp) # override default $(call put,KFLAVOUR=ovz-smp) # override default
$(call put,BRANDING=sisyphus-server-light) $(call put,BRANDING=sisyphus-server-light)
$(call put,DISK_LISTS+=kernel-wifi) $(call put,DISK_LISTS+=kernel-wifi)
$(call put,BASE_LISTS+=$(call tags,base server))
use/memtest86: use/memtest86:
$(call put,COMMON_PACKAGES+=memtest86+) $(call put,COMMON_PACKAGES+=memtest86+)
......
# copy package lists referenced in distro configuration all:
# over to build dir $(MAKE) -C lists BUILDDIR=$(BUILDDIR)
include $(BUILDDIR)/.config.mk
.PHONY: pkgs
# env | sort -u | grep _LISTS | xargs cp
pkgs: prep test
@$(foreach V, \
$(filter %_LISTS,$(sort $(.VARIABLES))), \
$(if $(filter environment% file,$(origin $V)),\
$(shell cp -a $(addprefix lists/,$(value $V)) \
$(BUILDDIR)/pkg/lists/)))
@cp -a lists/.base $(BUILDDIR)/pkg/lists/
# moving this into pkgs spoils execution order (clobbers results)
prep:
mkdir -p $(BUILDDIR)/pkg/{lists,groups}
# dump *_LISTS variables' values
# TODO: consider GLOBAL_VERBOSE? (currently not coming with .config.mk)
test:
@$(foreach V, \
$(filter %_LISTS,$(sort $(.VARIABLES))), \
$(if $(filter environment% file,$(origin $V)),\
$(warning $V=$(value $V))))
# copy package lists referenced in distro configuration
# over to build dir
include $(BUILDDIR)/.config.mk
# env | sort -u | grep _LISTS | xargs cp
all: prep test
@$(foreach V, \
$(filter %_LISTS,$(sort $(.VARIABLES))), \
$(if $(filter environment% file,$(origin $V)),\
$(shell cp --parents -avt $(BUILDDIR)/pkg/lists/ \
-- $(value $V) >> $(BUILDDIR)/log 2>&1)))
@cp -av .base $(BUILDDIR)/pkg/lists/
# moving this into 'all' spoils execution order (clobbers results)
prep:
@mkdir -p $(BUILDDIR)/pkg/lists
# dump *_LISTS variables' values
# TODO: consider GLOBAL_VERBOSE? (currently not coming with .config.mk)
# (for cp -v then, too)
test:
@$(foreach V, \
$(filter %_LISTS,$(sort $(.VARIABLES))), \
$(if $(filter environment% file,$(origin $V)),\
$(warning $V=$(value $V))))
# compression
cpio
p7zip
tar
unzip
zip
# kernel/firmware
firmware-ipw2100
firmware-ipw2200
firmware-iwl3945
firmware-iwl4965
firmware-iwl5000
firmware-acx100
firmware-prism54
firmware-rt73
# disk tools
eject
hdparm
lvm2
mdadm
mtools
ntfs-3g
sfdisk
usbutils
xfsprogs
# network tools
curl
elinks
etcnet
hostinfo
iptables
iputils
lftp
mailx
netcat
netlist
openssh-clients
rsync
traceroute
vlan-utils
ntpdate
tcpdump
bridge-utils
# interactivesystem
anacron
apt-conf-@APTCONF_PACKAGE@
apt
glibc-gconv-modules
glibc-locales
glibc-nss
glibc-utils
interactivesystem
kbd
setarch
shadow-suite
#sound-scripts (hal required, using alsa-set-initial-mixer)
#alsa-set-initial-mixer
sysklogd
udev
# boot
bootsplash
lilo
memtest86+
# editor
vim-console
# network tools
curl
elinks
etcnet
hostinfo
iptables
iputils
lftp
mailx
netcat
netlist
openssh-clients
rsync
traceroute
vlan-utils
ntpdate
tcpdump
# disk tools
eject
hdparm
lvm2
mdadm
mtools
ntfs-3g
sfdisk
usbutils
xfsprogs
#printing
#printer-drivers-base
# servers
openssh-server
postfix
openntpd
# security
openssl
osec-mailreport
audit
# debug
strace
# alterator stage3
installer-@INSTALLER@-stage3
installer-feature-copy-udev-rules-stage3
installer-feature-setup-network-stage3
# ?
acpid
mkbootflash
rp-pppoe-base
# ldap
# nss_ldap
# pam_ldap
# haldbus :(
#hal
#dbus
# mc :(
mc
#alsa-utils
# kernel/firmware
firmware-ipw2100
firmware-ipw2200
firmware-iwl3945
firmware-iwl4965
firmware-iwl5000
firmware-acx100
firmware-prism54
firmware-rt73
lm_sensors
update-kernel
# compression
cpio
p7zip
tar
unzip
zip
bridge-utils
gpm
expect
# interactivesystem
#apache2
#indexhtml-OfficeServer
sudo
etcnet-defaults-server
# kernel and modules
# network tools
dhcpcd
bind-utils
# disk tools
jfsutils
reiserfsprogs
# servers
#dovecot
#postfix-dovecot
#httpd-alterator
# debug
tcpdump
# docs
man-pages
#indexhtml-@THEME@
#alt-docs-apache2
#docs-issue-school-server
# alterator
installer-feature-pxeboot-stage3
# office server
#alterator-fbi
alterator-dhcp
alterator-lilo
alterator-net-domain
alterator-net-eth
alterator-net-pppoe
alterator-net-pptp
alterator-net-openvpn
#publish-acc-to-console
quota
#installed-db-school-server
#moodle
#moodle-apache2
#moodle-local-mysql
#mediawiki-apache2
#nfs-clients
#nfs-server
bridge-utils
etckeeper
# interactivesystem
sudo
etcnet-defaults-server
# network tools
arpwatch
dhcpcd
bind
wireless-tools
# disk tools
jfsutils
reiserfsprogs
quota
# servers
dovecot
postfix-dovecot
nfs-server
#clients
nfs-clients
# debug
tcpdump
# docs
man-pages
#indexhtml-@THEME@
alt-docs-apache2
#docs-issue-school-server
# virt
vzctl
kvm
qemu-system
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment