Skip to content

Workaround for Ubuntu's default MZ binary handler #16

Workaround for Ubuntu's default MZ binary handler

Workaround for Ubuntu's default MZ binary handler #16

Workflow file for this run

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