tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
Remove duplicate tcp-wrappers package
Eelco Dolstra
13 years ago
59e97917
ea1d49d0
+5
-128
8 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
tcp-wrappers
default.nix
have-strerror.patch
trivial-fixes.patch
os-specific
linux
nfs-utils
default.nix
tcp-wrappers
builder.sh
default.nix
servers
portmap
default.nix
top-level
all-packages.nix
-74
pkgs/development/libraries/tcp-wrappers/default.nix
···
1
1
-
x@{builderDefsPackage
2
2
-
, flex, bison
3
3
-
, ...}:
4
4
-
builderDefsPackage
5
5
-
(a :
6
6
-
let
7
7
-
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
8
8
-
[];
9
9
-
10
10
-
buildInputs = map (n: builtins.getAttr n x)
11
11
-
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
12
12
-
sourceInfo = rec {
13
13
-
baseName="tcp-wrappers";
14
14
-
version="7.6";
15
15
-
name="${baseName}-${version}";
16
16
-
url="http://ftp.porcupine.org/pub/security/tcp_wrappers_${version}.tar.gz";
17
17
-
hash="0p9ilj4v96q32klavx0phw9va21fjp8vpk11nbh6v2ppxnnxfhwm";
18
18
-
};
19
19
-
in
20
20
-
rec {
21
21
-
src = a.fetchurl {
22
22
-
url = sourceInfo.url;
23
23
-
sha256 = sourceInfo.hash;
24
24
-
};
25
25
-
26
26
-
inherit (sourceInfo) name version;
27
27
-
inherit buildInputs;
28
28
-
29
29
-
/* doConfigure should be removed if not needed */
30
30
-
phaseNames = ["setVars" "doUnpack" "fixMakefile" "doPatch"
31
31
-
"doMake" "doDeploy"];
32
32
-
33
33
-
patches = [./have-strerror.patch ./trivial-fixes.patch];
34
34
-
35
35
-
makeFlags = [
36
36
-
"REAL_DAEMON_DIR=$out/bin"
37
37
-
"STYLE='\"-DHAVE_STRERROR -DSYS_ERRLIST_DEFINED\"'"
38
38
-
"generic"
39
39
-
];
40
40
-
41
41
-
setVars = a.noDepEntry ''
42
42
-
export NIX_LDFLAGS="$NIX_LDFLAGS -lnsl"
43
43
-
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fPIC"
44
44
-
'';
45
45
-
46
46
-
fixMakefile = a.fullDepEntry ''
47
47
-
chmod u+w Makefile
48
48
-
echo 'libwrap.so: $(LIB_OBJ)' >> Makefile
49
49
-
echo ' ld $(LIB_OBJ) --shared -o libwrap.so' >> Makefile
50
50
-
'' ["minInit"];
51
51
-
52
52
-
doDeploy = a.fullDepEntry ''
53
53
-
mkdir -p "$out"/{sbin,lib}
54
54
-
make libwrap.so
55
55
-
cp libwrap.{a,so} "$out/lib"
56
56
-
find . -perm +111 -a ! -name '*.*' -exec cp '{}' "$out/sbin" ';'
57
57
-
'' ["defEnsureDir" "minInit"];
58
58
-
59
59
-
meta = {
60
60
-
description = "Network logging TCP wrappers";
61
61
-
maintainers = with a.lib.maintainers;
62
62
-
[
63
63
-
raskin
64
64
-
];
65
65
-
platforms = with a.lib.platforms;
66
66
-
linux;
67
67
-
license = "free-noncopyleft";
68
68
-
};
69
69
-
passthru = {
70
70
-
updateInfo = {
71
71
-
downloadPage = "http://ftp.porcupine.org/pub/security/index.html";
72
72
-
};
73
73
-
};
74
74
-
}) x
-20
pkgs/development/libraries/tcp-wrappers/have-strerror.patch
···
1
1
-
Debian patch
2
2
-
diff -ruN tcp_wrappers_7.6.orig/percent_m.c tcp_wrappers_7.6/percent_m.c
3
3
-
--- tcp_wrappers_7.6.orig/percent_m.c 1994-12-28 17:42:37.000000000 +0100
4
4
-
+++ tcp_wrappers_7.6/percent_m.c 2003-08-21 02:45:31.000000000 +0200
5
5
-
@@ -29,11 +29,15 @@
6
6
-
7
7
-
while (*bp = *cp)
8
8
-
if (*cp == '%' && cp[1] == 'm') {
9
9
-
+#ifdef HAVE_STRERROR
10
10
-
+ strcpy(bp, strerror(errno));
11
11
-
+#else
12
12
-
if (errno < sys_nerr && errno > 0) {
13
13
-
strcpy(bp, sys_errlist[errno]);
14
14
-
} else {
15
15
-
sprintf(bp, "Unknown error %d", errno);
16
16
-
}
17
17
-
+#endif
18
18
-
bp += strlen(bp);
19
19
-
cp += 2;
20
20
-
} else {
-27
pkgs/development/libraries/tcp-wrappers/trivial-fixes.patch
···
1
1
-
Debian patch
2
2
-
diff -ruNp tcp_wrappers_7.6.orig/options.c tcp_wrappers_7.6/options.c
3
3
-
--- tcp_wrappers_7.6.orig/options.c 2006-03-01 23:45:28.000000000 +0100
4
4
-
+++ tcp_wrappers_7.6/options.c 2006-03-01 22:55:44.000000000 +0100
5
5
-
@@ -41,6 +41,7 @@ static char sccsid[] = "@(#) options.c 1
6
6
-
#include <netinet/in.h>
7
7
-
#include <netdb.h>
8
8
-
#include <stdio.h>
9
9
-
+#include <unistd.h>
10
10
-
#include <syslog.h>
11
11
-
#include <pwd.h>
12
12
-
#include <grp.h>
13
13
-
diff -ruNp tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c
14
14
-
--- tcp_wrappers_7.6.orig/scaffold.c 2006-03-01 23:45:28.000000000 +0100
15
15
-
+++ tcp_wrappers_7.6/scaffold.c 2006-03-01 22:56:13.000000000 +0100
16
16
-
@@ -17,6 +17,7 @@ static char sccs_id[] = "@(#) scaffold.c
17
17
-
#include <arpa/inet.h>
18
18
-
#include <netdb.h>
19
19
-
#include <stdio.h>
20
20
-
+#include <stdlib.h>
21
21
-
#include <syslog.h>
22
22
-
#include <setjmp.h>
23
23
-
#include <string.h>
24
24
-
@@ -28,3 +28,2 @@
25
25
-
26
26
-
-extern char *malloc();
27
27
-
+2
-2
pkgs/os-specific/linux/nfs-utils/default.nix
···
1
1
-
{ fetchurl, stdenv, tcpWrapper, utillinux, libcap, libtirpc, libevent, libnfsidmap
1
1
+
{ fetchurl, stdenv, tcp_wrappers, utillinux, libcap, libtirpc, libevent, libnfsidmap
2
2
, lvm2, e2fsprogs }:
3
3
4
4
stdenv.mkDerivation rec {
···
10
10
};
11
11
12
12
buildInputs =
13
13
-
[ tcpWrapper utillinux libcap libtirpc libevent libnfsidmap
13
13
+
[ tcp_wrappers utillinux libcap libtirpc libevent libnfsidmap
14
14
lvm2 e2fsprogs
15
15
];
16
16
pkgs/os-specific/linux/tcp-wrapper/builder.sh
pkgs/os-specific/linux/tcp-wrappers/builder.sh
pkgs/os-specific/linux/tcp-wrapper/default.nix
pkgs/os-specific/linux/tcp-wrappers/default.nix
+2
-2
pkgs/servers/portmap/default.nix
···
1
1
-
{ fetchurl, stdenv, lib, tcpWrapper
1
1
+
{ fetchurl, stdenv, lib, tcp_wrappers
2
2
, daemonUser ? false, daemonUID ? false, daemonGID ? false }:
3
3
4
4
assert daemonUser -> (!daemonUID && !daemonGID);
···
23
23
++ lib.optional (daemonUID != false) "DAEMON_UID=${toString daemonUID}"
24
24
++ lib.optional (daemonGID != false) "DAEMON_GID=${toString daemonGID}";
25
25
26
26
-
buildInputs = [ tcpWrapper ];
26
26
+
buildInputs = [ tcp_wrappers ];
27
27
28
28
installPhase = ''
29
29
mkdir -p "$out/sbin" "$out/man/man8"
+1
-3
pkgs/top-level/all-packages.nix
···
4916
4916
4917
4917
tcltls = callPackage ../development/libraries/tcltls { };
4918
4918
4919
4919
-
tcp_wrappers = callPackage ../development/libraries/tcp-wrappers {};
4920
4920
-
4921
4919
tdb = callPackage ../development/libraries/tdb { };
4922
4920
4923
4921
tecla = callPackage ../development/libraries/tecla { };
···
6193
6191
};
6194
6192
6195
6193
# FIXME: `tcp-wrapper' is actually not OS-specific.
6196
6196
-
tcpWrapper = callPackage ../os-specific/linux/tcp-wrapper { };
6194
6194
+
tcp_wrappers = callPackage ../os-specific/linux/tcp-wrappers { };
6197
6195
6198
6196
trackballs = callPackage ../games/trackballs {
6199
6197
debug = false;