initial init feature

This one is finally there and should help reduce the
systemd-induced mess in package lists and specifications.
This commit is contained in:
Michael Shigorin 2013-06-03 12:03:23 +04:00
parent f1a165bbd6
commit b337e72ead
13 changed files with 74 additions and 21 deletions

View File

@ -19,7 +19,7 @@ distro/.regular-base: distro/.regular-bare +vmguest +live \
# DE base target
# TODO: use/plymouth/live when luks+plymouth is done, see also #28255
distro/.regular-desktop: distro/.regular-base \
use/systemd use/syslinux/ui/gfxboot use/firmware/laptop use/efi/refind
use/syslinux/ui/gfxboot use/firmware/laptop use/efi/refind +systemd
@$(call add,LIVE_PACKAGES,fuse-exfat)
@$(call add,LIVE_LISTS,domain-client)
@$(call add,THE_BRANDING,bootloader)
@ -27,7 +27,8 @@ distro/.regular-desktop: distro/.regular-base \
distro/.regular-gtk: distro/.regular-desktop use/x11/lightdm/gtk +plymouth; @:
distro/regular-icewm: distro/.regular-base use/x11/lightdm/gtk +icewm
distro/regular-icewm: distro/.regular-base use/init/sysv \
use/x11/lightdm/gtk +icewm
@$(call add,LIVE_LISTS,$(call tags,regular icewm))
@$(call set,KFLAVOURS,un-def)

View File

@ -6,7 +6,7 @@ ifeq (distro,$(IMAGE_CLASS))
distro/syslinux-auto: distro/.init use/hdt use/syslinux/timeout/1; @:
distro/syslinux-noescape: distro/syslinux-auto use/syslinux/noescape.cfg; @:
distro/live-systemd: distro/.base use/live/base use/systemd; @:
distro/live-systemd: distro/.base use/live/base +systemd; @:
distro/live-plymouth: distro/.live-base use/plymouth/live; @:
distro/live-isomd5sum: distro/.base use/live/base use/isomd5sum
@ -26,7 +26,7 @@ distro/razorqt-kz: distro/regular-razorqt
@$(call set,GLOBAL_BOOT_LANG,kk_KZ)
@$(call add,LIVE_PACKAGES,hunspell-kk)
distro/server-systemd: distro/server-mini use/systemd
distro/server-systemd: distro/server-mini +systemd
@$(call set,KFLAVOURS,std-def)
distro/server-test: distro/server-mini use/relname
@ -42,7 +42,7 @@ distro/server-ovz-netinst: distro/.base sub/stage1 use/stage2 \
@$(call add,SYSLINUX_CFG,netinstall2)
distro/desktop-luks: distro/icewm use/luks; @:
distro/desktop-systemd: distro/icewm use/systemd; @:
distro/desktop-systemd: distro/icewm +systemd; @:
distro/desktop-plymouth: distro/icewm +plymouth; @:
distro/live-mate-systemd: distro/live-mate use/systemd use/live/install; @:
distro/server-efi: distro/server-mini use/efi/debug; @:

11
features.in/init/README Normal file
View File

@ -0,0 +1,11 @@
Эта фича определяет систему инициализации, которая будет использована
в пользовательской среде (livecd, установленный дистрибутив, vm).
Она не влияет на состав инсталятора и rescue-образа.
Обратите внимание: как и с use/bootloader/%, в силу особенностей make
переключение в каждую позицию возможно лишь один раз, далее эта цель
считается достигнутой и при последующих вызовах не отрабатывает.
См. тж.:
http://altlinux.org/sysvinit
http://altlinux.org/systemd

View File

@ -0,0 +1,14 @@
+sysvinit: use/init/sysv; @:
+systemd: use/init/systemd; @:
use/init:
@$(call add_feature)
@$(call add,THE_LISTS,$$(INIT_TYPE))
use/init/sysv: use/init
@$(call set,INIT_TYPE,sysvinit)
### i-f should be dropped as soon as rootfs scripts are effective there
use/init/systemd: use/init
@$(call set,INIT_TYPE,systemd)
@$(call add,BASE_PACKAGES,installer-feature-systemd-stage3)

View File

@ -0,0 +1,25 @@
#!/bin/sh
# the part below relates to systemd as init specifically
rpm -q systemd-sysvinit || exit 0
# file str [str...]
# NB: str is also treated as a regex,
# be careful if you copy the function
sub() {
local file="$1"
shift
for i in "$@"; do
grep -q "^$i" "$file" || echo "$i" >> "$file"
done
}
# tune make-initrd
sub /etc/initrd.mk 'FEATURES += systemd' 'MODULES_PRELOAD += autofs4'
# don't allow systemd to set LANG (see also #27408)
sub /etc/locale.conf 'LANG='
# aufs2 root is rw in reality; but don't bother if there's a record already
grep -q '[[:space:]]/[[:space:]]' /etc/fstab ||
sub /etc/fstab '/dev/root / auto defaults 0 0'

View File

@ -15,6 +15,6 @@ use/slinux: use/x11/xfce use/x11/gdm2.20
@$(call add,THE_LISTS,$(call tags,base l10n))
@$(call set,META_VOL_SET,Simply Linux)
use/slinux/full: use/isohybrid use/slinux use/systemd +wireless \
use/slinux/full: use/isohybrid use/slinux +systemd +wireless \
use/branding/complete use/x11/drm use/x11/3d-proprietary
@$(call add,THE_PACKAGES,apt-conf-sisyphus)

View File

@ -1,2 +1,2 @@
Эта фича заменяет в базовой системе sysvinit на systemd;
см. тж. http://www.altlinux.org/systemd
Эта фича заменяла в базовой системе sysvinit на systemd;
в настоящее время является устаревшей, см. ../init/

View File

@ -1,4 +1,3 @@
use/systemd:
use/systemd: use/init/systemd
@$(call add_feature)
@$(call add,COMMON_PACKAGES,systemd systemd-units systemd-sysvinit)
@$(call add,COMMON_PACKAGES,installer-feature-systemd-stage3 chkconfig)
@$(warning deprecated, see init feature)

View File

@ -1,4 +0,0 @@
#!/bin/sh
# Don't allow systemd to set LANG.
echo 'LANG=' >/etc/locale.conf

View File

@ -1,4 +0,0 @@
#!/bin/sh -efu
# aufs2 root is rw in reality
echo "/dev/root / auto defaults 0 0" >>/etc/fstab

View File

@ -10,9 +10,13 @@ ifeq (ve,$(IMAGE_CLASS))
ve/.bare: profile/bare
@$(call add,BASE_PACKAGES,basesystem)
# add those
ve/.base: ve/.bare
@$(call add,BASE_PACKAGES,etcnet apt)
# no "vzctl enter"
ve/bare: ve/.bare
@$(call add,BASE_PACKAGES,sysvinit etcnet apt)
ve/bare: ve/.base
@$(call add,BASE_PACKAGES,sysvinit)
# /dev/pty and friends start here
ve/base: ve/bare

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

@ -0,0 +1,4 @@
systemd
systemd-units
systemd-sysvinit
chkconfig

3
pkg.in/lists/sysvinit Normal file
View File

@ -0,0 +1,3 @@
sysvinit
sysklogd
interactivesystem