Closed destenson closed 2 weeks ago
You can write your own depends
value in Cargo.toml metadata https://github.com/kornelski/cargo-deb?tab=readme-ov-file#packagemetadatadeb-options
When depends is computed automatically, it's done by asking dpkg
, and it probably won't know better than to return Debian's current version.
Oh perfect, thank you @kornelski. I knew that was there, but I didn't think to use it, d'oh.
I am attempting to cross-compile debian packages that are compatible with versions of GLIBC older than the one installed.
I have successfully cross compiled the binary using cargo-cross with zig enabled and GLIBC version 2.27.0 using:
with a Cross.toml containing:
After that, I verified that the version of the linked libc6 symbols are indeed <= 2.27 with objdump.
Finally, I used cargo-deb to create a .deb file:
or
Those do create a .deb file with the cross-compiled binary. However, the control file in the created .deb contains:
And that prevents the deb from being installed on the target system.
Short of extracting the .deb, modifying the DEBIAN/control file manually and recreating the .deb file, how can I solve this issue? How can I get cargo-deb to depend on the intended version of libc6?