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