Skip to content

[Swift] Update the docker image with Swift 4.2.2 release #5395

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 2 commits into from
Feb 6, 2019

Conversation

shahmishal
Copy link
Contributor

No description provided.

@yosifkit
Copy link
Member

yosifkit commented Feb 5, 2019

Diff:
diff --git a/_bashbrew-list b/_bashbrew-list
index 12a01af..e4cabab 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -8,4 +8,5 @@ swift:4.1
 swift:4.1.3
 swift:4.2
 swift:4.2.1
+swift:4.2.2
 swift:latest
diff --git a/swift_latest/Dockerfile b/swift_latest/Dockerfile
index ade1634..08712e3 100644
--- a/swift_latest/Dockerfile
+++ b/swift_latest/Dockerfile
@@ -1,6 +1,6 @@
 FROM ubuntu:16.04
-LABEL maintainer="Haris Amin <[email protected]>"
-LABEL Description="Docker Container for the Apple's Swift programming language"
+LABEL maintainer="Swift Infrastructure <[email protected]>"
+LABEL Description="Docker Container for the Swift programming language"
 
 # Install related packages and set LLVM 3.8 as the compiler
 RUN apt-get -q update && \
@@ -24,8 +24,8 @@ RUN apt-get -q update && \
 
 # Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
 ARG SWIFT_PLATFORM=ubuntu16.04
-ARG SWIFT_BRANCH=swift-4.2.1-release
-ARG SWIFT_VERSION=swift-4.2.1-RELEASE
+ARG SWIFT_BRANCH=swift-4.2.2-release
+ARG SWIFT_VERSION=swift-4.2.2-RELEASE
 
 ENV SWIFT_PLATFORM=$SWIFT_PLATFORM \
     SWIFT_BRANCH=$SWIFT_BRANCH \
@@ -37,22 +37,8 @@ RUN SWIFT_URL=https://swift.org/builds/$SWIFT_BRANCH/$(echo "$SWIFT_PLATFORM" |
     && curl -fSsL $SWIFT_URL.sig -o swift.tar.gz.sig \
     && export GNUPGHOME="$(mktemp -d)" \
     && set -e; \
-        for key in \
-      # pub   rsa4096 2017-11-07 [SC] [expires: 2019-11-07]
-      # 8513444E2DA36B7C1659AF4D7638F1FB2B2B08C4
-      # uid           [ unknown] Swift Automatic Signing Key #2 <[email protected]>
-          8513444E2DA36B7C1659AF4D7638F1FB2B2B08C4 \
-      # pub   4096R/91D306C6 2016-05-31 [expires: 2018-05-31]
-      #       Key fingerprint = A3BA FD35 56A5 9079 C068  94BD 63BC 1CFE 91D3 06C6
-      # uid                  Swift 3.x Release Signing Key <[email protected]>
-          A3BAFD3556A59079C06894BD63BC1CFE91D306C6 \
-      # pub   4096R/71E1B235 2016-05-31 [expires: 2019-06-14]
-      #       Key fingerprint = 5E4D F843 FB06 5D7F 7E24  FBA2 EF54 30F0 71E1 B235
-      # uid                  Swift 4.x Release Signing Key <[email protected]>          
-          5E4DF843FB065D7F7E24FBA2EF5430F071E1B235 \
-        ; do \
-          gpg --quiet --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
-        done \
+    curl -fSsL https://swift.org/keys/all-keys.asc | \
+    gpg --import - \
     && gpg --batch --verify --quiet swift.tar.gz.sig swift.tar.gz \
     && tar -xzf swift.tar.gz --directory / --strip-components=1 \
     && rm -r "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \

@yosifkit
Copy link
Member

yosifkit commented Feb 5, 2019

It is not recommended to download a file of PGP keys; it is not a reproducible step and does not provide the same guarantees and transparency that a list of full fingerprints does.

@shahmishal
Copy link
Contributor Author

We have been seeing lots of reliability issues with keyserver (network), would it be ok to include keys file in the repository?

Also, is it ok to release this image and we will work on updating Dockerfile with the keys file from the repository?

@tianon
Copy link
Member

tianon commented Feb 5, 2019

See #4252, docker-library/php#666, https://github.com/tianon/pgp-happy-eyeballs / https://github.com/tianon/pgp-happy-eyeballs/blob/master/hack-my-builds.sh for how we combat keyserver flakiness on the official build servers -- perhaps a similar approach could work for your CI?

Adding the KEYS file to the repo is definitely not something we'd be thrilled about, since then it creates a lot of noise during review (since we effectively get the full diff of all the key content every time anything changes there), and it makes it a lot harder for users to verify the keys (see also #3312 (comment) and rakudo/docker#21 (comment)).

@shahmishal
Copy link
Contributor Author

@yosifkit @tianon Thanks! For now, I have reverted the PGP change.

@yosifkit
Copy link
Member

yosifkit commented Feb 6, 2019

Diff:
diff --git a/_bashbrew-list b/_bashbrew-list
index 12a01af..e4cabab 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -8,4 +8,5 @@ swift:4.1
 swift:4.1.3
 swift:4.2
 swift:4.2.1
+swift:4.2.2
 swift:latest
diff --git a/swift_latest/Dockerfile b/swift_latest/Dockerfile
index ade1634..5af541f 100644
--- a/swift_latest/Dockerfile
+++ b/swift_latest/Dockerfile
@@ -1,6 +1,6 @@
 FROM ubuntu:16.04
-LABEL maintainer="Haris Amin <[email protected]>"
-LABEL Description="Docker Container for the Apple's Swift programming language"
+LABEL maintainer="Swift Infrastructure <[email protected]>"
+LABEL Description="Docker Container for the Swift programming language"
 
 # Install related packages and set LLVM 3.8 as the compiler
 RUN apt-get -q update && \
@@ -24,8 +24,8 @@ RUN apt-get -q update && \
 
 # Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
 ARG SWIFT_PLATFORM=ubuntu16.04
-ARG SWIFT_BRANCH=swift-4.2.1-release
-ARG SWIFT_VERSION=swift-4.2.1-RELEASE
+ARG SWIFT_BRANCH=swift-4.2.2-release
+ARG SWIFT_VERSION=swift-4.2.2-RELEASE
 
 ENV SWIFT_PLATFORM=$SWIFT_PLATFORM \
     SWIFT_BRANCH=$SWIFT_BRANCH \

Build test of #5395; 63ebf54; amd64 (swift):

$ bashbrew build swift:4.2.2
Building bashbrew/cache:5f0347b6f8667edbd8f5da6f6e0eb50390915ee7ef13d6329aae2c205837945a (swift:4.2.2)
Tagging swift:4.2.2
Tagging swift:4.2.1
Tagging swift:4.2
Tagging swift:4
Tagging swift:latest

$ test/run.sh swift:4.2.2
testing swift:4.2.2
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'swift-hello-world' [5/5]...passed


$ bashbrew build swift:4.1.3
Using bashbrew/cache:d25e71e67b9256fe4ee5c9d13f6137b60ce70c9d5fc6e7169c011d61bef645c7 (swift:4.1.3)
Tagging swift:4.1.3
Tagging swift:4.1

$ test/run.sh swift:4.1.3
testing swift:4.1.3
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'swift-hello-world' [5/5]...passed


$ bashbrew build swift:4.0.3
Using bashbrew/cache:ca6ac9363934c9e863c55aaa74282719548668fde2ef659ece8fe2ef53321be2 (swift:4.0.3)
Tagging swift:4.0.3
Tagging swift:4.0

$ test/run.sh swift:4.0.3
testing swift:4.0.3
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'swift-hello-world' [5/5]...passed


$ bashbrew build swift:3.1.1
Using bashbrew/cache:454b247d03e721ec378cadde1dfe24ad8885ee6e0c8eb4b0ab5646dde63c9035 (swift:3.1.1)
Tagging swift:3.1.1
Tagging swift:3.1
Tagging swift:3

$ test/run.sh swift:3.1.1
testing swift:3.1.1
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'swift-hello-world' [5/5]...passed

@yosifkit yosifkit merged commit 773c341 into docker-library:master Feb 6, 2019
@shahmishal shahmishal deleted the update-swift-4.2.2 branch February 6, 2019 21:14
@shahmishal
Copy link
Contributor Author

Thanks!

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

Successfully merging this pull request may close these issues.

4 participants