debian/rules: skip dh_strip on *.so (cross-compiled native libs)
Some checks failed
Forgejo Release postit-deb / release (push) Failing after 7m7s
Some checks failed
Forgejo Release postit-deb / release (push) Failing after 7m7s
When cross-compiling PostIt.Desktop for linux-arm64 from an amd64 runner container, the .deb ends up shipping HarfBuzzSharp.so and SkiaSharp.so in ARM64 format. dh_strip invokes objcopy on every file under debian/postit/, and objcopy on the amd64 host cannot parse ARM64 .so files: objcopy: Unable to recognise the format of the input file `debian/postit/usr/lib/postit/libHarfBuzzSharp.so' dh_strip: error: ... returned exit code 1 dh_strip: error: Aborting due to earlier error Add --exclude=*.so to override_dh_strip. The upstream .so ships with its own debug symbols; we don't lose anything by skipping the strip on them. Also drop the diag.yml workflow that diagnosed the initial tag-not-found failure — no longer needed. Discovered via the Forgejo Actions release.yml run on tag 1.0.6.
This commit is contained in:
parent
ba8ffe5f5b
commit
c25e245f5a
2 changed files with 14 additions and 75 deletions
|
|
@ -1,74 +0,0 @@
|
|||
name: diag
|
||||
|
||||
# Diagnostic minimal : vérifie que le runner Forgejo démarre, qu'il
|
||||
# peut cloner, et qu'il a accès à Internet + Docker (pour le label
|
||||
# docker:// sur lequel tournent nos jobs).
|
||||
#
|
||||
# À supprimer une fois qu'on a confirmé que le runner est OK.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
diag:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: docker.io/pazof/yavsc-build-env:debian12-dotnet10-android36-v2
|
||||
steps:
|
||||
- name: Hello
|
||||
run: |
|
||||
echo "Runner started, container is alive."
|
||||
echo "Image: $(cat /etc/os-release | grep PRETTY_NAME)"
|
||||
echo "Hostname: $(hostname)"
|
||||
echo "User: $(whoami)"
|
||||
echo "Working dir: $(pwd)"
|
||||
|
||||
- name: Network check
|
||||
run: |
|
||||
echo "--- DNS resolution ---"
|
||||
getent hosts forgejo.pschneider.fr || echo "FAIL: cannot resolve forgejo.pschneider.fr"
|
||||
echo "--- HTTP outbound ---"
|
||||
curl -sS -o /dev/null -w "forgejo.pschneider.fr HTTP %{http_code} (%{time_total}s)\n" \
|
||||
https://forgejo.pschneider.fr/ || echo "FAIL: cannot reach forgejo.pschneider.fr"
|
||||
echo "--- Docker Hub ---"
|
||||
curl -sS -o /dev/null -w "hub.docker.com HTTP %{http_code}\n" \
|
||||
https://hub.docker.com/ || echo "FAIL: cannot reach hub.docker.com"
|
||||
|
||||
- name: Tooling check
|
||||
run: |
|
||||
echo "--- git ---"
|
||||
git --version
|
||||
echo "--- dotnet ---"
|
||||
dotnet --info | head -5
|
||||
echo "--- jq ---"
|
||||
jq --version
|
||||
echo "--- curl ---"
|
||||
curl --version | head -1
|
||||
echo "--- make ---"
|
||||
make --version | head -1
|
||||
echo "--- debhelper ---"
|
||||
which dh || echo "FAIL: dh not found (debhelper absent)"
|
||||
echo "--- imagemagick ---"
|
||||
which convert || echo "FAIL: convert not found"
|
||||
|
||||
- name: Forgejo context probe
|
||||
env:
|
||||
FORGEJO_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
run: |
|
||||
echo "--- forgejo.* context ---"
|
||||
echo "forgejo.ref_name=[${{ forgejo.ref_name }}]"
|
||||
echo "forgejo.repository=[${{ forgejo.repository }}]"
|
||||
echo "forgejo.api_url=[${{ forgejo.api_url }}]"
|
||||
echo "--- secrets.GITHUB_TOKEN probe ---"
|
||||
if [[ -n "$FORGEJO_TOKEN" ]]; then
|
||||
echo "FORGEJO_TOKEN is set (length=${#FORGEJO_TOKEN})"
|
||||
else
|
||||
echo "FORGEJO_TOKEN is EMPTY — secrets.GITHUB_TOKEN did not resolve"
|
||||
fi
|
||||
echo "--- API reachability via FORGEJO_TOKEN ---"
|
||||
if [[ -n "$FORGEJO_TOKEN" ]]; then
|
||||
HTTP=$(curl -sS -o /dev/null -w '%{http_code}' \
|
||||
-H "Authorization: token $FORGEJO_TOKEN" \
|
||||
"${{ forgejo.api_url }}/repos/${{ forgejo.repository }}")
|
||||
echo "GET /repos/${{ forgejo.repository }} -> HTTP $HTTP"
|
||||
fi
|
||||
15
debian/rules
vendored
15
debian/rules
vendored
|
|
@ -129,7 +129,20 @@ override_dh_shlibdeps:
|
|||
dh_shlibdeps
|
||||
|
||||
override_dh_strip:
|
||||
dh_strip --exclude=.pdb
|
||||
# --exclude=.pdb : .NET génère des .pdb même en Release, ils
|
||||
# ne sont pas strippables proprement.
|
||||
# --exclude=*.so : Avalonia dépend de HarfBuzzSharp et SkiaSharp
|
||||
# qui livrent leurs .so pré-compilés via NuGet (formats natifs
|
||||
# multi-arch : linux-x64, linux-arm64, etc.). Quand on cross-
|
||||
# compile depuis un hôte amd64 (build arm64), dh_strip appelle
|
||||
# objcopy sur ces .so qui sont en ARM64 et objcopy natif amd64
|
||||
# ne sait pas les lire :
|
||||
# objcopy: Unable to recognise the format of the input file
|
||||
# `debian/postit/usr/lib/postit/libHarfBuzzSharp.so'
|
||||
# On les exclut donc du strip. Les symboles debug seront
|
||||
# présents dans le .deb mais ce sont des libs upstream, pas
|
||||
# notre code — pas critique.
|
||||
dh_strip --exclude=.pdb --exclude=*.so
|
||||
|
||||
|
||||
define stage_postit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue