summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-10-09 06:44:06 +0000
committerKhem Raj <raj.khem@gmail.com>2013-01-08 09:31:51 -0800
commit69b0e85b415e8cf1b86cdc4251f7a16a8d1db4e4 (patch)
tree312758809fea39c0fca57d0d96b40cbe8971cc61
parent4202d1a6e6573ed54fd242d8d7bf267ab71ee0e6 (diff)
downloadmeta-openembedded-69b0e85b415e8cf1b86cdc4251f7a16a8d1db4e4.tar.gz
systemd: Fix build when base_libdir is not /lib
we were carrying a wrong patch to fix rootlibdir to adapt systemd to OE's notion of base_libdir but thats not right and the units dont get initialised properly when we have base_libdir which is not /lib This patch fixes the use of base_libdir where it should have been catering to notions of systemd/udev for putting unit files and init scripts in /lib and not in base_libdir It also ignores the lib32-* packages so that systemd build works for multilib enabled systems. Adapt to nativesdk renaming Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-systemd/classes/systemd.bbclass7
-rw-r--r--meta-systemd/recipes-core/systemd/systemd_git.bb77
2 files changed, 45 insertions, 39 deletions
diff --git a/meta-systemd/classes/systemd.bbclass b/meta-systemd/classes/systemd.bbclass
index f26c6d1c1..958249259 100644
--- a/meta-systemd/classes/systemd.bbclass
+++ b/meta-systemd/classes/systemd.bbclass
@@ -70,7 +70,8 @@ def systemd_after_parse(d):
70 bpn = d.getVar('BPN', 1) 70 bpn = d.getVar('BPN', 1)
71 if bpn + "-native" != d.getVar('PN', 1) and \ 71 if bpn + "-native" != d.getVar('PN', 1) and \
72 bpn + "-cross" != d.getVar('PN', 1) and \ 72 bpn + "-cross" != d.getVar('PN', 1) and \
73 bpn + "-nativesdk" != d.getVar('PN', 1): 73 not d.getVar('MLPREFIX', 1) and \
74 "nativesdk-" + bpn != d.getVar('PN', 1):
74 systemd_check_vars() 75 systemd_check_vars()
75 for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split(): 76 for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
76 systemd_create_package(pkg_systemd) 77 systemd_create_package(pkg_systemd)
@@ -158,8 +159,8 @@ python populate_packages_prepend () {
158 def systemd_check_services(): 159 def systemd_check_services():
159 base_libdir = d.getVar('base_libdir', 1) 160 base_libdir = d.getVar('base_libdir', 1)
160 searchpaths = '/etc/systemd/system/' + ' ' 161 searchpaths = '/etc/systemd/system/' + ' '
161 searchpaths += d.getVar('base_libdir', 1) + '/systemd/system/' + ' ' 162 searchpaths += '/lib/systemd/system/' + ' '
162 searchpaths += d.getVar('libdir', 1) + '/systemd/system/' + ' ' 163 searchpaths += '/usr/lib/systemd/system/' + ' '
163 systemd_packages = d.getVar('SYSTEMD_PACKAGES', 1) 164 systemd_packages = d.getVar('SYSTEMD_PACKAGES', 1)
164 has_exactly_one_service = len(systemd_packages.split()) == 1 165 has_exactly_one_service = len(systemd_packages.split()) == 1
165 if has_exactly_one_service: 166 if has_exactly_one_service:
diff --git a/meta-systemd/recipes-core/systemd/systemd_git.bb b/meta-systemd/recipes-core/systemd/systemd_git.bb
index 7fa7ac61e..5722d35d3 100644
--- a/meta-systemd/recipes-core/systemd/systemd_git.bb
+++ b/meta-systemd/recipes-core/systemd/systemd_git.bb
@@ -90,6 +90,7 @@ do_configure_prepend() {
90 90
91do_install() { 91do_install() {
92 autotools_do_install 92 autotools_do_install
93 install -d ${D}${base_sbindir}
93 # provided by a seperate recipe 94 # provided by a seperate recipe
94 rm ${D}${systemd_unitdir}/system/serial-getty* -f 95 rm ${D}${systemd_unitdir}/system/serial-getty* -f
95 96
@@ -98,7 +99,10 @@ do_install() {
98 99
99 # create dir for journal 100 # create dir for journal
100 install -d ${D}${localstatedir}/log/journal 101 install -d ${D}${localstatedir}/log/journal
101 102 # udevd is needed in initramfs which was provided by udev in OE-Core
103 # so we need to provide that otherwise it pulls in both systemd and
104 # udev
105 ln -s ${systemd_unitdir}/systemd-udevd ${D}${base_sbindir}/udevd
102 # create machine-id 106 # create machine-id
103 # 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 107 # 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
104 touch ${D}${sysconfdir}/machine-id 108 touch ${D}${sysconfdir}/machine-id
@@ -159,24 +163,24 @@ FILES_${PN} = " ${base_bindir}/* \
159 ${sysconfdir}/init.d/README \ 163 ${sysconfdir}/init.d/README \
160 ${systemd_unitdir}/* \ 164 ${systemd_unitdir}/* \
161 ${systemd_unitdir}/system/* \ 165 ${systemd_unitdir}/system/* \
162 ${base_libdir}/udev/rules.d/99-systemd.rules \ 166 /lib/udev/rules.d/99-systemd.rules \
163 ${base_libdir}/security/*.so \ 167 ${base_libdir}/security/*.so \
164 /cgroup \ 168 /cgroup \
165 ${bindir}/systemd* \ 169 ${bindir}/systemd* \
166 ${bindir}/localectl \ 170 ${bindir}/localectl \
167 ${bindir}/hostnamectl \ 171 ${bindir}/hostnamectl \
168 ${bindir}/timedatectl \ 172 ${bindir}/timedatectl \
169 ${libdir}/tmpfiles.d/*.conf \ 173 ${exec_prefix}/lib/tmpfiles.d/*.conf \
170 ${libdir}/systemd \ 174 ${exec_prefix}/lib/systemd \
171 ${libdir}/binfmt.d \ 175 ${exec_prefix}/lib/binfmt.d \
172 ${libdir}/modules-load.d \ 176 ${exec_prefix}/lib/modules-load.d \
173 ${libdir}/sysctl.d \ 177 ${exec_prefix}/lib/sysctl.d \
174 ${localstatedir} \ 178 ${localstatedir} \
175 ${libexecdir} \ 179 ${libexecdir} \
176 ${base_libdir}/udev/rules.d/70-uaccess.rules \ 180 /lib/udev/rules.d/70-uaccess.rules \
177 ${base_libdir}/udev/rules.d/71-seat.rules \ 181 /lib/udev/rules.d/71-seat.rules \
178 ${base_libdir}/udev/rules.d/73-seat-late.rules \ 182 /lib/udev/rules.d/73-seat-late.rules \
179 ${base_libdir}/udev/rules.d/99-systemd.rules \ 183 /lib/udev/rules.d/99-systemd.rules \
180 " 184 "
181FILES_${PN}-dbg += "${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/ ${PYTHON_SITEPACKAGES_DIR}/systemd/.debug/" 185FILES_${PN}-dbg += "${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/ ${PYTHON_SITEPACKAGES_DIR}/systemd/.debug/"
182FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd ${PYTHON_SITEPACKAGES_DIR}/systemd/*.la" 186FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd ${PYTHON_SITEPACKAGES_DIR}/systemd/*.la"
@@ -200,42 +204,43 @@ RRECOMMENDS_${PN} += "systemd-serialgetty \
200 204
201PACKAGES =+ "udev-dbg udev udev-consolekit udev-utils udev-systemd" 205PACKAGES =+ "udev-dbg udev udev-consolekit udev-utils udev-systemd"
202 206
203FILES_udev-dbg += "${base_libdir}/udev/.debug" 207FILES_udev-dbg += "/lib/udev/.debug"
204 208
205RDEPENDS_udev += "udev-utils" 209RDEPENDS_udev += "udev-utils"
206RPROVIDES_udev = "hotplug" 210RPROVIDES_udev = "hotplug"
207 211
208FILES_udev += "${base_libdir}/udev/udevd \ 212FILES_udev += "${base_sbindir}/udevd \
209 ${base_libdir}/systemd/systemd-udevd \ 213 /lib/udev/udevd \
210 ${base_libdir}/udev/accelerometer \ 214 /lib/systemd/systemd-udevd \
211 ${base_libdir}/udev/ata_id \ 215 /lib/udev/accelerometer \
212 ${base_libdir}/udev/cdrom_id \ 216 /lib/udev/ata_id \
213 ${base_libdir}/udev/collect \ 217 /lib/udev/cdrom_id \
214 ${base_libdir}/udev/findkeyboards \ 218 /lib/udev/collect \
215 ${base_libdir}/udev/keyboard-force-release.sh \ 219 /lib/udev/findkeyboards \
216 ${base_libdir}/udev/keymap \ 220 /lib/udev/keyboard-force-release.sh \
217 ${base_libdir}/udev/mtd_probe \ 221 /lib/udev/keymap \
218 ${base_libdir}/udev/scsi_id \ 222 /lib/udev/mtd_probe \
219 ${base_libdir}/udev/v4l_id \ 223 /lib/udev/scsi_id \
220 ${base_libdir}/udev/keymaps \ 224 /lib/udev/v4l_id \
221 ${base_libdir}/udev/rules.d/4*.rules \ 225 /lib/udev/keymaps \
222 ${base_libdir}/udev/rules.d/5*.rules \ 226 /lib/udev/rules.d/4*.rules \
223 ${base_libdir}/udev/rules.d/6*.rules \ 227 /lib/udev/rules.d/5*.rules \
224 ${base_libdir}/udev/rules.d/70-power-switch.rules \ 228 /lib/udev/rules.d/6*.rules \
225 ${base_libdir}/udev/rules.d/75*.rules \ 229 /lib/udev/rules.d/70-power-switch.rules \
226 ${base_libdir}/udev/rules.d/78*.rules \ 230 /lib/udev/rules.d/75*.rules \
227 ${base_libdir}/udev/rules.d/8*.rules \ 231 /lib/udev/rules.d/78*.rules \
228 ${base_libdir}/udev/rules.d/95*.rules \ 232 /lib/udev/rules.d/8*.rules \
229 ${base_libdir}/udev/hwdb.d \ 233 /lib/udev/rules.d/95*.rules \
234 /lib/udev/hwdb.d \
230 ${sysconfdir}/udev \ 235 ${sysconfdir}/udev \
231 " 236 "
232 237
233FILES_udev-consolekit += "${libdir}/ConsoleKit" 238FILES_udev-consolekit += "/lib/ConsoleKit"
234RDEPENDS_udev-consolekit += "${@base_contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)}" 239RDEPENDS_udev-consolekit += "${@base_contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)}"
235 240
236FILES_udev-utils = "${bindir}/udevadm" 241FILES_udev-utils = "${bindir}/udevadm"
237 242
238FILES_udev-systemd = "${base_libdir}/systemd/system/*udev* ${base_libdir}/systemd/system/*.wants/*udev*" 243FILES_udev-systemd = "${systemd_unitdir}/system/*udev* ${systemd_unitdir}/system/*.wants/*udev*"
239RDEPENDS_udev-systemd = "udev" 244RDEPENDS_udev-systemd = "udev"
240 245
241# TODO: 246# TODO: