diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd_239.bb')
-rw-r--r-- | meta/recipes-core/systemd/systemd_239.bb | 589 |
1 files changed, 589 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd_239.bb b/meta/recipes-core/systemd/systemd_239.bb new file mode 100644 index 0000000000..7822548993 --- /dev/null +++ b/meta/recipes-core/systemd/systemd_239.bb | |||
@@ -0,0 +1,589 @@ | |||
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-Make-root-s-home-directory-configurable.patch \ | ||
25 | file://0006-remove-nobody-user-group-checking.patch \ | ||
26 | file://0007-rules-watch-metadata-changes-in-ide-devices.patch \ | ||
27 | file://0008-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch \ | ||
28 | file://0009-nss-mymachines-Build-conditionally-when-ENABLE_MYHOS.patch \ | ||
29 | file://0001-login-use-parse_uid-when-unmounting-user-runtime-dir.patch \ | ||
30 | " | ||
31 | SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch" | ||
32 | |||
33 | # patches made for musl are only applied on TCLIBC is musl | ||
34 | SRC_URI += "${SRC_URI_MUSL}" | ||
35 | SRC_URI_MUSL = "file://0001-Use-getenv-when-secure-versions-are-not-available.patch \ | ||
36 | file://0002-don-t-use-glibc-specific-qsort_r.patch \ | ||
37 | file://0003-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch \ | ||
38 | file://0004-add-fallback-parse_printf_format-implementation.patch \ | ||
39 | file://0005-include-gshadow-only-if-ENABLE_GSHADOW-is-1.patch \ | ||
40 | file://0006-src-basic-missing.h-check-for-missing-strndupa.patch \ | ||
41 | file://0007-Include-netinet-if_ether.h.patch \ | ||
42 | file://0008-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \ | ||
43 | file://0009-add-missing-FTW_-macros-for-musl.patch \ | ||
44 | file://0010-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \ | ||
45 | file://0011-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch \ | ||
46 | file://0012-fix-missing-of-__register_atfork-for-non-glibc-build.patch \ | ||
47 | file://0013-Use-uintmax_t-for-handling-rlim_t.patch \ | ||
48 | file://0014-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch \ | ||
49 | file://0015-test-hexdecoct.c-Include-missing.h-for-strndupa.patch \ | ||
50 | file://0016-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \ | ||
51 | file://0017-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \ | ||
52 | file://0018-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ | ||
53 | file://0019-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \ | ||
54 | file://0020-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \ | ||
55 | " | ||
56 | |||
57 | # Workaround undefined reference to `__stack_chk_fail_local' on qemux86 and qemuppc for musl | ||
58 | SRC_URI_append_libc-musl_qemux86 = " file://0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch" | ||
59 | SRC_URI_append_libc-musl_qemuppc = " file://0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch" | ||
60 | |||
61 | PAM_PLUGINS = " \ | ||
62 | pam-plugin-unix \ | ||
63 | pam-plugin-loginuid \ | ||
64 | pam-plugin-keyinit \ | ||
65 | " | ||
66 | |||
67 | PACKAGECONFIG ??= " \ | ||
68 | ${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux usrmerge', d)} \ | ||
69 | ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \ | ||
70 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \ | ||
71 | acl \ | ||
72 | backlight \ | ||
73 | binfmt \ | ||
74 | firstboot \ | ||
75 | gshadow \ | ||
76 | hibernate \ | ||
77 | hostnamed \ | ||
78 | ima \ | ||
79 | kmod \ | ||
80 | localed \ | ||
81 | logind \ | ||
82 | machined \ | ||
83 | myhostname \ | ||
84 | networkd \ | ||
85 | nss \ | ||
86 | polkit \ | ||
87 | quotacheck \ | ||
88 | randomseed \ | ||
89 | resolved \ | ||
90 | smack \ | ||
91 | sysusers \ | ||
92 | timedated \ | ||
93 | timesyncd \ | ||
94 | utmp \ | ||
95 | vconsole \ | ||
96 | xz \ | ||
97 | " | ||
98 | |||
99 | PACKAGECONFIG_remove_libc-musl = " \ | ||
100 | gshadow \ | ||
101 | localed \ | ||
102 | myhostname \ | ||
103 | nss \ | ||
104 | resolved \ | ||
105 | selinux \ | ||
106 | smack \ | ||
107 | sysusers \ | ||
108 | utmp \ | ||
109 | " | ||
110 | |||
111 | # Use the upstream systemd serial-getty@.service and rely on | ||
112 | # systemd-getty-generator instead of using the OE-core specific | ||
113 | # systemd-serialgetty.bb - not enabled by default. | ||
114 | PACKAGECONFIG[serial-getty-generator] = "" | ||
115 | |||
116 | PACKAGECONFIG[acl] = "-Dacl=true,-Dacl=false,acl" | ||
117 | PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit" | ||
118 | PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false" | ||
119 | PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false" | ||
120 | PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2" | ||
121 | PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false" | ||
122 | PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup" | ||
123 | PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus" | ||
124 | PACKAGECONFIG[efi] = "-Defi=true,-Defi=false" | ||
125 | PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils" | ||
126 | PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false" | ||
127 | # Sign the journal for anti-tampering | ||
128 | PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt" | ||
129 | PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" | ||
130 | PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false" | ||
131 | PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=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" | ||
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] = "-Dmyhostname=true,-Dmyhostname=false" | ||
148 | PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false" | ||
149 | PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false" | ||
150 | PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}" | ||
151 | PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false" | ||
152 | PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false" | ||
153 | PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode" | ||
154 | PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false" | ||
155 | PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false" | ||
156 | PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false" | ||
157 | PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false" | ||
158 | # libseccomp is found in meta-security | ||
159 | PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp" | ||
160 | PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell" | ||
161 | PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false" | ||
162 | PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false" | ||
163 | PACKAGECONFIG[time-epoch] = "-Dtime-epoch=0,," | ||
164 | PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false" | ||
165 | PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false" | ||
166 | PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true" | ||
167 | PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false" | ||
168 | PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind" | ||
169 | PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup" | ||
170 | # Verify keymaps on locale change | ||
171 | PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon" | ||
172 | PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz" | ||
173 | PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib" | ||
174 | |||
175 | # Helper variables to clarify locations. This mirrors the logic in systemd's | ||
176 | # build system. | ||
177 | rootprefix ?= "${root_prefix}" | ||
178 | rootlibdir ?= "${base_libdir}" | ||
179 | rootlibexecdir = "${rootprefix}/lib" | ||
180 | |||
181 | # This links udev statically with systemd helper library. | ||
182 | # Otherwise udev package would depend on systemd package (which has the needed shared library), | ||
183 | # and always pull it into images. | ||
184 | EXTRA_OEMESON += "-Dlink-udev-shared=false" | ||
185 | |||
186 | EXTRA_OEMESON += "-Dnobody-user=nobody \ | ||
187 | -Dnobody-group=nobody \ | ||
188 | -Droothomedir=${ROOT_HOME} \ | ||
189 | -Drootlibdir=${rootlibdir} \ | ||
190 | -Drootprefix=${rootprefix} \ | ||
191 | -Dsysvrcnd-path=${sysconfdir} \ | ||
192 | " | ||
193 | |||
194 | # Hardcode target binary paths to avoid using paths from sysroot | ||
195 | EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \ | ||
196 | -Dkill-path=${base_bindir}/kill \ | ||
197 | -Dkmod-path=${base_bindir}/kmod \ | ||
198 | -Dmount-path=${base_bindir}/mount \ | ||
199 | -Dquotacheck-path=${sbindir}/quotacheck \ | ||
200 | -Dquotaon-path=${sbindir}/quotaon \ | ||
201 | -Dsulogin-path=${base_sbindir}/sulogin \ | ||
202 | -Dumount-path=${base_bindir}/umount" | ||
203 | |||
204 | do_install() { | ||
205 | meson_do_install | ||
206 | install -d ${D}/${base_sbindir} | ||
207 | if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then | ||
208 | # Provided by a separate recipe | ||
209 | rm ${D}${systemd_unitdir}/system/serial-getty* -f | ||
210 | fi | ||
211 | |||
212 | # Provide support for initramfs | ||
213 | [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init | ||
214 | [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd | ||
215 | |||
216 | # Create machine-id | ||
217 | # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable | ||
218 | touch ${D}${sysconfdir}/machine-id | ||
219 | |||
220 | install -d ${D}${sysconfdir}/udev/rules.d/ | ||
221 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
222 | install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/ | ||
223 | install -d ${D}${libdir}/pkgconfig | ||
224 | install -m 0644 ${B}/src/udev/udev.pc ${D}${libdir}/pkgconfig/ | ||
225 | |||
226 | install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ | ||
227 | |||
228 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | ||
229 | install -d ${D}${sysconfdir}/init.d | ||
230 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd | ||
231 | sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd | ||
232 | fi | ||
233 | |||
234 | chown root:systemd-journal ${D}/${localstatedir}/log/journal | ||
235 | |||
236 | # Delete journal README, as log can be symlinked inside volatile. | ||
237 | rm -f ${D}/${localstatedir}/log/README | ||
238 | |||
239 | install -d ${D}${systemd_unitdir}/system/graphical.target.wants | ||
240 | install -d ${D}${systemd_unitdir}/system/multi-user.target.wants | ||
241 | install -d ${D}${systemd_unitdir}/system/poweroff.target.wants | ||
242 | install -d ${D}${systemd_unitdir}/system/reboot.target.wants | ||
243 | install -d ${D}${systemd_unitdir}/system/rescue.target.wants | ||
244 | |||
245 | # Create symlinks for systemd-update-utmp-runlevel.service | ||
246 | if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then | ||
247 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service | ||
248 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service | ||
249 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service | ||
250 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service | ||
251 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service | ||
252 | fi | ||
253 | |||
254 | # Enable journal to forward message to syslog daemon | ||
255 | sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf | ||
256 | # Set the maximium size of runtime journal to 64M as default | ||
257 | sed -i -e 's/.*RuntimeMaxUse.*/RuntimeMaxUse=64M/' ${D}${sysconfdir}/systemd/journald.conf | ||
258 | |||
259 | # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it | ||
260 | # for existence else it fails | ||
261 | if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then | ||
262 | ${@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)} | ||
263 | fi | ||
264 | if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then | ||
265 | echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf | ||
266 | echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf | ||
267 | echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf | ||
268 | ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd | ||
269 | else | ||
270 | 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 | ||
271 | ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd | ||
272 | fi | ||
273 | install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install | ||
274 | |||
275 | # If polkit is setup fixup permissions and ownership | ||
276 | if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then | ||
277 | if [ -d ${D}${datadir}/polkit-1/rules.d ]; then | ||
278 | chmod 700 ${D}${datadir}/polkit-1/rules.d | ||
279 | chown polkitd:root ${D}${datadir}/polkit-1/rules.d | ||
280 | fi | ||
281 | fi | ||
282 | } | ||
283 | |||
284 | |||
285 | python populate_packages_prepend (){ | ||
286 | systemdlibdir = d.getVar("rootlibdir") | ||
287 | do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) | ||
288 | } | ||
289 | PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*" | ||
290 | |||
291 | PACKAGES =+ "\ | ||
292 | ${PN}-gui \ | ||
293 | ${PN}-vconsole-setup \ | ||
294 | ${PN}-initramfs \ | ||
295 | ${PN}-analyze \ | ||
296 | ${PN}-kernel-install \ | ||
297 | ${PN}-rpm-macros \ | ||
298 | ${PN}-binfmt \ | ||
299 | ${PN}-zsh-completion \ | ||
300 | ${PN}-xorg-xinitrc \ | ||
301 | ${PN}-container \ | ||
302 | ${PN}-extra-utils \ | ||
303 | " | ||
304 | |||
305 | SUMMARY_${PN}-container = "Tools for containers and VMs" | ||
306 | DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines." | ||
307 | |||
308 | SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)}" | ||
309 | SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" | ||
310 | |||
311 | USERADD_PACKAGES = "${PN} ${PN}-extra-utils" | ||
312 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)}" | ||
313 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-remote;', '', d)}" | ||
314 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '--system -d / -M --shell /bin/nologin systemd-journal-upload;', '', d)}" | ||
315 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}" | ||
316 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}" | ||
317 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}" | ||
318 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}" | ||
319 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}" | ||
320 | GROUPADD_PARAM_${PN} = "-r systemd-journal" | ||
321 | USERADD_PARAM_${PN}-extra-utils += "--system -d / -M --shell /bin/nologin systemd-bus-proxy;" | ||
322 | |||
323 | FILES_${PN}-analyze = "${bindir}/systemd-analyze" | ||
324 | |||
325 | FILES_${PN}-initramfs = "/init" | ||
326 | RDEPENDS_${PN}-initramfs = "${PN}" | ||
327 | |||
328 | FILES_${PN}-gui = "${bindir}/systemadm" | ||
329 | |||
330 | FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \ | ||
331 | ${systemd_unitdir}/system/systemd-vconsole-setup.service \ | ||
332 | ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service" | ||
333 | |||
334 | RDEPENDS_${PN}-kernel-install += "bash" | ||
335 | FILES_${PN}-kernel-install = "${bindir}/kernel-install \ | ||
336 | ${sysconfdir}/kernel/ \ | ||
337 | ${exec_prefix}/lib/kernel \ | ||
338 | " | ||
339 | FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \ | ||
340 | " | ||
341 | |||
342 | FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*" | ||
343 | |||
344 | FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions" | ||
345 | |||
346 | FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \ | ||
347 | ${exec_prefix}/lib/binfmt.d \ | ||
348 | ${rootlibexecdir}/systemd/systemd-binfmt \ | ||
349 | ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \ | ||
350 | ${systemd_unitdir}/system/systemd-binfmt.service" | ||
351 | RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc" | ||
352 | |||
353 | RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps" | ||
354 | |||
355 | FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \ | ||
356 | ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \ | ||
357 | ${base_bindir}/machinectl \ | ||
358 | ${bindir}/systemd-nspawn \ | ||
359 | ${nonarch_libdir}/systemd/import-pubring.gpg \ | ||
360 | ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \ | ||
361 | ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \ | ||
362 | ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \ | ||
363 | ${systemd_system_unitdir}/machine.slice \ | ||
364 | ${systemd_system_unitdir}/machines.target \ | ||
365 | ${systemd_system_unitdir}/org.freedesktop.import1.busname \ | ||
366 | ${systemd_system_unitdir}/org.freedesktop.machine1.busname \ | ||
367 | ${systemd_system_unitdir}/systemd-importd.service \ | ||
368 | ${systemd_system_unitdir}/systemd-machined.service \ | ||
369 | ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \ | ||
370 | ${systemd_system_unitdir}/var-lib-machines.mount \ | ||
371 | ${rootlibexecdir}/systemd/systemd-import \ | ||
372 | ${rootlibexecdir}/systemd/systemd-importd \ | ||
373 | ${rootlibexecdir}/systemd/systemd-journal-gatewayd \ | ||
374 | ${rootlibexecdir}/systemd/systemd-journal-remote \ | ||
375 | ${rootlibexecdir}/systemd/systemd-journal-upload \ | ||
376 | ${rootlibexecdir}/systemd/systemd-machined \ | ||
377 | ${rootlibexecdir}/systemd/systemd-pull \ | ||
378 | ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \ | ||
379 | ${systemd_system_unitdir}/systemd-nspawn@.service \ | ||
380 | ${libdir}/libnss_mymachines.so.2 \ | ||
381 | ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \ | ||
382 | ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \ | ||
383 | ${datadir}/dbus-1/system.d/org.freedesktop.import1.conf \ | ||
384 | ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \ | ||
385 | ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \ | ||
386 | ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \ | ||
387 | " | ||
388 | |||
389 | FILES_${PN}-extra-utils = "\ | ||
390 | ${base_bindir}/systemd-escape \ | ||
391 | ${base_bindir}/systemd-inhibit \ | ||
392 | ${bindir}/systemd-detect-virt \ | ||
393 | ${bindir}/systemd-path \ | ||
394 | ${bindir}/systemd-run \ | ||
395 | ${bindir}/systemd-cat \ | ||
396 | ${bindir}/systemd-delta \ | ||
397 | ${bindir}/systemd-cgls \ | ||
398 | ${bindir}/systemd-cgtop \ | ||
399 | ${bindir}/systemd-stdio-bridge \ | ||
400 | ${base_bindir}/systemd-ask-password \ | ||
401 | ${base_bindir}/systemd-tty-ask-password-agent \ | ||
402 | ${systemd_unitdir}/system/systemd-ask-password-console.path \ | ||
403 | ${systemd_unitdir}/system/systemd-ask-password-console.service \ | ||
404 | ${systemd_unitdir}/system/systemd-ask-password-wall.path \ | ||
405 | ${systemd_unitdir}/system/systemd-ask-password-wall.service \ | ||
406 | ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \ | ||
407 | ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \ | ||
408 | ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \ | ||
409 | ${rootlibexecdir}/systemd/systemd-resolve-host \ | ||
410 | ${rootlibexecdir}/systemd/systemd-ac-power \ | ||
411 | ${rootlibexecdir}/systemd/systemd-activate \ | ||
412 | ${rootlibexecdir}/systemd/systemd-bus-proxyd \ | ||
413 | ${systemd_unitdir}/system/systemd-bus-proxyd.service \ | ||
414 | ${systemd_unitdir}/system/systemd-bus-proxyd.socket \ | ||
415 | ${rootlibexecdir}/systemd/systemd-socket-proxyd \ | ||
416 | ${rootlibexecdir}/systemd/systemd-reply-password \ | ||
417 | ${rootlibexecdir}/systemd/systemd-sleep \ | ||
418 | ${rootlibexecdir}/systemd/system-sleep \ | ||
419 | ${systemd_unitdir}/system/systemd-hibernate.service \ | ||
420 | ${systemd_unitdir}/system/systemd-hybrid-sleep.service \ | ||
421 | ${systemd_unitdir}/system/systemd-suspend.service \ | ||
422 | ${systemd_unitdir}/system/sleep.target \ | ||
423 | ${rootlibexecdir}/systemd/systemd-initctl \ | ||
424 | ${systemd_unitdir}/system/systemd-initctl.service \ | ||
425 | ${systemd_unitdir}/system/systemd-initctl.socket \ | ||
426 | ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \ | ||
427 | ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \ | ||
428 | ${rootlibexecdir}/systemd/systemd-cgroups-agent \ | ||
429 | " | ||
430 | |||
431 | CONFFILES_${PN} = "${sysconfdir}/machine-id \ | ||
432 | ${sysconfdir}/systemd/coredump.conf \ | ||
433 | ${sysconfdir}/systemd/journald.conf \ | ||
434 | ${sysconfdir}/systemd/logind.conf \ | ||
435 | ${sysconfdir}/systemd/system.conf \ | ||
436 | ${sysconfdir}/systemd/user.conf" | ||
437 | |||
438 | FILES_${PN} = " ${base_bindir}/* \ | ||
439 | ${base_sbindir}/shutdown \ | ||
440 | ${base_sbindir}/halt \ | ||
441 | ${base_sbindir}/poweroff \ | ||
442 | ${base_sbindir}/runlevel \ | ||
443 | ${base_sbindir}/telinit \ | ||
444 | ${base_sbindir}/resolvconf \ | ||
445 | ${base_sbindir}/reboot \ | ||
446 | ${base_sbindir}/init \ | ||
447 | ${datadir}/dbus-1/services \ | ||
448 | ${datadir}/dbus-1/system-services \ | ||
449 | ${datadir}/polkit-1 \ | ||
450 | ${datadir}/${BPN} \ | ||
451 | ${datadir}/factory \ | ||
452 | ${sysconfdir}/dbus-1/ \ | ||
453 | ${sysconfdir}/machine-id \ | ||
454 | ${sysconfdir}/modules-load.d/ \ | ||
455 | ${sysconfdir}/pam.d/ \ | ||
456 | ${sysconfdir}/sysctl.d/ \ | ||
457 | ${sysconfdir}/systemd/ \ | ||
458 | ${sysconfdir}/tmpfiles.d/ \ | ||
459 | ${sysconfdir}/xdg/ \ | ||
460 | ${sysconfdir}/init.d/README \ | ||
461 | ${sysconfdir}/resolv-conf.systemd \ | ||
462 | ${rootlibexecdir}/systemd/* \ | ||
463 | ${systemd_unitdir}/* \ | ||
464 | ${base_libdir}/security/*.so \ | ||
465 | /cgroup \ | ||
466 | ${bindir}/systemd* \ | ||
467 | ${bindir}/busctl \ | ||
468 | ${bindir}/coredumpctl \ | ||
469 | ${bindir}/localectl \ | ||
470 | ${bindir}/hostnamectl \ | ||
471 | ${bindir}/resolvectl \ | ||
472 | ${bindir}/timedatectl \ | ||
473 | ${bindir}/bootctl \ | ||
474 | ${bindir}/kernel-install \ | ||
475 | ${exec_prefix}/lib/tmpfiles.d/*.conf \ | ||
476 | ${exec_prefix}/lib/systemd \ | ||
477 | ${exec_prefix}/lib/modules-load.d \ | ||
478 | ${exec_prefix}/lib/sysctl.d \ | ||
479 | ${exec_prefix}/lib/sysusers.d \ | ||
480 | ${exec_prefix}/lib/environment.d \ | ||
481 | ${localstatedir} \ | ||
482 | ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \ | ||
483 | ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \ | ||
484 | ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \ | ||
485 | ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \ | ||
486 | ${nonarch_base_libdir}/modprobe.d/systemd.conf \ | ||
487 | ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \ | ||
488 | ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \ | ||
489 | ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ | ||
490 | ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \ | ||
491 | ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \ | ||
492 | ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \ | ||
493 | ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \ | ||
494 | ${datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf \ | ||
495 | ${datadir}/dbus-1/system.d/org.freedesktop.portable1.conf \ | ||
496 | " | ||
497 | |||
498 | FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" | ||
499 | |||
500 | RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV}) util-linux-agetty" | ||
501 | RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" | ||
502 | RDEPENDS_${PN} += "volatile-binds update-rc.d" | ||
503 | |||
504 | RRECOMMENDS_${PN} += "systemd-extra-utils \ | ||
505 | systemd-compat-units udev-hwdb \ | ||
506 | util-linux-fsck e2fsprogs-e2fsck \ | ||
507 | kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \ | ||
508 | os-release \ | ||
509 | " | ||
510 | |||
511 | INSANE_SKIP_${PN} += "dev-so libdir" | ||
512 | INSANE_SKIP_${PN}-dbg += "libdir" | ||
513 | INSANE_SKIP_${PN}-doc += " libdir" | ||
514 | |||
515 | PACKAGES =+ "udev udev-hwdb" | ||
516 | |||
517 | RPROVIDES_udev = "hotplug" | ||
518 | |||
519 | RDEPENDS_udev-hwdb += "udev" | ||
520 | |||
521 | FILES_udev += "${base_sbindir}/udevd \ | ||
522 | ${rootlibexecdir}/systemd/systemd-udevd \ | ||
523 | ${rootlibexecdir}/udev/accelerometer \ | ||
524 | ${rootlibexecdir}/udev/ata_id \ | ||
525 | ${rootlibexecdir}/udev/cdrom_id \ | ||
526 | ${rootlibexecdir}/udev/collect \ | ||
527 | ${rootlibexecdir}/udev/findkeyboards \ | ||
528 | ${rootlibexecdir}/udev/keyboard-force-release.sh \ | ||
529 | ${rootlibexecdir}/udev/keymap \ | ||
530 | ${rootlibexecdir}/udev/mtd_probe \ | ||
531 | ${rootlibexecdir}/udev/scsi_id \ | ||
532 | ${rootlibexecdir}/udev/v4l_id \ | ||
533 | ${rootlibexecdir}/udev/keymaps \ | ||
534 | ${rootlibexecdir}/udev/rules.d/*.rules \ | ||
535 | ${sysconfdir}/udev \ | ||
536 | ${sysconfdir}/init.d/systemd-udevd \ | ||
537 | ${systemd_unitdir}/system/*udev* \ | ||
538 | ${systemd_unitdir}/system/*.wants/*udev* \ | ||
539 | ${base_bindir}/udevadm \ | ||
540 | ${datadir}/bash-completion/completions/udevadm \ | ||
541 | " | ||
542 | |||
543 | FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d" | ||
544 | |||
545 | INITSCRIPT_PACKAGES = "udev" | ||
546 | INITSCRIPT_NAME_udev = "systemd-udevd" | ||
547 | INITSCRIPT_PARAMS_udev = "start 03 S ." | ||
548 | |||
549 | python __anonymous() { | ||
550 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): | ||
551 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") | ||
552 | } | ||
553 | |||
554 | ALTERNATIVE_${PN} = "resolv-conf" | ||
555 | |||
556 | ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd" | ||
557 | ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf" | ||
558 | ALTERNATIVE_PRIORITY[resolv-conf] ?= "50" | ||
559 | |||
560 | pkg_postinst_${PN} () { | ||
561 | sed -e '/^hosts:/s/\s*\<myhostname\>//' \ | ||
562 | -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \ | ||
563 | -i $D${sysconfdir}/nsswitch.conf | ||
564 | } | ||
565 | |||
566 | pkg_prerm_${PN} () { | ||
567 | sed -e '/^hosts:/s/\s*\<myhostname\>//' \ | ||
568 | -e '/^hosts:/s/\s*myhostname//' \ | ||
569 | -i $D${sysconfdir}/nsswitch.conf | ||
570 | } | ||
571 | |||
572 | PACKAGE_WRITE_DEPS += "qemu-native" | ||
573 | pkg_postinst_udev-hwdb () { | ||
574 | if test -n "$D"; then | ||
575 | if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true','false', d)}; then | ||
576 | ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \ | ||
577 | --root $D | ||
578 | chown root:root $D${sysconfdir}/udev/hwdb.bin | ||
579 | else | ||
580 | $INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX} | ||
581 | fi | ||
582 | else | ||
583 | udevadm hwdb --update | ||
584 | fi | ||
585 | } | ||
586 | |||
587 | pkg_prerm_udev-hwdb () { | ||
588 | rm -f $D${sysconfdir}/udev/hwdb.bin | ||
589 | } | ||