* [PATCH] Install recent rustc in Debian stable
@ 2024-08-26 20:56 Marc Poulhiès
2024-08-27 7:08 ` Marc
0 siblings, 1 reply; 6+ messages in thread
From: Marc Poulhiès @ 2024-08-26 20:56 UTC (permalink / raw)
To: buildbot; +Cc: Marc Poulhiès
Debian stable container is used for building all GCC frontends, except
for rust (gccrs) because Debian's rustc is too old for the few
dependencies the frontend has.
Installing a more recent rustc allows the building of the
frontend (until it can self-host).
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
---
builder/containers/Containerfile-debian-stable | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/builder/containers/Containerfile-debian-stable b/builder/containers/Containerfile-debian-stable
index b2e7614..9f77599 100644
--- a/builder/containers/Containerfile-debian-stable
+++ b/builder/containers/Containerfile-debian-stable
@@ -39,4 +39,10 @@ RUN wget -O /home/builder/bb-start.sh \
# And now run the script
USER builder
WORKDIR /home/builder
+
+# Rust from Debian stable is too old to build the small dependencies of GCCRS
+# The project currently use 1.72.0, so install and use the same.
+RUN (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0 --no-modify-path)
+ENV PATH="/home/builder/.cargo/bin:${PATH}"
+
ENTRYPOINT /home/builder/bb-start.sh
--
2.42.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Install recent rustc in Debian stable
2024-08-26 20:56 [PATCH] Install recent rustc in Debian stable Marc Poulhiès
@ 2024-08-27 7:08 ` Marc
2024-08-27 9:36 ` Mark Wielaard
2024-08-28 11:05 ` [PATCH] " Frank Ch. Eigler
0 siblings, 2 replies; 6+ messages in thread
From: Marc @ 2024-08-27 7:08 UTC (permalink / raw)
To: buildbot
Marc Poulhiès <dkm@kataplop.net> writes:
> +# Rust from Debian stable is too old to build the small dependencies of GCCRS
> +# The project currently use 1.72.0, so install and use the same.
> +RUN (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0 --no-modify-path)
"someone" already raised a possible issue with this curl|sh install
method.
I don't have strong feeling about that. I can also download the shell
script and execute it. Or follow another install method.
FWIW, it's the recommended way of using rustup:
https://rustup.rs/
Let me know if you'd prefer I change this.
Also, I recalled that there's already a gccrust builder, so there must
be a container with a recent enough rustc: maybe the gcc-all could use
the same container? I didn't find the info last night.
Marc
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Install recent rustc in Debian stable
2024-08-27 7:08 ` Marc
@ 2024-08-27 9:36 ` Mark Wielaard
2024-08-28 8:02 ` [PATCH v2] " Marc Poulhiès
2024-08-28 11:05 ` [PATCH] " Frank Ch. Eigler
1 sibling, 1 reply; 6+ messages in thread
From: Mark Wielaard @ 2024-08-27 9:36 UTC (permalink / raw)
To: Marc; +Cc: buildbot
Hi Marc,
On Tue, Aug 27, 2024 at 09:08:24AM +0200, Marc wrote:
> Marc Poulhiès <dkm@kataplop.net> writes:
>
> > +# Rust from Debian stable is too old to build the small dependencies of GCCRS
> > +# The project currently use 1.72.0, so install and use the same.
> > +RUN (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0 --no-modify-path)
>
> "someone" already raised a possible issue with this curl|sh install
> method.
It might just be a "feeling", we do trust the distro image and package
repositories after all. But just piping a shell script from a website
into the shell does feel a little iffy.
> I don't have strong feeling about that. I can also download the shell
> script and execute it. Or follow another install method.
The script seems to mainly be to detect which architecture/distro you
are running and which tools are installed to download another
downloader binary rust-init. It then tries to execute this binary to
download other binaries (cargo, clippy, rust-docs, rust-std, rustc and
rustfmt).
Since we are after a specific version, could we try to fetch that one directly?
https://static.rust-lang.org/rustup/archive/1.27.1/x86_64-unknown-linux-gnu/rustup-init
And then check against the expected sha256sum?
Then at least we know we got the "correct" downloader.
> FWIW, it's the recommended way of using rustup:
>
> https://rustup.rs/
>
> Let me know if you'd prefer I change this.
Let me know what you think of the above. Paranoid?
Also, maybe we should create a new container, just for a full gcc
(with rust) builder to keep the default Debian container smaller (we
can then also drop gdc and gnat).
> Also, I recalled that there's already a gccrust builder, so there must
> be a container with a recent enough rustc: maybe the gcc-all could use
> the same container? I didn't find the info last night.
There are a couple of container and non-container builders that try to
build gccrust (non-gcc-tree):
https://builder.sourceware.org/buildbot/#/builders?tags=gccrust
Most currently fail because they don't have a recent cargo installed.
Lets look at those (and switch them to the gcc tree?) after we got
this debian container build going.
Cheers,
Mark
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] Install recent rustc in Debian stable
2024-08-27 9:36 ` Mark Wielaard
@ 2024-08-28 8:02 ` Marc Poulhiès
2024-09-01 15:33 ` Mark Wielaard
0 siblings, 1 reply; 6+ messages in thread
From: Marc Poulhiès @ 2024-08-28 8:02 UTC (permalink / raw)
To: mark; +Cc: buildbot, Marc Poulhiès
Debian stable container is used for building all GCC frontends, except
for rust (gccrs) because Debian's rustc is too old for the few
dependencies the frontend has.
Installing a more recent rustc allows the building of the
frontend (until it can self-host).
Include the signatures for both archive and the "Rust Language (Tag and
Release Signing Key) <rust-key@rust-lang.org>" key.
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
---
Hello Mark,
Here's a new version of my patch. I've tried to take into account all comments
(from here and IRC). It now downloads the compiler (rustc) and libstd archives
and check their signature against the local (checked-in) .asc files + rust gpg
key. Not really sure how to handle the .asc and gpg key. They are currently in
'rustc-aux/' subdir. Let me know if there's something better to do here.
Marc
.../containers/Containerfile-debian-stable | 18 ++++
...1.72.0-x86_64-unknown-linux-gnu.tar.gz.asc | 16 ++++
.../containers/rustc-aux/rust-key.gpg.ascii | 86 +++++++++++++++++++
...1.72.0-x86_64-unknown-linux-gnu.tar.gz.asc | 16 ++++
4 files changed, 136 insertions(+)
create mode 100644 builder/containers/rustc-aux/rust-1.72.0-x86_64-unknown-linux-gnu.tar.gz.asc
create mode 100644 builder/containers/rustc-aux/rust-key.gpg.ascii
create mode 100644 builder/containers/rustc-aux/rust-std-1.72.0-x86_64-unknown-linux-gnu.tar.gz.asc
diff --git a/builder/containers/Containerfile-debian-stable b/builder/containers/Containerfile-debian-stable
index b2e7614..bfc2fa8 100644
--- a/builder/containers/Containerfile-debian-stable
+++ b/builder/containers/Containerfile-debian-stable
@@ -39,4 +39,22 @@ RUN wget -O /home/builder/bb-start.sh \
# And now run the script
USER builder
WORKDIR /home/builder
+
+# Rust from Debian stable is too old to build the small dependencies of GCCRS
+# The project currently use 1.72.0, so install and use the same.
+RUN mkdir -p /home/builder/rustc-install
+RUN cd /home/builder/rustc-install && wget https://static.rust-lang.org/dist/rust-1.72.0-x86_64-unknown-linux-gnu.tar.gz
+RUN cd /home/builder/rustc-install && wget https://static.rust-lang.org/dist/rust-std-1.72.0-x86_64-unknown-linux-gnu.tar.gz
+COPY rustc-aux/* /home/builder/rustc-install
+RUN gpg --import /home/builder/rustc-install/rust-key.gpg.ascii && \
+ gpg --verify /home/builder/rustc-install/rust-1.72.0-x86_64-unknown-linux-gnu.tar.gz.asc && \
+ gpg --verify /home/builder/rustc-install/rust-std-1.72.0-x86_64-unknown-linux-gnu.tar.gz.asc
+
+RUN cd /home/builder/rustc-install/ && \
+ tar xf rust-1.72.0-x86_64-unknown-linux-gnu.tar.gz && \
+ tar xf rust-std-1.72.0-x86_64-unknown-linux-gnu.tar.gz && \
+ cd rust-1.72.0-x86_64-unknown-linux-gnu && ./install.sh --prefix=/home/builder/rust-install && \
+ cd ../rust-std-1.72.0-x86_64-unknown-linux-gnu && ./install.sh --prefix=/home/builder/rust-install
+ENV PATH="/home/builder/rust-install/bin:${PATH}"
+
ENTRYPOINT /home/builder/bb-start.sh
diff --git a/builder/containers/rustc-aux/rust-1.72.0-x86_64-unknown-linux-gnu.tar.gz.asc b/builder/containers/rustc-aux/rust-1.72.0-x86_64-unknown-linux-gnu.tar.gz.asc
new file mode 100644
index 0000000..3aae063
--- /dev/null
+++ b/builder/containers/rustc-aux/rust-1.72.0-x86_64-unknown-linux-gnu.tar.gz.asc
@@ -0,0 +1,16 @@
+-----BEGIN PGP SIGNATURE-----
+
+wsFcBAABCgAQBQJk51mxCRCFq5bm+hvl/gAAY3sP+gOsRrgWYu6pplEbiGYue+0y
+DjqY8P2PDLGWIILDqV/ekVvwP+K9kVVW4LXHmGPfTNdOodVNArNRjwHUUYcTGt1K
+us0jRBvtE/igUAVkLYi8n5+Tveh47H0cfuMf4SEmsqTwLcIlJwvC7OsyP4re8imt
+oMewntwDQauCuylCLo62iRJXuFu9mfK8Q3sZSvJwMZJFIeHdT7b3ZNjzmtY/5qx0
+014FtxCbI4RTaaQBw0cvyCi/0cegL2P0R7UymGJsf9Y3oQWjvcuM7cDKsYAxXwzo
+RjQPopgkQZeCO4SA+GOfnfazR+U6lDDjHjCWBC2DiixzniFQsKMUhFnSa+Z6FZ4Y
+bqb5J40o5frhGo2cBTjHomwSlzKi1aenA7raFZJGdBlySMYcd2N7N6u8ZeIL/WVE
+RDjvJyEOlZlFNxszlll4+H2lCpwia2nH/dhyk8LbGBCdTTRhzhQfnOewdEM4vKGI
+1fyByKuzc6LlZGj0nnErKeNLpoEH4oRSWVsGLgETm/1ebCTtzYC4cklh9Ebtyv2F
+QDEeqAeOxJ4b/CGEJcvcYxuGvOIj9GtdOEFlMFhyUorOf2jXtPtvmIfjZkWMTHNs
+JJXgKgYXUvqdofUjn2LZBt1kwKFVqnWbQqatGTTwIzwa3A2k8ntwe5AvDBkbg3Qz
+XYE/1FG0TNkt0X3TVwFe
+=XduK
+-----END PGP SIGNATURE-----
diff --git a/builder/containers/rustc-aux/rust-key.gpg.ascii b/builder/containers/rustc-aux/rust-key.gpg.ascii
new file mode 100644
index 0000000..93e2282
--- /dev/null
+++ b/builder/containers/rustc-aux/rust-key.gpg.ascii
@@ -0,0 +1,86 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1
+
+mQINBFJEwMkBEADlPACa2K7reD4x5zd8afKx75QYKmxqZwywRbgeICeD4bKiQoJZ
+dUjmn1LgrGaXuBMKXJQhyA34e/1YZel/8et+HPE5XpljBfNY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iThUJhkCYvJ0R3xH3kPnPlGXDW49E9R8C2umRC3cYOL4U9dOQ1
+5hSlYydF5urFGCLIvodtE9q80uhpyt8L/5jj9tbwZWv6JLnfBquZSnCGqFZRfXlb
+Jphk9+CBQWwiZSRLZRzqQ4ffl4xyLuolx01PMaatkQbRaw/+JpgRNlurKQ0PsTrO
+8tztO/tpBBj/huc2DGkSwEWvkfWElS5RLDKdoMVs/j5CLYUJzZVikUJRm7m7b+OA
+P3W1nbDhuID+XV1CSBmGifQwpoPTys21stTIGLgznJrIfE5moFviOLqD/LrcYlsq
+CQg0yleu7SjOs//8dM3mC2FyLaE/dCZ8l2DCLhHw0+ynyRAvSK6aGCmZz6jMjmYF
+MXgiy7zESksMnVFMulIJJhR3eB0wx2GitibjY/ZhQ7tD3i0yy9ILR07dFz4pgkVM
+afxpVR7fmrMZ0t+yENd+9qzyAZs0ksxORoc2ze90SCx2jwEX/3K+m4I0hP2H/w5W
+gqdvuRLiqf+4BGW4zqWkLLlNIe/okt0r82SwHtDN0Ui1asmZTGj6sm8SXtwx+5cE
+38MttWqjDiibQOSthRVcETByRYM8KcjYSUCi4PoBc3NpDONkFbZm6XofR/f5mTcl
+2jDw6fIeVc4Hd1jBGajNzEqtneqqbdAkPQaLsuD2TMkQfTDJfE/IljwjrhDa9Mi+
+odtnMWq8vlwOZZ24/8/BNK5qXuCYL67O7AJB4ZQ6BT+g4z96iRLbupzu/XJyXkQF
+rOY/Ghegvn7fDrnt2KC9MpgeFBXzUp+k5rzUdF8jbCx5apVjA1sWXB9Kh3L+DUwF
+Mve696B5tlHyc1KxjHR6w9GRsh4=
+=5FXw
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/builder/containers/rustc-aux/rust-std-1.72.0-x86_64-unknown-linux-gnu.tar.gz.asc b/builder/containers/rustc-aux/rust-std-1.72.0-x86_64-unknown-linux-gnu.tar.gz.asc
new file mode 100644
index 0000000..7403310
--- /dev/null
+++ b/builder/containers/rustc-aux/rust-std-1.72.0-x86_64-unknown-linux-gnu.tar.gz.asc
@@ -0,0 +1,16 @@
+-----BEGIN PGP SIGNATURE-----
+
+wsFcBAABCgAQBQJk51muCRCFq5bm+hvl/gAAH/MQAKmUHdPkREc4WyBNiNC5Rkw/
+BwqAw8qyxTVfPBAFqPmQHClCprplRW5wyOdX9b5hF33mCsuQLysK0bnrXX+C04qs
+RjSQPur6ea7Z2mpPceCdSQAtSzP3I56+j12WiRgdrTyF2Oq4LmYT4NrdgHevcCS6
+lFTinzjibxFlhWk3d2f6d6/2sZnXmm4Rd+TTnb94DpkK+lRs29/W7STFz+oxDyDr
+Wh2fqeuZjxKzQ/RXS4KqJivX271V68OFPdYY4ps/HeKRWhtuQr/ShMaQUaQVVcOf
+1MPE+Fip0/sLywaYB6Ooc5C7XBQiVdXEljAuSVuzwGum5C20+0FIjjjk+EnCY/qU
+S0BVInnRBEE7iNlCYyBKz7DH/fb66vDBKdEWbtsIgKssv8CZx+I+h8GAJ4Fe9nha
+1qxTFSqImDgsbozk7Ie/z2wp57d+S+kxk10QubAPIE/Qp6Xdu+G7wJEJ6bXRxMRJ
+aR+oxDVPSu8PvUoj6ffOblNYqFbcC4RpCRS5Mr8kZfPCaJnnF7dHgT773yLfRhiw
+FpffSIgOuz02YJ91ccN8ij77Ty38ek7lqh5JSBTPz9bYXnfanW9KMrEXNyNRubBk
+RTpmY4MWP+7urGMbYIkXHZyBo/zvKUmHT4+AUliLb+5MbxyuMlFpkRk/5HI604KH
+eV6rq8O4LQL57UqKWRJg
+=bTDK
+-----END PGP SIGNATURE-----
--
2.42.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Install recent rustc in Debian stable
2024-08-27 7:08 ` Marc
2024-08-27 9:36 ` Mark Wielaard
@ 2024-08-28 11:05 ` Frank Ch. Eigler
1 sibling, 0 replies; 6+ messages in thread
From: Frank Ch. Eigler @ 2024-08-28 11:05 UTC (permalink / raw)
To: Marc; +Cc: buildbot
Hi -
> > +RUN (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0 --no-modify-path)
>
> "someone" already raised a possible issue with this curl|sh install
> method. [...]
> https://rustup.rs/
What a horror. We'd have no idea what actually is installed or done.
- FChE
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] Install recent rustc in Debian stable
2024-08-28 8:02 ` [PATCH v2] " Marc Poulhiès
@ 2024-09-01 15:33 ` Mark Wielaard
0 siblings, 0 replies; 6+ messages in thread
From: Mark Wielaard @ 2024-09-01 15:33 UTC (permalink / raw)
To: Marc Poulhiès; +Cc: buildbot
[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]
Hi Marc,
On Wed, Aug 28, 2024 at 10:02:38AM +0200, Marc Poulhiès wrote:
> Debian stable container is used for building all GCC frontends, except
> for rust (gccrs) because Debian's rustc is too old for the few
> dependencies the frontend has.
>
> Installing a more recent rustc allows the building of the
> frontend (until it can self-host).
>
> Include the signatures for both archive and the "Rust Language (Tag and
> Release Signing Key) <rust-key@rust-lang.org>" key.
>
> Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
> ---
>
> Here's a new version of my patch. I've tried to take into account
> all comments (from here and IRC). It now downloads the compiler
> (rustc) and libstd archives and check their signature against the
> local (checked-in) .asc files + rust gpg key. Not really sure how to
> handle the .asc and gpg key. They are currently in 'rustc-aux/'
> subdir. Let me know if there's something better to do here.
I tweaked it a little to just use the sha256 checksum (from the
.sha256 files and double checked by hand). Your solution whould have
been more generic, but we can only sent the ContainerFile itself to
the remote docker runtime. So the COPY directives only work locally,
not remotely. Hardcoding the checksums in the ContainerFile is less
generic, but does make sure we are downloading the exact expected
binaries.
Tweaked patch, as pushed, attached.
Thanks,
Mark
[-- Attachment #2: 0001-Install-recent-rustc-in-Debian-stable.patch --]
[-- Type: text/plain, Size: 2448 bytes --]
From 2eec9452c12bd307043823ad414c5fdbb78a1c30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= <dkm@kataplop.net>
Date: Wed, 28 Aug 2024 10:02:38 +0200
Subject: [PATCH] Install recent rustc in Debian stable
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Debian stable container is used for building all GCC frontends, except
for rust (gccrs) because Debian's rustc is too old for the few
dependencies the frontend has.
Installing a more recent rustc allows the building of the
frontend (until it can self-host).
Include the sha256 checksums for both archives and check that we are
downloading the expected binaries.
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
builder/containers/Containerfile-debian-stable | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/builder/containers/Containerfile-debian-stable b/builder/containers/Containerfile-debian-stable
index b2e76142c5ed..3a0e313a1e94 100644
--- a/builder/containers/Containerfile-debian-stable
+++ b/builder/containers/Containerfile-debian-stable
@@ -39,4 +39,21 @@ RUN wget -O /home/builder/bb-start.sh \
# And now run the script
USER builder
WORKDIR /home/builder
+
+# Rust from Debian stable is too old to build the small dependencies of GCCRS
+# The project currently use 1.72.0, so install and use the same.
+RUN mkdir -p /home/builder/rustc-install \
+ && cd /home/builder/rustc-install \
+ && wget https://static.rust-lang.org/dist/rust-1.72.0-x86_64-unknown-linux-gnu.tar.gz \
+ && echo "f2bbe23e685852104fd48d0e34ac981b0917e76c62cfcd6d0ac5283e4710c7b9 rust-1.72.0-x86_64-unknown-linux-gnu.tar.gz" | sha256sum --check \
+ && wget https://static.rust-lang.org/dist/rust-std-1.72.0-x86_64-unknown-linux-gnu.tar.gz \
+ && echo "89f6f6ef25e7e754940c54cc0584bfdb83e1df75019d5aa126e3fa66c2921b15 rust-std-1.72.0-x86_64-unknown-linux-gnu.tar.gz" | sha256sum --check
+
+RUN cd /home/builder/rustc-install/ && \
+ tar xf rust-1.72.0-x86_64-unknown-linux-gnu.tar.gz && \
+ tar xf rust-std-1.72.0-x86_64-unknown-linux-gnu.tar.gz && \
+ cd rust-1.72.0-x86_64-unknown-linux-gnu && ./install.sh --prefix=/home/builder/rust-install && \
+ cd ../rust-std-1.72.0-x86_64-unknown-linux-gnu && ./install.sh --prefix=/home/builder/rust-install
+ENV PATH="/home/builder/rust-install/bin:${PATH}"
+
ENTRYPOINT /home/builder/bb-start.sh
--
2.46.0
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-09-01 15:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-26 20:56 [PATCH] Install recent rustc in Debian stable Marc Poulhiès
2024-08-27 7:08 ` Marc
2024-08-27 9:36 ` Mark Wielaard
2024-08-28 8:02 ` [PATCH v2] " Marc Poulhiès
2024-09-01 15:33 ` Mark Wielaard
2024-08-28 11:05 ` [PATCH] " Frank Ch. Eigler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).