]> git.proxmox.com Git - proxmox-backup.git/commit - debian/control
d/rules: patch out wrongly linked libraries from ELFs
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 14 Jan 2021 16:30:09 +0000 (17:30 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 15 Jan 2021 07:52:53 +0000 (08:52 +0100)
commit198ebc6c86380351662b8b01537f449538ff1e6b
tree6926961fb42680d2eddc7a4fe62254648afbfd6f
parenta8abcd9b303939d4db588902591f3ea81511c2aa
d/rules: patch out wrongly linked libraries from ELFs

this is a HACK!

It seems that due to lots of binaries getting compiled from a single
crate the compiler is confused when linking in dependencies to each
binaries ELF.

It picks up the combined set (union) of all dependencies and sets
those to every ELF. This results in the client, for example, linking
to libapt-pkg or libsystemd even if none of that symbols are used..

This could be possibly fixed by restructuring the source tree into
sub crates/workspaces or what not, not really tested and *lots* of
work.

So as stop gap measure use `ldd -u` to find out unused linkage and
remove them using `patchelf`.

While this works well, and seems to not interfere with any debug
symbol usage or other usage in general it still is a hack and should
be dropped once the restructuring of the source tree has shown to
bring similar effects.

This allows for much easier re-use of the generated client .deb
package on other Debian derivaties (e.g., Ubuntu) which got blocked
until now due to wrong libt-apt verison or the like.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
debian/control
debian/debcargo.toml
debian/rules
debian/scripts/elf-strip-unused-dependencies.sh [new file with mode: 0755]