diff --git a/README.md b/README.md index 531772a..a5a1f55 100644 --- a/README.md +++ b/README.md @@ -1 +1,5 @@ -# meta-openxt-qt \ No newline at end of file +# meta-openxt-qt + +OpenXT components using the Qt software library. + +This layer depends upon the OpenEmbedded meta-qt5 layer. diff --git a/conf/layer.conf b/conf/layer.conf new file mode 100644 index 0000000..9973791 --- /dev/null +++ b/conf/layer.conf @@ -0,0 +1,35 @@ +# It really depends on order of the layers appearing in BBLAYERS +# variable in toplevel bblayers.conf file, where bitbake will search +# for .inc files and others where bitbake uses BBPATH since it will +# search the directories from first to last as specified in BBPATH +# Therefore if you want a given layer to be considered high priority +# for the .inc and .conf etc. then consider it adding at the beginning +# of BBPATH. For bblayers bitbake will use BBFILES_PRIORITY to resolve +# the recipe contention so the order of directories in BBFILES does +# not matter. + +# We have a conf and classes directory, append to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have a recipes directory, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "openxt-qt-layer" +BBFILE_PATTERN_openxt-qt-layer := "^${LAYERDIR}/" + +# Define the priority for recipes (.bb files) from this layer, +# choosing carefully how this layer interacts with all of the +# other layers. + +BBFILE_PRIORITY_openxt-qt-layer = "12" + +# This should only be incremented on significant changes that will +# cause compatibility issues with other layers +LAYERVERSION_openxt-qt-layer = "1" + +#LAYERDEPENDS_openxt-qt-layer = "xenclient-oe" + +LICENSE_PATH += "${LAYERDIR}/licenses" + +PREFERRED_PROVIDER_dbd = "qtdbd" +PREFERRED_PROVIDER_db-tools = "qtdbd-tools" diff --git a/recipes-openxt/qtdbd/qtdbd/db-cat-dom0 b/recipes-openxt/qtdbd/qtdbd/db-cat-dom0 new file mode 100644 index 0000000..f181a68 --- /dev/null +++ b/recipes-openxt/qtdbd/qtdbd/db-cat-dom0 @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Copyright (c) 2014 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 +# + +LD_PRELOAD=/usr/lib/libv4v-1.0.so.0 INET_IS_V4V=1 DBUS_SYSTEM_BUS_ADDRESS=tcp:host=1.0.0.0,port=5555 db-cat "$@" diff --git a/recipes-openxt/qtdbd/qtdbd/db-dump-dom0 b/recipes-openxt/qtdbd/qtdbd/db-dump-dom0 new file mode 100644 index 0000000..2f3f2ae --- /dev/null +++ b/recipes-openxt/qtdbd/qtdbd/db-dump-dom0 @@ -0,0 +1,21 @@ +#!/bin/sh +# +# Copyright (c) 2015 Assured Information Security, Inc. +# Copyright (c) 2014 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 +# + +LD_PRELOAD=/usr/lib/libv4v-1.0.so.0 INET_IS_V4V=1 DBUS_SYSTEM_BUS_ADDRESS=tcp:host=1.0.0.0,port=5555 db-dump "$@" diff --git a/recipes-openxt/qtdbd/qtdbd/db-exists-dom0 b/recipes-openxt/qtdbd/qtdbd/db-exists-dom0 new file mode 100644 index 0000000..9cfebc5 --- /dev/null +++ b/recipes-openxt/qtdbd/qtdbd/db-exists-dom0 @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Copyright (c) 2014 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 +# + +LD_PRELOAD=/usr/lib/libv4v-1.0.so.0 INET_IS_V4V=1 DBUS_SYSTEM_BUS_ADDRESS=tcp:host=1.0.0.0,port=5555 db-exists "$@" diff --git a/recipes-openxt/qtdbd/qtdbd/db-inject-dom0 b/recipes-openxt/qtdbd/qtdbd/db-inject-dom0 new file mode 100644 index 0000000..9644faf --- /dev/null +++ b/recipes-openxt/qtdbd/qtdbd/db-inject-dom0 @@ -0,0 +1,21 @@ +#!/bin/sh +# +# Copyright (c) 2015 Assured Information Security, Inc. +# Copyright (c) 2014 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 +# + +LD_PRELOAD=/usr/lib/libv4v-1.0.so.0 INET_IS_V4V=1 DBUS_SYSTEM_BUS_ADDRESS=tcp:host=1.0.0.0,port=5555 db-inject "$@" diff --git a/recipes-openxt/qtdbd/qtdbd/db-ls-dom0 b/recipes-openxt/qtdbd/qtdbd/db-ls-dom0 new file mode 100644 index 0000000..b37b7a5 --- /dev/null +++ b/recipes-openxt/qtdbd/qtdbd/db-ls-dom0 @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Copyright (c) 2014 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 +# + +LD_PRELOAD=/usr/lib/libv4v-1.0.so.0 INET_IS_V4V=1 DBUS_SYSTEM_BUS_ADDRESS=tcp:host=1.0.0.0,port=5555 db-ls "$@" diff --git a/recipes-openxt/qtdbd/qtdbd/db-nodes-dom0 b/recipes-openxt/qtdbd/qtdbd/db-nodes-dom0 new file mode 100644 index 0000000..fbae826 --- /dev/null +++ b/recipes-openxt/qtdbd/qtdbd/db-nodes-dom0 @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Copyright (c) 2014 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 +# + +LD_PRELOAD=/usr/lib/libv4v-1.0.so.0 INET_IS_V4V=1 DBUS_SYSTEM_BUS_ADDRESS=tcp:host=1.0.0.0,port=5555 db-nodes "$@" diff --git a/recipes-openxt/qtdbd/qtdbd/db-read-dom0 b/recipes-openxt/qtdbd/qtdbd/db-read-dom0 new file mode 100644 index 0000000..c6e9dbe --- /dev/null +++ b/recipes-openxt/qtdbd/qtdbd/db-read-dom0 @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Copyright (c) 2014 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 +# + +LD_PRELOAD=/usr/lib/libv4v-1.0.so.0 INET_IS_V4V=1 DBUS_SYSTEM_BUS_ADDRESS=tcp:host=1.0.0.0,port=5555 db-read "$@" diff --git a/recipes-openxt/qtdbd/qtdbd/db-rm-dom0 b/recipes-openxt/qtdbd/qtdbd/db-rm-dom0 new file mode 100644 index 0000000..4a4245f --- /dev/null +++ b/recipes-openxt/qtdbd/qtdbd/db-rm-dom0 @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Copyright (c) 2014 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 +# + +LD_PRELOAD=/usr/lib/libv4v-1.0.so.0 INET_IS_V4V=1 DBUS_SYSTEM_BUS_ADDRESS=tcp:host=1.0.0.0,port=5555 db-rm "$@" diff --git a/recipes-openxt/qtdbd/qtdbd/db-write-dom0 b/recipes-openxt/qtdbd/qtdbd/db-write-dom0 new file mode 100644 index 0000000..10a73db --- /dev/null +++ b/recipes-openxt/qtdbd/qtdbd/db-write-dom0 @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Copyright (c) 2014 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 +# + +LD_PRELOAD=/usr/lib/libv4v-1.0.so.0 INET_IS_V4V=1 DBUS_SYSTEM_BUS_ADDRESS=tcp:host=1.0.0.0,port=5555 db-write "$@" diff --git a/recipes-openxt/qtdbd/qtdbd/db.default b/recipes-openxt/qtdbd/qtdbd/db.default new file mode 100644 index 0000000..a5e9c2b --- /dev/null +++ b/recipes-openxt/qtdbd/qtdbd/db.default @@ -0,0 +1,14 @@ +{ + "db-version": "9", + "touchpad": { + "tap-to-click-enable": "true", + "scrolling-enable": "true", + "speed": "5" + }, + "power-management": { + "ac-lid-close-action": "nothing", + "battery-lid-close-action": "sleep" + }, + "xenmgr": { "showMsgOnVmStart": true }, + "display-driver-whitelist": "vga,citrix,intel,RDP,netmeeting" +} diff --git a/recipes-openxt/qtdbd/qtdbd/qtdbd.initscript b/recipes-openxt/qtdbd/qtdbd/qtdbd.initscript new file mode 100644 index 0000000..8e3e5c8 --- /dev/null +++ b/recipes-openxt/qtdbd/qtdbd/qtdbd.initscript @@ -0,0 +1,71 @@ +#!/bin/sh +# +# Copyright (c) 2015 Assured Information Security, 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 +# + +# Provides: dbd + +set -e + +test -x /usr/bin/dbd || exit 0 + +export PATH="/usr/sbin:/sbin:${PATH}" + +DBD_ARGS="" + +upgradedb() { + if [ ! -f /config/db ]; then + if [ ! -f /config/db.tmp ]; then + echo "Installing default dbd database in /config/db" + cp --preserve=xattr /usr/share/xenclient/db.default /config/db + fi + fi + + echo -n "Upgrading database format: " + + /usr/bin/upgrade-db | logger -s -t upgrade-db -p user.notice + + if [ ${PIPESTATUS[0]} -ne 0 ]; then + echo "FAILED to upgrade database. NOT starting dbd." + exit 1 + fi + + echo "db version OK" +} + +case "$1" in + start) + echo "Starting dbd" + upgradedb && start-stop-daemon --start --quiet --oknodo --exec /usr/bin/dbd -- ${DBD_ARGS} + ;; + stop) + echo "Stopping dbd" + killall dbd + sleep 1 + ;; + restart) + echo "Restarting dbd" + killall dbd + sleep 1 + start-stop-daemon --start --quiet --oknodo --exec /usr/bin/dbd -- ${DBD_ARGS} + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit 0 diff --git a/recipes-openxt/qtdbd/qtdbd_git.bb b/recipes-openxt/qtdbd/qtdbd_git.bb new file mode 100644 index 0000000..8586b95 --- /dev/null +++ b/recipes-openxt/qtdbd/qtdbd_git.bb @@ -0,0 +1,109 @@ +DESCRIPTION = "QT replacement for dbd and db-tools" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2c1c00f9d3ed9e24fa69b932b7e7aff2" + +SRC_URI = "git://github.com/cjp256/qtdbd.git;protocol=git;branch=master \ + file://qtdbd.initscript \ + file://db.default \ + file://db-cat-dom0 \ + file://db-dump-dom0 \ + file://db-exists-dom0 \ + file://db-inject-dom0 \ + file://db-ls-dom0 \ + file://db-nodes-dom0 \ + file://db-read-dom0 \ + file://db-rm-dom0 \ + file://db-write-dom0 \ +" + +SRCREV = "${AUTOREV}" + +S = "${WORKDIR}/git" +PV = "4.0+git${SRCPV}" + +inherit qmake5 update-rc.d + +INITSCRIPT_NAME = "dbd" +INITSCRIPT_PARAMS = "defaults 25" + +DEPENDS += "dbus qtbase qmjson xen-tools" + +EXTRA_OEMAKE += " INSTALL_ROOT=${D} " + +do_install_append() { + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/qtdbd.initscript ${D}${sysconfdir}/init.d/dbd + + install -m 0755 -d ${D}/usr/share/xenclient + install -m 0644 ${WORKDIR}/db.default ${D}/usr/share/xenclient/db.default + + install -m 0755 -d ${D}/usr/bin + install -m 0755 ${WORKDIR}/db-cat-dom0 ${D}/usr/bin/db-cat-dom0 + install -m 0755 ${WORKDIR}/db-dump-dom0 ${D}/usr/bin/db-dump-dom0 + install -m 0755 ${WORKDIR}/db-exists-dom0 ${D}/usr/bin/db-exists-dom0 + install -m 0755 ${WORKDIR}/db-inject-dom0 ${D}/usr/bin/db-inject-dom0 + install -m 0755 ${WORKDIR}/db-ls-dom0 ${D}/usr/bin/db-ls-dom0 + install -m 0755 ${WORKDIR}/db-nodes-dom0 ${D}/usr/bin/db-nodes-dom0 + install -m 0755 ${WORKDIR}/db-read-dom0 ${D}/usr/bin/db-read-dom0 + install -m 0755 ${WORKDIR}/db-rm-dom0 ${D}/usr/bin/db-rm-dom0 + install -m 0755 ${WORKDIR}/db-write-dom0 ${D}/usr/bin/db-write-dom0 +} + +PACKAGES += "\ + ${PN}-tools \ + ${PN}-unittests \ + ${PN}-perftest \ + ${PN}-tools-v4v-wrappers \ + " + +PROVIDES += "dbd db-tools" + +RPROVIDES_${PN} += "dbd" +RREPLACES_${PN} += "dbd" +RCONFLICTS_${PN} += "dbd" +RRECOMMENDS_${PN} += "${PN}-tools" + +RPROVIDES_${PN}-tools += "db-tools" +RREPLACES_${PN}-tools += "db-tools" +RCONFLICTS_${PN}-tools += "db-tools" +RRECOMMENDS_${PN}-tools += "${PN}-tools-v4v-wrappers" + +FILES_${PN} = "\ + /etc/init.d/dbd \ + /usr/bin/dbd \ + /usr/share/xenclient/db.default \ + " + +FILES_${PN}-tools = "\ + /usr/bin/db-cat \ + /usr/bin/db-dump \ + /usr/bin/db-exists \ + /usr/bin/db-inject \ + /usr/bin/db-ls \ + /usr/bin/db-nodes \ + /usr/bin/db-read \ + /usr/bin/db-rm \ + /usr/bin/db-write \ + " + +FILES_${PN}-tools-v4v-wrappers = "\ + /usr/bin/db-cat-dom0 \ + /usr/bin/db-dump-dom0 \ + /usr/bin/db-exists-dom0 \ + /usr/bin/db-inject-dom0 \ + /usr/bin/db-ls-dom0 \ + /usr/bin/db-nodes-dom0 \ + /usr/bin/db-read-dom0 \ + /usr/bin/db-rm-dom0 \ + /usr/bin/db-write-dom0 \ + " + +FILES_${PN}-unittests = "\ + /usr/bin/qtdbd-unittests \ + " + +FILES_${PN}-perftest = "\ + /usr/bin/dbd-perftest \ + " + +PR="r19" diff --git a/recipes-support/qmjson/files/no-gui.patch b/recipes-support/qmjson/files/no-gui.patch new file mode 100644 index 0000000..c20ea85 --- /dev/null +++ b/recipes-support/qmjson/files/no-gui.patch @@ -0,0 +1,13 @@ +diff --git a/src/core/core.pro b/src/core/core.pro +index 5e94f5d..233b6a1 100644 +--- a/src/core/core.pro ++++ b/src/core/core.pro +@@ -20,6 +20,7 @@ + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + cache() ++QT -= gui + + #------------------------------------------------------------------------------- + # Setup + diff --git a/recipes-support/qmjson/qmjson_git.bb b/recipes-support/qmjson/qmjson_git.bb new file mode 100644 index 0000000..bfc2126 --- /dev/null +++ b/recipes-support/qmjson/qmjson_git.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "QT-based JSON library" +LICENSE = "LGPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "git://github.com/QtMark/qmjson.git;protocol=git;branch=master \ + file://no-gui.patch;patch=1" + +SRCREV = "c503e3a1f77b782814aa929d4ecd7aa2d1ce1c2d" + +S = "${WORKDIR}/git" +PV = "1.0+git${SRCPV}" + +inherit qmake5 + +DEPENDS = "qtbase" + +EXTRA_OEMAKE += "INSTALL_ROOT=${D}" + +PR="r1" diff --git a/recipes-support/qtbase/qtbase_git.bbappend b/recipes-support/qtbase/qtbase_git.bbappend new file mode 100644 index 0000000..5e1bfae --- /dev/null +++ b/recipes-support/qtbase/qtbase_git.bbappend @@ -0,0 +1,11 @@ +PACKAGECONFIG = " \ + release \ + dbus \ + tools \ + libs \ + " + +QT_CONFIG_FLAGS += " \ + -no-qpa-platform-guard \ + -no-gui \ + "