Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appimage: replace radare2+jq with readelf+awk+sha256sum #89122

Merged
merged 1 commit into from May 31, 2020

Conversation

prusnak
Copy link
Member

@prusnak prusnak commented May 28, 2020

Motivation for this change

radare2 does not play nicely with filenames containing spaces: radareorg/radare2#16958

so I replaced radare2+jq with readelf+awk+sha256sum

I also cleaned up default.nix with nixpkgs-fmt and removed bashisms from appimage-exec.sh

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@prusnak prusnak requested review from Mic92 and mmahut May 28, 2020 19:00
@prusnak prusnak changed the title appimage: replace radare2+jq with awk and sha256sum appimage: replace radare2+jq with readelf+awk+sha256sum May 28, 2020
@Pacman99
Copy link
Contributor

I tried to build some appimage packages from your code and I get readelf: command not found
I don't know why that would happen, since it looks like binutils is in the path for the appimage-exec.sh. Maybe it's called wrong or needs to be included as a input somewhere.

I'm just curious about the problem your solving, when would the existing radare based code fail? Would it happen from spaces in the name of the appimage or package name or something else?

@prusnak
Copy link
Member Author

prusnak commented May 28, 2020

when would the existing radare based code fail?

$ appimage-run "Any Filename With Spaces.AppImage"
sha256 = "aab46b385ff90486013b44e719e12f4f351dbe125d7a3124569b9fba3bbfd9b8";
Cannot find 'elf_header' format.

@prusnak
Copy link
Member Author

prusnak commented May 28, 2020

I don't know why that would happen, since it looks like binutils is in the path for the appimage-exec.sh.

Is the issue fixed when you replace binutils with binutils-unwrapped in the default.nix?

@Pacman99
Copy link
Contributor

Pacman99 commented May 28, 2020

Is the issue fixed when you replace binutils with binutils-unwrapped in the default.nix?

Yup works perfectly now.

And I tested all of my appimage packages and they work perfectly. The PR is perfect with the change.

@prusnak
Copy link
Member Author

prusnak commented May 28, 2020

Changed binutils to binutils-unwrapped in 56ec381dad348ae63b8aca09d403a555093de598

Copy link
Member

@Mic92 Mic92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I very much prefer that. radare2 has quite frequent releases, which I need to test and sometimes break the API.

radare2 does not play nicely with filenames containing spaces
radareorg/radare2#16958
@flokli flokli merged commit b19590a into NixOS:master May 31, 2020
@prusnak prusnak deleted the appimage-exec-fix-space branch May 31, 2020 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants