From 0ad3c2f9d34927d61f1eff6a32302d964d47d64f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Thu, 31 Oct 2024 12:55:15 -0300 Subject: [PATCH] base: update epics-base to 7.0.8.1. This also made it necessary to update the OPCUA module, so we could keep using the prebuilt version. Since the OPCUA installation scheme was improved, manually adding the libopcua symlink is no longer necessary. Furthermore, in order to keep the image compatible with the OPCUA IOC image build, and with st.cmd files from users of the image, the IOC was installed to 'opcua', and the library to 'opcua-module'; this is transparent to users, thanks to the RELEASE file. --- base/.env | 4 +-- base/Dockerfile | 1 - base/backport-epics-base-musl.patch | 42 ----------------------------- base/install_epics.sh | 1 - base/install_opcua.sh | 13 +++++---- base/musl/Dockerfile | 1 - 6 files changed, 10 insertions(+), 52 deletions(-) delete mode 100644 base/backport-epics-base-musl.patch diff --git a/base/.env b/base/.env index 5b6b9d0..e9f53f2 100644 --- a/base/.env +++ b/base/.env @@ -1,7 +1,7 @@ DEBIAN_VERSION=11.9 ALPINE_VERSION=3.20.3 -EPICS7_BASE_VERSION=7.0.7 +EPICS7_BASE_VERSION=7.0.8.1 PVXS_VERSION=1.3.1 SEQUENCER_VERSION=R2-2-9 @@ -32,4 +32,4 @@ MOTOR_VERSION=R7-3-1 PIGCS2_VERSION=60af8bdb17c1717e4545d8170f820e358ce31458 PMAC_VERSION=2-6-4b3 -OPCUA_VERSION=0.9.4 +OPCUA_VERSION=0.10.0 diff --git a/base/Dockerfile b/base/Dockerfile index f1e0c22..aeae2ec 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -43,7 +43,6 @@ ENV EPICS_BASE_PATH /opt/epics/base ENV EPICS_MODULES_PATH /opt/epics/modules ENV EPICS_RELEASE_FILE /opt/epics/RELEASE -COPY backport-epics-base-musl.patch . COPY epics-base-static-linking.patch . COPY install_epics.sh . RUN ./install_epics.sh diff --git a/base/backport-epics-base-musl.patch b/base/backport-epics-base-musl.patch deleted file mode 100644 index 236ad16..0000000 --- a/base/backport-epics-base-musl.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 7c4a21eab44183a84f25ea234ce2fde8ad08c4ed Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C3=89rico=20Nogueira?= -Date: Mon, 31 Jul 2023 11:36:11 -0300 -Subject: [PATCH] libCom: detect support for backtrace() with __has_include. - -This is necessary in order to build epics-base with musl libc, for -example, and any other C libraries which don't include this -functionality. In order to not regress builds with older compilers, we -still support the uclibc check. Furthermore, it has been checked that -uclibc-ng (the maintained version of uclibc) doesn't install the - header when the functionality is disabled [1] [2]. - -To avoid repetition, we don't define HAS_EXECINFO to 0 when it is not -available. - -[1] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/Makefile.in?id=cdb07d2cd52af39feb425e6d36c02b30916b9f0a#n224 -[2] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/Makefile.in?id=cdb07d2cd52af39feb425e6d36c02b30916b9f0a#n277 ---- - modules/libcom/src/osi/os/posix/osdExecinfoBackTrace.cpp | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/modules/libcom/src/osi/os/posix/osdExecinfoBackTrace.cpp b/modules/libcom/src/osi/os/posix/osdExecinfoBackTrace.cpp -index 8d50e6a8e0..9be48755af 100644 ---- a/modules/libcom/src/osi/os/posix/osdExecinfoBackTrace.cpp -+++ b/modules/libcom/src/osi/os/posix/osdExecinfoBackTrace.cpp -@@ -12,10 +12,13 @@ - #include - - // execinfo.h may not be present if uclibc is configured to omit backtrace() --#if !defined(__UCLIBC_MAJOR__) || defined(__UCLIBC_HAS_EXECINFO__) -+// some C libraries, such as musl, don't have execinfo.h at all -+#if defined(__has_include) -+# if __has_include() -+# define HAS_EXECINFO 1 -+# endif -+#elif !defined(__UCLIBC_MAJOR__) || defined(__UCLIBC_HAS_EXECINFO__) - # define HAS_EXECINFO 1 --#else --# define HAS_EXECINFO 0 - #endif - - #if HAS_EXECINFO diff --git a/base/install_epics.sh b/base/install_epics.sh index 20c85f6..0611446 100755 --- a/base/install_epics.sh +++ b/base/install_epics.sh @@ -7,7 +7,6 @@ set -ex lnls-get-n-unpack -l https://epics-controls.org/download/base/base-${EPICS_BASE_VERSION}.tar.gz mv base-${EPICS_BASE_VERSION} ${EPICS_BASE_PATH} -patch -d ${EPICS_BASE_PATH} -Np1 < backport-epics-base-musl.patch patch -d ${EPICS_BASE_PATH} -Np1 < epics-base-static-linking.patch if [ -n "$COMMANDLINE_LIBRARY" ]; then diff --git a/base/install_opcua.sh b/base/install_opcua.sh index e61890a..e2d6436 100755 --- a/base/install_opcua.sh +++ b/base/install_opcua.sh @@ -5,13 +5,16 @@ set -ex . /opt/epics/install-functions.sh opcua_release_url=https://github.com/epics-modules/opcua/releases/download/v${OPCUA_VERSION} -opcua_release_file=IOC_opcua-${OPCUA_VERSION}_Base-${EPICS_BASE_VERSION}_debian${DEBIAN_VERSION%.*}.tar.gz +opcua_release_file=BDIST_opcua-${OPCUA_VERSION}_Base-${EPICS_BASE_VERSION}_debian${DEBIAN_VERSION%.*}.tar.gz lnls-get-n-unpack -l $opcua_release_url/$opcua_release_file -mv binaryOpcuaIoc opcua -install_module -i opcua OPCUA " +mv opcuaBinaryDist opcua-module +install_module opcua-module OPCUA " EPICS_BASE " -EPICS_HOST_ARCH=`perl ${EPICS_BASE_PATH}/lib/perl/EpicsHostArch.pl` -ln -s ${EPICS_MODULES_PATH}/opcua/{opcuaIocApp/libopcua.so.0.9,lib/${EPICS_HOST_ARCH}/libopcua.so} +mv opcuaExampleIoc opcua +install_module -i opcua OPCUA_IOC " +EPICS_BASE +OPCUA +" diff --git a/base/musl/Dockerfile b/base/musl/Dockerfile index aa88475..c45b345 100644 --- a/base/musl/Dockerfile +++ b/base/musl/Dockerfile @@ -44,7 +44,6 @@ ENV EPICS_RELEASE_FILE /opt/epics/RELEASE WORKDIR /opt/epics COPY install-functions.sh . -COPY backport-epics-base-musl.patch . COPY epics-base-static-linking.patch . COPY install_epics.sh . RUN COMMANDLINE_LIBRARY=READLINE_NCURSES ./install_epics.sh