forked from mirrors/nixpkgs
portmap: remove
rpcbind is used instead
This commit is contained in:
parent
5fb5914c35
commit
1426779072
|
@ -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;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -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);
|
|
|
@ -10464,8 +10464,6 @@ with pkgs;
|
||||||
|
|
||||||
pies = callPackage ../servers/pies { };
|
pies = callPackage ../servers/pies { };
|
||||||
|
|
||||||
portmap = callPackage ../servers/portmap { };
|
|
||||||
|
|
||||||
rpcbind = callPackage ../servers/rpcbind { };
|
rpcbind = callPackage ../servers/rpcbind { };
|
||||||
|
|
||||||
mariadb = callPackage ../servers/sql/mariadb {
|
mariadb = callPackage ../servers/sql/mariadb {
|
||||||
|
|
|
@ -127,12 +127,12 @@ with import ./release-lib.nix { inherit supportedSystems; };
|
||||||
perl = all;
|
perl = all;
|
||||||
pkgconfig = all;
|
pkgconfig = all;
|
||||||
pmccabe = linux;
|
pmccabe = linux;
|
||||||
portmap = linux;
|
|
||||||
procps = linux;
|
procps = linux;
|
||||||
python = allBut cygwin;
|
python = allBut cygwin;
|
||||||
readline = all;
|
readline = all;
|
||||||
rlwrap = all;
|
rlwrap = all;
|
||||||
rpm = linux;
|
rpm = linux;
|
||||||
|
rpcbind = linux;
|
||||||
rsync = linux;
|
rsync = linux;
|
||||||
screen = linux ++ darwin;
|
screen = linux ++ darwin;
|
||||||
scrot = linux;
|
scrot = linux;
|
||||||
|
|
Loading…
Reference in a new issue