From a478fbaa536d9807095ce7a54a99095efd354395 Mon Sep 17 00:00:00 2001 From: Guilherme Rodrigues de Lima Date: Thu, 16 May 2024 14:39:03 -0300 Subject: [PATCH] base: Add MCA IOC - The MCA IOC was added to module, it was necessary to install IOC Scaler and the libnet and libpcap libraries. - It was observed that some IOC need to instance their own directory in the RELEASE file, for this reason the "dependency_name" is being added before get_module_path in the install_module() function. - The IOC was built and created the docker-compose-mca.yml file to generate new container image. --- .github/workflows/included-images.yml | 2 +- CHANGES.md | 3 ++- base/.env | 2 ++ base/Dockerfile | 4 ++++ base/docker-compose.yml | 2 ++ base/install-functions.sh | 5 +++-- base/install_modules.sh | 17 +++++++++++++++++ base/musl/Dockerfile | 7 ++++++- base/musl/docker-compose.yml | 2 ++ images/docker-compose-mca.yml | 13 +++++++++++++ 10 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 images/docker-compose-mca.yml diff --git a/.github/workflows/included-images.yml b/.github/workflows/included-images.yml index 798e419..a51723d 100644 --- a/.github/workflows/included-images.yml +++ b/.github/workflows/included-images.yml @@ -29,5 +29,5 @@ jobs: uses: docker/bake-action@v4 with: workdir: images/ - files: docker-compose-opcua.yml docker-compose-motorpigcs2.yml + files: docker-compose-opcua.yml docker-compose-motorpigcs2.yml docker-compose-mca.yml push: true diff --git a/CHANGES.md b/CHANGES.md index 6d1aa6e..c043792 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,8 @@ ## Unreleased -* base: Pmac module version update and Add motorPIGCS2 IOC. by @guirodrigueslima +* base: Pmac module version update, add motorPIGCS2 and MCA IOC. by @guirodrigueslima in + https://github.com/cnpem/epics-in-docker/pull/64 ## v0.8.0 diff --git a/base/.env b/base/.env index edf26d2..e8d8011 100644 --- a/base/.env +++ b/base/.env @@ -16,6 +16,8 @@ IPAC_VERSION=2.16 CAPUTLOG_VERSION=R4.0 RETOOLS_VERSION=b7abe82533cdbd7ddbc2dc845c95a2c51b7f2db9 ETHER_IP_VERSION=ether_ip-3-3 +SCALER_VERSION=4.1 +MCA_VERSION=R7-10 AREA_DETECTOR_VERSION=R3-12-1 NDSSCPIMEGA_VERSION=1.0.0 diff --git a/base/Dockerfile b/base/Dockerfile index 823e297..7aad6e4 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -18,6 +18,8 @@ RUN apt update -y && \ libusb-1.0-0-dev \ libxml2-dev \ libssl-dev \ + libnet-dev \ + libpcap-dev \ re2c \ wget \ ca-certificates @@ -52,6 +54,8 @@ ARG IPAC_VERSION ARG CAPUTLOG_VERSION ARG RETOOLS_VERSION ARG ETHER_IP_VERSION +ARG SCALER_VERSION +ARG MCA_VERSION COPY caputlog-waveform-fix.patch . COPY install_modules.sh . diff --git a/base/docker-compose.yml b/base/docker-compose.yml index a1a0d01..c6993be 100644 --- a/base/docker-compose.yml +++ b/base/docker-compose.yml @@ -31,3 +31,5 @@ services: MOTOR_VERSION: ${MOTOR_VERSION} PMAC_VERSION: ${PMAC_VERSION} OPCUA_VERSION: ${OPCUA_VERSION} + SCALER_VERSION: ${SCALER_VERSION} + MCA_VERSION: ${MCA_VERSION} diff --git a/base/install-functions.sh b/base/install-functions.sh index a7ac5e0..d6295cd 100644 --- a/base/install-functions.sh +++ b/base/install-functions.sh @@ -28,6 +28,9 @@ install_module() { release_modules="$3" cd $module_name + + echo ${dependency_name}=${PWD} >> ${EPICS_RELEASE_FILE} + get_module_path "$release_modules" > configure/RELEASE if [ -n "$NEEDS_TIRPC" ]; then @@ -40,8 +43,6 @@ install_module() { make -C iocBoot fi - echo ${dependency_name}=${PWD} >> ${EPICS_RELEASE_FILE} - cd - } diff --git a/base/install_modules.sh b/base/install_modules.sh index 0516e5c..6e03e2c 100755 --- a/base/install_modules.sh +++ b/base/install_modules.sh @@ -65,3 +65,20 @@ EPICS_BASE install_from_github -i epics-modules ether_ip ETHER_IP $ETHER_IP_VERSION " EPICS_BASE " + +install_from_github -i epics-modules scaler SCALER $SCALER_VERSION " +EPICS_BASE +ASYN +" + +install_from_github -i epics-modules mca MCA $MCA_VERSION " +EPICS_BASE +CALC +SSCAN +BUSY +SCALER +SNCSEQ +AUTOSAVE +ASYN +MCA +" diff --git a/base/musl/Dockerfile b/base/musl/Dockerfile index 0adc10f..8c063c1 100644 --- a/base/musl/Dockerfile +++ b/base/musl/Dockerfile @@ -22,7 +22,10 @@ RUN apk add --no-cache \ meson \ re2c \ readline-dev \ - readline-static + readline-static \ + libnet-dev \ + libpcap-dev \ + libusb-1.0-0-dev COPY lnls-get-n-unpack.sh /usr/local/bin/lnls-get-n-unpack COPY lnls-run.sh /usr/local/bin/lnls-run @@ -52,6 +55,8 @@ ARG IPAC_VERSION ARG CAPUTLOG_VERSION ARG RETOOLS_VERSION ARG ETHER_IP_VERSION +ARG SCALER_VERSION +ARG MCA_VERSION WORKDIR ${EPICS_MODULES_PATH} COPY caputlog-waveform-fix.patch . diff --git a/base/musl/docker-compose.yml b/base/musl/docker-compose.yml index e21d3ba..5fee8ed 100644 --- a/base/musl/docker-compose.yml +++ b/base/musl/docker-compose.yml @@ -25,3 +25,5 @@ services: CAPUTLOG_VERSION: ${CAPUTLOG_VERSION} RETOOLS_VERSION: ${RETOOLS_VERSION} ETHER_IP_VERSION: ${ETHER_IP_VERSION} + SCALER_VERSION: ${SCALER_VERSION} + MCA_VERSION: ${MCA_VERSION} diff --git a/images/docker-compose-mca.yml b/images/docker-compose-mca.yml new file mode 100644 index 0000000..e138c5e --- /dev/null +++ b/images/docker-compose-mca.yml @@ -0,0 +1,13 @@ +services: + ioc: + image: ghcr.io/cnpem/mca-epics-ioc:$TAG + build: + context: ./ + dockerfile: ../Dockerfile + target: no-build + labels: + org.opencontainers.image.source: https://github.com/cnpem/epics-in-docker + args: + REPONAME: mca + RUNDIR: /opt/epics/modules/mca/iocBoot/iocAmptek + RUNTIME_PACKAGES: