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