balena-io / etcher

Flash OS images to SD cards & USB drives, safely and easily.
https://etcher.io/
Apache License 2.0
29.96k stars 2.12k forks source link

patch: etcher-util is corrupted in RPM package #4333

Closed aethernet closed 1 month ago

aethernet commented 1 month ago

Cherry-picking https://github.com/balena-io/etcher/pull/4304


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: https://github.com/balena-io/etcher/issues/4150

github-actions[bot] commented 1 month ago

Website deployed to CF Pages, 👀 preview link https://e33cf96b.etcher.pages.dev