From 7c008c14b6ad6cabd31cd7bc897eb975ce039977 Mon Sep 17 00:00:00 2001 From: James A Sutherland Date: Tue, 21 Oct 2025 08:25:46 -0500 Subject: [PATCH 1/8] Fix CI submodule checkout and set Dependabot to weekly This fixes the CI build failure by properly checking out submodules with recursive mode and full depth, ensuring yaml-cpp headers are available. Also changes Dependabot to run weekly instead of daily as requested. --- .github/dependabot.yml | 4 ++-- .github/workflows/dockerpush.yml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6e40701..73f11c1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,5 +4,5 @@ updates: - package-ecosystem: "github-actions" directory: "/" schedule: - # Check for updates to GitHub Actions every weekday - interval: "daily" \ No newline at end of file + # Check for updates to GitHub Actions every week + interval: "weekly" \ No newline at end of file diff --git a/.github/workflows/dockerpush.yml b/.github/workflows/dockerpush.yml index 67114ec..0f5f595 100644 --- a/.github/workflows/dockerpush.yml +++ b/.github/workflows/dockerpush.yml @@ -10,7 +10,8 @@ jobs: steps: - uses: actions/checkout@v4 with: - submodules: true + submodules: recursive + fetch-depth: 0 - name: ccache uses: hendrikmuhs/ccache-action@v1 - name: Build containers From aa7f979571ddf41937b74cab2c311a0385501240 Mon Sep 17 00:00:00 2001 From: James A Sutherland Date: Tue, 21 Oct 2025 08:29:15 -0500 Subject: [PATCH 2/8] Downgrade SMI version from 5.2.0 to 5.1.3 Version 5.2.0 is missing the smi-nerd JAR file from the release assets. Downgrading to 5.1.3 which includes all required files: - smi-nerd-v5.1.3.jar - ctpanonymiser-v5.1.3.zip - smi-services-v5.1.3-linux-x64.tgz --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 769e515..a65ab18 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -SMIV := 5.2.0 +SMIV := 5.1.3 RDMPV := 7.0.12 JARS := ctpanonymiser-1.0.0/CTPAnonymiser-portable-1.0.0.jar smi-nerd-v$(SMIV).jar From e5090f86d8bd19f6e830a99f2509872a4b5682e0 Mon Sep 17 00:00:00 2001 From: James A Sutherland Date: Tue, 21 Oct 2025 08:33:53 -0500 Subject: [PATCH 3/8] Fix hardcoded version paths in Makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace hardcoded version directories (v4.0.0 and v3.0.2) with the SMIV variable to ensure version consistency throughout the build. Changes: - Line 17: smi-services-v4.0.0-linux-x64 → smi-services-v$(SMIV)-linux-x64 - Line 77: smi-services-v3.0.2-linux-x64 → smi-services-v$(SMIV)-linux-x64 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a65ab18..99640bc 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ all: $(BINS) minidocker: smi/smiinit smi/smiinit.sh smi/CTPAnonymiser-portable-1.0.0.jar smi/smi-nerd-v$(SMIV).jar smi/ctp-whitelist.script smi/eng.traineddata.gz mkdir -p smi touch smi/dummy.sh - (cd smi-services-v4.0.0-linux-x64;tar cf - .) | (cd smi ; tar xf -) + (cd smi-services-v$(SMIV)-linux-x64;tar cf - .) | (cd smi ; tar xf -) $(eval ctr1:=$(shell buildah from --name smidocker docker://docker.io/adoptopenjdk/openjdk11:debian-jre)) tar c -f - smi/ | buildah run "$(ctr1)" sh -c "tar xof - && apt-get update && apt-get install libicu63" buildah config --cmd "/smi/smiinit.sh" "$(ctr1)" @@ -74,7 +74,7 @@ docker: smiinit $(JARS) $(HOME)/rdmp-cli/rdmp ctp-whitelist.script smi-services- buildah copy "$(ctr1)" smiinit /bin/ buildah copy "$(ctr1)" $(HOME)/rdmp-cli /rdmp-cli buildah copy "$(ctr1)" $(JARS) ctp-whitelist.script smi-services-v$(SMIV)-linux-x64/ /smi - ./eqnames.pl < smi-services-v3.0.2-linux-x64/default.yaml | buildah run "$(ctr1)" -- bash 2>&1 | tee dockerbuild.log + ./eqnames.pl < smi-services-v$(SMIV)-linux-x64/default.yaml | buildah run "$(ctr1)" -- bash 2>&1 | tee dockerbuild.log buildah config --cmd "/bin/smiinit -c /smi -f /smi.yaml" "$(ctr1)" buildah commit "$(ctr1)" "smifull" From fdea6372fedaef267d7f79d8eb635294b2d62991 Mon Sep 17 00:00:00 2001 From: James A Sutherland Date: Tue, 21 Oct 2025 08:34:30 -0500 Subject: [PATCH 4/8] Add -s flag to curl to suppress progress bar Changes curl -L to curl -sL on line 66 to avoid flooding CI logs with progress bar output. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 99640bc..316b522 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ smi/eng.traineddata.gz: curl -sL https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata | gzip -9 > $@ smi-services-v$(SMIV)-linux-x64/default.yaml: - curl -L https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/smi-services-v$(SMIV)-linux-x64.tgz | tar xzf - + curl -sL https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/smi-services-v$(SMIV)-linux-x64.tgz | tar xzf - sed -i -e 's:MappingTable'"'"':smi.MappingTable'"'"':' smi-services-v$(SMIV)-linux-x64/default.yaml sed -i -e 's/CTPAnonymiserOptions:/CTPAnonymiserOptions:\n SRAnonTool: '\''\/smi\/dummy.sh'\''/' smi-services-v$(SMIV)-linux-x64/default.yaml From c7f90531629137f4419ac00b9d28835d06f4d109 Mon Sep 17 00:00:00 2001 From: James A Sutherland Date: Tue, 21 Oct 2025 08:44:27 -0500 Subject: [PATCH 5/8] Use && instead of ; in cd/tar command for proper error handling Changes semicolons to && so that tar commands will not execute if cd fails, preventing confusing error messages and ensuring the build fails cleanly when directories don't exist. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 316b522..ec75b20 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ all: $(BINS) minidocker: smi/smiinit smi/smiinit.sh smi/CTPAnonymiser-portable-1.0.0.jar smi/smi-nerd-v$(SMIV).jar smi/ctp-whitelist.script smi/eng.traineddata.gz mkdir -p smi touch smi/dummy.sh - (cd smi-services-v$(SMIV)-linux-x64;tar cf - .) | (cd smi ; tar xf -) + (cd smi-services-v$(SMIV)-linux-x64 && tar cf - .) | (cd smi && tar xf -) $(eval ctr1:=$(shell buildah from --name smidocker docker://docker.io/adoptopenjdk/openjdk11:debian-jre)) tar c -f - smi/ | buildah run "$(ctr1)" sh -c "tar xof - && apt-get update && apt-get install libicu63" buildah config --cmd "/smi/smiinit.sh" "$(ctr1)" From 84f86498fb036662594631d51f5567c994533a1c Mon Sep 17 00:00:00 2001 From: James A Sutherland Date: Tue, 21 Oct 2025 08:46:32 -0500 Subject: [PATCH 6/8] Replace deprecated AdoptOpenJDK with Eclipse Temurin Updates base image from adoptopenjdk/openjdk11:debian-jre to eclipse-temurin:11-jre to fix Debian Buster EOL repository errors. Eclipse Temurin is the official successor to AdoptOpenJDK and uses a supported Debian/Ubuntu base, avoiding 404 errors from obsolete Debian Buster repositories. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ec75b20..f845a22 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ minidocker: smi/smiinit smi/smiinit.sh smi/CTPAnonymiser-portable-1.0.0.jar smi/ mkdir -p smi touch smi/dummy.sh (cd smi-services-v$(SMIV)-linux-x64 && tar cf - .) | (cd smi && tar xf -) - $(eval ctr1:=$(shell buildah from --name smidocker docker://docker.io/adoptopenjdk/openjdk11:debian-jre)) + $(eval ctr1:=$(shell buildah from --name smidocker docker://docker.io/eclipse-temurin:11-jre)) tar c -f - smi/ | buildah run "$(ctr1)" sh -c "tar xof - && apt-get update && apt-get install libicu63" buildah config --cmd "/smi/smiinit.sh" "$(ctr1)" buildah commit "$(ctr1)" "smidocker" From 7ea8f06ff2ec7c0c8f1257c8ef4d92371e6c21fe Mon Sep 17 00:00:00 2001 From: James A Sutherland Date: Tue, 21 Oct 2025 08:50:01 -0500 Subject: [PATCH 7/8] Suppress wget progress bars and update libicu version - Add -q flag to all wget commands (lines 86, 89, 95, 98) to suppress progress bar output that floods CI logs - Update libicu63 to libicu72 for compatibility with Eclipse Temurin base image which uses newer Debian/Ubuntu - Add -y flag to apt-get install to avoid interactive prompts --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index f845a22..a6f04c4 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ minidocker: smi/smiinit smi/smiinit.sh smi/CTPAnonymiser-portable-1.0.0.jar smi/ touch smi/dummy.sh (cd smi-services-v$(SMIV)-linux-x64 && tar cf - .) | (cd smi && tar xf -) $(eval ctr1:=$(shell buildah from --name smidocker docker://docker.io/eclipse-temurin:11-jre)) - tar c -f - smi/ | buildah run "$(ctr1)" sh -c "tar xof - && apt-get update && apt-get install libicu63" + tar c -f - smi/ | buildah run "$(ctr1)" sh -c "tar xof - && apt-get update && apt-get install -y libicu72" buildah config --cmd "/smi/smiinit.sh" "$(ctr1)" buildah commit "$(ctr1)" "smidocker" @@ -83,19 +83,19 @@ $(HOME)/rdmp-cli/rdmp: rdmp-cli-linux-x64.zip chmod +x $(HOME)/rdmp-cli/rdmp rdmp-cli-linux-x64.zip: - wget https://github.com/HicServices/RDMP/releases/download/v$(RDMPV)/rdmp-cli-linux-x64.zip + wget -q https://github.com/HicServices/RDMP/releases/download/v$(RDMPV)/rdmp-cli-linux-x64.zip ctpanonymiser-v$(SMIV).zip: - wget https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/ctpanonymiser-v$(SMIV).zip + wget -q https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/ctpanonymiser-v$(SMIV).zip ctpanonymiser-1.0.0/CTPAnonymiser-portable-1.0.0.jar: ctpanonymiser-v$(SMIV).zip [ -e $@ ] || unzip -DD $< smi-nerd-v$(SMIV).jar: - wget https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/smi-nerd-v$(SMIV).jar + wget -q https://github.com/SMI/SmiServices/releases/download/v$(SMIV)/smi-nerd-v$(SMIV).jar ctp-whitelist.script: - wget https://raw.githubusercontent.com/SMI/SmiServices/v$(SMIV)/data/ctp/ctp-whitelist.script + wget -q https://raw.githubusercontent.com/SMI/SmiServices/v$(SMIV)/data/ctp/ctp-whitelist.script smiinit: smiinit.cpp yaml-cpp/build/libyaml-cpp.a ifeq ($(UNAME), Darwin) From b19b8ab1ee36b76b1a35931c9d1296ab4612c1d8 Mon Sep 17 00:00:00 2001 From: James A Sutherland Date: Tue, 21 Oct 2025 08:52:34 -0500 Subject: [PATCH 8/8] Use libicu-dev instead of version-specific package Replace libicu72 with libicu-dev which is version-agnostic and will install the appropriate libicu version for whatever Debian/Ubuntu release the base image uses. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a6f04c4..5d89cd1 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ minidocker: smi/smiinit smi/smiinit.sh smi/CTPAnonymiser-portable-1.0.0.jar smi/ touch smi/dummy.sh (cd smi-services-v$(SMIV)-linux-x64 && tar cf - .) | (cd smi && tar xf -) $(eval ctr1:=$(shell buildah from --name smidocker docker://docker.io/eclipse-temurin:11-jre)) - tar c -f - smi/ | buildah run "$(ctr1)" sh -c "tar xof - && apt-get update && apt-get install -y libicu72" + tar c -f - smi/ | buildah run "$(ctr1)" sh -c "tar xof - && apt-get update && apt-get install -y libicu-dev" buildah config --cmd "/smi/smiinit.sh" "$(ctr1)" buildah commit "$(ctr1)" "smidocker"