Merge pull request #80987 from andir/ipmitool

ipmitool: migrate to openssl 1.1
This commit is contained in:
worldofpeace 2020-03-01 14:10:11 +00:00 committed by GitHub
commit 851aac4055
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 15 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, openssl, static ? false }: { stdenv, lib, fetchurl, openssl, fetchpatch, static ? false }:
let let
pkgname = "ipmitool"; pkgname = "ipmitool";
@ -12,19 +12,31 @@ stdenv.mkDerivation {
sha256 = "0kfh8ny35rvwxwah4yv91a05qwpx74b5slq2lhrh71wz572va93m"; sha256 = "0kfh8ny35rvwxwah4yv91a05qwpx74b5slq2lhrh71wz572va93m";
}; };
patchPhase = stdenv.lib.optionalString stdenv.isDarwin '' patches = [
substituteInPlace src/plugins/ipmi_intf.c --replace "s6_addr16" "s6_addr" (fetchpatch {
''; url = "https://sources.debian.org/data/main/i/ipmitool/1.8.18-6/debian/patches/0120-openssl1.1.patch";
sha256 = "1xvsjxb782lzy72bnqqnsk3r5h4zl3na95s4pqn2qg7cic2mnbfk";
})
# Fix build on non-linux systems
(fetchpatch {
url = "https://github.com/ipmitool/ipmitool/commit/5db314f694f75c575cd7c9ffe9ee57aaf3a88866.patch";
sha256 = "01niwrgajhrdhl441gzmw6v1r1yc3i8kn98db4b6smfn5fwdp1pa";
})
];
buildInputs = [ openssl ]; buildInputs = [ openssl ];
preConfigure = '' configureFlags = [
configureFlagsArray=( "--infodir=${placeholder "out"}/share/info"
--infodir=$out/share/info "--mandir=${placeholder "out"}/share/man"
--mandir=$out/share/man ] ++ stdenv.lib.optionals static [
${if static then "LDFLAGS=-static --enable-static --disable-shared" else "--enable-shared"} "LDFLAGS=-static"
) "--enable-static"
''; "--disable-shared"
] ++ stdenv.lib.optionals (!static) [
"--enable-shared"
];
makeFlags = stdenv.lib.optional static "AM_LDFLAGS=-all-static"; makeFlags = stdenv.lib.optional static "AM_LDFLAGS=-all-static";
dontDisableStatic = static; dontDisableStatic = static;
@ -32,7 +44,7 @@ stdenv.mkDerivation {
description = ''Command-line interface to IPMI-enabled devices''; description = ''Command-line interface to IPMI-enabled devices'';
license = licenses.bsd3; license = licenses.bsd3;
homepage = https://sourceforge.net/projects/ipmitool/; homepage = https://sourceforge.net/projects/ipmitool/;
platforms = platforms.linux; platforms = platforms.unix;
maintainers = with maintainers; [ fpletz ]; maintainers = with maintainers; [ fpletz ];
}; };
} }

View File

@ -4263,9 +4263,7 @@ in
ipget = callPackage ../applications/networking/ipget { }; ipget = callPackage ../applications/networking/ipget { };
ipmitool = callPackage ../tools/system/ipmitool { ipmitool = callPackage ../tools/system/ipmitool {};
openssl = openssl_1_0_2;
};
ipmiutil = callPackage ../tools/system/ipmiutil {}; ipmiutil = callPackage ../tools/system/ipmiutil {};