summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd_243.2.bb
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2019-12-09 16:44:01 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-28 23:25:41 +0000
commitad4bafd16558340200b7ba56573c5705ca0a751f (patch)
tree060cf640389a3213fcac25e8ccae457345359145 /meta/recipes-core/systemd/systemd_243.2.bb
parentba6d88d8fa7b7a82ad8e265ff6f590fe2d640d34 (diff)
downloadpoky-ad4bafd16558340200b7ba56573c5705ca0a751f.tar.gz
systemd: Rename the files instead of using PV
(From OE-Core rev: fb5491995ca2118bc52f8d73953f5531b91dd861) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd_243.2.bb')
-rw-r--r--meta/recipes-core/systemd/systemd_243.2.bb682
1 files changed, 682 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd_243.2.bb b/meta/recipes-core/systemd/systemd_243.2.bb
new file mode 100644
index 0000000000..ac7a5f86b3
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd_243.2.bb
@@ -0,0 +1,682 @@
1require systemd.inc
2
3PROVIDES = "udev"
4
5PE = "1"
6
7DEPENDS = "intltool-native gperf-native libcap util-linux"
8
9SECTION = "base/shell"
10
11inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages features_check
12
13# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
14# that we don't build both udev and systemd in world builds.
15REQUIRED_DISTRO_FEATURES = "systemd"
16
17SRC_URI += "file://touchscreen.rules \
18 file://00-create-volatile.conf \
19 file://init \
20 file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
21 file://0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
22 file://0003-implment-systemd-sysv-install-for-OE.patch \
23 file://0004-rules-whitelist-hd-devices.patch \
24 file://0005-rules-watch-metadata-changes-in-ide-devices.patch \
25 file://0001-unit-file.c-consider-symlink-on-filesystems-like-NFS.patch \
26 file://99-default.preset \
27 "
28
29# patches needed by musl
30SRC_URI_append_libc-musl = " ${SRC_URI_MUSL}"
31SRC_URI_MUSL = "\
32 file://0002-don-t-use-glibc-specific-qsort_r.patch \
33 file://0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch \
34 file://0004-add-fallback-parse_printf_format-implementation.patch \
35 file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \
36 file://0006-Include-netinet-if_ether.h.patch \
37 file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch \
38 file://0008-add-missing-FTW_-macros-for-musl.patch \
39 file://0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch \
40 file://0011-Use-uintmax_t-for-handling-rlim_t.patch \
41 file://0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \
42 file://0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \
43 file://0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
44 file://0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \
45 file://0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \
46 file://0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \
47 file://0020-missing_type.h-add-__compar_d_fn_t-definition.patch \
48 file://0021-avoid-redefinition-of-prctl_mm_map-structure.patch \
49 file://0024-test-json.c-define-M_PIl.patch \
50 file://0001-do-not-disable-buffer-in-writing-files.patch \
51 file://0002-src-login-brightness.c-include-sys-wait.h.patch \
52 file://0003-src-basic-copy.c-include-signal.h.patch \
53 file://0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch \
54 "
55
56PAM_PLUGINS = " \
57 pam-plugin-unix \
58 pam-plugin-loginuid \
59 pam-plugin-keyinit \
60"
61
62PACKAGECONFIG ??= " \
63 ${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux usrmerge polkit', d)} \
64 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
65 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
66 acl \
67 backlight \
68 binfmt \
69 gshadow \
70 hibernate \
71 hostnamed \
72 idn \
73 ima \
74 kmod \
75 localed \
76 logind \
77 machined \
78 myhostname \
79 networkd \
80 nss \
81 nss-mymachines \
82 nss-resolve \
83 quotacheck \
84 randomseed \
85 resolved \
86 set-time-epoch \
87 smack \
88 sysusers \
89 timedated \
90 timesyncd \
91 utmp \
92 vconsole \
93 xz \
94"
95
96PACKAGECONFIG_remove_libc-musl = " \
97 gshadow \
98 idn \
99 localed \
100 myhostname \
101 nss \
102 nss-mymachines \
103 nss-resolve \
104 resolved \
105 smack \
106 sysusers \
107 utmp \
108"
109
110# Use the upstream systemd serial-getty@.service and rely on
111# systemd-getty-generator instead of using the OE-core specific
112# systemd-serialgetty.bb - not enabled by default.
113PACKAGECONFIG[serial-getty-generator] = ""
114
115PACKAGECONFIG[acl] = "-Dacl=true,-Dacl=false,acl"
116PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit"
117PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false"
118PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false"
119PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2"
120PACKAGECONFIG[cgroupv2] = "-Ddefault-hierarchy=unified,-Ddefault-hierarchy=hybrid"
121PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false"
122PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup"
123PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus"
124PACKAGECONFIG[efi] = "-Defi=true,-Defi=false"
125PACKAGECONFIG[gnu-efi] = "-Dgnu-efi=true -Defi-libdir=${STAGING_LIBDIR} -Defi-includedir=${STAGING_INCDIR}/efi,-Dgnu-efi=false,gnu-efi"
126PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils"
127PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
128# Sign the journal for anti-tampering
129PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt"
130PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls"
131PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false"
132PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false"
133PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false"
134PACKAGECONFIG[idn] = "-Didn=true,-Didn=false"
135PACKAGECONFIG[ima] = "-Dima=true,-Dima=false"
136# importd requires curl/xz/zlib/bzip2/gcrypt
137PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false"
138# Update NAT firewall rules
139PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables"
140PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl"
141PACKAGECONFIG[kmod] = "-Dkmod=true,-Dkmod=false,kmod"
142PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false,,ldconfig"
143PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn"
144PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false"
145PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false"
146PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4"
147PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false"
148PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
149PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd"
150PACKAGECONFIG[myhostname] = "-Dnss-myhostname=true,-Dnss-myhostname=false,,libnss-myhostname"
151PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false"
152PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false"
153PACKAGECONFIG[nss-mymachines] = "-Dnss-mymachines=true,-Dnss-mymachines=false"
154PACKAGECONFIG[nss-resolve] = "-Dnss-resolve=true,-Dnss-resolve=false"
155PACKAGECONFIG[openssl] = "-Dopenssl=true,-Dopenssl=false,openssl"
156PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}"
157PACKAGECONFIG[pcre2] = "-Dpcre2=true,-Dpcre2=false,libpcre2"
158PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false"
159PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false"
160PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode"
161PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false"
162PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false"
163PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false"
164PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false"
165# libseccomp is found in meta-security
166PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp"
167PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell"
168PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false"
169PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false"
170# When enabled use reproducble build timestamp if set as time epoch,
171# or build time if not. When disabled, time epoch is unset.
172def build_epoch(d):
173 epoch = d.getVar('SOURCE_DATE_EPOCH') or "-1"
174 return '-Dtime-epoch=%d' % int(epoch)
175PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0"
176PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false"
177PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false"
178PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true"
179PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true"
180PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false"
181PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind"
182PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup"
183# Verify keymaps on locale change
184PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon"
185PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz"
186PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib"
187
188# Helper variables to clarify locations. This mirrors the logic in systemd's
189# build system.
190rootprefix ?= "${root_prefix}"
191rootlibdir ?= "${base_libdir}"
192rootlibexecdir = "${rootprefix}/lib"
193
194# This links udev statically with systemd helper library.
195# Otherwise udev package would depend on systemd package (which has the needed shared library),
196# and always pull it into images.
197EXTRA_OEMESON += "-Dlink-udev-shared=false"
198
199EXTRA_OEMESON += "-Dnobody-user=nobody \
200 -Dnobody-group=nobody \
201 -Drootlibdir=${rootlibdir} \
202 -Drootprefix=${rootprefix} \
203 -Dsysvrcnd-path=${sysconfdir} \
204 -Ddefault-locale=C \
205 "
206
207# Hardcode target binary paths to avoid using paths from sysroot
208EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \
209 -Dkmod-path=${base_bindir}/kmod \
210 -Dmount-path=${base_bindir}/mount \
211 -Dquotacheck-path=${sbindir}/quotacheck \
212 -Dquotaon-path=${sbindir}/quotaon \
213 -Dsulogin-path=${base_sbindir}/sulogin \
214 -Dnologin-path=${base_sbindir}/nologin \
215 -Dumount-path=${base_bindir}/umount"
216
217do_install() {
218 meson_do_install
219 install -d ${D}/${base_sbindir}
220 if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
221 # Provided by a separate recipe
222 rm ${D}${systemd_unitdir}/system/serial-getty* -f
223 fi
224
225 # Provide support for initramfs
226 [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
227 [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
228
229 install -d ${D}${sysconfdir}/udev/rules.d/
230 install -d ${D}${sysconfdir}/tmpfiles.d
231 install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
232
233 install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
234
235 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
236 install -d ${D}${sysconfdir}/init.d
237 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
238 sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
239 fi
240
241 chown root:systemd-journal ${D}/${localstatedir}/log/journal
242
243 # Delete journal README, as log can be symlinked inside volatile.
244 rm -f ${D}/${localstatedir}/log/README
245
246 # journal-remote creates this at start
247 rm -rf ${D}/${localstatedir}/log/journal/remote
248
249 install -d ${D}${systemd_unitdir}/system/graphical.target.wants
250 install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
251 install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
252 install -d ${D}${systemd_unitdir}/system/reboot.target.wants
253 install -d ${D}${systemd_unitdir}/system/rescue.target.wants
254
255 # Create symlinks for systemd-update-utmp-runlevel.service
256 if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
257 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
258 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
259 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
260 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
261 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
262 fi
263
264 # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
265 # for existence else it fails
266 if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
267 ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)}
268 fi
269 if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
270 echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
271 echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
272 echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
273 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
274 else
275 sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
276 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
277 fi
278 install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
279
280 # If polkit is setup fixup permissions and ownership
281 if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
282 if [ -d ${D}${datadir}/polkit-1/rules.d ]; then
283 chmod 700 ${D}${datadir}/polkit-1/rules.d
284 chown polkitd:root ${D}${datadir}/polkit-1/rules.d
285 fi
286 fi
287
288 # create link for existing udev rules
289 ln -s ${base_bindir}/udevadm ${D}${base_sbindir}/udevadm
290
291 # duplicate udevadm for postinst script
292 install -d ${D}${libexecdir}
293 ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm
294
295 # install default policy for presets
296 # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto
297 install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset
298
299 # We use package postinsts for the hwdb update, as the update service is
300 # easily triggered for no reason and will slow down boots.
301 find ${D} -name systemd-hwdb-update.service -delete
302}
303
304python populate_packages_prepend (){
305 systemdlibdir = d.getVar("rootlibdir")
306 do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
307}
308PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*"
309
310PACKAGES =+ "\
311 ${PN}-gui \
312 ${PN}-vconsole-setup \
313 ${PN}-initramfs \
314 ${PN}-analyze \
315 ${PN}-kernel-install \
316 ${PN}-rpm-macros \
317 ${PN}-binfmt \
318 ${PN}-zsh-completion \
319 ${PN}-container \
320 ${PN}-journal-gatewayd \
321 ${PN}-journal-upload \
322 ${PN}-journal-remote \
323 ${PN}-extra-utils \
324"
325
326SUMMARY_${PN}-container = "Tools for containers and VMs"
327DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines."
328
329SUMMARY_${PN}-journal-gatewayd = "HTTP server for journal events"
330DESCRIPTION_${PN}-journal-gatewayd = "systemd-journal-gatewayd serves journal events over the network. Clients must connect using HTTP. The server listens on port 19531 by default."
331
332SUMMARY_${PN}-journal-upload = "Send journal messages over the network"
333DESCRIPTION_${PN}-journal-upload = "systemd-journal-upload uploads journal entries to a specified URL."
334
335SUMMARY_${PN}-journal-remote = "Receive journal messages over the network"
336DESCRIPTION_${PN}-journal-remote = "systemd-journal-remote is a command to receive serialized journal events and store them to journal files."
337
338SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)} \
339 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \
340 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \
341 ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \
342"
343SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
344
345USERADD_PACKAGES = "${PN} ${PN}-extra-utils \
346 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gateway', '', d)} \
347 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \
348 ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \
349"
350GROUPADD_PARAM_${PN} = "-r systemd-journal"
351USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"
352USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
353USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}"
354USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
355USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
356USERADD_PARAM_${PN}-extra-utils = "--system -d / -M --shell /bin/nologin systemd-bus-proxy"
357USERADD_PARAM_${PN}-journal-gateway = "--system -d / -M --shell /bin/nologin systemd-journal-gateway"
358USERADD_PARAM_${PN}-journal-remote = "--system -d / -M --shell /bin/nologin systemd-journal-remote"
359USERADD_PARAM_${PN}-journal-upload = "--system -d / -M --shell /bin/nologin systemd-journal-upload"
360
361FILES_${PN}-analyze = "${bindir}/systemd-analyze"
362
363FILES_${PN}-initramfs = "/init"
364RDEPENDS_${PN}-initramfs = "${PN}"
365
366FILES_${PN}-gui = "${bindir}/systemadm"
367
368FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
369 ${systemd_unitdir}/system/systemd-vconsole-setup.service \
370 ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
371
372RDEPENDS_${PN}-kernel-install += "bash"
373FILES_${PN}-kernel-install = "${bindir}/kernel-install \
374 ${sysconfdir}/kernel/ \
375 ${exec_prefix}/lib/kernel \
376 "
377FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
378 "
379
380FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions"
381
382FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
383 ${exec_prefix}/lib/binfmt.d \
384 ${rootlibexecdir}/systemd/systemd-binfmt \
385 ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
386 ${systemd_unitdir}/system/systemd-binfmt.service"
387RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
388
389RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
390
391
392FILES_${PN}-journal-gatewayd = "${rootlibexecdir}/systemd/systemd-journal-gatewayd \
393 ${systemd_system_unitdir}/systemd-journal-gatewayd.service \
394 ${systemd_system_unitdir}/systemd-journal-gatewayd.socket \
395 ${systemd_system_unitdir}/sockets.target.wants/systemd-journal-gatewayd.socket \
396 ${datadir}/systemd/gatewayd/browse.html \
397 "
398SYSTEMD_SERVICE_${PN}-journal-gatewayd = "systemd-journal-gatewayd.socket"
399
400FILES_${PN}-journal-upload = "${rootlibexecdir}/systemd/systemd-journal-upload \
401 ${systemd_system_unitdir}/systemd-journal-upload.service \
402 ${sysconfdir}/systemd/journal-upload.conf \
403 "
404SYSTEMD_SERVICE_${PN}-journal-upload = "systemd-journal-upload.service"
405
406FILES_${PN}-journal-remote = "${rootlibexecdir}/systemd/systemd-journal-remote \
407 ${sysconfdir}/systemd/journal-remote.conf \
408 ${systemd_system_unitdir}/systemd-journal-remote.service \
409 ${systemd_system_unitdir}/systemd-journal-remote.socket \
410 "
411SYSTEMD_SERVICE_${PN}-remote = "systemd-journal-remote.socket"
412
413
414FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
415 ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
416 ${sysconfdir}/systemd/system/multi-user.target.wants/machines.target \
417 ${base_bindir}/machinectl \
418 ${bindir}/systemd-nspawn \
419 ${nonarch_libdir}/systemd/import-pubring.gpg \
420 ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \
421 ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \
422 ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \
423 ${systemd_system_unitdir}/machines.target.wants/var-lib-machines.mount \
424 ${systemd_system_unitdir}/remote-fs.target.wants/var-lib-machines.mount \
425 ${systemd_system_unitdir}/machine.slice \
426 ${systemd_system_unitdir}/machines.target \
427 ${systemd_system_unitdir}/org.freedesktop.import1.busname \
428 ${systemd_system_unitdir}/org.freedesktop.machine1.busname \
429 ${systemd_system_unitdir}/systemd-importd.service \
430 ${systemd_system_unitdir}/systemd-machined.service \
431 ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \
432 ${systemd_system_unitdir}/var-lib-machines.mount \
433 ${rootlibexecdir}/systemd/systemd-import \
434 ${rootlibexecdir}/systemd/systemd-importd \
435 ${rootlibexecdir}/systemd/systemd-machined \
436 ${rootlibexecdir}/systemd/systemd-pull \
437 ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
438 ${systemd_system_unitdir}/systemd-nspawn@.service \
439 ${libdir}/libnss_mymachines.so.2 \
440 ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
441 ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
442 ${datadir}/dbus-1/system.d/org.freedesktop.import1.conf \
443 ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \
444 ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
445 ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
446 "
447
448RRECOMMENDS_${PN}-container += "\
449 ${PN}-journal-upload \
450 ${PN}-journal-remote \
451 ${PN}-journal-gatewayd \
452 "
453
454FILES_${PN}-extra-utils = "\
455 ${base_bindir}/systemd-escape \
456 ${base_bindir}/systemd-inhibit \
457 ${bindir}/systemd-detect-virt \
458 ${bindir}/systemd-path \
459 ${bindir}/systemd-run \
460 ${bindir}/systemd-cat \
461 ${bindir}/systemd-delta \
462 ${bindir}/systemd-cgls \
463 ${bindir}/systemd-cgtop \
464 ${bindir}/systemd-stdio-bridge \
465 ${base_bindir}/systemd-ask-password \
466 ${base_bindir}/systemd-tty-ask-password-agent \
467 ${systemd_unitdir}/system/systemd-ask-password-console.path \
468 ${systemd_unitdir}/system/systemd-ask-password-console.service \
469 ${systemd_unitdir}/system/systemd-ask-password-wall.path \
470 ${systemd_unitdir}/system/systemd-ask-password-wall.service \
471 ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
472 ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \
473 ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
474 ${rootlibexecdir}/systemd/systemd-resolve-host \
475 ${rootlibexecdir}/systemd/systemd-ac-power \
476 ${rootlibexecdir}/systemd/systemd-activate \
477 ${rootlibexecdir}/systemd/systemd-bus-proxyd \
478 ${systemd_unitdir}/system/systemd-bus-proxyd.service \
479 ${systemd_unitdir}/system/systemd-bus-proxyd.socket \
480 ${rootlibexecdir}/systemd/systemd-socket-proxyd \
481 ${rootlibexecdir}/systemd/systemd-reply-password \
482 ${rootlibexecdir}/systemd/systemd-sleep \
483 ${rootlibexecdir}/systemd/system-sleep \
484 ${systemd_unitdir}/system/systemd-hibernate.service \
485 ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
486 ${systemd_unitdir}/system/systemd-suspend.service \
487 ${systemd_unitdir}/system/sleep.target \
488 ${rootlibexecdir}/systemd/systemd-initctl \
489 ${systemd_unitdir}/system/systemd-initctl.service \
490 ${systemd_unitdir}/system/systemd-initctl.socket \
491 ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
492 ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
493 ${rootlibexecdir}/systemd/systemd-cgroups-agent \
494"
495
496CONFFILES_${PN} = "${sysconfdir}/systemd/coredump.conf \
497 ${sysconfdir}/systemd/journald.conf \
498 ${sysconfdir}/systemd/logind.conf \
499 ${sysconfdir}/systemd/system.conf \
500 ${sysconfdir}/systemd/user.conf \
501 ${sysconfdir}/systemd/resolved.conf \
502 ${sysconfdir}/systemd/timesyncd.conf \
503"
504
505FILES_${PN} = " ${base_bindir}/* \
506 ${base_sbindir}/shutdown \
507 ${base_sbindir}/halt \
508 ${base_sbindir}/poweroff \
509 ${base_sbindir}/runlevel \
510 ${base_sbindir}/telinit \
511 ${base_sbindir}/resolvconf \
512 ${base_sbindir}/reboot \
513 ${base_sbindir}/init \
514 ${datadir}/dbus-1/services \
515 ${datadir}/dbus-1/system-services \
516 ${datadir}/polkit-1 \
517 ${datadir}/${BPN} \
518 ${datadir}/factory \
519 ${sysconfdir}/dbus-1/ \
520 ${sysconfdir}/modules-load.d/ \
521 ${sysconfdir}/pam.d/ \
522 ${sysconfdir}/sysctl.d/ \
523 ${sysconfdir}/systemd/ \
524 ${sysconfdir}/tmpfiles.d/ \
525 ${sysconfdir}/xdg/ \
526 ${sysconfdir}/init.d/README \
527 ${sysconfdir}/resolv-conf.systemd \
528 ${sysconfdir}/X11/xinit/xinitrc.d/* \
529 ${rootlibexecdir}/systemd/* \
530 ${systemd_unitdir}/* \
531 ${base_libdir}/security/*.so \
532 /cgroup \
533 ${bindir}/systemd* \
534 ${bindir}/busctl \
535 ${bindir}/coredumpctl \
536 ${bindir}/localectl \
537 ${bindir}/hostnamectl \
538 ${bindir}/resolvectl \
539 ${bindir}/timedatectl \
540 ${bindir}/bootctl \
541 ${bindir}/kernel-install \
542 ${exec_prefix}/lib/tmpfiles.d/*.conf \
543 ${exec_prefix}/lib/systemd \
544 ${exec_prefix}/lib/modules-load.d \
545 ${exec_prefix}/lib/sysctl.d \
546 ${exec_prefix}/lib/sysusers.d \
547 ${exec_prefix}/lib/environment.d \
548 ${localstatedir} \
549 ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \
550 ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \
551 ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \
552 ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \
553 ${nonarch_base_libdir}/modprobe.d/systemd.conf \
554 ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
555 ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \
556 ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \
557 ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
558 ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
559 ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
560 ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \
561 ${datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf \
562 ${datadir}/dbus-1/system.d/org.freedesktop.portable1.conf \
563 "
564
565FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
566
567RDEPENDS_${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) util-linux-agetty util-linux-fsck"
568RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
569RDEPENDS_${PN} += "volatile-binds update-rc.d"
570
571RRECOMMENDS_${PN} += "systemd-extra-utils \
572 systemd-compat-units udev-hwdb \
573 e2fsprogs-e2fsck \
574 kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
575 os-release \
576 systemd-conf \
577"
578
579INSANE_SKIP_${PN} += "dev-so libdir"
580INSANE_SKIP_${PN}-dbg += "libdir"
581INSANE_SKIP_${PN}-doc += " libdir"
582
583PACKAGES =+ "udev udev-hwdb"
584
585RPROVIDES_udev = "hotplug"
586
587RDEPENDS_udev-hwdb += "udev"
588
589FILES_udev += "${base_sbindir}/udevd \
590 ${rootlibexecdir}/systemd/network/99-default.link \
591 ${rootlibexecdir}/systemd/systemd-udevd \
592 ${rootlibexecdir}/udev/accelerometer \
593 ${rootlibexecdir}/udev/ata_id \
594 ${rootlibexecdir}/udev/cdrom_id \
595 ${rootlibexecdir}/udev/collect \
596 ${rootlibexecdir}/udev/findkeyboards \
597 ${rootlibexecdir}/udev/keyboard-force-release.sh \
598 ${rootlibexecdir}/udev/keymap \
599 ${rootlibexecdir}/udev/mtd_probe \
600 ${rootlibexecdir}/udev/scsi_id \
601 ${rootlibexecdir}/udev/v4l_id \
602 ${rootlibexecdir}/udev/keymaps \
603 ${rootlibexecdir}/udev/rules.d/*.rules \
604 ${sysconfdir}/udev \
605 ${sysconfdir}/init.d/systemd-udevd \
606 ${systemd_unitdir}/system/*udev* \
607 ${systemd_unitdir}/system/*.wants/*udev* \
608 ${base_bindir}/udevadm \
609 ${base_sbindir}/udevadm \
610 ${libexecdir}/${MLPREFIX}udevadm \
611 ${datadir}/bash-completion/completions/udevadm \
612 "
613
614FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
615
616RCONFLICTS_${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}"
617
618INITSCRIPT_PACKAGES = "udev"
619INITSCRIPT_NAME_udev = "systemd-udevd"
620INITSCRIPT_PARAMS_udev = "start 03 S ."
621
622python __anonymous() {
623 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
624 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
625}
626
627python do_warn_musl() {
628 if d.getVar('TCLIBC') == "musl":
629 bb.warn("Using systemd with musl is not recommended since it is not supported upstream and some patches are known to be problematic.")
630}
631addtask warn_musl before do_configure
632
633ALTERNATIVE_${PN} = "halt reboot shutdown poweroff runlevel ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}"
634
635ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
636ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
637ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"
638
639ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
640ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
641ALTERNATIVE_PRIORITY[halt] ?= "300"
642
643ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
644ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
645ALTERNATIVE_PRIORITY[reboot] ?= "300"
646
647ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
648ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
649ALTERNATIVE_PRIORITY[shutdown] ?= "300"
650
651ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
652ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
653ALTERNATIVE_PRIORITY[poweroff] ?= "300"
654
655ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
656ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
657ALTERNATIVE_PRIORITY[runlevel] ?= "300"
658
659pkg_postinst_${PN}_libc-glibc () {
660 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
661 -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
662 -i $D${sysconfdir}/nsswitch.conf
663}
664
665pkg_prerm_${PN}_libc-glibc () {
666 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
667 -e '/^hosts:/s/\s*myhostname//' \
668 -i $D${sysconfdir}/nsswitch.conf
669}
670
671PACKAGE_WRITE_DEPS += "qemu-native"
672pkg_postinst_udev-hwdb () {
673 if test -n "$D"; then
674 $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX}
675 else
676 udevadm hwdb --update
677 fi
678}
679
680pkg_prerm_udev-hwdb () {
681 rm -f $D${sysconfdir}/udev/hwdb.bin
682}