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