diff options
author | Ross Burton <ross.burton@intel.com> | 2013-04-11 17:28:25 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-04-13 23:53:05 +0100 |
commit | b528fee135e3a02edf078308f4339a642c523639 (patch) | |
tree | 3dc621ffdfc9db039579c9835c51c48a732d9707 | |
parent | 71aafc214fe407b7620e747c11dfb8326c867b1c (diff) | |
download | poky-b528fee135e3a02edf078308f4339a642c523639.tar.gz |
systemd: move the binaries to /sbin/systemd
As with udev, placing binaries in /lib breaks our current multilib
implementation. Change the rootlibexecdir to /sbin/systemd so that binaries
don't move in multilib situations.
(From OE-Core rev: d612ca261d12e89e96675c24d9d7456319179720)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/systemd/systemd/init | 14 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd_199.bb | 46 |
2 files changed, 23 insertions, 37 deletions
diff --git a/meta/recipes-core/systemd/systemd/init b/meta/recipes-core/systemd/systemd/init index 0ddd0434f2..32a474d72d 100644 --- a/meta/recipes-core/systemd/systemd/init +++ b/meta/recipes-core/systemd/systemd/init | |||
@@ -15,7 +15,7 @@ export TZ=/etc/localtime | |||
15 | 15 | ||
16 | [ -d /sys/class ] || exit 1 | 16 | [ -d /sys/class ] || exit 1 |
17 | [ -r /proc/mounts ] || exit 1 | 17 | [ -r /proc/mounts ] || exit 1 |
18 | [ -x /lib/systemd/systemd-udevd ] || exit 1 | 18 | [ -x @UDEVD@ ] || exit 1 |
19 | [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache | 19 | [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache |
20 | [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf | 20 | [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf |
21 | 21 | ||
@@ -71,15 +71,15 @@ case "$1" in | |||
71 | 71 | ||
72 | # trigger the sorted events | 72 | # trigger the sorted events |
73 | echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug | 73 | echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug |
74 | /lib/systemd/systemd-udevd -d | 74 | @UDEVD@ -d |
75 | 75 | ||
76 | /usr/bin/udevadm control --env=STARTUP=1 | 76 | udevadm control --env=STARTUP=1 |
77 | if [ "$not_first_boot" != "" ];then | 77 | if [ "$not_first_boot" != "" ];then |
78 | /usr/bin/udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux --subsystem-nomatch=platform | 78 | udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux --subsystem-nomatch=platform |
79 | (/usr/bin/udevadm settle --timeout=3; /usr/bin/udevadm control --env=STARTUP=)& | 79 | (udevadm settle --timeout=3; udevadm control --env=STARTUP=)& |
80 | else | 80 | else |
81 | /usr/bin/udevadm trigger --action=add | 81 | udevadm trigger --action=add |
82 | /usr/bin/udevadm settle | 82 | udevadm settle |
83 | fi | 83 | fi |
84 | ;; | 84 | ;; |
85 | stop) | 85 | stop) |
diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_199.bb index 2de9c1417c..5240443594 100644 --- a/meta/recipes-core/systemd/systemd_199.bb +++ b/meta/recipes-core/systemd/systemd_199.bb | |||
@@ -57,8 +57,6 @@ CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill" | |||
57 | # The gtk+ tools should get built as a separate recipe e.g. systemd-tools | 57 | # The gtk+ tools should get built as a separate recipe e.g. systemd-tools |
58 | EXTRA_OECONF = " --with-rootprefix=${base_prefix} \ | 58 | EXTRA_OECONF = " --with-rootprefix=${base_prefix} \ |
59 | --with-rootlibdir=${base_libdir} \ | 59 | --with-rootlibdir=${base_libdir} \ |
60 | --sbindir=${base_sbindir} \ | ||
61 | --libexecdir=${base_libdir} \ | ||
62 | ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \ | 60 | ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \ |
63 | --enable-xz \ | 61 | --enable-xz \ |
64 | --disable-manpages \ | 62 | --disable-manpages \ |
@@ -82,6 +80,9 @@ do_configure_prepend() { | |||
82 | sed -i -e 's:=/root:=${ROOT_HOME}:g' units/*.service* | 80 | sed -i -e 's:=/root:=${ROOT_HOME}:g' units/*.service* |
83 | } | 81 | } |
84 | 82 | ||
83 | EXTRA_OEMAKE = "rootlibexecdir=${base_sbindir}/systemd \ | ||
84 | udevlibexecdir=${base_sbindir}/udev" | ||
85 | |||
85 | do_install() { | 86 | do_install() { |
86 | autotools_do_install | 87 | autotools_do_install |
87 | install -d ${D}/${base_sbindir} | 88 | install -d ${D}/${base_sbindir} |
@@ -89,8 +90,8 @@ do_install() { | |||
89 | rm ${D}${systemd_unitdir}/system/serial-getty* -f | 90 | rm ${D}${systemd_unitdir}/system/serial-getty* -f |
90 | 91 | ||
91 | # provide support for initramfs | 92 | # provide support for initramfs |
92 | ln -s ${systemd_unitdir}/systemd ${D}/init | 93 | ln -s ${base_sbindir}/systemd/systemd ${D}/init |
93 | ln -s ${systemd_unitdir}/systemd-udevd ${D}/${base_sbindir}/udevd | 94 | ln -s ${base_sbindir}/systemd/systemd-udevd ${D}/${base_sbindir}/udev/udevd |
94 | 95 | ||
95 | # create dir for journal | 96 | # create dir for journal |
96 | install -d ${D}${localstatedir}/log/journal | 97 | install -d ${D}${localstatedir}/log/journal |
@@ -108,6 +109,7 @@ do_install() { | |||
108 | if ${@base_contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | 109 | if ${@base_contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then |
109 | install -d ${D}${sysconfdir}/init.d | 110 | install -d ${D}${sysconfdir}/init.d |
110 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd | 111 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd |
112 | sed -i s%@UDEVD@%${base_sbindir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd | ||
111 | fi | 113 | fi |
112 | } | 114 | } |
113 | 115 | ||
@@ -145,6 +147,9 @@ CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \ | |||
145 | ${sysconfdir}/systemd/user.conf" | 147 | ${sysconfdir}/systemd/user.conf" |
146 | 148 | ||
147 | FILES_${PN} = " ${base_bindir}/* \ | 149 | FILES_${PN} = " ${base_bindir}/* \ |
150 | ${base_sbindir}/systemd \ | ||
151 | ${base_sbindir}/systemd/system-generators \ | ||
152 | ${base_sbindir}/udev \ | ||
148 | ${datadir}/bash-completion \ | 153 | ${datadir}/bash-completion \ |
149 | ${datadir}/dbus-1/services \ | 154 | ${datadir}/dbus-1/services \ |
150 | ${datadir}/dbus-1/system-services \ | 155 | ${datadir}/dbus-1/system-services \ |
@@ -178,14 +183,13 @@ FILES_${PN} = " ${base_bindir}/* \ | |||
178 | ${exec_prefix}/lib/modules-load.d \ | 183 | ${exec_prefix}/lib/modules-load.d \ |
179 | ${exec_prefix}/lib/sysctl.d \ | 184 | ${exec_prefix}/lib/sysctl.d \ |
180 | ${localstatedir} \ | 185 | ${localstatedir} \ |
181 | ${libexecdir} \ | ||
182 | /lib/udev/rules.d/70-uaccess.rules \ | 186 | /lib/udev/rules.d/70-uaccess.rules \ |
183 | /lib/udev/rules.d/71-seat.rules \ | 187 | /lib/udev/rules.d/71-seat.rules \ |
184 | /lib/udev/rules.d/73-seat-late.rules \ | 188 | /lib/udev/rules.d/73-seat-late.rules \ |
185 | /lib/udev/rules.d/99-systemd.rules \ | 189 | /lib/udev/rules.d/99-systemd.rules \ |
186 | " | 190 | " |
187 | 191 | ||
188 | FILES_${PN}-dbg += "${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/" | 192 | 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" |
189 | FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" | 193 | FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" |
190 | 194 | ||
191 | RDEPENDS_${PN} += "dbus" | 195 | RDEPENDS_${PN} += "dbus" |
@@ -196,35 +200,17 @@ RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units \ | |||
196 | kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \ | 200 | kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \ |
197 | " | 201 | " |
198 | 202 | ||
199 | PACKAGES =+ "udev-dbg udev udev-consolekit udev-utils udev-hwdb" | 203 | PACKAGES =+ "udev-dbg udev-hwdb udev udev-consolekit udev-utils" |
200 | 204 | ||
201 | FILES_udev-dbg += "/lib/udev/.debug" | 205 | FILES_udev-dbg += "${base_sbindir}/udev/.debug" |
202 | 206 | ||
203 | RDEPENDS_udev += "udev-utils" | 207 | RDEPENDS_udev += "udev-utils" |
204 | RPROVIDES_udev = "hotplug" | 208 | RPROVIDES_udev = "hotplug" |
205 | RRECOMMENDS_udev += "udev-extraconf udev-hwdb" | 209 | RRECOMMENDS_udev += "udev-extraconf udev-hwdb" |
206 | 210 | ||
207 | FILES_udev += "${base_sbindir}/udevd \ | 211 | FILES_udev += "${base_sbindir}/udevd \ |
208 | ${base_libdir}/systemd/systemd-udevd \ | 212 | ${base_sbindir}/systemd/systemd-udevd \ |
209 | /lib/udev/accelerometer \ | 213 | ${base_sbindir}/udev \ |
210 | /lib/udev/ata_id \ | ||
211 | /lib/udev/cdrom_id \ | ||
212 | /lib/udev/collect \ | ||
213 | /lib/udev/findkeyboards \ | ||
214 | /lib/udev/keyboard-force-release.sh \ | ||
215 | /lib/udev/keymap \ | ||
216 | /lib/udev/mtd_probe \ | ||
217 | /lib/udev/scsi_id \ | ||
218 | /lib/udev/v4l_id \ | ||
219 | /lib/udev/keymaps \ | ||
220 | /lib/udev/rules.d/4*.rules \ | ||
221 | /lib/udev/rules.d/5*.rules \ | ||
222 | /lib/udev/rules.d/6*.rules \ | ||
223 | /lib/udev/rules.d/70-power-switch.rules \ | ||
224 | /lib/udev/rules.d/75*.rules \ | ||
225 | /lib/udev/rules.d/78*.rules \ | ||
226 | /lib/udev/rules.d/8*.rules \ | ||
227 | /lib/udev/rules.d/95*.rules \ | ||
228 | ${sysconfdir}/udev \ | 214 | ${sysconfdir}/udev \ |
229 | ${sysconfdir}/init.d/systemd-udevd \ | 215 | ${sysconfdir}/init.d/systemd-udevd \ |
230 | ${systemd_unitdir}/system/*udev* \ | 216 | ${systemd_unitdir}/system/*udev* \ |
@@ -236,7 +222,7 @@ RDEPENDS_udev-consolekit += "${@base_contains('DISTRO_FEATURES', 'x11', 'console | |||
236 | 222 | ||
237 | FILES_udev-utils = "${base_bindir}/udevadm ${datadir}/bash-completion/completions/udevadm" | 223 | FILES_udev-utils = "${base_bindir}/udevadm ${datadir}/bash-completion/completions/udevadm" |
238 | 224 | ||
239 | FILES_udev-hwdb = "${base_libdir}/udev/hwdb.d" | 225 | FILES_udev-hwdb = "${base_sbindir}/udev/hwdb.d" |
240 | 226 | ||
241 | INITSCRIPT_PACKAGES = "udev" | 227 | INITSCRIPT_PACKAGES = "udev" |
242 | INITSCRIPT_NAME_udev = "systemd-udevd" | 228 | INITSCRIPT_NAME_udev = "systemd-udevd" |
@@ -253,7 +239,7 @@ python __anonymous() { | |||
253 | 239 | ||
254 | ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff" | 240 | ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff" |
255 | 241 | ||
256 | ALTERNATIVE_TARGET[init] = "${systemd_unitdir}/systemd" | 242 | ALTERNATIVE_TARGET[init] = "${base_sbindir}/systemd/systemd" |
257 | ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" | 243 | ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" |
258 | ALTERNATIVE_PRIORITY[init] ?= "300" | 244 | ALTERNATIVE_PRIORITY[init] ?= "300" |
259 | 245 | ||