Skip to content

Add basic "library.pl" script for generating "library/perl" file #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2021

Conversation

tianon
Copy link
Contributor

@tianon tianon commented May 18, 2021

This accepts an optional --eol flag to also include the EOL versions (with a big comment about removing them post-build).

(This is as mentioned/promised in #101 (comment); it's a bit rough, but probably better than continuing to maintain the generated file by hand? 😇)

The output ordering/preference is based on the order of things in config.yml, so as long as that stays consistent, this should DTRT. 😄

This accepts an optional `--eol` flag to also include the EOL versions (with a big comment about removing them post-build).
@tianon
Copy link
Contributor Author

tianon commented May 18, 2021

Example output:
Maintainers: Peter Martini <[email protected]> (@PeterMartini),
             Zak B. Elep <[email protected]> (@zakame)
GitRepo: https://github.com/perl/docker-perl.git
GitCommit: af63f0120f079557cd8e29712b778bc3dace9215
Architectures: amd64, arm32v7, arm64v8, i386, ppc64le, s390x

Tags: 5.32.1, 5.32, 5, latest, 5.32.1-buster, 5.32-buster, 5-buster, buster
Architectures: amd64, arm32v7, arm64v8, i386, ppc64le, s390x
Directory: 5.032.001-main-buster

Tags: 5.32.1-stretch, 5.32-stretch, 5-stretch, stretch
Architectures: amd64, arm32v7, arm64v8, i386
Directory: 5.032.001-main-stretch

Tags: 5.32.1-slim, 5.32-slim, 5-slim, slim, 5.32.1-slim-buster, 5.32-slim-buster, 5-slim-buster, slim-buster
Architectures: amd64, arm32v7, arm64v8, i386, ppc64le, s390x
Directory: 5.032.001-slim-buster

Tags: 5.32.1-slim-stretch, 5.32-slim-stretch, 5-slim-stretch, slim-stretch
Architectures: amd64, arm32v7, arm64v8, i386
Directory: 5.032.001-slim-stretch

Tags: 5.32.1-threaded, 5.32-threaded, 5-threaded, threaded, 5.32.1-threaded-buster, 5.32-threaded-buster, 5-threaded-buster, threaded-buster
Architectures: amd64, arm32v7, arm64v8, i386, ppc64le, s390x
Directory: 5.032.001-main,threaded-buster

Tags: 5.32.1-threaded-stretch, 5.32-threaded-stretch, 5-threaded-stretch, threaded-stretch
Architectures: amd64, arm32v7, arm64v8, i386
Directory: 5.032.001-main,threaded-stretch

Tags: 5.32.1-slim-threaded, 5.32-slim-threaded, 5-slim-threaded, slim-threaded, 5.32.1-slim-threaded-buster, 5.32-slim-threaded-buster, 5-slim-threaded-buster, slim-threaded-buster
Architectures: amd64, arm32v7, arm64v8, i386, ppc64le, s390x
Directory: 5.032.001-slim,threaded-buster

Tags: 5.32.1-slim-threaded-stretch, 5.32-slim-threaded-stretch, 5-slim-threaded-stretch, slim-threaded-stretch
Architectures: amd64, arm32v7, arm64v8, i386
Directory: 5.032.001-slim,threaded-stretch

Tags: 5.30.3, 5.30, 5.30.3-buster, 5.30-buster
Architectures: amd64, arm32v7, arm64v8, i386, ppc64le, s390x
Directory: 5.030.003-main-buster

Tags: 5.30.3-stretch, 5.30-stretch
Architectures: amd64, arm32v7, arm64v8, i386
Directory: 5.030.003-main-stretch

Tags: 5.30.3-slim, 5.30-slim, 5.30.3-slim-buster, 5.30-slim-buster
Architectures: amd64, arm32v7, arm64v8, i386, ppc64le, s390x
Directory: 5.030.003-slim-buster

Tags: 5.30.3-slim-stretch, 5.30-slim-stretch
Architectures: amd64, arm32v7, arm64v8, i386
Directory: 5.030.003-slim-stretch

Tags: 5.30.3-threaded, 5.30-threaded, 5.30.3-threaded-buster, 5.30-threaded-buster
Architectures: amd64, arm32v7, arm64v8, i386, ppc64le, s390x
Directory: 5.030.003-main,threaded-buster

Tags: 5.30.3-threaded-stretch, 5.30-threaded-stretch
Architectures: amd64, arm32v7, arm64v8, i386
Directory: 5.030.003-main,threaded-stretch

Tags: 5.30.3-slim-threaded, 5.30-slim-threaded, 5.30.3-slim-threaded-buster, 5.30-slim-threaded-buster
Architectures: amd64, arm32v7, arm64v8, i386, ppc64le, s390x
Directory: 5.030.003-slim,threaded-buster

Tags: 5.30.3-slim-threaded-stretch, 5.30-slim-threaded-stretch
Architectures: amd64, arm32v7, arm64v8, i386
Directory: 5.030.003-slim,threaded-stretch

Tags: 5.28.3, 5.28, 5.28.3-buster, 5.28-buster
Architectures: amd64, arm32v7, arm64v8, i386, ppc64le, s390x
Directory: 5.028.003-main-buster

Tags: 5.28.3-stretch, 5.28-stretch
Architectures: amd64, arm32v7, arm64v8, i386
Directory: 5.028.003-main-stretch

Tags: 5.28.3-slim, 5.28-slim, 5.28.3-slim-buster, 5.28-slim-buster
Architectures: amd64, arm32v7, arm64v8, i386, ppc64le, s390x
Directory: 5.028.003-slim-buster

Tags: 5.28.3-slim-stretch, 5.28-slim-stretch
Architectures: amd64, arm32v7, arm64v8, i386
Directory: 5.028.003-slim-stretch

Tags: 5.28.3-threaded, 5.28-threaded, 5.28.3-threaded-buster, 5.28-threaded-buster
Architectures: amd64, arm32v7, arm64v8, i386, ppc64le, s390x
Directory: 5.028.003-main,threaded-buster

Tags: 5.28.3-threaded-stretch, 5.28-threaded-stretch
Architectures: amd64, arm32v7, arm64v8, i386
Directory: 5.028.003-main,threaded-stretch

Tags: 5.28.3-slim-threaded, 5.28-slim-threaded, 5.28.3-slim-threaded-buster, 5.28-slim-threaded-buster
Architectures: amd64, arm32v7, arm64v8, i386, ppc64le, s390x
Directory: 5.028.003-slim,threaded-buster

Tags: 5.28.3-slim-threaded-stretch, 5.28-slim-threaded-stretch
Architectures: amd64, arm32v7, arm64v8, i386
Directory: 5.028.003-slim,threaded-stretch

@tianon
Copy link
Contributor Author

tianon commented May 19, 2021

I guess it'd also be helpful to post a diff from the current library/perl to the output of this script -- the main difference is that the Tags: get sorted in the opposite direction (most specific first), which matches other library/xxx files:

Diff:
@@ -1,88 +1,88 @@
 Maintainers: Peter Martini <[email protected]> (@PeterMartini), Zak B. Elep <[email protected]> (@zakame)
 Architectures: amd64, arm32v7, arm64v8, i386, ppc64le, s390x
 GitRepo: https://github.com/perl/docker-perl.git
-GitCommit: 738a3ccc0f422408c153aa9b3d58d7403b7aed0c
+GitCommit: af63f0120f079557cd8e29712b778bc3dace9215
 
-Tags: latest, 5, 5.32, 5.32.1, 5-buster, 5.32-buster, 5.32.1-buster
+Tags: 5.32.1, 5.32, 5, latest, 5.32.1-buster, 5.32-buster, 5-buster, buster
 Directory: 5.032.001-main-buster
 
-Tags: 5-stretch, 5.32-stretch, 5.32.1-stretch
+Tags: 5.32.1-stretch, 5.32-stretch, 5-stretch, stretch
 Architectures: amd64, arm32v7, arm64v8, i386
 Directory: 5.032.001-main-stretch
 
-Tags: slim, 5-slim, 5.32-slim, 5.32.1-slim, slim-buster, 5-slim-buster, 5.32-slim-buster, 5.32.1-slim-buster
+Tags: 5.32.1-slim, 5.32-slim, 5-slim, slim, 5.32.1-slim-buster, 5.32-slim-buster, 5-slim-buster, slim-buster
 Directory: 5.032.001-slim-buster
 
-Tags: slim-stretch, 5-slim-stretch, 5.32-slim-stretch, 5.32.1-slim-stretch
+Tags: 5.32.1-slim-stretch, 5.32-slim-stretch, 5-slim-stretch, slim-stretch
 Architectures: amd64, arm32v7, arm64v8, i386
 Directory: 5.032.001-slim-stretch
 
-Tags: threaded, 5-threaded, 5.32-threaded, 5.32.1-threaded, threaded-buster, 5-threaded-buster, 5.32-threaded-buster, 5.32.1-threaded-buster
+Tags: 5.32.1-threaded, 5.32-threaded, 5-threaded, threaded, 5.32.1-threaded-buster, 5.32-threaded-buster, 5-threaded-buster, threaded-buster
 Directory: 5.032.001-main,threaded-buster
 
-Tags: threaded-stretch, 5-threaded-stretch, 5.32-threaded-stretch, 5.32.1-threaded-stretch
+Tags: 5.32.1-threaded-stretch, 5.32-threaded-stretch, 5-threaded-stretch, threaded-stretch
 Architectures: amd64, arm32v7, arm64v8, i386
 Directory: 5.032.001-main,threaded-stretch
 
-Tags: slim-threaded, 5-slim-threaded, 5.32-slim-threaded, 5.32.1-slim-threaded, slim-threaded-buster, 5-slim-threaded-buster, 5.32-slim-threaded-buster, 5.32.1-slim-threaded-buster
+Tags: 5.32.1-slim-threaded, 5.32-slim-threaded, 5-slim-threaded, slim-threaded, 5.32.1-slim-threaded-buster, 5.32-slim-threaded-buster, 5-slim-threaded-buster, slim-threaded-buster
 Directory: 5.032.001-slim,threaded-buster
 
-Tags: slim-threaded-stretch, 5-slim-threaded-stretch, 5.32-slim-threaded-stretch, 5.32.1-slim-threaded-stretch
+Tags: 5.32.1-slim-threaded-stretch, 5.32-slim-threaded-stretch, 5-slim-threaded-stretch, slim-threaded-stretch
 Architectures: amd64, arm32v7, arm64v8, i386
 Directory: 5.032.001-slim,threaded-stretch
 
-Tags: 5.30, 5.30.3, 5.30-buster, 5.30.3-buster
+Tags: 5.30.3, 5.30, 5.30.3-buster, 5.30-buster
 Directory: 5.030.003-main-buster
 
-Tags: 5.30-stretch, 5.30.3-stretch
+Tags: 5.30.3-stretch, 5.30-stretch
 Architectures: amd64, arm32v7, arm64v8, i386
 Directory: 5.030.003-main-stretch
 
-Tags: 5.30-slim, 5.30.3-slim, 5.30-slim-buster, 5.30.3-slim-buster
+Tags: 5.30.3-slim, 5.30-slim, 5.30.3-slim-buster, 5.30-slim-buster
 Directory: 5.030.003-slim-buster
 
-Tags: 5.30-slim-stretch, 5.30.3-slim-stretch
+Tags: 5.30.3-slim-stretch, 5.30-slim-stretch
 Architectures: amd64, arm32v7, arm64v8, i386
 Directory: 5.030.003-slim-stretch
 
-Tags: 5.30-threaded, 5.30.3-threaded, 5.30-threaded-buster, 5.30.3-threaded-buster
+Tags: 5.30.3-threaded, 5.30-threaded, 5.30.3-threaded-buster, 5.30-threaded-buster
 Directory: 5.030.003-main,threaded-buster
 
-Tags: 5.30-threaded-stretch, 5.30.3-threaded-stretch
+Tags: 5.30.3-threaded-stretch, 5.30-threaded-stretch
 Architectures: amd64, arm32v7, arm64v8, i386
 Directory: 5.030.003-main,threaded-stretch
 
-Tags: 5.30-slim-threaded, 5.30.3-slim-threaded, 5.30-slim-threaded-buster, 5.30.3-slim-threaded-buster
+Tags: 5.30.3-slim-threaded, 5.30-slim-threaded, 5.30.3-slim-threaded-buster, 5.30-slim-threaded-buster
 Directory: 5.030.003-slim,threaded-buster
 
-Tags: 5.30-slim-threaded-stretch, 5.30.3-slim-threaded-stretch
+Tags: 5.30.3-slim-threaded-stretch, 5.30-slim-threaded-stretch
 Architectures: amd64, arm32v7, arm64v8, i386
 Directory: 5.030.003-slim,threaded-stretch
 
-Tags: 5.28, 5.28.3, 5.28-buster, 5.28.3-buster
+Tags: 5.28.3, 5.28, 5.28.3-buster, 5.28-buster
 Directory: 5.028.003-main-buster
 
-Tags: 5.28-stretch, 5.28.3-stretch
+Tags: 5.28.3-stretch, 5.28-stretch
 Architectures: amd64, arm32v7, arm64v8, i386
 Directory: 5.028.003-main-stretch
 
-Tags: 5.28-slim, 5.28.3-slim, 5.28-slim-buster, 5.28.3-slim-buster
+Tags: 5.28.3-slim, 5.28-slim, 5.28.3-slim-buster, 5.28-slim-buster
 Directory: 5.028.003-slim-buster
 
-Tags: 5.28-slim-stretch, 5.28.3-slim-stretch
+Tags: 5.28.3-slim-stretch, 5.28-slim-stretch
 Architectures: amd64, arm32v7, arm64v8, i386
 Directory: 5.028.003-slim-stretch
 
-Tags: 5.28-threaded, 5.28.3-threaded, 5.28-threaded-buster, 5.28.3-threaded-buster
+Tags: 5.28.3-threaded, 5.28-threaded, 5.28.3-threaded-buster, 5.28-threaded-buster
 Directory: 5.028.003-main,threaded-buster
 
-Tags: 5.28-threaded-stretch, 5.28.3-threaded-stretch
+Tags: 5.28.3-threaded-stretch, 5.28-threaded-stretch
 Architectures: amd64, arm32v7, arm64v8, i386
 Directory: 5.028.003-main,threaded-stretch
 
-Tags: 5.28-slim-threaded, 5.28.3-slim-threaded, 5.28-slim-threaded-buster, 5.28.3-slim-threaded-buster
+Tags: 5.28.3-slim-threaded, 5.28-slim-threaded, 5.28.3-slim-threaded-buster, 5.28-slim-threaded-buster
 Directory: 5.028.003-slim,threaded-buster
 
-Tags: 5.28-slim-threaded-stretch, 5.28.3-slim-threaded-stretch
+Tags: 5.28.3-slim-threaded-stretch, 5.28-slim-threaded-stretch
 Architectures: amd64, arm32v7, arm64v8, i386
 Directory: 5.028.003-slim,threaded-stretch

Copy link
Member

@zakame zakame left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @tianon, looks immediately useful for releasing #104 🎉

Very minor nitpick would be the tab indentation, but nothing a perltidy run couldn't fix 💪

@zakame zakame merged commit f36481d into Perl:master May 21, 2021
@tianon tianon deleted the library-generator branch May 21, 2021 07:18
@tianon
Copy link
Contributor Author

tianon commented May 21, 2021

Sorry, tabs4lyfe is a dirty habit I'll never be cured of! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants