Workaround for Ubuntu's default MZ binary handler #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Initialize build environment | |
run: ./init.sh | |
- name: Build sanoid-portable binary | |
run: | | |
# Add a new binfmt entry that matches APE's (Actually Portable Executable)'s | |
# magic number to avoid execution by Ubuntu's built-in "MZ" binfmt | |
# interpreter which "helpfully" tries to run the binary with WINE. | |
sudo sh -c "echo ':APE:M::MZqFpD::/bin/sh:' >/proc/sys/fs/binfmt_misc/register" | |
./build.sh |