Skip to content

Commit b663d3a

Browse files
committed
fix: etcher-util is corrupted in RPM package
rpmbuild strips executables by default when generating an rpm packge. This was causing the JavaScript code bundled in the etcher-util file to be removed, causing "Pkg: Error reading from file." whenever etcher-util was called. This in turn caused balena-etcher to generate the error message `Error: (0, h.requestMetadata) is not a function` when attempting to write an SD card. This fixes the issue for RPM builds by replacing the `strip` command with `true` so that rpmbuild no longer strips the executables and the embeded code stays intact. See: #4150 Signed-off-by: Richard Glidden <[email protected]>
1 parent 5fd6376 commit b663d3a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/actions/publish/action.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ runs:
5353
shell: bash
5454
run: sudo apt-get install -y --no-install-recommends fakeroot dpkg rpm
5555

56+
# rpmbuild will strip binaries by default, which breaks the sidecar.
57+
# Use a macro to override the "strip" to bypass stripping.
58+
- name: Configure rpmbuild to not strip executables
59+
if: runner.os == 'Linux'
60+
shell: bash
61+
run: echo '%__strip /usr/bin/true' > ~/.rpmmacros
62+
5663
- name: Install host dependencies
5764
if: runner.os == 'macOS'
5865
# FIXME: Python 3.12 dropped distutils that node-gyp depends upon.
@@ -131,7 +138,7 @@ runs:
131138
PLATFORM=Windows
132139
SHA256SUM_BIN=sha256sum
133140
134-
# Install DigiCert Signing Manager Tools
141+
# Install DigiCert Signing Manager Tools
135142
curl --silent --retry 3 --fail https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download \
136143
-H "x-api-key:$SM_API_KEY" \
137144
-o smtools-windows-x64.msi

0 commit comments

Comments
 (0)