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
netpbm: 10.89.1 → 10.91.2 #97045
netpbm: 10.89.1 → 10.91.2 #97045
Conversation
2958fbe
to
765a56c
Compare
While reading the build system sources, I noticed it also uses vendored Jasper. We might want to use the Fedora patch to unbundle it or better find a way to disable it since Jasper is full of security holes. |
0dbae71
to
122bd05
Compare
Cross-building works for the most part, but I found some iregularitues with shebangs, eg.
Otherwise, nicely done 👍 |
Could you clarify what the irregularities are?
…On Mon, 7 Sep, 2020 at 02:05, Christian Kampka ***@***.***> wrote:
Cross-building works for the most part, but I found some
iregularitues with shebangs, eg.
$ nix-build . -A pkgsCross.aarch64-multiplatform.netpbm
$ head result-bin/bin/ppmquant
#! /nix/store/j206pskg2yzyla1cnfrb9kb5n5bfvjgm-bash-4.4-p23/bin/bash
-e
Otherwise, nicely done 👍
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Of course. After cross building from x86 to aarch64, the shebang should point to an aarch64 version of bash, otherwise the script would probably run into an exec error.
|
Weird. I would expect the patchShebangsAuto hook to do the right thing
wrt cross compilation. OR is the wrapProgram causing the issue?
…On Mon, 7 Sep, 2020 at 02:18, Christian Kampka ***@***.***> wrote:
> Could you clarify what the irregularities are?
>
Of course. After cross building from x86 to aarch64, the shebang
should point to an aarch64 version of bash, otherwise the script
would probably run into an exec error.
The bash it points to however is the one of the build system
$ file
/nix/store/j206pskg2yzyla1cnfrb9kb5n5bfvjgm-bash-4.4-p23/bin/bash
/nix/store/j206pskg2yzyla1cnfrb9kb5n5bfvjgm-bash-4.4-p23/bin/bash:
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically
linked, interpreter
/nix/store/2pi6zgkwnr3zdslvlv16nixpzvbyjx1n-glibc-2.31/lib/ld-linux-x86-64.so.2,
for GNU/Linux 2.6.32, not stripped
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I tried using `buildPackages.makeWrapper` hoping it would fix the
interpolated shell variable
https://github.com/NixOS/nixpkgs/blob/b0a8a746b3d0edebf320b9923ba1cc8fefa0ee00/pkgs/top-level/all-packages.nix#L456-L457
but it produces the same derivation.
…On Mon, 7 Sep, 2020 at 11:24, Jan Tojnar ***@***.***> wrote:
Weird. I would expect the patchShebangsAuto hook to do the right
thing wrt cross compilation. OR is the wrapProgram causing the issue?
On Mon, 7 Sep, 2020 at 02:18, Christian Kampka
***@***.***> wrote:
>> Could you clarify what the irregularities are?
>>
> Of course. After cross building from x86 to aarch64, the shebang
> �should point to an aarch64 version of bash, otherwise the script
> �would probably run into an exec error.
> The bash it points to however is the one of the build system
>
> $ file
> �/nix/store/j206pskg2yzyla1cnfrb9kb5n5bfvjgm-bash-4.4-p23/bin/bash
> /nix/store/j206pskg2yzyla1cnfrb9kb5n5bfvjgm-bash-4.4-p23/bin/bash:
> �ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically
> �linked, interpreter
> �/nix/store/2pi6zgkwnr3zdslvlv16nixpzvbyjx1n-glibc-2.31/lib/ld-linux-x86-64.so.2,
> �for GNU/Linux 2.6.32, not stripped
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
>
|
It looks like |
That is expected. The operation should be idempotent.
We need to convine wrapProgram to use the correct shebang from the
start.
…On Mon, 7 Sep, 2020 at 02:39, Christian Kampka ***@***.***> wrote:
> Weird. I would expect the patchShebangsAuto hook to do the right
> thing wrt cross compilation. OR is the wrapProgram causing the issue?
>
It looks like patchShebang does the wrong thing here as the bash
reference is already a reference to the Nix store.
This would probably be worth fixing at that level.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
A practical solution (not necessarily pretty) would be to just patch it over like so. |
Also fix accidentally not running postConfigure
Especially since Jasper is unmaintained and insecure
Co-Authored-By: Christian Kampka <christian@kampka.net>
122bd05
to
46cf3b8
Compare
@GrahamcOfBorg build netpbm |
@Ericson2314 @matthewbauer any idea how to make |
@jtojnar yeah I recently learned that I should make an issue for this. |
Motivation for this change
Tried updating if it makes cross compilation better.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)