tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
dante: 1.4.3 -> 1.4.4
Alexei Robyn
1 year ago
eb6df4ea
aad4a0e6
+8
-193
3 changed files
expand all
collapse all
unified
split
pkgs
by-name
da
dante
clang-osint-m4.patch
dante-1.4.3-miniupnpc-2.2.8.patch
package.nix
+6
-13
pkgs/by-name/da/dante/clang-osint-m4.patch
···
1
1
diff -ur a/osdep.m4 b/osdep.m4
2
2
-
--- a/osdep.m4 2017-01-18 09:11:20.000000000 -0500
3
3
-
+++ b/osdep.m4 2023-10-21 12:43:59.464797030 -0400
2
2
+
--- a/osdep.m4 2024-11-20 08:07:22.000000000 +1100
3
3
+
+++ b/osdep.m4 2024-12-16 20:39:15.424935602 +1100
4
4
@@ -381,6 +381,7 @@
5
5
unset have_sa_len
6
6
AC_MSG_CHECKING([for sa_len in sockaddr])
···
9
9
#include <sys/types.h>
10
10
#include <sys/socket.h>
11
11
], [struct sockaddr sa;
12
12
-
@@ -397,12 +398,13 @@
12
12
+
@@ -397,6 +398,7 @@
13
13
unset sa_len_type_found
14
14
for type in uint8_t "unsigned char"; do
15
15
AC_TRY_COMPILE([
16
16
+#include <stdint.h>
17
17
#include <sys/types.h>
18
18
-
#include <sys/socket.h>], [
19
19
-
struct sockaddr sa;
20
20
-
$type *sa_len_ptr;
21
21
-
sa_len_ptr = &sa.sa_len;
22
22
-
-sa_len_ptr++; /* use to avoid warning/error */],
23
23
-
+(*sa_len_ptr)++; /* use to avoid warning/error */],
24
24
-
[AC_DEFINE_UNQUOTED(sa_len_type, [$type], [sa_len type])
25
25
-
sa_len_type_found=t
26
26
-
break])
27
27
-
@@ -636,6 +638,7 @@
18
18
+
#include <sys/socket.h>
19
19
+
#include <stdio.h>], [
20
20
+
@@ -640,6 +642,7 @@
28
21
in_port_t, in_addr_t],
29
22
, ,
30
23
[
-176
pkgs/by-name/da/dante/dante-1.4.3-miniupnpc-2.2.8.patch
···
1
1
-
diff --git a/include/autoconf.h.in b/include/autoconf.h.in
2
2
-
index bab2fcfa6c...22bc9202ca 100644
3
3
-
--- a/include/autoconf.h.in
4
4
-
+++ b/include/autoconf.h.in
5
5
-
@@ -797,6 +797,9 @@
6
6
-
/* UPNP support library 1.7 */
7
7
-
#undef HAVE_LIBMINIUPNP17
8
8
-
9
9
-
+/* UPNP support library 2.2.8 */
10
10
-
+#undef HAVE_LIBMINIUPNP228
11
11
-
+
12
12
-
/* Define to 1 if you have the `prldap60' library (-lprldap60). */
13
13
-
#undef HAVE_LIBPRLDAP60
14
14
-
15
15
-
diff --git a/include/common.h b/include/common.h
16
16
-
index 137f5ec51f...2c24759b52 100755
17
17
-
--- a/include/common.h
18
18
-
+++ b/include/common.h
19
19
-
@@ -1404,8 +1404,14 @@
20
20
-
/* return codes from UPNP_GetValidIGD(). */
21
21
-
#define UPNP_NO_IGD (0)
22
22
-
#define UPNP_CONNECTED_IGD (1)
23
23
-
+#if HAVE_LIBMINIUPNP228
24
24
-
+#define UPNP_RESERVED_IGD (2)
25
25
-
+#define UPNP_DISCONNECTED_IGD (3)
26
26
-
+#define UPNP_UNKNOWN_DEVICE (4)
27
27
-
+#else /* !HAVE_LIBMINIUPNP_228 */
28
28
-
#define UPNP_DISCONNECTED_IGD (2)
29
29
-
#define UPNP_UNKNOWN_DEVICE (3)
30
30
-
+#endif /* !HAVE_LIBMINIUPNP_228 */
31
31
-
32
32
-
#define UPNP_SUCCESS (1)
33
33
-
#define UPNP_FAILURE (2)
34
34
-
diff --git a/lib/upnp.c b/lib/upnp.c
35
35
-
index d9535ca03c...dc99d53c06 100644
36
36
-
--- a/lib/upnp.c
37
37
-
+++ b/lib/upnp.c
38
38
-
@@ -154,7 +154,7 @@
39
39
-
addrstring,
40
40
-
NULL,
41
41
-
0
42
42
-
-#if HAVE_LIBMINIUPNP17
43
43
-
+#if HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228
44
44
-
,0,
45
45
-
46
46
-
#if MINIUPNPC_API_VERSION >= 14
47
47
-
@@ -162,7 +162,7 @@
48
48
-
#endif /* MINIUPNPC_API_VERSION >= 14 */
49
49
-
50
50
-
&rc
51
51
-
-#endif /* HAVE_LIBMINIUPNP17 */
52
52
-
+#endif /* HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228 */
53
53
-
);
54
54
-
55
55
-
#if SOCKS_CLIENT && SOCKSLIBRARY_DYNAMIC
56
56
-
@@ -208,7 +208,12 @@
57
57
-
socks_autoadd_directroute(&commands, &protocols, &saddr, &smask);
58
58
-
}
59
59
-
60
60
-
+#if HAVE_LIBMINIUPNP228
61
61
-
+ devtype = UPNP_GetValidIGD(dev, &url, &data, myaddr, sizeof(myaddr),
62
62
-
+ NULL, 0);
63
63
-
+#else /* !HAVE_LIBMINIUPNP228 */
64
64
-
devtype = UPNP_GetValidIGD(dev, &url, &data, myaddr, sizeof(myaddr));
65
65
-
+#endif /* !HAVE_LIBMINIUPNP228 */
66
66
-
switch (devtype) {
67
67
-
case UPNP_NO_IGD:
68
68
-
snprintf(emsg, emsglen, "no UPNP IGD discovered on local network");
69
69
-
@@ -226,9 +231,10 @@
70
70
-
rc = 0;
71
71
-
break;
72
72
-
73
73
-
- case UPNP_DISCONNECTED_IGD:
74
74
-
+#if HAVE_LIBMINIUPNP228
75
75
-
+ case UPNP_RESERVED_IGD:
76
76
-
snprintf(emsg, emsglen,
77
77
-
- "UPNP IGD discovered at url %s, but it is not connected",
78
78
-
+ "UPNP IGD discovered at url %s, but its IP is reserved",
79
79
-
str2vis(url.controlURL,
80
80
-
strlen(url.controlURL),
81
81
-
vbuf,
82
82
-
@@ -236,6 +242,18 @@
83
83
-
84
84
-
swarnx("%s: %s", function, emsg);
85
85
-
rc = -1;
86
86
-
+#endif /* HAVE_LIBMINIUPNP228 */
87
87
-
+
88
88
-
+ case UPNP_DISCONNECTED_IGD:
89
89
-
+ snprintf(emsg, emsglen,
90
90
-
+ "UPNP IGD discovered at url %s, but it is not connected",
91
91
-
+ str2vis(url.controlURL,
92
92
-
+ strlen(url.controlURL),
93
93
-
+ vbuf,
94
94
-
+ sizeof(vbuf)));
95
95
-
+
96
96
-
+ swarnx("%s: %s", function, emsg);
97
97
-
+ rc = -1;
98
98
-
break;
99
99
-
100
100
-
case UPNP_UNKNOWN_DEVICE:
101
101
-
@@ -273,12 +291,12 @@
102
102
-
#if HAVE_LIBMINIUPNP13
103
103
-
STRCPY_ASSERTLEN(gw->state.data.upnp.servicetype, data.servicetype);
104
104
-
105
105
-
-#elif HAVE_LIBMINIUPNP14 || HAVE_LIBMINIUPNP17
106
106
-
+#elif HAVE_LIBMINIUPNP14 || HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228
107
107
-
STRCPY_ASSERTLEN(gw->state.data.upnp.servicetype, data.CIF.servicetype);
108
108
-
109
109
-
#else
110
110
-
# error "unexpected miniupnp version"
111
111
-
-#endif /* HAVE_LIBMINIUPNP17 */
112
112
-
+#endif /* HAVE_LIBMINIUPNP14 || HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228 */
113
113
-
114
114
-
slog(LOG_NEGOTIATE, "%s: inited ok. controlurl: %s, servicetype: %s",
115
115
-
function,
116
116
-
@@ -756,9 +774,9 @@
117
117
-
buf,
118
118
-
protocol,
119
119
-
NULL
120
120
-
-#if HAVE_LIBMINIUPNP17
121
121
-
+#if HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228
122
122
-
,0
123
123
-
-#endif /* HAVE_LIBMINIUPNP17 */
124
124
-
+#endif /* HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228 */
125
125
-
)) != UPNPCOMMAND_SUCCESS) {
126
126
-
snprintf(emsg, emsglen,
127
127
-
"UPNP_AddPortMapping() failed: %s", strupnperror(rc));
128
128
-
diff --git a/miniupnpc.m4 b/miniupnpc.m4
129
129
-
index 85086d4917...ebb8875763 100644
130
130
-
--- a/miniupnpc.m4
131
131
-
+++ b/miniupnpc.m4
132
132
-
@@ -20,7 +20,7 @@
133
133
-
LIBS=$oLIBS
134
134
-
fi
135
135
-
if test x"${have_libminiupnp}" = xt; then
136
136
-
- AC_MSG_CHECKING([for miniupnpc version >= 1.7])
137
137
-
+ AC_MSG_CHECKING([for miniupnpc version >= 2.2.8])
138
138
-
AC_TRY_COMPILE([
139
139
-
#include <stdio.h>
140
140
-
#include <miniupnpc/miniupnpc.h>
141
141
-
@@ -30,12 +30,34 @@
142
142
-
#ifndef MINIUPNPC_API_VERSION
143
143
-
#error "no api version define"
144
144
-
#else
145
145
-
- # if MINIUPNPC_API_VERSION < 8
146
146
-
+ # if MINIUPNPC_API_VERSION < 18
147
147
-
#error "api version too low"
148
148
-
# endif
149
149
-
#endif],
150
150
-
[AC_MSG_RESULT(yes)
151
151
-
AC_DEFINE(HAVE_LIBMINIUPNP, 1, [UPNP support library])
152
152
-
+ AC_DEFINE(HAVE_LIBMINIUPNP228, 1, [UPNP support library 2.2.8])
153
153
-
+ unset no_upnp
154
154
-
+ SOCKDDEPS="${SOCKDDEPS}${SOCKDDEPS:+ }$UPNPLIB"
155
155
-
+ DLIBDEPS="${DLIBDEPS}${DLIBDEPS:+ }$UPNPLIB"],
156
156
-
+ [AC_MSG_RESULT(no)])
157
157
-
+
158
158
-
+ AC_MSG_CHECKING([for miniupnpc version >= 1.7])
159
159
-
+ AC_TRY_COMPILE([
160
160
-
+ #include <stdio.h>
161
161
-
+ #include <miniupnpc/miniupnpc.h>
162
162
-
+ #include <miniupnpc/upnpcommands.h>
163
163
-
+ #include <miniupnpc/upnperrors.h>], [
164
164
-
+
165
165
-
+ #ifndef MINIUPNPC_API_VERSION
166
166
-
+ #error "no api version define"
167
167
-
+ #else
168
168
-
+ # if MINIUPNPC_API_VERSION < 8 || MINIUPNPC_API_VERSION > 17
169
169
-
+ #error "api version too low or high"
170
170
-
+ # endif
171
171
-
+ #endif],
172
172
-
+ [AC_MSG_RESULT(yes)
173
173
-
+ AC_DEFINE(HAVE_LIBMINIUPNP, 1, [UPNP support library])
174
174
-
AC_DEFINE(HAVE_LIBMINIUPNP17, 1, [UPNP support library 1.7])
175
175
-
unset no_upnp
176
176
-
SOCKDDEPS="${SOCKDDEPS}${SOCKDDEPS:+ }$UPNPLIB"
+2
-4
pkgs/by-name/da/dante/package.nix
···
17
17
in
18
18
stdenv.mkDerivation rec {
19
19
pname = "dante";
20
20
-
version = "1.4.3";
20
20
+
version = "1.4.4";
21
21
22
22
src = fetchurl {
23
23
url = "https://www.inet.no/dante/files/${pname}-${version}.tar.gz";
24
24
-
sha256 = "0pbahkj43rx7rmv2x40mf5p3g3x9d6i2sz7pzglarf54w5ghd2j1";
24
24
+
sha256 = "sha256-GXPHcy8fnwpMDM8sHORix8JQYLJWQ+qQ+bmPU6gT+uw=";
25
25
};
26
26
27
27
nativeBuildInputs = [ autoreconfHook ];
···
46
46
# Fixes several issues with `osint.m4` that causes incorrect check failures when using newer
47
47
# versions of clang: missing `stdint.h` for `uint8_t` and unused `sa_len_ptr`.
48
48
./clang-osint-m4.patch
49
49
-
# Fixes build with miniupnpc 2.2.8.
50
50
-
./dante-1.4.3-miniupnpc-2.2.8.patch
51
49
]
52
50
++ lib.optionals remove_getaddrinfo_checks [
53
51
(fetchpatch {