summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd_250.3.bb
diff options
context:
space:
mode:
authorRichard Neill <richard.neill@arm.com>2022-03-16 10:37:24 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-17 16:44:33 +0000
commit2dfe8c74cf25446002147f5c34b59f04e5e23718 (patch)
treea400da0d49a586c6b2a649fc1875e1baa7062498 /meta/recipes-core/systemd/systemd_250.3.bb
parent197c379d2bae0bb279154e050122516116ae385c (diff)
downloadpoky-2dfe8c74cf25446002147f5c34b59f04e5e23718.tar.gz
systemd: Update 250.3 -> 250.4
The following security and bug-fix patches are included as part of the 250.4 update: c6603da3ad boot: Properly check status code of console_key_read 2198c08d07 core: really skip automatic restart when a JOB_STOP job is pending 367041af81 pid1: set SYSTEMD_NSS_DYNAMIC_BYPASS=1 env var for dbus-daemon 160eeab224 virt: Fix Xen Dom0 detection logic to no longer report as VM 514a4c051c network: bridge: fix endian of vlan protocol 4dbc210124 resolve: fix possible memleak d82bd80cf4 resolve: fix potential memleak and use-after-free dcba78244e util: another set of CVE-2021-4034 assert()s 74dfb51f70 sd-dhcp6-client: fix sending prefix delegation request during rebind df59c65a23 mkdir: allow to create directory whose path contains symlink ae95ca27be sd-dhcp-lease: fix memleak 2b04d3b3fc sd-dhcp-lease: fix reading unaligned memory 1ef56ad928 network: xfrm: refuse zero interface ID 7dc0f80588 sd-dhcp-lease: fix a memory leak in dhcp_lease_parse_search_domains 426807c54b sd-dhcp-lease: fix an infinite loop found by the fuzzer 0456e3aaaa oomd: fix race with path unavailability when killing cgroups As the following two patches: 0001-mkdir-allow-to-create-directory-whose-path-contains-.patch 0001-src-fundamental-list-fundamental_source_paths-using-.patch have been merged in 250.4 or replaced, remove them. (From OE-Core rev: ccf7b8948f0c02e28e8a0151c48bf169d3fc36c8) Signed-off-by: Richard Neill <richard.neill@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd_250.3.bb')
-rw-r--r--meta/recipes-core/systemd/systemd_250.3.bb802
1 files changed, 0 insertions, 802 deletions
diff --git a/meta/recipes-core/systemd/systemd_250.3.bb b/meta/recipes-core/systemd/systemd_250.3.bb
deleted file mode 100644
index 31c5c55c3f..0000000000
--- a/meta/recipes-core/systemd/systemd_250.3.bb
+++ /dev/null
@@ -1,802 +0,0 @@
1require systemd.inc
2
3PROVIDES = "udev"
4
5PE = "1"
6
7DEPENDS = "intltool-native gperf-native libcap util-linux python3-jinja2-native"
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 ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://org.freedesktop.hostname1_no_polkit.conf', '', d)} \
20 ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://00-hostnamed-network-user.conf', '', d)} \
21 file://init \
22 file://99-default.preset \
23 file://systemd-pager.sh \
24 file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
25 file://0003-implment-systemd-sysv-install-for-OE.patch \
26 file://0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch \
27 file://0001-test-parse-argument-Include-signal.h.patch \
28 file://0001-mkdir-allow-to-create-directory-whose-path-contains-.patch \
29 file://0029-network-enable-KeepConfiguration-when-running-on-net.patch \
30 "
31
32# patches needed by musl
33SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}"
34SRC_URI_MUSL = "\
35 file://0002-don-t-use-glibc-specific-qsort_r.patch \
36 file://0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch \
37 file://0004-add-fallback-parse_printf_format-implementation.patch \
38 file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \
39 file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \
40 file://0008-add-missing-FTW_-macros-for-musl.patch \
41 file://0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch \
42 file://0010-Use-uintmax_t-for-handling-rlim_t.patch \
43 file://0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \
44 file://0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \
45 file://0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
46 file://0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \
47 file://0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \
48 file://0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \
49 file://0017-missing_type.h-add-__compar_d_fn_t-definition.patch \
50 file://0018-avoid-redefinition-of-prctl_mm_map-structure.patch \
51 file://0019-Handle-missing-LOCK_EX.patch \
52 file://0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch \
53 file://0021-test-json.c-define-M_PIl.patch \
54 file://0022-do-not-disable-buffer-in-writing-files.patch \
55 file://0025-Handle-__cpu_mask-usage.patch \
56 file://0026-Handle-missing-gshadow.patch \
57 file://0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \
58 file://0001-pass-correct-parameters-to-getdents64.patch \
59 file://0002-Add-sys-stat.h-for-S_IFDIR.patch \
60 file://0001-Adjust-for-musl-headers.patch \
61 "
62
63PAM_PLUGINS = " \
64 pam-plugin-unix \
65 pam-plugin-loginuid \
66 pam-plugin-keyinit \
67"
68
69PACKAGECONFIG ??= " \
70 ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux smack usrmerge polkit seccomp', d)} \
71 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
72 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
73 ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '', 'link-udev-shared', d)} \
74 backlight \
75 binfmt \
76 gshadow \
77 hibernate \
78 hostnamed \
79 idn \
80 ima \
81 kmod \
82 localed \
83 logind \
84 machined \
85 myhostname \
86 networkd \
87 nss \
88 nss-mymachines \
89 nss-resolve \
90 quotacheck \
91 randomseed \
92 resolved \
93 set-time-epoch \
94 sysusers \
95 sysvinit \
96 timedated \
97 timesyncd \
98 userdb \
99 utmp \
100 vconsole \
101 wheel-group \
102 zstd \
103"
104
105PACKAGECONFIG:remove:libc-musl = " \
106 gshadow \
107 idn \
108 localed \
109 myhostname \
110 nss \
111 nss-mymachines \
112 nss-resolve \
113 sysusers \
114 userdb \
115 utmp \
116"
117
118# https://github.com/seccomp/libseccomp/issues/347
119PACKAGECONFIG:remove:mipsarch = "seccomp"
120
121CFLAGS:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0 "
122
123# Some of the dependencies are weak-style recommends - if not available at runtime,
124# systemd won't fail but the library-related feature will be skipped with a warning.
125
126# Use the upstream systemd serial-getty@.service and rely on
127# systemd-getty-generator instead of using the OE-core specific
128# systemd-serialgetty.bb - not enabled by default.
129PACKAGECONFIG[serial-getty-generator] = ""
130
131PACKAGECONFIG[acl] = "-Dacl=true,-Dacl=false,acl"
132PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit"
133PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false"
134PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false"
135PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2"
136PACKAGECONFIG[cgroupv2] = "-Ddefault-hierarchy=unified,-Ddefault-hierarchy=hybrid"
137PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false"
138PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup,,cryptsetup"
139PACKAGECONFIG[tpm2] = "-Dtpm2=true,-Dtpm2=false,tpm2-tss,tpm2-tss libtss2 libtss2-tcti-device"
140PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus"
141PACKAGECONFIG[efi] = "-Defi=true,-Defi=false"
142PACKAGECONFIG[gnu-efi] = "-Dgnu-efi=true -Defi-libdir=${STAGING_LIBDIR} -Defi-includedir=${STAGING_INCDIR}/efi,-Dgnu-efi=false,gnu-efi"
143PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils"
144PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
145PACKAGECONFIG[repart] = "-Drepart=true,-Drepart=false"
146PACKAGECONFIG[homed] = "-Dhomed=true,-Dhomed=false"
147# Sign the journal for anti-tampering
148PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt"
149PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls"
150PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false"
151PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false"
152PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false"
153PACKAGECONFIG[idn] = "-Didn=true,-Didn=false"
154PACKAGECONFIG[ima] = "-Dima=true,-Dima=false"
155# importd requires journal-upload/xz/zlib/bzip2/gcrypt
156PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false"
157# Update NAT firewall rules
158PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables"
159PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl"
160PACKAGECONFIG[kmod] = "-Dkmod=true,-Dkmod=false,kmod"
161PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false,,ldconfig"
162PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn,,libidn"
163PACKAGECONFIG[libidn2] = "-Dlibidn2=true,-Dlibidn2=false,libidn2,,libidn2"
164# Link udev shared with systemd helper library.
165# If enabled the udev package depends on the systemd package (which has the needed shared library).
166PACKAGECONFIG[link-udev-shared] = "-Dlink-udev-shared=true,-Dlink-udev-shared=false"
167PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false"
168PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false"
169PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4"
170PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false"
171PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
172PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd"
173PACKAGECONFIG[myhostname] = "-Dnss-myhostname=true,-Dnss-myhostname=false,,libnss-myhostname"
174PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false"
175PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false"
176PACKAGECONFIG[nss-mymachines] = "-Dnss-mymachines=true,-Dnss-mymachines=false"
177PACKAGECONFIG[nss-resolve] = "-Dnss-resolve=true,-Dnss-resolve=false"
178PACKAGECONFIG[oomd] = "-Doomd=true,-Doomd=false"
179PACKAGECONFIG[openssl] = "-Dopenssl=true,-Dopenssl=false,openssl"
180PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}"
181PACKAGECONFIG[pcre2] = "-Dpcre2=true,-Dpcre2=false,libpcre2"
182PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false"
183# If polkit is disabled and networkd+hostnamed are in use, enabling this option and
184# using dbus-broker will allow networkd to be authorized to change the
185# hostname without acquiring additional privileges
186PACKAGECONFIG[polkit_hostnamed_fallback] = ",,,,dbus-broker,polkit"
187PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false"
188PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode,,qrencode"
189PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false"
190PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false"
191PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false"
192PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false"
193PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp"
194PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell"
195PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false"
196PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false"
197PACKAGECONFIG[sysvinit] = "-Dsysvinit-path=${sysconfdir}/init.d -Dsysvrcnd-path=${sysconfdir},-Dsysvinit-path= -Dsysvrcnd-path=,,systemd-compat-units update-rc.d"
198# When enabled use reproducble build timestamp if set as time epoch,
199# or build time if not. When disabled, time epoch is unset.
200def build_epoch(d):
201 epoch = d.getVar('SOURCE_DATE_EPOCH') or "-1"
202 return '-Dtime-epoch=%d' % int(epoch)
203PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0"
204PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false"
205PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false"
206PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true"
207PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true"
208PACKAGECONFIG[userdb] = "-Duserdb=true,-Duserdb=false"
209PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false"
210PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind"
211PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup"
212PACKAGECONFIG[wheel-group] = "-Dwheel-group=true, -Dwheel-group=false"
213PACKAGECONFIG[xdg-autostart] = "-Dxdg-autostart=true,-Dxdg-autostart=false"
214# Verify keymaps on locale change
215PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon"
216PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz"
217PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib"
218PACKAGECONFIG[zstd] = "-Dzstd=true,-Dzstd=false,zstd"
219
220# Helper variables to clarify locations. This mirrors the logic in systemd's
221# build system.
222rootprefix ?= "${root_prefix}"
223rootlibdir ?= "${base_libdir}"
224rootlibexecdir = "${rootprefix}/lib"
225
226EXTRA_OEMESON += "-Dnobody-user=nobody \
227 -Dnobody-group=nobody \
228 -Drootlibdir=${rootlibdir} \
229 -Drootprefix=${rootprefix} \
230 -Ddefault-locale=C \
231 -Dmode=release \
232 -Dsystem-alloc-uid-min=101 \
233 -Dsystem-uid-max=999 \
234 -Dsystem-alloc-gid-min=101 \
235 -Dsystem-gid-max=999 \
236 "
237
238# Hardcode target binary paths to avoid using paths from sysroot
239EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \
240 -Dkmod-path=${base_bindir}/kmod \
241 -Dmount-path=${base_bindir}/mount \
242 -Dquotacheck-path=${sbindir}/quotacheck \
243 -Dquotaon-path=${sbindir}/quotaon \
244 -Dsulogin-path=${base_sbindir}/sulogin \
245 -Dnologin-path=${base_sbindir}/nologin \
246 -Dumount-path=${base_bindir}/umount"
247
248do_install() {
249 meson_do_install
250 install -d ${D}/${base_sbindir}
251 if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
252 # Provided by a separate recipe
253 rm ${D}${systemd_system_unitdir}/serial-getty* -f
254 fi
255
256 # Provide support for initramfs
257 [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
258 [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
259
260 install -d ${D}${sysconfdir}/udev/rules.d/
261 install -d ${D}${sysconfdir}/tmpfiles.d
262 for rule in $(find ${WORKDIR} -maxdepth 1 -type f -name "*.rules"); do
263 install -m 0644 $rule ${D}${sysconfdir}/udev/rules.d/
264 done
265
266 install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
267
268 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
269 install -d ${D}${sysconfdir}/init.d
270 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
271 sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
272 install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
273 fi
274
275 if "${@'true' if oe.types.boolean(d.getVar('VOLATILE_LOG_DIR')) else 'false'}"; then
276 # /var/log is typically a symbolic link to inside /var/volatile,
277 # which is expected to be empty.
278 rm -rf ${D}${localstatedir}/log
279 else
280 chown root:systemd-journal ${D}${localstatedir}/log/journal
281
282 # journal-remote creates this at start
283 rm -rf ${D}${localstatedir}/log/journal/remote
284 fi
285
286 install -d ${D}${systemd_system_unitdir}/graphical.target.wants
287 install -d ${D}${systemd_system_unitdir}/multi-user.target.wants
288 install -d ${D}${systemd_system_unitdir}/poweroff.target.wants
289 install -d ${D}${systemd_system_unitdir}/reboot.target.wants
290 install -d ${D}${systemd_system_unitdir}/rescue.target.wants
291
292 # Create symlinks for systemd-update-utmp-runlevel.service
293 if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
294 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/graphical.target.wants/systemd-update-utmp-runlevel.service
295 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/multi-user.target.wants/systemd-update-utmp-runlevel.service
296 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/poweroff.target.wants/systemd-update-utmp-runlevel.service
297 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/reboot.target.wants/systemd-update-utmp-runlevel.service
298 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/rescue.target.wants/systemd-update-utmp-runlevel.service
299 fi
300
301 # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
302 # for existence else it fails
303 if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ] &&
304 ! ${@bb.utils.contains('PACKAGECONFIG', 'networkd', 'true', 'false', d)}; then
305 echo 'd /run/systemd/netif/links 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
306 fi
307 if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
308 echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
309 echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
310 echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
311 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
312 else
313 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
314 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
315 fi
316 if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then
317 rm ${D}${exec_prefix}/lib/tmpfiles.d/x11.conf
318 rm -r ${D}${sysconfdir}/X11
319 fi
320
321 # If polkit is setup fixup permissions and ownership
322 if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
323 if [ -d ${D}${datadir}/polkit-1/rules.d ]; then
324 chmod 700 ${D}${datadir}/polkit-1/rules.d
325 chown polkitd:root ${D}${datadir}/polkit-1/rules.d
326 fi
327 fi
328
329 # If polkit is not available and a fallback was requested, install a drop-in that allows networkd to
330 # request hostname changes via DBUS without elevating its privileges
331 if ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'true', 'false', d)}; then
332 install -d ${D}${systemd_system_unitdir}/systemd-hostnamed.service.d/
333 install -m 0644 ${WORKDIR}/00-hostnamed-network-user.conf ${D}${systemd_system_unitdir}/systemd-hostnamed.service.d/
334 install -d ${D}${datadir}/dbus-1/system.d/
335 install -m 0644 ${WORKDIR}/org.freedesktop.hostname1_no_polkit.conf ${D}${datadir}/dbus-1/system.d/
336 fi
337
338 # create link for existing udev rules
339 ln -s ${base_bindir}/udevadm ${D}${base_sbindir}/udevadm
340
341 # duplicate udevadm for postinst script
342 install -d ${D}${libexecdir}
343 ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm
344
345 # install default policy for presets
346 # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto
347 install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset
348
349 # add a profile fragment to disable systemd pager with busybox less
350 install -Dm 0644 ${WORKDIR}/systemd-pager.sh ${D}${sysconfdir}/profile.d/systemd-pager.sh
351}
352
353python populate_packages:prepend (){
354 systemdlibdir = d.getVar("rootlibdir")
355 do_split_packages(d, systemdlibdir, r'^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
356}
357PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*"
358
359PACKAGE_BEFORE_PN = "\
360 ${PN}-gui \
361 ${PN}-vconsole-setup \
362 ${PN}-initramfs \
363 ${PN}-analyze \
364 ${PN}-kernel-install \
365 ${PN}-rpm-macros \
366 ${PN}-binfmt \
367 ${PN}-zsh-completion \
368 ${PN}-container \
369 ${PN}-journal-gatewayd \
370 ${PN}-journal-upload \
371 ${PN}-journal-remote \
372 ${PN}-extra-utils \
373 ${PN}-udev-rules \
374 libsystemd-shared \
375 udev \
376 udev-hwdb \
377"
378
379SUMMARY:${PN}-container = "Tools for containers and VMs"
380DESCRIPTION:${PN}-container = "Systemd tools to spawn and manage containers and virtual machines."
381
382SUMMARY:${PN}-journal-gatewayd = "HTTP server for journal events"
383DESCRIPTION:${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."
384
385SUMMARY:${PN}-journal-upload = "Send journal messages over the network"
386DESCRIPTION:${PN}-journal-upload = "systemd-journal-upload uploads journal entries to a specified URL."
387
388SUMMARY:${PN}-journal-remote = "Receive journal messages over the network"
389DESCRIPTION:${PN}-journal-remote = "systemd-journal-remote is a command to receive serialized journal events and store them to journal files."
390
391SUMMARY:libsystemd-shared = "Systemd shared library"
392
393SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)} \
394 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \
395 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \
396 ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \
397"
398SYSTEMD_SERVICE:${PN}-binfmt = "systemd-binfmt.service"
399
400USERADD_PACKAGES = "${PN} ${PN}-extra-utils \
401 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \
402 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \
403 ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \
404"
405GROUPADD_PARAM:${PN} = "-r systemd-journal;"
406GROUPADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '-r systemd-hostname;', '', d)}"
407USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /sbin/nologin systemd-coredump;', '', d)}"
408USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /sbin/nologin systemd-network;', '', d)}"
409USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}"
410USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /sbin/nologin systemd-resolve;', '', d)}"
411USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /sbin/nologin systemd-timesync;', '', d)}"
412USERADD_PARAM:${PN}-extra-utils = "--system -d / -M --shell /sbin/nologin systemd-bus-proxy"
413USERADD_PARAM:${PN}-journal-gatewayd = "--system -d / -M --shell /sbin/nologin systemd-journal-gateway"
414USERADD_PARAM:${PN}-journal-remote = "--system -d / -M --shell /sbin/nologin systemd-journal-remote"
415USERADD_PARAM:${PN}-journal-upload = "--system -d / -M --shell /sbin/nologin systemd-journal-upload"
416
417FILES:${PN}-analyze = "${bindir}/systemd-analyze"
418
419FILES:${PN}-initramfs = "/init"
420RDEPENDS:${PN}-initramfs = "${PN}"
421
422FILES:${PN}-gui = "${bindir}/systemadm"
423
424FILES:${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
425 ${systemd_system_unitdir}/systemd-vconsole-setup.service \
426 ${systemd_system_unitdir}/sysinit.target.wants/systemd-vconsole-setup.service"
427
428RDEPENDS:${PN}-kernel-install += "bash"
429FILES:${PN}-kernel-install = "${bindir}/kernel-install \
430 ${sysconfdir}/kernel/ \
431 ${exec_prefix}/lib/kernel \
432 "
433FILES:${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
434 "
435
436FILES:${PN}-zsh-completion = "${datadir}/zsh/site-functions"
437
438FILES:${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
439 ${exec_prefix}/lib/binfmt.d \
440 ${rootlibexecdir}/systemd/systemd-binfmt \
441 ${systemd_system_unitdir}/proc-sys-fs-binfmt_misc.* \
442 ${systemd_system_unitdir}/systemd-binfmt.service"
443RRECOMMENDS:${PN}-binfmt = "kernel-module-binfmt-misc"
444
445RRECOMMENDS:${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
446
447
448FILES:${PN}-journal-gatewayd = "${rootlibexecdir}/systemd/systemd-journal-gatewayd \
449 ${systemd_system_unitdir}/systemd-journal-gatewayd.service \
450 ${systemd_system_unitdir}/systemd-journal-gatewayd.socket \
451 ${systemd_system_unitdir}/sockets.target.wants/systemd-journal-gatewayd.socket \
452 ${datadir}/systemd/gatewayd/browse.html \
453 "
454SYSTEMD_SERVICE:${PN}-journal-gatewayd = "systemd-journal-gatewayd.socket"
455
456FILES:${PN}-journal-upload = "${rootlibexecdir}/systemd/systemd-journal-upload \
457 ${systemd_system_unitdir}/systemd-journal-upload.service \
458 ${sysconfdir}/systemd/journal-upload.conf \
459 "
460SYSTEMD_SERVICE:${PN}-journal-upload = "systemd-journal-upload.service"
461
462FILES:${PN}-journal-remote = "${rootlibexecdir}/systemd/systemd-journal-remote \
463 ${sysconfdir}/systemd/journal-remote.conf \
464 ${systemd_system_unitdir}/systemd-journal-remote.service \
465 ${systemd_system_unitdir}/systemd-journal-remote.socket \
466 "
467SYSTEMD_SERVICE:${PN}-journal-remote = "systemd-journal-remote.socket"
468
469
470FILES:${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
471 ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
472 ${sysconfdir}/systemd/system/multi-user.target.wants/machines.target \
473 ${base_bindir}/machinectl \
474 ${bindir}/systemd-nspawn \
475 ${nonarch_libdir}/systemd/import-pubring.gpg \
476 ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \
477 ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \
478 ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \
479 ${systemd_system_unitdir}/machines.target.wants/var-lib-machines.mount \
480 ${systemd_system_unitdir}/remote-fs.target.wants/var-lib-machines.mount \
481 ${systemd_system_unitdir}/machine.slice \
482 ${systemd_system_unitdir}/machines.target \
483 ${systemd_system_unitdir}/org.freedesktop.import1.busname \
484 ${systemd_system_unitdir}/org.freedesktop.machine1.busname \
485 ${systemd_system_unitdir}/systemd-importd.service \
486 ${systemd_system_unitdir}/systemd-machined.service \
487 ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \
488 ${systemd_system_unitdir}/var-lib-machines.mount \
489 ${rootlibexecdir}/systemd/systemd-import \
490 ${rootlibexecdir}/systemd/systemd-importd \
491 ${rootlibexecdir}/systemd/systemd-machined \
492 ${rootlibexecdir}/systemd/systemd-pull \
493 ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
494 ${exec_prefix}/lib/tmpfiles.d/README \
495 ${systemd_system_unitdir}/systemd-nspawn@.service \
496 ${libdir}/libnss_mymachines.so.2 \
497 ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
498 ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
499 ${datadir}/dbus-1/system.d/org.freedesktop.import1.conf \
500 ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \
501 ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
502 ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
503 "
504
505# "machinectl import-tar" uses "tar --numeric-owner", not supported by busybox.
506RRECOMMENDS:${PN}-container += "\
507 ${PN}-journal-gatewayd \
508 ${PN}-journal-remote \
509 ${PN}-journal-upload \
510 kernel-module-dm-mod \
511 kernel-module-loop \
512 kernel-module-tun \
513 tar \
514 "
515
516FILES:${PN}-extra-utils = "\
517 ${base_bindir}/systemd-escape \
518 ${base_bindir}/systemd-inhibit \
519 ${bindir}/systemd-detect-virt \
520 ${bindir}/systemd-dissect \
521 ${bindir}/systemd-path \
522 ${bindir}/systemd-run \
523 ${bindir}/systemd-cat \
524 ${bindir}/systemd-delta \
525 ${bindir}/systemd-cgls \
526 ${bindir}/systemd-cgtop \
527 ${bindir}/systemd-stdio-bridge \
528 ${bindir}/systemd-sysext \
529 ${base_bindir}/systemd-ask-password \
530 ${base_bindir}/systemd-tty-ask-password-agent \
531 ${systemd_system_unitdir}/systemd-ask-password-console.path \
532 ${systemd_system_unitdir}/systemd-ask-password-console.service \
533 ${systemd_system_unitdir}/systemd-ask-password-wall.path \
534 ${systemd_system_unitdir}/systemd-ask-password-wall.service \
535 ${systemd_system_unitdir}/sysinit.target.wants/systemd-ask-password-console.path \
536 ${systemd_system_unitdir}/sysinit.target.wants/systemd-ask-password-wall.path \
537 ${systemd_system_unitdir}/multi-user.target.wants/systemd-ask-password-wall.path \
538 ${rootlibexecdir}/systemd/systemd-resolve-host \
539 ${rootlibexecdir}/systemd/systemd-ac-power \
540 ${rootlibexecdir}/systemd/systemd-activate \
541 ${rootlibexecdir}/systemd/systemd-bus-proxyd \
542 ${systemd_system_unitdir}/systemd-bus-proxyd.service \
543 ${systemd_system_unitdir}/systemd-bus-proxyd.socket \
544 ${rootlibexecdir}/systemd/systemd-socket-proxyd \
545 ${rootlibexecdir}/systemd/systemd-reply-password \
546 ${rootlibexecdir}/systemd/systemd-sleep \
547 ${rootlibexecdir}/systemd/system-sleep \
548 ${systemd_system_unitdir}/systemd-hibernate.service \
549 ${systemd_system_unitdir}/systemd-hybrid-sleep.service \
550 ${systemd_system_unitdir}/systemd-suspend.service \
551 ${systemd_system_unitdir}/sleep.target \
552 ${rootlibexecdir}/systemd/systemd-initctl \
553 ${systemd_system_unitdir}/systemd-initctl.service \
554 ${systemd_system_unitdir}/systemd-initctl.socket \
555 ${systemd_system_unitdir}/sockets.target.wants/systemd-initctl.socket \
556 ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
557 ${rootlibexecdir}/systemd/systemd-cgroups-agent \
558"
559
560FILES:${PN}-udev-rules = "\
561 ${rootlibexecdir}/udev/rules.d/70-uaccess.rules \
562 ${rootlibexecdir}/udev/rules.d/71-seat.rules \
563 ${rootlibexecdir}/udev/rules.d/73-seat-late.rules \
564 ${rootlibexecdir}/udev/rules.d/99-systemd.rules \
565"
566
567CONFFILES:${PN} = "${sysconfdir}/systemd/coredump.conf \
568 ${sysconfdir}/systemd/journald.conf \
569 ${sysconfdir}/systemd/logind.conf \
570 ${sysconfdir}/systemd/networkd.conf \
571 ${sysconfdir}/systemd/pstore.conf \
572 ${sysconfdir}/systemd/resolved.conf \
573 ${sysconfdir}/systemd/sleep.conf \
574 ${sysconfdir}/systemd/system.conf \
575 ${sysconfdir}/systemd/timesyncd.conf \
576 ${sysconfdir}/systemd/user.conf \
577"
578
579FILES:${PN} = " ${base_bindir}/* \
580 ${base_sbindir}/shutdown \
581 ${base_sbindir}/halt \
582 ${base_sbindir}/poweroff \
583 ${base_sbindir}/runlevel \
584 ${base_sbindir}/telinit \
585 ${base_sbindir}/resolvconf \
586 ${base_sbindir}/reboot \
587 ${base_sbindir}/init \
588 ${datadir}/dbus-1/services \
589 ${datadir}/dbus-1/system-services \
590 ${datadir}/polkit-1 \
591 ${datadir}/${BPN} \
592 ${datadir}/factory \
593 ${sysconfdir}/dbus-1/ \
594 ${sysconfdir}/modules-load.d/ \
595 ${sysconfdir}/pam.d/ \
596 ${sysconfdir}/profile.d/ \
597 ${sysconfdir}/sysctl.d/ \
598 ${sysconfdir}/systemd/ \
599 ${sysconfdir}/tmpfiles.d/ \
600 ${sysconfdir}/xdg/ \
601 ${sysconfdir}/init.d/README \
602 ${sysconfdir}/resolv-conf.systemd \
603 ${sysconfdir}/X11/xinit/xinitrc.d/* \
604 ${rootlibexecdir}/systemd/* \
605 ${libdir}/pam.d \
606 ${nonarch_libdir}/pam.d \
607 ${systemd_unitdir}/* \
608 ${base_libdir}/security/*.so \
609 /cgroup \
610 ${bindir}/systemd* \
611 ${bindir}/busctl \
612 ${bindir}/coredumpctl \
613 ${bindir}/localectl \
614 ${bindir}/hostnamectl \
615 ${bindir}/resolvectl \
616 ${bindir}/timedatectl \
617 ${bindir}/bootctl \
618 ${bindir}/oomctl \
619 ${exec_prefix}/lib/tmpfiles.d/*.conf \
620 ${exec_prefix}/lib/systemd \
621 ${exec_prefix}/lib/modules-load.d \
622 ${exec_prefix}/lib/sysctl.d \
623 ${exec_prefix}/lib/sysusers.d \
624 ${exec_prefix}/lib/environment.d \
625 ${localstatedir} \
626 ${rootlibexecdir}/modprobe.d/systemd.conf \
627 ${rootlibexecdir}/modprobe.d/README \
628 ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
629 ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \
630 ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \
631 ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
632 ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
633 ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '${datadir}/dbus-1/system.d/org.freedesktop.hostname1_no_polkit.conf', '', d)} \
634 ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
635 ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \
636 ${datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf \
637 ${datadir}/dbus-1/system.d/org.freedesktop.portable1.conf \
638 ${datadir}/dbus-1/system.d/org.freedesktop.oom1.conf \
639 ${datadir}/dbus-1/system.d/org.freedesktop.home1.conf \
640 "
641
642FILES:${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
643
644RDEPENDS:${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck"
645RDEPENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
646RDEPENDS:${PN} += "volatile-binds"
647
648RRECOMMENDS:${PN} += "systemd-extra-utils \
649 udev-hwdb \
650 e2fsprogs-e2fsck \
651 kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 kernel-module-sch-fq-codel \
652 os-release \
653 systemd-conf \
654"
655
656INSANE_SKIP:${PN} += "dev-so libdir"
657INSANE_SKIP:${PN}-dbg += "libdir"
658INSANE_SKIP:${PN}-doc += " libdir"
659INSANE_SKIP:libsystemd-shared += "libdir"
660
661FILES:libsystemd-shared = "${rootlibexecdir}/systemd/libsystemd-shared*.so"
662
663RPROVIDES:udev = "hotplug"
664
665RDEPENDS:udev-hwdb += "udev"
666
667FILES:udev += "${base_sbindir}/udevd \
668 ${rootlibexecdir}/systemd/network/99-default.link \
669 ${rootlibexecdir}/systemd/systemd-udevd \
670 ${rootlibexecdir}/udev/accelerometer \
671 ${rootlibexecdir}/udev/ata_id \
672 ${rootlibexecdir}/udev/cdrom_id \
673 ${rootlibexecdir}/udev/collect \
674 ${rootlibexecdir}/udev/dmi_memory_id \
675 ${rootlibexecdir}/udev/fido_id \
676 ${rootlibexecdir}/udev/findkeyboards \
677 ${rootlibexecdir}/udev/keyboard-force-release.sh \
678 ${rootlibexecdir}/udev/keymap \
679 ${rootlibexecdir}/udev/mtd_probe \
680 ${rootlibexecdir}/udev/scsi_id \
681 ${rootlibexecdir}/udev/v4l_id \
682 ${rootlibexecdir}/udev/keymaps \
683 ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \
684 ${rootlibexecdir}/udev/rules.d/60-autosuspend.rules \
685 ${rootlibexecdir}/udev/rules.d/60-autosuspend-chromiumos.rules \
686 ${rootlibexecdir}/udev/rules.d/60-block.rules \
687 ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \
688 ${rootlibexecdir}/udev/rules.d/60-drm.rules \
689 ${rootlibexecdir}/udev/rules.d/60-evdev.rules \
690 ${rootlibexecdir}/udev/rules.d/60-fido-id.rules \
691 ${rootlibexecdir}/udev/rules.d/60-input-id.rules \
692 ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \
693 ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \
694 ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \
695 ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \
696 ${rootlibexecdir}/udev/rules.d/60-persistent-v4l.rules \
697 ${rootlibexecdir}/udev/rules.d/60-sensor.rules \
698 ${rootlibexecdir}/udev/rules.d/60-serial.rules \
699 ${rootlibexecdir}/udev/rules.d/61-autosuspend-manual.rules \
700 ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \
701 ${rootlibexecdir}/udev/rules.d/70-camera.rules \
702 ${rootlibexecdir}/udev/rules.d/70-joystick.rules \
703 ${rootlibexecdir}/udev/rules.d/70-memory.rules \
704 ${rootlibexecdir}/udev/rules.d/70-mouse.rules \
705 ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
706 ${rootlibexecdir}/udev/rules.d/70-touchpad.rules \
707 ${rootlibexecdir}/udev/rules.d/75-net-description.rules \
708 ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \
709 ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \
710 ${rootlibexecdir}/udev/rules.d/80-drivers.rules \
711 ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \
712 ${rootlibexecdir}/udev/rules.d/81-net-dhcp.rules \
713 ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \
714 ${rootlibexecdir}/udev/rules.d/README \
715 ${sysconfdir}/udev \
716 ${sysconfdir}/init.d/systemd-udevd \
717 ${systemd_system_unitdir}/*udev* \
718 ${systemd_system_unitdir}/*.wants/*udev* \
719 ${base_bindir}/systemd-hwdb \
720 ${base_bindir}/udevadm \
721 ${base_sbindir}/udevadm \
722 ${libexecdir}/${MLPREFIX}udevadm \
723 ${datadir}/bash-completion/completions/udevadm \
724 ${systemd_system_unitdir}/systemd-hwdb-update.service \
725 "
726
727FILES:udev-hwdb = "${rootlibexecdir}/udev/hwdb.d \
728 "
729
730RCONFLICTS:${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}"
731
732INITSCRIPT_PACKAGES = "udev"
733INITSCRIPT_NAME:udev = "systemd-udevd"
734INITSCRIPT_PARAMS:udev = "start 03 S ."
735
736python __anonymous() {
737 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
738 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
739
740 if bb.utils.contains('PACKAGECONFIG', 'repart', True, False, d) and not bb.utils.contains('PACKAGECONFIG', 'openssl', True, False, d):
741 bb.error("PACKAGECONFIG[repart] requires PACKAGECONFIG[openssl]")
742
743 if bb.utils.contains('PACKAGECONFIG', 'homed', True, False, d) and not bb.utils.contains('PACKAGECONFIG', 'userdb openssl cryptsetup', True, False, d):
744 bb.error("PACKAGECONFIG[homed] requires PACKAGECONFIG[userdb], PACKAGECONFIG[openssl] and PACKAGECONFIG[cryptsetup]")
745}
746
747python do_warn_musl() {
748 if d.getVar('TCLIBC') == "musl":
749 bb.warn("Using systemd with musl is not recommended since it is not supported upstream and some patches are known to be problematic.")
750}
751addtask warn_musl before do_configure
752
753ALTERNATIVE:${PN} = "halt reboot shutdown poweroff runlevel ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}"
754
755ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
756ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
757ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"
758
759ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
760ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
761ALTERNATIVE_PRIORITY[halt] ?= "300"
762
763ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
764ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
765ALTERNATIVE_PRIORITY[reboot] ?= "300"
766
767ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
768ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
769ALTERNATIVE_PRIORITY[shutdown] ?= "300"
770
771ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
772ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
773ALTERNATIVE_PRIORITY[poweroff] ?= "300"
774
775ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
776ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
777ALTERNATIVE_PRIORITY[runlevel] ?= "300"
778
779pkg_postinst:${PN}:libc-glibc () {
780 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
781 -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
782 -i $D${sysconfdir}/nsswitch.conf
783}
784
785pkg_prerm:${PN}:libc-glibc () {
786 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
787 -e '/^hosts:/s/\s*myhostname//' \
788 -i $D${sysconfdir}/nsswitch.conf
789}
790
791PACKAGE_WRITE_DEPS += "qemu-native"
792pkg_postinst:udev-hwdb () {
793 if test -n "$D"; then
794 $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} rootlibexecdir="${rootlibexecdir}" PREFERRED_PROVIDER_udev="${PREFERRED_PROVIDER_udev}"
795 else
796 udevadm hwdb --update
797 fi
798}
799
800pkg_prerm:udev-hwdb () {
801 rm -f $D${sysconfdir}/udev/hwdb.bin
802}