diff options
author | Ross Burton <ross.burton@intel.com> | 2013-04-17 16:19:44 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-04-18 00:38:02 +0100 |
commit | c91877ea53d70f6b1684d5ba582044108f7ead1c (patch) | |
tree | bf4a0238e4007d968b0d3e4c78d6e05b6203c6df /meta/recipes-core | |
parent | 3ed6e9c5a1480520f7ac116936c503494b98a6df (diff) | |
download | poky-c91877ea53d70f6b1684d5ba582044108f7ead1c.tar.gz |
systemd: Effectively revert the move to /sbin
This effectively reverts the move systemd's libexecdir to /sbin. This caused
too many issues in other places and was not well enough tested this close to
release.
Rather than use base_libdir, the nonarch version is used to try and give some
chance of multilib not being totally broken in the release. Also some variables
are used that mirror the systemd build system to reduce the risk of using
variables that "work" in the general case but will break with multilib.
(From OE-Core rev: e921d43e213f93da176fd27e48b557f802443dec)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/systemd/systemd_199.bb | 73 |
1 files changed, 43 insertions, 30 deletions
diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_199.bb index f996f66f31..3b4e2ec5f7 100644 --- a/meta/recipes-core/systemd/systemd_199.bb +++ b/meta/recipes-core/systemd/systemd_199.bb | |||
@@ -55,9 +55,15 @@ PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz" | |||
55 | 55 | ||
56 | CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill" | 56 | CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill" |
57 | 57 | ||
58 | # Helper variables to clarify locations. This mirrors the logic in systemd's | ||
59 | # build system. | ||
60 | rootprefix ?= "${base_prefix}" | ||
61 | rootlibdir ?= "${base_libdir}" | ||
62 | rootlibexecdir = "${rootprefix}/lib" | ||
63 | |||
58 | # The gtk+ tools should get built as a separate recipe e.g. systemd-tools | 64 | # The gtk+ tools should get built as a separate recipe e.g. systemd-tools |
59 | EXTRA_OECONF = " --with-rootprefix=${base_prefix} \ | 65 | EXTRA_OECONF = " --with-rootprefix=${rootprefix} \ |
60 | --with-rootlibdir=${base_libdir} \ | 66 | --with-rootlibdir=${rootlibdir} \ |
61 | ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \ | 67 | ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \ |
62 | --enable-xz \ | 68 | --enable-xz \ |
63 | --disable-manpages \ | 69 | --disable-manpages \ |
@@ -74,7 +80,6 @@ EXTRA_OECONF = " --with-rootprefix=${base_prefix} \ | |||
74 | # uclibc does not have NSS | 80 | # uclibc does not have NSS |
75 | EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname " | 81 | EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname " |
76 | 82 | ||
77 | # There's no docbook-xsl-native, so for the xsltproc check to false | ||
78 | do_configure_prepend() { | 83 | do_configure_prepend() { |
79 | export CPP="${HOST_PREFIX}cpp ${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}" | 84 | export CPP="${HOST_PREFIX}cpp ${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}" |
80 | 85 | ||
@@ -84,23 +89,20 @@ do_configure_prepend() { | |||
84 | sed -i -e 's:=/root:=${ROOT_HOME}:g' ${S}/units/*.service* | 89 | sed -i -e 's:=/root:=${ROOT_HOME}:g' ${S}/units/*.service* |
85 | } | 90 | } |
86 | 91 | ||
87 | EXTRA_OEMAKE = "rootlibexecdir=${base_sbindir}/systemd \ | ||
88 | udevlibexecdir=${base_sbindir}/udev" | ||
89 | |||
90 | do_install() { | 92 | do_install() { |
91 | autotools_do_install | 93 | autotools_do_install |
92 | install -d ${D}/${base_sbindir} | 94 | install -d ${D}/${base_sbindir} |
93 | # provided by a seperate recipe | 95 | # Provided by a separate recipe |
94 | rm ${D}${systemd_unitdir}/system/serial-getty* -f | 96 | rm ${D}${systemd_unitdir}/system/serial-getty* -f |
95 | 97 | ||
96 | # provide support for initramfs | 98 | # Provide support for initramfs |
97 | ln -s ${base_sbindir}/systemd/systemd ${D}/init | 99 | ln -s ${rootlibexecdir}/systemd/systemd ${D}/init |
98 | ln -s ${base_sbindir}/systemd/systemd-udevd ${D}/${base_sbindir}/udev/udevd | 100 | ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd |
99 | 101 | ||
100 | # create dir for journal | 102 | # Create dir for journal |
101 | install -d ${D}${localstatedir}/log/journal | 103 | install -d ${D}${localstatedir}/log/journal |
102 | 104 | ||
103 | # create machine-id | 105 | # Create machine-id |
104 | # 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 | 106 | # 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 |
105 | touch ${D}${sysconfdir}/machine-id | 107 | touch ${D}${sysconfdir}/machine-id |
106 | 108 | ||
@@ -113,12 +115,12 @@ do_install() { | |||
113 | if ${@base_contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | 115 | if ${@base_contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then |
114 | install -d ${D}${sysconfdir}/init.d | 116 | install -d ${D}${sysconfdir}/init.d |
115 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd | 117 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd |
116 | sed -i s%@UDEVD@%${base_sbindir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd | 118 | sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd |
117 | fi | 119 | fi |
118 | } | 120 | } |
119 | 121 | ||
120 | python populate_packages_prepend (){ | 122 | python populate_packages_prepend (){ |
121 | systemdlibdir = d.getVar("base_libdir", True) | 123 | systemdlibdir = d.getVar("rootlibdir", True) |
122 | do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) | 124 | do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) |
123 | } | 125 | } |
124 | PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*" | 126 | PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*" |
@@ -135,7 +137,7 @@ RDEPENDS_${PN}-initramfs = "${PN}" | |||
135 | 137 | ||
136 | FILES_${PN}-gui = "${bindir}/systemadm" | 138 | FILES_${PN}-gui = "${bindir}/systemadm" |
137 | 139 | ||
138 | FILES_${PN}-vconsole-setup = "${systemd_unitdir}/systemd-vconsole-setup \ | 140 | FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \ |
139 | ${systemd_unitdir}/system/systemd-vconsole-setup.service \ | 141 | ${systemd_unitdir}/system/systemd-vconsole-setup.service \ |
140 | ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service" | 142 | ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service" |
141 | 143 | ||
@@ -151,9 +153,6 @@ CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \ | |||
151 | ${sysconfdir}/systemd/user.conf" | 153 | ${sysconfdir}/systemd/user.conf" |
152 | 154 | ||
153 | FILES_${PN} = " ${base_bindir}/* \ | 155 | FILES_${PN} = " ${base_bindir}/* \ |
154 | ${base_sbindir}/systemd \ | ||
155 | ${base_sbindir}/systemd/system-generators \ | ||
156 | ${base_sbindir}/udev \ | ||
157 | ${datadir}/bash-completion \ | 156 | ${datadir}/bash-completion \ |
158 | ${datadir}/dbus-1/services \ | 157 | ${datadir}/dbus-1/services \ |
159 | ${datadir}/dbus-1/system-services \ | 158 | ${datadir}/dbus-1/system-services \ |
@@ -169,9 +168,8 @@ FILES_${PN} = " ${base_bindir}/* \ | |||
169 | ${sysconfdir}/tmpfiles.d/ \ | 168 | ${sysconfdir}/tmpfiles.d/ \ |
170 | ${sysconfdir}/xdg/ \ | 169 | ${sysconfdir}/xdg/ \ |
171 | ${sysconfdir}/init.d/README \ | 170 | ${sysconfdir}/init.d/README \ |
171 | ${rootlibexecdir}/systemd/* \ | ||
172 | ${systemd_unitdir}/* \ | 172 | ${systemd_unitdir}/* \ |
173 | ${systemd_unitdir}/system/* \ | ||
174 | /lib/udev/rules.d/99-systemd.rules \ | ||
175 | ${base_libdir}/security/*.so \ | 173 | ${base_libdir}/security/*.so \ |
176 | ${libdir}/libnss_myhostname.so.2 \ | 174 | ${libdir}/libnss_myhostname.so.2 \ |
177 | /cgroup \ | 175 | /cgroup \ |
@@ -193,7 +191,7 @@ FILES_${PN} = " ${base_bindir}/* \ | |||
193 | /lib/udev/rules.d/99-systemd.rules \ | 191 | /lib/udev/rules.d/99-systemd.rules \ |
194 | " | 192 | " |
195 | 193 | ||
196 | FILES_${PN}-dbg += "${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/ ${base_sbindir}/systemd/.debug ${base_sbindir}/systemd/system-generators/.debug ${base_sbindir}/udev/.debug" | 194 | FILES_${PN}-dbg += "${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" | 195 | FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" |
198 | 196 | ||
199 | RDEPENDS_${PN} += "dbus util-linux-mount" | 197 | RDEPENDS_${PN} += "dbus util-linux-mount" |
@@ -204,29 +202,44 @@ RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units \ | |||
204 | kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \ | 202 | kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \ |
205 | " | 203 | " |
206 | 204 | ||
207 | PACKAGES =+ "udev-dbg udev-hwdb udev udev-consolekit udev-utils" | 205 | PACKAGES =+ "udev-dbg udev udev-utils udev-hwdb" |
208 | 206 | ||
209 | FILES_udev-dbg += "${base_sbindir}/udev/.debug" | 207 | FILES_udev-dbg += "/lib/udev/.debug" |
210 | 208 | ||
211 | RDEPENDS_udev += "udev-utils" | 209 | RDEPENDS_udev += "udev-utils" |
212 | RPROVIDES_udev = "hotplug" | 210 | RPROVIDES_udev = "hotplug" |
213 | RRECOMMENDS_udev += "udev-extraconf udev-hwdb" | 211 | RRECOMMENDS_udev += "udev-extraconf udev-hwdb" |
214 | 212 | ||
215 | FILES_udev += "${base_sbindir}/udevd \ | 213 | FILES_udev += "${base_sbindir}/udevd \ |
216 | ${base_sbindir}/systemd/systemd-udevd \ | 214 | ${rootlibexecdir}/systemd/systemd-udevd \ |
217 | ${base_sbindir}/udev \ | 215 | ${rootlibexecdir}/udev/accelerometer \ |
216 | ${rootlibexecdir}/udev/ata_id \ | ||
217 | ${rootlibexecdir}/udev/cdrom_id \ | ||
218 | ${rootlibexecdir}/udev/collect \ | ||
219 | ${rootlibexecdir}/udev/findkeyboards \ | ||
220 | ${rootlibexecdir}/udev/keyboard-force-release.sh \ | ||
221 | ${rootlibexecdir}/udev/keymap \ | ||
222 | ${rootlibexecdir}/udev/mtd_probe \ | ||
223 | ${rootlibexecdir}/udev/scsi_id \ | ||
224 | ${rootlibexecdir}/udev/v4l_id \ | ||
225 | ${rootlibexecdir}/udev/keymaps \ | ||
226 | ${rootlibexecdir}/udev/rules.d/4*.rules \ | ||
227 | ${rootlibexecdir}/udev/rules.d/5*.rules \ | ||
228 | ${rootlibexecdir}/udev/rules.d/6*.rules \ | ||
229 | ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \ | ||
230 | ${rootlibexecdir}/udev/rules.d/75*.rules \ | ||
231 | ${rootlibexecdir}/udev/rules.d/78*.rules \ | ||
232 | ${rootlibexecdir}/udev/rules.d/8*.rules \ | ||
233 | ${rootlibexecdir}/udev/rules.d/95*.rules \ | ||
218 | ${sysconfdir}/udev \ | 234 | ${sysconfdir}/udev \ |
219 | ${sysconfdir}/init.d/systemd-udevd \ | 235 | ${sysconfdir}/init.d/systemd-udevd \ |
220 | ${systemd_unitdir}/system/*udev* \ | 236 | ${systemd_unitdir}/system/*udev* \ |
221 | ${systemd_unitdir}/system/*.wants/*udev* \ | 237 | ${systemd_unitdir}/system/*.wants/*udev* \ |
222 | " | 238 | " |
223 | 239 | ||
224 | FILES_udev-consolekit += "/lib/ConsoleKit" | ||
225 | RDEPENDS_udev-consolekit += "${@base_contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)}" | ||
226 | |||
227 | FILES_udev-utils = "${base_bindir}/udevadm ${datadir}/bash-completion/completions/udevadm" | 240 | FILES_udev-utils = "${base_bindir}/udevadm ${datadir}/bash-completion/completions/udevadm" |
228 | 241 | ||
229 | FILES_udev-hwdb = "${base_sbindir}/udev/hwdb.d" | 242 | FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d" |
230 | 243 | ||
231 | INITSCRIPT_PACKAGES = "udev" | 244 | INITSCRIPT_PACKAGES = "udev" |
232 | INITSCRIPT_NAME_udev = "systemd-udevd" | 245 | INITSCRIPT_NAME_udev = "systemd-udevd" |
@@ -243,7 +256,7 @@ python __anonymous() { | |||
243 | 256 | ||
244 | ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff" | 257 | ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff" |
245 | 258 | ||
246 | ALTERNATIVE_TARGET[init] = "${base_sbindir}/systemd/systemd" | 259 | ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd" |
247 | ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" | 260 | ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" |
248 | ALTERNATIVE_PRIORITY[init] ?= "300" | 261 | ALTERNATIVE_PRIORITY[init] ?= "300" |
249 | 262 | ||