Compare commits

..

19 Commits

Author SHA1 Message Date
0f6b046696 update upstream to scarthgap 2024-08-26 23:29:55 +02:00
a2ed0e9627 facadedevice: add release 1.0.4 from git 2024-03-16 19:53:52 +01:00
eb14a4951f add TangoTest 2024-03-15 18:20:30 +01:00
068d299fad pytango: document build process 2024-03-15 18:19:13 +01:00
d78e497d7e facadedevice: fix for Python 3.10+ collections API 2024-03-15 18:18:05 +01:00
87c340f6d6 add package groups 2024-03-15 18:16:04 +01:00
78d0dfbc9d add dependency on OE python layer 2024-03-14 21:21:47 +01:00
2c02e6cbee change layer compatibility to mickledore only 2024-03-14 21:18:01 +01:00
6d318a5fed tango-common: fix common license path 2024-03-14 20:28:52 +01:00
c4e68eb922 add facadedevice 2024-03-14 20:27:14 +01:00
763971d65b add pytango 2024-03-14 20:24:55 +01:00
c88ae6b40c starter: add initscript 2024-03-12 20:55:40 +01:00
93eadb18d6 add tango-common with tango user and group and tangorc file 2024-03-12 19:38:05 +01:00
3ae816b9dd add zeromq and cppzmq to SDK 2024-03-08 20:34:38 +01:00
f3b42a37eb add tango_admin 2024-03-08 20:33:53 +01:00
3219baab27 starter: change SRC_URI to git repo, set preferred version of libtango 2024-03-08 20:33:10 +01:00
ac25755aa9 libtango: set preferred version of tango-idl 2024-03-08 20:31:57 +01:00
9f02adc3b2 tango-idl: change SRC_URI to git repo, change version to 5.1.2 2024-03-08 20:30:32 +01:00
bd9f093771 configuration for cppTango and Starter 2024-03-08 01:41:54 +01:00
33 changed files with 461 additions and 0 deletions

18
conf/layer.conf Normal file
View File

@ -0,0 +1,18 @@
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "helium-tango"
BBFILE_PATTERN_helium-tango = "^${LAYERDIR}/"
BBFILE_PRIORITY_helium-tango = "6"
# This should only be incremented on significant changes that will
# cause compatibility issues with other layers
LAYERVERSION_helium-tango = "2"
LAYERDEPENDS_helium-tango = "core openembedded-layer meta-python"
LAYERSERIES_COMPAT_helium-tango = "scarthgap"

View File

@ -0,0 +1,8 @@
DESCRIPTION = "Tango Python device server support package group"
require tango-packagegroup.inc
RDEPENDS:${PN} = " \
packagegroup-tango-ds \
python3-pytango \
python3-facadedevice \
"

View File

@ -0,0 +1,8 @@
DESCRIPTION = "Tango device server support package group"
require tango-packagegroup.inc
RDEPENDS:${PN} = " \
libtango \
tango-common \
tango-starter \
"

View File

@ -0,0 +1,7 @@
DESCRIPTION = "Tango test package group with TangoTest device server"
require tango-packagegroup.inc
RDEPENDS:${PN} = " \
packagegroup-tango-ds \
tango-test \
"

View File

@ -0,0 +1,5 @@
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit packagegroup

View File

@ -0,0 +1,12 @@
SUMMARY = "Build backend for Python that uses CMake to build extension modules."
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b4e748e5f102e31c9390dcd6fa66f09"
PYPI_PACKAGE = "scikit_build_core"
SRC_URI += "file://0001-use-env-cmake-and-ninja.patch"
DEPENDS = "python3-hatch-vcs-native"
RDEPENDS:${PN} = "cmake python3-cmake python3-ninja python3-pyproject-metadata"
inherit allarch python3targetconfig pypi python_hatchling
BBCLASSEXTEND = "native nativesdk"

View File

@ -0,0 +1,38 @@
--- scikit_build_core-0.8.2/src/scikit_build_core/program_search.py 2020-02-02 01:00:00.000000000 +0100
+++ scikit_build_core-0.8.2-yocto/src/scikit_build_core/program_search.py 2024-03-14 14:35:34.768039243 +0100
@@ -38,12 +38,12 @@ def _get_cmake_path(*, module: bool = Tr
"""
Get the path to CMake.
"""
- if module:
- with contextlib.suppress(ImportError):
- # If a "cmake" directory exists, this will also ImportError
- from cmake import CMAKE_BIN_DIR
-
- yield Path(CMAKE_BIN_DIR) / "cmake"
+# if module:
+# with contextlib.suppress(ImportError):
+# # If a "cmake" directory exists, this will also ImportError
+# from cmake import CMAKE_BIN_DIR
+#
+# yield Path(CMAKE_BIN_DIR) / "cmake"
candidates = ("cmake3", "cmake")
for candidate in candidates:
@@ -57,11 +57,11 @@ def _get_ninja_path(*, module: bool = Tr
Get the path to ninja.
"""
- if module:
- with contextlib.suppress(ImportError):
- from ninja import BIN_DIR
-
- yield Path(BIN_DIR) / "ninja"
+# if module:
+# with contextlib.suppress(ImportError):
+# from ninja import BIN_DIR
+#
+# yield Path(BIN_DIR) / "ninja"
# Matches https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/CMakeNinjaFindMake.cmake
candidates = ("ninja-build", "ninja", "samu")

View File

@ -0,0 +1,4 @@
require python3-scikit-build-core.inc
# pypi package for 0.8.2
SRC_URI[sha256sum] = "50ec24b9568c9aa6e27233deeb2978932bc79856212b30575cbfa4049655c436"

View File

@ -0,0 +1,16 @@
SUMMARY = "Tango Controls kernel library"
LICENSE = "LGPL-3.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=8195c2d9416e5fc98eb30ee334511b73"
# cppTango repo is a total mess with tags, we need to grab the release tarball
SRC_URI = "https://gitlab.com/tango-controls/cppTango/-/archive/${PV}/cppTango-${PV}.tar.gz"
S = "${WORKDIR}/cppTango-${PV}"
DEPENDS = "omniorb-native omniorb tango-idl zeromq cppzmq jpeg"
RDEPENDS:${PN} = "tango-common"
EXTRA_OECMAKE += " -DCMAKE_BUILD_TYPE=Release"
inherit cmake python3native pkgconfig
BBCLASSEXTEND = "nativesdk"

View File

@ -0,0 +1,4 @@
require libtango.inc
SRC_URI[sha256sum] = "8f8cd49d5287f66f84088a1cf2fa427c98a4a567fb81cce8479e1b14c4307b16"
PREFERRED_VERSION_tango-idl = "5.1.%"

View File

@ -0,0 +1,20 @@
Index: omniORB/src/tool/omniidl/python/scripts/omniidl.in
===================================================================
--- omniORB.orig/src/tool/omniidl/python2/scripts/omniidl.in
+++ omniORB/src/tool/omniidl/python2/scripts/omniidl.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env python
# -*- python -*-
# Package : omniidl
# omniidl.in Created on: 1999/10/29
Index: omniORB/src/tool/omniidl/python3/scripts/omniidl.in
===================================================================
--- omniORB.orig/src/tool/omniidl/python3/scripts/omniidl.in
+++ omniORB/src/tool/omniidl/python3/scripts/omniidl.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env python3
# -*- python -*-
# Package : omniidl
# omniidl.in Created on: 1999/10/29

View File

@ -0,0 +1,44 @@
DESCRIPTION = "OmniORB High Performance ORB"
HOMEPAGE = "http://omniorb.sourceforge.net"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=1b422f7cda3870b9c4b040b68ba1c0fe"
DEPENDS += "omniorb-native python3"
SRC_URI = "http://downloads.sourceforge.net/omniorb/omniORB-${PV}.tar.bz2"
SRC_URI[sha256sum] = "1c745330d01904afd7a1ed0a5896b9a6e53ac1a4b864a48503b93c7eecbf1fa8"
SRC_URI += " \
file://0002-python-shebang.patch \
"
S = "${WORKDIR}/omniORB-${PV}"
EXTRA_OECONF += "--disable-longdouble"
CONFFILES:${PN} += "/etc/omniORB.cfg"
FILES:${PN}-dev += "${libdir}/python${PYTHON_BASEVERSION}"
do_compile () {
export TOOLBINDIR=${STAGING_BINDIR_NATIVE}
oe_runmake
}
do_compile:class-native () {
oe_runmake
}
do_install:append () {
install -d ${D}${sysconfdir}
install -m 0644 ${S}/sample.cfg ${D}${sysconfdir}/omniORB.cfg
# Set sane defaults
sed -i 's,^traceThreadId.*,traceThreadId = 0,g' ${D}${sysconfdir}/omniORB.cfg
sed -i 's,^traceTime.*,traceTime = 0,g' ${D}${sysconfdir}/omniORB.cfg
}
PARALLEL_MAKE = ""
inherit autotools python3native pkgconfig
BBCLASSEXTEND = "native nativesdk"

View File

@ -0,0 +1 @@
BBCLASSEXTEND = "nativesdk"

View File

@ -0,0 +1 @@
BBCLASSEXTEND = "nativesdk"

View File

@ -0,0 +1,13 @@
SUMMARY = "A descriptive interface for reactive high-level Tango devices"
LICENSE = "GPL-3.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=84dcc94da3adb52b53ae4fa38fe49e5d"
SRC_URI = "git://github.com/MaxIV-KitsControls/tango-facadedevice.git;protocol=https;branch=master"
S = "${WORKDIR}/git"
DEPENDS = "python3-setuptools-scm-native"
RDEPENDS:${PN} = "python3-pytango"
inherit allarch python3targetconfig python_setuptools_build_meta
BBCLASSEXTEND = "nativesdk"

View File

@ -0,0 +1,9 @@
SUMMARY = "A descriptive interface for reactive high-level Tango devices"
LICENSE = "GPL-3.0"
# pypi package does not include license file, however PKG_INFO provides license information
LIC_FILES_CHKSUM = "file://PKG-INFO;md5=51ac512fff37e3d87577031dd63ac362"
RDEPENDS:${PN} = "python3-pytango"
inherit allarch python3targetconfig pypi setuptools3
BBCLASSEXTEND = "nativesdk"

View File

@ -0,0 +1,13 @@
diff -purN facadedevice-1.0.1/facadedevice/graph.py facadedevice-1.0.1-yocto/facadedevice/graph.py
--- facadedevice-1.0.1/facadedevice/graph.py 2017-06-01 16:02:21.000000000 +0200
+++ facadedevice-1.0.1-yocto/facadedevice/graph.py 2024-03-15 14:07:22.919091844 +0100
@@ -5,7 +5,8 @@
import time
import warnings
from functools import partial
-from collections import Mapping, namedtuple, defaultdict
+from collections.abc import Mapping
+from collections import namedtuple, defaultdict
from numpy import array_equal
from tango import AttrQuality

View File

@ -0,0 +1,7 @@
require python3-facadedevice-pypi.inc
# pypi package for 1.0.1
SRC_URI[sha256sum] = "87c71636b5b217ced3d8a6fdf4e3b3a5a24589be8940b0dee35314079783b659"
# patch new collections API in Python 3.10
SRC_URI += "file://0001-1.0.1-py3.10-fix-collections.patch"

View File

@ -0,0 +1,4 @@
require python3-facadedevice-git.inc
# tag 1.0.4
SRCREV = "c20e6d939efb80be8f2872434d4a8a7629ad954f"

View File

@ -0,0 +1,32 @@
SUMMARY = "Python binding for Tango"
LICENSE = "LGPL-3.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=6fabb2820b872d5b3106bddba78021f5"
DEPENDS = "libtango boost omniorb zeromq cppzmq python3-numpy-native python3-scikit-build-core-native"
RDEPENDS:${PN} = "python3 python3-numpy python3-packaging"
# for toolchain.cmake file
inherit cmake
inherit python3targetconfig pkgconfig pypi python_pep517
# The classes inheritance and build process here is a bit tricky.
# PyTango uses python build (PEP517) which runs the build using
# scikit-build-core which in turn uses CMake to build the extension.
# So first we inherit cmake to generate cmake configuration (toolchain.cmake)
# and then we also inherit python_pep517 to overwrite
# do_configure/do_compile/do_install with the correct ones.
# This almost works, but you have to play a bit with CMAKE_ARGS.
# TODO: Why is python include dir not found automatically?
export CMAKE_ARGS = "-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake -DPython_INCLUDE_DIR=${STAGING_DIR_TARGET}${includedir}/${PYTHON_DIR}"
do_configure:prepend() {
# only depend on pytango's hard numpy requirement, as the only numpy
# available is the one provided by python3-numpy package anyway and
# the one provided by oldest-supported-numpy is not
required_numpy=`cat ${S}/pyproject.toml | grep -F numpy | grep -Fv requires | awk -F'[()]' '{print $2}'`
sed -i "s/oldest-supported-numpy/numpy ($required_numpy)/" ${S}/pyproject.toml
}
FILES:${PN} = "${PYTHON_SITEPACKAGES_DIR}"
BBCLASSEXTEND = "nativesdk"

View File

@ -0,0 +1,6 @@
require python3-pytango.inc
# pypi package for 9.5.0
SRC_URI[sha256sum] = "559cb367c8f336c382cfcc3fb86a523a599c6f01d00bc9ad89ca7a363793182c"
PREFERRED_VERSION_libtango = "9.5.%"

View File

@ -0,0 +1 @@
TANGO_HOST=localhost:10000

View File

@ -0,0 +1,20 @@
SUMMARY = "Common configuration for Tango Controls"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "file://tangorc"
inherit allarch
TANGO_HOME ?= "/opt/tango"
TANGO_UID ?= "500"
TANGO_GID ?= "500"
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM:${PN} = "-g ${TANGO_GID} tango"
USERADD_PARAM:${PN} = "-u ${TANGO_UID} -g tango -d ${TANGO_HOME} -m -N -r -s /bin/sh tango"
inherit useradd
do_install() {
install -D -m 0644 ${WORKDIR}/tangorc ${D}${sysconfdir}/tangorc
}

View File

@ -0,0 +1,12 @@
SUMMARY = "IDL definitions for Tango Controls"
LICENSE = "GPL-3.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=6c9432eab6a070a936cf9da6191d6db6"
SRC_URI = "git://gitlab.com/tango-controls/tango-idl.git;protocol=https;branch=main"
S = "${WORKDIR}/git"
DEPENDS = "omniorb-native"
inherit cmake pkgconfig
BBCLASSEXTEND = "nativesdk"

View File

@ -0,0 +1,4 @@
require tango-idl.inc
# tag 5.1.2
SRCREV = "89225b5ef6293d038e633414dd2ea917a99aea74"

View File

@ -0,0 +1,21 @@
SUMMARY = "Tango Controls Starter"
LICENSE = "GPL-3.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1ebbd3e34237af26da5dc08a4e440464"
SRC_URI = " \
gitsm://gitlab.com/tango-controls/starter.git;protocol=https;branch=main \
file://tango-starter.sh \
"
S = "${WORKDIR}/git"
DEPENDS = "libtango omniorb"
RDEPENDS:${PN} = "tango-admin"
INITSCRIPT_NAME = "tango-starter"
INITSCRIPT_PARAMS = "defaults 70"
inherit cmake pkgconfig update-rc.d
do_install:append() {
install -D -m 0755 ${WORKDIR}/tango-starter.sh ${D}${sysconfdir}/init.d/tango-starter
}

View File

@ -0,0 +1,11 @@
--- starter-Starter-8.3/CheckProcessUtil.h 2023-11-24 21:30:37.000000000 +0100
+++ starter-Starter-8.3-musl/CheckProcessUtil.h 2024-03-08 00:00:17.685887663 +0100
@@ -59,7 +59,7 @@
# include <fcntl.h>
# include <sys/stat.h>
# include <pwd.h>
-# if (!defined __GLIBC__) && (!defined __darwin__) && (!defined __freebsd__)
+# if (!defined __linux__) && (!defined __darwin__) && (!defined __freebsd__)
/* solaris */
# include <procfs.h>
# include <fcntl.h>

View File

@ -0,0 +1,79 @@
#!/bin/sh
. /etc/init.d/functions
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DAEMON=/usr/bin/Starter
NAME=tango-starter
DESC="Tango Control System Starter"
PIDFILE=/var/run/$NAME.pid
USER=tango
GROUP=tango
INSTANCE=`hostname`
[ -x "$DAEMON" ] || { failure; echo " $DAEMON executable not found."; exit 1; }
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
check_database()
{
# Ping network seems to be broken (hangs forever)
#tango_admin --ping-network 40 || return 1
tango_admin --ping-database 6 || return 1
}
check_and_register_instance()
{
tango_admin --check-device tango/admin/$INSTANCE || \
tango_admin --add-server Starter/$INSTANCE Starter tango/admin/$INSTANCE || return 1
}
do_start()
{
echo "Starting $DESC..."
check_database
[ "$?" -eq "1" ] && { failure; echo " Database ping failed."; exit 1; }
passed; echo " Database ping OK."
check_and_register_instance
[ "$?" -eq "1" ] && { failure; echo " Could not register Starter instance $INSTANCE."; exit 1; }
passed; echo " Starter instance OK.";
start-stop-daemon -S -x $DAEMON -c $USER:$GROUP -p $PIDFILE -m -b -- $INSTANCE
success; echo " $DESC started."
}
do_stop()
{
echo "Stopping $DESC..."
start-stop-daemon -K -x $DAEMON -p $PIDFILE
success; echo " $DESC stopped."
}
case "$1" in
start)
do_start
;;
stop)
do_stop
;;
status)
status $DAEMON
;;
reload)
echo "Reloading $DESC..."
start-stop-daemon -K -s 1 -x $DAEMON -p $PIDFILE
success; echo " $DESC reloaded."
;;
restart|force-reload)
echo "Restarting $DESC..."
do_stop
sleep 5
do_start
success; echo " $DESC restarted."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|status|reload|restart|force-reload}" >&2
exit 1
;;
esac
exit 0

View File

@ -0,0 +1,9 @@
require tango-starter.inc
# tag Starter-8.3
SRCREV = "c9905e9bd227e5a077ae859e5f1a02a359a6a0c6"
# patch Linux test for musl
SRC_URI += "file://0001-8.3-detect-linux-not-glibc.patch"
PREFERRED_VERSION_libtango = "9.5.%"

View File

@ -0,0 +1,10 @@
SUMMARY = "tango_admin database utility"
LICENSE = "GPL-3.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1ebbd3e34237af26da5dc08a4e440464"
SRC_URI = "gitsm://gitlab.com/tango-controls/tango_admin.git;protocol=https;branch=main"
S = "${WORKDIR}/git"
DEPENDS = "libtango"
inherit cmake pkgconfig

View File

@ -0,0 +1,6 @@
require tango-admin.inc
# tag Release_1.21
SRCREV = "fbd3465aa7eac0d2de55c9918ce66ccc1bcc048f"
PREFERRED_VERSION_libtango = "9.5.%"

View File

@ -0,0 +1,12 @@
SUMMARY = "TangoTest device server"
LICENSE = "GPL-3.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1ebbd3e34237af26da5dc08a4e440464"
SRC_URI = "gitsm://gitlab.com/tango-controls/TangoTest.git;protocol=https;branch=main"
S = "${WORKDIR}/git"
DEPENDS = "libtango"
inherit cmake pkgconfig
FILES:${PN} += "${bindir}/TangoTest ${libdir}/TangoTest.so"

View File

@ -0,0 +1,6 @@
require tango-test.inc
# tag 3.9
SRCREV = "22a9253668466d88c986d4499da410362c9f8850"
PREFERRED_VERSION_libtango = "9.5.%"