feat/release-page #2
1 changed files with 23 additions and 6 deletions
rules: cross-arch dh_shlibdeps, point at /usr/lib/<DEB_HOST_MULTIARCH>/
Some checks failed
Forgejo Release postit-deb / release (push) Failing after 3m12s
Some checks failed
Forgejo Release postit-deb / release (push) Failing after 3m12s
crossbuild-essential-arm64 transitively installs libc6:arm64 et al. (Depends chain: crossbuild-essential-arm64 → gcc-aarch64- linux-gnu → libc6-dev:arm64 → libc6:arm64), placing the runtime .so files in /usr/lib/aarch64-linux-gnu/. The non-dev libs (libc.so.6, libm.so.6, etc.) live there, not in /usr/lib/ which is what dh_shlibdeps searches by default. dpkg-shlibdeps accepts -l<dir> for additional library search paths. We compute the right path via dpkg-architecture -aarm64 -q DEB_HOST_MULTIARCH (which returns 'aarch64-linux-gnu' without choking on the CC mismatch warning, since it's a pure query), and pass /usr/lib/$HOST_MULTIARCH/ as -l. Falls back to a literal aarch64-linux-gnu if dpkg-architecture isn't installed (it always is on a Debian build host).
commit
39729b8d0d
29
debian/rules
vendored
29
debian/rules
vendored
|
|
@ -126,12 +126,29 @@ override_dh_auto_test:
|
||||||
# client). Build smoke is sufficient for the package.
|
# client). Build smoke is sufficient for the package.
|
||||||
|
|
||||||
override_dh_shlibdeps:
|
override_dh_shlibdeps:
|
||||||
# The runner image installs crossbuild-essential-arm64, which
|
# In a cross-build (DEB_HOST_ARCH != DEB_BUILD_ARCH), the
|
||||||
# provides libc6-dev:arm64 et al. plus dpkg-cross — enough
|
# system's arch-specific lib dir is at
|
||||||
# for dh_shlibdeps to resolve the arm64 binaries' NEEDED
|
# /usr/lib/<DEB_HOST_MULTIARCH>/. crossbuild-essential-arm64
|
||||||
# entries against the system's shlibs cache directly. No
|
# has transitively installed libc6:arm64 et al. there (it's
|
||||||
# stage dir, no -l hack: standard dh_shlibdeps just works.
|
# a Depends chain: crossbuild-essential-arm64 → gcc-aarch64-
|
||||||
dh_shlibdeps
|
# linux-gnu → libc6-dev:arm64 → libc6:arm64). Pass that
|
||||||
|
# path via -l so dpkg-shlibdeps can resolve the arm64
|
||||||
|
# binaries' NEEDED entries (libc.so.6, libstdc++.so.6,
|
||||||
|
# libfontconfig, etc.) against the on-host shlibs cache.
|
||||||
|
if [ -n "$(DEB_HOST_ARCH)" ] && [ "$(DEB_HOST_ARCH)" != "$(DEB_BUILD_ARCH)" ]; then \
|
||||||
|
HOST_MULTIARCH=$$(dpkg-architecture -a$(DEB_HOST_ARCH) -q DEB_HOST_MULTIARCH 2>/dev/null) || \
|
||||||
|
HOST_MULTIARCH=aarch64-linux-gnu; \
|
||||||
|
HOST_LIB_DIR=/usr/lib/$${HOST_MULTIARCH}; \
|
||||||
|
if [ -d "$$HOST_LIB_DIR" ]; then \
|
||||||
|
echo " --> dh_shlibdeps: cross-arch $$HOST_LIB_DIR (DEB_HOST_ARCH=$(DEB_HOST_ARCH))"; \
|
||||||
|
dh_shlibdeps -- -l"$$HOST_LIB_DIR"; \
|
||||||
|
else \
|
||||||
|
echo " --> dh_shlibdeps: WARN cross-arch dir $$HOST_LIB_DIR missing"; \
|
||||||
|
dh_shlibdeps; \
|
||||||
|
fi \
|
||||||
|
else \
|
||||||
|
dh_shlibdeps; \
|
||||||
|
fi
|
||||||
|
|
||||||
override_dh_strip:
|
override_dh_strip:
|
||||||
# dh_strip disabled entirely. See MEMORY.md / AGENTS.md for the
|
# dh_strip disabled entirely. See MEMORY.md / AGENTS.md for the
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue