summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd_244.5.bb
diff options
context:
space:
mode:
authorMikko Rapeli <mikko.rapeli@bmw.de>2020-12-14 11:53:31 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-01-13 08:57:57 +0000
commit1af84e8be6e665a660484f21da5a00167b669994 (patch)
tree6ca07205284c0191ee6ae4a661b996c3216886bc /meta/recipes-core/systemd/systemd_244.5.bb
parentb8d9f563e8f2653862c99a574522b422325b6357 (diff)
downloadpoky-1af84e8be6e665a660484f21da5a00167b669994.tar.gz
systemd: update from 244.3 to 244.5 stable release
Brings in a number of fixes from upstream stable tree: $ git log --format="%h %s" v244.3..v244.5 3ceaa81c61 kernel-install/90-loaderentry: fix when /boot is not mountpoint ecbb5a4f67 nspawn: fix fd leak on failure path a09947ddd4 nspawn: check return of setsid() 334f8e2e8f dissect: is_loop_device() returns negative on error, don't mistake that is true b6efbbfb00 dissect: always invalidate secondary arch partitions if we found primary arch dc5c5cd5c8 util: wireguard is merged into upstream kernel 6349956dda fstab-generator: add 'nofail' when NFS 'bg' option is used f4777883f9 busctl: add missing shortopt -l 9f6249eb7f bootctl: handle if LoaderSystemToken is invalid for some reason bda316cc0a hashmap: make sure to initialize shared hash key atomically b80ea9e3da backlight: do not claim that ID_BACKLIGHT_CLAMP= property is not set c829f6e7ca coredump: don't convert s → µs twice bb9d872398 firstboot: fill empty color if ansi_color unavailable from os-release 156570cc77 resolved: make sure we initialize t->answer_errno before completing the transaction 02bba02fa6 src/shared/dissect-image.c: fix build without blkdid (#16901) 13cb598631 analyze: fix error handling in one case 6ab20e9f3b units: add missing usb-gadget.target 9ef259dd4d login/logind: Include sys/stat.h for struct stat usage 7762e59fd4 partition/makefs: Include missing sys/file.h header 3528ace8fb networkctl: label command does not take any argument 34b4dc64c6 missing: Add new Linux capability ba28e6fc45 tty-ask-pw-agent: properly propagate error 7b6e0f74f2 tty-ask-pw-agent: the message string might not be set 0bfe4bd39b tty-ask-pw-agent: make sure "--list" works correctly 0783b4f8ce path: Improve $PATH search directory case d0735d81d4 path: Skip directories when finalising $PATH search 436872f995 rules: don't install 80-drivers.rules when kmod is disabled 342dc4c15f zsh: correct journalctl command completion parsing fec0bb6df4 basic/missing_syscall: fix syscall numbers for arm64 :( bea900bb31 shared/install: fix preset operations for non-service instantiated units 677fb2b663 user-runtime-dir: deal gracefully with missing logind properties 11a97bc230 shared/seccomp: do not use ifdef guards around textual syscall names d411a4d6a6 machine-id-setup: don't use KVM or container manager supplied uuid if in chroot env 9b078df0ba analyze-security: do not assign badness to filtered-out syscalls da0cc77b52 load-fragment: fix grammar in error messages 74d7c53e5f test: accept that char device 0/0 can now be created witout privileges 5c35bcf329 tools/make-man-index: fix purpose text that contains tags da1eb548fb Newer Glibc use faccessat2 to implement faccessat b44e86ef76 bless-boot: add missing verb to --help 88b6379bcd fix typo in systemctl help d091e19bbd _sd-common.h: avoid parsing errors with Coverity d56055f47f nspawn: Fix incorrect usage of putenv 674a2beff0 udev: fix codesonar warnings 16477684d2 sd-boot: fix -Wpointer-sign warning cc8aeb9916 network: fix static assertion on IPPROTO_MAX range f047b0706c sd-boot: fix menu ordering with boot counting 896de33984 tests: add a testcase for https://github.com/systemd/systemd/issues/15885 bbc6ff960a network: Fix crash when SendOption= is invalid 1599741b55 kernel-install: strip BOOT_IMAGE= from kernel options 1d1f5006cb basic/user-util: always use base 10 for user/group numbers b07d782047 parse-util: backport safe_atou32_full() 7bc54463ce Fix build with µhttpd 0.9.71 b074499894 random-seed: add missing header for GRND_NONBLOCK (#14988) ec9fd71358 makefs: strdup arguments to mkfs efd5b1d443 network-generator: allow empty hostname c188248371 network: DHCP lease load SIP copy paste error cd7d8bb962 davfs is a network file system 6aae7f596a logind: log a more accurate error when we failed at session creation f4d5928122 docs: Add syntax for templated units to systemd.preset man page 148f7b147a man: add a tiny bit of markup dbe16df9cd test: wait a bit after starting the test service a713f52ddb fix journalctl regression (#15099) 49e7c3b617 core: transition to FINAL_SIGTERM state after ExecStopPost= d25598854d journalctl: show duplicate entries if they are from the same file (#14898) 037a0fa5d0 udev: fix SECLABEL{selinux} issue (#15064) 9de06cd65a dissect-image: avoid scanning partitions fa65938017 test: ignore IAB capabilities in `test-execute` 16cac70094 Support compiling with clang and gnu11 standard 1ea52d91c8 Typo fix 869614a551 boot: Ensure ARM UEFI binary does not contain FP/SIMD instructions Patches CVE-2020-13776.patch and systemd-udev-seclabel-options-crash-fix.patch can be dropped as they are already applied in 244.5 upstream release. Not needed on master branch or gatesgarth as they run newer systemd version 246. Tested on an ARM64 target with automatic tests which are passing on our side. (From OE-Core rev: 0c5151a7ec6ac0aaed1bc56ebb89f17442683072) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd_244.5.bb')
-rw-r--r--meta/recipes-core/systemd/systemd_244.5.bb710
1 files changed, 710 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd_244.5.bb b/meta/recipes-core/systemd/systemd_244.5.bb
new file mode 100644
index 0000000000..8c95648ca0
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd_244.5.bb
@@ -0,0 +1,710 @@
1require systemd.inc
2
3PROVIDES = "udev"
4
5PE = "1"
6
7DEPENDS = "intltool-native gperf-native libcap util-linux"
8
9SECTION = "base/shell"
10
11inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages 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 \
21 file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
22 file://0003-implment-systemd-sysv-install-for-OE.patch \
23 "
24
25# patches needed by musl
26SRC_URI_append_libc-musl = " ${SRC_URI_MUSL}"
27SRC_URI_MUSL = "\
28 file://0002-don-t-use-glibc-specific-qsort_r.patch \
29 file://0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch \
30 file://0004-add-fallback-parse_printf_format-implementation.patch \
31 file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \
32 file://0006-Include-netinet-if_ether.h.patch \
33 file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch \
34 file://0008-add-missing-FTW_-macros-for-musl.patch \
35 file://0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch \
36 file://0011-Use-uintmax_t-for-handling-rlim_t.patch \
37 file://0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \
38 file://0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \
39 file://0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
40 file://0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \
41 file://0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \
42 file://0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \
43 file://0020-missing_type.h-add-__compar_d_fn_t-definition.patch \
44 file://0021-avoid-redefinition-of-prctl_mm_map-structure.patch \
45 file://0024-test-json.c-define-M_PIl.patch \
46 file://0001-do-not-disable-buffer-in-writing-files.patch \
47 file://0002-src-login-brightness.c-include-sys-wait.h.patch \
48 file://0003-src-basic-copy.c-include-signal.h.patch \
49 file://0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch \
50 "
51
52# already applied in 244.5
53CVE_CHECK_WHITELIST += "CVE-2020-13776"
54
55PAM_PLUGINS = " \
56 pam-plugin-unix \
57 pam-plugin-loginuid \
58 pam-plugin-keyinit \
59"
60
61PACKAGECONFIG ??= " \
62 ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux smack usrmerge polkit', d)} \
63 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
64 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', 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 utmp \
90 vconsole \
91 xz \
92"
93
94PACKAGECONFIG_remove_libc-musl = " \
95 gshadow \
96 idn \
97 localed \
98 myhostname \
99 nss \
100 nss-mymachines \
101 nss-resolve \
102 sysusers \
103 utmp \
104"
105
106CFLAGS_append_libc-musl = " -D__UAPI_DEF_ETHHDR=0 "
107
108# Use the upstream systemd serial-getty@.service and rely on
109# systemd-getty-generator instead of using the OE-core specific
110# systemd-serialgetty.bb - not enabled by default.
111PACKAGECONFIG[serial-getty-generator] = ""
112
113PACKAGECONFIG[acl] = "-Dacl=true,-Dacl=false,acl"
114PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit"
115PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false"
116PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false"
117PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2"
118PACKAGECONFIG[cgroupv2] = "-Ddefault-hierarchy=unified,-Ddefault-hierarchy=hybrid"
119PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false"
120PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup"
121PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus"
122PACKAGECONFIG[efi] = "-Defi=true,-Defi=false"
123PACKAGECONFIG[gnu-efi] = "-Dgnu-efi=true -Defi-libdir=${STAGING_LIBDIR} -Defi-includedir=${STAGING_INCDIR}/efi,-Dgnu-efi=false,gnu-efi"
124PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils"
125PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
126# Sign the journal for anti-tampering
127PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt"
128PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls"
129PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false"
130PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false"
131PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false"
132PACKAGECONFIG[idn] = "-Didn=true,-Didn=false"
133PACKAGECONFIG[ima] = "-Dima=true,-Dima=false"
134# importd requires curl/xz/zlib/bzip2/gcrypt
135PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false"
136# Update NAT firewall rules
137PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables"
138PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl"
139PACKAGECONFIG[kmod] = "-Dkmod=true,-Dkmod=false,kmod"
140PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false,,ldconfig"
141PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn"
142PACKAGECONFIG[libidn2] = "-Dlibidn2=true,-Dlibidn2=false,libidn2"
143PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false"
144PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false"
145PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4"
146PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false"
147PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
148PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd"
149PACKAGECONFIG[myhostname] = "-Dnss-myhostname=true,-Dnss-myhostname=false,,libnss-myhostname"
150PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false"
151PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false"
152PACKAGECONFIG[nss-mymachines] = "-Dnss-mymachines=true,-Dnss-mymachines=false"
153PACKAGECONFIG[nss-resolve] = "-Dnss-resolve=true,-Dnss-resolve=false"
154PACKAGECONFIG[openssl] = "-Dopenssl=true,-Dopenssl=false,openssl"
155PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}"
156PACKAGECONFIG[pcre2] = "-Dpcre2=true,-Dpcre2=false,libpcre2"
157PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false"
158PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false"
159PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode"
160PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false"
161PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false"
162PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false"
163PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false"
164# libseccomp is found in meta-security
165PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp"
166PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell"
167PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false"
168PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false"
169PACKAGECONFIG[sysvinit] = "-Dsysvinit-path=${sysconfdir}/init.d -Dsysvrcnd-path=${sysconfdir},-Dsysvinit-path= -Dsysvrcnd-path=,,update-rc.d"
170# When enabled use reproducble build timestamp if set as time epoch,
171# or build time if not. When disabled, time epoch is unset.
172def build_epoch(d):
173 epoch = d.getVar('SOURCE_DATE_EPOCH') or "-1"
174 return '-Dtime-epoch=%d' % int(epoch)
175PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0"
176PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false"
177PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false"
178PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true"
179PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true"
180PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false"
181PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind"
182PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup"
183# Verify keymaps on locale change
184PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon"
185PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz"
186PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib"
187
188# Helper variables to clarify locations. This mirrors the logic in systemd's
189# build system.
190rootprefix ?= "${root_prefix}"
191rootlibdir ?= "${base_libdir}"
192rootlibexecdir = "${rootprefix}/lib"
193
194# This links udev statically with systemd helper library.
195# Otherwise udev package would depend on systemd package (which has the needed shared library),
196# and always pull it into images.
197EXTRA_OEMESON += "-Dlink-udev-shared=false"
198
199EXTRA_OEMESON += "-Dnobody-user=nobody \
200 -Dnobody-group=nobody \
201 -Drootlibdir=${rootlibdir} \
202 -Drootprefix=${rootprefix} \
203 -Ddefault-locale=C \
204 "
205
206# Hardcode target binary paths to avoid using paths from sysroot
207EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \
208 -Dkmod-path=${base_bindir}/kmod \
209 -Dmount-path=${base_bindir}/mount \
210 -Dquotacheck-path=${sbindir}/quotacheck \
211 -Dquotaon-path=${sbindir}/quotaon \
212 -Dsulogin-path=${base_sbindir}/sulogin \
213 -Dnologin-path=${base_sbindir}/nologin \
214 -Dumount-path=${base_bindir}/umount"
215
216do_install() {
217 meson_do_install
218 install -d ${D}/${base_sbindir}
219 if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
220 # Provided by a separate recipe
221 rm ${D}${systemd_unitdir}/system/serial-getty* -f
222 fi
223
224 # Provide support for initramfs
225 [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
226 [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
227
228 install -d ${D}${sysconfdir}/udev/rules.d/
229 install -d ${D}${sysconfdir}/tmpfiles.d
230 install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
231
232 install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
233
234 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
235 install -d ${D}${sysconfdir}/init.d
236 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
237 sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
238 install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
239 fi
240
241 chown root:systemd-journal ${D}/${localstatedir}/log/journal
242
243 # Delete journal README, as log can be symlinked inside volatile.
244 rm -f ${D}/${localstatedir}/log/README
245
246 # journal-remote creates this at start
247 rm -rf ${D}/${localstatedir}/log/journal/remote
248
249 install -d ${D}${systemd_unitdir}/system/graphical.target.wants
250 install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
251 install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
252 install -d ${D}${systemd_unitdir}/system/reboot.target.wants
253 install -d ${D}${systemd_unitdir}/system/rescue.target.wants
254
255 # Create symlinks for systemd-update-utmp-runlevel.service
256 if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
257 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
258 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
259 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
260 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
261 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
262 fi
263
264 # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
265 # for existence else it fails
266 if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
267 ${@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)}
268 fi
269 if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
270 echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
271 echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
272 echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
273 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
274 else
275 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
276 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
277 fi
278 if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then
279 rm ${D}${exec_prefix}/lib/tmpfiles.d/x11.conf
280 rm -r ${D}${sysconfdir}/X11
281 fi
282
283 # If polkit is setup fixup permissions and ownership
284 if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
285 if [ -d ${D}${datadir}/polkit-1/rules.d ]; then
286 chmod 700 ${D}${datadir}/polkit-1/rules.d
287 chown polkitd:root ${D}${datadir}/polkit-1/rules.d
288 fi
289 fi
290
291 # create link for existing udev rules
292 ln -s ${base_bindir}/udevadm ${D}${base_sbindir}/udevadm
293
294 # duplicate udevadm for postinst script
295 install -d ${D}${libexecdir}
296 ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm
297
298 # install default policy for presets
299 # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto
300 install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset
301}
302
303python populate_packages_prepend (){
304 systemdlibdir = d.getVar("rootlibdir")
305 do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
306}
307PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*"
308
309PACKAGE_BEFORE_PN = "\
310 ${PN}-gui \
311 ${PN}-vconsole-setup \
312 ${PN}-initramfs \
313 ${PN}-analyze \
314 ${PN}-kernel-install \
315 ${PN}-rpm-macros \
316 ${PN}-binfmt \
317 ${PN}-zsh-completion \
318 ${PN}-container \
319 ${PN}-journal-gatewayd \
320 ${PN}-journal-upload \
321 ${PN}-journal-remote \
322 ${PN}-extra-utils \
323 udev \
324 udev-hwdb \
325"
326
327SUMMARY_${PN}-container = "Tools for containers and VMs"
328DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines."
329
330SUMMARY_${PN}-journal-gatewayd = "HTTP server for journal events"
331DESCRIPTION_${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."
332
333SUMMARY_${PN}-journal-upload = "Send journal messages over the network"
334DESCRIPTION_${PN}-journal-upload = "systemd-journal-upload uploads journal entries to a specified URL."
335
336SUMMARY_${PN}-journal-remote = "Receive journal messages over the network"
337DESCRIPTION_${PN}-journal-remote = "systemd-journal-remote is a command to receive serialized journal events and store them to journal files."
338
339SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)} \
340 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \
341 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \
342 ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \
343"
344SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
345
346USERADD_PACKAGES = "${PN} ${PN}-extra-utils \
347 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gateway', '', d)} \
348 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \
349 ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \
350"
351GROUPADD_PARAM_${PN} = "-r systemd-journal"
352USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"
353USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
354USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}"
355USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
356USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
357USERADD_PARAM_${PN}-extra-utils = "--system -d / -M --shell /bin/nologin systemd-bus-proxy"
358USERADD_PARAM_${PN}-journal-gateway = "--system -d / -M --shell /bin/nologin systemd-journal-gateway"
359USERADD_PARAM_${PN}-journal-remote = "--system -d / -M --shell /bin/nologin systemd-journal-remote"
360USERADD_PARAM_${PN}-journal-upload = "--system -d / -M --shell /bin/nologin systemd-journal-upload"
361
362FILES_${PN}-analyze = "${bindir}/systemd-analyze"
363
364FILES_${PN}-initramfs = "/init"
365RDEPENDS_${PN}-initramfs = "${PN}"
366
367FILES_${PN}-gui = "${bindir}/systemadm"
368
369FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
370 ${systemd_unitdir}/system/systemd-vconsole-setup.service \
371 ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
372
373RDEPENDS_${PN}-kernel-install += "bash"
374FILES_${PN}-kernel-install = "${bindir}/kernel-install \
375 ${sysconfdir}/kernel/ \
376 ${exec_prefix}/lib/kernel \
377 "
378FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
379 "
380
381FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions"
382
383FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
384 ${exec_prefix}/lib/binfmt.d \
385 ${rootlibexecdir}/systemd/systemd-binfmt \
386 ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
387 ${systemd_unitdir}/system/systemd-binfmt.service"
388RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
389
390RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
391
392
393FILES_${PN}-journal-gatewayd = "${rootlibexecdir}/systemd/systemd-journal-gatewayd \
394 ${systemd_system_unitdir}/systemd-journal-gatewayd.service \
395 ${systemd_system_unitdir}/systemd-journal-gatewayd.socket \
396 ${systemd_system_unitdir}/sockets.target.wants/systemd-journal-gatewayd.socket \
397 ${datadir}/systemd/gatewayd/browse.html \
398 "
399SYSTEMD_SERVICE_${PN}-journal-gatewayd = "systemd-journal-gatewayd.socket"
400
401FILES_${PN}-journal-upload = "${rootlibexecdir}/systemd/systemd-journal-upload \
402 ${systemd_system_unitdir}/systemd-journal-upload.service \
403 ${sysconfdir}/systemd/journal-upload.conf \
404 "
405SYSTEMD_SERVICE_${PN}-journal-upload = "systemd-journal-upload.service"
406
407FILES_${PN}-journal-remote = "${rootlibexecdir}/systemd/systemd-journal-remote \
408 ${sysconfdir}/systemd/journal-remote.conf \
409 ${systemd_system_unitdir}/systemd-journal-remote.service \
410 ${systemd_system_unitdir}/systemd-journal-remote.socket \
411 "
412SYSTEMD_SERVICE_${PN}-journal-remote = "systemd-journal-remote.socket"
413
414
415FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
416 ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
417 ${sysconfdir}/systemd/system/multi-user.target.wants/machines.target \
418 ${base_bindir}/machinectl \
419 ${bindir}/systemd-nspawn \
420 ${nonarch_libdir}/systemd/import-pubring.gpg \
421 ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \
422 ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \
423 ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \
424 ${systemd_system_unitdir}/machines.target.wants/var-lib-machines.mount \
425 ${systemd_system_unitdir}/remote-fs.target.wants/var-lib-machines.mount \
426 ${systemd_system_unitdir}/machine.slice \
427 ${systemd_system_unitdir}/machines.target \
428 ${systemd_system_unitdir}/org.freedesktop.import1.busname \
429 ${systemd_system_unitdir}/org.freedesktop.machine1.busname \
430 ${systemd_system_unitdir}/systemd-importd.service \
431 ${systemd_system_unitdir}/systemd-machined.service \
432 ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \
433 ${systemd_system_unitdir}/var-lib-machines.mount \
434 ${rootlibexecdir}/systemd/systemd-import \
435 ${rootlibexecdir}/systemd/systemd-importd \
436 ${rootlibexecdir}/systemd/systemd-machined \
437 ${rootlibexecdir}/systemd/systemd-pull \
438 ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
439 ${systemd_system_unitdir}/systemd-nspawn@.service \
440 ${libdir}/libnss_mymachines.so.2 \
441 ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
442 ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
443 ${datadir}/dbus-1/system.d/org.freedesktop.import1.conf \
444 ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \
445 ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
446 ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
447 "
448
449RRECOMMENDS_${PN}-container += "\
450 ${PN}-journal-upload \
451 ${PN}-journal-remote \
452 ${PN}-journal-gatewayd \
453 "
454
455FILES_${PN}-extra-utils = "\
456 ${base_bindir}/systemd-escape \
457 ${base_bindir}/systemd-inhibit \
458 ${bindir}/systemd-detect-virt \
459 ${bindir}/systemd-path \
460 ${bindir}/systemd-run \
461 ${bindir}/systemd-cat \
462 ${bindir}/systemd-delta \
463 ${bindir}/systemd-cgls \
464 ${bindir}/systemd-cgtop \
465 ${bindir}/systemd-stdio-bridge \
466 ${base_bindir}/systemd-ask-password \
467 ${base_bindir}/systemd-tty-ask-password-agent \
468 ${systemd_unitdir}/system/systemd-ask-password-console.path \
469 ${systemd_unitdir}/system/systemd-ask-password-console.service \
470 ${systemd_unitdir}/system/systemd-ask-password-wall.path \
471 ${systemd_unitdir}/system/systemd-ask-password-wall.service \
472 ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
473 ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \
474 ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
475 ${rootlibexecdir}/systemd/systemd-resolve-host \
476 ${rootlibexecdir}/systemd/systemd-ac-power \
477 ${rootlibexecdir}/systemd/systemd-activate \
478 ${rootlibexecdir}/systemd/systemd-bus-proxyd \
479 ${systemd_unitdir}/system/systemd-bus-proxyd.service \
480 ${systemd_unitdir}/system/systemd-bus-proxyd.socket \
481 ${rootlibexecdir}/systemd/systemd-socket-proxyd \
482 ${rootlibexecdir}/systemd/systemd-reply-password \
483 ${rootlibexecdir}/systemd/systemd-sleep \
484 ${rootlibexecdir}/systemd/system-sleep \
485 ${systemd_unitdir}/system/systemd-hibernate.service \
486 ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
487 ${systemd_unitdir}/system/systemd-suspend.service \
488 ${systemd_unitdir}/system/sleep.target \
489 ${rootlibexecdir}/systemd/systemd-initctl \
490 ${systemd_unitdir}/system/systemd-initctl.service \
491 ${systemd_unitdir}/system/systemd-initctl.socket \
492 ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
493 ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
494 ${rootlibexecdir}/systemd/systemd-cgroups-agent \
495"
496
497CONFFILES_${PN} = "${sysconfdir}/systemd/coredump.conf \
498 ${sysconfdir}/systemd/journald.conf \
499 ${sysconfdir}/systemd/logind.conf \
500 ${sysconfdir}/systemd/system.conf \
501 ${sysconfdir}/systemd/user.conf \
502 ${sysconfdir}/systemd/resolved.conf \
503 ${sysconfdir}/systemd/timesyncd.conf \
504"
505
506FILES_${PN} = " ${base_bindir}/* \
507 ${base_sbindir}/shutdown \
508 ${base_sbindir}/halt \
509 ${base_sbindir}/poweroff \
510 ${base_sbindir}/runlevel \
511 ${base_sbindir}/telinit \
512 ${base_sbindir}/resolvconf \
513 ${base_sbindir}/reboot \
514 ${base_sbindir}/init \
515 ${datadir}/dbus-1/services \
516 ${datadir}/dbus-1/system-services \
517 ${datadir}/polkit-1 \
518 ${datadir}/${BPN} \
519 ${datadir}/factory \
520 ${sysconfdir}/dbus-1/ \
521 ${sysconfdir}/modules-load.d/ \
522 ${sysconfdir}/pam.d/ \
523 ${sysconfdir}/sysctl.d/ \
524 ${sysconfdir}/systemd/ \
525 ${sysconfdir}/tmpfiles.d/ \
526 ${sysconfdir}/xdg/ \
527 ${sysconfdir}/init.d/README \
528 ${sysconfdir}/resolv-conf.systemd \
529 ${sysconfdir}/X11/xinit/xinitrc.d/* \
530 ${rootlibexecdir}/systemd/* \
531 ${systemd_unitdir}/* \
532 ${base_libdir}/security/*.so \
533 /cgroup \
534 ${bindir}/systemd* \
535 ${bindir}/busctl \
536 ${bindir}/coredumpctl \
537 ${bindir}/localectl \
538 ${bindir}/hostnamectl \
539 ${bindir}/resolvectl \
540 ${bindir}/timedatectl \
541 ${bindir}/bootctl \
542 ${exec_prefix}/lib/tmpfiles.d/*.conf \
543 ${exec_prefix}/lib/systemd \
544 ${exec_prefix}/lib/modules-load.d \
545 ${exec_prefix}/lib/sysctl.d \
546 ${exec_prefix}/lib/sysusers.d \
547 ${exec_prefix}/lib/environment.d \
548 ${localstatedir} \
549 ${rootlibexecdir}/udev/rules.d/70-uaccess.rules \
550 ${rootlibexecdir}/udev/rules.d/71-seat.rules \
551 ${rootlibexecdir}/udev/rules.d/73-seat-late.rules \
552 ${rootlibexecdir}/udev/rules.d/99-systemd.rules \
553 ${rootlibexecdir}/modprobe.d/systemd.conf \
554 ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
555 ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \
556 ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \
557 ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
558 ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
559 ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
560 ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \
561 ${datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf \
562 ${datadir}/dbus-1/system.d/org.freedesktop.portable1.conf \
563 "
564
565FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
566
567RDEPENDS_${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) util-linux-agetty util-linux-fsck"
568RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
569RDEPENDS_${PN} += "volatile-binds"
570
571RRECOMMENDS_${PN} += "systemd-extra-utils \
572 systemd-compat-units udev-hwdb \
573 e2fsprogs-e2fsck \
574 kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 kernel-module-sch-fq-codel \
575 os-release \
576 systemd-conf \
577"
578
579INSANE_SKIP_${PN} += "dev-so libdir"
580INSANE_SKIP_${PN}-dbg += "libdir"
581INSANE_SKIP_${PN}-doc += " libdir"
582
583RPROVIDES_udev = "hotplug"
584
585RDEPENDS_udev-hwdb += "udev"
586
587FILES_udev += "${base_sbindir}/udevd \
588 ${rootlibexecdir}/systemd/network/99-default.link \
589 ${rootlibexecdir}/systemd/systemd-udevd \
590 ${rootlibexecdir}/udev/accelerometer \
591 ${rootlibexecdir}/udev/ata_id \
592 ${rootlibexecdir}/udev/cdrom_id \
593 ${rootlibexecdir}/udev/collect \
594 ${rootlibexecdir}/udev/fido_id \
595 ${rootlibexecdir}/udev/findkeyboards \
596 ${rootlibexecdir}/udev/keyboard-force-release.sh \
597 ${rootlibexecdir}/udev/keymap \
598 ${rootlibexecdir}/udev/mtd_probe \
599 ${rootlibexecdir}/udev/scsi_id \
600 ${rootlibexecdir}/udev/v4l_id \
601 ${rootlibexecdir}/udev/keymaps \
602 ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \
603 ${rootlibexecdir}/udev/rules.d/60-autosuspend-chromiumos.rules \
604 ${rootlibexecdir}/udev/rules.d/60-block.rules \
605 ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \
606 ${rootlibexecdir}/udev/rules.d/60-drm.rules \
607 ${rootlibexecdir}/udev/rules.d/60-evdev.rules \
608 ${rootlibexecdir}/udev/rules.d/60-fido-id.rules \
609 ${rootlibexecdir}/udev/rules.d/60-input-id.rules \
610 ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \
611 ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \
612 ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \
613 ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \
614 ${rootlibexecdir}/udev/rules.d/60-persistent-v4l.rules \
615 ${rootlibexecdir}/udev/rules.d/60-sensor.rules \
616 ${rootlibexecdir}/udev/rules.d/60-serial.rules \
617 ${rootlibexecdir}/udev/rules.d/61-autosuspend-manual.rules \
618 ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \
619 ${rootlibexecdir}/udev/rules.d/70-joystick.rules \
620 ${rootlibexecdir}/udev/rules.d/70-mouse.rules \
621 ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
622 ${rootlibexecdir}/udev/rules.d/70-touchpad.rules \
623 ${rootlibexecdir}/udev/rules.d/75-net-description.rules \
624 ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \
625 ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \
626 ${rootlibexecdir}/udev/rules.d/80-drivers.rules \
627 ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \
628 ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \
629 ${sysconfdir}/udev \
630 ${sysconfdir}/init.d/systemd-udevd \
631 ${systemd_unitdir}/system/*udev* \
632 ${systemd_unitdir}/system/*.wants/*udev* \
633 ${base_bindir}/systemd-hwdb \
634 ${base_bindir}/udevadm \
635 ${base_sbindir}/udevadm \
636 ${libexecdir}/${MLPREFIX}udevadm \
637 ${datadir}/bash-completion/completions/udevadm \
638 ${systemd_unitdir}/system/systemd-hwdb-update.service \
639 "
640
641FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d \
642 "
643
644RCONFLICTS_${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}"
645
646INITSCRIPT_PACKAGES = "udev"
647INITSCRIPT_NAME_udev = "systemd-udevd"
648INITSCRIPT_PARAMS_udev = "start 03 S ."
649
650python __anonymous() {
651 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
652 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
653}
654
655python do_warn_musl() {
656 if d.getVar('TCLIBC') == "musl":
657 bb.warn("Using systemd with musl is not recommended since it is not supported upstream and some patches are known to be problematic.")
658}
659addtask warn_musl before do_configure
660
661ALTERNATIVE_${PN} = "halt reboot shutdown poweroff runlevel ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}"
662
663ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
664ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
665ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"
666
667ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
668ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
669ALTERNATIVE_PRIORITY[halt] ?= "300"
670
671ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
672ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
673ALTERNATIVE_PRIORITY[reboot] ?= "300"
674
675ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
676ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
677ALTERNATIVE_PRIORITY[shutdown] ?= "300"
678
679ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
680ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
681ALTERNATIVE_PRIORITY[poweroff] ?= "300"
682
683ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
684ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
685ALTERNATIVE_PRIORITY[runlevel] ?= "300"
686
687pkg_postinst_${PN}_libc-glibc () {
688 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
689 -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
690 -i $D${sysconfdir}/nsswitch.conf
691}
692
693pkg_prerm_${PN}_libc-glibc () {
694 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
695 -e '/^hosts:/s/\s*myhostname//' \
696 -i $D${sysconfdir}/nsswitch.conf
697}
698
699PACKAGE_WRITE_DEPS += "qemu-native"
700pkg_postinst_udev-hwdb () {
701 if test -n "$D"; then
702 $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} rootlibexecdir="${rootlibexecdir}" PREFERRED_PROVIDER_udev="${PREFERRED_PROVIDER_udev}"
703 else
704 udevadm hwdb --update
705 fi
706}
707
708pkg_prerm_udev-hwdb () {
709 rm -f $D${sysconfdir}/udev/hwdb.bin
710}