Gentoo Archives: gentoo-dev

From: Geaaru <geaaru@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Informations about Systemd Stage3 Image and Systemd profile
Date: Mon, 23 Oct 2017 11:30:43
Message-Id: 1508758234.3113.7.camel@gmail.com
In Reply to: Re: [gentoo-dev] Informations about Systemd Stage3 Image and Systemd profile by Mart Raudsepp
1 Hi,
2
3 thanks for reply.
4
5 Yeah, I know that through bootstrap command I can force a different
6 init binary as describe on gentoo wiki. It is equal also for LXD/LXC
7 containers.
8
9 But there are three different arguments to handle:
10
11 1) Currently if I want compile a pure systemd environment without
12 openrc it is needed change profile/base/packages (or mask package
13 openrc).
14 I think that this could be fixed now that gentoo-functions package fix
15 bug about /lib/gentoo/functions.sh.
16
17 2) I think that on a systemd pure environment could be correct that
18 /sbin/init is a link to systemd so it isn't needed force init argument
19 from kernel argument and/or on LXC/LXD through lxd.init.cmd option.
20 This can be done with step of point 1 and with use of sys-utils use
21 flag on systemd package. This is not mandatory, it is only a preference
22 .
23 For example, Sabayon adopt this solution on install systemd package.
24 Could be correct enable sys-utils useflag on systemd package by default
25 on profile related with systemd ?
26
27 3) For users that want maintain netifrc with systemd as described by
28 robbat2 I think there is an issue on openrc or systemd ebuild.
29 When is installed openrc is not possible use sys-utils useflag on
30 systemd for conflicts on /sbin/init file, etc and FWIS it seems that
31 there aren't check about this.
32
33 FWIS I think that for point 1 we are ready.
34
35 G.
36
37 On Mon, 2017-10-23 at 13:45 +0300, Mart Raudsepp wrote:
38 > Ühel kenal päeval, P, 22.10.2017 kell 21:41, kirjutas Geaaru:
39 > > Hi,
40 > > i'm trying to review some docker image based of Stage3 systemd
41 > > image
42 > > for Sabayon Os. I see that currently also when it is used
43 > > default/linux/amd64/13.0/systemd profile there is a dependency to
44 > > openrc package.
45 > >
46 > > This means that on daily gentoo-stage3-systemd image /sbin/init
47 > > binary
48 > > is not a link to systemd service.
49 > >
50 > > I think that this is result of the dependency to sys-apps/openrc
51 > > inside
52 > > file  /usr/portage/profiles/base/packages.
53 > >
54 > > So, my first question is why dependency to openrc is not inserted
55 > > to
56 > > a
57 > > specific profile and so when is configured a systemd profile is
58 > > possible prepare a pure systemd environment without openrc package
59 > > ?
60 > >
61 > > Maybe, the main reason could be related to a problem on describe
62 > > this
63 > > on ebuild ? Because if openrc is not present is preferable sysv-
64 > > utils
65 > > use flag ?
66 > >
67 > > For both arm and amd64 I remove automatically this dependency after
68 > > portage sync to rebuild a pure systemd environment and I haven't
69 > > issues.
70 > >
71 > > I know that another workaround about this is configure kernel init
72 > > option to force use of systemd binary but this is not possible for
73 > > docker/lxc/lxd image without force lxc.cmd.init option.
74 >
75 > USE=sysv-utils seems to just be to use systemd halt/poweroff etc
76 > binaries/symlinks, instead of sysvinit. It also happens to provide a
77 > /sbin/init symlink, as otherwise none would exist (as with that USE,
78 > sysvinit is blocked from being installed). All the documentation says
79 > to set init kernel command line, or use dracut, with which systemd
80 > already starts on its own or something. E.g,
81 > https://wiki.gentoo.org/wiki/Systemd#GRUB_2
82 >
83 > If for docker you need something else, you can consider migrating the
84 > images to USE=sysvinit, which can be troublesome if you need to keep
85 > openrc for dependency resolution (I believe the work towards gentoo-
86 > functions for non-openrc gentoo stuff is ongoing and hopefully soon
87 > fully finished), or maybe you use dracut there too as initramfs, so
88 > it
89 > presumably wouldn't matter, if that doc is right?
90 > Or there's something to improve in packages for this use case, but
91 > this
92 > might be easier once gentoo-functions is fully baked..
93 >
94 >
95 > Mart
96 >