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