Closed christian-heusel closed 2 months ago
I can of course move the files into place by hand, but it would IMO be much better (also for packagers in other distros) to properly support this directly in ly.
Hey there! 👋🏻 Looks like you're running into some unexpected issues, to say the least. 😅
I'm not aware of any way to only run the custom build steps without actually running the build step. That's because the build.zig
file is part of the build process, making everything tightly integrated. However, how is that a problem in your case? You could build with the same options as you currently have in build()
, and in package()
you could simply append installsystemd
, and the Zig build system should be smart and not rebuild (since it should be able to tell everything's the same).
That is... unexpected. I checked and what the C version does is just hardcode the /etc/ly
path into the binary instead. While I admit I don't like that behavior, we (I and another contributor who worked on this feature) didn't think of this potential (yet common) use case.
I think I'll just add a separate build option which would get embedded into the binary instead. How does that sound? Another way I see how this could be fixed is to chroot
into a specific file system, but that's either overkill or not very possible from within Arch's build environment.
That's slightly more complicated, given that it's a separate file and would likely require the build system to open the file, replace a special string with the executable name, and write the changes. But it's definitely doable.
- [...] You could build with the same options as you currently have in build(), and in package() you could simply append installsystemd
Yeah this works once we solve the problem from 2). I thought this way I could first build the binary and then just move the already built binary 😅
- [...] I think I'll just add a separate build option which would get embedded into the binary instead. How does that sound?
A separate build option sounds good! Makefiles use DESTDIR
for this (https://www.gnu.org/prep/standards/html_node/DESTDIR.html), maybe we can make the current option into that and add a separate bindir
/binary_folder
or similar variable for the binary location? 🤔
I don't care much for the specifcs/naming but I thought I might aswell give some input 😆
- That's slightly more complicated, given that it's a separate file and would likely require the build system to open the file, replace a special string with the executable name, and write the changes. But it's definitely doable.
Yeah no problem, this is also not changed since the old version so IMO it can stay as is for now 😄
Thanks for the fast response and the helpful comments! 🤗
@christian-heusel I've pushed the required changes in master
and v1.0.x
and it seems to work for me. Are you able to test like this or should I push a release anyway?
I can test first and you can publish a release when convenient 😄
Seems to work well, I have published the package to the testing repostories 🤗 https://gitlab.archlinux.org/archlinux/packaging/packages/ly/-/commit/32816171d54912886bc2328b0fe238bc598af823
Thanks for the speedy fix!
I want to package ly version 1.0.0 but currently struggle to do so for various reasons (also see #628):
-Ddest_directory="$pkgdir"
also includes it into the binary:This is an issue because it makes ly crash the session on login when the build package is installed onto a real system:
-Dname=...
also did get templated into the systemd unitFor previous versions the install went something like this:
This is where I'm currently at: