tagged lists again

These feel quite interesting but not that obvious yet...
This commit is contained in:
Michael Shigorin 2010-09-08 21:37:51 +03:00
parent 2cc81b7e75
commit c36b4df23e
11 changed files with 299 additions and 29 deletions

View File

@ -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" \

View File

@ -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
$(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+)

View File

@ -1,26 +1,2 @@
# 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))))

26
pkg/lists/Makefile Normal file
View File

@ -0,0 +1,26 @@
# 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))))

View File

@ -0,0 +1,6 @@
# compression
cpio
p7zip
tar
unzip
zip

View File

@ -0,0 +1,9 @@
# kernel/firmware
firmware-ipw2100
firmware-ipw2200
firmware-iwl3945
firmware-iwl4965
firmware-iwl5000
firmware-acx100
firmware-prism54
firmware-rt73

View File

@ -0,0 +1,10 @@
# disk tools
eject
hdparm
lvm2
mdadm
mtools
ntfs-3g
sfdisk
usbutils
xfsprogs

View File

@ -0,0 +1,18 @@
# network tools
curl
elinks
etcnet
hostinfo
iptables
iputils
lftp
mailx
netcat
netlist
openssh-clients
rsync
traceroute
vlan-utils
ntpdate
tcpdump
bridge-utils

View File

@ -0,0 +1,116 @@
# 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

View File

@ -0,0 +1,59 @@
# 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

View File

@ -0,0 +1,37 @@
# 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