blob: b1a38ba9b88c3b833da15ecd7b47b6970138fb37 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001require 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 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://99-default.preset \
Andrew Geissler6ce62a22020-11-30 19:58:47 -060021 file://systemd-pager.sh \
Andrew Geissler82c905d2020-04-13 13:39:40 -050022 file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
23 file://0003-implment-systemd-sysv-install-for-OE.patch \
Andrew Geisslerf0343792020-11-18 10:42:21 -060024 file://0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch \
Andrew Geissler6ce62a22020-11-30 19:58:47 -060025 file://0001-logind-Restore-chvt-as-non-root-user-without-polkit.patch \
Andrew Geisslerd1e89492021-02-12 15:35:20 -060026 file://0027-proc-dont-trigger-mount-error-with-invalid-options-o.patch \
27 file://0001-analyze-resolve-executable-path-if-it-is-relative.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050028 "
29
30# patches needed by musl
31SRC_URI_append_libc-musl = " ${SRC_URI_MUSL}"
32SRC_URI_MUSL = "\
33 file://0002-don-t-use-glibc-specific-qsort_r.patch \
34 file://0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch \
35 file://0004-add-fallback-parse_printf_format-implementation.patch \
36 file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \
37 file://0006-Include-netinet-if_ether.h.patch \
Andrew Geisslerd1e89492021-02-12 15:35:20 -060038 file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050039 file://0008-add-missing-FTW_-macros-for-musl.patch \
Andrew Geisslerd1e89492021-02-12 15:35:20 -060040 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://0023-Include-sys-wait.h.patch \
55 file://0024-Include-signal.h.patch \
56 file://0025-Handle-__cpu_mask-usage.patch \
57 file://0026-Handle-missing-gshadow.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050058 "
59
60PAM_PLUGINS = " \
61 pam-plugin-unix \
62 pam-plugin-loginuid \
63 pam-plugin-keyinit \
64"
65
66PACKAGECONFIG ??= " \
67 ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux smack usrmerge polkit', d)} \
68 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
69 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
70 backlight \
71 binfmt \
72 gshadow \
73 hibernate \
74 hostnamed \
75 idn \
76 ima \
77 kmod \
78 localed \
79 logind \
80 machined \
81 myhostname \
82 networkd \
83 nss \
84 nss-mymachines \
85 nss-resolve \
86 quotacheck \
87 randomseed \
88 resolved \
89 set-time-epoch \
90 sysusers \
91 sysvinit \
92 timedated \
93 timesyncd \
94 userdb \
95 utmp \
96 vconsole \
97 xz \
98"
99
100PACKAGECONFIG_remove_libc-musl = " \
101 gshadow \
102 idn \
103 localed \
104 myhostname \
105 nss \
106 nss-mymachines \
107 nss-resolve \
108 sysusers \
109 userdb \
110 utmp \
111"
112
113CFLAGS_append_libc-musl = " -D__UAPI_DEF_ETHHDR=0 "
114
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600115# 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
Andrew Geissler82c905d2020-04-13 13:39:40 -0500118# 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"
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600130PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup,,cryptsetup"
Andrew Geissler82c905d2020-04-13 13:39:40 -0500131PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus"
132PACKAGECONFIG[efi] = "-Defi=true,-Defi=false"
133PACKAGECONFIG[gnu-efi] = "-Dgnu-efi=true -Defi-libdir=${STAGING_LIBDIR} -Defi-includedir=${STAGING_INCDIR}/efi,-Dgnu-efi=false,gnu-efi"
134PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils"
135PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
136# Sign the journal for anti-tampering
137PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt"
138PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls"
139PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false"
140PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false"
141PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false"
142PACKAGECONFIG[idn] = "-Didn=true,-Didn=false"
143PACKAGECONFIG[ima] = "-Dima=true,-Dima=false"
144# importd requires curl/xz/zlib/bzip2/gcrypt
145PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false"
146# Update NAT firewall rules
147PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables"
148PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl"
149PACKAGECONFIG[kmod] = "-Dkmod=true,-Dkmod=false,kmod"
150PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false,,ldconfig"
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600151PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn,,libidn"
152PACKAGECONFIG[libidn2] = "-Dlibidn2=true,-Dlibidn2=false,libidn2,,libidn2"
Andrew Geissler82c905d2020-04-13 13:39:40 -0500153PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false"
154PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false"
155PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4"
156PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false"
157PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
158PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd"
159PACKAGECONFIG[myhostname] = "-Dnss-myhostname=true,-Dnss-myhostname=false,,libnss-myhostname"
160PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false"
161PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false"
162PACKAGECONFIG[nss-mymachines] = "-Dnss-mymachines=true,-Dnss-mymachines=false"
163PACKAGECONFIG[nss-resolve] = "-Dnss-resolve=true,-Dnss-resolve=false"
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600164PACKAGECONFIG[oomd] = "-Doomd=true,-Doomd=false"
Andrew Geissler82c905d2020-04-13 13:39:40 -0500165PACKAGECONFIG[openssl] = "-Dopenssl=true,-Dopenssl=false,openssl"
166PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}"
167PACKAGECONFIG[pcre2] = "-Dpcre2=true,-Dpcre2=false,libpcre2"
168PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false"
169PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false"
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600170PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode,,qrencode"
Andrew Geissler82c905d2020-04-13 13:39:40 -0500171PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false"
172PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false"
173PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false"
174PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false"
175# libseccomp is found in meta-security
176PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp"
177PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell"
178PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false"
179PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false"
180PACKAGECONFIG[sysvinit] = "-Dsysvinit-path=${sysconfdir}/init.d -Dsysvrcnd-path=${sysconfdir},-Dsysvinit-path= -Dsysvrcnd-path=,,systemd-compat-units update-rc.d"
181# When enabled use reproducble build timestamp if set as time epoch,
182# or build time if not. When disabled, time epoch is unset.
183def build_epoch(d):
184 epoch = d.getVar('SOURCE_DATE_EPOCH') or "-1"
185 return '-Dtime-epoch=%d' % int(epoch)
186PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0"
187PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false"
188PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false"
189PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true"
190PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true"
191PACKAGECONFIG[userdb] = "-Duserdb=true,-Duserdb=false"
192PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false"
193PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind"
194PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup"
Andrew Geisslerc3d88e42020-10-02 09:45:00 -0500195PACKAGECONFIG[xdg-autostart] = "-Dxdg-autostart=true,-Dxdg-autostart=false"
Andrew Geissler82c905d2020-04-13 13:39:40 -0500196# Verify keymaps on locale change
197PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon"
198PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz"
199PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib"
200
201# Helper variables to clarify locations. This mirrors the logic in systemd's
202# build system.
203rootprefix ?= "${root_prefix}"
204rootlibdir ?= "${base_libdir}"
205rootlibexecdir = "${rootprefix}/lib"
206
207# This links udev statically with systemd helper library.
208# Otherwise udev package would depend on systemd package (which has the needed shared library),
209# and always pull it into images.
210EXTRA_OEMESON += "-Dlink-udev-shared=false"
211
212EXTRA_OEMESON += "-Dnobody-user=nobody \
213 -Dnobody-group=nobody \
214 -Drootlibdir=${rootlibdir} \
215 -Drootprefix=${rootprefix} \
216 -Ddefault-locale=C \
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600217 -Dmode=release \
218 -Dsystem-alloc-uid-min=101 \
219 -Dsystem-uid-max=999 \
220 -Dsystem-alloc-gid-min=101 \
221 -Dsystem-gid-max=999 \
Andrew Geissler82c905d2020-04-13 13:39:40 -0500222 "
223
224# Hardcode target binary paths to avoid using paths from sysroot
225EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \
226 -Dkmod-path=${base_bindir}/kmod \
227 -Dmount-path=${base_bindir}/mount \
228 -Dquotacheck-path=${sbindir}/quotacheck \
229 -Dquotaon-path=${sbindir}/quotaon \
230 -Dsulogin-path=${base_sbindir}/sulogin \
231 -Dnologin-path=${base_sbindir}/nologin \
232 -Dumount-path=${base_bindir}/umount"
233
234do_install() {
235 meson_do_install
236 install -d ${D}/${base_sbindir}
237 if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
238 # Provided by a separate recipe
239 rm ${D}${systemd_unitdir}/system/serial-getty* -f
240 fi
241
242 # Provide support for initramfs
243 [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
244 [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
245
246 install -d ${D}${sysconfdir}/udev/rules.d/
247 install -d ${D}${sysconfdir}/tmpfiles.d
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500248 for rule in $(find ${WORKDIR} -maxdepth 1 -type f -name "*.rules"); do
249 install -m 0644 $rule ${D}${sysconfdir}/udev/rules.d/
250 done
Andrew Geissler82c905d2020-04-13 13:39:40 -0500251
252 install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
253
254 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
255 install -d ${D}${sysconfdir}/init.d
256 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
257 sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
258 install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
259 fi
260
261 chown root:systemd-journal ${D}/${localstatedir}/log/journal
262
263 # Delete journal README, as log can be symlinked inside volatile.
264 rm -f ${D}/${localstatedir}/log/README
265
266 # journal-remote creates this at start
267 rm -rf ${D}/${localstatedir}/log/journal/remote
268
269 install -d ${D}${systemd_unitdir}/system/graphical.target.wants
270 install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
271 install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
272 install -d ${D}${systemd_unitdir}/system/reboot.target.wants
273 install -d ${D}${systemd_unitdir}/system/rescue.target.wants
274
275 # Create symlinks for systemd-update-utmp-runlevel.service
276 if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
277 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
278 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
279 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
280 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
281 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
282 fi
283
284 # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
285 # for existence else it fails
286 if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
287 ${@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)}
288 fi
289 if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
290 echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
291 echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
292 echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
293 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
294 else
295 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
296 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
297 fi
298 if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then
299 rm ${D}${exec_prefix}/lib/tmpfiles.d/x11.conf
300 rm -r ${D}${sysconfdir}/X11
301 fi
302
303 # If polkit is setup fixup permissions and ownership
304 if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
305 if [ -d ${D}${datadir}/polkit-1/rules.d ]; then
306 chmod 700 ${D}${datadir}/polkit-1/rules.d
307 chown polkitd:root ${D}${datadir}/polkit-1/rules.d
308 fi
309 fi
310
311 # create link for existing udev rules
312 ln -s ${base_bindir}/udevadm ${D}${base_sbindir}/udevadm
313
314 # duplicate udevadm for postinst script
315 install -d ${D}${libexecdir}
316 ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm
317
318 # install default policy for presets
319 # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto
320 install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600321
322 # add a profile fragment to disable systemd pager with busybox less
323 install -Dm 0644 ${WORKDIR}/systemd-pager.sh ${D}${sysconfdir}/profile.d/systemd-pager.sh
Andrew Geissler82c905d2020-04-13 13:39:40 -0500324}
325
326python populate_packages_prepend (){
327 systemdlibdir = d.getVar("rootlibdir")
328 do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
329}
330PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*"
331
332PACKAGE_BEFORE_PN = "\
333 ${PN}-gui \
334 ${PN}-vconsole-setup \
335 ${PN}-initramfs \
336 ${PN}-analyze \
337 ${PN}-kernel-install \
338 ${PN}-rpm-macros \
339 ${PN}-binfmt \
340 ${PN}-zsh-completion \
341 ${PN}-container \
342 ${PN}-journal-gatewayd \
343 ${PN}-journal-upload \
344 ${PN}-journal-remote \
345 ${PN}-extra-utils \
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500346 ${PN}-udev-rules \
Andrew Geissler82c905d2020-04-13 13:39:40 -0500347 udev \
348 udev-hwdb \
349"
350
351SUMMARY_${PN}-container = "Tools for containers and VMs"
352DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines."
353
354SUMMARY_${PN}-journal-gatewayd = "HTTP server for journal events"
355DESCRIPTION_${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."
356
357SUMMARY_${PN}-journal-upload = "Send journal messages over the network"
358DESCRIPTION_${PN}-journal-upload = "systemd-journal-upload uploads journal entries to a specified URL."
359
360SUMMARY_${PN}-journal-remote = "Receive journal messages over the network"
361DESCRIPTION_${PN}-journal-remote = "systemd-journal-remote is a command to receive serialized journal events and store them to journal files."
362
363SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)} \
364 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \
365 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \
366 ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \
367"
368SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
369
370USERADD_PACKAGES = "${PN} ${PN}-extra-utils \
371 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gateway', '', d)} \
372 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \
373 ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \
374"
375GROUPADD_PARAM_${PN} = "-r systemd-journal"
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600376USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /sbin/nologin systemd-coredump;', '', d)}"
377USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /sbin/nologin systemd-network;', '', d)}"
Andrew Geissler82c905d2020-04-13 13:39:40 -0500378USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}"
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600379USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /sbin/nologin systemd-resolve;', '', d)}"
380USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /sbin/nologin systemd-timesync;', '', d)}"
381USERADD_PARAM_${PN}-extra-utils = "--system -d / -M --shell /sbin/nologin systemd-bus-proxy"
382USERADD_PARAM_${PN}-journal-gateway = "--system -d / -M --shell /sbin/nologin systemd-journal-gateway"
383USERADD_PARAM_${PN}-journal-remote = "--system -d / -M --shell /sbin/nologin systemd-journal-remote"
384USERADD_PARAM_${PN}-journal-upload = "--system -d / -M --shell /sbin/nologin systemd-journal-upload"
Andrew Geissler82c905d2020-04-13 13:39:40 -0500385
386FILES_${PN}-analyze = "${bindir}/systemd-analyze"
387
388FILES_${PN}-initramfs = "/init"
389RDEPENDS_${PN}-initramfs = "${PN}"
390
391FILES_${PN}-gui = "${bindir}/systemadm"
392
393FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
394 ${systemd_unitdir}/system/systemd-vconsole-setup.service \
395 ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
396
397RDEPENDS_${PN}-kernel-install += "bash"
398FILES_${PN}-kernel-install = "${bindir}/kernel-install \
399 ${sysconfdir}/kernel/ \
400 ${exec_prefix}/lib/kernel \
401 "
402FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
403 "
404
405FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions"
406
407FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
408 ${exec_prefix}/lib/binfmt.d \
409 ${rootlibexecdir}/systemd/systemd-binfmt \
410 ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
411 ${systemd_unitdir}/system/systemd-binfmt.service"
412RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
413
414RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
415
416
417FILES_${PN}-journal-gatewayd = "${rootlibexecdir}/systemd/systemd-journal-gatewayd \
418 ${systemd_system_unitdir}/systemd-journal-gatewayd.service \
419 ${systemd_system_unitdir}/systemd-journal-gatewayd.socket \
420 ${systemd_system_unitdir}/sockets.target.wants/systemd-journal-gatewayd.socket \
421 ${datadir}/systemd/gatewayd/browse.html \
422 "
423SYSTEMD_SERVICE_${PN}-journal-gatewayd = "systemd-journal-gatewayd.socket"
424
425FILES_${PN}-journal-upload = "${rootlibexecdir}/systemd/systemd-journal-upload \
426 ${systemd_system_unitdir}/systemd-journal-upload.service \
427 ${sysconfdir}/systemd/journal-upload.conf \
428 "
429SYSTEMD_SERVICE_${PN}-journal-upload = "systemd-journal-upload.service"
430
431FILES_${PN}-journal-remote = "${rootlibexecdir}/systemd/systemd-journal-remote \
432 ${sysconfdir}/systemd/journal-remote.conf \
433 ${systemd_system_unitdir}/systemd-journal-remote.service \
434 ${systemd_system_unitdir}/systemd-journal-remote.socket \
435 "
436SYSTEMD_SERVICE_${PN}-journal-remote = "systemd-journal-remote.socket"
437
438
439FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
440 ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
441 ${sysconfdir}/systemd/system/multi-user.target.wants/machines.target \
442 ${base_bindir}/machinectl \
443 ${bindir}/systemd-nspawn \
444 ${nonarch_libdir}/systemd/import-pubring.gpg \
445 ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \
446 ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \
447 ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \
448 ${systemd_system_unitdir}/machines.target.wants/var-lib-machines.mount \
449 ${systemd_system_unitdir}/remote-fs.target.wants/var-lib-machines.mount \
450 ${systemd_system_unitdir}/machine.slice \
451 ${systemd_system_unitdir}/machines.target \
452 ${systemd_system_unitdir}/org.freedesktop.import1.busname \
453 ${systemd_system_unitdir}/org.freedesktop.machine1.busname \
454 ${systemd_system_unitdir}/systemd-importd.service \
455 ${systemd_system_unitdir}/systemd-machined.service \
456 ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \
457 ${systemd_system_unitdir}/var-lib-machines.mount \
458 ${rootlibexecdir}/systemd/systemd-import \
459 ${rootlibexecdir}/systemd/systemd-importd \
460 ${rootlibexecdir}/systemd/systemd-machined \
461 ${rootlibexecdir}/systemd/systemd-pull \
462 ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
463 ${systemd_system_unitdir}/systemd-nspawn@.service \
464 ${libdir}/libnss_mymachines.so.2 \
465 ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
466 ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
467 ${datadir}/dbus-1/system.d/org.freedesktop.import1.conf \
468 ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \
469 ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
470 ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
471 "
472
473RRECOMMENDS_${PN}-container += "\
474 ${PN}-journal-upload \
475 ${PN}-journal-remote \
476 ${PN}-journal-gatewayd \
477 "
478
479FILES_${PN}-extra-utils = "\
480 ${base_bindir}/systemd-escape \
481 ${base_bindir}/systemd-inhibit \
482 ${bindir}/systemd-detect-virt \
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600483 ${bindir}/systemd-dissect \
Andrew Geissler82c905d2020-04-13 13:39:40 -0500484 ${bindir}/systemd-path \
485 ${bindir}/systemd-run \
486 ${bindir}/systemd-cat \
487 ${bindir}/systemd-delta \
488 ${bindir}/systemd-cgls \
489 ${bindir}/systemd-cgtop \
490 ${bindir}/systemd-stdio-bridge \
491 ${base_bindir}/systemd-ask-password \
492 ${base_bindir}/systemd-tty-ask-password-agent \
493 ${systemd_unitdir}/system/systemd-ask-password-console.path \
494 ${systemd_unitdir}/system/systemd-ask-password-console.service \
495 ${systemd_unitdir}/system/systemd-ask-password-wall.path \
496 ${systemd_unitdir}/system/systemd-ask-password-wall.service \
497 ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
498 ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \
499 ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
500 ${rootlibexecdir}/systemd/systemd-resolve-host \
501 ${rootlibexecdir}/systemd/systemd-ac-power \
502 ${rootlibexecdir}/systemd/systemd-activate \
503 ${rootlibexecdir}/systemd/systemd-bus-proxyd \
504 ${systemd_unitdir}/system/systemd-bus-proxyd.service \
505 ${systemd_unitdir}/system/systemd-bus-proxyd.socket \
506 ${rootlibexecdir}/systemd/systemd-socket-proxyd \
507 ${rootlibexecdir}/systemd/systemd-reply-password \
508 ${rootlibexecdir}/systemd/systemd-sleep \
509 ${rootlibexecdir}/systemd/system-sleep \
510 ${systemd_unitdir}/system/systemd-hibernate.service \
511 ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
512 ${systemd_unitdir}/system/systemd-suspend.service \
513 ${systemd_unitdir}/system/sleep.target \
514 ${rootlibexecdir}/systemd/systemd-initctl \
515 ${systemd_unitdir}/system/systemd-initctl.service \
516 ${systemd_unitdir}/system/systemd-initctl.socket \
517 ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
518 ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
519 ${rootlibexecdir}/systemd/systemd-cgroups-agent \
520"
521
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500522FILES_${PN}-udev-rules = "\
523 ${rootlibexecdir}/udev/rules.d/70-uaccess.rules \
524 ${rootlibexecdir}/udev/rules.d/71-seat.rules \
525 ${rootlibexecdir}/udev/rules.d/73-seat-late.rules \
526 ${rootlibexecdir}/udev/rules.d/99-systemd.rules \
527"
528
Andrew Geissler82c905d2020-04-13 13:39:40 -0500529CONFFILES_${PN} = "${sysconfdir}/systemd/coredump.conf \
530 ${sysconfdir}/systemd/journald.conf \
531 ${sysconfdir}/systemd/logind.conf \
532 ${sysconfdir}/systemd/networkd.conf \
533 ${sysconfdir}/systemd/pstore.conf \
534 ${sysconfdir}/systemd/resolved.conf \
535 ${sysconfdir}/systemd/sleep.conf \
536 ${sysconfdir}/systemd/system.conf \
537 ${sysconfdir}/systemd/timesyncd.conf \
538 ${sysconfdir}/systemd/user.conf \
539"
540
541FILES_${PN} = " ${base_bindir}/* \
542 ${base_sbindir}/shutdown \
543 ${base_sbindir}/halt \
544 ${base_sbindir}/poweroff \
545 ${base_sbindir}/runlevel \
546 ${base_sbindir}/telinit \
547 ${base_sbindir}/resolvconf \
548 ${base_sbindir}/reboot \
549 ${base_sbindir}/init \
550 ${datadir}/dbus-1/services \
551 ${datadir}/dbus-1/system-services \
552 ${datadir}/polkit-1 \
553 ${datadir}/${BPN} \
554 ${datadir}/factory \
555 ${sysconfdir}/dbus-1/ \
556 ${sysconfdir}/modules-load.d/ \
557 ${sysconfdir}/pam.d/ \
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600558 ${sysconfdir}/profile.d/ \
Andrew Geissler82c905d2020-04-13 13:39:40 -0500559 ${sysconfdir}/sysctl.d/ \
560 ${sysconfdir}/systemd/ \
561 ${sysconfdir}/tmpfiles.d/ \
562 ${sysconfdir}/xdg/ \
563 ${sysconfdir}/init.d/README \
564 ${sysconfdir}/resolv-conf.systemd \
565 ${sysconfdir}/X11/xinit/xinitrc.d/* \
566 ${rootlibexecdir}/systemd/* \
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600567 ${libdir}/pam.d \
568 ${nonarch_libdir}/pam.d \
Andrew Geissler82c905d2020-04-13 13:39:40 -0500569 ${systemd_unitdir}/* \
570 ${base_libdir}/security/*.so \
571 /cgroup \
572 ${bindir}/systemd* \
573 ${bindir}/busctl \
574 ${bindir}/coredumpctl \
575 ${bindir}/localectl \
576 ${bindir}/hostnamectl \
577 ${bindir}/resolvectl \
578 ${bindir}/timedatectl \
579 ${bindir}/bootctl \
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600580 ${bindir}/oomctl \
Andrew Geissler82c905d2020-04-13 13:39:40 -0500581 ${exec_prefix}/lib/tmpfiles.d/*.conf \
582 ${exec_prefix}/lib/systemd \
583 ${exec_prefix}/lib/modules-load.d \
584 ${exec_prefix}/lib/sysctl.d \
585 ${exec_prefix}/lib/sysusers.d \
586 ${exec_prefix}/lib/environment.d \
587 ${localstatedir} \
Andrew Geissler82c905d2020-04-13 13:39:40 -0500588 ${rootlibexecdir}/modprobe.d/systemd.conf \
589 ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
590 ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \
591 ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \
592 ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
593 ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
594 ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
595 ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \
596 ${datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf \
597 ${datadir}/dbus-1/system.d/org.freedesktop.portable1.conf \
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600598 ${datadir}/dbus-1/system.d/org.freedesktop.oom1.conf \
Andrew Geissler82c905d2020-04-13 13:39:40 -0500599 "
600
601FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
602
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500603RDEPENDS_${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck"
Andrew Geissler82c905d2020-04-13 13:39:40 -0500604RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
605RDEPENDS_${PN} += "volatile-binds"
606
607RRECOMMENDS_${PN} += "systemd-extra-utils \
608 udev-hwdb \
609 e2fsprogs-e2fsck \
610 kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 kernel-module-sch-fq-codel \
611 os-release \
612 systemd-conf \
613"
614
615INSANE_SKIP_${PN} += "dev-so libdir"
616INSANE_SKIP_${PN}-dbg += "libdir"
617INSANE_SKIP_${PN}-doc += " libdir"
618
619RPROVIDES_udev = "hotplug"
620
621RDEPENDS_udev-hwdb += "udev"
622
623FILES_udev += "${base_sbindir}/udevd \
624 ${rootlibexecdir}/systemd/network/99-default.link \
625 ${rootlibexecdir}/systemd/systemd-udevd \
626 ${rootlibexecdir}/udev/accelerometer \
627 ${rootlibexecdir}/udev/ata_id \
628 ${rootlibexecdir}/udev/cdrom_id \
629 ${rootlibexecdir}/udev/collect \
630 ${rootlibexecdir}/udev/fido_id \
631 ${rootlibexecdir}/udev/findkeyboards \
632 ${rootlibexecdir}/udev/keyboard-force-release.sh \
633 ${rootlibexecdir}/udev/keymap \
634 ${rootlibexecdir}/udev/mtd_probe \
635 ${rootlibexecdir}/udev/scsi_id \
636 ${rootlibexecdir}/udev/v4l_id \
637 ${rootlibexecdir}/udev/keymaps \
638 ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \
Andrew Geissler635e0e42020-08-21 15:58:33 -0500639 ${rootlibexecdir}/udev/rules.d/60-autosuspend.rules \
Andrew Geissler82c905d2020-04-13 13:39:40 -0500640 ${rootlibexecdir}/udev/rules.d/60-autosuspend-chromiumos.rules \
641 ${rootlibexecdir}/udev/rules.d/60-block.rules \
642 ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \
643 ${rootlibexecdir}/udev/rules.d/60-drm.rules \
644 ${rootlibexecdir}/udev/rules.d/60-evdev.rules \
645 ${rootlibexecdir}/udev/rules.d/60-fido-id.rules \
646 ${rootlibexecdir}/udev/rules.d/60-input-id.rules \
647 ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \
648 ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \
649 ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \
650 ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \
651 ${rootlibexecdir}/udev/rules.d/60-persistent-v4l.rules \
652 ${rootlibexecdir}/udev/rules.d/60-sensor.rules \
653 ${rootlibexecdir}/udev/rules.d/60-serial.rules \
654 ${rootlibexecdir}/udev/rules.d/61-autosuspend-manual.rules \
655 ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \
656 ${rootlibexecdir}/udev/rules.d/70-joystick.rules \
657 ${rootlibexecdir}/udev/rules.d/70-mouse.rules \
658 ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
659 ${rootlibexecdir}/udev/rules.d/70-touchpad.rules \
660 ${rootlibexecdir}/udev/rules.d/75-net-description.rules \
661 ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \
662 ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \
663 ${rootlibexecdir}/udev/rules.d/80-drivers.rules \
664 ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \
665 ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \
666 ${sysconfdir}/udev \
667 ${sysconfdir}/init.d/systemd-udevd \
668 ${systemd_unitdir}/system/*udev* \
669 ${systemd_unitdir}/system/*.wants/*udev* \
670 ${base_bindir}/systemd-hwdb \
671 ${base_bindir}/udevadm \
672 ${base_sbindir}/udevadm \
673 ${libexecdir}/${MLPREFIX}udevadm \
674 ${datadir}/bash-completion/completions/udevadm \
675 ${systemd_unitdir}/system/systemd-hwdb-update.service \
676 "
677
678FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d \
679 "
680
681RCONFLICTS_${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}"
682
683INITSCRIPT_PACKAGES = "udev"
684INITSCRIPT_NAME_udev = "systemd-udevd"
685INITSCRIPT_PARAMS_udev = "start 03 S ."
686
687python __anonymous() {
688 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
689 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
690}
691
692python do_warn_musl() {
693 if d.getVar('TCLIBC') == "musl":
694 bb.warn("Using systemd with musl is not recommended since it is not supported upstream and some patches are known to be problematic.")
695}
696addtask warn_musl before do_configure
697
698ALTERNATIVE_${PN} = "halt reboot shutdown poweroff runlevel ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}"
699
700ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
701ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
702ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"
703
704ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
705ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
706ALTERNATIVE_PRIORITY[halt] ?= "300"
707
708ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
709ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
710ALTERNATIVE_PRIORITY[reboot] ?= "300"
711
712ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
713ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
714ALTERNATIVE_PRIORITY[shutdown] ?= "300"
715
716ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
717ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
718ALTERNATIVE_PRIORITY[poweroff] ?= "300"
719
720ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
721ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
722ALTERNATIVE_PRIORITY[runlevel] ?= "300"
723
724pkg_postinst_${PN}_libc-glibc () {
725 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
726 -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
727 -i $D${sysconfdir}/nsswitch.conf
728}
729
730pkg_prerm_${PN}_libc-glibc () {
731 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
732 -e '/^hosts:/s/\s*myhostname//' \
733 -i $D${sysconfdir}/nsswitch.conf
734}
735
736PACKAGE_WRITE_DEPS += "qemu-native"
737pkg_postinst_udev-hwdb () {
738 if test -n "$D"; then
739 $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} rootlibexecdir="${rootlibexecdir}" PREFERRED_PROVIDER_udev="${PREFERRED_PROVIDER_udev}"
740 else
741 udevadm hwdb --update
742 fi
743}
744
745pkg_prerm_udev-hwdb () {
746 rm -f $D${sysconfdir}/udev/hwdb.bin
747}