docker-library / pypy

Docker Official Image packaging for pypy
http://pypy.org/
MIT License
69 stars 46 forks source link

Add initial jq-based templating engine #53

Closed tianon closed 3 years ago

tianon commented 3 years ago

See also docker-library/php#1052 (and linked PRs).

tianon commented 3 years ago

I applied the following change, so I could get a better diff from current to new:

diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh
index 4c6e0a3..577ba39 100755
--- a/generate-stackbrew-library.sh
+++ b/generate-stackbrew-library.sh
@@ -17,7 +17,7 @@ if [ "$#" -eq 0 ]; then
 fi

 # sort version numbers with highest first
-IFS=$'\n'; set -- $(sort -rV <<<"$*"); unset IFS
+#IFS=$'\n'; set -- $(sort -rV <<<"$*"); unset IFS

 # get the most recent commit which modified any of "$@"
 fileCommit() {
Diff: ```diff $ diff -u <(bashbrew cat pypy) <(bashbrew cat <(./generate-stackbrew-library.sh)) --- /dev/fd/63 2021-02-08 15:21:05.477809103 -0800 +++ /dev/fd/62 2021-02-08 15:21:05.477809103 -0800 @@ -3,30 +3,30 @@ Tags: 2.7-7.3.3, 2.7-7.3, 2.7-7, 2.7, 2-7.3.3, 2-7.3, 2-7, 2, 2.7-7.3.3-buster, 2.7-7.3-buster, 2.7-7-buster, 2.7-buster, 2-7.3.3-buster, 2-7.3-buster, 2-7-buster, 2-buster Architectures: amd64, arm64v8, i386 -GitCommit: 9625e09996380a78c53a9610915d839035245b57 -Directory: 2.7 +GitCommit: 7f2fc5d31f8fecef999f26d11c5c8f1c95f1d93f +Directory: 2.7/buster Tags: 2.7-7.3.3-slim, 2.7-7.3-slim, 2.7-7-slim, 2.7-slim, 2-7.3.3-slim, 2-7.3-slim, 2-7-slim, 2-slim, 2.7-7.3.3-slim-buster, 2.7-7.3-slim-buster, 2.7-7-slim-buster, 2.7-slim-buster, 2-7.3.3-slim-buster, 2-7.3-slim-buster, 2-7-slim-buster, 2-slim-buster Architectures: amd64, arm64v8, i386 -GitCommit: 9625e09996380a78c53a9610915d839035245b57 -Directory: 2.7/slim +GitCommit: 7f2fc5d31f8fecef999f26d11c5c8f1c95f1d93f +Directory: 2.7/slim-buster Tags: 3.6-7.3.3, 3.6-7.3, 3.6-7, 3.6, 3-7.3.3, 3-7.3, 3-7, 3, latest, 3.6-7.3.3-buster, 3.6-7.3-buster, 3.6-7-buster, 3.6-buster, 3-7.3.3-buster, 3-7.3-buster, 3-7-buster, 3-buster, buster Architectures: amd64, arm64v8, i386, s390x -GitCommit: 9625e09996380a78c53a9610915d839035245b57 -Directory: 3.6 +GitCommit: 7f2fc5d31f8fecef999f26d11c5c8f1c95f1d93f +Directory: 3.6/buster Tags: 3.6-7.3.3-slim, 3.6-7.3-slim, 3.6-7-slim, 3.6-slim, 3-7.3.3-slim, 3-7.3-slim, 3-7-slim, 3-slim, slim, 3.6-7.3.3-slim-buster, 3.6-7.3-slim-buster, 3.6-7-slim-buster, 3.6-slim-buster, 3-7.3.3-slim-buster, 3-7.3-slim-buster, 3-7-slim-buster, 3-slim-buster, slim-buster Architectures: amd64, arm64v8, i386, s390x -GitCommit: 9625e09996380a78c53a9610915d839035245b57 -Directory: 3.6/slim +GitCommit: 7f2fc5d31f8fecef999f26d11c5c8f1c95f1d93f +Directory: 3.6/slim-buster Tags: 3.7-7.3.3, 3.7-7.3, 3.7-7, 3.7, 3.7-7.3.3-buster, 3.7-7.3-buster, 3.7-7-buster, 3.7-buster Architectures: amd64, arm64v8, i386, s390x -GitCommit: 9625e09996380a78c53a9610915d839035245b57 -Directory: 3.7 +GitCommit: 7f2fc5d31f8fecef999f26d11c5c8f1c95f1d93f +Directory: 3.7/buster Tags: 3.7-7.3.3-slim, 3.7-7.3-slim, 3.7-7-slim, 3.7-slim, 3.7-7.3.3-slim-buster, 3.7-7.3-slim-buster, 3.7-7-slim-buster, 3.7-slim-buster Architectures: amd64, arm64v8, i386, s390x -GitCommit: 9625e09996380a78c53a9610915d839035245b57 -Directory: 3.7/slim +GitCommit: 7f2fc5d31f8fecef999f26d11c5c8f1c95f1d93f +Directory: 3.7/slim-buster ```
tianon commented 3 years ago

To be transparent: the impetus for making this conversion was the additional patching we need to introduce from/for https://github.com/docker-library/pypy/issues/49#issuecomment-774939286, but it generally simplifies (and allows us to add support for multiple Debian releases and potentially Windows in the future).