Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove xen-ocaml-libs #1490

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions conf/distro/openxt-main.conf
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,6 @@ PREFERRED_PROVIDER_virtual/java-native = "jamvm-native"
PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"
PREFERRED_PROVIDER_jpeg-native = "jpeg-native"

# Set the preferred version to C xenstored from xen-tools
PREFERRED_PROVIDER_virtual/xenstored = "xen-tools"
PREFERRED_RPROVIDER_virtual/xenstored = "xen-tools-xenstored"
# Force exclusion of the OCaml xenstored since the above preferences
# are not sufficient to override that as the default selection:
PACKAGE_EXCLUDE += " xen-ocaml-libs-xenstored"

# The C and OCaml xenstored packages can be installed together
# and this whitelisting is necessary to allow both to be built
MULTI_PROVIDER_WHITELIST += " virtual/xenstored"

# Default to rsyslog recipe which RPROVIDES rsyslog-conf
# Dom0 and Installer install rsyslog-conf-dom0 instead.
PREFERRED_RPROVIDER_rsyslog-conf = "rsyslog"
Expand Down
7 changes: 0 additions & 7 deletions recipes-core/images/xenclient-dom0-image.bb
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,6 @@ remove_initscripts() {
}
ROOTFS_POSTPROCESS_COMMAND += "remove_initscripts; "

# After ensuring that the correct number of xenstored daemon(s) are installed,
# enforce that the init script is active:
activate_xenstored_initscript() {
update-rc.d -r ${IMAGE_ROOTFS} xenstored defaults 05
}
ROOTFS_POSTPROCESS_COMMAND += "activate_xenstored_initscript; "

# Handle required configuration of the rootfs to store persistent files on
# encripted /config partition.
rw_config_partition() {
Expand Down
2 changes: 1 addition & 1 deletion recipes-core/packagegroups/packagegroup-xenclient-dom0.bb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RDEPENDS_${PN} = " \
xen-tools-libxenstat \
xen-tools-libxlutil \
xen-tools-xenstat \
virtual/xenstored \
xen-tools-xenstored \
xen-tools-xl \
xen-xsm-policy \
grub \
Expand Down
64 changes: 64 additions & 0 deletions recipes-extended/xen/files/oxenstored.initscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/bin/sh
#
# Copyright (c) 2013 Citrix Systems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#


PIDFILE=/var/run/xenstored.pid
EXECUTABLE=/usr/sbin/oxenstored

[ -f "${EXECUTABLE}" ] || exit 0

start() {
echo -n "Starting xenstored: "
# Allow 55MB for core dumps
ulimit -c 112640
$EXECUTABLE --pid-file $PIDFILE 2> /dev/null 2>&1
for i in /usr/share/xenclient/xenstore-init*;
do
$i > /dev/null 2>&1;
done
echo "OK"
}

stop() {
echo -n "Stopping xenstored: "
while kill `pidof -o %PPID oxenstored` 2>/dev/null ; do sleep 1 ; done
echo "OK"
}

restart() {
stop
start
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac

exit $?
112 changes: 0 additions & 112 deletions recipes-extended/xen/xen-ocaml-libs.bb

This file was deleted.

69 changes: 51 additions & 18 deletions recipes-extended/xen/xen-tools-openxt.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,53 @@ XEN_TARGET_ARCH = "x86_64"
SRC_URI_append = "\
file://xenconsoled.initscript \
file://xenstored.initscript \
file://oxenstored.initscript \
file://oxenstored.conf \
file://xen-init-dom0.initscript \
file://xl.conf \
"

inherit ocaml findlib

EXTRA_OECONF_remove = "--disable-ocamltools"

# OCAMLDESTDIR is set to $DESTDIR/$(ocamlfind printconf destdir), yet DESTDIR
# is required for other binaries installation, so override OCAMLDESTDIR.
EXTRA_OEMAKE += " \
OCAMLDESTDIR=${D}${sitelibdir} \
"

#TARGET_CC_ARCH += "${LDFLAGS}"
#CC_FOR_OCAML="${TARGET_PREFIX}gcc"

RDEPENDS_${PN}-xl += " ${PN}-scripts-block"
RDEPENDS_${PN}-libxenlight += " varstored-watch"

PACKAGES += " \
PACKAGES =+ " \
${PN}-libxenhypfs \
${PN}-libxenhypfs-dev \
"

PROVIDES =+ "virtual/xenstored"

# OpenXT uses init scripts rather than systemd
FILES_${PN}-console += "${INIT_D_DIR}/xenconsoled"

FILES_${PN}-xenstored = " \
${sbindir}/xenstored.${PN}-xenstored \
${sbindir}/xenstored \
${localstatedir}/lib/xenstored \
${INIT_D_DIR}/xenstored.${PN}-xenstored \
${INIT_D_DIR}/xenstored \
${sysconfdir}/xen/xenstored.conf \
"
"
RCONFLICTS_${PN}-xenstored = "${PN}-oxenstored"

FILES_${PN}-oxenstored = " \
${sbindir}/oxenstored \
${localstatedir}/lib/xenstored \
${INIT_D_DIR}/oxenstored \
${sysconfdir}/xen/oxenstored.conf \
"
PACKAGES =+ "${PN}-oxenstored"
RCONFLICTS_${PN}-oxenstored = "${PN}-xenstored"
RPROVIDES_${PN}-oxenstored = "virtual/xenstored"

FILES_${PN}-libxenhypfs = " \
${libdir}/libxenhypfs.so.* \
Expand Down Expand Up @@ -59,6 +83,11 @@ FILES_${PN}-misc += " \
${sbindir}/xen-vmtrace \
"

FILES_${PN}-ocaml = " \
${sitelibdir}/*/*${SOLIBSDEV} \
"
PACKAGES =+ "${PN}-ocaml"

# Python programs we don't want inby default, but they are
# actually libxl runtime dependencies.
FILES_${PN}-migration-helpers = " \
Expand All @@ -83,28 +112,22 @@ FILES_${PN}-xl += " ${INIT_D_DIR}/xen-init-dom0"
INITSCRIPT_PACKAGES =+ " \
${PN}-console \
${PN}-xenstored \
${PN}-oxenstored \
${PN}-xl \
"
INITSCRIPT_NAME_${PN}-console = "xenconsoled"
INITSCRIPT_PARAMS_${PN}-console = "defaults 20 80"
INITSCRIPT_NAME_${PN}-xenstored = "xenstored"
INITSCRIPT_PARAMS_${PN}-xenstored = "defaults 05 95"
INITSCRIPT_NAME_${PN}-oxenstored = "oxenstored"
INITSCRIPT_PARAMS_${PN}-oxenstored = "defaults 05 95"
INITSCRIPT_NAME_${PN}-xl = "xen-init-dom0"
INITSCRIPT_PARAMS_${PN}-xl = "defaults 21 79"
INITSCRIPT_NAME_${PN}-xl = "xen-init-dom0"
INITSCRIPT_PARAMS_${PN}-xl = "defaults 21 79"

EXTRA_OEMAKE += "ETHERBOOT_ROMS=${STAGING_DIR_HOST}/usr/share/firmware/intel.rom"

pkg_postinst_${PN}-xenstored () {
update-alternatives --install ${sbindir}/xenstored xenstored xenstored.${PN}-xenstored 200
update-alternatives --install ${INIT_D_DIR}/xenstored xenstored-initscript xenstored.${PN}-xenstored 200
}
pkg_prerm_${PN}-xenstored () {
update-alternatives --remove xenstored xenstored.${PN}-xenstored
update-alternatives --remove xenstored-initscript xenstored.${PN}-xenstored
}

do_install_append() {
install -d ${D}${datadir}/pkgconfig

Expand All @@ -118,13 +141,19 @@ do_install_append() {
install -m 0644 ${WORKDIR}/xl.conf \
${D}${sysconfdir}/xen/xl.conf

mv ${D}${sbindir}/xenstored ${D}${sbindir}/xenstored.${PN}-xenstored
install -m 0755 ${WORKDIR}/xenstored.initscript \
${D}${INIT_D_DIR}/xenstored.${PN}-xenstored
${D}${INIT_D_DIR}/xenstored

install -d ${D}${INIT_D_DIR}
install -m 0755 ${WORKDIR}/xenstored.initscript \
${D}${INIT_D_DIR}/oxenstored
rm ${D}${sysconfdir}/xen/oxenstored.conf
install -m 0644 ${WORKDIR}/oxenstored.conf \
${D}${sysconfdir}/xen/oxenstored.conf

# The C xenstored uses one additional command line argument:
sed 's/EXECUTABLE --/EXECUTABLE --internal-db --/' \
-i ${D}${INIT_D_DIR}/xenstored.${PN}-xenstored
-i ${D}${INIT_D_DIR}/xenstored

# Since we don't have a xenstore stubdomain, remove the
# xenstore stubdomain init program (libdir == /usr/lib)
Expand All @@ -137,3 +166,7 @@ do_install_append() {
rm -rf ${D}/${sysconfdir}/xen/scripts/block-dummy
rm -rf ${D}/${sysconfdir}/default/xencommons
}

# Ocaml files, /usr/lib/ocaml/site-lib/xen*/xen*.cm{a,o}, reference ocaml
# shared libraries, but we don't have a runtime.
INSANE_SKIP_${PN}-dev = "file-rdeps"
2 changes: 1 addition & 1 deletion recipes-openxt/manager/dbd_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://../COPYING;md5=4641e94ec96f98fabc56ff9cc48be14b"

DEPENDS = " \
ocaml-dbus \
xen-ocaml-libs \
xen-tools \
openxt-ocaml-libs \
"

Expand Down
2 changes: 1 addition & 1 deletion recipes-openxt/uid/uid_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425
DEPENDS = " \
dbus-native \
ocaml-dbus \
xen-ocaml-libs \
xen-tools \
openxt-ocaml-libs \
"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
+/usr/bin/xenmgr -- gen_context(system_u:object_r:xend_exec_t,s0)
/usr/sbin/xenstored -- gen_context(system_u:object_r:xenstored_exec_t,s0)
+/usr/sbin/xenstored\.xen-tools-xenstored -- gen_context(system_u:object_r:xenstored_exec_t,s0)
+/usr/sbin/xenstored\.xen-ocaml-libs-xenstored -- gen_context(system_u:object_r:xenstored_exec_t,s0)
+/usr/sbin/oxenstored -- gen_context(system_u:object_r:xenstored_exec_t,s0)
/usr/sbin/xl -- gen_context(system_u:object_r:xm_exec_t,s0)
/usr/sbin/xm -- gen_context(system_u:object_r:xm_exec_t,s0)

Expand Down