kornelski / cargo-deb

A cargo subcommand that generates Debian packages from information in Cargo.toml
https://lib.rs/cargo-deb
MIT License
404 stars 48 forks source link

Allow dpkg-shlibdeps flags or Debian rules file #107

Open itsyaboyrooba opened 11 months ago

itsyaboyrooba commented 11 months ago

Hello,

I can't build a Debian package with private shared libraries. I wish to put them in a separate /usr/lib/mylibraries directory.

dpkg-shlibdeps: warning: cannot find library library.so needed by /workspaces/src/myplugin/bin/library2.so dpkg-shlibdeps: error: cannot continue due to the error above Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file. To help dpkg-shlibdeps find private libraries, you might need to use -l.

With a regular debhelper package, you can give dpkg-shlibdeps the path of the private libraries:

Any fixes, upcoming features and etc?

Thank you in advance. :)

kornelski commented 11 months ago

If I understand correctly, the rules file is for dh build, and it's typically a makefile. I don't see how that would be used for Cargo builds. Cargo-deb doesn't use dh, and it's more rooted in the side of Rust/Cargo, than Debian's packaging tooling.

If you're familiar with Debian's package tooling, maybe debcargo would work better?


Ideally I'd love cargo deb work automagically out of the box, without extra flags or config. Does your library2.so contain references to /usr/lib/my-libraries that something like ldd could read? It'd be cool if the path could be auto-detected.

Or maybe you're setting LD_LIBRARY_PATH that I could forward to dpkg-shlibdeps?