From c7022b4de8bd3f9f4f35154443716cdeb3636315 Mon Sep 17 00:00:00 2001 From: snw35 Date: Wed, 28 Jan 2026 13:11:55 +0000 Subject: [PATCH 1/7] Add pyalpm and awesomeversion --- Dockerfile | 4 ++++ README.md | 12 ++---------- new_ver.json | 8 ++++++++ nvchecker.toml | 8 ++++++++ 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 49183d5..01312ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,8 @@ ENV TORNADO_VERSION 6.5.4 ENV PYCURL_VERSION 7.45.7 ENV NVCHECKER_VERSION 2.20 ENV PACKAGING_VERSION 26.0 +ENV PYALPM_VERSION 0.10.12 +ENV AWESOMEVERSION_VERSION 25.8.0 COPY docker-entrypoint.sh / @@ -17,6 +19,8 @@ RUN apk --upgrade --no-cache add \ pycurl==${PYCURL_VERSION} \ nvchecker==${NVCHECKER_VERSION} \ packaging==${PACKAGING_VERSION} \ + pyalpm==${PYALPM_VERSION} \ + awesomeversion==${AWESOMEVERSION_VERSION} \ && apk del build.deps \ && chmod +x /docker-entrypoint.sh \ && nvchecker --help diff --git a/README.md b/README.md index d88d702..31ade0f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # nvchecker -* * ![Build Status](https://github.com/snw35/nvchecker/actions/workflows/update.yml/badge.svg) +- ![Build Status](https://github.com/snw35/nvchecker/actions/workflows/update.yml/badge.svg) - [Dockerhub: snw35/nvchecker](https://hub.docker.com/r/snw35/nvchecker) Dockerfile for the excellent [nvchecker](https://github.com/lilydjwg/nvchecker) Python module. @@ -13,18 +13,10 @@ This container is compliant with the official image specification and runs nvche `docker run -it --rm --mount type=bind,source=${PWD},target=/data/ -w /data snw35/nvchecker:latest nvchecker -c nvchecker.toml` -Where `nvchecker.toml` is the name of the nvchecker configuration file. +Where `nvchecker.toml` is the name of the nvchecker configuration file. The nvchecker documentation at https://nvchecker.readthedocs.io shows how to write an nvchecker.toml file for your application. ## Automating Container Updates I use this as part of a workflow to automatically update my container images. It runs in tandem with [dfupdate](https://github.com/snw35/dfupdate) (Dockerfile Updater) to automatically detect when new versions of software packaged in a Dockerfile are available, and to write and commit the changes directly, triggering a new build and container push to Dockerhub. The base image is also updated automatically. So yes, this nvchecker image updates itself :) - -## Releases - -Releases are tagged with all version numbers of software installed in the Dockerfile followed by the version of the base image: - -- version1-version2-version3-...-base-image-version - -Container images are tagged with the primary software version. The `lastest` tag always points to the last image built, which is **NOT** guaranteed to be the latest release, but in most cases should be. diff --git a/new_ver.json b/new_ver.json index 1b3a460..6952f4c 100644 --- a/new_ver.json +++ b/new_ver.json @@ -1,6 +1,10 @@ { "version": 2, "data": { + "AWESOMEVERSION": { + "version": "25.8.0", + "url": "https://pypi.org/project/awesomeversion/25.8.0/" + }, "BASE": { "version": "3.14.2-alpine3.23" }, @@ -12,6 +16,10 @@ "version": "26.0", "url": "https://pypi.org/project/packaging/26.0/" }, + "PYALPM": { + "version": "0.10.12", + "url": "https://pypi.org/project/pyalpm/0.10.12/" + }, "PYCURL": { "version": "7.45.7", "url": "https://pypi.org/project/pycurl/7.45.7/" diff --git a/nvchecker.toml b/nvchecker.toml index 6e3da4b..2a6e51f 100644 --- a/nvchecker.toml +++ b/nvchecker.toml @@ -22,3 +22,11 @@ pypi = "nvchecker" [PACKAGING] source = "pypi" pypi = "packaging" + +[PYALPM] +source = "pypi" +pypi = "pyalpm" + +[AWESOMEVERSION] +source = "pypi" +pypi = "awesomeversion" From 6f3ea7db9b7b56c83264cfc30238ad66bfe56ce6 Mon Sep 17 00:00:00 2001 From: snw35 Date: Wed, 28 Jan 2026 14:46:42 +0000 Subject: [PATCH 2/7] Add build dependencies --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 01312ae..c7b21e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,8 @@ RUN apk --upgrade --no-cache add \ && apk --no-cache --virtual build.deps add \ curl-dev \ build-base \ + pacman-dev \ + pkgconf \ && pip install --no-cache-dir \ tornado==${TORNADO_VERSION}\ pycurl==${PYCURL_VERSION} \ From 7a69664477c6fe931072ec34260d9a90af294f43 Mon Sep 17 00:00:00 2001 From: snw35 Date: Fri, 30 Jan 2026 11:39:27 +0000 Subject: [PATCH 3/7] Construct pyalpm wheel --- Dockerfile | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c7b21e7..e644792 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,33 @@ +FROM python:3.14.2-alpine3.23 as wheelbuilder + +ENV PYALPM_VERSION 0.11.1 + +RUN apk --upgrade --no-cache add \ + build-base \ + pacman-dev \ + pkgconf \ + git \ + patchelf \ + && pip install --no-cache-dir \ + meson-python \ + pytest \ + auditwheel \ + ninja \ + && git clone --depth 1 --branch ${PYALPM_VERSION} https://gitlab.archlinux.org/archlinux/pyalpm.git \ + && pip wheel -w /wheelhouse --no-deps --no-build-isolation /pyalpm \ + && auditwheel repair -w /wheelhouse/ /wheelhouse/pyalpm-${PYALPM_VERSION}-cp314-cp314-linux_x86_64.whl --strip \ + && auditwheel show /wheelhouse/pyalpm-${PYALPM_VERSION}-cp314-cp314-musllinux_1_2_x86_64.whl + FROM python:3.14.2-alpine3.23 ENV TORNADO_VERSION 6.5.4 ENV PYCURL_VERSION 7.45.7 ENV NVCHECKER_VERSION 2.20 ENV PACKAGING_VERSION 26.0 -ENV PYALPM_VERSION 0.10.12 ENV AWESOMEVERSION_VERSION 25.8.0 COPY docker-entrypoint.sh / +COPY --from wheelbuilder /wheelhouse/pyalpm-${PYALPM_VERSION}-cp314-cp314-linux_x86_64.whl /tmp/pyalpm.whl RUN apk --upgrade --no-cache add \ bash \ @@ -21,8 +41,8 @@ RUN apk --upgrade --no-cache add \ pycurl==${PYCURL_VERSION} \ nvchecker==${NVCHECKER_VERSION} \ packaging==${PACKAGING_VERSION} \ - pyalpm==${PYALPM_VERSION} \ awesomeversion==${AWESOMEVERSION_VERSION} \ + /tmp/pyalpm.whl \ && apk del build.deps \ && chmod +x /docker-entrypoint.sh \ && nvchecker --help From d2474753079ce7ed39e0c8f3fa48b45bb5244b64 Mon Sep 17 00:00:00 2001 From: snw35 Date: Fri, 30 Jan 2026 11:41:26 +0000 Subject: [PATCH 4/7] Fix copy --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e644792..1da75ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.14.2-alpine3.23 as wheelbuilder +FROM python:3.14.2-alpine3.23 AS wheelbuilder ENV PYALPM_VERSION 0.11.1 @@ -27,7 +27,7 @@ ENV PACKAGING_VERSION 26.0 ENV AWESOMEVERSION_VERSION 25.8.0 COPY docker-entrypoint.sh / -COPY --from wheelbuilder /wheelhouse/pyalpm-${PYALPM_VERSION}-cp314-cp314-linux_x86_64.whl /tmp/pyalpm.whl +COPY --from=wheelbuilder /wheelhouse/pyalpm-${PYALPM_VERSION}-cp314-cp314-linux_x86_64.whl /tmp/pyalpm.whl RUN apk --upgrade --no-cache add \ bash \ From 20f4c8ea1e33e30e2095e289e733dcdb8796052f Mon Sep 17 00:00:00 2001 From: snw35 Date: Fri, 30 Jan 2026 11:54:55 +0000 Subject: [PATCH 5/7] Fix wheel install --- Dockerfile | 8 ++++---- new_ver.json | 5 +++-- nvchecker.toml | 6 ++++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1da75ff..db5c541 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,25 +25,25 @@ ENV PYCURL_VERSION 7.45.7 ENV NVCHECKER_VERSION 2.20 ENV PACKAGING_VERSION 26.0 ENV AWESOMEVERSION_VERSION 25.8.0 +ENV PYALPM_VERSION 0.11.1 COPY docker-entrypoint.sh / -COPY --from=wheelbuilder /wheelhouse/pyalpm-${PYALPM_VERSION}-cp314-cp314-linux_x86_64.whl /tmp/pyalpm.whl +COPY --from=wheelbuilder /wheelhouse/pyalpm-${PYALPM_VERSION}-cp314-cp314-musllinux_1_2_x86_64.whl /tmp/ RUN apk --upgrade --no-cache add \ bash \ && apk --no-cache --virtual build.deps add \ curl-dev \ build-base \ - pacman-dev \ - pkgconf \ && pip install --no-cache-dir \ tornado==${TORNADO_VERSION}\ pycurl==${PYCURL_VERSION} \ nvchecker==${NVCHECKER_VERSION} \ packaging==${PACKAGING_VERSION} \ awesomeversion==${AWESOMEVERSION_VERSION} \ - /tmp/pyalpm.whl \ + /tmp/pyalpm-${PYALPM_VERSION}-cp314-cp314-musllinux_1_2_x86_64.whl \ && apk del build.deps \ + && rm -f /tmp/pyalpm-${PYALPM_VERSION}-cp314-cp314-musllinux_1_2_x86_64.whl \ && chmod +x /docker-entrypoint.sh \ && nvchecker --help diff --git a/new_ver.json b/new_ver.json index 6952f4c..e6ecf3c 100644 --- a/new_ver.json +++ b/new_ver.json @@ -17,8 +17,9 @@ "url": "https://pypi.org/project/packaging/26.0/" }, "PYALPM": { - "version": "0.10.12", - "url": "https://pypi.org/project/pyalpm/0.10.12/" + "version": "0.11.1", + "revision": "2c7917acd103fcc7916c9d46a68b6579adf21105", + "url": "https://gitlab.archlinux.org/archlinux/pyalpm/-/tags/0.11.1" }, "PYCURL": { "version": "7.45.7", diff --git a/nvchecker.toml b/nvchecker.toml index 2a6e51f..7c6013a 100644 --- a/nvchecker.toml +++ b/nvchecker.toml @@ -24,8 +24,10 @@ source = "pypi" pypi = "packaging" [PYALPM] -source = "pypi" -pypi = "pyalpm" +source = "gitlab" +gitlab = "archlinux/pyalpm" +host = "gitlab.archlinux.org" +use_max_tag = "true" [AWESOMEVERSION] source = "pypi" From 08a77740e7914bcd2efa6faee5ad38fed6f2f4c5 Mon Sep 17 00:00:00 2001 From: snw35 Date: Fri, 30 Jan 2026 12:00:02 +0000 Subject: [PATCH 6/7] Add builder to nvchecker --- nvchecker.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nvchecker.toml b/nvchecker.toml index 7c6013a..47b147f 100644 --- a/nvchecker.toml +++ b/nvchecker.toml @@ -2,6 +2,11 @@ oldver = "old_ver.json" newver = "new_ver.json" +[BASE_WHEELBUILDER] +source = "container" +container = "library/python" +include_regex = "\\d+\\.\\d+\\.?\\d?-alpine\\d\\.\\d+" + [BASE] source = "container" container = "library/python" From 84e18090dd51ba728f046bd55f6bb4894019fee5 Mon Sep 17 00:00:00 2001 From: snw35 Date: Fri, 30 Jan 2026 12:42:42 +0000 Subject: [PATCH 7/7] Clear pip cache --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index db5c541..d6c7958 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,6 +43,7 @@ RUN apk --upgrade --no-cache add \ awesomeversion==${AWESOMEVERSION_VERSION} \ /tmp/pyalpm-${PYALPM_VERSION}-cp314-cp314-musllinux_1_2_x86_64.whl \ && apk del build.deps \ + && pip cache purge \ && rm -f /tmp/pyalpm-${PYALPM_VERSION}-cp314-cp314-musllinux_1_2_x86_64.whl \ && chmod +x /docker-entrypoint.sh \ && nvchecker --help