summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/systemd/systemd_199.bb73
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
56CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill" 56CACHED_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.
60rootprefix ?= "${base_prefix}"
61rootlibdir ?= "${base_libdir}"
62rootlibexecdir = "${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
59EXTRA_OECONF = " --with-rootprefix=${base_prefix} \ 65EXTRA_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
75EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname " 81EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
76 82
77# There's no docbook-xsl-native, so for the xsltproc check to false
78do_configure_prepend() { 83do_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
87EXTRA_OEMAKE = "rootlibexecdir=${base_sbindir}/systemd \
88 udevlibexecdir=${base_sbindir}/udev"
89
90do_install() { 92do_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
120python populate_packages_prepend (){ 122python 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}
124PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*" 126PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
@@ -135,7 +137,7 @@ RDEPENDS_${PN}-initramfs = "${PN}"
135 137
136FILES_${PN}-gui = "${bindir}/systemadm" 138FILES_${PN}-gui = "${bindir}/systemadm"
137 139
138FILES_${PN}-vconsole-setup = "${systemd_unitdir}/systemd-vconsole-setup \ 140FILES_${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
153FILES_${PN} = " ${base_bindir}/* \ 155FILES_${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
196FILES_${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" 194FILES_${PN}-dbg += "${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/"
197FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" 195FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
198 196
199RDEPENDS_${PN} += "dbus util-linux-mount" 197RDEPENDS_${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
207PACKAGES =+ "udev-dbg udev-hwdb udev udev-consolekit udev-utils" 205PACKAGES =+ "udev-dbg udev udev-utils udev-hwdb"
208 206
209FILES_udev-dbg += "${base_sbindir}/udev/.debug" 207FILES_udev-dbg += "/lib/udev/.debug"
210 208
211RDEPENDS_udev += "udev-utils" 209RDEPENDS_udev += "udev-utils"
212RPROVIDES_udev = "hotplug" 210RPROVIDES_udev = "hotplug"
213RRECOMMENDS_udev += "udev-extraconf udev-hwdb" 211RRECOMMENDS_udev += "udev-extraconf udev-hwdb"
214 212
215FILES_udev += "${base_sbindir}/udevd \ 213FILES_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
224FILES_udev-consolekit += "/lib/ConsoleKit"
225RDEPENDS_udev-consolekit += "${@base_contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)}"
226
227FILES_udev-utils = "${base_bindir}/udevadm ${datadir}/bash-completion/completions/udevadm" 240FILES_udev-utils = "${base_bindir}/udevadm ${datadir}/bash-completion/completions/udevadm"
228 241
229FILES_udev-hwdb = "${base_sbindir}/udev/hwdb.d" 242FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
230 243
231INITSCRIPT_PACKAGES = "udev" 244INITSCRIPT_PACKAGES = "udev"
232INITSCRIPT_NAME_udev = "systemd-udevd" 245INITSCRIPT_NAME_udev = "systemd-udevd"
@@ -243,7 +256,7 @@ python __anonymous() {
243 256
244ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff" 257ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff"
245 258
246ALTERNATIVE_TARGET[init] = "${base_sbindir}/systemd/systemd" 259ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
247ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" 260ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
248ALTERNATIVE_PRIORITY[init] ?= "300" 261ALTERNATIVE_PRIORITY[init] ?= "300"
249 262