dhcp: remove

reached its EOL on 2022-10-04
see https://www.isc.org/blogs/isc-dhcp-eol/ for details
This commit is contained in:
ajs124 2023-04-04 12:53:42 +02:00
parent 8d34cf8e7d
commit 001f224fcc
5 changed files with 1 additions and 117 deletions

View file

@ -1,102 +0,0 @@
{ stdenv, fetchurl, perl, file, nettools, iputils, iproute2, makeWrapper
, coreutils, gnused, openldap ? null
, buildPackages, lib
# client and relay are end of life, remove after 4.4.3
, withClient ? false
, withRelay ? false
}:
stdenv.mkDerivation rec {
pname = "dhcp";
version = "4.4.3-P1";
src = fetchurl {
url = "https://ftp.isc.org/isc/dhcp/${version}/${pname}-${version}.tar.gz";
sha256 = "sha256-CsQWu1WZfKhjIXT9EHN/1hzbjbonUhYKM1d1vCHcc8c=";
};
patches =
[
# Make sure that the hostname gets set on reboot. Without this
# patch, the hostname doesn't get set properly if the old
# hostname (i.e. before reboot) is equal to the new hostname.
./set-hostname.patch
];
nativeBuildInputs = [ perl makeWrapper ];
buildInputs = [ openldap ];
depsBuildBuild = [ buildPackages.stdenv.cc ];
configureFlags = [
"--enable-failover"
"--enable-execute"
"--enable-tracing"
"--enable-delayed-ack"
"--enable-dhcpv6"
"--enable-paranoia"
"--enable-early-chroot"
"--sysconfdir=/etc"
"--localstatedir=/var"
] ++ lib.optional stdenv.isLinux "--with-randomdev=/dev/random"
++ lib.optionals (openldap != null) [ "--with-ldap" "--with-ldapcrypto" ]
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "BUILD_CC=$(CC_FOR_BUILD)";
env.NIX_CFLAGS_COMPILE = builtins.toString [
"-Wno-error=pointer-compare"
"-Wno-error=format-truncation"
"-Wno-error=stringop-truncation"
"-Wno-error=format-overflow"
"-Wno-error=stringop-overflow=8"
];
installFlags = [ "DESTDIR=\${out}" ];
postInstall =
''
mv $out/$out/* $out
DIR=$out/$out
while rmdir $DIR 2>/dev/null; do
DIR="$(dirname "$DIR")"
done
cp client/scripts/linux $out/sbin/dhclient-script
substituteInPlace $out/sbin/dhclient-script \
--replace /sbin/ip ${iproute2}/sbin/ip
wrapProgram "$out/sbin/dhclient-script" --prefix PATH : \
"${nettools}/bin:${nettools}/sbin:${iputils}/bin:${coreutils}/bin:${gnused}/bin"
'' + lib.optionalString (!withClient) ''
rm $out/sbin/{dhclient,dhclient-script,.dhclient-script-wrapped}
'' + lib.optionalString (!withRelay) ''
rm $out/sbin/dhcrelay
'';
preConfigure =
''
substituteInPlace configure --replace "/usr/bin/file" "${file}/bin/file"
sed -i "includes/dhcpd.h" \
-e "s|^ *#define \+_PATH_DHCLIENT_SCRIPT.*$|#define _PATH_DHCLIENT_SCRIPT \"$out/sbin/dhclient-script\"|g"
export AR='${stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar'
'';
enableParallelBuilding = true;
meta = with lib; {
description = "Dynamic Host Configuration Protocol (DHCP) tools";
longDescription = ''
ISC's Dynamic Host Configuration Protocol (DHCP) distribution
provides a freely redistributable reference implementation of
all aspects of DHCP, through a suite of DHCP tools: server,
client, and relay agent.
'';
homepage = "https://www.isc.org/dhcp/";
license = licenses.mpl20;
platforms = platforms.unix;
knownVulnerabilities = lib.optional (withClient || withRelay) "The client and relay component of the dhcp package have reached their end of life";
};
}

View file

@ -1,12 +0,0 @@
--- a/client/scripts/linux 2010-09-15 00:49:48.000000000 +0200
+++ b/client/scripts/linux 2011-04-01 16:08:10.984372269 +0200
@@ -133,9 +133,7 @@
[ "$current_hostname" = '(none)' ] ||
[ "$current_hostname" = 'localhost' ] ||
[ "$current_hostname" = "$old_host_name" ]; then
- if [ "$new_host_name" != "$old_host_name" ]; then
- hostname "$new_host_name"
- fi
+ hostname "$new_host_name"
fi
fi

View file

@ -399,6 +399,7 @@ mapAliases ({
devserver = throw "'devserver' has been removed in favor of 'miniserve' or other alternatives"; # Added 2023-01-13
dfu-util-axoloti = throw "dfu-util-axoloti has been removed: abandoned by upstream"; # Added 2022-05-13
dhall-text = throw "'dhall-text' has been deprecated in favor of the 'dhall text' command from 'dhall'"; # Added 2022-03-26
dhcp = throw "dhcp (ISC DHCP) has been removed from nixpkgs, because it reached its end of life"; # Added 2023-04-04
digikam5 = throw "'digikam5' has been renamed to/replaced by 'digikam'"; # Converted to throw 2022-02-22
dirmngr = throw "dirmngr has been removed: merged into gnupg"; # Added 2022-05-13
disper = throw "disper has been removed: abandoned by upstream"; # Added 2022-03-18

View file

@ -7211,8 +7211,6 @@ with pkgs;
dnsx = callPackage ../tools/security/dnsx { };
dhcp = callPackage ../tools/networking/dhcp { };
dhcpdump = callPackage ../tools/networking/dhcpdump { };
dhcpcd = callPackage ../tools/networking/dhcpcd { };

View file

@ -36,7 +36,6 @@ with import ./release-lib.nix { inherit supportedSystems nixpkgsArgs; };
cron = linux;
cups = linux;
dbus = linux;
dhcp = linux;
diffutils = all;
e2fsprogs = linux;
emacs = linux;