summary refs log tree commit diff
path: root/pkgs/os-specific/linux/fanctl
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2017-09-23 17:55:33 +0200
committerRobin Gloster <mail@glob.in>2017-09-23 17:55:33 +0200
commit08b09fdc5cff4249c9986f2403d2e4cea6e62feb (patch)
treec9031e38dc5ee93d877bf539be9352eda59a61d0 /pkgs/os-specific/linux/fanctl
parent694e7e08d65d6d66b5e50a02c7a329ecec598f3c (diff)
downloadnixpkgs-08b09fdc5cff4249c9986f2403d2e4cea6e62feb.tar
nixpkgs-08b09fdc5cff4249c9986f2403d2e4cea6e62feb.tar.gz
nixpkgs-08b09fdc5cff4249c9986f2403d2e4cea6e62feb.tar.bz2
nixpkgs-08b09fdc5cff4249c9986f2403d2e4cea6e62feb.tar.lz
nixpkgs-08b09fdc5cff4249c9986f2403d2e4cea6e62feb.tar.xz
nixpkgs-08b09fdc5cff4249c9986f2403d2e4cea6e62feb.tar.zst
nixpkgs-08b09fdc5cff4249c9986f2403d2e4cea6e62feb.zip
fanctl, fan module: remove
This has been broken nearly all the time due to the patches needed to
iproute2 not being compatible with the newer versions we have been
shipping. As long as Ubuntu does not manage to upstream these changes
so they are maintained with iproute2 and we don't have a maintainer
updating these patches to new iproute2 versions it is not feasible to
have this available.
Diffstat (limited to 'pkgs/os-specific/linux/fanctl')
-rw-r--r--pkgs/os-specific/linux/fanctl/default.nix46
-rw-r--r--pkgs/os-specific/linux/fanctl/robustness.patch85
2 files changed, 0 insertions, 131 deletions
diff --git a/pkgs/os-specific/linux/fanctl/default.nix b/pkgs/os-specific/linux/fanctl/default.nix
deleted file mode 100644
index 5fdcfa58382..00000000000
--- a/pkgs/os-specific/linux/fanctl/default.nix
+++ /dev/null
@@ -1,46 +0,0 @@
-{ stdenv, lib, fetchurl, gnugrep, glibc, gawk, coreutils, bridge-utils, iproute
-, dnsmasq, iptables, kmod, utillinux, gnused }:
-
-stdenv.mkDerivation rec {
-  name = "fanctl-${version}";
-
-  version = "0.12.0";
-
-  src = fetchurl {
-    url = "https://launchpad.net/ubuntu/+archive/primary/+files/ubuntu-fan_${version}.tar.xz";
-    sha256 = "0lj7371n06sg5mlbbfgvm0qhzgp464n6v55rgs7kmmx4d37gb5fl";
-  };
-
-  # The Ubuntu package creates a number of state/config directories upon
-  # installation, and so the fanctl script expects those directories to exist
-  # before being used. Instead, we patch the fanctl script to gracefully handle
-  # the fact that the directories might not exist yet.
-  # Also, when dnsmasq is given --conf-file="", it will still attempt to read
-  # /etc/dnsmasq.conf; if that file does not exist, dnsmasq subsequently fails,
-  # so we'll use /dev/null, which actually works as intended.
-  patches = [ ./robustness.patch ];
-
-  postPatch = ''
-    substituteInPlace fanctl \
-      --replace '@PATH@' \
-                '${lib.makeBinPath [
-                     gnugrep gawk coreutils bridge-utils iproute dnsmasq
-                     iptables kmod utillinux gnused
-                     glibc # needed for getent
-                   ]}'
-  '';
-
-  installPhase = ''
-    mkdir -p $out/bin $out/man/man8
-    cp fanctl.8 $out/man/man8
-    cp fanctl $out/bin
-  '';
-
-  meta = with lib; {
-    description = "Ubuntu FAN network support enablement";
-    homepage = https://launchpad.net/ubuntu/+source/ubuntu-fan;
-    license = licenses.gpl2;
-    platforms = platforms.linux;
-    maintainers = with maintainers; [ cstrahan ];
-  };
-}
diff --git a/pkgs/os-specific/linux/fanctl/robustness.patch b/pkgs/os-specific/linux/fanctl/robustness.patch
deleted file mode 100644
index 7a70a784e3e..00000000000
--- a/pkgs/os-specific/linux/fanctl/robustness.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-diff --git a/fanctl b/fanctl
-index 4338b75..84cf987 100755
---- a/fanctl
-+++ b/fanctl
-@@ -5,6 +5,8 @@
- #   fanctl down 15 10.1.0.1
- #
- 
-+export PATH="@PATH@"
-+
- usage()
- {
- 	echo "Usage: $0 <cmd> [<options>...]" 1>&2
-@@ -23,8 +25,8 @@ run()
- 	"$@"
- }
- 
--state_dir="/run/ubuntu-fan"
--lconfig_dir="/var/lib/ubuntu-fan/config"
-+state_dir="/run/fan-networking"
-+lconfig_dir="/var/lib/fan-networking/config"
- 
- __ip_split()
- {
-@@ -931,12 +933,12 @@ dhcp_reconfigure()
- 		--strict-order \
- 		--bind-interfaces \
- 		--pid-file="$state_dir/dnsmasq-$C_bridge_state.pid" \
--		--conf-file= \
-+		--conf-file=/dev/null \
- 		$dhcp_flags \
- 		--dhcp-no-override \
- 		--except-interface=lo \
- 		--interface="$C_bridge" \
--		--dhcp-leasefile=/var/lib/misc/dnsmasq."$C_bridge_state".leases \
-+		--dhcp-leasefile=/var/lib/fan-networking/dnsmasq."$C_bridge_state".leases \
- 		--dhcp-authoritative \
- 	    || $fail "$C_bridge: failed to start dnsmasq"
- 
-@@ -1559,21 +1561,23 @@ cmd_config()
- 
- 	case "$cmd" in
- 	list|ls)
--		ls -1 "$lconfig_dir" | \
--		while read config
--		do
--			case "$config" in
--			*.conf)		;;
--			*)		continue ;;
--			esac
-+		if [ -d $lconfig_dir ]; then
-+			ls -1 "$lconfig_dir" | \
-+			while read config
-+			do
-+				case "$config" in
-+				*.conf)		;;
-+				*)		continue ;;
-+				esac
- 
--			config=$( echo "$config" | sed \
--				-e 's/.conf$//' \
--				-e 's/--/ /g' \
--				-e 's@-@/@g'
--			)
--			echo "$config"
--		done
-+				config=$( echo "$config" | sed \
-+					-e 's/.conf$//' \
-+					-e 's/--/ /g' \
-+					-e 's@-@/@g'
-+				)
-+				echo "$config"
-+			done
-+		fi
- 		;;
- 	show)
- 		cmd_decode_init
-@@ -1588,6 +1592,7 @@ cmd_config()
- 		[ -f "$uconfig" ] && cat "$uconfig"
- 		;;
- 	set)
-+		mkdir -p $lconfig_dir || fail "could not create config directory ($lconfig_dir)"
- 		cmd_decode_init
- 		if ! cmd_decode_config "config set" "$@"; then
- 			fail "invalid config"