diff options
author | Alex Kiernan <alex.kiernan@gmail.com> | 2020-02-16 11:42:24 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-02-18 23:53:54 +0000 |
commit | 548cfcb5480adab3c504f8ca321fce9acbbd8bb8 (patch) | |
tree | 6df130bf3f9edc61dc5bcd267303dbb51202d25e /meta/recipes-core/systemd/systemd_244.3.bb | |
parent | e1a2a5a206438e125811c22b25bc271014fc7e76 (diff) | |
download | poky-548cfcb5480adab3c504f8ca321fce9acbbd8bb8.tar.gz |
systemd: upgrade v244.1 -> v244.3
Drop all systemd-boot patches and use an additional cross-file instead
to pick up EFI cc and objcopy. For EFI ld, we can use the command line
efi-ld option, but have to ensure it's something which can be exec'd
directly.
Commits from v244-stable:
c4280c342bbf Revert "Support Plugable UD-PRO8 dock"
bb598b56eb3c hibernate-resume-generator: wait "infinitely" for the resume device
77c04ce5c270 hwdb: update to v245-rc1
b4eb8848240c Fix typo in function name
e2d4cb9843c5 polkit: when authorizing via PK let's re-resolve callback/userdata instead of caching it
83bfc0d8dd02 sd-bus: introduce API for re-enqueuing incoming messages
5926f9f1723f polkit: use structured initialization
0697d0d972c8 polkit: on async pk requests, re-validate action/details
2589995acdb2 polkit: reuse some common bus message appending code
5b2442d5c3ec bus-polkit: rename return error parameter to ret_error
0a19ff7004e4 shared: split out polkit stuff from bus-util.c → bus-polkit.c
1325dfb5778d test: adapt to the new capsh format
3538fafb4714 meson: update efi path detection to gnu-efi-3.0.11
3034855a5b62 presets: "disable" all passive targets by default
c2e304681929 shared/sysctl-util: normalize repeated slashes or dots to a single value
6f4364046f90 dhcp6: do not use T1 and T2 longer than one provided by the lease
0ed6cda28dff network: fix implicit type conversion warning by GCC-10
f6a5c02d26b1 bootspec: parse random-seed-mode line in loader.conf
ddc5dca8a73b sd-boot: fix typo
2bbbe9ae41ab test: Synchronize journal before reading from it
072485d661d7 sd-bus: fix introspection bug in signal parameter names
80af3cf5e36b efi: fix build.
d7ede1ade564 generator: order growfs for the root fs after systemd-remount-fs
e9904998213d loginctl: use /org/freedesktop/login1/session/auto when "lock-session" is called without argument
82dd4caf014c Documentation update for x-systemd.{before,after}
a60459764d9d man: fix typo in systemd.netdev Xfrm example
fc053e2dfb3f timesyncd: log louder when we refuse a server due to root distance
af0e630693fa resolved: drop DNSSEC root key that is not valid anymore
ae59f1666ca6 journal: don't use startswith() on something that is not a NUL-terminated string
536ef6d72bc6 test: add test for https://github.com/systemd/systemd/issues/14560
b78fe3c1b1a8 core: make sure StandardInput=file: doesn't get dup'ed to stdout/stderr by default
a1561a08f2d5 pkgconf: add full generator paths
e5f2d11489ec tree-wide: we forgot to destroy some bus errors
ea67fd42067b mount: make checks on perpetual mount units more lax
2f23c648bce4 core: never allow perpetual units to be masked
9ba11dffb09a typo: "May modify to" -> "May modify"
84c048799a78 Disable reading SystemdOptions EFI Var when in SecureBoot mode
4c2d72b53091 sysctl: downgrade message when we have no permission
c001a285a3a2 Clarify journald.conf MaxLevelStore documentation
45d52c7615fd logind: refuse overriding idle hint on tty sessions
b1a0be45b4ee cgroup: update only siblings that got realized once
e6d694254fe1 mount: mark an existing "mounting" unit from /proc/self/mountinfo as "just_mounted"
d8fd38769c36 journalctl: Correctly handle combination of --reverse and --lines (fixes #1596)
cd19bd31d808 journalctl: Correctly handle --show-cursor in combination with --until or --since and --reverse
1320aa92dc0a core: fix re-realization of cgroup siblings
14164ec6bc77 core: propagate service state to socket in more load states
c22bf6b31a45 man: describe "symlink" and "systemctl link" explicitly in UNIT FILE LOAD PATH
26f3a534f1ab core: be more restrictive on the dependency types we allow to be created transiently
377cc5d91ea5 udev: don't import parent ID_FS_ data on partitions
7d5060d53994 man: fix option name
98c03090274a Support Plugable UD-PRO8 dock
e9687d09dccf gpt-auto: don't assume XBOOTLDR is vfat
7057fe863007 man: fix documentation of IBM VIO device naming
f8d1df1045be man: slightly extend documentation on difference between ID_NET_NAME_ONBOARD and ID_NET_LABEL_ONBOARD
1faf5dde4d4a boot: fix osrel parser
65d247af1786 udev: do not use exact match of file permission
6da978f89b48 network: lower the log-level of harmless message
5d8a614f926c hwdb: ignore keys added in kernel 5.5
8b1bd1746989 systemctl: skip non-existent units in the 'cat' verb
b2f342f92b54 systemd.exec: document the file system for EnvironmentFile paths
945f3a231f6f systemd-analyze: fixed typo in documentation
2c8ae283b0ee test-condition: fix group check condition
6b48479f4582 umount: show correct error message
faba5b2ba8c9 Revert "Drop dbus activation stub service"
3dd98f1998f9 man: add section about user manager units
1c80a8ced006 man: add remote-*.targets to the bootup sequence
9afd65f15e93 time-util: also use 32bit hack on EOVERFLOW
561923291383 [man] note which UID ranges will get user journals
588a23ef2684 [man] fix URL
0130a03179f6 analyze: badness if neither of RootImage and RootDirectory exists
93074c962e3a network: introduce AddPrefixRoute= and deprecate PrefixRoute=
a8ad020ea0ba shared/dropin: fix assert for invalid drop-in
946cdba156dd initrd: make udev cleanup service confict trigger and settle too
c0a8a92e6027 man: we support growing xfs too these days
608d88273494 time-util: deal with systems where userspace has 64bit time_t but kernel does not
cfced59a4bd8 [import] fix stdin/stdout pipe behavior in import/export tar/raw
73435b219553 systemctl: show what verbs support --dry-run in the help page
dc56b94e1308 cryptsetup-generator: unconfuse writing of the device timeout
0757ad565573 shared/install: log syntax error for invalid DefaultInstance=
d2471109d999 shared/install: provide a nicer error message for invalid WantedBy=/Required= values
(From OE-Core rev: 59dbb6d8ed32227c26db1982099ea845d92fff81)
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.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.bb | 680 |
1 files changed, 680 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd_244.3.bb b/meta/recipes-core/systemd/systemd_244.3.bb new file mode 100644 index 0000000000..b686519482 --- /dev/null +++ b/meta/recipes-core/systemd/systemd_244.3.bb | |||
@@ -0,0 +1,680 @@ | |||
1 | require systemd.inc | ||
2 | |||
3 | PROVIDES = "udev" | ||
4 | |||
5 | PE = "1" | ||
6 | |||
7 | DEPENDS = "intltool-native gperf-native libcap util-linux" | ||
8 | |||
9 | SECTION = "base/shell" | ||
10 | |||
11 | inherit 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. | ||
15 | REQUIRED_DISTRO_FEATURES = "systemd" | ||
16 | |||
17 | SRC_URI += "file://touchscreen.rules \ | ||
18 | file://00-create-volatile.conf \ | ||
19 | file://init \ | ||
20 | file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ | ||
21 | file://0003-implment-systemd-sysv-install-for-OE.patch \ | ||
22 | file://99-default.preset \ | ||
23 | " | ||
24 | |||
25 | # patches needed by musl | ||
26 | SRC_URI_append_libc-musl = " ${SRC_URI_MUSL}" | ||
27 | SRC_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://0022-Use-INT_MAX-instead-of-TIME_T_MAX-for-timerfd_settim.patch \ | ||
46 | file://0024-test-json.c-define-M_PIl.patch \ | ||
47 | file://0001-do-not-disable-buffer-in-writing-files.patch \ | ||
48 | file://0002-src-login-brightness.c-include-sys-wait.h.patch \ | ||
49 | file://0003-src-basic-copy.c-include-signal.h.patch \ | ||
50 | file://0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch \ | ||
51 | " | ||
52 | |||
53 | PAM_PLUGINS = " \ | ||
54 | pam-plugin-unix \ | ||
55 | pam-plugin-loginuid \ | ||
56 | pam-plugin-keyinit \ | ||
57 | " | ||
58 | |||
59 | PACKAGECONFIG ??= " \ | ||
60 | ${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux usrmerge polkit', d)} \ | ||
61 | ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \ | ||
62 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \ | ||
63 | acl \ | ||
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 | smack \ | ||
85 | sysusers \ | ||
86 | timedated \ | ||
87 | timesyncd \ | ||
88 | utmp \ | ||
89 | vconsole \ | ||
90 | xz \ | ||
91 | " | ||
92 | |||
93 | PACKAGECONFIG_remove_libc-musl = " \ | ||
94 | gshadow \ | ||
95 | idn \ | ||
96 | localed \ | ||
97 | myhostname \ | ||
98 | nss \ | ||
99 | nss-mymachines \ | ||
100 | nss-resolve \ | ||
101 | resolved \ | ||
102 | smack \ | ||
103 | sysusers \ | ||
104 | utmp \ | ||
105 | " | ||
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. | ||
110 | PACKAGECONFIG[serial-getty-generator] = "" | ||
111 | |||
112 | PACKAGECONFIG[acl] = "-Dacl=true,-Dacl=false,acl" | ||
113 | PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit" | ||
114 | PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false" | ||
115 | PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false" | ||
116 | PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2" | ||
117 | PACKAGECONFIG[cgroupv2] = "-Ddefault-hierarchy=unified,-Ddefault-hierarchy=hybrid" | ||
118 | PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false" | ||
119 | PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup" | ||
120 | PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus" | ||
121 | PACKAGECONFIG[efi] = "-Defi=true,-Defi=false" | ||
122 | PACKAGECONFIG[gnu-efi] = "-Dgnu-efi=true -Defi-libdir=${STAGING_LIBDIR} -Defi-includedir=${STAGING_INCDIR}/efi,-Dgnu-efi=false,gnu-efi" | ||
123 | PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils" | ||
124 | PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false" | ||
125 | # Sign the journal for anti-tampering | ||
126 | PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt" | ||
127 | PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls" | ||
128 | PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" | ||
129 | PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false" | ||
130 | PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false" | ||
131 | PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" | ||
132 | PACKAGECONFIG[ima] = "-Dima=true,-Dima=false" | ||
133 | # importd requires curl/xz/zlib/bzip2/gcrypt | ||
134 | PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false" | ||
135 | # Update NAT firewall rules | ||
136 | PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables" | ||
137 | PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl" | ||
138 | PACKAGECONFIG[kmod] = "-Dkmod=true,-Dkmod=false,kmod" | ||
139 | PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false,,ldconfig" | ||
140 | PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn" | ||
141 | PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false" | ||
142 | PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false" | ||
143 | PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4" | ||
144 | PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false" | ||
145 | PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" | ||
146 | PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd" | ||
147 | PACKAGECONFIG[myhostname] = "-Dnss-myhostname=true,-Dnss-myhostname=false,,libnss-myhostname" | ||
148 | PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false" | ||
149 | PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false" | ||
150 | PACKAGECONFIG[nss-mymachines] = "-Dnss-mymachines=true,-Dnss-mymachines=false" | ||
151 | PACKAGECONFIG[nss-resolve] = "-Dnss-resolve=true,-Dnss-resolve=false" | ||
152 | PACKAGECONFIG[openssl] = "-Dopenssl=true,-Dopenssl=false,openssl" | ||
153 | PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}" | ||
154 | PACKAGECONFIG[pcre2] = "-Dpcre2=true,-Dpcre2=false,libpcre2" | ||
155 | PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false" | ||
156 | PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false" | ||
157 | PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode" | ||
158 | PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false" | ||
159 | PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false" | ||
160 | PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false" | ||
161 | PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false" | ||
162 | # libseccomp is found in meta-security | ||
163 | PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp" | ||
164 | PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell" | ||
165 | PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false" | ||
166 | PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false" | ||
167 | # When enabled use reproducble build timestamp if set as time epoch, | ||
168 | # or build time if not. When disabled, time epoch is unset. | ||
169 | def build_epoch(d): | ||
170 | epoch = d.getVar('SOURCE_DATE_EPOCH') or "-1" | ||
171 | return '-Dtime-epoch=%d' % int(epoch) | ||
172 | PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0" | ||
173 | PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false" | ||
174 | PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false" | ||
175 | PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true" | ||
176 | PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true" | ||
177 | PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false" | ||
178 | PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind" | ||
179 | PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup" | ||
180 | # Verify keymaps on locale change | ||
181 | PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon" | ||
182 | PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz" | ||
183 | PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib" | ||
184 | |||
185 | # Helper variables to clarify locations. This mirrors the logic in systemd's | ||
186 | # build system. | ||
187 | rootprefix ?= "${root_prefix}" | ||
188 | rootlibdir ?= "${base_libdir}" | ||
189 | rootlibexecdir = "${rootprefix}/lib" | ||
190 | |||
191 | # This links udev statically with systemd helper library. | ||
192 | # Otherwise udev package would depend on systemd package (which has the needed shared library), | ||
193 | # and always pull it into images. | ||
194 | EXTRA_OEMESON += "-Dlink-udev-shared=false" | ||
195 | |||
196 | EXTRA_OEMESON += "-Dnobody-user=nobody \ | ||
197 | -Dnobody-group=nobody \ | ||
198 | -Drootlibdir=${rootlibdir} \ | ||
199 | -Drootprefix=${rootprefix} \ | ||
200 | -Dsysvrcnd-path=${sysconfdir} \ | ||
201 | -Ddefault-locale=C \ | ||
202 | " | ||
203 | |||
204 | # Hardcode target binary paths to avoid using paths from sysroot | ||
205 | EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \ | ||
206 | -Dkmod-path=${base_bindir}/kmod \ | ||
207 | -Dmount-path=${base_bindir}/mount \ | ||
208 | -Dquotacheck-path=${sbindir}/quotacheck \ | ||
209 | -Dquotaon-path=${sbindir}/quotaon \ | ||
210 | -Dsulogin-path=${base_sbindir}/sulogin \ | ||
211 | -Dnologin-path=${base_sbindir}/nologin \ | ||
212 | -Dumount-path=${base_bindir}/umount" | ||
213 | |||
214 | do_install() { | ||
215 | meson_do_install | ||
216 | install -d ${D}/${base_sbindir} | ||
217 | if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then | ||
218 | # Provided by a separate recipe | ||
219 | rm ${D}${systemd_unitdir}/system/serial-getty* -f | ||
220 | fi | ||
221 | |||
222 | # Provide support for initramfs | ||
223 | [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init | ||
224 | [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd | ||
225 | |||
226 | install -d ${D}${sysconfdir}/udev/rules.d/ | ||
227 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
228 | install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/ | ||
229 | |||
230 | install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ | ||
231 | |||
232 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | ||
233 | install -d ${D}${sysconfdir}/init.d | ||
234 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd | ||
235 | sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd | ||
236 | fi | ||
237 | |||
238 | chown root:systemd-journal ${D}/${localstatedir}/log/journal | ||
239 | |||
240 | # Delete journal README, as log can be symlinked inside volatile. | ||
241 | rm -f ${D}/${localstatedir}/log/README | ||
242 | |||
243 | # journal-remote creates this at start | ||
244 | rm -rf ${D}/${localstatedir}/log/journal/remote | ||
245 | |||
246 | install -d ${D}${systemd_unitdir}/system/graphical.target.wants | ||
247 | install -d ${D}${systemd_unitdir}/system/multi-user.target.wants | ||
248 | install -d ${D}${systemd_unitdir}/system/poweroff.target.wants | ||
249 | install -d ${D}${systemd_unitdir}/system/reboot.target.wants | ||
250 | install -d ${D}${systemd_unitdir}/system/rescue.target.wants | ||
251 | |||
252 | # Create symlinks for systemd-update-utmp-runlevel.service | ||
253 | if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then | ||
254 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service | ||
255 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service | ||
256 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service | ||
257 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service | ||
258 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service | ||
259 | fi | ||
260 | |||
261 | # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it | ||
262 | # for existence else it fails | ||
263 | if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then | ||
264 | ${@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)} | ||
265 | fi | ||
266 | if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then | ||
267 | echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf | ||
268 | echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf | ||
269 | echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf | ||
270 | ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd | ||
271 | else | ||
272 | 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 | ||
273 | ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd | ||
274 | fi | ||
275 | install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install | ||
276 | |||
277 | # If polkit is setup fixup permissions and ownership | ||
278 | if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then | ||
279 | if [ -d ${D}${datadir}/polkit-1/rules.d ]; then | ||
280 | chmod 700 ${D}${datadir}/polkit-1/rules.d | ||
281 | chown polkitd:root ${D}${datadir}/polkit-1/rules.d | ||
282 | fi | ||
283 | fi | ||
284 | |||
285 | # create link for existing udev rules | ||
286 | ln -s ${base_bindir}/udevadm ${D}${base_sbindir}/udevadm | ||
287 | |||
288 | # duplicate udevadm for postinst script | ||
289 | install -d ${D}${libexecdir} | ||
290 | ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm | ||
291 | |||
292 | # install default policy for presets | ||
293 | # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto | ||
294 | install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset | ||
295 | |||
296 | # We use package postinsts for the hwdb update, as the update service is | ||
297 | # easily triggered for no reason and will slow down boots. | ||
298 | find ${D} -name systemd-hwdb-update.service -delete | ||
299 | } | ||
300 | |||
301 | python populate_packages_prepend (){ | ||
302 | systemdlibdir = d.getVar("rootlibdir") | ||
303 | do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) | ||
304 | } | ||
305 | PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*" | ||
306 | |||
307 | PACKAGES =+ "\ | ||
308 | ${PN}-gui \ | ||
309 | ${PN}-vconsole-setup \ | ||
310 | ${PN}-initramfs \ | ||
311 | ${PN}-analyze \ | ||
312 | ${PN}-kernel-install \ | ||
313 | ${PN}-rpm-macros \ | ||
314 | ${PN}-binfmt \ | ||
315 | ${PN}-zsh-completion \ | ||
316 | ${PN}-container \ | ||
317 | ${PN}-journal-gatewayd \ | ||
318 | ${PN}-journal-upload \ | ||
319 | ${PN}-journal-remote \ | ||
320 | ${PN}-extra-utils \ | ||
321 | " | ||
322 | |||
323 | SUMMARY_${PN}-container = "Tools for containers and VMs" | ||
324 | DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines." | ||
325 | |||
326 | SUMMARY_${PN}-journal-gatewayd = "HTTP server for journal events" | ||
327 | DESCRIPTION_${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." | ||
328 | |||
329 | SUMMARY_${PN}-journal-upload = "Send journal messages over the network" | ||
330 | DESCRIPTION_${PN}-journal-upload = "systemd-journal-upload uploads journal entries to a specified URL." | ||
331 | |||
332 | SUMMARY_${PN}-journal-remote = "Receive journal messages over the network" | ||
333 | DESCRIPTION_${PN}-journal-remote = "systemd-journal-remote is a command to receive serialized journal events and store them to journal files." | ||
334 | |||
335 | SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)} \ | ||
336 | ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \ | ||
337 | ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ | ||
338 | ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ | ||
339 | " | ||
340 | SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" | ||
341 | |||
342 | USERADD_PACKAGES = "${PN} ${PN}-extra-utils \ | ||
343 | ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gateway', '', d)} \ | ||
344 | ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ | ||
345 | ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ | ||
346 | " | ||
347 | GROUPADD_PARAM_${PN} = "-r systemd-journal" | ||
348 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}" | ||
349 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}" | ||
350 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}" | ||
351 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}" | ||
352 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}" | ||
353 | USERADD_PARAM_${PN}-extra-utils = "--system -d / -M --shell /bin/nologin systemd-bus-proxy" | ||
354 | USERADD_PARAM_${PN}-journal-gateway = "--system -d / -M --shell /bin/nologin systemd-journal-gateway" | ||
355 | USERADD_PARAM_${PN}-journal-remote = "--system -d / -M --shell /bin/nologin systemd-journal-remote" | ||
356 | USERADD_PARAM_${PN}-journal-upload = "--system -d / -M --shell /bin/nologin systemd-journal-upload" | ||
357 | |||
358 | FILES_${PN}-analyze = "${bindir}/systemd-analyze" | ||
359 | |||
360 | FILES_${PN}-initramfs = "/init" | ||
361 | RDEPENDS_${PN}-initramfs = "${PN}" | ||
362 | |||
363 | FILES_${PN}-gui = "${bindir}/systemadm" | ||
364 | |||
365 | FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \ | ||
366 | ${systemd_unitdir}/system/systemd-vconsole-setup.service \ | ||
367 | ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service" | ||
368 | |||
369 | RDEPENDS_${PN}-kernel-install += "bash" | ||
370 | FILES_${PN}-kernel-install = "${bindir}/kernel-install \ | ||
371 | ${sysconfdir}/kernel/ \ | ||
372 | ${exec_prefix}/lib/kernel \ | ||
373 | " | ||
374 | FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \ | ||
375 | " | ||
376 | |||
377 | FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions" | ||
378 | |||
379 | FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \ | ||
380 | ${exec_prefix}/lib/binfmt.d \ | ||
381 | ${rootlibexecdir}/systemd/systemd-binfmt \ | ||
382 | ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \ | ||
383 | ${systemd_unitdir}/system/systemd-binfmt.service" | ||
384 | RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc" | ||
385 | |||
386 | RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps" | ||
387 | |||
388 | |||
389 | FILES_${PN}-journal-gatewayd = "${rootlibexecdir}/systemd/systemd-journal-gatewayd \ | ||
390 | ${systemd_system_unitdir}/systemd-journal-gatewayd.service \ | ||
391 | ${systemd_system_unitdir}/systemd-journal-gatewayd.socket \ | ||
392 | ${systemd_system_unitdir}/sockets.target.wants/systemd-journal-gatewayd.socket \ | ||
393 | ${datadir}/systemd/gatewayd/browse.html \ | ||
394 | " | ||
395 | SYSTEMD_SERVICE_${PN}-journal-gatewayd = "systemd-journal-gatewayd.socket" | ||
396 | |||
397 | FILES_${PN}-journal-upload = "${rootlibexecdir}/systemd/systemd-journal-upload \ | ||
398 | ${systemd_system_unitdir}/systemd-journal-upload.service \ | ||
399 | ${sysconfdir}/systemd/journal-upload.conf \ | ||
400 | " | ||
401 | SYSTEMD_SERVICE_${PN}-journal-upload = "systemd-journal-upload.service" | ||
402 | |||
403 | FILES_${PN}-journal-remote = "${rootlibexecdir}/systemd/systemd-journal-remote \ | ||
404 | ${sysconfdir}/systemd/journal-remote.conf \ | ||
405 | ${systemd_system_unitdir}/systemd-journal-remote.service \ | ||
406 | ${systemd_system_unitdir}/systemd-journal-remote.socket \ | ||
407 | " | ||
408 | SYSTEMD_SERVICE_${PN}-journal-remote = "systemd-journal-remote.socket" | ||
409 | |||
410 | |||
411 | FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \ | ||
412 | ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \ | ||
413 | ${sysconfdir}/systemd/system/multi-user.target.wants/machines.target \ | ||
414 | ${base_bindir}/machinectl \ | ||
415 | ${bindir}/systemd-nspawn \ | ||
416 | ${nonarch_libdir}/systemd/import-pubring.gpg \ | ||
417 | ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \ | ||
418 | ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \ | ||
419 | ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \ | ||
420 | ${systemd_system_unitdir}/machines.target.wants/var-lib-machines.mount \ | ||
421 | ${systemd_system_unitdir}/remote-fs.target.wants/var-lib-machines.mount \ | ||
422 | ${systemd_system_unitdir}/machine.slice \ | ||
423 | ${systemd_system_unitdir}/machines.target \ | ||
424 | ${systemd_system_unitdir}/org.freedesktop.import1.busname \ | ||
425 | ${systemd_system_unitdir}/org.freedesktop.machine1.busname \ | ||
426 | ${systemd_system_unitdir}/systemd-importd.service \ | ||
427 | ${systemd_system_unitdir}/systemd-machined.service \ | ||
428 | ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \ | ||
429 | ${systemd_system_unitdir}/var-lib-machines.mount \ | ||
430 | ${rootlibexecdir}/systemd/systemd-import \ | ||
431 | ${rootlibexecdir}/systemd/systemd-importd \ | ||
432 | ${rootlibexecdir}/systemd/systemd-machined \ | ||
433 | ${rootlibexecdir}/systemd/systemd-pull \ | ||
434 | ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \ | ||
435 | ${systemd_system_unitdir}/systemd-nspawn@.service \ | ||
436 | ${libdir}/libnss_mymachines.so.2 \ | ||
437 | ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \ | ||
438 | ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \ | ||
439 | ${datadir}/dbus-1/system.d/org.freedesktop.import1.conf \ | ||
440 | ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \ | ||
441 | ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \ | ||
442 | ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \ | ||
443 | " | ||
444 | |||
445 | RRECOMMENDS_${PN}-container += "\ | ||
446 | ${PN}-journal-upload \ | ||
447 | ${PN}-journal-remote \ | ||
448 | ${PN}-journal-gatewayd \ | ||
449 | " | ||
450 | |||
451 | FILES_${PN}-extra-utils = "\ | ||
452 | ${base_bindir}/systemd-escape \ | ||
453 | ${base_bindir}/systemd-inhibit \ | ||
454 | ${bindir}/systemd-detect-virt \ | ||
455 | ${bindir}/systemd-path \ | ||
456 | ${bindir}/systemd-run \ | ||
457 | ${bindir}/systemd-cat \ | ||
458 | ${bindir}/systemd-delta \ | ||
459 | ${bindir}/systemd-cgls \ | ||
460 | ${bindir}/systemd-cgtop \ | ||
461 | ${bindir}/systemd-stdio-bridge \ | ||
462 | ${base_bindir}/systemd-ask-password \ | ||
463 | ${base_bindir}/systemd-tty-ask-password-agent \ | ||
464 | ${systemd_unitdir}/system/systemd-ask-password-console.path \ | ||
465 | ${systemd_unitdir}/system/systemd-ask-password-console.service \ | ||
466 | ${systemd_unitdir}/system/systemd-ask-password-wall.path \ | ||
467 | ${systemd_unitdir}/system/systemd-ask-password-wall.service \ | ||
468 | ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \ | ||
469 | ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \ | ||
470 | ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \ | ||
471 | ${rootlibexecdir}/systemd/systemd-resolve-host \ | ||
472 | ${rootlibexecdir}/systemd/systemd-ac-power \ | ||
473 | ${rootlibexecdir}/systemd/systemd-activate \ | ||
474 | ${rootlibexecdir}/systemd/systemd-bus-proxyd \ | ||
475 | ${systemd_unitdir}/system/systemd-bus-proxyd.service \ | ||
476 | ${systemd_unitdir}/system/systemd-bus-proxyd.socket \ | ||
477 | ${rootlibexecdir}/systemd/systemd-socket-proxyd \ | ||
478 | ${rootlibexecdir}/systemd/systemd-reply-password \ | ||
479 | ${rootlibexecdir}/systemd/systemd-sleep \ | ||
480 | ${rootlibexecdir}/systemd/system-sleep \ | ||
481 | ${systemd_unitdir}/system/systemd-hibernate.service \ | ||
482 | ${systemd_unitdir}/system/systemd-hybrid-sleep.service \ | ||
483 | ${systemd_unitdir}/system/systemd-suspend.service \ | ||
484 | ${systemd_unitdir}/system/sleep.target \ | ||
485 | ${rootlibexecdir}/systemd/systemd-initctl \ | ||
486 | ${systemd_unitdir}/system/systemd-initctl.service \ | ||
487 | ${systemd_unitdir}/system/systemd-initctl.socket \ | ||
488 | ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \ | ||
489 | ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \ | ||
490 | ${rootlibexecdir}/systemd/systemd-cgroups-agent \ | ||
491 | " | ||
492 | |||
493 | CONFFILES_${PN} = "${sysconfdir}/systemd/coredump.conf \ | ||
494 | ${sysconfdir}/systemd/journald.conf \ | ||
495 | ${sysconfdir}/systemd/logind.conf \ | ||
496 | ${sysconfdir}/systemd/system.conf \ | ||
497 | ${sysconfdir}/systemd/user.conf \ | ||
498 | ${sysconfdir}/systemd/resolved.conf \ | ||
499 | ${sysconfdir}/systemd/timesyncd.conf \ | ||
500 | " | ||
501 | |||
502 | FILES_${PN} = " ${base_bindir}/* \ | ||
503 | ${base_sbindir}/shutdown \ | ||
504 | ${base_sbindir}/halt \ | ||
505 | ${base_sbindir}/poweroff \ | ||
506 | ${base_sbindir}/runlevel \ | ||
507 | ${base_sbindir}/telinit \ | ||
508 | ${base_sbindir}/resolvconf \ | ||
509 | ${base_sbindir}/reboot \ | ||
510 | ${base_sbindir}/init \ | ||
511 | ${datadir}/dbus-1/services \ | ||
512 | ${datadir}/dbus-1/system-services \ | ||
513 | ${datadir}/polkit-1 \ | ||
514 | ${datadir}/${BPN} \ | ||
515 | ${datadir}/factory \ | ||
516 | ${sysconfdir}/dbus-1/ \ | ||
517 | ${sysconfdir}/modules-load.d/ \ | ||
518 | ${sysconfdir}/pam.d/ \ | ||
519 | ${sysconfdir}/sysctl.d/ \ | ||
520 | ${sysconfdir}/systemd/ \ | ||
521 | ${sysconfdir}/tmpfiles.d/ \ | ||
522 | ${sysconfdir}/xdg/ \ | ||
523 | ${sysconfdir}/init.d/README \ | ||
524 | ${sysconfdir}/resolv-conf.systemd \ | ||
525 | ${sysconfdir}/X11/xinit/xinitrc.d/* \ | ||
526 | ${rootlibexecdir}/systemd/* \ | ||
527 | ${systemd_unitdir}/* \ | ||
528 | ${base_libdir}/security/*.so \ | ||
529 | /cgroup \ | ||
530 | ${bindir}/systemd* \ | ||
531 | ${bindir}/busctl \ | ||
532 | ${bindir}/coredumpctl \ | ||
533 | ${bindir}/localectl \ | ||
534 | ${bindir}/hostnamectl \ | ||
535 | ${bindir}/resolvectl \ | ||
536 | ${bindir}/timedatectl \ | ||
537 | ${bindir}/bootctl \ | ||
538 | ${bindir}/kernel-install \ | ||
539 | ${exec_prefix}/lib/tmpfiles.d/*.conf \ | ||
540 | ${exec_prefix}/lib/systemd \ | ||
541 | ${exec_prefix}/lib/modules-load.d \ | ||
542 | ${exec_prefix}/lib/sysctl.d \ | ||
543 | ${exec_prefix}/lib/sysusers.d \ | ||
544 | ${exec_prefix}/lib/environment.d \ | ||
545 | ${localstatedir} \ | ||
546 | ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \ | ||
547 | ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \ | ||
548 | ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \ | ||
549 | ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \ | ||
550 | ${nonarch_base_libdir}/modprobe.d/systemd.conf \ | ||
551 | ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \ | ||
552 | ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \ | ||
553 | ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ | ||
554 | ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \ | ||
555 | ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \ | ||
556 | ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \ | ||
557 | ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \ | ||
558 | ${datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf \ | ||
559 | ${datadir}/dbus-1/system.d/org.freedesktop.portable1.conf \ | ||
560 | " | ||
561 | |||
562 | FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" | ||
563 | |||
564 | RDEPENDS_${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) util-linux-agetty util-linux-fsck" | ||
565 | RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" | ||
566 | RDEPENDS_${PN} += "volatile-binds update-rc.d" | ||
567 | |||
568 | RRECOMMENDS_${PN} += "systemd-extra-utils \ | ||
569 | systemd-compat-units udev-hwdb \ | ||
570 | e2fsprogs-e2fsck \ | ||
571 | kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \ | ||
572 | os-release \ | ||
573 | systemd-conf \ | ||
574 | " | ||
575 | |||
576 | INSANE_SKIP_${PN} += "dev-so libdir" | ||
577 | INSANE_SKIP_${PN}-dbg += "libdir" | ||
578 | INSANE_SKIP_${PN}-doc += " libdir" | ||
579 | |||
580 | PACKAGES =+ "udev udev-hwdb" | ||
581 | |||
582 | RPROVIDES_udev = "hotplug" | ||
583 | |||
584 | RDEPENDS_udev-hwdb += "udev" | ||
585 | |||
586 | FILES_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/*.rules \ | ||
602 | ${sysconfdir}/udev \ | ||
603 | ${sysconfdir}/init.d/systemd-udevd \ | ||
604 | ${systemd_unitdir}/system/*udev* \ | ||
605 | ${systemd_unitdir}/system/*.wants/*udev* \ | ||
606 | ${base_bindir}/udevadm \ | ||
607 | ${base_sbindir}/udevadm \ | ||
608 | ${libexecdir}/${MLPREFIX}udevadm \ | ||
609 | ${datadir}/bash-completion/completions/udevadm \ | ||
610 | " | ||
611 | |||
612 | FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d" | ||
613 | |||
614 | RCONFLICTS_${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}" | ||
615 | |||
616 | INITSCRIPT_PACKAGES = "udev" | ||
617 | INITSCRIPT_NAME_udev = "systemd-udevd" | ||
618 | INITSCRIPT_PARAMS_udev = "start 03 S ." | ||
619 | |||
620 | python __anonymous() { | ||
621 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): | ||
622 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") | ||
623 | } | ||
624 | |||
625 | python do_warn_musl() { | ||
626 | if d.getVar('TCLIBC') == "musl": | ||
627 | bb.warn("Using systemd with musl is not recommended since it is not supported upstream and some patches are known to be problematic.") | ||
628 | } | ||
629 | addtask warn_musl before do_configure | ||
630 | |||
631 | ALTERNATIVE_${PN} = "halt reboot shutdown poweroff runlevel ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}" | ||
632 | |||
633 | ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd" | ||
634 | ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf" | ||
635 | ALTERNATIVE_PRIORITY[resolv-conf] ?= "50" | ||
636 | |||
637 | ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl" | ||
638 | ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" | ||
639 | ALTERNATIVE_PRIORITY[halt] ?= "300" | ||
640 | |||
641 | ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl" | ||
642 | ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot" | ||
643 | ALTERNATIVE_PRIORITY[reboot] ?= "300" | ||
644 | |||
645 | ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl" | ||
646 | ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" | ||
647 | ALTERNATIVE_PRIORITY[shutdown] ?= "300" | ||
648 | |||
649 | ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl" | ||
650 | ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" | ||
651 | ALTERNATIVE_PRIORITY[poweroff] ?= "300" | ||
652 | |||
653 | ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl" | ||
654 | ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" | ||
655 | ALTERNATIVE_PRIORITY[runlevel] ?= "300" | ||
656 | |||
657 | pkg_postinst_${PN}_libc-glibc () { | ||
658 | sed -e '/^hosts:/s/\s*\<myhostname\>//' \ | ||
659 | -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \ | ||
660 | -i $D${sysconfdir}/nsswitch.conf | ||
661 | } | ||
662 | |||
663 | pkg_prerm_${PN}_libc-glibc () { | ||
664 | sed -e '/^hosts:/s/\s*\<myhostname\>//' \ | ||
665 | -e '/^hosts:/s/\s*myhostname//' \ | ||
666 | -i $D${sysconfdir}/nsswitch.conf | ||
667 | } | ||
668 | |||
669 | PACKAGE_WRITE_DEPS += "qemu-native" | ||
670 | pkg_postinst_udev-hwdb () { | ||
671 | if test -n "$D"; then | ||
672 | $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} | ||
673 | else | ||
674 | udevadm hwdb --update | ||
675 | fi | ||
676 | } | ||
677 | |||
678 | pkg_prerm_udev-hwdb () { | ||
679 | rm -f $D${sysconfdir}/udev/hwdb.bin | ||
680 | } | ||