Codebase list rust-stfu8 / 61f49e2
condure - new upstream version. Peter Michael Green 2 years ago
9 changed file(s) with 430 addition(s) and 192 deletion(s). Raw diff Collapse all Expand all
0 rust-condure (1.4.1-1) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
1
2 * Team upload.
3 * Package condure 1.4.1 from crates.io using debcargo 2.5.0
4 * Update patches for new upstream
5 + drop rustc-1.43-compat.diff no longer needed
6 + update disable-lib.diff for changes in upstream Cargo.toml
7 + rewrite arrayvec-0.7.patch for changes in upstream code
8
9 -- Peter Michael Green <plugwash@debian.org> Thu, 20 Jan 2022 21:45:15 +0000
10
011 rust-condure (1.1.0-4) unstable; urgency=medium
112
213 * Team upload.
1010 librust-clap-2+default-dev (>= 2.33-~~),
1111 librust-clap-2+wrap-help-dev (>= 2.33-~~),
1212 librust-httparse-1+default-dev (>= 1.3-~~),
13 librust-iovec-0.1+default-dev,
1413 librust-log-0.4+default-dev,
15 librust-mio-0.6+default-dev,
14 librust-mio-0.7+default-dev,
15 librust-mio-0.7+net-dev,
16 librust-mio-0.7+os-ext-dev,
17 librust-mio-0.7+os-poll-dev,
1618 librust-openssl-0.10+default-dev,
19 librust-paste-1+default-dev,
1720 librust-sha1-0.6+default-dev,
18 librust-signal-hook-0.1+default-dev,
19 librust-signal-hook-0.1+mio-support-dev,
21 librust-signal-hook-0.3+default-dev,
2022 librust-slab-0.4+default-dev,
2123 librust-time-0.1+default-dev,
2224 librust-zmq-0.9+default-dev,
1010 librust-clap-2+default-dev (>= 2.33-~~),
1111 librust-clap-2+wrap-help-dev (>= 2.33-~~),
1212 librust-httparse-1+default-dev (>= 1.3-~~),
13 librust-iovec-0.1+default-dev,
1413 librust-log-0.4+default-dev,
15 librust-mio-0.6+default-dev,
14 librust-mio-0.7+default-dev,
15 librust-mio-0.7+net-dev,
16 librust-mio-0.7+os-ext-dev,
17 librust-mio-0.7+os-poll-dev,
1618 librust-openssl-0.10+default-dev,
19 librust-paste-1+default-dev,
1720 librust-sha1-0.6+default-dev,
18 librust-signal-hook-0.1+default-dev,
19 librust-signal-hook-0.1+mio-support-dev,
21 librust-signal-hook-0.3+default-dev,
2022 librust-slab-0.4+default-dev,
2123 librust-time-0.1+default-dev,
2224 librust-zmq-0.9+default-dev,
3941 librust-clap-2+default-dev (>= 2.33-~~),
4042 librust-clap-2+wrap-help-dev (>= 2.33-~~),
4143 librust-httparse-1+default-dev (>= 1.3-~~),
42 librust-iovec-0.1+default-dev,
4344 librust-log-0.4+default-dev,
44 librust-mio-0.6+default-dev,
45 librust-mio-0.7+default-dev,
46 librust-mio-0.7+net-dev,
47 librust-mio-0.7+os-ext-dev,
48 librust-mio-0.7+os-poll-dev,
4549 librust-openssl-0.10+default-dev,
50 librust-paste-1+default-dev,
4651 librust-sha1-0.6+default-dev,
47 librust-signal-hook-0.1+default-dev,
48 librust-signal-hook-0.1+mio-support-dev,
52 librust-signal-hook-0.3+default-dev,
4953 librust-slab-0.4+default-dev,
5054 librust-time-0.1+default-dev,
5155 librust-zmq-0.9+default-dev
5357 librust-condure+default-dev (= ${binary:Version}),
5458 librust-condure-1-dev (= ${binary:Version}),
5559 librust-condure-1+default-dev (= ${binary:Version}),
56 librust-condure-1.1-dev (= ${binary:Version}),
57 librust-condure-1.1+default-dev (= ${binary:Version}),
58 librust-condure-1.1.0-dev (= ${binary:Version}),
59 librust-condure-1.1.0+default-dev (= ${binary:Version})
60 librust-condure-1.4-dev (= ${binary:Version}),
61 librust-condure-1.4+default-dev (= ${binary:Version}),
62 librust-condure-1.4.1-dev (= ${binary:Version}),
63 librust-condure-1.4.1+default-dev (= ${binary:Version})
6064 Description: HTTP/WebSocket connection manager - Rust source code
6165 This package contains the source for the Rust condure crate, packaged by
6266 debcargo for use with cargo and dh-cargo.
44
55 Files: *
66 Copyright: 2020 Justin Karneges <justin@fanout.io>
7 Copyright: 2020 Fanout, Inc.
7 Copyright: 2020-2021 Fanout, Inc.
8 License: Apache-2.0
9
10 Files: ./src/shuffle.rs
11 Copyright:
12 2016 Alex Crichton
13 2017 The Tokio Authors
814 License: Apache-2.0
915
1016 Files: debian/*
1117 Copyright:
12 2020 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
18 2020-2022 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
1319 2020 Jan Niehusmann <jan@debian.org>
1420 License: Apache-2.0
1521
1919 before uploading to the archive.
2020
2121 Files: ./src/app.rs
22 Copyright: 2020 Fanout, Inc.
22 Copyright: 2020-2021 Fanout, Inc.
2323 License: UNKNOWN-LICENSE; FIXME (overlay)
2424 Comment:
2525 FIXME (overlay): These notices are extracted from files. Please review them
2626 before uploading to the archive.
2727
2828 Files: ./src/arena.rs
29 Copyright: 2020 Fanout, Inc.
29 Copyright: 2020-2021 Fanout, Inc.
3030 License: UNKNOWN-LICENSE; FIXME (overlay)
3131 Comment:
3232 FIXME (overlay): These notices are extracted from files. Please review them
3333 before uploading to the archive.
3434
3535 Files: ./src/buffer.rs
36 Copyright: 2020 Fanout, Inc.
36 Copyright: 2020-2021 Fanout, Inc.
3737 License: UNKNOWN-LICENSE; FIXME (overlay)
3838 Comment:
3939 FIXME (overlay): These notices are extracted from files. Please review them
4040 before uploading to the archive.
4141
4242 Files: ./src/channel.rs
43 Copyright: 2020 Fanout, Inc.
43 Copyright: 2020-2021 Fanout, Inc.
4444 License: UNKNOWN-LICENSE; FIXME (overlay)
4545 Comment:
4646 FIXME (overlay): These notices are extracted from files. Please review them
4747 before uploading to the archive.
4848
4949 Files: ./src/connection.rs
50 Copyright: 2020 Fanout, Inc.
50 Copyright: 2020-2021 Fanout, Inc.
51 License: UNKNOWN-LICENSE; FIXME (overlay)
52 Comment:
53 FIXME (overlay): These notices are extracted from files. Please review them
54 before uploading to the archive.
55
56 Files: ./src/event.rs
57 Copyright: 2021 Fanout, Inc.
58 License: UNKNOWN-LICENSE; FIXME (overlay)
59 Comment:
60 FIXME (overlay): These notices are extracted from files. Please review them
61 before uploading to the archive.
62
63 Files: ./src/executor.rs
64 Copyright: 2020-2021 Fanout, Inc.
5165 License: UNKNOWN-LICENSE; FIXME (overlay)
5266 Comment:
5367 FIXME (overlay): These notices are extracted from files. Please review them
5468 before uploading to the archive.
5569
5670 Files: ./src/future.rs
57 Copyright: 2020 Fanout, Inc.
71 Copyright: 2020-2021 Fanout, Inc.
5872 License: UNKNOWN-LICENSE; FIXME (overlay)
5973 Comment:
6074 FIXME (overlay): These notices are extracted from files. Please review them
6175 before uploading to the archive.
6276
6377 Files: ./src/http1.rs
64 Copyright: 2020 Fanout, Inc.
78 Copyright: 2020-2021 Fanout, Inc.
6579 License: UNKNOWN-LICENSE; FIXME (overlay)
6680 Comment:
6781 FIXME (overlay): These notices are extracted from files. Please review them
6882 before uploading to the archive.
6983
7084 Files: ./src/lib.rs
71 Copyright: 2020 Fanout, Inc.
85 Copyright: 2020-2021 Fanout, Inc.
7286 License: UNKNOWN-LICENSE; FIXME (overlay)
7387 Comment:
7488 FIXME (overlay): These notices are extracted from files. Please review them
8296 before uploading to the archive.
8397
8498 Files: ./src/listener.rs
85 Copyright: 2020 Fanout, Inc.
99 Copyright: 2020-2021 Fanout, Inc.
86100 License: UNKNOWN-LICENSE; FIXME (overlay)
87101 Comment:
88102 FIXME (overlay): These notices are extracted from files. Please review them
95109 FIXME (overlay): These notices are extracted from files. Please review them
96110 before uploading to the archive.
97111
112 Files: ./src/reactor.rs
113 Copyright: 2020-2021 Fanout, Inc.
114 License: UNKNOWN-LICENSE; FIXME (overlay)
115 Comment:
116 FIXME (overlay): These notices are extracted from files. Please review them
117 before uploading to the archive.
118
98119 Files: ./src/server.rs
99 Copyright: 2020 Fanout, Inc.
120 Copyright: 2020-2021 Fanout, Inc.
121 License: UNKNOWN-LICENSE; FIXME (overlay)
122 Comment:
123 FIXME (overlay): These notices are extracted from files. Please review them
124 before uploading to the archive.
125
126 Files: ./src/shuffle.rs
127 Copyright:
128 2016 Alex Crichton
129 2017 The Tokio Authors
100130 License: UNKNOWN-LICENSE; FIXME (overlay)
101131 Comment:
102132 FIXME (overlay): These notices are extracted from files. Please review them
103133 before uploading to the archive.
104134
105135 Files: ./src/timer.rs
106 Copyright: 2020 Fanout, Inc.
136 Copyright: 2020-2021 Fanout, Inc.
107137 License: UNKNOWN-LICENSE; FIXME (overlay)
108138 Comment:
109139 FIXME (overlay): These notices are extracted from files. Please review them
110140 before uploading to the archive.
111141
112142 Files: ./src/tls.rs
113 Copyright: 2020 Fanout, Inc.
143 Copyright: 2020-2021 Fanout, Inc.
114144 License: UNKNOWN-LICENSE; FIXME (overlay)
115145 Comment:
116146 FIXME (overlay): These notices are extracted from files. Please review them
123153 FIXME (overlay): These notices are extracted from files. Please review them
124154 before uploading to the archive.
125155
156 Files: ./src/waker.rs
157 Copyright: 2021 Fanout, Inc.
158 License: UNKNOWN-LICENSE; FIXME (overlay)
159 Comment:
160 FIXME (overlay): These notices are extracted from files. Please review them
161 before uploading to the archive.
162
126163 Files: ./src/websocket.rs
127 Copyright: 2020 Fanout, Inc.
164 Copyright: 2020-2021 Fanout, Inc.
128165 License: UNKNOWN-LICENSE; FIXME (overlay)
129166 Comment:
130167 FIXME (overlay): These notices are extracted from files. Please review them
131168 before uploading to the archive.
132169
133170 Files: ./src/zhttppacket.rs
134 Copyright: 2020 Fanout, Inc.
171 Copyright: 2020-2021 Fanout, Inc.
135172 License: UNKNOWN-LICENSE; FIXME (overlay)
136173 Comment:
137174 FIXME (overlay): These notices are extracted from files. Please review them
138175 before uploading to the archive.
139176
140177 Files: ./src/zhttpsocket.rs
141 Copyright: 2020 Fanout, Inc.
178 Copyright: 2020-2021 Fanout, Inc.
142179 License: UNKNOWN-LICENSE; FIXME (overlay)
143180 Comment:
144181 FIXME (overlay): These notices are extracted from files. Please review them
145182 before uploading to the archive.
146183
147184 Files: ./src/zmq.rs
148 Copyright: 2020 Fanout, Inc.
185 Copyright: 2020-2021 Fanout, Inc.
149186 License: UNKNOWN-LICENSE; FIXME (overlay)
150187 Comment:
151188 FIXME (overlay): These notices are extracted from files. Please review them
153190
154191 Files: debian/*
155192 Copyright:
156 2020-2021 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
157 2020-2021 Jan Niehusmann <jan@debian.org>
193 2020-2022 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
194 2020-2022 Jan Niehusmann <jan@debian.org>
158195 License: Apache-2.0
159196
160197 License: Apache-2.0
11 ===================================================================
22 --- condure.orig/Cargo.toml
33 +++ condure/Cargo.toml
4 @@ -36,7 +36,7 @@ panic = "abort"
4 @@ -45,7 +45,7 @@ name = "condure"
55 name = "server"
66 harness = false
77 [dependencies.arrayvec]
1414 ===================================================================
1515 --- condure.orig/src/connection.rs
1616 +++ condure/src/connection.rs
17 @@ -395,7 +395,7 @@ enum ServerReqState {
18 }
19
20 pub struct ServerReqConnection {
21 - id: ArrayString<[u8; 32]>,
22 + id: ArrayString<32>,
23 peer_addr: Option<SocketAddr>,
24 secure: bool,
25 timeout: Duration,
26 @@ -985,7 +985,7 @@ enum ServerStreamState {
27 }
28
29 struct ServerStreamData {
30 - id: ArrayString<[u8; 32]>,
31 + id: ArrayString<32>,
32 peer_addr: Option<SocketAddr>,
33 secure: bool,
34 client_timeout: Duration,
35 @@ -996,9 +996,9 @@ struct ServerStreamData {
36 cont: [u8; 32],
37 cont_len: usize,
38 cont_left: usize,
17 @@ -67,7 +67,7 @@ const WS_ACCEPT_MAX: usize = 28; // base
18 const ZHTTP_SESSION_TIMEOUT: Duration = Duration::from_secs(60);
19
20 pub trait CidProvider {
21 - fn get_new_assigned_cid(&mut self) -> ArrayString<[u8; 32]>;
22 + fn get_new_assigned_cid(&mut self) -> ArrayString<32>;
23 }
24
25 pub trait Identify {
26 @@ -94,7 +94,7 @@ fn get_host<'a>(headers: &'a [httparse::
27 "localhost"
28 }
29
30 -fn calculate_ws_accept(key: &[u8]) -> Result<ArrayString<[u8; WS_ACCEPT_MAX]>, ()> {
31 +fn calculate_ws_accept(key: &[u8]) -> Result<ArrayString<WS_ACCEPT_MAX>, ()> {
32 let input_len = key.len() + websocket::WS_GUID.len();
33
34 if input_len > WS_HASH_INPUT_MAX {
35 @@ -390,7 +390,7 @@ impl MessageTracker {
36 }
37
38 struct ServerStreamSharedDataInner {
3939 - to_addr: Option<ArrayVec<[u8; 64]>>,
4040 + to_addr: Option<ArrayVec<u8, 64>>,
41 websocket: bool,
42 - ws_accept: Option<ArrayString<[u8; 28]>>, // base64_encode(sha1_hash) = 28 bytes
43 + ws_accept: Option<ArrayString<28>>, // base64_encode(sha1_hash) = 28 bytes
44 in_seq: u32,
4541 out_seq: u32,
46 in_credits: u32,
42 }
43
44 @@ -428,7 +428,7 @@ impl ServerStreamSharedData {
45 s.out_seq = 0;
46 }
47
48 - fn set_to_addr(&self, addr: Option<ArrayVec<[u8; 64]>>) {
49 + fn set_to_addr(&self, addr: Option<ArrayVec<u8, 64>>) {
50 let s = &mut *self.inner.borrow_mut();
51
52 s.to_addr = addr;
53 @@ -1390,7 +1390,7 @@ struct ZhttpStreamSessionOut<'a> {
54 instance_id: &'a str,
55 id: &'a str,
56 packet_buf: &'a RefCell<Vec<u8>>,
57 - sender_stream: &'a AsyncLocalSender<(ArrayVec<[u8; 64]>, zmq::Message)>,
58 + sender_stream: &'a AsyncLocalSender<(ArrayVec<u8, 64>, zmq::Message)>,
59 shared: &'a ServerStreamSharedData,
60 }
61
62 @@ -1399,7 +1399,7 @@ impl<'a> ZhttpStreamSessionOut<'a> {
63 instance_id: &'a str,
64 id: &'a str,
65 packet_buf: &'a RefCell<Vec<u8>>,
66 - sender_stream: &'a AsyncLocalSender<(ArrayVec<[u8; 64]>, zmq::Message)>,
67 + sender_stream: &'a AsyncLocalSender<(ArrayVec<u8, 64>, zmq::Message)>,
68 shared: &'a ServerStreamSharedData,
69 ) -> Self {
70 Self {
71 @@ -1862,7 +1862,7 @@ async fn server_req_handler<S: AsyncRead
72
73 async fn server_req_connection_inner<P: CidProvider, S: AsyncRead + AsyncWrite + Identify>(
74 token: CancellationToken,
75 - cid: &mut ArrayString<[u8; 32]>,
76 + cid: &mut ArrayString<32>,
77 cid_provider: &mut P,
78 mut stream: S,
79 peer_addr: Option<SocketAddr>,
80 @@ -1931,7 +1931,7 @@ async fn server_req_connection_inner<P:
81
82 pub async fn server_req_connection<P: CidProvider, S: AsyncRead + AsyncWrite + Identify>(
83 token: CancellationToken,
84 - mut cid: ArrayString<[u8; 32]>,
85 + mut cid: ArrayString<32>,
86 cid_provider: &mut P,
87 stream: S,
88 peer_addr: Option<SocketAddr>,
89 @@ -2600,7 +2600,7 @@ async fn server_stream_handler<S, R1, R2
90 tmp_buf: &RefCell<Vec<u8>>,
91 instance_id: &str,
92 zsender: &AsyncLocalSender<zmq::Message>,
93 - zsender_stream: &AsyncLocalSender<(ArrayVec<[u8; 64]>, zmq::Message)>,
94 + zsender_stream: &AsyncLocalSender<(ArrayVec<u8, 64>, zmq::Message)>,
95 zreceiver: &AsyncLocalReceiver<(arena::Rc<zhttppacket::OwnedResponse>, usize)>,
96 shared: &ServerStreamSharedData,
97 refresh_stream_timeout: &R1,
98 @@ -2673,7 +2673,7 @@ where
99 id, req.method, scheme, host, req.uri
100 );
101
102 - let ws_accept: Option<ArrayString<[u8; WS_ACCEPT_MAX]>> = if websocket {
103 + let ws_accept: Option<ArrayString<WS_ACCEPT_MAX>> = if websocket {
104 if req.method != "GET" || req.body_size != http1::BodySize::NoBody || ws_key.is_none() {
105 return Err(ServerError::InvalidWebSocketRequest);
106 }
107 @@ -3017,7 +3017,7 @@ where
108
109 async fn server_stream_connection_inner<P: CidProvider, S: AsyncRead + AsyncWrite + Identify>(
110 token: CancellationToken,
111 - cid: &mut ArrayString<[u8; 32]>,
112 + cid: &mut ArrayString<32>,
113 cid_provider: &mut P,
114 mut stream: S,
115 peer_addr: Option<SocketAddr>,
116 @@ -3030,7 +3030,7 @@ async fn server_stream_connection_inner<
117 stream_timeout: Duration,
118 instance_id: &str,
119 zsender: AsyncLocalSender<zmq::Message>,
120 - zsender_stream: AsyncLocalSender<(ArrayVec<[u8; 64]>, zmq::Message)>,
121 + zsender_stream: AsyncLocalSender<(ArrayVec<u8, 64>, zmq::Message)>,
122 zreceiver: &AsyncLocalReceiver<(arena::Rc<zhttppacket::OwnedResponse>, usize)>,
123 shared: arena::Rc<ServerStreamSharedData>,
124 ) -> Result<(), ServerError> {
125 @@ -3165,7 +3165,7 @@ async fn server_stream_connection_inner<
126
127 pub async fn server_stream_connection<P: CidProvider, S: AsyncRead + AsyncWrite + Identify>(
128 token: CancellationToken,
129 - mut cid: ArrayString<[u8; 32]>,
130 + mut cid: ArrayString<32>,
131 cid_provider: &mut P,
132 stream: S,
133 peer_addr: Option<SocketAddr>,
134 @@ -3178,7 +3178,7 @@ pub async fn server_stream_connection<P:
135 timeout: Duration,
136 instance_id: &str,
137 zsender: AsyncLocalSender<zmq::Message>,
138 - zsender_stream: AsyncLocalSender<(ArrayVec<[u8; 64]>, zmq::Message)>,
139 + zsender_stream: AsyncLocalSender<(ArrayVec<u8, 64>, zmq::Message)>,
140 zreceiver: AsyncLocalReceiver<(arena::Rc<zhttppacket::OwnedResponse>, usize)>,
141 shared: arena::Rc<ServerStreamSharedData>,
142 ) {
143 @@ -3429,11 +3429,11 @@ mod tests {
144 }
145
146 struct SimpleCidProvider {
147 - cid: ArrayString<[u8; 32]>,
148 + cid: ArrayString<32>,
149 }
150
151 impl CidProvider for SimpleCidProvider {
152 - fn get_new_assigned_cid(&mut self) -> ArrayString<[u8; 32]> {
153 + fn get_new_assigned_cid(&mut self) -> ArrayString<32> {
154 self.cid
155 }
156 }
157 @@ -4130,7 +4130,7 @@ mod tests {
158 sock: Rc<RefCell<FakeSock>>,
159 secure: bool,
160 s_from_conn: channel::LocalSender<zmq::Message>,
161 - s_stream_from_conn: channel::LocalSender<(ArrayVec<[u8; 64]>, zmq::Message)>,
162 + s_stream_from_conn: channel::LocalSender<(ArrayVec<u8, 64>, zmq::Message)>,
163 r_to_conn: channel::LocalReceiver<(arena::Rc<zhttppacket::OwnedResponse>, usize)>,
164 ) -> Result<(), ServerError> {
165 let mut cid = ArrayString::from_str("1").unwrap();
47166 Index: condure/src/server.rs
48167 ===================================================================
49168 --- condure.orig/src/server.rs
50169 +++ condure/src/server.rs
51 @@ -245,7 +245,7 @@ impl ZhttpSender for zhttpsocket::Client
52
53 struct ClientStreamHandle {
54 inner: zhttpsocket::ClientStreamHandle,
55 - out: VecDeque<(ArrayVec<[u8; 64]>, zmq::Message)>,
56 + out: VecDeque<(ArrayVec<u8, 64>, zmq::Message)>,
57 send_to_allowed: bool,
58 }
59
60 @@ -346,7 +346,7 @@ impl Stream {
61 }
62
63 struct Connection {
170 @@ -197,7 +197,7 @@ fn async_local_channel<T>(
171 (s, r)
172 }
173
174 -fn gen_id(id: usize, ckey: usize, next_cid: &mut u32) -> ArrayString<[u8; 32]> {
175 +fn gen_id(id: usize, ckey: usize, next_cid: &mut u32) -> ArrayString<32> {
176 let mut buf = [0; 32];
177 let mut c = io::Cursor::new(&mut buf[..]);
178
179 @@ -263,7 +263,7 @@ impl<'a> BatchGroup<'a, '_> {
180
181 struct Batch {
182 nodes: Slab<list::Node<usize>>,
183 - addrs: Vec<(ArrayVec<[u8; 64]>, list::List)>,
184 + addrs: Vec<(ArrayVec<u8, 64>, list::List)>,
185 addr_index: usize,
186 group_ids: arena::ReusableVec,
187 last_group_ckeys: Vec<usize>,
188 @@ -413,7 +413,7 @@ struct ConnectionDone {
189 }
190
191 struct ConnectionItem {
64192 - id: ArrayString<[u8; 32]>,
65193 + id: ArrayString<32>,
66 stream: Stream,
67 conn: ServerConnection,
68 want: Want,
69 @@ -527,7 +527,7 @@ impl Connection {
70 }
71
72 fn process_with_stream<S: Read + Write + WriteVectored + Shutdown>(
73 - id: &ArrayString<[u8; 32]>,
74 + id: &ArrayString<32>,
75 conn: &mut ServerConnection,
76 want: &mut Want,
77 stream: &mut S,
78 @@ -682,7 +682,7 @@ impl Worker {
79 }
80 }
81
82 - fn gen_id(id: usize, ckey: usize, next_cid: &mut u32) -> ArrayString<[u8; 32]> {
83 + fn gen_id(id: usize, ckey: usize, next_cid: &mut u32) -> ArrayString<32> {
84 let mut buf = [0; 32];
85 let mut c = io::Cursor::new(&mut buf[..]);
86
87 @@ -817,7 +817,7 @@ impl Worker {
88 let ka_batch = (stream_maxconn + (KEEP_ALIVE_BATCHES - 1)) / KEEP_ALIVE_BATCHES;
89
90 let mut ka_nodes: Slab<list::Node<usize>> = Slab::with_capacity(ka_batch);
91 - let mut ka_addrs: Vec<(ArrayVec<[u8; 64]>, list::List)> = Vec::with_capacity(ka_batch);
92 + let mut ka_addrs: Vec<(ArrayVec<u8, 64>, list::List)> = Vec::with_capacity(ka_batch);
93 let mut ka_ids_mem: Vec<zhttppacket::Id> = Vec::with_capacity(ka_batch);
94
95 let mut zwrite_nodes: Slab<list::Node<ZWrite>> = Slab::with_capacity(maxconn + 1);
194 stop: Option<CancellationSender>,
195 zreceiver_sender: Option<AsyncLocalSender<(arena::Rc<zhttppacket::OwnedResponse>, usize)>>,
196 shared: Option<arena::Rc<ServerStreamSharedData>>,
197 @@ -473,7 +473,7 @@ impl Connections {
198 stop: CancellationSender,
199 zreceiver_sender: AsyncLocalSender<(arena::Rc<zhttppacket::OwnedResponse>, usize)>,
200 shared: Option<arena::Rc<ServerStreamSharedData>>,
201 - ) -> Result<(usize, ArrayString<[u8; 32]>), ()> {
202 + ) -> Result<(usize, ArrayString<32>), ()> {
203 let items = &mut *self.items.borrow_mut();
204 let c = &mut *self.inner.borrow_mut();
205
206 @@ -521,7 +521,7 @@ impl Connections {
207 ci.zreceiver_sender.unwrap().into_inner()
208 }
209
210 - fn regen_id(&self, worker_id: usize, ckey: usize) -> ArrayString<[u8; 32]> {
211 + fn regen_id(&self, worker_id: usize, ckey: usize) -> ArrayString<32> {
212 let nkey = ckey;
213
214 let items = &mut *self.items.borrow_mut();
215 @@ -659,7 +659,7 @@ impl Connections {
216 &self,
217 from: &str,
218 btype: BatchType,
219 - ) -> Option<(usize, ArrayVec<[u8; 64]>, zmq::Message)> {
220 + ) -> Option<(usize, ArrayVec<u8, 64>, zmq::Message)> {
221 let items = &mut *self.items.borrow_mut();
222 let nodes = &mut items.nodes;
223 let batch = &mut items.batch;
224 @@ -704,7 +704,7 @@ impl Connections {
225
226 let data = &data[..size];
227
228 - let mut addr = ArrayVec::<[u8; 64]>::new();
229 + let mut addr = ArrayVec::<u8, 64>::new();
230 if addr.try_extend_from_slice(group.addr()).is_err() {
231 error!("failed to prepare addr");
232 continue;
233 @@ -746,7 +746,7 @@ impl<'a> ConnectionCid<'a> {
234 }
235
236 impl CidProvider for ConnectionCid<'_> {
237 - fn get_new_assigned_cid(&mut self) -> ArrayString<[u8; 32]> {
238 + fn get_new_assigned_cid(&mut self) -> ArrayString<32> {
239 self.conns.regen_id(self.worker_id, self.ckey)
240 }
241 }
242 @@ -769,7 +769,7 @@ struct ConnectionReqOpts {
243 struct ConnectionStreamOpts {
244 messages_max: usize,
245 sender: channel::LocalSender<zmq::Message>,
246 - sender_stream: channel::LocalSender<(ArrayVec<[u8; 64]>, zmq::Message)>,
247 + sender_stream: channel::LocalSender<(ArrayVec<u8, 64>, zmq::Message)>,
248 stream_shared_mem: Rc<arena::RcMemory<ServerStreamSharedData>>,
249 }
250
251 @@ -1550,7 +1550,7 @@ impl Worker {
252 done: AsyncLocalSender<zhttpsocket::AsyncClientStreamHandle>,
253 instance_id: Rc<String>,
254 zstream_out_receiver: AsyncLocalReceiver<zmq::Message>,
255 - zstream_out_stream_receiver: AsyncLocalReceiver<(ArrayVec<[u8; 64]>, zmq::Message)>,
256 + zstream_out_stream_receiver: AsyncLocalReceiver<(ArrayVec<u8, 64>, zmq::Message)>,
257 r_cdone: AsyncLocalReceiver<ConnectionDone>,
258 s_cdone: AsyncLocalSender<ConnectionDone>,
259 stream_handle: zhttpsocket::AsyncClientStreamHandle,
260 @@ -1742,7 +1742,7 @@ impl Worker {
261 done: channel::LocalSender<ConnectionDone>,
262 worker_id: usize,
263 ckey: usize,
264 - cid: ArrayString<[u8; 32]>,
265 + cid: ArrayString<32>,
266 stream: Stream,
267 peer_addr: SocketAddr,
268 zreceiver: channel::LocalReceiver<(arena::Rc<zhttppacket::OwnedResponse>, usize)>,
269 @@ -1806,7 +1806,7 @@ impl Worker {
270 done: channel::LocalSender<ConnectionDone>,
271 worker_id: usize,
272 ckey: usize,
273 - cid: ArrayString<[u8; 32]>,
274 + cid: ArrayString<32>,
275 stream: Stream,
276 peer_addr: SocketAddr,
277 zreceiver: channel::LocalReceiver<(arena::Rc<zhttppacket::OwnedResponse>, usize)>,
278 @@ -1879,7 +1879,7 @@ impl Worker {
279 stop: AsyncLocalReceiver<()>,
280 _done: AsyncLocalSender<()>,
281 instance_id: Rc<String>,
282 - sender: channel::LocalSender<(ArrayVec<[u8; 64]>, zmq::Message)>,
283 + sender: channel::LocalSender<(ArrayVec<u8, 64>, zmq::Message)>,
284 conns: Rc<Connections>,
285 ) {
286 debug!("worker {}: task started: keep_alives", id);
96287 Index: condure/src/tls.rs
97288 ===================================================================
98289 --- condure.orig/src/tls.rs
99290 +++ condure/src/tls.rs
100 @@ -321,7 +321,7 @@ impl TlsAcceptor {
101
291 @@ -337,7 +337,7 @@ impl TlsAcceptor {
102292 pub struct TlsStream {
103 stream: Option<Stream>,
293 stream: Stream<'static>,
294 tcp_stream: Box<TcpStream>,
104295 - id: ArrayString<[u8; 32]>,
105296 + id: ArrayString<32>,
106297 }
110301 ===================================================================
111302 --- condure.orig/src/zhttpsocket.rs
112303 +++ condure/src/zhttpsocket.rs
113 @@ -281,29 +281,29 @@ struct ReqPipeEnd {
304 @@ -295,7 +295,7 @@ struct ReqPipeEnd {
114305 struct StreamPipeEnd {
115 sender: channel::Sender<arena::Rc<zmq::Message>>,
306 sender: channel::Sender<arena::Arc<zmq::Message>>,
116307 receiver_any: channel::Receiver<zmq::Message>,
117308 - receiver_addr: channel::Receiver<(ArrayVec<[u8; 64]>, zmq::Message)>,
118309 + receiver_addr: channel::Receiver<(ArrayVec<u8, 64>, zmq::Message)>,
310 }
311
312 struct AsyncReqPipeEnd {
313 @@ -306,28 +306,28 @@ struct AsyncReqPipeEnd {
314 struct AsyncStreamPipeEnd {
315 sender: AsyncSender<arena::Arc<zmq::Message>>,
316 receiver_any: AsyncReceiver<zmq::Message>,
317 - receiver_addr: AsyncReceiver<(ArrayVec<[u8; 64]>, zmq::Message)>,
318 + receiver_addr: AsyncReceiver<(ArrayVec<u8, 64>, zmq::Message)>,
119319 }
120320
121321 enum ControlRequest {
131331 type ControlResponse = Result<(), String>;
132332
133333 struct ReqPipe {
134 pe: ReqPipeEnd,
334 pe: AsyncReqPipeEnd,
135335 - filter: ArrayString<[u8; 8]>,
136336 + filter: ArrayString<8>,
137 valid: bool,
138 readable: bool,
337 valid: Cell<bool>,
139338 }
140339
141340 struct StreamPipe {
142 pe: StreamPipeEnd,
341 pe: AsyncStreamPipeEnd,
143342 - filter: ArrayString<[u8; 8]>,
144343 + filter: ArrayString<8>,
145 valid: bool,
146 readable_any: bool,
147 readable_addr: bool,
148 @@ -328,7 +328,7 @@ impl ReqHandles {
344 valid: Cell<bool>,
345 }
346
347 @@ -398,7 +398,7 @@ impl ReqHandles {
149348 self.nodes.len()
150349 }
151350
152 - fn add<F>(&mut self, pe: ReqPipeEnd, filter: ArrayString<[u8; 8]>, f: F)
153 + fn add<F>(&mut self, pe: ReqPipeEnd, filter: ArrayString<8>, f: F)
154 where
155 F: Fn(&ReqPipe, usize),
156 {
157 @@ -494,7 +494,7 @@ impl StreamHandles {
351 - fn add(&mut self, pe: AsyncReqPipeEnd, filter: ArrayString<[u8; 8]>) {
352 + fn add(&mut self, pe: AsyncReqPipeEnd, filter: ArrayString<8>) {
353 assert!(self.nodes.len() < self.nodes.capacity());
354
355 let key = self.nodes.insert(list::Node::new(ReqPipe {
356 @@ -513,7 +513,7 @@ struct StreamHandles {
357 nodes: Slab<list::Node<StreamPipe>>,
358 list: list::List,
359 recv_any_scratch: RefCell<RecvScratch<zmq::Message>>,
360 - recv_addr_scratch: RefCell<RecvScratch<(ArrayVec<[u8; 64]>, zmq::Message)>>,
361 + recv_addr_scratch: RefCell<RecvScratch<(ArrayVec<u8, 64>, zmq::Message)>>,
362 need_cleanup: Cell<bool>,
363 }
364
365 @@ -532,7 +532,7 @@ impl StreamHandles {
158366 self.nodes.len()
159367 }
160368
161 - fn add<F>(&mut self, pe: StreamPipeEnd, filter: ArrayString<[u8; 8]>, f: F)
162 + fn add<F>(&mut self, pe: StreamPipeEnd, filter: ArrayString<8>, f: F)
163 where
164 F: Fn(&StreamPipe, usize),
165 {
166 @@ -612,7 +612,7 @@ impl StreamHandles {
167 None
168 }
169
170 - fn recv_addr(&mut self) -> Option<(ArrayVec<[u8; 64]>, zmq::Message)> {
171 + fn recv_addr(&mut self) -> Option<(ArrayVec<u8, 64>, zmq::Message)> {
172 if self.cur.is_none() {
173 return None;
369 - fn add(&mut self, pe: AsyncStreamPipeEnd, filter: ArrayString<[u8; 8]>) {
370 + fn add(&mut self, pe: AsyncStreamPipeEnd, filter: ArrayString<8>) {
371 assert!(self.nodes.len() < self.nodes.capacity());
372
373 let key = self.nodes.insert(list::Node::new(StreamPipe {
374 @@ -582,7 +582,7 @@ impl StreamHandles {
174375 }
175 @@ -1420,7 +1420,7 @@ impl ClientReqHandle {
376 }
377
378 - async fn recv_addr(&self) -> (ArrayVec<[u8; 64]>, zmq::Message) {
379 + async fn recv_addr(&self) -> (ArrayVec<u8, 64>, zmq::Message) {
380 let mut scratch = self.recv_addr_scratch.borrow_mut();
381
382 let (mut tasks, slice_scratch) = scratch.get();
383 @@ -1289,7 +1289,7 @@ impl AsyncClientReqHandle {
176384
177385 pub struct ClientStreamHandle {
178386 sender_any: channel::Sender<zmq::Message>,
179387 - sender_addr: channel::Sender<(ArrayVec<[u8; 64]>, zmq::Message)>,
180388 + sender_addr: channel::Sender<(ArrayVec<u8, 64>, zmq::Message)>,
181 receiver: channel::Receiver<arena::Rc<zmq::Message>>,
182 }
183
389 receiver: channel::Receiver<arena::Arc<zmq::Message>>,
390 }
391
392 @@ -1344,7 +1344,7 @@ impl ClientStreamHandle {
393
394 pub struct AsyncClientStreamHandle {
395 sender_any: AsyncSender<zmq::Message>,
396 - sender_addr: AsyncSender<(ArrayVec<[u8; 64]>, zmq::Message)>,
397 + sender_addr: AsyncSender<(ArrayVec<u8, 64>, zmq::Message)>,
398 receiver: AsyncReceiver<arena::Arc<zmq::Message>>,
399 }
400
401 @@ -1373,7 +1373,7 @@ impl AsyncClientStreamHandle {
402
403 pub async fn send_to_addr(
404 &self,
405 - addr: ArrayVec<[u8; 64]>,
406 + addr: ArrayVec<u8, 64>,
407 msg: zmq::Message,
408 ) -> Result<(), io::Error> {
409 match self.sender_addr.send((addr, msg)).await {
0 Index: condure/Cargo.toml
1 ===================================================================
20 --- condure.orig/Cargo.toml
31 +++ condure/Cargo.toml
4 @@ -23,6 +23,9 @@ repository = "https://github.com/fanout/
5 build-depends = "pkg-config, libzmq3-dev"
6 extended-description = "Condure is a service that manages network connections on behalf of server\napplications, in order to allow controlling the connections from multiple\nprocesses. Applications communicate with Condure over ZeroMQ.\n\nCondure can only manage connections for protocols it knows about. Currently\nthis is HTTP/1 and WebSockets.\n\nThe project was inspired by Mongrel2.\n"
2 @@ -25,2 +25,3 @@
73 separate-debug-symbols = true
84 +autobins = false
9 +[[bin]]
10 +name = "condure"
11 [profile.dev]
12 panic = "abort"
135
+0
-39
src/condure/debian/patches/rustc-1.43-compat.diff less more
0 Index: condure/src/buffer.rs
1 ===================================================================
2 --- condure.orig/src/buffer.rs
3 +++ condure/src/buffer.rs
4 @@ -17,6 +17,7 @@
5 use std::cell::RefCell;
6 use std::cmp;
7 use std::io;
8 +use std::mem;
9 use std::rc::Rc;
10
11 pub const VECTORED_MAX: usize = 8;
12 @@ -101,7 +102,9 @@ pub fn write_vectored_offset(
13 start += 1;
14 }
15
16 - let mut arr = [io::IoSlice::new(&b""[..]); VECTORED_MAX];
17 + let mut arr: [mem::MaybeUninit<io::IoSlice>; VECTORED_MAX] =
18 + unsafe { mem::MaybeUninit::uninit().assume_init() };
19 +
20 let mut arr_len = 0;
21
22 for i in start..bufs.len() {
23 @@ -111,11 +114,13 @@ pub fn write_vectored_offset(
24 bufs[i]
25 };
26
27 - arr[arr_len] = io::IoSlice::new(buf);
28 + arr[arr_len] = mem::MaybeUninit::new(io::IoSlice::new(buf));
29 arr_len += 1;
30 }
31
32 - writer.write_vectored(&arr[..arr_len])
33 + let arr = unsafe { mem::transmute::<_, &[io::IoSlice]>(&arr[..arr_len]) };
34 +
35 + writer.write_vectored(arr)
36 }
37
38 pub trait LimitBufs<'a> {
0 rustc-1.43-compat.diff
10 disable-lib.diff
21 relax-dep.diff
32 arrayvec-0.7.patch