Fix hardlinks appearing in and breaking deb packages (#2609)

This commit is contained in:
Michael Telatynski 2025-10-06 09:55:54 +01:00 committed by GitHub
parent d0a735b25c
commit a64ed5428c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 8 deletions

View File

@ -51,7 +51,7 @@ jobs:
tests-done:
needs: [windows, linux, macos]
runs-on: ubuntu-24.04
if: always()
if: ${{ !cancelled() }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5

View File

@ -152,10 +152,9 @@ jobs:
fi
# Workaround for https://github.com/electron-userland/electron-builder/issues/6116
# and https://github.com/electron-userland/electron-builder/issues/5721
- name: Install fpm
if: inputs.arch == 'arm64'
run: |
sudo apt-get install ruby-dev build-essential
sudo gem install fpm
echo "USE_SYSTEM_FPM=true" >> $GITHUB_ENV
@ -165,6 +164,10 @@ jobs:
VARIANT_PATH: variant.json
# Only set for Nightly builds
VERSION: ${{ inputs.version }}
FPM_DEBUG: true # TODO
DEBUG: electron-builder # TODO
# Workaround for https://github.com/electron-userland/electron-builder/issues/5721
USE_HARD_LINKS: false
- name: Check native libraries
run: |
@ -172,11 +175,9 @@ jobs:
shopt -s globstar
FILES=$(file dist/**/*.node)
echo "$FILES"
echo $FILES
if [ grep -v "$ARCH" ]; then
exit 1
fi
! echo "$FILES" | grep -v "$ARCH"
LIBS=$(readelf -d dist/**/*.node | grep NEEDED)
echo "$LIBS"
@ -211,6 +212,18 @@ jobs:
env:
ARCH: ${{ inputs.arch }}
- name: Assert no hardlinks are found
run: |
TAR_GZ_LISTING=$(tar -tvf ./dist/element-desktop*.tar.gz)
echo "tar.gz listing: "
echo "$TAR_GZ_LISTING"
! echo "$TAR_GZ_LISTING" | grep '^h'
DEB_LISTING=$(dpkg-deb --fsys-tarfile ./dist/element-desktop*.deb | tar -tv)
echo "deb listing: "
echo "$DEB_LISTING"
! echo "$DEB_LISTING" | grep '^h'
test:
needs: build
uses: ./.github/workflows/build_test.yaml

View File

@ -129,7 +129,7 @@ const config: Omit<Writable<Configuration>, "electronFuses"> & {
linux: {
target: ["tar.gz", "deb"],
category: "Network;InstantMessaging;Chat",
icon: "build/icon.png",
icon: "icon.png",
executableName: variant.name, // element-desktop or element-desktop-nightly
},
deb: {