What is the best way to install programs from source ?
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 folder59 Replies
Solution
oh, sorry, I missed this page ^^
I will take a look at it
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
yes I will deal with that later
but thanks
It looks amazing 😇
Make sure to use the
unstable_cli
option for the github actionDoes the
src
and dest
option from the copy module support syntax like /etc/ly/*.sh
?no
Umm it supports whatever the
COPY
instruction supports
And I think it supports wildcardhow to do so in local with the bluebuild cli ? (I don't understand the
or using the stages feature when compiling
in the doc)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/
rustup.rs - The Rust toolchain installer
The Rust toolchain installer
no
Then you can run
cargo install --all-features blue-build
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 ?Sure? You would still need docker to run the build
Our images aren't distrobox ready. I have an issue out for it
(I will have to learn rust one day)
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
yes I know but I wanna try ^^
Rustlings is a great interactive course. @xyny 's been using it recently
Once I installed it, with wich command should I build my image ? (I don't see any
stages
option in the build
command)ohh, I misread
copy
module with files
one
my badthe same build command builds the stages first
ok
yeah, it's great if you alrd know the basics of programming and other compsci concepts
How am I supposed to start the docker daemon within distrobox ?
I have no clue. I have docker layered in my image
I should have looked for such image
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
indeed cargo is available in my base system
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 betterNice it's running the stage part !
Sweet!
The stage tool is really overpowered !
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
hence the documentation
Yes lol
Normally my recipe will avoid to copy
/etc/ly/config.ini
and copy it with my own config in files
So if this is output from something like
make install
, then those files only exist in that stageThe build was succesful !
Awesome!
I will try to rebase
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 statusI ran it without sudo but the command seems to run 🤔
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
nice !
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
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
?¯\_(ツ)_/¯
Anyways, almost time to reboot !
Oh yeah there's a
--reboot
flag you can use to automatically do that for you
Don't stop your build though 😛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 ?That's weird
You're not in a distrobox are you?
no
I've not run into that issue before
The command I ran was
~/.cargo/bin/bluebuild switch
Yeah that's the one
I'm trying with the github action
Ok
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)