initial groups support/selection

...along with obituary fixes.
This commit is contained in:
Michael Shigorin 2010-09-16 13:01:32 +03:00
parent c8b578dd9a
commit 30bb813793
27 changed files with 202 additions and 7 deletions

View File

@ -47,6 +47,9 @@ distro/server-light: distro/server-base use/hdt
$(call set,BRANDING,sisyphus-server-light)
$(call add,DISK_LISTS,kernel-wifi)
$(call add,BASE_LISTS,$(call tags,base server))
$(call add,GROUPS,dns-server http-server ftp-server kvm-server)
$(call add,GROUPS,ipmi mysql-server dhcp-server mail-server)
$(call add,GROUPS,monitoring diag-tools)
# FIXME: this belongs to bootsplash feature
#use/bootsplash:

View File

@ -27,11 +27,11 @@ disk-info:
@[ -s files/.disk/commit ] || rm files/.disk/commit
# see also alterator-pkg (backend3/pkg-install)
# FIXME: groups unmerged, and only .base hardwired in
# FIXME: if we copy --as-needed, maybe just tar . ?
metadata:
@mkdir -p files/Metadata
@rm -f files/Metadata/pkg-groups.tar
@tar -cvf files/Metadata/pkg-groups.tar \
tar -cvf files/Metadata/pkg-groups.tar \
-C $(PKGDIR) \
$(shell echo $(call list,.base) | sed 's,$(PKGDIR)/*,,g')
$$(echo $(call list,.base) $(call list,$(GROUPS)) $(call group,$(GROUPS)) | sed 's,$(PKGDIR)/*,,g')

View File

@ -3,3 +3,5 @@ PKGDIR=$(GLOBAL_BUILDDIR)/pkg
# prefix pkglist name with its directory to form a path
list = $(1:%=$(PKGDIR)/lists/%)
# prefix/suffix group name to form a path
group = $(1:%=$(PKGDIR)/groups/%.directory)

View File

@ -1,2 +1,4 @@
all:
$(MAKE) -C lists BUILDDIR=$(BUILDDIR)
for dir in lists groups; do \
$(MAKE) -C $$dir BUILDDIR=$(BUILDDIR); \
done

11
pkg.in/groups/Makefile Normal file
View File

@ -0,0 +1,11 @@
# copy package lists referenced in distro configuration
# over to build dir
include $(BUILDDIR)/.config.mk
all: debug
@mkdir -p $(BUILDDIR)/pkg/groups \
&& cp -at $(BUILDDIR)/pkg/groups/ -- $(addsuffix .directory,$(GROUPS))
debug:
@echo "** GROUPS: $(GROUPS)"

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Type=Directory
Name=DHCP Server
X-Alterator-PackageList=dhcp-server
X-Alterator-Required=no
Name[ru_RU]=Сервер DHCP
Categories=Server;Networking

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Type=Directory
Name=Diagnostic tools
X-Alterator-PackageList=diag-tools
X-Alterator-Required=no
Name[ru_RU]=Утилиты для диагностики
Categories=Server;Diagnostics
# NB: as the list may expand, skip adding Networking

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Type=Directory
Name=DNS Server
X-Alterator-PackageList=dns-server
X-Alterator-Required=no
Name[ru_RU]=Сервер DNS
Categories=Server;Networking

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Type=Directory
Name=FTP Server
X-Alterator-PackageList=ftp-server
X-Alterator-Required=no
Name[ru_RU]=Сервер ftp
Categories=Server;Networking

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Type=Directory
Name=HTTP Server (Apache2,PHP)
X-Alterator-PackageList=http-server
X-Alterator-Required=no
Name[ru_RU]=Сервер HTTP (Apache2,PHP)
Categories=Server;Networking

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Type=Directory
Name=IPMI tools
X-Alterator-PackageList=ipmi
X-Alterator-Required=no
Name[ru_RU]=Утилиты для поддержки IPMI
Categories=Server;IPMI

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Type=Directory
Name=Virtualization over kvm
X-Alterator-PackageList=kvm-server
X-Alterator-Required=no
Name[ru_RU]=Сервер виртуализации kvm
Categories=Server;Virtualization

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Type=Directory
Name=Mail Server (SMTP, IMAP, POP3)
X-Alterator-PackageList=mail-server
X-Alterator-Required=no
Name[ru_RU]=Почтовый сервер (SMTP, IMAP, POP3)
Categories=Server;Networking

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Type=Directory
Name=Monitoring
X-Alterator-PackageList=monitoring
X-Alterator-Required=no
Name[ru_RU]=Средства мониторинга системы
Categories=Server;Monitoring

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Type=Directory
Name=MySQL Server
X-Alterator-PackageList=mysql-server
X-Alterator-Required=no
Name[ru_RU]=Сервер MySQL
Categories=Server;Networking

View File

@ -10,7 +10,7 @@ all: prep debug
$(if $(filter environment% file,$(origin $V)),\
$(shell cp --parents -at $(BUILDDIR)/pkg/lists/ \
-- $(value $V))))
@cp -a .base $(BUILDDIR)/pkg/lists/
@cp -a .base $(GROUPS) $(BUILDDIR)/pkg/lists/
# moving this into 'all' spoils execution order (clobbers results)
prep:
@ -24,3 +24,5 @@ debug:
$(filter %_LISTS,$(sort $(.VARIABLES))), \
$(if $(filter environment% file,$(origin $V)),\
$(warning $V=$(value $V))))
@echo "** LISTS: -- see above"
@echo "** GROUPS: $(GROUPS)"

1
pkg.in/lists/dhcp-server Normal file
View File

@ -0,0 +1 @@
dhcp-server

11
pkg.in/lists/diag-tools Normal file
View File

@ -0,0 +1,11 @@
# diagnostic tools (see also disk-server-light.in)
dsniff
iftop
lft
mtr
nmap
scanssh
tcptraceroute
telnet
whois

3
pkg.in/lists/dns-server Normal file
View File

@ -0,0 +1,3 @@
bind
bind-control
bind-utils

2
pkg.in/lists/ftp-server Normal file
View File

@ -0,0 +1,2 @@
vsftpd
xinetd

33
pkg.in/lists/http-server Normal file
View File

@ -0,0 +1,33 @@
apache2
apache2-mod_php5
php5
php5-cgi
php5-curl
php5-dba
php5-dbase
php5-dom
php5-eaccelerator
php5-exif
php5-facedetect
php5-fileinfo
php5-gd2
php5-imagick2
php5-imap
php5-ldap
php5-mbstring
php5-mcrypt
php5-memcache
php5-mhash
php5-mime_magic
php5-mysql
php5-pgsql
php5-rrdtool
php5-suhosin
php5-xmlrpc
php5-xsl
php5-zip
MySQL-bench
MySQL-client
MySQL-htmlhelp
MySQL-server-perl

4
pkg.in/lists/ipmi Normal file
View File

@ -0,0 +1,4 @@
freeipmi-bmc-watchdog
ipmitool
freeipmi-doc
freeipmi

4
pkg.in/lists/kvm-server Normal file
View File

@ -0,0 +1,4 @@
kvm
qemu
libvirt
mkve

2
pkg.in/lists/mail-server Normal file
View File

@ -0,0 +1,2 @@
dovecot
postfix-dovecot

18
pkg.in/lists/monitoring Normal file
View File

@ -0,0 +1,18 @@
monit
# pull in subpackages which shouldn't toss
# lots of extra dependencies into an image
collectd
collectd-apache
collectd-bind
collectd-cgi
collectd-curl
collectd-dbi
collectd-ipmi
collectd-libvirt
collectd-mysql
collectd-nginx
collectd-openvz
collectd-ping
collectd-rrdtool
collectd-sensors

View File

@ -0,0 +1,6 @@
MySQL-bench
MySQL-client
MySQL-server
MySQL-htmlhelp
MySQL-server-perl

View File

@ -10,18 +10,19 @@ include $(GLOBAL_BUILDDIR)/.config.mk
CHROOT_PACKAGES = apt-utils rsync
PACKAGES_EXPAND_METHOD=regexp
# TODO: map() list() onto these
IMAGE_PACKAGES = $(call list,.base) \
$(COMMON_PACKAGES) \
$(MAIN_PACKAGES) \
$(call list,$(BASE_LISTS)) \
$(call list,$(DISK_LISTS))
$(call list,$(DISK_LISTS)) \
$(call list,$(GROUPS))
MKI_DESTDIR = ALTLinux/RPMS.main
MKI_PACK_RESULTS = data
include $(MKIMAGE_PREFIX)/targets.mk
# TODO: pkg groups
all: debug copy-packages pack-image
debug: