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