From 03599b2acffdf589c66581a6efb4ca7ab5ecd79b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helge=20He=C3=9F?= Date: Wed, 17 Feb 2021 23:59:52 +0100 Subject: [PATCH 1/2] Setup a swift.conf ld.so config In the main files. --- 5.3/ubuntu/16.04/Dockerfile | 6 ++++++ 5.3/ubuntu/18.04/Dockerfile | 6 ++++++ 5.3/ubuntu/20.04/Dockerfile | 5 +++++ nightly-5.3/ubuntu/16.04/Dockerfile | 6 ++++++ nightly-5.3/ubuntu/18.04/Dockerfile | 6 ++++++ nightly-5.3/ubuntu/20.04/Dockerfile | 6 ++++++ nightly-5.4/ubuntu/16.04/Dockerfile | 6 ++++++ nightly-5.4/ubuntu/18.04/Dockerfile | 6 ++++++ nightly-5.4/ubuntu/20.04/Dockerfile | 6 ++++++ nightly-main/ubuntu/16.04/Dockerfile | 6 ++++++ nightly-main/ubuntu/18.04/Dockerfile | 6 ++++++ nightly-main/ubuntu/20.04/Dockerfile | 6 ++++++ 12 files changed, 71 insertions(+) diff --git a/5.3/ubuntu/16.04/Dockerfile b/5.3/ubuntu/16.04/Dockerfile index 687b257d..128c266e 100644 --- a/5.3/ubuntu/16.04/Dockerfile +++ b/5.3/ubuntu/16.04/Dockerfile @@ -55,5 +55,11 @@ RUN set -e; \ && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \ && apt-get purge --auto-remove -y curl + +RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\ + ldconfig" + # Print Installed Swift Version RUN swift --version diff --git a/5.3/ubuntu/18.04/Dockerfile b/5.3/ubuntu/18.04/Dockerfile index f537a327..5c142fe1 100644 --- a/5.3/ubuntu/18.04/Dockerfile +++ b/5.3/ubuntu/18.04/Dockerfile @@ -55,5 +55,11 @@ RUN set -e; \ && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \ && apt-get purge --auto-remove -y curl + +RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\ + ldconfig" + # Print Installed Swift Version RUN swift --version diff --git a/5.3/ubuntu/20.04/Dockerfile b/5.3/ubuntu/20.04/Dockerfile index 53f3466d..b113c76c 100644 --- a/5.3/ubuntu/20.04/Dockerfile +++ b/5.3/ubuntu/20.04/Dockerfile @@ -56,5 +56,10 @@ RUN set -e; \ && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \ && apt-get purge --auto-remove -y curl +RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\ + ldconfig" + # Print Installed Swift Version RUN swift --version diff --git a/nightly-5.3/ubuntu/16.04/Dockerfile b/nightly-5.3/ubuntu/16.04/Dockerfile index dc1ef7d2..74a23b33 100644 --- a/nightly-5.3/ubuntu/16.04/Dockerfile +++ b/nightly-5.3/ubuntu/16.04/Dockerfile @@ -60,6 +60,12 @@ RUN set -e; \ && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ && apt-get purge --auto-remove -y curl + +RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\ + ldconfig" + # Print Installed Swift Version RUN swift --version diff --git a/nightly-5.3/ubuntu/18.04/Dockerfile b/nightly-5.3/ubuntu/18.04/Dockerfile index ee02ab40..11247276 100644 --- a/nightly-5.3/ubuntu/18.04/Dockerfile +++ b/nightly-5.3/ubuntu/18.04/Dockerfile @@ -60,6 +60,12 @@ RUN set -e; \ && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ && apt-get purge --auto-remove -y curl + +RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\ + ldconfig" + # Print Installed Swift Version RUN swift --version diff --git a/nightly-5.3/ubuntu/20.04/Dockerfile b/nightly-5.3/ubuntu/20.04/Dockerfile index d032757b..02c24877 100644 --- a/nightly-5.3/ubuntu/20.04/Dockerfile +++ b/nightly-5.3/ubuntu/20.04/Dockerfile @@ -61,6 +61,12 @@ RUN set -e; \ && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ && apt-get purge --auto-remove -y curl + +RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\ + ldconfig" + # Print Installed Swift Version RUN swift --version diff --git a/nightly-5.4/ubuntu/16.04/Dockerfile b/nightly-5.4/ubuntu/16.04/Dockerfile index c39fc84a..f5ca92d2 100644 --- a/nightly-5.4/ubuntu/16.04/Dockerfile +++ b/nightly-5.4/ubuntu/16.04/Dockerfile @@ -60,6 +60,12 @@ RUN set -e; \ && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ && apt-get purge --auto-remove -y curl + +RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\ + ldconfig" + # Print Installed Swift Version RUN swift --version diff --git a/nightly-5.4/ubuntu/18.04/Dockerfile b/nightly-5.4/ubuntu/18.04/Dockerfile index 4f1be900..3c7cb650 100644 --- a/nightly-5.4/ubuntu/18.04/Dockerfile +++ b/nightly-5.4/ubuntu/18.04/Dockerfile @@ -60,6 +60,12 @@ RUN set -e; \ && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ && apt-get purge --auto-remove -y curl + +RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\ + ldconfig" + # Print Installed Swift Version RUN swift --version diff --git a/nightly-5.4/ubuntu/20.04/Dockerfile b/nightly-5.4/ubuntu/20.04/Dockerfile index c327adeb..800f5ef8 100644 --- a/nightly-5.4/ubuntu/20.04/Dockerfile +++ b/nightly-5.4/ubuntu/20.04/Dockerfile @@ -61,6 +61,12 @@ RUN set -e; \ && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ && apt-get purge --auto-remove -y curl + +RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\ + ldconfig" + # Print Installed Swift Version RUN swift --version diff --git a/nightly-main/ubuntu/16.04/Dockerfile b/nightly-main/ubuntu/16.04/Dockerfile index 339e5efe..801b257f 100644 --- a/nightly-main/ubuntu/16.04/Dockerfile +++ b/nightly-main/ubuntu/16.04/Dockerfile @@ -59,6 +59,12 @@ RUN set -e; \ && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ && apt-get purge --auto-remove -y curl + +RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\ + ldconfig" + # Print Installed Swift Version RUN swift --version diff --git a/nightly-main/ubuntu/18.04/Dockerfile b/nightly-main/ubuntu/18.04/Dockerfile index 0593b7fd..779d4155 100644 --- a/nightly-main/ubuntu/18.04/Dockerfile +++ b/nightly-main/ubuntu/18.04/Dockerfile @@ -59,6 +59,12 @@ RUN set -e; \ && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ && apt-get purge --auto-remove -y curl + +RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\ + ldconfig" + # Print Installed Swift Version RUN swift --version diff --git a/nightly-main/ubuntu/20.04/Dockerfile b/nightly-main/ubuntu/20.04/Dockerfile index 1a6eb1bc..907e994d 100644 --- a/nightly-main/ubuntu/20.04/Dockerfile +++ b/nightly-main/ubuntu/20.04/Dockerfile @@ -63,6 +63,12 @@ RUN set -e; \ && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ && apt-get purge --auto-remove -y curl + +RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\ + ldconfig" + # Print Installed Swift Version RUN swift --version From f0c3555da0a82286a9f7e07feae0838528293a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helge=20He=C3=9F?= Date: Thu, 18 Feb 2021 00:03:35 +0100 Subject: [PATCH 2/2] Also add ld.so config to mainstream slim variants ... --- 5.3/ubuntu/16.04/slim/Dockerfile | 5 +++++ 5.3/ubuntu/18.04/slim/Dockerfile | 5 +++++ 5.3/ubuntu/20.04/slim/Dockerfile | 8 +++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/5.3/ubuntu/16.04/slim/Dockerfile b/5.3/ubuntu/16.04/slim/Dockerfile index a5cc9676..6835cca0 100644 --- a/5.3/ubuntu/16.04/slim/Dockerfile +++ b/5.3/ubuntu/16.04/slim/Dockerfile @@ -44,3 +44,8 @@ RUN set -e; \ && chmod -R o+r /usr/lib/swift \ && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \ && apt-get purge --auto-remove -y curl + +RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\ + ldconfig" diff --git a/5.3/ubuntu/18.04/slim/Dockerfile b/5.3/ubuntu/18.04/slim/Dockerfile index 65d3a7d3..91578cdc 100644 --- a/5.3/ubuntu/18.04/slim/Dockerfile +++ b/5.3/ubuntu/18.04/slim/Dockerfile @@ -44,3 +44,8 @@ RUN set -e; \ && chmod -R o+r /usr/lib/swift \ && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \ && apt-get purge --auto-remove -y curl gnupg + +RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\ + ldconfig" diff --git a/5.3/ubuntu/20.04/slim/Dockerfile b/5.3/ubuntu/20.04/slim/Dockerfile index 4494c859..e38adabc 100644 --- a/5.3/ubuntu/20.04/slim/Dockerfile +++ b/5.3/ubuntu/20.04/slim/Dockerfile @@ -42,4 +42,10 @@ RUN set -e; \ && tar -xzf swift.tar.gz --directory / --strip-components=1 $SWIFT_VERSION-$SWIFT_PLATFORM/usr/lib/swift/linux \ && chmod -R o+r /usr/lib/swift \ && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \ - && apt-get purge --auto-remove -y curl gnupg \ No newline at end of file + && apt-get purge --auto-remove -y curl gnupg + +RUN bash -c "echo '/usr/lib/swift/linux' > /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/clang/lib/linux' >> /etc/ld.so.conf.d/swift.conf;\ + echo '/usr/lib/swift/pm' >> /etc/ld.so.conf.d/swift.conf;\ + ldconfig" + \ No newline at end of file