Merge pull request #58215 from primeos/iputils
iputils: 20180629 -> 20190324
This commit is contained in:
commit
c4eff69dca
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/ninfod/meson.build b/ninfod/meson.build
|
||||||
|
index ea7ec1b..fada05b 100644
|
||||||
|
--- a/ninfod/meson.build
|
||||||
|
+++ b/ninfod/meson.build
|
||||||
|
@@ -10,7 +10,7 @@ ninfod_sources = files('''
|
||||||
|
ninfod_name.c
|
||||||
|
'''.split())
|
||||||
|
executable('ninfod', [ninfod_sources, git_version_h],
|
||||||
|
- dependencies : [cap_dep, crypto_dep, rt_dep, threads],
|
||||||
|
+ dependencies : [cap_dep, dependency('openssl'), rt_dep, threads],
|
||||||
|
link_with : [libcommon],
|
||||||
|
include_directories : inc,
|
||||||
|
install: true,
|
@ -1,12 +1,12 @@
|
|||||||
{ stdenv, fetchFromGitHub, fetchpatch
|
{ stdenv, fetchFromGitHub, fetchpatch
|
||||||
, libxslt, docbook_xsl, docbook_xml_dtd_44
|
, meson, ninja, pkgconfig, gettext, libxslt, docbook_xsl_ns
|
||||||
, libcap, nettle, libidn2, openssl
|
, libcap, nettle, libidn2, openssl, systemd
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
time = "20180629";
|
time = "20190324";
|
||||||
# ninfod probably could build on cross, but the Makefile doesn't pass --host
|
# ninfod probably could build on cross, but the Makefile doesn't pass --host
|
||||||
# etc to the sub configure...
|
# etc to the sub configure...
|
||||||
withNinfod = stdenv.hostPlatform == stdenv.buildPlatform;
|
withNinfod = stdenv.hostPlatform == stdenv.buildPlatform;
|
||||||
@ -21,63 +21,37 @@ in stdenv.mkDerivation {
|
|||||||
owner = "iputils";
|
owner = "iputils";
|
||||||
repo = "iputils";
|
repo = "iputils";
|
||||||
rev = "s${time}";
|
rev = "s${time}";
|
||||||
sha256 = "19rpl48pjgmyqlm4h7sml5gy7yg4cxciadxcs24q1zj40c05jls0";
|
sha256 = "0b755gv3370c0rrphx14mrsqjb396zqnsm9lsws842a4k4zrqmvi";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
# ninfod cannot be build with nettle yet:
|
||||||
(fetchpatch {
|
patches =
|
||||||
name = "dont-hardcode-the-location-of-xsltproc.patch";
|
[ ./build-ninfod-with-openssl.patch
|
||||||
url = "https://github.com/iputils/iputils/commit/d0ff83e87ea9064d9215a18e93076b85f0f9e828.patch";
|
(fetchpatch { # tracepath: fix musl build, again
|
||||||
sha256 = "05wrwf0bfmax69bsgzh3b40n7rvyzw097j8z5ix0xsg0kciygjvx";
|
url = "https://github.com/iputils/iputils/commit/c9aca1b53324bcd1b5a2de5c645813f80eccd016.patch";
|
||||||
})
|
sha256 = "0faqgkqbi57cyx1zgzzy6xgd24xr0iawix7mjs47j92ra9gw90cz";
|
||||||
(fetchpatch {
|
})
|
||||||
name = "add-missing-idn-declarations.patch";
|
(fetchpatch { # doc: Use namespace correctly
|
||||||
url = "https://github.com/iputils/iputils/commit/5007d7067918fb3d950d34c01d059e5222db679a.patch";
|
url = "https://github.com/iputils/iputils/commit/c503834519d21973323980850431101f90e663ef.patch";
|
||||||
sha256 = "0dhgxdhjcbb2q6snm3mjp38l066knykmrx4k8rn167cizn7akpdx";
|
sha256 = "1yp6b6403ddccbhfzsb36cscxd36d4xb8syc1g02a18xkswiwf09";
|
||||||
})
|
})
|
||||||
(fetchpatch {
|
];
|
||||||
name = "fix-ping-idn.patch";
|
|
||||||
url = "https://github.com/iputils/iputils/commit/25899e849aa3abc1ad29ebf0b830262a859eaed5.patch";
|
|
||||||
sha256 = "1bqjcdjjnc2j6indcli7s7gbbhkcaligvh94asixfrmjzkbn533n";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
prePatch = ''
|
mesonFlags =
|
||||||
substituteInPlace doc/custom-man.xsl \
|
[ "-DUSE_CRYPTO=nettle"
|
||||||
--replace "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl" "${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl"
|
"-DBUILD_RARPD=true"
|
||||||
for xmlFile in doc/*.xml; do
|
"-DBUILD_TRACEROUTE6=true"
|
||||||
substituteInPlace $xmlFile \
|
"-Dsystemdunitdir=etc/systemd/system"
|
||||||
--replace "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" "${docbook_xml_dtd_44}/xml/dtd/docbook/docbookx.dtd"
|
]
|
||||||
done
|
++ optional (!withNinfod) "-DBUILD_NINFOD=false"
|
||||||
'';
|
# Disable idn usage w/musl (https://github.com/iputils/iputils/pull/111):
|
||||||
|
++ optional stdenv.hostPlatform.isMusl "-DUSE_IDN=false";
|
||||||
|
|
||||||
# Disable idn usage w/musl: https://github.com/iputils/iputils/pull/111
|
nativeBuildInputs = [ meson ninja pkgconfig gettext libxslt.bin docbook_xsl_ns libcap ];
|
||||||
makeFlags = optional stdenv.hostPlatform.isMusl "USE_IDN=no";
|
buildInputs = [ libcap nettle systemd ]
|
||||||
|
|
||||||
nativeBuildInputs = [ libxslt.bin ];
|
|
||||||
buildInputs = [ libcap nettle ]
|
|
||||||
++ optional (!stdenv.hostPlatform.isMusl) libidn2
|
++ optional (!stdenv.hostPlatform.isMusl) libidn2
|
||||||
++ optional withNinfod openssl; # TODO: Build with nettle
|
++ optional withNinfod openssl; # TODO: Build with nettle
|
||||||
|
|
||||||
buildFlags = "man all" + optionalString withNinfod " ninfod";
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
mkdir -p $out/share/man/man8
|
|
||||||
|
|
||||||
for tool in arping clockdiff ping rarpd rdisc tftpd tracepath traceroute6; do
|
|
||||||
cp $tool $out/bin/
|
|
||||||
cp doc/$tool.8 $out/share/man/man8/
|
|
||||||
done
|
|
||||||
|
|
||||||
# TODO: Requires kernel module pg3
|
|
||||||
cp ipg $out/bin/
|
|
||||||
cp doc/pg3.8 $out/share/man/man8/
|
|
||||||
'' + optionalString withNinfod ''
|
|
||||||
cp ninfod/ninfod $out/bin/
|
|
||||||
cp doc/ninfod.8 $out/share/man/man8/
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = https://github.com/iputils/iputils;
|
homepage = https://github.com/iputils/iputils;
|
||||||
description = "A set of small useful utilities for Linux networking";
|
description = "A set of small useful utilities for Linux networking";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user