mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-27 07:57:27 +00:00
libiec61850: upgrade 1.5.3 -> 1.6.1
This update contains a fix for CVE-2024-26529, CVE-2024-45970 and CVE-2024-45971 Changelog: https://github.com/mz-automation/libiec61850/blob/v1.6/CHANGELOG Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
+15
-9
@@ -7,7 +7,7 @@ Subject: [PATCH] pyiec61850: Use CMAKE_INSTALL_LIBDIR from GNUInstallDirs in
|
|||||||
This ensures that it gets installed in platform specified system libdir
|
This ensures that it gets installed in platform specified system libdir
|
||||||
all platforms do not use /usr/lib as assumed here e.g. ppc64 uses lib64
|
all platforms do not use /usr/lib as assumed here e.g. ppc64 uses lib64
|
||||||
|
|
||||||
Upstream-Status: Submitted [https://github.com/mz-automation/libiec61850/pull/376]
|
Upstream-Status: Denied [https://github.com/mz-automation/libiec61850/pull/376 - closed without a word]
|
||||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
---
|
---
|
||||||
pyiec61850/CMakeLists.txt | 6 ++++--
|
pyiec61850/CMakeLists.txt | 6 ++++--
|
||||||
@@ -15,15 +15,21 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|||||||
|
|
||||||
--- a/pyiec61850/CMakeLists.txt
|
--- a/pyiec61850/CMakeLists.txt
|
||||||
+++ b/pyiec61850/CMakeLists.txt
|
+++ b/pyiec61850/CMakeLists.txt
|
||||||
@@ -31,7 +31,9 @@ endif()
|
@@ -31,14 +31,9 @@ swig_add_library(pyiec61850
|
||||||
|
|
||||||
swig_link_libraries(iec61850 ${PYTHON_LIBRARIES} ${LIBS})
|
swig_link_libraries(pyiec61850 ${LIBS})
|
||||||
|
|
||||||
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iec61850.py DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
|
-# Finding python modules install path
|
||||||
-install(TARGETS _iec61850 LIBRARY DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
|
-execute_process(
|
||||||
|
- COMMAND ${Python_EXECUTABLE} -c
|
||||||
|
- "from sysconfig import get_path; import sys; sys.stdout.write(get_path('platlib'))"
|
||||||
|
- OUTPUT_VARIABLE PYTHON_SITE_DIR
|
||||||
|
-)
|
||||||
+include(GNUInstallDirs)
|
+include(GNUInstallDirs)
|
||||||
+
|
|
||||||
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iec61850.py DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
|
|
||||||
+install(TARGETS _iec61850 LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}//python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
|
|
||||||
|
|
||||||
add_test(test_pyiec61850 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/test_pyiec61850.py)
|
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pyiec61850.py DESTINATION ${PYTHON_SITE_DIR})
|
||||||
|
-install(TARGETS pyiec61850 LIBRARY DESTINATION ${PYTHON_SITE_DIR})
|
||||||
|
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pyiec61850.py DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages)
|
||||||
|
+install(TARGETS pyiec61850 LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages)
|
||||||
|
|
||||||
|
add_test(test_pyiec61850 ${Python_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/test_pyiec61850.py)
|
||||||
|
|||||||
-39
@@ -1,39 +0,0 @@
|
|||||||
From d4ddfc7a350011b7944ed8d6bca80f164dfd1387 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Romain Naour <romain.naour@smile.fr>
|
|
||||||
Date: Fri, 10 Jul 2020 17:08:34 +0200
|
|
||||||
Subject: [PATCH] pyiec61850: don't break CMAKE_INSTALL_PATH by trying to find
|
|
||||||
python modules install path (site-packages)
|
|
||||||
|
|
||||||
https://stackoverflow.com/questions/1242904/finding-python-site-packages-directory-with-cmake
|
|
||||||
|
|
||||||
Signed-off-by: Romain Naour <romain.naour@smile.fr>
|
|
||||||
---
|
|
||||||
Upstream-Status: Pending
|
|
||||||
|
|
||||||
pyiec61850/CMakeLists.txt | 11 ++---------
|
|
||||||
1 file changed, 2 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pyiec61850/CMakeLists.txt b/pyiec61850/CMakeLists.txt
|
|
||||||
index 159ef4b..d1732a1 100644
|
|
||||||
--- a/pyiec61850/CMakeLists.txt
|
|
||||||
+++ b/pyiec61850/CMakeLists.txt
|
|
||||||
@@ -31,14 +31,7 @@ endif()
|
|
||||||
|
|
||||||
swig_link_libraries(iec61850 ${PYTHON_LIBRARIES} ${LIBS})
|
|
||||||
|
|
||||||
-# Finding python modules install path
|
|
||||||
-execute_process(
|
|
||||||
- COMMAND ${PYTHON_EXECUTABLE} -c
|
|
||||||
- "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib())"
|
|
||||||
- OUTPUT_VARIABLE PYTHON_SITE_DIR
|
|
||||||
-)
|
|
||||||
-
|
|
||||||
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iec61850.py DESTINATION ${PYTHON_SITE_DIR})
|
|
||||||
-install(TARGETS _iec61850 LIBRARY DESTINATION ${PYTHON_SITE_DIR})
|
|
||||||
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iec61850.py DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
|
|
||||||
+install(TARGETS _iec61850 LIBRARY DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
|
|
||||||
|
|
||||||
add_test(test_pyiec61850 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/test_pyiec61850.py)
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
||||||
+6
-6
@@ -13,25 +13,25 @@ SECTION = "console/network"
|
|||||||
LICENSE = "GPL-3.0-only"
|
LICENSE = "GPL-3.0-only"
|
||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
||||||
DEPENDS = "swig-native python3"
|
DEPENDS = "swig-native python3"
|
||||||
SRCREV = "6f557c490f0b46ab5d7ef1b01bb3bc9fab3f442f"
|
SRCREV = "a13961110b8238d2d8ea577c1fb7592ba3017ad8"
|
||||||
|
|
||||||
SRC_URI = "git://github.com/mz-automation/${BPN}.git;branch=v1.5;protocol=https \
|
SRC_URI = "git://github.com/mz-automation/${BPN}.git;branch=v1.6;protocol=https;tag=v${PV} \
|
||||||
file://0001-pyiec61850-don-t-break-CMAKE_INSTALL_PATH-by-trying-.patch \
|
|
||||||
file://0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch \
|
file://0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
||||||
inherit cmake pkgconfig python3-dir python3native siteinfo
|
inherit cmake pkgconfig python3-dir python3native siteinfo python3targetconfig
|
||||||
|
|
||||||
EXTRA_OECMAKE = " \
|
EXTRA_OECMAKE = " \
|
||||||
-DBUILD_EXAMPLES=OFF \
|
-DBUILD_EXAMPLES=OFF \
|
||||||
-DBUILD_PYTHON_BINDINGS=ON \
|
-DBUILD_PYTHON_BINDINGS=ON \
|
||||||
|
-DPYTHON_BASEVERSION=${PYTHON_BASEVERSION} \
|
||||||
"
|
"
|
||||||
|
|
||||||
RDEPENDS:${PN}-python = " python3-core "
|
RDEPENDS:${PN}-python = " python3-core "
|
||||||
RDEPENDS:${PN} = " python3-core "
|
RDEPENDS:${PN} = " python3-core "
|
||||||
|
|
||||||
FILES:${PN} += " \
|
FILES:${PN} += " \
|
||||||
${PYTHON_SITEPACKAGES_DIR}/iec61850.py \
|
${PYTHON_SITEPACKAGES_DIR}/pyiec61850.py \
|
||||||
${PYTHON_SITEPACKAGES_DIR}/_iec61850.so \
|
${PYTHON_SITEPACKAGES_DIR}/_pyiec61850.so \
|
||||||
"
|
"
|
||||||
Reference in New Issue
Block a user