diff options
author | Jonathan Liu <net147@gmail.com> | 2013-05-23 19:15:11 +1000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-24 14:14:48 +0100 |
commit | 7bb6021c4c70b6abdb9d9a3e72d9447c872751a2 (patch) | |
tree | 073691291ed29fe1fc290aa06a8c9bfb703a146b /meta/recipes-core/systemd/systemd_199.bb | |
parent | 657e46480b6f21b3e81e3f33764392539d7308ef (diff) | |
download | poky-7bb6021c4c70b6abdb9d9a3e72d9447c872751a2.tar.gz |
systemd: update to 204
Removed patches integrated upstream.
Added backport of fix for utmp not running at shutdown.
Updated serial-getty service.
Added missing util-linux dependency.
(From OE-Core rev: 9e39d10ec92db23c9765b83559c32c0302bc8c5d)
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd_199.bb')
-rw-r--r-- | meta/recipes-core/systemd/systemd_199.bb | 303 |
1 files changed, 0 insertions, 303 deletions
diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_199.bb deleted file mode 100644 index b1cc0465ef..0000000000 --- a/meta/recipes-core/systemd/systemd_199.bb +++ /dev/null | |||
@@ -1,303 +0,0 @@ | |||
1 | DESCRIPTION = "Systemd a init replacement" | ||
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 | PR = "r4" | ||
13 | |||
14 | DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0 qemu-native" | ||
15 | DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
16 | |||
17 | SECTION = "base/shell" | ||
18 | |||
19 | inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu | ||
20 | |||
21 | SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \ | ||
22 | file://touchscreen.rules \ | ||
23 | file://modprobe.rules \ | ||
24 | file://var-run.conf \ | ||
25 | ${UCLIBCPATCHES} \ | ||
26 | file://00-create-volatile.conf \ | ||
27 | file://0002-readahead-chunk-on-spinning-media.patch \ | ||
28 | file://0003-readahead-cleanups.patch \ | ||
29 | file://0013-systemd-sysctl-Handle-missing-etc-sysctl.conf-proper.patch \ | ||
30 | file://0001-configure-use-AC_CHECK_TOOL-for-objcopy-strings-and-.patch \ | ||
31 | file://199-firmware.patch \ | ||
32 | file://init \ | ||
33 | " | ||
34 | SRC_URI[md5sum] = "4bb13f84ce211e93f0141774a90a2322" | ||
35 | SRC_URI[sha256sum] = "8c4462a04f3ecf7f083782e5e0687913b1d33c6444bf20fa2f31df9222965fed" | ||
36 | |||
37 | UCLIBCPATCHES = "" | ||
38 | UCLIBCPATCHES_libc-uclibc = "file://systemd-pam-configure-check-uclibc.patch \ | ||
39 | file://systemd-pam-fix-execvpe.patch \ | ||
40 | file://systemd-pam-fix-fallocate.patch \ | ||
41 | file://systemd-pam-fix-getty-unit.patch \ | ||
42 | file://systemd-pam-fix-mkostemp.patch \ | ||
43 | file://systemd-pam-fix-msformat.patch \ | ||
44 | file://optional_secure_getenv.patch \ | ||
45 | " | ||
46 | LDFLAGS_libc-uclibc_append = " -lrt" | ||
47 | |||
48 | GTKDOC_DOCDIR = "${S}/docs/" | ||
49 | |||
50 | PACKAGECONFIG ??= "xz" | ||
51 | # Sign the journal for anti-tampering | ||
52 | PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt" | ||
53 | # regardless of PACKAGECONFIG, libgcrypt is always required to expand | ||
54 | # the AM_PATH_LIBGCRYPT autoconf macro | ||
55 | DEPENDS += "libgcrypt" | ||
56 | # Compress the journal | ||
57 | PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz" | ||
58 | |||
59 | CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill" | ||
60 | |||
61 | # Helper variables to clarify locations. This mirrors the logic in systemd's | ||
62 | # build system. | ||
63 | rootprefix ?= "${base_prefix}" | ||
64 | rootlibdir ?= "${base_libdir}" | ||
65 | rootlibexecdir = "${rootprefix}/lib" | ||
66 | |||
67 | # The gtk+ tools should get built as a separate recipe e.g. systemd-tools | ||
68 | EXTRA_OECONF = " --with-rootprefix=${rootprefix} \ | ||
69 | --with-rootlibdir=${rootlibdir} \ | ||
70 | ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \ | ||
71 | --enable-xz \ | ||
72 | --disable-manpages \ | ||
73 | --disable-coredump \ | ||
74 | --disable-introspection \ | ||
75 | --disable-tcpwrap \ | ||
76 | --enable-split-usr \ | ||
77 | --disable-microhttpd \ | ||
78 | --without-python \ | ||
79 | --with-sysvrcnd-path=${sysconfdir} \ | ||
80 | --with-firmware-path=/lib/firmware \ | ||
81 | ac_cv_path_KILL=${base_bindir}/kill \ | ||
82 | " | ||
83 | # uclibc does not have NSS | ||
84 | EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname " | ||
85 | |||
86 | do_configure_prepend() { | ||
87 | export CPP="${HOST_PREFIX}cpp ${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}" | ||
88 | |||
89 | export GPERF="${HOST_PREFIX}gperf" | ||
90 | |||
91 | sed -i -e 's:=/root:=${ROOT_HOME}:g' ${S}/units/*.service* | ||
92 | } | ||
93 | |||
94 | do_install() { | ||
95 | autotools_do_install | ||
96 | install -d ${D}/${base_sbindir} | ||
97 | # Provided by a separate recipe | ||
98 | rm ${D}${systemd_unitdir}/system/serial-getty* -f | ||
99 | |||
100 | # Provide support for initramfs | ||
101 | ln -s ${rootlibexecdir}/systemd/systemd ${D}/init | ||
102 | ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd | ||
103 | |||
104 | # Create dir for journal | ||
105 | install -d ${D}${localstatedir}/log/journal | ||
106 | |||
107 | # Create machine-id | ||
108 | # 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 | ||
109 | touch ${D}${sysconfdir}/machine-id | ||
110 | |||
111 | install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/ | ||
112 | |||
113 | install -m 0644 ${WORKDIR}/var-run.conf ${D}${sysconfdir}/tmpfiles.d/ | ||
114 | |||
115 | install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ | ||
116 | |||
117 | if ${@base_contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | ||
118 | install -d ${D}${sysconfdir}/init.d | ||
119 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd | ||
120 | sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd | ||
121 | fi | ||
122 | } | ||
123 | |||
124 | python populate_packages_prepend (){ | ||
125 | systemdlibdir = d.getVar("rootlibdir", True) | ||
126 | do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) | ||
127 | } | ||
128 | PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*" | ||
129 | |||
130 | PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install" | ||
131 | |||
132 | USERADD_PACKAGES = "${PN}" | ||
133 | GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal" | ||
134 | |||
135 | FILES_${PN}-analyze = "${bindir}/systemd-analyze" | ||
136 | |||
137 | FILES_${PN}-initramfs = "/init" | ||
138 | RDEPENDS_${PN}-initramfs = "${PN}" | ||
139 | |||
140 | FILES_${PN}-gui = "${bindir}/systemadm" | ||
141 | |||
142 | FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \ | ||
143 | ${systemd_unitdir}/system/systemd-vconsole-setup.service \ | ||
144 | ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service" | ||
145 | |||
146 | FILES_${PN}-kernel-install = "${bindir}/kernel-install \ | ||
147 | ${sysconfdir}/kernel/ \ | ||
148 | ${exec_prefix}/lib/kernel \ | ||
149 | " | ||
150 | RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts" | ||
151 | |||
152 | CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \ | ||
153 | ${sysconfdir}/systemd/logind.conf \ | ||
154 | ${sysconfdir}/systemd/system.conf \ | ||
155 | ${sysconfdir}/systemd/user.conf" | ||
156 | |||
157 | FILES_${PN} = " ${base_bindir}/* \ | ||
158 | ${datadir}/bash-completion \ | ||
159 | ${datadir}/dbus-1/services \ | ||
160 | ${datadir}/dbus-1/system-services \ | ||
161 | ${datadir}/polkit-1 \ | ||
162 | ${datadir}/${BPN} \ | ||
163 | ${sysconfdir}/bash_completion.d/ \ | ||
164 | ${sysconfdir}/binfmt.d/ \ | ||
165 | ${sysconfdir}/dbus-1/ \ | ||
166 | ${sysconfdir}/machine-id \ | ||
167 | ${sysconfdir}/modules-load.d/ \ | ||
168 | ${sysconfdir}/sysctl.d/ \ | ||
169 | ${sysconfdir}/systemd/ \ | ||
170 | ${sysconfdir}/tmpfiles.d/ \ | ||
171 | ${sysconfdir}/xdg/ \ | ||
172 | ${sysconfdir}/init.d/README \ | ||
173 | ${rootlibexecdir}/systemd/* \ | ||
174 | ${systemd_unitdir}/* \ | ||
175 | ${base_libdir}/security/*.so \ | ||
176 | ${libdir}/libnss_myhostname.so.2 \ | ||
177 | /cgroup \ | ||
178 | ${bindir}/systemd* \ | ||
179 | ${bindir}/localectl \ | ||
180 | ${bindir}/hostnamectl \ | ||
181 | ${bindir}/timedatectl \ | ||
182 | ${bindir}/bootctl \ | ||
183 | ${bindir}/kernel-install \ | ||
184 | ${exec_prefix}/lib/tmpfiles.d/*.conf \ | ||
185 | ${exec_prefix}/lib/systemd \ | ||
186 | ${exec_prefix}/lib/binfmt.d \ | ||
187 | ${exec_prefix}/lib/modules-load.d \ | ||
188 | ${exec_prefix}/lib/sysctl.d \ | ||
189 | ${localstatedir} \ | ||
190 | /lib/udev/rules.d/70-uaccess.rules \ | ||
191 | /lib/udev/rules.d/71-seat.rules \ | ||
192 | /lib/udev/rules.d/73-seat-late.rules \ | ||
193 | /lib/udev/rules.d/99-systemd.rules \ | ||
194 | " | ||
195 | |||
196 | FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/" | ||
197 | FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" | ||
198 | |||
199 | RDEPENDS_${PN} += "dbus util-linux-mount" | ||
200 | |||
201 | RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units \ | ||
202 | util-linux-agetty \ | ||
203 | util-linux-fsck e2fsprogs-e2fsck \ | ||
204 | kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \ | ||
205 | " | ||
206 | |||
207 | PACKAGES =+ "udev-dbg udev udev-utils udev-hwdb" | ||
208 | |||
209 | FILES_udev-dbg += "/lib/udev/.debug" | ||
210 | |||
211 | RDEPENDS_udev += "udev-utils" | ||
212 | RPROVIDES_udev = "hotplug" | ||
213 | RRECOMMENDS_udev += "udev-hwdb" | ||
214 | |||
215 | FILES_udev += "${base_sbindir}/udevd \ | ||
216 | ${rootlibexecdir}/systemd/systemd-udevd \ | ||
217 | ${rootlibexecdir}/udev/accelerometer \ | ||
218 | ${rootlibexecdir}/udev/ata_id \ | ||
219 | ${rootlibexecdir}/udev/cdrom_id \ | ||
220 | ${rootlibexecdir}/udev/collect \ | ||
221 | ${rootlibexecdir}/udev/findkeyboards \ | ||
222 | ${rootlibexecdir}/udev/keyboard-force-release.sh \ | ||
223 | ${rootlibexecdir}/udev/keymap \ | ||
224 | ${rootlibexecdir}/udev/mtd_probe \ | ||
225 | ${rootlibexecdir}/udev/scsi_id \ | ||
226 | ${rootlibexecdir}/udev/v4l_id \ | ||
227 | ${rootlibexecdir}/udev/keymaps \ | ||
228 | ${rootlibexecdir}/udev/rules.d/4*.rules \ | ||
229 | ${rootlibexecdir}/udev/rules.d/5*.rules \ | ||
230 | ${rootlibexecdir}/udev/rules.d/6*.rules \ | ||
231 | ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \ | ||
232 | ${rootlibexecdir}/udev/rules.d/75*.rules \ | ||
233 | ${rootlibexecdir}/udev/rules.d/78*.rules \ | ||
234 | ${rootlibexecdir}/udev/rules.d/8*.rules \ | ||
235 | ${rootlibexecdir}/udev/rules.d/95*.rules \ | ||
236 | ${sysconfdir}/udev \ | ||
237 | ${sysconfdir}/init.d/systemd-udevd \ | ||
238 | ${systemd_unitdir}/system/*udev* \ | ||
239 | ${systemd_unitdir}/system/*.wants/*udev* \ | ||
240 | " | ||
241 | |||
242 | FILES_udev-utils = "${base_bindir}/udevadm ${datadir}/bash-completion/completions/udevadm" | ||
243 | |||
244 | FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d" | ||
245 | |||
246 | INITSCRIPT_PACKAGES = "udev" | ||
247 | INITSCRIPT_NAME_udev = "systemd-udevd" | ||
248 | INITSCRIPT_PARAMS_udev = "start 03 S ." | ||
249 | |||
250 | python __anonymous() { | ||
251 | features = d.getVar("DISTRO_FEATURES", True).split() | ||
252 | if "sysvinit" not in features: | ||
253 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") | ||
254 | } | ||
255 | |||
256 | # TODO: | ||
257 | # u-a for runlevel and telinit | ||
258 | |||
259 | ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff" | ||
260 | |||
261 | ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd" | ||
262 | ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" | ||
263 | ALTERNATIVE_PRIORITY[init] ?= "300" | ||
264 | |||
265 | ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl" | ||
266 | ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" | ||
267 | ALTERNATIVE_PRIORITY[halt] ?= "300" | ||
268 | |||
269 | ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl" | ||
270 | ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot" | ||
271 | ALTERNATIVE_PRIORITY[reboot] ?= "300" | ||
272 | |||
273 | ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl" | ||
274 | ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" | ||
275 | ALTERNATIVE_PRIORITY[shutdown] ?= "300" | ||
276 | |||
277 | ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl" | ||
278 | ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" | ||
279 | ALTERNATIVE_PRIORITY[poweroff] ?= "300" | ||
280 | |||
281 | pkg_postinst_udev-hwdb () { | ||
282 | if test -n "$D"; then | ||
283 | ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \ | ||
284 | --root $D | ||
285 | else | ||
286 | udevadm hwdb --update | ||
287 | fi | ||
288 | } | ||
289 | |||
290 | pkg_prerm_udev-hwdb () { | ||
291 | if test -n "$D"; then | ||
292 | exit 1 | ||
293 | fi | ||
294 | |||
295 | rm -f ${sysconfdir}/udev/hwdb.bin | ||
296 | } | ||
297 | |||
298 | # As this recipe builds udev, respect the systemd DISTRO_FEATURE so we don't try | ||
299 | # building udev and systemd in world builds. | ||
300 | python () { | ||
301 | if not oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): | ||
302 | raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES") | ||
303 | } | ||