diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-09-03 15:08:58 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-03 11:09:04 +0100 |
commit | 6301fde8956245e0b7e702788701eed3aa8811bb (patch) | |
tree | 91b7586c15fde16854f9df817226a9363fa98aa7 /meta/recipes-core/systemd/systemd_213.bb | |
parent | b2a93ca8e853d6479983408e6294c7fb38159c92 (diff) | |
download | poky-6301fde8956245e0b7e702788701eed3aa8811bb.tar.gz |
systemd: upgrade to 216
Upgrade systemd from 213 to 216.
systemd-older-kernel.patch is removed as it's fixed in 216.
0001-uClibc-doesn-t-implement-pwritev-preadv.patch is removed because
the file it patches has been removed from the project.
0001-util-Including-missing.h-to-get-MAX_HANDLE_SZ.patch is removed because
it has been merged.
0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch is backported
to fix compilation error for mips.
Below are the required kernel versions for systemd 216.
Linux kernel >= 3.0
Linux kernel >= 3.3 for loop device partition support features with nspawn
Linux kernel >= 3.8 for Smack support
(From OE-Core rev: 58c432b2725ad8b78d02cb91a6ab405d425c01cc)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd_213.bb')
-rw-r--r-- | meta/recipes-core/systemd/systemd_213.bb | 355 |
1 files changed, 0 insertions, 355 deletions
diff --git a/meta/recipes-core/systemd/systemd_213.bb b/meta/recipes-core/systemd/systemd_213.bb deleted file mode 100644 index ca071c156c..0000000000 --- a/meta/recipes-core/systemd/systemd_213.bb +++ /dev/null | |||
@@ -1,355 +0,0 @@ | |||
1 | SUMMARY = "System and service manager for Linux, replacing SysVinit" | ||
2 | HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd" | ||
3 | |||
4 | LICENSE = "GPLv2 & LGPLv2.1 & MIT" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ | ||
6 | file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \ | ||
7 | file://LICENSE.MIT;md5=544799d0b492f119fa04641d1b8868ed" | ||
8 | |||
9 | PROVIDES = "udev" | ||
10 | |||
11 | PE = "1" | ||
12 | |||
13 | DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux" | ||
14 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
15 | |||
16 | SECTION = "base/shell" | ||
17 | |||
18 | inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext | ||
19 | |||
20 | SRCREV = "c9679c652b3c31f2510e8805d81630680ebc7e95" | ||
21 | |||
22 | PV = "213+git${SRCPV}" | ||
23 | |||
24 | SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=git \ | ||
25 | file://binfmt-install.patch \ | ||
26 | file://systemd-pam-configure-check-uclibc.patch \ | ||
27 | file://systemd-pam-fix-execvpe.patch \ | ||
28 | file://systemd-pam-fix-fallocate.patch \ | ||
29 | file://systemd-pam-fix-mkostemp.patch \ | ||
30 | file://optional_secure_getenv.patch \ | ||
31 | file://0001-uClibc-doesn-t-implement-pwritev-preadv.patch \ | ||
32 | file://uclibc-sysinfo_h.patch \ | ||
33 | file://uclibc-get-physmem.patch \ | ||
34 | file://0001-util-Including-missing.h-to-get-MAX_HANDLE_SZ.patch \ | ||
35 | file://touchscreen.rules \ | ||
36 | file://00-create-volatile.conf \ | ||
37 | file://init \ | ||
38 | file://run-ptest \ | ||
39 | file://systemd-older-kernel.patch \ | ||
40 | " | ||
41 | |||
42 | S = "${WORKDIR}/git" | ||
43 | |||
44 | SRC_URI_append_libc-uclibc = "\ | ||
45 | file://systemd-pam-fix-getty-unit.patch \ | ||
46 | " | ||
47 | LDFLAGS_append_libc-uclibc = " -lrt" | ||
48 | |||
49 | GTKDOC_DOCDIR = "${S}/docs/" | ||
50 | |||
51 | PACKAGECONFIG ??= "xz" | ||
52 | # Sign the journal for anti-tampering | ||
53 | PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt" | ||
54 | # regardless of PACKAGECONFIG, libgcrypt is always required to expand | ||
55 | # the AM_PATH_LIBGCRYPT autoconf macro | ||
56 | DEPENDS += "libgcrypt" | ||
57 | # Compress the journal | ||
58 | PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz" | ||
59 | PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup" | ||
60 | PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd" | ||
61 | PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils" | ||
62 | |||
63 | CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill" | ||
64 | |||
65 | # Helper variables to clarify locations. This mirrors the logic in systemd's | ||
66 | # build system. | ||
67 | rootprefix ?= "${base_prefix}" | ||
68 | rootlibdir ?= "${base_libdir}" | ||
69 | rootlibexecdir = "${rootprefix}/lib" | ||
70 | |||
71 | # The gtk+ tools should get built as a separate recipe e.g. systemd-tools | ||
72 | EXTRA_OECONF = " --with-rootprefix=${rootprefix} \ | ||
73 | --with-rootlibdir=${rootlibdir} \ | ||
74 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \ | ||
75 | --disable-manpages \ | ||
76 | --disable-coredump \ | ||
77 | --disable-introspection \ | ||
78 | --disable-kdbus \ | ||
79 | --enable-split-usr \ | ||
80 | --without-python \ | ||
81 | --with-sysvrcnd-path=${sysconfdir} \ | ||
82 | --with-firmware-path=/lib/firmware \ | ||
83 | ac_cv_path_KILL=${base_bindir}/kill \ | ||
84 | " | ||
85 | # uclibc does not have NSS | ||
86 | EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname " | ||
87 | |||
88 | do_configure_prepend() { | ||
89 | export CPP="${HOST_PREFIX}cpp ${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}" | ||
90 | export NM="${HOST_PREFIX}gcc-nm" | ||
91 | export AR="${HOST_PREFIX}gcc-ar" | ||
92 | export RANLIB="${HOST_PREFIX}gcc-ranlib" | ||
93 | export KMOD="${base_bindir}/kmod" | ||
94 | if [ -d ${S}/units.pre_sed ] ; then | ||
95 | cp -r ${S}/units.pre_sed ${S}/units | ||
96 | else | ||
97 | cp -r ${S}/units ${S}/units.pre_sed | ||
98 | fi | ||
99 | sed -i -e 's:=/root:=${ROOT_HOME}:g' ${S}/units/*.service* | ||
100 | sed -i '/ln --relative --help/d' ${S}/configure.ac | ||
101 | sed -i -e 's:\$(LN_S) --relative -f:lnr:g' ${S}/Makefile.am | ||
102 | sed -i -e 's:\$(LN_S) --relative:lnr:g' ${S}/Makefile.am | ||
103 | } | ||
104 | |||
105 | do_install() { | ||
106 | autotools_do_install | ||
107 | install -d ${D}/${base_sbindir} | ||
108 | # Provided by a separate recipe | ||
109 | rm ${D}${systemd_unitdir}/system/serial-getty* -f | ||
110 | |||
111 | # Provide support for initramfs | ||
112 | [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init | ||
113 | [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd | ||
114 | |||
115 | # Create machine-id | ||
116 | # 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 | ||
117 | touch ${D}${sysconfdir}/machine-id | ||
118 | |||
119 | install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/ | ||
120 | |||
121 | install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ | ||
122 | |||
123 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | ||
124 | install -d ${D}${sysconfdir}/init.d | ||
125 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd | ||
126 | sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd | ||
127 | fi | ||
128 | |||
129 | # Delete journal README, as log can be symlinked inside volatile. | ||
130 | rm -f ${D}/${localstatedir}/log/README | ||
131 | } | ||
132 | |||
133 | do_install_ptest () { | ||
134 | install -d ${D}${PTEST_PATH}/test | ||
135 | cp -rf ${S}/test/* ${D}${PTEST_PATH}/test | ||
136 | install -m 0755 ${B}/test-udev ${D}${PTEST_PATH}/ | ||
137 | install -d ${D}${PTEST_PATH}/build-aux | ||
138 | cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ | ||
139 | cp -rf ${B}/rules ${D}${PTEST_PATH}/ | ||
140 | # This directory needs to be there for udev-test.pl to work. | ||
141 | install -d ${D}${libdir}/udev/rules.d | ||
142 | cp ${B}/Makefile ${D}${PTEST_PATH}/ | ||
143 | cp ${S}/test/sys.tar.xz ${D}${PTEST_PATH}/test | ||
144 | sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/test/udev-test.pl | ||
145 | sed -i 's#${S}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile | ||
146 | sed -i 's#${B}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile | ||
147 | } | ||
148 | |||
149 | python populate_packages_prepend (){ | ||
150 | systemdlibdir = d.getVar("rootlibdir", True) | ||
151 | do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) | ||
152 | } | ||
153 | PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*" | ||
154 | |||
155 | PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install \ | ||
156 | ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh" | ||
157 | |||
158 | SYSTEMD_PACKAGES = "${PN}-binfmt" | ||
159 | SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" | ||
160 | |||
161 | USERADD_PACKAGES = "${PN}" | ||
162 | USERADD_PARAM_${PN} += "--system systemd-journal-gateway" | ||
163 | GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal" | ||
164 | |||
165 | FILES_${PN}-analyze = "${bindir}/systemd-analyze" | ||
166 | |||
167 | FILES_${PN}-initramfs = "/init" | ||
168 | RDEPENDS_${PN}-initramfs = "${PN}" | ||
169 | |||
170 | # The test cases need perl and bash to run correctly. | ||
171 | RDEPENDS_${PN}-ptest += "perl bash" | ||
172 | FILES_${PN}-ptest += "${libdir}/udev/rules.d" | ||
173 | |||
174 | FILES_${PN}-dbg += "${libdir}/systemd/ptest/.debug" | ||
175 | |||
176 | FILES_${PN}-gui = "${bindir}/systemadm" | ||
177 | |||
178 | FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \ | ||
179 | ${systemd_unitdir}/system/systemd-vconsole-setup.service \ | ||
180 | ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service" | ||
181 | |||
182 | FILES_${PN}-kernel-install = "${bindir}/kernel-install \ | ||
183 | ${sysconfdir}/kernel/ \ | ||
184 | ${exec_prefix}/lib/kernel \ | ||
185 | " | ||
186 | FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \ | ||
187 | " | ||
188 | |||
189 | FILES_${PN}-zsh = "${datadir}/zsh/site-functions" | ||
190 | |||
191 | FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \ | ||
192 | ${exec_prefix}/lib/binfmt.d \ | ||
193 | ${rootlibexecdir}/systemd/systemd-binfmt \ | ||
194 | ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \ | ||
195 | ${systemd_unitdir}/system/systemd-binfmt.service" | ||
196 | RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc" | ||
197 | |||
198 | RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts" | ||
199 | |||
200 | CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \ | ||
201 | ${sysconfdir}/systemd/logind.conf \ | ||
202 | ${sysconfdir}/systemd/system.conf \ | ||
203 | ${sysconfdir}/systemd/user.conf" | ||
204 | |||
205 | FILES_${PN} = " ${base_bindir}/* \ | ||
206 | ${datadir}/bash-completion \ | ||
207 | ${datadir}/dbus-1/services \ | ||
208 | ${datadir}/dbus-1/system-services \ | ||
209 | ${datadir}/polkit-1 \ | ||
210 | ${datadir}/${BPN} \ | ||
211 | ${sysconfdir}/bash_completion.d/ \ | ||
212 | ${sysconfdir}/dbus-1/ \ | ||
213 | ${sysconfdir}/machine-id \ | ||
214 | ${sysconfdir}/modules-load.d/ \ | ||
215 | ${sysconfdir}/sysctl.d/ \ | ||
216 | ${sysconfdir}/systemd/ \ | ||
217 | ${sysconfdir}/tmpfiles.d/ \ | ||
218 | ${sysconfdir}/xdg/ \ | ||
219 | ${sysconfdir}/init.d/README \ | ||
220 | ${rootlibexecdir}/systemd/* \ | ||
221 | ${systemd_unitdir}/* \ | ||
222 | ${base_libdir}/security/*.so \ | ||
223 | ${libdir}/libnss_myhostname.so.2 \ | ||
224 | /cgroup \ | ||
225 | ${bindir}/systemd* \ | ||
226 | ${bindir}/busctl \ | ||
227 | ${bindir}/localectl \ | ||
228 | ${bindir}/hostnamectl \ | ||
229 | ${bindir}/timedatectl \ | ||
230 | ${bindir}/bootctl \ | ||
231 | ${bindir}/kernel-install \ | ||
232 | ${exec_prefix}/lib/tmpfiles.d/*.conf \ | ||
233 | ${exec_prefix}/lib/systemd \ | ||
234 | ${exec_prefix}/lib/modules-load.d \ | ||
235 | ${exec_prefix}/lib/sysctl.d \ | ||
236 | ${localstatedir} \ | ||
237 | /lib/udev/rules.d/70-uaccess.rules \ | ||
238 | /lib/udev/rules.d/71-seat.rules \ | ||
239 | /lib/udev/rules.d/73-seat-late.rules \ | ||
240 | /lib/udev/rules.d/99-systemd.rules \ | ||
241 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d', '', d)} \ | ||
242 | " | ||
243 | |||
244 | FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/" | ||
245 | FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" | ||
246 | |||
247 | RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})" | ||
248 | RDEPENDS_${PN} += "volatile-binds" | ||
249 | |||
250 | RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units udev-hwdb\ | ||
251 | util-linux-agetty \ | ||
252 | util-linux-fsck e2fsprogs-e2fsck \ | ||
253 | kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \ | ||
254 | " | ||
255 | |||
256 | PACKAGES =+ "udev-dbg udev udev-hwdb" | ||
257 | |||
258 | FILES_udev-dbg += "/lib/udev/.debug" | ||
259 | |||
260 | RPROVIDES_udev = "hotplug" | ||
261 | |||
262 | RDEPENDS_udev-hwdb += "udev" | ||
263 | |||
264 | FILES_udev += "${base_sbindir}/udevd \ | ||
265 | ${rootlibexecdir}/systemd/systemd-udevd \ | ||
266 | ${rootlibexecdir}/udev/accelerometer \ | ||
267 | ${rootlibexecdir}/udev/ata_id \ | ||
268 | ${rootlibexecdir}/udev/cdrom_id \ | ||
269 | ${rootlibexecdir}/udev/collect \ | ||
270 | ${rootlibexecdir}/udev/findkeyboards \ | ||
271 | ${rootlibexecdir}/udev/keyboard-force-release.sh \ | ||
272 | ${rootlibexecdir}/udev/keymap \ | ||
273 | ${rootlibexecdir}/udev/mtd_probe \ | ||
274 | ${rootlibexecdir}/udev/scsi_id \ | ||
275 | ${rootlibexecdir}/udev/v4l_id \ | ||
276 | ${rootlibexecdir}/udev/keymaps \ | ||
277 | ${rootlibexecdir}/udev/rules.d/4*.rules \ | ||
278 | ${rootlibexecdir}/udev/rules.d/5*.rules \ | ||
279 | ${rootlibexecdir}/udev/rules.d/6*.rules \ | ||
280 | ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \ | ||
281 | ${rootlibexecdir}/udev/rules.d/75*.rules \ | ||
282 | ${rootlibexecdir}/udev/rules.d/78*.rules \ | ||
283 | ${rootlibexecdir}/udev/rules.d/8*.rules \ | ||
284 | ${rootlibexecdir}/udev/rules.d/95*.rules \ | ||
285 | ${sysconfdir}/udev \ | ||
286 | ${sysconfdir}/init.d/systemd-udevd \ | ||
287 | ${systemd_unitdir}/system/*udev* \ | ||
288 | ${systemd_unitdir}/system/*.wants/*udev* \ | ||
289 | ${base_bindir}/udevadm \ | ||
290 | ${datadir}/bash-completion/completions/udevadm \ | ||
291 | " | ||
292 | |||
293 | FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d" | ||
294 | |||
295 | INITSCRIPT_PACKAGES = "udev" | ||
296 | INITSCRIPT_NAME_udev = "systemd-udevd" | ||
297 | INITSCRIPT_PARAMS_udev = "start 03 S ." | ||
298 | |||
299 | python __anonymous() { | ||
300 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): | ||
301 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") | ||
302 | } | ||
303 | |||
304 | # TODO: | ||
305 | # u-a for runlevel and telinit | ||
306 | |||
307 | ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel" | ||
308 | |||
309 | ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd" | ||
310 | ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" | ||
311 | ALTERNATIVE_PRIORITY[init] ?= "300" | ||
312 | |||
313 | ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl" | ||
314 | ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" | ||
315 | ALTERNATIVE_PRIORITY[halt] ?= "300" | ||
316 | |||
317 | ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl" | ||
318 | ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot" | ||
319 | ALTERNATIVE_PRIORITY[reboot] ?= "300" | ||
320 | |||
321 | ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl" | ||
322 | ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" | ||
323 | ALTERNATIVE_PRIORITY[shutdown] ?= "300" | ||
324 | |||
325 | ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl" | ||
326 | ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" | ||
327 | ALTERNATIVE_PRIORITY[poweroff] ?= "300" | ||
328 | |||
329 | ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl" | ||
330 | ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" | ||
331 | ALTERNATIVE_PRIORITY[runlevel] ?= "300" | ||
332 | |||
333 | pkg_postinst_udev-hwdb () { | ||
334 | if test -n "$D"; then | ||
335 | ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \ | ||
336 | --root $D | ||
337 | else | ||
338 | udevadm hwdb --update | ||
339 | fi | ||
340 | } | ||
341 | |||
342 | pkg_prerm_udev-hwdb () { | ||
343 | if test -n "$D"; then | ||
344 | exit 1 | ||
345 | fi | ||
346 | |||
347 | rm -f ${sysconfdir}/udev/hwdb.bin | ||
348 | } | ||
349 | |||
350 | # As this recipe builds udev, respect systemd being in DISTRO_FEATURES so | ||
351 | # that we don't build both udev and systemd in world builds. | ||
352 | python () { | ||
353 | if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): | ||
354 | raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES") | ||
355 | } | ||