From 77efb18a0fb15955a4f77c9fa1d3968875915b78 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 5 Apr 2024 14:54:06 -0700 Subject: [PATCH] Fix `dpkg-query --search` to be more specific --- 3.0/bullseye/Dockerfile | 2 +- 3.0/buster/Dockerfile | 2 +- 3.0/slim-bullseye/Dockerfile | 2 +- 3.0/slim-buster/Dockerfile | 2 +- 3.1/bookworm/Dockerfile | 2 +- 3.1/bullseye/Dockerfile | 2 +- 3.1/slim-bookworm/Dockerfile | 2 +- 3.1/slim-bullseye/Dockerfile | 2 +- 3.2/bookworm/Dockerfile | 2 +- 3.2/bullseye/Dockerfile | 2 +- 3.2/slim-bookworm/Dockerfile | 2 +- 3.2/slim-bullseye/Dockerfile | 2 +- 3.3/bookworm/Dockerfile | 2 +- 3.3/bullseye/Dockerfile | 2 +- 3.3/slim-bookworm/Dockerfile | 2 +- 3.3/slim-bullseye/Dockerfile | 2 +- Dockerfile.template | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/3.0/bullseye/Dockerfile b/3.0/bullseye/Dockerfile index a348d95d8..e57c1e5eb 100644 --- a/3.0/bullseye/Dockerfile +++ b/3.0/bullseye/Dockerfile @@ -64,7 +64,7 @@ RUN set -eux; \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark > /dev/null; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ diff --git a/3.0/buster/Dockerfile b/3.0/buster/Dockerfile index 0f67902bd..becce5fae 100644 --- a/3.0/buster/Dockerfile +++ b/3.0/buster/Dockerfile @@ -64,7 +64,7 @@ RUN set -eux; \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark > /dev/null; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ diff --git a/3.0/slim-bullseye/Dockerfile b/3.0/slim-bullseye/Dockerfile index 66ab15e3c..22bf722f5 100644 --- a/3.0/slim-bullseye/Dockerfile +++ b/3.0/slim-bullseye/Dockerfile @@ -91,7 +91,7 @@ RUN set -eux; \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark > /dev/null; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ diff --git a/3.0/slim-buster/Dockerfile b/3.0/slim-buster/Dockerfile index 956097c48..3a49517c8 100644 --- a/3.0/slim-buster/Dockerfile +++ b/3.0/slim-buster/Dockerfile @@ -91,7 +91,7 @@ RUN set -eux; \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark > /dev/null; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ diff --git a/3.1/bookworm/Dockerfile b/3.1/bookworm/Dockerfile index 97991aa81..48af0cc2d 100644 --- a/3.1/bookworm/Dockerfile +++ b/3.1/bookworm/Dockerfile @@ -64,7 +64,7 @@ RUN set -eux; \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark > /dev/null; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ diff --git a/3.1/bullseye/Dockerfile b/3.1/bullseye/Dockerfile index 80f0ec1ad..86c8a5102 100644 --- a/3.1/bullseye/Dockerfile +++ b/3.1/bullseye/Dockerfile @@ -64,7 +64,7 @@ RUN set -eux; \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark > /dev/null; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ diff --git a/3.1/slim-bookworm/Dockerfile b/3.1/slim-bookworm/Dockerfile index fef9c14ad..85cefcf0a 100644 --- a/3.1/slim-bookworm/Dockerfile +++ b/3.1/slim-bookworm/Dockerfile @@ -91,7 +91,7 @@ RUN set -eux; \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark > /dev/null; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ diff --git a/3.1/slim-bullseye/Dockerfile b/3.1/slim-bullseye/Dockerfile index 346266152..9225a6489 100644 --- a/3.1/slim-bullseye/Dockerfile +++ b/3.1/slim-bullseye/Dockerfile @@ -91,7 +91,7 @@ RUN set -eux; \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark > /dev/null; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ diff --git a/3.2/bookworm/Dockerfile b/3.2/bookworm/Dockerfile index f87fe76f9..f445dd9ba 100644 --- a/3.2/bookworm/Dockerfile +++ b/3.2/bookworm/Dockerfile @@ -90,7 +90,7 @@ RUN set -eux; \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark > /dev/null; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ diff --git a/3.2/bullseye/Dockerfile b/3.2/bullseye/Dockerfile index e753e00b3..fe861df4e 100644 --- a/3.2/bullseye/Dockerfile +++ b/3.2/bullseye/Dockerfile @@ -90,7 +90,7 @@ RUN set -eux; \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark > /dev/null; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ diff --git a/3.2/slim-bookworm/Dockerfile b/3.2/slim-bookworm/Dockerfile index d5f809841..e5a9175c7 100644 --- a/3.2/slim-bookworm/Dockerfile +++ b/3.2/slim-bookworm/Dockerfile @@ -117,7 +117,7 @@ RUN set -eux; \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark > /dev/null; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ diff --git a/3.2/slim-bullseye/Dockerfile b/3.2/slim-bullseye/Dockerfile index 189b7ff56..679b0501b 100644 --- a/3.2/slim-bullseye/Dockerfile +++ b/3.2/slim-bullseye/Dockerfile @@ -117,7 +117,7 @@ RUN set -eux; \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark > /dev/null; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ diff --git a/3.3/bookworm/Dockerfile b/3.3/bookworm/Dockerfile index e66e1a392..44440813c 100644 --- a/3.3/bookworm/Dockerfile +++ b/3.3/bookworm/Dockerfile @@ -97,7 +97,7 @@ RUN set -eux; \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark > /dev/null; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ diff --git a/3.3/bullseye/Dockerfile b/3.3/bullseye/Dockerfile index 33b18b722..89bb994e4 100644 --- a/3.3/bullseye/Dockerfile +++ b/3.3/bullseye/Dockerfile @@ -97,7 +97,7 @@ RUN set -eux; \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark > /dev/null; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ diff --git a/3.3/slim-bookworm/Dockerfile b/3.3/slim-bookworm/Dockerfile index c69e19331..10d00dea4 100644 --- a/3.3/slim-bookworm/Dockerfile +++ b/3.3/slim-bookworm/Dockerfile @@ -123,7 +123,7 @@ RUN set -eux; \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark > /dev/null; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ diff --git a/3.3/slim-bullseye/Dockerfile b/3.3/slim-bullseye/Dockerfile index 020ba6571..8d3744e6d 100644 --- a/3.3/slim-bullseye/Dockerfile +++ b/3.3/slim-bullseye/Dockerfile @@ -123,7 +123,7 @@ RUN set -eux; \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark > /dev/null; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ diff --git a/Dockerfile.template b/Dockerfile.template index a01ca4934..cfa4306e9 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -291,7 +291,7 @@ RUN set -eux; \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark > /dev/null; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \