Merge ~liushuyu-011/ubuntu/+source/ucspi-tcp:ubuntu/devel into ubuntu/+source/ucspi-tcp:ubuntu/devel

Proposed by Zixing Liu
Status: Merged
Merged at revision: b0dcbc77aaa4fe878001b945677423ec749ebe5b
Proposed branch: ~liushuyu-011/ubuntu/+source/ucspi-tcp:ubuntu/devel
Merge into: ubuntu/+source/ucspi-tcp:ubuntu/devel
Diff against target: 479 lines (+375/-22)
4 files modified
debian/changelog (+8/-0)
debian/ipv6-support.patch (+10/-22)
debian/patches/0006-implicit-declarations.patch (+356/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Steve Langasek (community) Approve
Review via email: mp+464230@code.launchpad.net

Description of the change

This MP fixes an FTBFS issue on armhf where a lot of headers and prototype definitions are missing.

To post a comment you must log in.
Revision history for this message
Zixing Liu (liushuyu-011) wrote :
Revision history for this message
Zixing Liu (liushuyu-011) :
Revision history for this message
Steve Langasek (vorlon) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index f488aa0..62a8b7b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
1ucspi-tcp (1:0.88-8ubuntu1) noble; urgency=medium
2
3 * debian/patches/0006-implicit-declarations.patch: Add missing
4 includes and prototypes. Closes LP: #2061188.
5 * debian/ipv6-support.patch: Refresh deferred patch.
6
7 -- Zixing Liu <zixing.liu@canonical.com> Fri, 12 Apr 2024 14:33:32 -0600
8
1ucspi-tcp (1:0.88-8build1) noble; urgency=medium9ucspi-tcp (1:0.88-8build1) noble; urgency=medium
210
3 * No-change rebuild for CVE-2024-309411 * No-change rebuild for CVE-2024-3094
diff --git a/debian/ipv6-support.patch b/debian/ipv6-support.patch
index 81e50c2..0d6350b 100644
--- a/debian/ipv6-support.patch
+++ b/debian/ipv6-support.patch
@@ -741,7 +741,7 @@ diff --git a/dns.h b/dns.h
741index 0948b1a..f06c5a8 100644741index 0948b1a..f06c5a8 100644
742--- a/dns.h742--- a/dns.h
743+++ b/dns.h743+++ b/dns.h
744@@ -34,51 +34,60 @@ struct dns_transmit {744@@ -34,51 +34,61 @@ struct dns_transmit {
745 unsigned int curserver;745 unsigned int curserver;
746 struct taia deadline;746 struct taia deadline;
747 unsigned int pos;747 unsigned int pos;
@@ -812,6 +812,7 @@ index 0948b1a..f06c5a8 100644
812-extern int dns_mx_packet(stralloc *,char *,unsigned int);812-extern int dns_mx_packet(stralloc *,char *,unsigned int);
813-extern int dns_mx(stralloc *,stralloc *);813-extern int dns_mx(stralloc *,stralloc *);
814+extern int dns_name4(stralloc *,const char *);814+extern int dns_name4(stralloc *,const char *);
815+extern int dns_name6(stralloc *,char *);
815+extern int dns_txt_packet(stralloc *,const char *,unsigned int);816+extern int dns_txt_packet(stralloc *,const char *,unsigned int);
816+extern int dns_txt(stralloc *,const stralloc *);817+extern int dns_txt(stralloc *,const stralloc *);
817+extern int dns_mx_packet(stralloc *,const char *,unsigned int);818+extern int dns_mx_packet(stralloc *,const char *,unsigned int);
@@ -1330,11 +1331,6 @@ diff --git a/dns_random.c b/dns_random.c
1330index b9892b4..2158ed4 1006441331index b9892b4..2158ed4 100644
1331--- a/dns_random.c1332--- a/dns_random.c
1332+++ b/dns_random.c1333+++ b/dns_random.c
1333@@ -1,3 +1,4 @@
1334+#include <unistd.h>
1335 #include "dns.h"
1336 #include "taia.h"
1337 #include "uint32.h"
1338@@ -29,7 +30,7 @@ static void surf(void)1334@@ -29,7 +30,7 @@ static void surf(void)
1339 }1335 }
1340 }1336 }
@@ -1433,8 +1429,8 @@ diff --git a/dns_rcrw.c b/dns_rcrw.c
1433index 6f215ac..b0c8e6d 1006441429index 6f215ac..b0c8e6d 100644
1434--- a/dns_rcrw.c1430--- a/dns_rcrw.c
1435+++ b/dns_rcrw.c1431+++ b/dns_rcrw.c
1436@@ -1,16 +1,17 @@1432@@ -1,16 +1,16 @@
1437+#include <unistd.h>1433 #include <unistd.h>
1438 #include "taia.h"1434 #include "taia.h"
1439-#include "env.h"1435-#include "env.h"
1440 #include "byte.h"1436 #include "byte.h"
@@ -1511,17 +1507,7 @@ diff --git a/dns_transmit.c b/dns_transmit.c
1511index df12826..9511511 1006441507index df12826..9511511 100644
1512--- a/dns_transmit.c1508--- a/dns_transmit.c
1513+++ b/dns_transmit.c1509+++ b/dns_transmit.c
1514@@ -1,12 +1,15 @@1510@@ -7,7 +7,8 @@
1515+#include <sys/types.h>
1516+#include <sys/socket.h>
1517+#include <unistd.h>
1518+#include <stdlib.h>
1519 #include "socket.h"
1520-#include "alloc.h"
1521-#include "error.h"
1522+#include <errno.h>
1523 #include "byte.h"
1524-#include "readwrite.h"
1525 #include "uint16.h"1511 #include "uint16.h"
1526 #include "dns.h"1512 #include "dns.h"
1527+#include "ip6.h"1513+#include "ip6.h"
@@ -1985,7 +1971,7 @@ index 0000000..88ff120
1985+#include "byte.h"1971+#include "byte.h"
1986+1972+
1987+extern unsigned int scan_ip6(const char *src,char *ip);1973+extern unsigned int scan_ip6(const char *src,char *ip);
1988+extern unsigned int fmt_ip6(char *dest,const char *ip);1974+extern unsigned int ip6_fmt(char *dest,char *ip);
1989+1975+
1990+extern unsigned int scan_ip6_flat(const char *src,char *);1976+extern unsigned int scan_ip6_flat(const char *src,char *);
1991+extern unsigned int fmt_ip6_flat(char *dest,const char *);1977+extern unsigned int fmt_ip6_flat(char *dest,const char *);
@@ -2357,7 +2343,8 @@ new file mode 100644
2357index 0000000..cf3b7c12343index 0000000..cf3b7c1
2358--- /dev/null2344--- /dev/null
2359+++ b/remoteinfo6.c2345+++ b/remoteinfo6.c
2360@@ -0,0 +1,98 @@2346@@ -0,0 +1,99 @@
2347+#include <unistd.h>
2361+#include "fmt.h"2348+#include "fmt.h"
2362+#include "buffer.h"2349+#include "buffer.h"
2363+#include "socket.h"2350+#include "socket.h"
@@ -3065,7 +3052,8 @@ new file mode 100644
3065index 0000000..74099e23052index 0000000..74099e2
3066--- /dev/null3053--- /dev/null
3067+++ b/socket_tcp6.c3054+++ b/socket_tcp6.c
3068@@ -0,0 +1,44 @@3055@@ -0,0 +1,45 @@
3056+#include <unistd.h>
3069+#include <sys/types.h>3057+#include <sys/types.h>
3070+#include <sys/param.h>3058+#include <sys/param.h>
3071+#include <sys/socket.h>3059+#include <sys/socket.h>
diff --git a/debian/patches/0006-implicit-declarations.patch b/debian/patches/0006-implicit-declarations.patch
3072new file mode 1006443060new file mode 100644
index 0000000..412d9cc
--- /dev/null
+++ b/debian/patches/0006-implicit-declarations.patch
@@ -0,0 +1,356 @@
1Description: Add missing includes and prototypes
2Author: Zixing Liu <zixing.liu@canonical.com>
3Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066629
4Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ucspi-tcp/+bug/2061188
5Forwarded: no
6Last-Update: 2024-04-12
7---
8This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
9Index: ucspi-tcp/dns_random.c
10===================================================================
11--- ucspi-tcp.orig/dns_random.c
12+++ ucspi-tcp/dns_random.c
13@@ -1,3 +1,4 @@
14+#include <unistd.h>
15 #include "dns.h"
16 #include "taia.h"
17 #include "uint32.h"
18Index: ucspi-tcp/dns_rcrw.c
19===================================================================
20--- ucspi-tcp.orig/dns_rcrw.c
21+++ ucspi-tcp/dns_rcrw.c
22@@ -1,3 +1,4 @@
23+#include <unistd.h>
24 #include "taia.h"
25 #include "env.h"
26 #include "byte.h"
27Index: ucspi-tcp/remoteinfo.c
28===================================================================
29--- ucspi-tcp.orig/remoteinfo.c
30+++ ucspi-tcp/remoteinfo.c
31@@ -1,3 +1,4 @@
32+#include <unistd.h>
33 #include "fmt.h"
34 #include "buffer.h"
35 #include "socket.h"
36Index: ucspi-tcp/tcpserver.c
37===================================================================
38--- ucspi-tcp.orig/tcpserver.c
39+++ ucspi-tcp/tcpserver.c
40@@ -1,3 +1,4 @@
41+#include <unistd.h>
42 #include <sys/types.h>
43 #include <sys/param.h>
44 #include <netdb.h>
45@@ -63,7 +64,8 @@ static stralloc addresses;
46 char bspace[16];
47 buffer b;
48
49-
50+int socket_ipoptionskill(int s);
51+int socket_tcpnodelay(int s);
52
53 /* ---------------------------- child */
54
55Index: ucspi-tcp/auto-str.c
56===================================================================
57--- ucspi-tcp.orig/auto-str.c
58+++ ucspi-tcp/auto-str.c
59@@ -1,7 +1,6 @@
60 #include "buffer.h"
61 #include "readwrite.h"
62 #include "exit.h"
63-
64 char bspace[256];
65 buffer b = BUFFER_INIT(write,1,bspace,sizeof bspace);
66
67Index: ucspi-tcp/chkshsgr.c
68===================================================================
69--- ucspi-tcp.orig/chkshsgr.c
70+++ ucspi-tcp/chkshsgr.c
71@@ -1,3 +1,5 @@
72+#include <unistd.h>
73+#include <grp.h>
74 #include "exit.h"
75
76 main()
77Index: ucspi-tcp/dns_transmit.c
78===================================================================
79--- ucspi-tcp.orig/dns_transmit.c
80+++ ucspi-tcp/dns_transmit.c
81@@ -1,8 +1,12 @@
82+#include <sys/types.h>
83+#include <sys/socket.h>
84+#include <unistd.h>
85+#include <stdlib.h>
86 #include "socket.h"
87+#include <errno.h>
88 #include "alloc.h"
89 #include "error.h"
90 #include "byte.h"
91-#include "readwrite.h"
92 #include "uint16.h"
93 #include "dns.h"
94
95Index: ucspi-tcp/fd_copy.c
96===================================================================
97--- ucspi-tcp.orig/fd_copy.c
98+++ ucspi-tcp/fd_copy.c
99@@ -1,4 +1,5 @@
100 #include <fcntl.h>
101+#include <unistd.h>
102 #include "fd.h"
103
104 int fd_copy(int to,int from)
105Index: ucspi-tcp/fd_move.c
106===================================================================
107--- ucspi-tcp.orig/fd_move.c
108+++ ucspi-tcp/fd_move.c
109@@ -1,3 +1,4 @@
110+#include <unistd.h>
111 #include "fd.h"
112
113 int fd_move(int to,int from)
114Index: ucspi-tcp/fixcrio.c
115===================================================================
116--- ucspi-tcp.orig/fixcrio.c
117+++ ucspi-tcp/fixcrio.c
118@@ -1,3 +1,5 @@
119+#include <unistd.h>
120+#include "fd.h"
121 #include "sig.h"
122 #include "buffer.h"
123 #include "strerr.h"
124Index: ucspi-tcp/hier.c
125===================================================================
126--- ucspi-tcp.orig/hier.c
127+++ ucspi-tcp/hier.c
128@@ -1,5 +1,9 @@
129 #include "auto_home.h"
130
131+void h(char *home, int uid, int gid, int mode);
132+void d(char *home, char *subdir, int uid, int gid, int mode);
133+void c(char *home, char *subdir, char *file, int uid, int gid, int mode);
134+
135 void hier()
136 {
137 h(auto_home,-1,-1,02755);
138Index: ucspi-tcp/install.c
139===================================================================
140--- ucspi-tcp.orig/install.c
141+++ ucspi-tcp/install.c
142@@ -1,3 +1,5 @@
143+#include <sys/stat.h>
144+#include <unistd.h>
145 #include "buffer.h"
146 #include "strerr.h"
147 #include "error.h"
148Index: ucspi-tcp/instcheck.c
149===================================================================
150--- ucspi-tcp.orig/instcheck.c
151+++ ucspi-tcp/instcheck.c
152@@ -1,5 +1,6 @@
153 #include <sys/types.h>
154 #include <sys/stat.h>
155+#include <unistd.h>
156 #include "strerr.h"
157 #include "error.h"
158 #include "readwrite.h"
159Index: ucspi-tcp/mconnect-io.c
160===================================================================
161--- ucspi-tcp.orig/mconnect-io.c
162+++ ucspi-tcp/mconnect-io.c
163@@ -1,3 +1,4 @@
164+#include <signal.h>
165 #include "sig.h"
166 #include "wait.h"
167 #include "fork.h"
168Index: ucspi-tcp/pathexec_run.c
169===================================================================
170--- ucspi-tcp.orig/pathexec_run.c
171+++ ucspi-tcp/pathexec_run.c
172@@ -1,3 +1,4 @@
173+#include <unistd.h>
174 #include "error.h"
175 #include "stralloc.h"
176 #include "str.h"
177Index: ucspi-tcp/prot.c
178===================================================================
179--- ucspi-tcp.orig/prot.c
180+++ ucspi-tcp/prot.c
181@@ -1,3 +1,5 @@
182+#include <unistd.h>
183+#include <grp.h>
184 #include "hasshsgr.h"
185 #include "prot.h"
186
187Index: ucspi-tcp/rblsmtpd.c
188===================================================================
189--- ucspi-tcp.orig/rblsmtpd.c
190+++ ucspi-tcp/rblsmtpd.c
191@@ -1,3 +1,4 @@
192+#include <unistd.h>
193 #include "byte.h"
194 #include "str.h"
195 #include "scan.h"
196Index: ucspi-tcp/readclose.c
197===================================================================
198--- ucspi-tcp.orig/readclose.c
199+++ ucspi-tcp/readclose.c
200@@ -1,3 +1,4 @@
201+#include <unistd.h>
202 #include "readwrite.h"
203 #include "error.h"
204 #include "readclose.h"
205Index: ucspi-tcp/recordio.c
206===================================================================
207--- ucspi-tcp.orig/recordio.c
208+++ ucspi-tcp/recordio.c
209@@ -1,3 +1,5 @@
210+#include <unistd.h>
211+#include "fd.h"
212 #include "sig.h"
213 #include "buffer.h"
214 #include "strerr.h"
215Index: ucspi-tcp/seek_set.c
216===================================================================
217--- ucspi-tcp.orig/seek_set.c
218+++ ucspi-tcp/seek_set.c
219@@ -1,3 +1,4 @@
220+#include <unistd.h>
221 #include <sys/types.h>
222 #include "seek.h"
223
224Index: ucspi-tcp/sig_pause.c
225===================================================================
226--- ucspi-tcp.orig/sig_pause.c
227+++ ucspi-tcp/sig_pause.c
228@@ -1,3 +1,4 @@
229+#define __USE_XOPEN_EXTENDED 1
230 #include <signal.h>
231 #include "sig.h"
232 #include "hassgprm.h"
233Index: ucspi-tcp/socket_tcp.c
234===================================================================
235--- ucspi-tcp.orig/socket_tcp.c
236+++ ucspi-tcp/socket_tcp.c
237@@ -1,3 +1,4 @@
238+#include <unistd.h>
239 #include <sys/types.h>
240 #include <sys/param.h>
241 #include <sys/socket.h>
242Index: ucspi-tcp/socket_udp.c
243===================================================================
244--- ucspi-tcp.orig/socket_udp.c
245+++ ucspi-tcp/socket_udp.c
246@@ -1,3 +1,4 @@
247+#include <unistd.h>
248 #include <sys/types.h>
249 #include <sys/param.h>
250 #include <sys/socket.h>
251Index: ucspi-tcp/tcpclient.c
252===================================================================
253--- ucspi-tcp.orig/tcpclient.c
254+++ ucspi-tcp/tcpclient.c
255@@ -1,6 +1,7 @@
256 #include <sys/types.h>
257 #include <sys/param.h>
258 #include <netdb.h>
259+#include <unistd.h>
260 #include "sig.h"
261 #include "exit.h"
262 #include "sgetopt.h"
263@@ -24,6 +25,7 @@
264 #define FATAL "tcpclient: fatal: "
265 #define CONNECT "tcpclient: unable to connect to "
266
267+int socket_tcpnodelay(int s);
268 void nomem(void)
269 {
270 strerr_die2x(111,FATAL,"out of memory");
271Index: ucspi-tcp/tcprules.c
272===================================================================
273--- ucspi-tcp.orig/tcprules.c
274+++ ucspi-tcp/tcprules.c
275@@ -1,3 +1,7 @@
276+#include <stdio.h>
277+#include <unistd.h>
278+#include "scan.h"
279+#include "open.h"
280 #include "strerr.h"
281 #include "stralloc.h"
282 #include "getln.h"
283Index: ucspi-tcp/tcprulescheck.c
284===================================================================
285--- ucspi-tcp.orig/tcprulescheck.c
286+++ ucspi-tcp/tcprulescheck.c
287@@ -1,3 +1,5 @@
288+#include <unistd.h>
289+#include "open.h"
290 #include "byte.h"
291 #include "buffer.h"
292 #include "strerr.h"
293Index: ucspi-tcp/trypoll.c
294===================================================================
295--- ucspi-tcp.orig/trypoll.c
296+++ ucspi-tcp/trypoll.c
297@@ -1,3 +1,4 @@
298+#include <unistd.h>
299 #include <sys/types.h>
300 #include <fcntl.h>
301 #include <poll.h>
302Index: ucspi-tcp/tryshsgr.c
303===================================================================
304--- ucspi-tcp.orig/tryshsgr.c
305+++ ucspi-tcp/tryshsgr.c
306@@ -1,3 +1,5 @@
307+#include <unistd.h>
308+#include <grp.h>
309 main()
310 {
311 short x[4];
312Index: ucspi-tcp/tryulong32.c
313===================================================================
314--- ucspi-tcp.orig/tryulong32.c
315+++ ucspi-tcp/tryulong32.c
316@@ -1,4 +1,6 @@
317-main()
318+#include <unistd.h>
319+
320+int main()
321 {
322 unsigned long u;
323 u = 1;
324Index: ucspi-tcp/tryulong64.c
325===================================================================
326--- ucspi-tcp.orig/tryulong64.c
327+++ ucspi-tcp/tryulong64.c
328@@ -1,4 +1,5 @@
329-main()
330+#include <unistd.h>
331+int main()
332 {
333 unsigned long u;
334 u = 1;
335Index: ucspi-tcp/tryvfork.c
336===================================================================
337--- ucspi-tcp.orig/tryvfork.c
338+++ ucspi-tcp/tryvfork.c
339@@ -1,3 +1,4 @@
340+#include <unistd.h>
341 main()
342 {
343 vfork();
344Index: ucspi-tcp/readwrite.h
345===================================================================
346--- ucspi-tcp.orig/readwrite.h
347+++ ucspi-tcp/readwrite.h
348@@ -1,7 +1,6 @@
349 #ifndef READWRITE_H
350 #define READWRITE_H
351
352-extern int read();
353-extern int write();
354+#include <unistd.h>
355
356 #endif
diff --git a/debian/patches/series b/debian/patches/series
index 84c9cf3..d010a64 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
30003-Makefile-target-choose-do-not-depend-on-conf-home.diff30003-Makefile-target-choose-do-not-depend-on-conf-home.diff
40004-respect-DESTDIR-variable.patch40004-respect-DESTDIR-variable.patch
50005-build-verbose.patch50005-build-verbose.patch
60006-implicit-declarations.patch

Subscribers

People subscribed via source and target branches

to all changes: