https://blue-build.org/ logo
why when installing rust build fails
# questions
u
sudo: unable to send audit message: Operation not permitted Running snippet curl --proto =https --tlsv1.2 -sSf https://sh.rustup.rs | sh info: downloading installer rustup: Unable to run interactively. Run with -y to accept defaults, --help for additional options Error: building at STEP "RUN --mount=type=bind,from=stage-files,src=/files,dst=/tmp/files,rw --mount=type=bind,from=stage-modules,src=/modules,dst=/tmp/modules,rw --mount=type=bind,from=ghcr.io/blue-build/cli:4f235be4f7ec2aa1a462565f4ba797554ac62edb-build-scripts,src=/scripts/,dst=/tmp/scripts/ --mount=type=cache,dst=/var/cache/rpm-ostree,id=rpm-ostree-cache-meme-os-latest,sharing=locked /tmp/scripts/run_module.sh 'script' '{"type":"script","snippets":["curl -L https://urbit.org/install/linux-x86_64/latest | sudo tar xzk --transform='s/.*/urbit/g' -C /usr/bin && sudo chmod +x /usr/bin/urbit","curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"],"scripts":["initramfs.sh","remove-wp.sh"]}' && ostree container commit": while running runtime: exit status 1 ERROR => Failed to build oci-archive:/etc/bluebuild/meme-os.tar.gz
a
message has been deleted
u
i should use this? curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
x
it won't install rust though, just rustup, which is used to manage the rust environment
u
i want rust too
x
it will install to your home directory afaik so it wouldn't work in the container build anyway
u
the script that i wrote?
x
if you just want to bake in the latest version of rust you can also install it from fedora https://packages.fedoraproject.org/pkgs/rust/rust/
but that is not recommended because you might need different versions of rust, and when installing it from fedora repos it will only update when your image is updated
u
aah makes sense
x
i don't know of any script you wrote
u
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- -y
snippet
x
oh, yeah, that, the snippet from the rust website, yeah
u
itll install to home dir?
i dont think so
x
that's meant for local usage yeah
u
so that should work
better than using fedora's
x
not in the image, but should work better than using fedora's yeah
you just need to run it locally and not in your image if you want to use it
u
wut
x
Copy code
❯ ls .cargo/bin/
.rwxr-xr-x@ 4.5M e  8 Aug 19:01  bluebuild
.rwxr-xr-x@  15M e 20 May 19:37  cargo
.rwxr-xr-x@  15M e 20 May 19:37  cargo-clippy
.rwxr-xr-x@  15M e 20 May 19:37  cargo-fmt
.rwxr-xr-x@  15M e 20 May 19:37  cargo-miri
.rwxr-xr-x@ 4.9M e 25 Jul 14:09  cargo-watch
.rwxr-xr-x@  15M e 20 May 19:37  clippy-driver
.rwxr-xr-x@  15M e 20 May 19:37  rls
.rwxr-xr-x@  15M e 20 May 19:37  rust-analyzer
.rwxr-xr-x@  15M e 20 May 19:37  rust-gdb
.rwxr-xr-x@  15M e 20 May 19:37  rust-gdbgui
.rwxr-xr-x@  15M e 20 May 19:37  rust-lldb
.rwxr-xr-x@  15M e 20 May 19:37  rustc
.rwxr-xr-x@  15M e 20 May 19:37  rustdoc
.rwxr-xr-x@  15M e 20 May 19:37  rustfmt
.rwxr-xr-x@ 3.8M e 25 Jun 13:09  rustlings
.rwxr-xr-x@  15M e 20 May 19:37  rustup
.rwxr-xr-x@ 826k e 25 Jul 12:44  rusty-hook
this is from rustup
in my home directory
u
i want rust installed in my image
damn
so i cant have rust preisntalled in my image
x
rust and cargo are in the fedora repos
you can install them, but then you can't control which version you get
unlike with rustup
u
but u said those will install in home, so itll fail cuz home doesnt exist in build time
x
no, the fedora repos will install systemwide
rustup will install in home
apologies if i was confusing
u
i see
so it is better to install rustup
x
the only problem with fedora repos is that you're locked on the fedora version of rust and can't use different versions
so yes IMO it is better to install with rustup
u
from fedora
alright
all because this snippet installs in home right? curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- -y
just asking why
i got u tho
x
yeah, that's the usual way to install rust, and works in basically any local environment, because it just installs it in the home directory
but when building custom images you can't do that
u
so i cant install zig too, it is in fedora's rpm repo but itll also stick to the image's version
i cant use zig's snippet
x
IMO it is better to manually install developer tools the "proper way" than to pack them all in your custom image, but if you really want rust or anything like that in your image then you can use the fedora repos
u
i see
or i can just install brew, and in yafti.yml ask them if they want rust
sounds good?
x
yeah, sounds good
u
installed directly where they want it curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- -y
ill just do that, makes the image less bloated
some ppl might not want zig
thanks, dont close this discussion
i wanna reread some stuff
ill close it
x
AFAIK it's not possible to close these discussions, just mark as solved, but it is still readable and you can still message in it
but sure
u
ah good haha
could be only op
who can do that
x
oh, i'm the admin so i can do that too
i just wasn't aware of that
haven't had to press that button yet
u
lmao fair
thank you it was helpful
g
Yeah you'll find it in
~/.cargo/
You may also run into a problem with installing
ld
which is needed for rust development. I used the rustup way to install the compiler and cargo, but did not bake it into my image
If you run into a situation where it can't find
ld
, you can always layer on
mold
using
rpm-ostree install -Ay mold
while you're booted
The next best method would be to spin up a distrobox container when you want to work on rust
u
aaah I see thanks man
g
Yeah no prob. Spent a lot of time trying to get my dev env up
u
ye tbh sticking with yafti as an option to install for each dev is better
some devs won't want their os to be bloated with stuff
like zig for example and other stuff