Gentoo Archives: gentoo-dev

From: Mart Raudsepp <leio@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Informations about Systemd Stage3 Image and Systemd profile
Date: Mon, 23 Oct 2017 10:45:42
Message-Id: 1508755529.15629.1.camel@gentoo.org
In Reply to: [gentoo-dev] Informations about Systemd Stage3 Image and Systemd profile by Geaaru
1 Ühel kenal päeval, P, 22.10.2017 kell 21:41, kirjutas Geaaru:
2 > Hi,
3 > i'm trying to review some docker image based of Stage3 systemd image
4 > for Sabayon Os. I see that currently also when it is used
5 > default/linux/amd64/13.0/systemd profile there is a dependency to
6 > openrc package.
7 >
8 > This means that on daily gentoo-stage3-systemd image /sbin/init
9 > binary
10 > is not a link to systemd service.
11 >
12 > I think that this is result of the dependency to sys-apps/openrc
13 > inside
14 > file  /usr/portage/profiles/base/packages.
15 >
16 > So, my first question is why dependency to openrc is not inserted to
17 > a
18 > specific profile and so when is configured a systemd profile is
19 > possible prepare a pure systemd environment without openrc package ?
20 >
21 > Maybe, the main reason could be related to a problem on describe this
22 > on ebuild ? Because if openrc is not present is preferable sysv-utils
23 > use flag ?
24 >
25 > For both arm and amd64 I remove automatically this dependency after
26 > portage sync to rebuild a pure systemd environment and I haven't
27 > issues.
28 >
29 > I know that another workaround about this is configure kernel init
30 > option to force use of systemd binary but this is not possible for
31 > docker/lxc/lxd image without force lxc.cmd.init option.
32
33 USE=sysv-utils seems to just be to use systemd halt/poweroff etc
34 binaries/symlinks, instead of sysvinit. It also happens to provide a
35 /sbin/init symlink, as otherwise none would exist (as with that USE,
36 sysvinit is blocked from being installed). All the documentation says
37 to set init kernel command line, or use dracut, with which systemd
38 already starts on its own or something. E.g,
39 https://wiki.gentoo.org/wiki/Systemd#GRUB_2
40
41 If for docker you need something else, you can consider migrating the
42 images to USE=sysvinit, which can be troublesome if you need to keep
43 openrc for dependency resolution (I believe the work towards gentoo-
44 functions for non-openrc gentoo stuff is ongoing and hopefully soon
45 fully finished), or maybe you use dracut there too as initramfs, so it
46 presumably wouldn't matter, if that doc is right?
47 Or there's something to improve in packages for this use case, but this
48 might be easier once gentoo-functions is fully baked..
49
50
51 Mart

Replies