Merge pull request #198166 from helsinki-systems/upd/open-iscsi
openiscsi: 2.1.7 -> 2.1.8
This commit is contained in:
commit
02256184b9
@ -1,55 +1,60 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, automake, autoconf, libtool, gettext
|
{ stdenv
|
||||||
, util-linux, open-isns, openssl, kmod, perl, systemd, pkgconf, nixosTests
|
, lib
|
||||||
}:
|
, fetchFromGitHub
|
||||||
|
, meson
|
||||||
|
, pkg-config
|
||||||
|
, ninja
|
||||||
|
, perl
|
||||||
|
, util-linux
|
||||||
|
, open-isns
|
||||||
|
, openssl
|
||||||
|
, kmod
|
||||||
|
, systemd
|
||||||
|
, runtimeShell
|
||||||
|
, nixosTests }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "open-iscsi";
|
pname = "open-iscsi";
|
||||||
version = "2.1.7";
|
version = "2.1.8";
|
||||||
|
|
||||||
nativeBuildInputs = [ autoconf automake gettext libtool perl pkgconf ];
|
|
||||||
buildInputs = [ kmod open-isns.lib openssl systemd util-linux ];
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "open-iscsi";
|
owner = "open-iscsi";
|
||||||
repo = "open-iscsi";
|
repo = "open-iscsi";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-R1ttHHxVSQ5TGtWVy4I9BAmEJfcRhKRD5jThoeddjUw=";
|
hash = "sha256-JzSyX9zvUkhCEpNwTMneTZpCRgaYxHZ1wP215YnMI78=";
|
||||||
};
|
};
|
||||||
|
|
||||||
DESTDIR = "$(out)";
|
nativeBuildInputs = [
|
||||||
|
meson
|
||||||
NIX_LDFLAGS = "-lkmod -lsystemd";
|
pkg-config
|
||||||
NIX_CFLAGS_COMPILE = "-DUSE_KMOD";
|
ninja
|
||||||
|
perl
|
||||||
|
];
|
||||||
|
buildInputs = [
|
||||||
|
kmod
|
||||||
|
(lib.getLib open-isns)
|
||||||
|
openssl
|
||||||
|
systemd
|
||||||
|
util-linux
|
||||||
|
];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
# Remove blanket -Werror. Fails for minor error on gcc-11.
|
patchShebangs .
|
||||||
substituteInPlace usr/Makefile --replace ' -Werror ' ' '
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# avoid /usr/bin/install
|
prePatch = ''
|
||||||
makeFlags = [
|
substituteInPlace etc/systemd/iscsi-init.service.template \
|
||||||
"INSTALL=install"
|
--replace /usr/bin/sh ${runtimeShell}
|
||||||
"SED=sed"
|
sed -i '/install_dir: db_root/d' meson.build
|
||||||
"prefix=/"
|
'';
|
||||||
"manprefix=/share"
|
|
||||||
|
mesonFlags = [
|
||||||
|
"-Discsi_sbindir=${placeholder "out"}/sbin"
|
||||||
|
"-Drulesdir=${placeholder "out"}/etc/udev/rules.d"
|
||||||
|
"-Dsystemddir=${placeholder "out"}/lib/systemd"
|
||||||
|
"-Ddbroot=/etc/iscsi"
|
||||||
];
|
];
|
||||||
|
|
||||||
installFlags = [
|
|
||||||
"install"
|
|
||||||
];
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
cp usr/iscsistart $out/sbin/
|
|
||||||
for f in $out/lib/systemd/system/*; do
|
|
||||||
substituteInPlace $f --replace /sbin $out/bin
|
|
||||||
done
|
|
||||||
$out/sbin/iscsistart -v
|
|
||||||
'';
|
|
||||||
|
|
||||||
postFixup = ''
|
|
||||||
sed -i "s|/sbin/iscsiadm|$out/bin/iscsiadm|" $out/bin/iscsi_fw_login
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.tests = { inherit (nixosTests) iscsi-root iscsi-multipath-root; };
|
passthru.tests = { inherit (nixosTests) iscsi-root iscsi-multipath-root; };
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user