diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd_196.bb')
-rw-r--r-- | meta/recipes-core/systemd/systemd_196.bb | 249 |
1 files changed, 249 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd_196.bb b/meta/recipes-core/systemd/systemd_196.bb new file mode 100644 index 0000000000..1861437236 --- /dev/null +++ b/meta/recipes-core/systemd/systemd_196.bb | |||
@@ -0,0 +1,249 @@ | |||
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=fb919cc88dbe06ec0b0bd50e001ccf1f \ | ||
7 | file://LICENSE.MIT;md5=544799d0b492f119fa04641d1b8868ed" | ||
8 | |||
9 | PROVIDES = "udev" | ||
10 | |||
11 | DEPENDS = "xz kmod gtk-doc-stub-native docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers usbutils glib-2.0 libgcrypt" | ||
12 | DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
13 | |||
14 | SERIAL_CONSOLE ?= "115200 /dev/ttyS0" | ||
15 | |||
16 | SECTION = "base/shell" | ||
17 | |||
18 | inherit useradd pkgconfig autotools perlnative | ||
19 | |||
20 | SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \ | ||
21 | file://0001-Revert-systemd-analyze-use-argparse-instead-of-getop.patch \ | ||
22 | file://0002-Revert-analyze-use-GDBus-instead-of-dbus-python.patch \ | ||
23 | file://touchscreen.rules \ | ||
24 | file://modprobe.rules \ | ||
25 | file://var-run.conf \ | ||
26 | ${UCLIBCPATCHES} \ | ||
27 | file://00-create-volatile.conf \ | ||
28 | " | ||
29 | SRC_URI[md5sum] = "05ebd7f108e420e2b4e4810ea4b3c810" | ||
30 | SRC_URI[sha256sum] = "6bd4a658a5dd8198235b17ad1b1f0cc56d9e6f00d646ddcffdfc6f058b55e4bf" | ||
31 | |||
32 | UCLIBCPATCHES = "" | ||
33 | UCLIBCPATCHES_libc-uclibc = "file://systemd-pam-configure-check-uclibc.patch \ | ||
34 | file://systemd-pam-fix-execvpe.patch \ | ||
35 | file://systemd-pam-fix-fallocate.patch \ | ||
36 | file://systemd-pam-fix-getty-unit.patch \ | ||
37 | file://systemd-pam-fix-mkostemp.patch \ | ||
38 | file://systemd-pam-fix-msformat.patch \ | ||
39 | file://optional_secure_getenv.patch \ | ||
40 | " | ||
41 | LDFLAGS_libc-uclibc_append = " -lrt" | ||
42 | |||
43 | # This will disappear with systemd 197 | ||
44 | SYSTEMDDISTRO ?= "debian" | ||
45 | |||
46 | CACHED_CONFIGUREVARS = "ac_cv_file__usr_share_pci_ids=no \ | ||
47 | ac_cv_file__usr_share_hwdata_pci_ids=no \ | ||
48 | ac_cv_file__usr_share_misc_pci_ids=yes" | ||
49 | |||
50 | # The gtk+ tools should get built as a separate recipe e.g. systemd-tools | ||
51 | EXTRA_OECONF = " --with-distro=${SYSTEMDDISTRO} \ | ||
52 | --with-rootprefix=${base_prefix} \ | ||
53 | --with-rootlibdir=${base_libdir} \ | ||
54 | --sbindir=${base_sbindir} \ | ||
55 | --libexecdir=${base_libdir} \ | ||
56 | ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \ | ||
57 | --enable-xz \ | ||
58 | --disable-manpages \ | ||
59 | --disable-coredump \ | ||
60 | --disable-introspection \ | ||
61 | --with-pci-ids-path=/usr/share/misc \ | ||
62 | --disable-gtk-doc-html \ | ||
63 | --disable-tcpwrap \ | ||
64 | --enable-split-usr \ | ||
65 | --disable-microhttpd \ | ||
66 | --without-python \ | ||
67 | " | ||
68 | |||
69 | # There's no docbook-xsl-native, so for the xsltproc check to false | ||
70 | do_configure_prepend() { | ||
71 | export CPP="${HOST_PREFIX}cpp ${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}" | ||
72 | sed -i /xsltproc/d configure.ac | ||
73 | |||
74 | # we only have /home/root, not /root | ||
75 | sed -i -e 's:=/root:=/home/root:g' units/*.service* | ||
76 | |||
77 | gtkdocize --docdir ${S}/docs/ | ||
78 | } | ||
79 | |||
80 | do_install() { | ||
81 | autotools_do_install | ||
82 | install -d ${D}/${base_sbindir} | ||
83 | # provided by a seperate recipe | ||
84 | rm ${D}${systemd_unitdir}/system/serial-getty* -f | ||
85 | |||
86 | # provide support for initramfs | ||
87 | ln -s ${systemd_unitdir}/systemd ${D}/init | ||
88 | ln -s ${systemd_unitdir}/systemd-udevd ${D}/${base_sbindir}/udevd | ||
89 | |||
90 | # create dir for journal | ||
91 | install -d ${D}${localstatedir}/log/journal | ||
92 | |||
93 | # create machine-id | ||
94 | # 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 | ||
95 | touch ${D}${sysconfdir}/machine-id | ||
96 | |||
97 | install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/ | ||
98 | |||
99 | install -m 0644 ${WORKDIR}/var-run.conf ${D}${sysconfdir}/tmpfiles.d/ | ||
100 | |||
101 | install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ | ||
102 | } | ||
103 | |||
104 | python populate_packages_prepend (){ | ||
105 | systemdlibdir = d.getVar("base_libdir", True) | ||
106 | do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) | ||
107 | } | ||
108 | PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*" | ||
109 | |||
110 | PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze" | ||
111 | |||
112 | USERADD_PACKAGES = "${PN}" | ||
113 | GROUPADD_PARAM_${PN} = "-r lock" | ||
114 | |||
115 | FILES_${PN}-analyze = "${bindir}/systemd-analyze" | ||
116 | RDEPENDS_${PN}-analyze = "python-dbus python-argparse python-textutils" | ||
117 | RRECOMMENDS_${PN}-analyze = "python-pycairo" | ||
118 | |||
119 | FILES_${PN}-initramfs = "/init" | ||
120 | RDEPENDS_${PN}-initramfs = "${PN}" | ||
121 | |||
122 | FILES_${PN}-gui = "${bindir}/systemadm" | ||
123 | |||
124 | FILES_${PN}-vconsole-setup = "${systemd_unitdir}/systemd-vconsole-setup \ | ||
125 | ${systemd_unitdir}/system/systemd-vconsole-setup.service \ | ||
126 | ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service" | ||
127 | |||
128 | RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts" | ||
129 | |||
130 | CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \ | ||
131 | ${sysconfdir}/systemd/logind.conf \ | ||
132 | ${sysconfdir}/systemd/system.conf \ | ||
133 | ${sysconfdir}/systemd/user.conf" | ||
134 | |||
135 | FILES_${PN} = " ${base_bindir}/* \ | ||
136 | ${datadir}/dbus-1/services \ | ||
137 | ${datadir}/dbus-1/system-services \ | ||
138 | ${datadir}/polkit-1 \ | ||
139 | ${datadir}/${PN} \ | ||
140 | ${sysconfdir}/bash_completion.d/ \ | ||
141 | ${sysconfdir}/binfmt.d/ \ | ||
142 | ${sysconfdir}/dbus-1/ \ | ||
143 | ${sysconfdir}/machine-id \ | ||
144 | ${sysconfdir}/modules-load.d/ \ | ||
145 | ${sysconfdir}/sysctl.d/ \ | ||
146 | ${sysconfdir}/systemd/ \ | ||
147 | ${sysconfdir}/tmpfiles.d/ \ | ||
148 | ${sysconfdir}/xdg/ \ | ||
149 | ${sysconfdir}/init.d/README \ | ||
150 | ${systemd_unitdir}/* \ | ||
151 | ${systemd_unitdir}/system/* \ | ||
152 | /lib/udev/rules.d/99-systemd.rules \ | ||
153 | ${base_libdir}/security/*.so \ | ||
154 | /cgroup \ | ||
155 | ${bindir}/systemd* \ | ||
156 | ${bindir}/localectl \ | ||
157 | ${bindir}/hostnamectl \ | ||
158 | ${bindir}/timedatectl \ | ||
159 | ${exec_prefix}/lib/tmpfiles.d/*.conf \ | ||
160 | ${exec_prefix}/lib/systemd \ | ||
161 | ${exec_prefix}/lib/binfmt.d \ | ||
162 | ${exec_prefix}/lib/modules-load.d \ | ||
163 | ${exec_prefix}/lib/sysctl.d \ | ||
164 | ${localstatedir} \ | ||
165 | ${libexecdir} \ | ||
166 | /lib/udev/rules.d/70-uaccess.rules \ | ||
167 | /lib/udev/rules.d/71-seat.rules \ | ||
168 | /lib/udev/rules.d/73-seat-late.rules \ | ||
169 | /lib/udev/rules.d/99-systemd.rules \ | ||
170 | " | ||
171 | |||
172 | FILES_${PN}-dbg += "${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/" | ||
173 | FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" | ||
174 | |||
175 | RDEPENDS_${PN} += "dbus udev-systemd" | ||
176 | |||
177 | # kbd -> loadkeys,setfont | ||
178 | # systemd calls 'modprobe -sab --', which busybox doesn't support due to lack | ||
179 | # of blacklist support, so use proper modprobe from module-init-tools | ||
180 | # And pull in the kernel modules mentioned in INSTALL | ||
181 | # swapon -p is also not supported by busybox | ||
182 | # busybox mount is broken | ||
183 | RRECOMMENDS_${PN} += "systemd-serialgetty \ | ||
184 | util-linux-agetty \ | ||
185 | util-linux-swaponoff \ | ||
186 | util-linux-fsck e2fsprogs-e2fsck \ | ||
187 | module-init-tools \ | ||
188 | util-linux-mount util-linux-umount \ | ||
189 | kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \ | ||
190 | " | ||
191 | |||
192 | PACKAGES =+ "udev-dbg udev udev-consolekit udev-utils udev-systemd" | ||
193 | |||
194 | FILES_udev-dbg += "/lib/udev/.debug" | ||
195 | |||
196 | RDEPENDS_udev += "udev-utils" | ||
197 | RPROVIDES_udev = "hotplug" | ||
198 | |||
199 | FILES_udev += "${base_sbindir}/udevd \ | ||
200 | /libstemd-udevd \ | ||
201 | /lib/udev/accelerometer \ | ||
202 | /lib/udev/ata_id \ | ||
203 | /lib/udev/cdrom_id \ | ||
204 | /lib/udev/collect \ | ||
205 | /lib/udev/findkeyboards \ | ||
206 | /lib/udev/keyboard-force-release.sh \ | ||
207 | /lib/udev/keymap \ | ||
208 | /lib/udev/mtd_probe \ | ||
209 | /lib/udev/scsi_id \ | ||
210 | /lib/udev/v4l_id \ | ||
211 | /lib/udev/keymaps \ | ||
212 | /lib/udev/rules.d/4*.rules \ | ||
213 | /lib/udev/rules.d/5*.rules \ | ||
214 | /lib/udev/rules.d/6*.rules \ | ||
215 | /lib/udev/rules.d/70-power-switch.rules \ | ||
216 | /lib/udev/rules.d/75*.rules \ | ||
217 | /lib/udev/rules.d/78*.rules \ | ||
218 | /lib/udev/rules.d/8*.rules \ | ||
219 | /lib/udev/rules.d/95*.rules \ | ||
220 | ${base_libdir}/udev/hwdb.d \ | ||
221 | ${sysconfdir}/udev \ | ||
222 | " | ||
223 | |||
224 | FILES_udev-consolekit += "/lib/ConsoleKit" | ||
225 | RDEPENDS_udev-consolekit += "${@base_contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)}" | ||
226 | |||
227 | FILES_udev-utils = "${bindir}/udevadm" | ||
228 | |||
229 | FILES_udev-systemd = "${systemd_unitdir}/system/*udev* ${systemd_unitdir}/system/*.wants/*udev*" | ||
230 | RDEPENDS_udev-systemd = "udev" | ||
231 | |||
232 | # TODO: | ||
233 | # u-a for runlevel and telinit | ||
234 | |||
235 | pkg_postinst_systemd () { | ||
236 | update-alternatives --install ${base_sbindir}/init init ${systemd_unitdir}/systemd 300 | ||
237 | update-alternatives --install ${base_sbindir}/halt halt ${base_bindir}/systemctl 300 | ||
238 | update-alternatives --install ${base_sbindir}/reboot reboot ${base_bindir}/systemctl 300 | ||
239 | update-alternatives --install ${base_sbindir}/shutdown shutdown ${base_bindir}/systemctl 300 | ||
240 | update-alternatives --install ${base_sbindir}/poweroff poweroff ${base_bindir}/systemctl 300 | ||
241 | } | ||
242 | |||
243 | pkg_prerm_systemd () { | ||
244 | update-alternatives --remove init ${systemd_unitdir}/systemd | ||
245 | update-alternatives --remove halt ${base_bindir}/systemctl | ||
246 | update-alternatives --remove reboot ${base_bindir}/systemctl | ||
247 | update-alternatives --remove shutdown ${base_bindir}/systemctl | ||
248 | update-alternatives --remove poweroff ${base_bindir}/systemctl | ||
249 | } | ||