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