Skip to content

Update old Perls from jessie to stretch (and test them all in Actions) #101

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 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/build-image-eol.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build and Test (EOL)

on:
push:
branches:
- '**'
tags-ignore:
- '*'
paths:
- 'eol/**'
pull_request:
paths:
- 'eol/**'

defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'
working-directory: eol

jobs:
generate-matrix:
name: Generate Matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate.outputs.matrix }}
steps:
- uses: actions/checkout@master
- id: generate
name: Enumerate Dockerfiles
run: |
matrix="$(dirname */Dockerfile | sort -rn | jq -csR 'rtrimstr("\n") | split("\n") | { directory: . }')"
echo "::set-output name=matrix::$matrix"
build-image:
needs: generate-matrix
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
name: ${{ matrix.directory }}
steps:
- uses: actions/checkout@master
- name: Clone docker-library/official-images (for testing)
run: |
git clone --depth 1 --single-branch https://github.com/docker-library/official-images.git
- name: Build image
run: |
docker version
dir='${{ matrix.directory }}'
img="perl:${dir//,/-}"
docker build -t "$img" "$dir"
- name: Inspect image creation and tag time
run: |
dir='${{ matrix.directory }}'
img="perl:${dir//,/-}"
docker image inspect --format '{{.Created}}' "$img"
docker image inspect --format '{{.Metadata.LastTagTime}}' "$img"
- name: Run tests
run: |
dir='${{ matrix.directory }}'
img="perl:${dir//,/-}"
./official-images/test/run.sh "$img"
38 changes: 30 additions & 8 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and test latest supported Perls
name: Build and Test

on:
push:
Expand All @@ -8,13 +8,29 @@ on:
- '*'
pull_request:

defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'

jobs:
generate-matrix:
name: Generate Matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate.outputs.matrix }}
steps:
- uses: actions/checkout@master
- id: generate
name: Enumerate Dockerfiles
run: |
matrix="$(dirname */Dockerfile | sort -rn | jq -csR 'rtrimstr("\n") | split("\n") | { directory: . }')"
echo "::set-output name=matrix::$matrix"
build-image:
needs: generate-matrix
runs-on: ubuntu-latest
strategy:
matrix:
variant: [ 'main', 'slim', 'main,threaded', 'slim,threaded' ]
perl-version: [ '5.032.001', '5.030.003' ]
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
name: ${{ matrix.directory }}
steps:
- uses: actions/checkout@master
- name: Clone docker-library/official-images (for testing)
Expand All @@ -23,11 +39,17 @@ jobs:
- name: Build image
run: |
docker version
docker build --no-cache -t perl:${{ matrix.perl-version }} ${{ matrix.perl-version }}-${{ matrix.variant }}-buster
dir='${{ matrix.directory }}'
img="perl:${dir//,/-}"
docker build -t "$img" "$dir"
- name: Inspect image creation and tag time
run: |
docker image inspect --format \'{{.Created}}\' perl:${{ matrix.perl-version }}
docker image inspect --format \'{{.Metadata.LastTagTime}}\' perl:${{ matrix.perl-version }}
dir='${{ matrix.directory }}'
img="perl:${dir//,/-}"
docker image inspect --format '{{.Created}}' "$img"
docker image inspect --format '{{.Metadata.LastTagTime}}' "$img"
- name: Run tests
run: |
./official-images/test/run.sh perl:${{ matrix.perl-version }}
dir='${{ matrix.directory }}'
img="perl:${dir//,/-}"
./official-images/test/run.sh "$img"
7 changes: 7 additions & 0 deletions .github/workflows/generate-dockerfiles-patches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@ jobs:
- name: Show diffstat (if any)
run: |
git --no-pager diff --stat HEAD
- name: Generate EOL Dockerfiles/patches
run: |
cd eol
perl -I../local/lib/perl5 ../generate.pl
- name: Show diffstat (if any)
run: |
git --no-pager diff --stat HEAD
54 changes: 0 additions & 54 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,6 @@ options:
threaded: "-Dusethreads"

releases:
- version: 5.8.9
sha256: 1097fbcd48ceccb2bc735d119c9db399a02a8ab9f7dc53e29e47e6a8d0d72e79
extra_flags: "-A ccflags=-fwrapv"
test_parallel: no
debian_release: jessie

- version: 5.10.1
sha256: 9385f2c8c2ca8b1dc4a7c31903f1f8dc8f2ba867dc2a9e5c93012ed6b564e826
extra_flags: "-A ccflags=-fwrapv"
test_parallel: no
debian_release: jessie

- version: 5.12.5
sha256: 10749417fd3010aae320a34181ad4cd6a4855c1fc63403b87fa4d630b18e966c
extra_flags: "-A ccflags=-fwrapv"
test_parallel: no
debian_release: jessie

- version: 5.14.4
sha256: eece8c2b0d491bf6f746bd1f4f1bb7ce26f6b98e91c54690c617d7af38964745
extra_flags: "-A ccflags=-fwrapv"
test_parallel: no
debian_release: jessie

- version: 5.16.3
sha256: bb7bc735e6813b177dcfccd480defcde7eddefa173b5967eac11babd1bfa98e8
extra_flags: "-A ccflags=-fwrapv"
test_parallel: no
debian_release: jessie

- version: 5.18.4
sha256: 1fb4d27b75cd244e849f253320260efe1750641aaff4a18ce0d67556ff1b96a5
extra_flags: "-A ccflags=-fwrapv"
test_parallel: no
debian_release: jessie

- version: 5.20.3
sha256: 1b40068166c242e34a536836286e70b78410602a80615143301e52aa2901493b
debian_release: stretch

- version: 5.22.4
sha256: 8b3122046d1186598082d0e6da53193b045e85e3505e7d37ee0bdd0bdb539b71
debian_release: stretch

- version: 5.24.4
sha256: e34ff38c54857f431f37403b757267c9998152bf46b5c750b462f62461279b10
debian_release: stretch

- version: 5.26.3
sha256: 9ff35a613213f29ab53975141af6825ae7d4408895538cac0922e47ab92a1477
debian_release:
- stretch
- buster

- version: 5.28.3
sha256: 77dc1ddf541643af14d585867d3d0741cce45d0dbe8f1467024e63165d9e2fc5
type: xz
Expand Down
Empty file added downloads/.keep
Empty file.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM buildpack-deps:jessie
FROM buildpack-deps:buster
LABEL maintainer="Peter Martini <[email protected]>, Zak B. Elep <[email protected]>"

COPY *.patch /usr/src/perl/
Expand Down
29 changes: 29 additions & 0 deletions eol/5.008.009-main,threaded-stretch/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM buildpack-deps:stretch
LABEL maintainer="Peter Martini <[email protected]>, Zak B. Elep <[email protected]>"

COPY *.patch /usr/src/perl/
WORKDIR /usr/src/perl

RUN true \
&& curl -SL https://www.cpan.org/src/5.0/perl-5.8.9.tar.bz2 -o perl-5.8.9.tar.bz2 \
&& echo '1097fbcd48ceccb2bc735d119c9db399a02a8ab9f7dc53e29e47e6a8d0d72e79 *perl-5.8.9.tar.bz2' | sha256sum -c - \
&& tar --strip-components=1 -xaf perl-5.8.9.tar.bz2 -C /usr/src/perl \
&& rm perl-5.8.9.tar.bz2 \
&& cat *.patch | patch -p1 \
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
&& archBits="$(dpkg-architecture --query DEB_BUILD_ARCH_BITS)" \
&& archFlag="$([ "$archBits" = '64' ] && echo '-Duse64bitall' || echo '-Duse64bitint')" \
&& ./Configure -Darchname="$gnuArch" "$archFlag" -Dusethreads -Duseshrplib -Dvendorprefix=/usr/local -A ccflags=-fwrapv -des \
&& make -j$(nproc) \
&& make test_harness \
&& make install \
&& cd /usr/src \
&& curl -LO https://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz \
&& echo '9b60767fe40752ef7a9d3f13f19060a63389a5c23acc3e9827e19b75500f81f3 *App-cpanminus-1.7044.tar.gz' | sha256sum -c - \
&& tar -xzf App-cpanminus-1.7044.tar.gz && cd App-cpanminus-1.7044 && perl bin/cpanm . && cd /root \
&& true \
&& rm -fr ./cpanm /root/.cpanm /usr/src/perl /usr/src/App-cpanminus-1.7044* /tmp/*

WORKDIR /

CMD ["perl5.8.9","-de0"]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM buildpack-deps:jessie
FROM buildpack-deps:buster
LABEL maintainer="Peter Martini <[email protected]>, Zak B. Elep <[email protected]>"

COPY *.patch /usr/src/perl/
Expand Down
29 changes: 29 additions & 0 deletions eol/5.008.009-main-stretch/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM buildpack-deps:stretch
LABEL maintainer="Peter Martini <[email protected]>, Zak B. Elep <[email protected]>"

COPY *.patch /usr/src/perl/
WORKDIR /usr/src/perl

RUN true \
&& curl -SL https://www.cpan.org/src/5.0/perl-5.8.9.tar.bz2 -o perl-5.8.9.tar.bz2 \
&& echo '1097fbcd48ceccb2bc735d119c9db399a02a8ab9f7dc53e29e47e6a8d0d72e79 *perl-5.8.9.tar.bz2' | sha256sum -c - \
&& tar --strip-components=1 -xaf perl-5.8.9.tar.bz2 -C /usr/src/perl \
&& rm perl-5.8.9.tar.bz2 \
&& cat *.patch | patch -p1 \
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
&& archBits="$(dpkg-architecture --query DEB_BUILD_ARCH_BITS)" \
&& archFlag="$([ "$archBits" = '64' ] && echo '-Duse64bitall' || echo '-Duse64bitint')" \
&& ./Configure -Darchname="$gnuArch" "$archFlag" -Duseshrplib -Dvendorprefix=/usr/local -A ccflags=-fwrapv -des \
&& make -j$(nproc) \
&& make test_harness \
&& make install \
&& cd /usr/src \
&& curl -LO https://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz \
&& echo '9b60767fe40752ef7a9d3f13f19060a63389a5c23acc3e9827e19b75500f81f3 *App-cpanminus-1.7044.tar.gz' | sha256sum -c - \
&& tar -xzf App-cpanminus-1.7044.tar.gz && cd App-cpanminus-1.7044 && perl bin/cpanm . && cd /root \
&& true \
&& rm -fr ./cpanm /root/.cpanm /usr/src/perl /usr/src/App-cpanminus-1.7044* /tmp/*

WORKDIR /

CMD ["perl5.8.9","-de0"]
Loading