summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd_197.bb
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2013-01-23 22:04:02 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-28 12:29:31 +0000
commitde51b425962091a7760c7002a2a8a77221e78cda (patch)
tree8a6b5e97af06ed36ab5b4b41a6696f26924b88f3 /meta/recipes-core/systemd/systemd_197.bb
parentf366fd3f4a3a3d75ca2fabc112ccf068c04a4688 (diff)
downloadpoky-de51b425962091a7760c7002a2a8a77221e78cda.tar.gz
systemd: Upgrade to 197
LGPL-2.1 licensce is updated to reflect the new FSF address Drop patches to disable argparse and dbus-python analyser has been implemented in C lets use that patch and get rid of the python version disable hostname detection for uclibc bases systems since uclibc lacks NSS (From OE-Core rev: af17e816dd4ee0c2a7401f26a148129ad8f8e1fa) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Conflicts: meta/recipes-core/systemd/systemd_197.bb Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd_197.bb')
-rw-r--r--meta/recipes-core/systemd/systemd_197.bb258
1 files changed, 258 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd_197.bb b/meta/recipes-core/systemd/systemd_197.bb
new file mode 100644
index 0000000000..500c3ec68a
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd_197.bb
@@ -0,0 +1,258 @@
1DESCRIPTION = "Systemd a init replacement"
2HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
3
4LICENSE = "GPLv2 & LGPLv2.1 & MIT"
5LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
6 file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
7 file://LICENSE.MIT;md5=544799d0b492f119fa04641d1b8868ed"
8
9PROVIDES = "udev"
10
11PR = "r1"
12
13DEPENDS = "xz kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0 libgcrypt"
14DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
15
16SECTION = "base/shell"
17
18inherit gtk-doc useradd pkgconfig autotools perlnative
19
20SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
21 file://touchscreen.rules \
22 file://modprobe.rules \
23 file://var-run.conf \
24 ${UCLIBCPATCHES} \
25 file://00-create-volatile.conf \
26 file://0001-systemd-analyze-rewrite-in-C.patch \
27 file://0001-test-unit-file-Add-libsystemd-daemon.la-to-LDADD.patch \
28 "
29SRC_URI[md5sum] = "56a860dceadfafe59f40141eb5223743"
30SRC_URI[sha256sum] = "e6857ea21ae24d7056e7b0f4c2aaaba73b8bf57025b8949c0a8af0c1bc9774b5"
31
32UCLIBCPATCHES = ""
33UCLIBCPATCHES_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 "
41LDFLAGS_libc-uclibc_append = " -lrt"
42
43# This will disappear with systemd 197
44SYSTEMDDISTRO ?= "debian"
45
46CACHED_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
50GTKDOC_DOCDIR = "${S}/docs/"
51
52# The gtk+ tools should get built as a separate recipe e.g. systemd-tools
53EXTRA_OECONF = " --with-distro=${SYSTEMDDISTRO} \
54 --with-rootprefix=${base_prefix} \
55 --with-rootlibdir=${base_libdir} \
56 --sbindir=${base_sbindir} \
57 --libexecdir=${base_libdir} \
58 ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
59 --enable-xz \
60 --disable-manpages \
61 --disable-coredump \
62 --disable-introspection \
63 --with-pci-ids-path=/usr/share/misc \
64 --disable-tcpwrap \
65 --enable-split-usr \
66 --disable-microhttpd \
67 --without-python \
68 "
69# uclibc does not have NSS
70EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
71
72# There's no docbook-xsl-native, so for the xsltproc check to false
73do_configure_prepend() {
74 export CPP="${HOST_PREFIX}cpp ${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}"
75
76 # we only have /home/root, not /root
77 sed -i -e 's:=/root:=/home/root:g' units/*.service*
78}
79
80do_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
104python 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}
108PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
109
110PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze"
111
112USERADD_PACKAGES = "${PN}"
113GROUPADD_PARAM_${PN} = "-r lock"
114
115FILES_${PN}-analyze = "${bindir}/systemd-analyze"
116RDEPENDS_${PN}-analyze = "python-dbus python-argparse python-textutils"
117RRECOMMENDS_${PN}-analyze = "python-pycairo"
118
119FILES_${PN}-initramfs = "/init"
120RDEPENDS_${PN}-initramfs = "${PN}"
121
122FILES_${PN}-gui = "${bindir}/systemadm"
123
124FILES_${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
128RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts"
129
130CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
131 ${sysconfdir}/systemd/logind.conf \
132 ${sysconfdir}/systemd/system.conf \
133 ${sysconfdir}/systemd/user.conf"
134
135FILES_${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 ${libdir}/libnss_myhostname.so.2 \
155 /cgroup \
156 ${bindir}/systemd* \
157 ${bindir}/localectl \
158 ${bindir}/hostnamectl \
159 ${bindir}/timedatectl \
160 ${exec_prefix}/lib/tmpfiles.d/*.conf \
161 ${exec_prefix}/lib/systemd \
162 ${exec_prefix}/lib/binfmt.d \
163 ${exec_prefix}/lib/modules-load.d \
164 ${exec_prefix}/lib/sysctl.d \
165 ${localstatedir} \
166 ${libexecdir} \
167 /lib/udev/rules.d/70-uaccess.rules \
168 /lib/udev/rules.d/71-seat.rules \
169 /lib/udev/rules.d/73-seat-late.rules \
170 /lib/udev/rules.d/99-systemd.rules \
171 "
172
173FILES_${PN}-dbg += "${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/"
174FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
175
176RDEPENDS_${PN} += "dbus udev-systemd"
177
178# kbd -> loadkeys,setfont
179# systemd calls 'modprobe -sab --', which busybox doesn't support due to lack
180# of blacklist support, so use proper modprobe from module-init-tools
181# And pull in the kernel modules mentioned in INSTALL
182# swapon -p is also not supported by busybox
183# busybox mount is broken
184RRECOMMENDS_${PN} += "systemd-serialgetty \
185 util-linux-agetty \
186 util-linux-swaponoff \
187 util-linux-fsck e2fsprogs-e2fsck \
188 module-init-tools \
189 util-linux-mount util-linux-umount \
190 kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
191"
192
193PACKAGES =+ "udev-dbg udev udev-consolekit udev-utils udev-systemd"
194
195FILES_udev-dbg += "/lib/udev/.debug"
196
197RDEPENDS_udev += "udev-utils"
198RPROVIDES_udev = "hotplug"
199
200FILES_udev += "${base_sbindir}/udevd \
201 ${base_libdir}/systemd/systemd-udevd \
202 /lib/udev/accelerometer \
203 /lib/udev/ata_id \
204 /lib/udev/cdrom_id \
205 /lib/udev/collect \
206 /lib/udev/findkeyboards \
207 /lib/udev/keyboard-force-release.sh \
208 /lib/udev/keymap \
209 /lib/udev/mtd_probe \
210 /lib/udev/scsi_id \
211 /lib/udev/v4l_id \
212 /lib/udev/keymaps \
213 /lib/udev/rules.d/4*.rules \
214 /lib/udev/rules.d/5*.rules \
215 /lib/udev/rules.d/6*.rules \
216 /lib/udev/rules.d/70-power-switch.rules \
217 /lib/udev/rules.d/75*.rules \
218 /lib/udev/rules.d/78*.rules \
219 /lib/udev/rules.d/8*.rules \
220 /lib/udev/rules.d/95*.rules \
221 ${base_libdir}/udev/hwdb.d \
222 ${sysconfdir}/udev \
223 "
224
225FILES_udev-consolekit += "/lib/ConsoleKit"
226RDEPENDS_udev-consolekit += "${@base_contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)}"
227
228FILES_udev-utils = "${bindir}/udevadm"
229
230FILES_udev-systemd = "${systemd_unitdir}/system/*udev* ${systemd_unitdir}/system/*.wants/*udev*"
231RDEPENDS_udev-systemd = "udev"
232
233# TODO:
234# u-a for runlevel and telinit
235
236pkg_postinst_systemd () {
237update-alternatives --install ${base_sbindir}/init init ${systemd_unitdir}/systemd 300
238update-alternatives --install ${base_sbindir}/halt halt ${base_bindir}/systemctl 300
239update-alternatives --install ${base_sbindir}/reboot reboot ${base_bindir}/systemctl 300
240update-alternatives --install ${base_sbindir}/shutdown shutdown ${base_bindir}/systemctl 300
241update-alternatives --install ${base_sbindir}/poweroff poweroff ${base_bindir}/systemctl 300
242}
243
244pkg_prerm_systemd () {
245update-alternatives --remove init ${systemd_unitdir}/systemd
246update-alternatives --remove halt ${base_bindir}/systemctl
247update-alternatives --remove reboot ${base_bindir}/systemctl
248update-alternatives --remove shutdown ${base_bindir}/systemctl
249update-alternatives --remove poweroff ${base_bindir}/systemctl
250}
251
252
253# As this recipe builds udev, respect the systemd DISTRO_FEATURE so we don't try
254# building udev and systemd in world builds.
255python () {
256 if not oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
257 raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
258}