summary refs log tree commit diff
path: root/pkgs/os-specific/linux
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-02-26 09:53:31 +0000
committerLudovic Courtès <ludo@gnu.org>2009-02-26 09:53:31 +0000
commite221d7ce6111e8d00a9228c685327b969b4e8d35 (patch)
treebee6e7a44e972b176266e9ba4dcccdd5477aaf03 /pkgs/os-specific/linux
parenta54392bc53795978bb4ed7b1cf04d08dcd6b7ff0 (diff)
downloadnixpkgs-e221d7ce6111e8d00a9228c685327b969b4e8d35.tar
nixpkgs-e221d7ce6111e8d00a9228c685327b969b4e8d35.tar.gz
nixpkgs-e221d7ce6111e8d00a9228c685327b969b4e8d35.tar.bz2
nixpkgs-e221d7ce6111e8d00a9228c685327b969b4e8d35.tar.lz
nixpkgs-e221d7ce6111e8d00a9228c685327b969b4e8d35.tar.xz
nixpkgs-e221d7ce6111e8d00a9228c685327b969b4e8d35.tar.zst
nixpkgs-e221d7ce6111e8d00a9228c685327b969b4e8d35.zip
TCP Wrappers: Use the Debian patches.
It has the following side effects (among others):

  * Fix compilation on x86_64.  We now only install the shared
    library and one of the Debian patches makes sure its objects
    are compiled with `-fPIC'.

  * Provide IPv6 support.

  * Fix man pages.

  * Fix `linux' makefile target.


svn path=/nixpkgs/trunk/; revision=14255
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r--pkgs/os-specific/linux/tcp-wrapper/builder.sh62
-rw-r--r--pkgs/os-specific/linux/tcp-wrapper/default.nix28
2 files changed, 58 insertions, 32 deletions
diff --git a/pkgs/os-specific/linux/tcp-wrapper/builder.sh b/pkgs/os-specific/linux/tcp-wrapper/builder.sh
index fe8ad8d466e..6cb91110530 100644
--- a/pkgs/os-specific/linux/tcp-wrapper/builder.sh
+++ b/pkgs/os-specific/linux/tcp-wrapper/builder.sh
@@ -1,37 +1,39 @@
 source "$stdenv/setup" || exit 1
 
 # Unpack
-unpackPhase &&							\
-cd "$sourceRoot/upstream/tarballs" &&				\
-tar xzvf * &&							\
-cd tcp_wrappers_7.6 &&						\
-								\
+unpackPhase
+cd "$sourceRoot/upstream/tarballs"
+tar xzvf *
+cd tcp_wrappers_7.6
+
 # Patch
+patchPhase
+for patch in debian/patches/*
+do
+  echo "applying Debian patch \`$(basename $patch)'..."
+  patch -p1 < $patch
+done
+
 substituteInPlace "Makefile" --replace				\
    "REAL_DAEMON_DIR=/usr/sbin" "REAL_DAEMON_DIR=$out/sbin"	\
-   --replace "/tmp" '$$TMPDIR' &&				\
-substituteInPlace "scaffold.c" --replace			\
-   'extern char *malloc();' " " &&				\
-substituteInPlace "environ.c" --replace				\
-   'extern char *malloc();' " " &&				\
-								\
-# The `linux' target doesn't work on Linux...
-echo building... &&						\
-make REAL_DAEMON_DIR="$out/sbin" freebsd &&			\
-								\
+   --replace "/tmp" '$$TMPDIR'
+
+echo "building..."
+make REAL_DAEMON_DIR="$out/sbin" linux
+
 # Install
-ensureDir "$out/sbin" &&					\
-cp safe_finger tcpd tcpdchk tcpdmatch try-from "$out/sbin" &&	\
-								\
-ensureDir "$out/lib" &&						\
-cp lib*.a "$out/lib" &&						\
-								\
-ensureDir "$out/include" &&					\
-cp *.h "$out/include" && 					\
-								\
-ensureDir "$out/man" &&						\
-for i in 3 5 8;							\
-do								\
-  ensureDir "$out/man/man$i" &&					\
-  cp *.$i "$out/man/man$i" ;					\
-done								\
+ensureDir "$out/sbin"
+cp -v safe_finger tcpd tcpdchk tcpdmatch try-from "$out/sbin"
+
+ensureDir "$out/lib"
+cp -v shared/lib*.so* "$out/lib"
+
+ensureDir "$out/include"
+cp -v *.h "$out/include"
+
+ensureDir "$out/man"
+for i in 3 5 8;
+do
+  ensureDir "$out/man/man$i"
+  cp *.$i "$out/man/man$i" ;
+done
diff --git a/pkgs/os-specific/linux/tcp-wrapper/default.nix b/pkgs/os-specific/linux/tcp-wrapper/default.nix
index d5984e649a5..a3f79cd05a8 100644
--- a/pkgs/os-specific/linux/tcp-wrapper/default.nix
+++ b/pkgs/os-specific/linux/tcp-wrapper/default.nix
@@ -7,8 +7,32 @@ stdenv.mkDerivation {
     url = mirror://debian/pool/main/t/tcp-wrappers/tcp-wrappers_7.6.dbs.orig.tar.gz;
     sha256 = "0k68ziinx6biwar5lcb9jvv0rp6b3vmj6861n75bvrz4w1piwkdp";
   };
-  
+
+  patches = [
+    (fetchurl {
+       url = mirror://debian/pool/main/t/tcp-wrappers/tcp-wrappers_7.6.dbs-13.diff.gz;
+       sha256 = "071ir20rh8ckhgrc0y99wgnlbqjgkprf0qwbv84lqw5i6qajbcnh";
+     })
+  ];
+
   builder = ./builder.sh;
 
-  # meta = ...
+  meta = {
+    description = "TCP Wrappers, a network logger, also known as TCPD or LOG_TCP";
+
+    longDescription = ''
+      Wietse Venema's network logger, also known as TCPD or LOG_TCP.
+      These programs log the client host name of incoming telnet, ftp,
+      rsh, rlogin, finger etc. requests.  Security options are: access
+      control per host, domain and/or service; detection of host name
+      spoofing or host address spoofing; booby traps to implement an
+      early-warning system.  The current version supports the System
+      V.4 TLI network programming interface (Solaris, DG/UX) in
+      addition to the traditional BSD sockets.
+    '';
+
+    homepage = ftp://ftp.porcupine.org/pub/security/index.html;
+
+    license = "BSD-style";
+  };
 }