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