Skip to content

Commit 3974509

Browse files
committed
Merge pull request #9 from tianon/sha1
Remove sha1.txt and embed it in the Dockerfile
2 parents 322a05e + 886e632 commit 3974509

File tree

9 files changed

+11
-24
lines changed

9 files changed

+11
-24
lines changed

5.018.004-64bit,threaded/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ RUN apt-get update \
88
RUN mkdir /usr/src/perl
99
WORKDIR /usr/src/perl
1010

11-
COPY sha1.txt /tmp/sha1.txt
1211
RUN curl -SL https://cpan.metacpan.org/authors/id/R/RJ/RJBS/perl-5.18.4.tar.bz2 -o perl-5.18.4.tar.bz2 \
13-
&& sha1sum -c /tmp/sha1.txt \
12+
&& echo '69c34558a0a939a7adbbc1de48c06ea418d81e27 *perl-5.18.4.tar.bz2' | sha1sum -c - \
1413
&& tar --strip-components=1 -xjf perl-5.18.4.tar.bz2 -C /usr/src/perl \
15-
&& rm perl-5.18.4.tar.bz2 /tmp/sha1.txt \
14+
&& rm perl-5.18.4.tar.bz2 \
1615
&& ./Configure -Dusethreads -Duse64bitall -A ccflags=-fwrapv -des \
1716
&& make -j$(nproc) \
1817
&& TEST_JOBS=$(nproc) make test_harness \

5.018.004-64bit,threaded/sha1.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

5.018.004-64bit/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ RUN apt-get update \
88
RUN mkdir /usr/src/perl
99
WORKDIR /usr/src/perl
1010

11-
COPY sha1.txt /tmp/sha1.txt
1211
RUN curl -SL https://cpan.metacpan.org/authors/id/R/RJ/RJBS/perl-5.18.4.tar.bz2 -o perl-5.18.4.tar.bz2 \
13-
&& sha1sum -c /tmp/sha1.txt \
12+
&& echo '69c34558a0a939a7adbbc1de48c06ea418d81e27 *perl-5.18.4.tar.bz2' | sha1sum -c - \
1413
&& tar --strip-components=1 -xjf perl-5.18.4.tar.bz2 -C /usr/src/perl \
15-
&& rm perl-5.18.4.tar.bz2 /tmp/sha1.txt \
14+
&& rm perl-5.18.4.tar.bz2 \
1615
&& ./Configure -Duse64bitall -A ccflags=-fwrapv -des \
1716
&& make -j$(nproc) \
1817
&& TEST_JOBS=$(nproc) make test_harness \

5.018.004-64bit/sha1.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

5.020.001-64bit,threaded/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ RUN apt-get update \
88
RUN mkdir /usr/src/perl
99
WORKDIR /usr/src/perl
1010

11-
COPY sha1.txt /tmp/sha1.txt
1211
RUN curl -SL https://cpan.metacpan.org/authors/id/S/SH/SHAY/perl-5.20.1.tar.bz2 -o perl-5.20.1.tar.bz2 \
13-
&& sha1sum -c /tmp/sha1.txt \
12+
&& echo 'cd424d1520ba2686fe5d4422565aaf880e9467f6 *perl-5.20.1.tar.bz2' | sha1sum -c - \
1413
&& tar --strip-components=1 -xjf perl-5.20.1.tar.bz2 -C /usr/src/perl \
15-
&& rm perl-5.20.1.tar.bz2 /tmp/sha1.txt \
14+
&& rm perl-5.20.1.tar.bz2 \
1615
&& ./Configure -Dusethreads -Duse64bitall -des \
1716
&& make -j$(nproc) \
1817
&& TEST_JOBS=$(nproc) make test_harness \

5.020.001-64bit,threaded/sha1.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

5.020.001-64bit/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ RUN apt-get update \
88
RUN mkdir /usr/src/perl
99
WORKDIR /usr/src/perl
1010

11-
COPY sha1.txt /tmp/sha1.txt
1211
RUN curl -SL https://cpan.metacpan.org/authors/id/S/SH/SHAY/perl-5.20.1.tar.bz2 -o perl-5.20.1.tar.bz2 \
13-
&& sha1sum -c /tmp/sha1.txt \
12+
&& echo 'cd424d1520ba2686fe5d4422565aaf880e9467f6 *perl-5.20.1.tar.bz2' | sha1sum -c - \
1413
&& tar --strip-components=1 -xjf perl-5.20.1.tar.bz2 -C /usr/src/perl \
15-
&& rm perl-5.20.1.tar.bz2 /tmp/sha1.txt \
14+
&& rm perl-5.20.1.tar.bz2 \
1615
&& ./Configure -Duse64bitall -des \
1716
&& make -j$(nproc) \
1817
&& TEST_JOBS=$(nproc) make test_harness \

5.020.001-64bit/sha1.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

generate.pl

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,13 @@ sub die_with_sample {
4949

5050
for my $config (keys %builds) {
5151
my $output = $template;
52-
$output =~ s/{{$_}}/$release->{$_}/mg for (qw(version pause extra_flags));
52+
$output =~ s/{{$_}}/$release->{$_}/mg for (qw(version pause extra_flags sha1));
5353
$output =~ s/{{args}}/$builds{$config}/mg;
5454

5555
my $dir = sprintf "%i.%03i.%03i-%s",
5656
($release->{version} =~ /(\d+)\.(\d+)\.(\d+)/),
5757
$config;
5858

59-
open my $sha1, ">$dir/sha1.txt" or die "Couldn't open $dir/sha1.txt for writing";
60-
print $sha1 "$release->{sha1} perl-$release->{version}.tar.bz2\n";
61-
close $sha1;
62-
6359
open my $dockerfile, ">$dir/Dockerfile" or die "Couldn't open $dir/Dockerfile for writing";
6460
print $dockerfile $output;
6561
close $dockerfile;
@@ -116,11 +112,10 @@ =head1 DESCRIPTION
116112
RUN mkdir /usr/src/perl
117113
WORKDIR /usr/src/perl
118114
119-
COPY sha1.txt /tmp/sha1.txt
120115
RUN curl -SL https://cpan.metacpan.org/authors/id/{{pause}}/perl-{{version}}.tar.bz2 -o perl-{{version}}.tar.bz2 \
121-
&& sha1sum -c /tmp/sha1.txt \
116+
&& echo '{{sha1}} *perl-{{version}}.tar.bz2' | sha1sum -c - \
122117
&& tar --strip-components=1 -xjf perl-{{version}}.tar.bz2 -C /usr/src/perl \
123-
&& rm perl-{{version}}.tar.bz2 /tmp/sha1.txt \
118+
&& rm perl-{{version}}.tar.bz2 \
124119
&& ./Configure {{args}} {{extra_flags}} -des \
125120
&& make -j$(nproc) \
126121
&& TEST_JOBS=$(nproc) make test_harness \

0 commit comments

Comments
 (0)