Skip to content

Fix fakeroot build by using od(1) to check 64-bit ELFs#943

Open
JohnoKing wants to merge 3 commits intoksh93:devfrom
JohnoKing:fix-64bit-elf-detection
Open

Fix fakeroot build by using od(1) to check 64-bit ELFs#943
JohnoKing wants to merge 3 commits intoksh93:devfrom
JohnoKing:fix-64bit-elf-detection

Conversation

@JohnoKing
Copy link
Copy Markdown

bin/package:

  • Use od to check the ELF header if file fails with an error. This allows ksh to build and install correctly in fakeroot environments without encountering bogus seccomp restrictions.

Fixes #919

bin/package:
- Use od(1) to check the ELF header if the file command fails.
  This allows ksh to build and install correctly in fakeroot
  environments without encountering bogus seccomp restrictions.

Fixes ksh93#919
- Check the first five bytes to guarantee it's actually an ELF binary.
- Return 'Unknown bits' if it's neither a 64-bit ELF nor 32-bit ELF
  (i.e. it could be anything). This isn't functionally different but is
  better for clarity.
- Pass '-A n' to od(1) rather than '-An' for what should be better
  portability.
  - locale.sh: Also apply that change here since a quick grep showed
    this file was also passing -An to od.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Arch Linux AUR (PKGBUILD) - gitignore

1 participant