https://blue-build.org/ logo
What is the best way to install programs from sour...
# questions
b
I wanted to try the
Ly
login manager https://github.com/fairyglade/ly, but I'm not sure how I can install this since it's not like an rpm or a flatpak. Could it be a solution to make a script that will run at build-time and do the following : - install required dependencies for compilation (
zig
,
libc
...) - clone the repository - compile the programs - copy binaries and systemd file to the right folder
x
You are looking for [Stages](https://blue-build.org/reference/stages/)
b
oh, sorry, I missed this page ^^
I will take a look at it
x
Also, reading Ly's README; > Warning: You may encounter issues with SELinux on Fedora. It is recommended to add a rule for Ly as it currently does not ship one.
you may need to write a rule for SELinux
b
yes I will deal with that later
but thanks
It looks amazing 😇
g
Make sure to use the
unstable_cli
option for the github action
b
Does the
src
and
dest
option from the copy module support syntax like
/etc/ly/*.sh
?
f
no
g
Umm it supports whatever the
COPY
instruction supports
And I think it supports wildcard
b
how to do so in local with the bluebuild cli ? (I don't understand the
or using the stages feature when compiling
in the doc)
g
Right
So locally, you will need to install it from source. Do you have cargo installed?
You can install it with rustup https://rustup.rs/
b
no
g
Then you can run
cargo install --all-features blue-build
b
there was no error just using
bluebuild build
(I think it could have thrown a warning or an erro)
I can do this in a distrobox ?
g
Sure? You would still need docker to run the build
Our images aren't distrobox ready. I have an issue out for it
b
(I will have to learn rust one day)
g
You shouldn't have to know any rust to get it installed. Rustup will install all the tooling in your home dir so it's all userspace
But it's up to you
b
yes I know but I wanna try ^^
g
Rustlings is a great interactive course. @xyny 's been using it recently
b
Once I installed it, with wich command should I build my image ? (I don't see any
stages
option in the
build
command)
f
ohh, I misread
copy
module with
files
one
my bad
x
the same build command builds the stages first
b
ok
x
yeah, it's great if you alrd know the basics of programming and other compsci concepts
b
How am I supposed to start the docker daemon within distrobox ?
g
I have no clue. I have docker layered in my image
b
I should have looked for such image
g
If you installed rustup, that should be available outside distrobox
It installs into your home directory
Though you might not have the dev tools local...
Hmmm
b
indeed cargo is available in my base system
g
Well if you did a cargo install, then that should be available to you outside distrobox. It will be in
~/.cargo/bin/
So try
bluebuild build
from your native host. If you have podman it will use that if you don't have docker installed
Docker just works better
b
Nice it's running the stage part !
g
Sweet!
b
The stage tool is really overpowered !
g
Oh yeah
I use it to build the latest Helix editor build
All you need to do is make sure you copy all the files you need into the right spot in your final image
b
hence the documentation
g
Yes lol
b
Copy code
info: installed /usr/bin/ly
info: installed /etc/ly/config.ini
info: installed /etc/ly/xsetup.sh
info: installed /etc/ly/wsetup.sh
info: installed /etc/ly/lang/cat.ini
info: installed /etc/ly/lang/cs.ini
...
info: installed /etc/ly/lang/uk.ini
info: installed /etc/pam.d/ly
info: installed /usr/lib/systemd/system/ly.service
Normally my recipe will avoid to copy
/etc/ly/config.ini
and copy it with my own config in
files
g
So if this is output from something like
make install
, then those files only exist in that stage
b
The build was succesful !
g
Awesome!
b
I will try to rebase
g
Use
bluebuild switch
if you want to boot a local build
It combines `reboot`/`upgrade` into one command and will determine how to call
rpm-ostree
based on the status
b
I ran it without sudo but the command seems to run 🤔
g
Yeah, it will run certain commands with sudo so you don't have to call the main binary with sudo
It'll ask for your password when it get's to the part where it moves the tarball to the correct directory
b
nice !
g
I did this so that we're in userspace as much as possible
It's also good for podman/buildah since the container storage is separate as root. Less stuff to know to clean up
b
ok
I was wondering if it was possible to have a copy of the filesystem in another partition with write permission in order to quickly be able to make change in config in
/etc
?
g
¯\_(ツ)_/¯
b
Anyways, almost time to reboot !
g
Oh yeah there's a
--reboot
flag you can use to automatically do that for you
Don't stop your build though 😛
b
it takes time to commit ...
oh some error !
write /tmp/oci-archive.ZQgHw9vwTjdY/custom-hyprland-nvidia.tar.gz: no space left on device
what I have 900Go left ...
is there a way to set
maximize_build_space: true
in local ?
g
That's weird
You're not in a distrobox are you?
b
no
g
I've not run into that issue before
b
The command I ran was
~/.cargo/bin/bluebuild switch
g
Yeah that's the one
b
I'm trying with the github action
g
Ok
b
should the image tag be different when building from a different branch ?
it's ok I found it with
skopeo list-tags
forgot the
ly
binary in
/usr/bin
😭
Nice it's working (not the authentication but I think it's because of SELinux)
3 Views