blob: 7c3c78a36467c70e109db0b635dc1ff0ee7d070f [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001require 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 += " \
18 file://touchscreen.rules \
19 file://00-create-volatile.conf \
20 ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://org.freedesktop.hostname1_no_polkit.conf', '', d)} \
21 ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://00-hostnamed-network-user.conf', '', d)} \
22 file://init \
23 file://99-default.preset \
24 file://systemd-pager.sh \
25 file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
26 file://0003-implment-systemd-sysv-install-for-OE.patch \
27 file://0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch \
28 "
29
30# patches needed by musl
31SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}"
32SRC_URI_MUSL = "\
33 file://0003-missing_type.h-add-comparison_fn_t.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://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-Use-uintmax_t-for-handling-rlim_t.patch \
39 file://0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \
40 file://0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \
41 file://0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
42 file://0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \
43 file://0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \
44 file://0018-avoid-redefinition-of-prctl_mm_map-structure.patch \
45 file://0022-do-not-disable-buffer-in-writing-files.patch \
46 file://0025-Handle-__cpu_mask-usage.patch \
47 file://0026-Handle-missing-gshadow.patch \
48 file://0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \
49 file://0001-pass-correct-parameters-to-getdents64.patch \
50 file://0002-Add-sys-stat.h-for-S_IFDIR.patch \
51 file://0001-Adjust-for-musl-headers.patch \
52 file://0001-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch \
53 "
54
55PAM_PLUGINS = " \
56 pam-plugin-unix \
57 pam-plugin-loginuid \
58 pam-plugin-keyinit \
59"
60
61PACKAGECONFIG ??= " \
62 ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux smack usrmerge polkit seccomp', d)} \
63 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
64 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
65 ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '', 'link-udev-shared', d)} \
66 backlight \
67 binfmt \
68 gshadow \
69 hibernate \
70 hostnamed \
71 idn \
72 ima \
73 kmod \
74 localed \
75 logind \
76 machined \
77 myhostname \
78 networkd \
79 nss \
80 nss-mymachines \
81 nss-resolve \
82 quotacheck \
83 randomseed \
84 resolved \
85 set-time-epoch \
86 sysusers \
87 sysvinit \
88 timedated \
89 timesyncd \
90 userdb \
91 utmp \
92 vconsole \
93 wheel-group \
94 zstd \
95"
96
97PACKAGECONFIG:remove:libc-musl = " \
98 gshadow \
99 idn \
100 localed \
101 myhostname \
102 nss \
103 nss-mymachines \
104 nss-resolve \
105 sysusers \
106 userdb \
107 utmp \
108"
109
110# https://github.com/seccomp/libseccomp/issues/347
111PACKAGECONFIG:remove:mipsarch = "seccomp"
112
113TARGET_CC_ARCH:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0 -D_LARGEFILE64_SOURCE"
114
115# Some of the dependencies are weak-style recommends - if not available at runtime,
116# systemd won't fail but the library-related feature will be skipped with a warning.
117
118# Use the upstream systemd serial-getty@.service and rely on
119# systemd-getty-generator instead of using the OE-core specific
120# systemd-serialgetty.bb - not enabled by default.
121PACKAGECONFIG[serial-getty-generator] = ""
122
123PACKAGECONFIG[acl] = "-Dacl=true,-Dacl=false,acl"
124PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit"
125PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false"
126PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false"
127PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2"
128PACKAGECONFIG[cgroupv2] = "-Ddefault-hierarchy=unified,-Ddefault-hierarchy=hybrid"
129PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false"
130PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup,,cryptsetup"
131PACKAGECONFIG[tpm2] = "-Dtpm2=true,-Dtpm2=false,tpm2-tss,tpm2-tss libtss2 libtss2-tcti-device"
132PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus"
133PACKAGECONFIG[efi] = "-Defi=true,-Defi=false"
134PACKAGECONFIG[gnu-efi] = "-Dgnu-efi=true -Defi-libdir=${STAGING_LIBDIR} -Defi-includedir=${STAGING_INCDIR}/efi,-Dgnu-efi=false,gnu-efi"
135PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils"
136PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
137PACKAGECONFIG[repart] = "-Drepart=true,-Drepart=false"
138PACKAGECONFIG[homed] = "-Dhomed=true,-Dhomed=false"
139# Sign the journal for anti-tampering
140PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt"
141PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls"
142PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false"
143PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false"
144PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false"
145PACKAGECONFIG[idn] = "-Didn=true,-Didn=false"
146PACKAGECONFIG[ima] = "-Dima=true,-Dima=false"
147# importd requires journal-upload/xz/zlib/bzip2/gcrypt
148PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false,glib-2.0"
149# Update NAT firewall rules
150PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables"
151PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl"
152PACKAGECONFIG[kmod] = "-Dkmod=true,-Dkmod=false,kmod"
153PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false,,ldconfig"
154PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn,,libidn"
155PACKAGECONFIG[libidn2] = "-Dlibidn2=true,-Dlibidn2=false,libidn2,,libidn2"
156# Link udev shared with systemd helper library.
157# If enabled the udev package depends on the systemd package (which has the needed shared library).
158PACKAGECONFIG[link-udev-shared] = "-Dlink-udev-shared=true,-Dlink-udev-shared=false"
159PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false"
160PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false"
161PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4"
162PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false"
163PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
164PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd"
165PACKAGECONFIG[myhostname] = "-Dnss-myhostname=true,-Dnss-myhostname=false,,libnss-myhostname"
166PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false"
167PACKAGECONFIG[no-dns-fallback] = "-Ddns-servers="
168PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false"
169PACKAGECONFIG[nss-mymachines] = "-Dnss-mymachines=true,-Dnss-mymachines=false"
170PACKAGECONFIG[nss-resolve] = "-Dnss-resolve=true,-Dnss-resolve=false"
171PACKAGECONFIG[oomd] = "-Doomd=true,-Doomd=false"
172PACKAGECONFIG[openssl] = "-Dopenssl=true,-Dopenssl=false,openssl"
173PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}"
174PACKAGECONFIG[pcre2] = "-Dpcre2=true,-Dpcre2=false,libpcre2"
175PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false"
176# If polkit is disabled and networkd+hostnamed are in use, enabling this option and
177# using dbus-broker will allow networkd to be authorized to change the
178# hostname without acquiring additional privileges
179PACKAGECONFIG[polkit_hostnamed_fallback] = ",,,,dbus-broker,polkit"
180PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false"
181PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode,,qrencode"
182PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false"
183PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false"
184PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false"
185PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false"
186PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp"
187PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell"
188PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false"
189PACKAGECONFIG[sysext] = "-Dsysext=true, -Dsysext=false"
190PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false"
191PACKAGECONFIG[sysvinit] = "-Dsysvinit-path=${sysconfdir}/init.d -Dsysvrcnd-path=${sysconfdir},-Dsysvinit-path= -Dsysvrcnd-path=,,systemd-compat-units update-rc.d"
192# When enabled use reproducble build timestamp if set as time epoch,
193# or build time if not. When disabled, time epoch is unset.
194def build_epoch(d):
195 epoch = d.getVar('SOURCE_DATE_EPOCH') or "-1"
196 return '-Dtime-epoch=%d' % int(epoch)
197PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0"
198PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false"
199PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false"
200PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true"
201PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true"
202PACKAGECONFIG[userdb] = "-Duserdb=true,-Duserdb=false"
203PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false"
204PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind"
205PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup"
206PACKAGECONFIG[wheel-group] = "-Dwheel-group=true, -Dwheel-group=false"
207PACKAGECONFIG[xdg-autostart] = "-Dxdg-autostart=true,-Dxdg-autostart=false"
208# Verify keymaps on locale change
209PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon"
210PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz"
211PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib"
212PACKAGECONFIG[zstd] = "-Dzstd=true,-Dzstd=false,zstd"
213
214# Helper variables to clarify locations. This mirrors the logic in systemd's
215# build system.
216rootprefix ?= "${root_prefix}"
217rootlibdir ?= "${base_libdir}"
218rootlibexecdir = "${rootprefix}/lib"
219
220EXTRA_OEMESON += "-Dnobody-user=nobody \
221 -Dnobody-group=nobody \
222 -Drootlibdir=${rootlibdir} \
223 -Drootprefix=${rootprefix} \
224 -Ddefault-locale=C \
225 -Dmode=release \
226 -Dsystem-alloc-uid-min=101 \
227 -Dsystem-uid-max=999 \
228 -Dsystem-alloc-gid-min=101 \
229 -Dsystem-gid-max=999 \
230 "
231
232# Hardcode target binary paths to avoid using paths from sysroot
233EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \
234 -Dkmod-path=${base_bindir}/kmod \
235 -Dmount-path=${base_bindir}/mount \
236 -Dquotacheck-path=${sbindir}/quotacheck \
237 -Dquotaon-path=${sbindir}/quotaon \
238 -Dsulogin-path=${base_sbindir}/sulogin \
239 -Dnologin-path=${base_sbindir}/nologin \
240 -Dumount-path=${base_bindir}/umount"
241
242# The 60 seconds is watchdog's default vaule.
243WATCHDOG_TIMEOUT ??= "60"
244
245do_install() {
246 meson_do_install
247 install -d ${D}/${base_sbindir}
248 if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
249 # Provided by a separate recipe
250 rm ${D}${systemd_system_unitdir}/serial-getty* -f
251 fi
252
253 # Provide support for initramfs
254 [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
255 [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
256
257 install -d ${D}${sysconfdir}/udev/rules.d/
258 install -d ${D}${sysconfdir}/tmpfiles.d
259 for rule in $(find ${WORKDIR} -maxdepth 1 -type f -name "*.rules"); do
260 install -m 0644 $rule ${D}${sysconfdir}/udev/rules.d/
261 done
262
263 install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
264
265 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
266 install -d ${D}${sysconfdir}/init.d
267 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
268 sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
269 install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
270 fi
271
272 if "${@'true' if oe.types.boolean(d.getVar('VOLATILE_LOG_DIR')) else 'false'}"; then
273 # /var/log is typically a symbolic link to inside /var/volatile,
274 # which is expected to be empty.
275 rm -rf ${D}${localstatedir}/log
276 else
277 chown root:systemd-journal ${D}${localstatedir}/log/journal
278
279 # journal-remote creates this at start
280 rm -rf ${D}${localstatedir}/log/journal/remote
281 fi
282
283 install -d ${D}${systemd_system_unitdir}/graphical.target.wants
284 install -d ${D}${systemd_system_unitdir}/multi-user.target.wants
285 install -d ${D}${systemd_system_unitdir}/poweroff.target.wants
286 install -d ${D}${systemd_system_unitdir}/reboot.target.wants
287 install -d ${D}${systemd_system_unitdir}/rescue.target.wants
288
289 # Create symlinks for systemd-update-utmp-runlevel.service
290 if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
291 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/graphical.target.wants/systemd-update-utmp-runlevel.service
292 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/multi-user.target.wants/systemd-update-utmp-runlevel.service
293 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/poweroff.target.wants/systemd-update-utmp-runlevel.service
294 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/reboot.target.wants/systemd-update-utmp-runlevel.service
295 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/rescue.target.wants/systemd-update-utmp-runlevel.service
296 fi
297
298 # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
299 # for existence else it fails
300 if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ] &&
301 ! ${@bb.utils.contains('PACKAGECONFIG', 'networkd', 'true', 'false', d)}; then
302 echo 'd /run/systemd/netif/links 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
303 fi
304 if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
305 echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
306 echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
307 echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
308 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
309 else
310 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
311 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
312 fi
313 if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then
314 rm ${D}${exec_prefix}/lib/tmpfiles.d/x11.conf
315 rm -r ${D}${sysconfdir}/X11
316 fi
317
318 # If polkit is setup fixup permissions and ownership
319 if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
320 if [ -d ${D}${datadir}/polkit-1/rules.d ]; then
321 chmod 700 ${D}${datadir}/polkit-1/rules.d
322 chown polkitd:root ${D}${datadir}/polkit-1/rules.d
323 fi
324 fi
325
326 # If polkit is not available and a fallback was requested, install a drop-in that allows networkd to
327 # request hostname changes via DBUS without elevating its privileges
328 if ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'true', 'false', d)}; then
329 install -d ${D}${systemd_system_unitdir}/systemd-hostnamed.service.d/
330 install -m 0644 ${WORKDIR}/00-hostnamed-network-user.conf ${D}${systemd_system_unitdir}/systemd-hostnamed.service.d/
331 install -d ${D}${datadir}/dbus-1/system.d/
332 install -m 0644 ${WORKDIR}/org.freedesktop.hostname1_no_polkit.conf ${D}${datadir}/dbus-1/system.d/
333 fi
334
335 # create link for existing udev rules
336 ln -s ${base_bindir}/udevadm ${D}${base_sbindir}/udevadm
337
338 # install default policy for presets
339 # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto
340 install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset
341
342 # add a profile fragment to disable systemd pager with busybox less
343 install -Dm 0644 ${WORKDIR}/systemd-pager.sh ${D}${sysconfdir}/profile.d/systemd-pager.sh
344
345 if [ -n "${WATCHDOG_TIMEOUT}" ]; then
346 sed -i -e 's/#RebootWatchdogSec=10min/RebootWatchdogSec=${WATCHDOG_TIMEOUT}/' \
347 ${D}/${sysconfdir}/systemd/system.conf
348 fi
349}
350
351python populate_packages:prepend (){
352 systemdlibdir = d.getVar("rootlibdir")
353 do_split_packages(d, systemdlibdir, r'^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
354}
355PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*"
356
357PACKAGE_BEFORE_PN = "\
358 ${PN}-gui \
359 ${PN}-vconsole-setup \
360 ${PN}-initramfs \
361 ${PN}-analyze \
362 ${PN}-kernel-install \
363 ${PN}-rpm-macros \
364 ${PN}-binfmt \
365 ${PN}-zsh-completion \
366 ${PN}-container \
367 ${PN}-journal-gatewayd \
368 ${PN}-journal-upload \
369 ${PN}-journal-remote \
370 ${PN}-extra-utils \
371 ${PN}-udev-rules \
372 libsystemd-shared \
373 udev \
374 udev-hwdb \
375"
376
377SUMMARY:${PN}-container = "Tools for containers and VMs"
378DESCRIPTION:${PN}-container = "Systemd tools to spawn and manage containers and virtual machines."
379
380SUMMARY:${PN}-journal-gatewayd = "HTTP server for journal events"
381DESCRIPTION:${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."
382
383SUMMARY:${PN}-journal-upload = "Send journal messages over the network"
384DESCRIPTION:${PN}-journal-upload = "systemd-journal-upload uploads journal entries to a specified URL."
385
386SUMMARY:${PN}-journal-remote = "Receive journal messages over the network"
387DESCRIPTION:${PN}-journal-remote = "systemd-journal-remote is a command to receive serialized journal events and store them to journal files."
388
389SUMMARY:libsystemd-shared = "Systemd shared library"
390
391SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)} \
392 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \
393 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \
394 ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \
395"
396SYSTEMD_SERVICE:${PN}-binfmt = "systemd-binfmt.service"
397
398USERADD_PACKAGES = "${PN} ${PN}-extra-utils \
399 udev \
400 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \
401 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \
402 ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \
403"
404GROUPADD_PARAM:${PN} = "-r systemd-journal;"
405GROUPADD_PARAM:udev = "-r render"
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 = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', 'kernel-module-binfmt-misc', '', d)}"
444
445RRECOMMENDS:${PN}-vconsole-setup = "${@bb.utils.contains('PACKAGECONFIG', 'vconsole', 'kbd kbd-consolefonts kbd-keymaps', '', d)}"
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-creds \
525 ${bindir}/systemd-cryptenroll \
526 ${bindir}/systemd-delta \
527 ${bindir}/systemd-cgls \
528 ${bindir}/systemd-cgtop \
529 ${bindir}/systemd-stdio-bridge \
530 ${base_bindir}/systemd-ask-password \
531 ${base_bindir}/systemd-tty-ask-password-agent \
532 ${systemd_system_unitdir}/initrd.target.wants/systemd-pcrphase-initrd.path \
533 ${systemd_system_unitdir}/systemd-ask-password-console.path \
534 ${systemd_system_unitdir}/systemd-ask-password-console.service \
535 ${systemd_system_unitdir}/systemd-ask-password-wall.path \
536 ${systemd_system_unitdir}/systemd-ask-password-wall.service \
537 ${systemd_system_unitdir}/sysinit.target.wants/systemd-ask-password-console.path \
538 ${systemd_system_unitdir}/sysinit.target.wants/systemd-ask-password-wall.path \
539 ${systemd_system_unitdir}/sysinit.target.wants/systemd-pcrphase.path \
540 ${systemd_system_unitdir}/sysinit.target.wants/systemd-pcrphase-sysinit.path \
541 ${systemd_system_unitdir}/multi-user.target.wants/systemd-ask-password-wall.path \
542 ${rootlibexecdir}/systemd/systemd-resolve-host \
543 ${rootlibexecdir}/systemd/systemd-ac-power \
544 ${rootlibexecdir}/systemd/systemd-activate \
545 ${rootlibexecdir}/systemd/systemd-bus-proxyd \
546 ${systemd_system_unitdir}/systemd-bus-proxyd.service \
547 ${systemd_system_unitdir}/systemd-bus-proxyd.socket \
548 ${rootlibexecdir}/systemd/systemd-measure \
549 ${rootlibexecdir}/systemd/systemd-pcrphase \
550 ${rootlibexecdir}/systemd/systemd-socket-proxyd \
551 ${rootlibexecdir}/systemd/systemd-reply-password \
552 ${rootlibexecdir}/systemd/systemd-sleep \
553 ${rootlibexecdir}/systemd/system-sleep \
554 ${systemd_system_unitdir}/systemd-hibernate.service \
555 ${systemd_system_unitdir}/systemd-hybrid-sleep.service \
556 ${systemd_system_unitdir}/systemd-pcrphase-initrd.service \
557 ${systemd_system_unitdir}/systemd-pcrphase.service \
558 ${systemd_system_unitdir}/systemd-pcrphase-sysinit.service \
559 ${systemd_system_unitdir}/systemd-suspend.service \
560 ${systemd_system_unitdir}/sleep.target \
561 ${rootlibexecdir}/systemd/systemd-initctl \
562 ${systemd_system_unitdir}/systemd-initctl.service \
563 ${systemd_system_unitdir}/systemd-initctl.socket \
564 ${systemd_system_unitdir}/sockets.target.wants/systemd-initctl.socket \
565 ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
566 ${rootlibexecdir}/systemd/systemd-cgroups-agent \
567"
568
569FILES:${PN}-udev-rules = "\
570 ${rootlibexecdir}/udev/rules.d/70-uaccess.rules \
571 ${rootlibexecdir}/udev/rules.d/71-seat.rules \
572 ${rootlibexecdir}/udev/rules.d/73-seat-late.rules \
573 ${rootlibexecdir}/udev/rules.d/99-systemd.rules \
574"
575
576CONFFILES:${PN} = "${sysconfdir}/systemd/coredump.conf \
577 ${sysconfdir}/systemd/journald.conf \
578 ${sysconfdir}/systemd/logind.conf \
579 ${sysconfdir}/systemd/networkd.conf \
580 ${sysconfdir}/systemd/pstore.conf \
581 ${sysconfdir}/systemd/resolved.conf \
582 ${sysconfdir}/systemd/sleep.conf \
583 ${sysconfdir}/systemd/system.conf \
584 ${sysconfdir}/systemd/timesyncd.conf \
585 ${sysconfdir}/systemd/user.conf \
586"
587
588FILES:${PN} = " ${base_bindir}/* \
589 ${base_sbindir}/shutdown \
590 ${base_sbindir}/halt \
591 ${base_sbindir}/poweroff \
592 ${base_sbindir}/runlevel \
593 ${base_sbindir}/telinit \
594 ${base_sbindir}/resolvconf \
595 ${base_sbindir}/reboot \
596 ${base_sbindir}/init \
597 ${datadir}/dbus-1/services \
598 ${datadir}/dbus-1/system-services \
599 ${datadir}/polkit-1 \
600 ${datadir}/${BPN} \
601 ${datadir}/factory \
602 ${sysconfdir}/dbus-1/ \
603 ${sysconfdir}/modules-load.d/ \
604 ${sysconfdir}/pam.d/ \
605 ${sysconfdir}/profile.d/ \
606 ${sysconfdir}/sysctl.d/ \
607 ${sysconfdir}/systemd/ \
608 ${sysconfdir}/tmpfiles.d/ \
609 ${sysconfdir}/xdg/ \
610 ${sysconfdir}/init.d/README \
611 ${sysconfdir}/resolv-conf.systemd \
612 ${sysconfdir}/X11/xinit/xinitrc.d/* \
613 ${rootlibexecdir}/systemd/* \
614 ${rootlibdir}/systemd/libsystemd-core* \
615 ${libdir}/pam.d \
616 ${nonarch_libdir}/pam.d \
617 ${systemd_unitdir}/* \
618 ${base_libdir}/security/*.so \
619 /cgroup \
620 ${bindir}/systemd* \
621 ${bindir}/busctl \
622 ${bindir}/coredumpctl \
623 ${bindir}/localectl \
624 ${bindir}/hostnamectl \
625 ${bindir}/resolvectl \
626 ${bindir}/timedatectl \
627 ${bindir}/bootctl \
628 ${bindir}/oomctl \
629 ${bindir}/userdbctl \
630 ${exec_prefix}/lib/tmpfiles.d/*.conf \
631 ${exec_prefix}/lib/systemd \
632 ${exec_prefix}/lib/modules-load.d \
633 ${exec_prefix}/lib/sysctl.d \
634 ${exec_prefix}/lib/sysusers.d \
635 ${exec_prefix}/lib/environment.d \
636 ${localstatedir} \
637 ${rootlibexecdir}/modprobe.d/systemd.conf \
638 ${rootlibexecdir}/modprobe.d/README \
639 ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
640 ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \
641 ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \
642 ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
643 ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
644 ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '${datadir}/dbus-1/system.d/org.freedesktop.hostname1_no_polkit.conf', '', d)} \
645 ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
646 ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \
647 ${datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf \
648 ${datadir}/dbus-1/system.d/org.freedesktop.portable1.conf \
649 ${datadir}/dbus-1/system.d/org.freedesktop.oom1.conf \
650 ${datadir}/dbus-1/system.d/org.freedesktop.home1.conf \
651 "
652
653FILES:${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
654
655RDEPENDS:${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck"
656RDEPENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
657RDEPENDS:${PN} += "volatile-binds"
658
659RRECOMMENDS:${PN} += "systemd-extra-utils \
660 udev-hwdb \
661 e2fsprogs-e2fsck \
662 kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 kernel-module-sch-fq-codel \
663 os-release \
664 systemd-conf \
665"
666
667INSANE_SKIP:${PN} += "dev-so libdir"
668INSANE_SKIP:${PN}-dbg += "libdir"
669INSANE_SKIP:${PN}-doc += " libdir"
670INSANE_SKIP:libsystemd-shared += "libdir"
671
672FILES:libsystemd-shared = "${rootlibdir}/systemd/libsystemd-shared*.so"
673
674RPROVIDES:udev = "hotplug"
675
676RDEPENDS:udev-hwdb += "udev"
677
678FILES:udev += "${base_sbindir}/udevd \
679 ${rootlibexecdir}/systemd/network/99-default.link \
680 ${rootlibexecdir}/systemd/systemd-udevd \
681 ${rootlibexecdir}/udev/accelerometer \
682 ${rootlibexecdir}/udev/ata_id \
683 ${rootlibexecdir}/udev/cdrom_id \
684 ${rootlibexecdir}/udev/collect \
685 ${rootlibexecdir}/udev/dmi_memory_id \
686 ${rootlibexecdir}/udev/fido_id \
687 ${rootlibexecdir}/udev/findkeyboards \
688 ${rootlibexecdir}/udev/keyboard-force-release.sh \
689 ${rootlibexecdir}/udev/keymap \
690 ${rootlibexecdir}/udev/mtd_probe \
691 ${rootlibexecdir}/udev/scsi_id \
692 ${rootlibexecdir}/udev/v4l_id \
693 ${rootlibexecdir}/udev/keymaps \
694 ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \
695 ${rootlibexecdir}/udev/rules.d/60-autosuspend.rules \
696 ${rootlibexecdir}/udev/rules.d/60-autosuspend-chromiumos.rules \
697 ${rootlibexecdir}/udev/rules.d/60-block.rules \
698 ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \
699 ${rootlibexecdir}/udev/rules.d/60-drm.rules \
700 ${rootlibexecdir}/udev/rules.d/60-evdev.rules \
701 ${rootlibexecdir}/udev/rules.d/60-fido-id.rules \
702 ${rootlibexecdir}/udev/rules.d/60-input-id.rules \
703 ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \
704 ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \
705 ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \
706 ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \
707 ${rootlibexecdir}/udev/rules.d/60-persistent-v4l.rules \
708 ${rootlibexecdir}/udev/rules.d/60-sensor.rules \
709 ${rootlibexecdir}/udev/rules.d/60-serial.rules \
710 ${rootlibexecdir}/udev/rules.d/61-autosuspend-manual.rules \
711 ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \
712 ${rootlibexecdir}/udev/rules.d/70-camera.rules \
713 ${rootlibexecdir}/udev/rules.d/70-joystick.rules \
714 ${rootlibexecdir}/udev/rules.d/70-memory.rules \
715 ${rootlibexecdir}/udev/rules.d/70-mouse.rules \
716 ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
717 ${rootlibexecdir}/udev/rules.d/70-touchpad.rules \
718 ${rootlibexecdir}/udev/rules.d/75-net-description.rules \
719 ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \
720 ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \
721 ${rootlibexecdir}/udev/rules.d/80-drivers.rules \
722 ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \
723 ${rootlibexecdir}/udev/rules.d/81-net-dhcp.rules \
724 ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \
725 ${rootlibexecdir}/udev/rules.d/README \
726 ${sysconfdir}/udev \
727 ${sysconfdir}/init.d/systemd-udevd \
728 ${systemd_system_unitdir}/*udev* \
729 ${systemd_system_unitdir}/*.wants/*udev* \
730 ${base_bindir}/systemd-hwdb \
731 ${base_bindir}/udevadm \
732 ${base_sbindir}/udevadm \
733 ${datadir}/bash-completion/completions/udevadm \
734 ${systemd_system_unitdir}/systemd-hwdb-update.service \
735 "
736
737FILES:udev-hwdb = "${rootlibexecdir}/udev/hwdb.d \
738 "
739
740RCONFLICTS:${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}"
741
742INITSCRIPT_PACKAGES = "udev"
743INITSCRIPT_NAME:udev = "systemd-udevd"
744INITSCRIPT_PARAMS:udev = "start 03 S ."
745
746python __anonymous() {
747 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
748 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
749
750 if bb.utils.contains('PACKAGECONFIG', 'repart', True, False, d) and not bb.utils.contains('PACKAGECONFIG', 'openssl', True, False, d):
751 bb.error("PACKAGECONFIG[repart] requires PACKAGECONFIG[openssl]")
752
753 if bb.utils.contains('PACKAGECONFIG', 'homed', True, False, d) and not bb.utils.contains('PACKAGECONFIG', 'userdb openssl cryptsetup', True, False, d):
754 bb.error("PACKAGECONFIG[homed] requires PACKAGECONFIG[userdb], PACKAGECONFIG[openssl] and PACKAGECONFIG[cryptsetup]")
755}
756
757python do_warn_musl() {
758 if d.getVar('TCLIBC') == "musl":
759 bb.warn("Using systemd with musl is not recommended since it is not supported upstream and some patches are known to be problematic.")
760}
761addtask warn_musl before do_configure
762
763ALTERNATIVE:${PN} = "halt reboot shutdown poweroff runlevel ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}"
764
765ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
766ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
767ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"
768
769ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
770ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
771ALTERNATIVE_PRIORITY[halt] ?= "300"
772
773ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
774ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
775ALTERNATIVE_PRIORITY[reboot] ?= "300"
776
777ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
778ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
779ALTERNATIVE_PRIORITY[shutdown] ?= "300"
780
781ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
782ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
783ALTERNATIVE_PRIORITY[poweroff] ?= "300"
784
785ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
786ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
787ALTERNATIVE_PRIORITY[runlevel] ?= "300"
788
789pkg_postinst:${PN}:libc-glibc () {
790 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
791 -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
792 -i $D${sysconfdir}/nsswitch.conf
793}
794
795pkg_prerm:${PN}:libc-glibc () {
796 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
797 -e '/^hosts:/s/\s*myhostname//' \
798 -i $D${sysconfdir}/nsswitch.conf
799}
800
801PACKAGE_WRITE_DEPS += "qemu-native"
802pkg_postinst:udev-hwdb () {
803 if test -n "$D"; then
804 $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} rootlibexecdir="${rootlibexecdir}" PREFERRED_PROVIDER_udev="${PREFERRED_PROVIDER_udev}" base_bindir="${base_bindir}"
805 else
806 udevadm hwdb --update
807 fi
808}
809
810pkg_prerm:udev-hwdb () {
811 rm -f $D${sysconfdir}/udev/hwdb.bin
812}