From 1426779072a5396107b63ee6b6ba3e449816535c Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Tue, 31 Jan 2017 12:44:57 +0300 Subject: [PATCH] portmap: remove rpcbind is used instead --- pkgs/servers/portmap/default.nix | 45 ------------------------- pkgs/servers/portmap/reuse-socket.patch | 38 --------------------- pkgs/top-level/all-packages.nix | 2 -- pkgs/top-level/release-small.nix | 2 +- 4 files changed, 1 insertion(+), 86 deletions(-) delete mode 100644 pkgs/servers/portmap/default.nix delete mode 100644 pkgs/servers/portmap/reuse-socket.patch diff --git a/pkgs/servers/portmap/default.nix b/pkgs/servers/portmap/default.nix deleted file mode 100644 index e53690ebc113..000000000000 --- a/pkgs/servers/portmap/default.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ fetchurl, stdenv, lib, tcp_wrappers -, daemonUser ? false, daemonUID ? false, daemonGID ? false }: - -assert daemonUser -> (!daemonUID && !daemonGID); - -stdenv.mkDerivation rec { - name = "portmap-6.0"; - - src = fetchurl { - url = "http://neil.brown.name/portmap/${name}.tgz"; - sha256 = "1pj13ll4mbfwjwpn3fbg03qq9im6v2i8fcpa3ffp4viykz9j1j02"; - }; - - patches = [ ./reuse-socket.patch ]; - - postPatch = '' - substituteInPlace "Makefile" --replace "/usr/share" "" \ - --replace "install -o root -g root" "install" - ''; - - makeFlags = - lib.optional (daemonUser != false) "RPCUSER=\"${daemonUser}\"" - ++ lib.optional (daemonUID != false) "DAEMON_UID=${toString daemonUID}" - ++ lib.optional (daemonGID != false) "DAEMON_GID=${toString daemonGID}"; - - buildInputs = [ tcp_wrappers ]; - - installPhase = '' - mkdir -p "$out/sbin" "$out/man/man8" - make install BASEDIR=$out - ''; - - meta = { - description = "ONC RPC portmapper"; - longDescription = '' - Portmap is part of the ONC RPC software collection implementing - remote procedure calls (RPCs) between computer programs. It is - widely used by NFS and NIS, among others. - ''; - - homepage = http://neil.brown.name/portmap/; - license = "BSD"; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/servers/portmap/reuse-socket.patch b/pkgs/servers/portmap/reuse-socket.patch deleted file mode 100644 index 7d1a0ca09524..000000000000 --- a/pkgs/servers/portmap/reuse-socket.patch +++ /dev/null @@ -1,38 +0,0 @@ -Set SO_REUSEADDR to ensure that portmap can restart properly. - -https://bugs.launchpad.net/ubuntu/+source/portmap/+bug/688550 - -=================================================================== ---- portmap-6.0.0.orig/portmap.c 2011-03-16 20:43:26.000000000 +0100 -+++ portmap-6.0.0/portmap.c 2011-03-17 07:30:17.000000000 +0100 -@@ -142,9 +142,9 @@ - * loopback interface address. - */ - -+static int on = 1; - #ifdef LOOPBACK_SETUNSET - static SVCXPRT *ludpxprt, *ltcpxprt; --static int on = 1; - #ifndef INADDR_LOOPBACK - #define INADDR_LOOPBACK ntohl(inet_addr("127.0.0.1")) - #endif -@@ -399,9 +399,7 @@ - syslog(LOG_ERR, "cannot create udp socket: %m"); - exit(1); - } --#ifdef LOOPBACK_SETUNSET - setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof on); --#endif - - memset((char *) &addr, 0, sizeof(addr)); - addr.sin_addr.s_addr = 0; -@@ -434,9 +432,7 @@ - syslog(LOG_ERR, "cannot create tcp socket: %m"); - exit(1); - } --#ifdef LOOPBACK_SETUNSET - setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof on); --#endif - if (bind(sock, (struct sockaddr *)&addr, len) != 0) { - syslog(LOG_ERR, "cannot bind tcp: %m"); - exit(1); diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c6566bb57101..c8dc9880740d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10464,8 +10464,6 @@ with pkgs; pies = callPackage ../servers/pies { }; - portmap = callPackage ../servers/portmap { }; - rpcbind = callPackage ../servers/rpcbind { }; mariadb = callPackage ../servers/sql/mariadb { diff --git a/pkgs/top-level/release-small.nix b/pkgs/top-level/release-small.nix index 8ab27bc171d9..86fbb0bf1b81 100644 --- a/pkgs/top-level/release-small.nix +++ b/pkgs/top-level/release-small.nix @@ -127,12 +127,12 @@ with import ./release-lib.nix { inherit supportedSystems; }; perl = all; pkgconfig = all; pmccabe = linux; - portmap = linux; procps = linux; python = allBut cygwin; readline = all; rlwrap = all; rpm = linux; + rpcbind = linux; rsync = linux; screen = linux ++ darwin; scrot = linux;