diff options
Diffstat (limited to 'meta-oe/recipes-core/systemd/systemd_v189.bb')
-rw-r--r-- | meta-oe/recipes-core/systemd/systemd_v189.bb | 232 |
1 files changed, 232 insertions, 0 deletions
diff --git a/meta-oe/recipes-core/systemd/systemd_v189.bb b/meta-oe/recipes-core/systemd/systemd_v189.bb new file mode 100644 index 000000000..613f703ba --- /dev/null +++ b/meta-oe/recipes-core/systemd/systemd_v189.bb | |||
@@ -0,0 +1,232 @@ | |||
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 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 | PR = "r6" | ||
19 | |||
20 | inherit useradd pkgconfig autotools perlnative | ||
21 | |||
22 | SRCREV = "38a60d7112d33ffd596b23e8df53d75a7c09e71b" | ||
23 | |||
24 | SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;protocol=git \ | ||
25 | file://use-rootlibdir.patch \ | ||
26 | file://gtk-doc.make \ | ||
27 | file://touchscreen.rules \ | ||
28 | file://modprobe.rules \ | ||
29 | file://var-run.conf \ | ||
30 | ${UCLIBCPATCHES} \ | ||
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 | " | ||
40 | LDFLAGS_libc-uclibc_append = " -lrt" | ||
41 | |||
42 | S = "${WORKDIR}/git" | ||
43 | |||
44 | SYSTEMDDISTRO ?= "debian" | ||
45 | SYSTEMDDISTRO_angstrom = "angstrom" | ||
46 | |||
47 | CACHED_CONFIGUREVARS = "ac_cv_file__usr_share_pci_ids=no \ | ||
48 | ac_cv_file__usr_share_hwdata_pci_ids=no \ | ||
49 | ac_cv_file__usr_share_misc_pci_ids=yes" | ||
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 | " | ||
66 | |||
67 | # There's no docbook-xsl-native, so for the xsltproc check to false | ||
68 | do_configure_prepend() { | ||
69 | export CPP="${HOST_PREFIX}cpp ${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}" | ||
70 | sed -i /xsltproc/d configure.ac | ||
71 | |||
72 | cp ${WORKDIR}/gtk-doc.make ${S}/docs/ | ||
73 | |||
74 | # we only have /home/root, not /root | ||
75 | sed -i -e 's:=/root:=/home/root:g' units/*.service* | ||
76 | } | ||
77 | |||
78 | do_install() { | ||
79 | autotools_do_install | ||
80 | # provided by a seperate recipe | ||
81 | rm ${D}${systemd_unitdir}/system/serial-getty* -f | ||
82 | |||
83 | # provide support for initramfs | ||
84 | ln -s ${systemd_unitdir}/systemd ${D}/init | ||
85 | |||
86 | # create dir for journal | ||
87 | install -d ${D}${localstatedir}/log/journal | ||
88 | |||
89 | # create machine-id | ||
90 | # 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 | ||
91 | touch ${D}${sysconfdir}/machine-id | ||
92 | |||
93 | install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/ | ||
94 | |||
95 | install -m 0644 ${WORKDIR}/var-run.conf ${D}${sysconfdir}/tmpfiles.d/ | ||
96 | } | ||
97 | |||
98 | python populate_packages_prepend (){ | ||
99 | systemdlibdir = d.getVar("base_libdir", True) | ||
100 | do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) | ||
101 | } | ||
102 | |||
103 | PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze" | ||
104 | |||
105 | USERADD_PACKAGES = "${PN}" | ||
106 | GROUPADD_PARAM_${PN} = "-r lock" | ||
107 | |||
108 | FILES_${PN}-analyze = "${bindir}/systemd-analyze" | ||
109 | RDEPENDS_${PN}-analyze = "python-dbus" | ||
110 | RRECOMMENDS_${PN}-analyze = "python-pycairo" | ||
111 | |||
112 | FILES_${PN}-initramfs = "/init" | ||
113 | RDEPENDS_${PN}-initramfs = "${PN}" | ||
114 | |||
115 | FILES_${PN}-gui = "${bindir}/systemadm" | ||
116 | |||
117 | FILES_${PN}-vconsole-setup = "${systemd_unitdir}/systemd-vconsole-setup \ | ||
118 | ${systemd_unitdir}/system/systemd-vconsole-setup.service \ | ||
119 | ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service" | ||
120 | |||
121 | RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts" | ||
122 | |||
123 | FILES_${PN} = " ${base_bindir}/* \ | ||
124 | ${datadir}/dbus-1/services \ | ||
125 | ${datadir}/dbus-1/system-services \ | ||
126 | ${datadir}/polkit-1 \ | ||
127 | ${datadir}/${PN} \ | ||
128 | ${sysconfdir}/bash_completion.d/ \ | ||
129 | ${sysconfdir}/binfmt.d/ \ | ||
130 | ${sysconfdir}/dbus-1/ \ | ||
131 | ${sysconfdir}/machine-id \ | ||
132 | ${sysconfdir}/modules-load.d/ \ | ||
133 | ${sysconfdir}/sysctl.d/ \ | ||
134 | ${sysconfdir}/systemd/ \ | ||
135 | ${sysconfdir}/tmpfiles.d/ \ | ||
136 | ${sysconfdir}/xdg/ \ | ||
137 | ${systemd_unitdir}/* \ | ||
138 | ${systemd_unitdir}/system/* \ | ||
139 | ${base_libdir}/udev/rules.d/99-systemd.rules \ | ||
140 | ${base_libdir}/security/*.so \ | ||
141 | /cgroup \ | ||
142 | ${bindir}/systemd* \ | ||
143 | ${libdir}/tmpfiles.d/*.conf \ | ||
144 | ${libdir}/systemd \ | ||
145 | ${libdir}/binfmt.d \ | ||
146 | ${libdir}/modules-load.d \ | ||
147 | ${libdir}/sysctl.d \ | ||
148 | ${localstatedir} \ | ||
149 | ${libexecdir} \ | ||
150 | ${base_libdir}/udev/rules.d/70-uaccess.rules \ | ||
151 | ${base_libdir}/udev/rules.d/71-seat.rules \ | ||
152 | ${base_libdir}/udev/rules.d/73-seat-late.rules \ | ||
153 | ${base_libdir}/udev/rules.d/99-systemd.rules \ | ||
154 | " | ||
155 | |||
156 | FILES_${PN}-dbg += "${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/" | ||
157 | FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" | ||
158 | |||
159 | RDEPENDS_${PN} += "dbus-systemd udev-systemd" | ||
160 | |||
161 | # kbd -> loadkeys,setfont | ||
162 | # systemd calls 'modprobe -sab --', which busybox doesn't support due to lack | ||
163 | # of blacklist support, so use proper modprobe from module-init-tools | ||
164 | # And pull in the kernel modules mentioned in INSTALL | ||
165 | # swapon -p is also not supported by busybox | ||
166 | # busybox mount is broken | ||
167 | RRECOMMENDS_${PN} += "systemd-serialgetty \ | ||
168 | util-linux-agetty \ | ||
169 | util-linux-swaponoff \ | ||
170 | util-linux-fsck e2fsprogs-e2fsck \ | ||
171 | module-init-tools \ | ||
172 | util-linux-mount util-linux-umount \ | ||
173 | kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \ | ||
174 | " | ||
175 | |||
176 | PACKAGES =+ "udev-dbg udev udev-consolekit udev-utils udev-systemd" | ||
177 | |||
178 | FILES_udev-dbg += "${base_libdir}/udev/.debug" | ||
179 | |||
180 | RDEPENDS_udev += "udev-utils" | ||
181 | RPROVIDES_udev = "hotplug" | ||
182 | |||
183 | FILES_udev += "${base_libdir}/udev/udevd \ | ||
184 | ${base_libdir}/systemd/systemd-udevd \ | ||
185 | ${base_libdir}/udev/accelerometer \ | ||
186 | ${base_libdir}/udev/ata_id \ | ||
187 | ${base_libdir}/udev/cdrom_id \ | ||
188 | ${base_libdir}/udev/collect \ | ||
189 | ${base_libdir}/udev/findkeyboards \ | ||
190 | ${base_libdir}/udev/keyboard-force-release.sh \ | ||
191 | ${base_libdir}/udev/keymap \ | ||
192 | ${base_libdir}/udev/mtd_probe \ | ||
193 | ${base_libdir}/udev/scsi_id \ | ||
194 | ${base_libdir}/udev/v4l_id \ | ||
195 | ${base_libdir}/udev/keymaps \ | ||
196 | ${base_libdir}/udev/rules.d/4*.rules \ | ||
197 | ${base_libdir}/udev/rules.d/5*.rules \ | ||
198 | ${base_libdir}/udev/rules.d/6*.rules \ | ||
199 | ${base_libdir}/udev/rules.d/70-power-switch.rules \ | ||
200 | ${base_libdir}/udev/rules.d/75*.rules \ | ||
201 | ${base_libdir}/udev/rules.d/78*.rules \ | ||
202 | ${base_libdir}/udev/rules.d/8*.rules \ | ||
203 | ${base_libdir}/udev/rules.d/95*.rules \ | ||
204 | ${sysconfdir}/udev \ | ||
205 | " | ||
206 | |||
207 | FILES_udev-consolekit += "${libdir}/ConsoleKit" | ||
208 | RDEPENDS_udev-consolekit += "${@base_contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)}" | ||
209 | |||
210 | FILES_udev-utils = "${bindir}/udevadm" | ||
211 | |||
212 | FILES_udev-systemd = "${base_libdir}/systemd/system/*udev* ${base_libdir}/systemd/system/*.wants/*udev*" | ||
213 | RDEPENDS_udev-systemd = "udev" | ||
214 | |||
215 | # TODO: | ||
216 | # u-a for runlevel and telinit | ||
217 | |||
218 | pkg_postinst_systemd () { | ||
219 | update-alternatives --install ${base_sbindir}/init init ${systemd_unitdir}/systemd 300 | ||
220 | update-alternatives --install ${base_sbindir}/halt halt ${base_bindir}/systemctl 300 | ||
221 | update-alternatives --install ${base_sbindir}/reboot reboot ${base_bindir}/systemctl 300 | ||
222 | update-alternatives --install ${base_sbindir}/shutdown shutdown ${base_bindir}/systemctl 300 | ||
223 | update-alternatives --install ${base_sbindir}/poweroff poweroff ${base_bindir}/systemctl 300 | ||
224 | } | ||
225 | |||
226 | pkg_prerm_systemd () { | ||
227 | update-alternatives --remove init ${systemd_unitdir}/systemd | ||
228 | update-alternatives --remove halt ${base_bindir}/systemctl | ||
229 | update-alternatives --remove reboot ${base_bindir}/systemctl | ||
230 | update-alternatives --remove shutdown ${base_bindir}/systemctl | ||
231 | update-alternatives --remove poweroff ${base_bindir}/systemctl | ||
232 | } | ||