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

IPMIView: 2.17.0 -> 2.18.0 #106428

Merged
merged 1 commit into from Dec 13, 2020
Merged

IPMIView: 2.17.0 -> 2.18.0 #106428

merged 1 commit into from Dec 13, 2020

Conversation

iamdenchik
Copy link
Contributor

Motivation for this change
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.

Copy link
Contributor

@vlaci vlaci left a comment

Choose a reason for hiding this comment

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

The package still doesn't build for me because the hash is not correct and the patchelf issue needs to be resolved. See my comments in #106164. It's okay if you don't know how to fix the libIKVM patching issue by yourself, I can help you if you'd like.

You can try building the derivation yourself via issueing the following command in the root of your nixpkgs git checkout:

$ nix-build . -A ipmiview
these derivations will be built:
  /nix/store/lig12cvpbjmm74h4nkid9brhk2fq7bgx-IPMIView_2.18.0_build.201007_bundleJRE_Linux_x64.tar.gz.drv
  /nix/store/wffdmz8m03552z4625f0r0xk04hq7s3h-IPMIView-2.18.0.drv
these paths will be fetched (0.00 MiB download, 0.01 MiB unpacked):
  /nix/store/1l18i82158dndfx7mdg6wxqjb476lfqg-mirrors-list
copying path '/nix/store/1l18i82158dndfx7mdg6wxqjb476lfqg-mirrors-list' from 'https://cache.nixos.org'...
building '/nix/store/lig12cvpbjmm74h4nkid9brhk2fq7bgx-IPMIView_2.18.0_build.201007_bundleJRE_Linux_x64.tar.gz.drv'...

trying https://www.supermicro.com/wftp/utility/IPMIView/Linux/IPMIView_2.18.0_build.201007_bundleJRE_Linux_x64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  103M  100  103M    0     0  9475k      0  0:00:11  0:00:11 --:--:-- 11.0M
hash mismatch in fixed-output derivation '/nix/store/4mx1wp32ijww8w33znjxnvrv33wr1kz9-IPMIView_2.18.0_build.201007_bundleJRE_Linux_x64.tar.gz':
  wanted: sha256:14cl9jhp2wvv5dgv4akkp75nqjz21f6j9pi6743s3rp298rpj095
  got:    sha256:10cv63yhh81gjxahsg4y3zp4mjivc217m4z1vcpwvvnds46c65h8
cannot build derivation '/nix/store/wffdmz8m03552z4625f0r0xk04hq7s3h-IPMIView-2.18.0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/wffdmz8m03552z4625f0r0xk04hq7s3h-IPMIView-2.18.0.drv' failed


src = fetchurl {
url = "https://www.supermicro.com/wftp/utility/IPMIView/Linux/IPMIView_${version}_build.${buildVersion}_bundleJRE_Linux_x64.tar.gz";
sha256 = "0ba0694krj2q77zwdn22v2qzjdy52a7ryhgc3m51s7p17ahigz97";
sha256 = "14cl9jhp2wvv5dgv4akkp75nqjz21f6j9pi6743s3rp298rpj095";
Copy link
Contributor

Choose a reason for hiding this comment

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

The hash is still incorrect

@iamdenchik
Copy link
Contributor Author

It's okay if you don't know how to fix the libIKVM patching issue by yourself, I can help you if you'd like.

help me, please)

Running desktop-file validation
building '/nix/store/xawpdj7id36y11vzqp2pid2f599wqawy-IPMIView_2.18.0_build.201007_bundleJRE_Linux_x64.tar.gz.drv'...

trying https://www.supermicro.com/wftp/utility/IPMIView/Linux/IPMIView_2.18.0_build.201007_bundleJRE_Linux_x64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  103M  100  103M    0     0  7699k      0  0:00:13  0:00:13 --:--:-- 7679k
copying path '/nix/store/a1hpnpjrxdllbfg179vzj7hnh581sz3c-gcc-wrapper-9.3.0' from 'https://cache.nixos.org'...
copying path '/nix/store/qkgbmfnkxw51sfzrxlxsbj6kf2zi7ab2-stdenv-linux' from 'https://cache.nixos.org'...
building '/nix/store/vrc3a2bp9v4np94gjazwwr98bwxbw7lz-IPMIView-2.18.0.drv'...
unpacking sources
unpacking source archive /nix/store/4mx1wp32ijww8w33znjxnvrv33wr1kz9-IPMIView_2.18.0_build.201007_bundleJRE_Linux_x64.tar.gz
source root is IPMIView_2.18.0_build.201007_bundleJRE_Linux_x64
setting SOURCE_DATE_EPOCH to timestamp 1602065497 of file IPMIView_2.18.0_build.201007_bundleJRE_Linux_x64/libiKVM_v11_64.so
patching sources
configuring
no configure script, doing nothing
building
patchelf: no section headers. The input file is probably a statically linked, self-decompressing binary
builder for '/nix/store/vrc3a2bp9v4np94gjazwwr98bwxbw7lz-IPMIView-2.18.0.drv' failed with exit code 1
error: build of '/nix/store/vrc3a2bp9v4np94gjazwwr98bwxbw7lz-IPMIView-2.18.0.drv' failed

@vlaci
Copy link
Contributor

vlaci commented Dec 9, 2020

So the issue is with the patchElf call at https://github.com/NixOS/nixpkgs/blob/2d89106346fdf2801cd0419b7f52c47d1db18212/pkgs/applications/misc/ipmiview/default.nix#L35
I don't know what changed in IPMIView which casues it to fail but have a workaround suggestion:

  1. Remove this and the immediately above calls. This makes the derivation to build but the KVM console functionality is broken.
  2. To fix the KVM console via an other method, you can extend the LD_LIBRARY_PATH environment variable with the path to gcc-unwrapped.lib when IPMIView is started. To do that, we need to have a makeWrapper call. Fortunately there is an existing makeWrapper invocation here: https://github.com/NixOS/nixpkgs/blob/2d89106346fdf2801cd0419b7f52c47d1db18212/pkgs/applications/misc/ipmiview/default.nix#L58-L59
    Adding gcc-unwrapped.lib after fontconfig seems to make KVM console working again.
Here is the complete diff I suggest (click to expand)
@@ -31,8 +31,6 @@ stdenv.mkDerivation rec {
   ''
     patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ libX11 libXext libXrender libXtst libXi ]}" ./jre/lib/amd64/libawt_xawt.so
     patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ freetype ]}" ./jre/lib/amd64/libfontmanager.so
-    patchelf --set-rpath "${gcc-unwrapped.lib}/lib" ./libiKVM64.so
-    patchelf --set-rpath "${gcc-unwrapped.lib}/lib" ./libiKVM_v11_64.so
     patchelf --set-rpath "${gcc.cc}/lib:$out/jre/lib/amd64/jli" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./jre/bin/java
     patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./BMCSecurity/${stunnelBinary}
   '';
@@ -56,7 +54,7 @@ stdenv.mkDerivation rec {
     # WORK_DIR: unfortunately the ikvm related binaries are loaded from
     #           and user configuration is written to files in the CWD
     makeWrapper $out/jre/bin/java $out/bin/IPMIView \
-      --set LD_LIBRARY_PATH "${stdenv.lib.makeLibraryPath [ fontconfig ]}" \
+      --set LD_LIBRARY_PATH "${stdenv.lib.makeLibraryPath [ fontconfig gcc-unwrapped.lib ]}" \
       --prefix PATH : "$out/jre/bin:${iputils}/bin:${psmisc}/bin" \
       --add-flags "-jar $out/IPMIView20.jar" \
       --run 'WORK_DIR=''${XDG_DATA_HOME:-~/.local/share}/ipmiview

@iamdenchik
Copy link
Contributor Author

@vlaci thx man! build succesed

@ofborg ofborg bot requested a review from vlaci December 9, 2020 11:02
pkgs/applications/misc/ipmiview/default.nix Outdated Show resolved Hide resolved
@vlaci
Copy link
Contributor

vlaci commented Dec 9, 2020

Just one nitpick, please keep the original commit message header IPMIView: 2.17.0 -> 2.18.0.
The contribution guide contains further information on commit messages https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md#submitting-changes

@iamdenchik
Copy link
Contributor Author

Just one nitpick, please keep the original commit message header IPMIView: 2.17.0 -> 2.18.0.
The contribution guide contains further information on commit messages https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md#submitting-changes

fixed

@vlaci
Copy link
Contributor

vlaci commented Dec 9, 2020

LGTM

Thank you, for the contribution!

@ofborg ofborg bot requested a review from vlaci December 9, 2020 14:05
@iamdenchik
Copy link
Contributor Author

LGTM

Thank you, for the contribution!

thank you to you!

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 106428 run on x86_64-linux 1

1 package built:
  • ipmiview

@iamdenchik
Copy link
Contributor Author

@vlaci Hello!

when will this task be merged to master?

@vlaci
Copy link
Contributor

vlaci commented Dec 10, 2020

As soon as a maintainer with write access picks it up. I can review packages I maintain but I am not able to merge.

@iamdenchik
Copy link
Contributor Author

As soon as a maintainer with write access picks it up. I can review packages I maintain but I am not able to merge.

got it

@iamdenchik
Copy link
Contributor Author

@mweinelt pls, approve

Copy link
Member

@mweinelt mweinelt left a comment

Choose a reason for hiding this comment

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

Tested by logging into an X7SPA board, checking sensors, opening KVM console. LGTM

@mweinelt mweinelt merged commit dbfbbab into NixOS:master Dec 13, 2020
@iamdenchik
Copy link
Contributor Author

@mweinelt Hello!

When merge this commit to nixpkgs-unstable?

I have to create PR for merge?

@vlaci
Copy link
Contributor

vlaci commented Dec 16, 2020

The nixpkgs manual contains some information how and when the channels are updated. TL; DR nixpkgs-unstable is usually updated in every few days. No need for additional PR.

@iamdenchik
Copy link
Contributor Author

The nixpkgs manual contains some information how and when the channels are updated. TL; DR nixpkgs-unstable is usually updated in every few days. No need for additional PR.

thx!

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