]> git.proxmox.com Git - cargo.git/blob - debian/debcargo-conf.patch
80182447e794a6dc918c218ae422d73d55fee66e
[cargo.git] / debian / debcargo-conf.patch
1 For various reasons sometimes the debcargo-conf patches can't be applied as-is,
2 so we further patch them here. The reasons are as follows:
3
4 - commoncrypto, commoncrypto-sys: these crates were released before crates.io
5 automatically re-wrote all Cargo.toml files. cargo-vendor outputs the
6 un-re-written original Cargo.toml files, but debcargo will forcibly rewrite
7 even un-re-written ones that were published to crates.io. The patch below
8 rewrites our existing patches so they work against the un-re-written ones.
9
10 - unicode-normalization, vte, tempfile: have dependency relaxation that applies,
11 but doesn't match the vendored copy
12
13 diff --git a/src/commoncrypto-sys/debian/patches/no-clippy.patch b/src/commoncrypto-sys/debian/patches/no-clippy.patch
14 index 3e4c8850e..93789f3b8 100644
15 --- a/src/commoncrypto-sys/debian/patches/no-clippy.patch
16 +++ b/src/commoncrypto-sys/debian/patches/no-clippy.patch
17 @@ -1,17 +1,16 @@
18 ---- a/Cargo.toml 2017-01-24 06:56:51.000000000 +0000
19 -+++ b/Cargo.toml 2018-09-15 15:37:47.602333479 +0000
20 -@@ -19,14 +19,8 @@
21 +--- a/Cargo.toml
22 ++++ b/Cargo.toml
23 +@@ -8,13 +8,8 @@
24 keywords = ["crypto", "hash", "digest", "osx", "commoncrypto"]
25 license = "MIT"
26 - repository = "https://github.com/malept/rust-commoncrypto"
27 --[dependencies.clippy]
28 --version = "0.0"
29 --optional = true
30
31 - [dependencies.libc]
32 - version = "0.2"
33 - [dev-dependencies.hex]
34 - version = "0.2"
35 --
36 -[features]
37 -lint = ["clippy"]
38 +-
39 + [dependencies]
40 + libc = "0.2"
41 +
42 +-clippy = { version = "0.0", optional = true }
43 +-
44 + [dev-dependencies]
45 + hex = "0.2"
46 diff --git a/src/commoncrypto/debian/patches/no-clippy.patch b/src/commoncrypto/debian/patches/no-clippy.patch
47 index 38d9c9255..b21a7cae5 100644
48 --- a/src/commoncrypto/debian/patches/no-clippy.patch
49 +++ b/src/commoncrypto/debian/patches/no-clippy.patch
50 @@ -1,17 +1,16 @@
51 ---- a/Cargo.toml 2017-01-24 06:56:51.000000000 +0000
52 -+++ b/Cargo.toml 2018-09-15 17:37:01.354423224 +0000
53 -@@ -19,14 +19,8 @@
54 +--- a/Cargo.toml
55 ++++ b/Cargo.toml
56 +@@ -8,13 +8,8 @@
57 keywords = ["crypto", "hash", "digest", "osx", "commoncrypto"]
58 license = "MIT"
59 - repository = "https://github.com/malept/rust-commoncrypto"
60 --[dependencies.clippy]
61 --version = "0.0"
62 --optional = true
63
64 - [dependencies.commoncrypto-sys]
65 - version = "0.2.0"
66 - [dev-dependencies.hex]
67 - version = "0.2"
68 --
69 -[features]
70 -lint = ["clippy"]
71 +-
72 + [dependencies]
73 + commoncrypto-sys = { version = "0.2.0", path = "../commoncrypto-sys" }
74 +
75 +-clippy = { version = "0.0", optional = true }
76 +-
77 + [dev-dependencies]
78 + hex = "0.2"
79 diff --git a/src/tempfile/debian/patches/series b/src/tempfile/debian/patches/series
80 index 75abb7f14..2378a84ba 100644
81 --- a/src/tempfile/debian/patches/series
82 +++ b/src/tempfile/debian/patches/series
83 @@ -1 +1 @@
84 -relax-dep.diff
85 +#relax-dep.diff
86 diff --git a/src/unicode-normalization/debian/patches/series b/src/unicode-normalization/debian/patches/series
87 index 2c1db10bd..39fe7a4da 100644
88 --- a/src/unicode-normalization/debian/patches/series
89 +++ b/src/unicode-normalization/debian/patches/series
90 @@ -1,2 +1 @@
91 disable-tests-missing-testdata.patch
92 -switch-back-to-smallvec.patch
93 diff --git a/src/unicode-normalization/debian/patches/switch-back-to-smallvec.patch b/src/unicode-normalization/debian/patches/switch-back-to-smallvec.patch
94 deleted file mode 100644
95 index 06e816ca7..000000000
96 --- a/src/unicode-normalization/debian/patches/switch-back-to-smallvec.patch
97 +++ /dev/null
98 @@ -1,134 +0,0 @@
99 -This patch switches back to using smallvec as we do not have tinyvec in Debian.
100 -It is based on a revert of upstream commit d6abe8e5148c2c513cb65f487a037c7600de2498
101 -adapted by Peter Michael Green for use in the Debian package.
102 -
103 -Index: unicode-normalization/src/decompose.rs
104 -===================================================================
105 ---- unicode-normalization.orig/src/decompose.rs
106 -+++ unicode-normalization/src/decompose.rs
107 -@@ -10,7 +10,7 @@
108 - use core::fmt::{self, Write};
109 - use core::iter::Fuse;
110 - use core::ops::Range;
111 --use tinyvec::TinyVec;
112 -+use smallvec::SmallVec;
113 -
114 - #[derive(Clone)]
115 - enum DecompositionType {
116 -@@ -32,7 +32,7 @@ pub struct Decompositions<I> {
117 - // 2) "Ready" characters which are sorted and ready to emit on demand;
118 - // 3) A "pending" block which stills needs more characters for us to be able
119 - // to sort in canonical order and is not safe to emit.
120 -- buffer: TinyVec<[(u8, char); 4]>,
121 -+ buffer: SmallVec<[(u8, char); 4]>,
122 - ready: Range<usize>,
123 - }
124 -
125 -@@ -41,7 +41,7 @@ pub fn new_canonical<I: Iterator<Item =
126 - Decompositions {
127 - kind: self::DecompositionType::Canonical,
128 - iter: iter.fuse(),
129 -- buffer: TinyVec::new(),
130 -+ buffer: SmallVec::new(),
131 - ready: 0..0,
132 - }
133 - }
134 -@@ -51,7 +51,7 @@ pub fn new_compatible<I: Iterator<Item =
135 - Decompositions {
136 - kind: self::DecompositionType::Compatible,
137 - iter: iter.fuse(),
138 -- buffer: TinyVec::new(),
139 -+ buffer: SmallVec::new(),
140 - ready: 0..0,
141 - }
142 - }
143 -Index: unicode-normalization/src/lib.rs
144 -===================================================================
145 ---- unicode-normalization.orig/src/lib.rs
146 -+++ unicode-normalization/src/lib.rs
147 -@@ -50,7 +50,7 @@ extern crate alloc;
148 - #[cfg(feature = "std")]
149 - extern crate core;
150 -
151 --extern crate tinyvec;
152 -+extern crate smallvec;
153 -
154 - pub use crate::decompose::Decompositions;
155 - pub use crate::quick_check::{
156 -Index: unicode-normalization/src/recompose.rs
157 -===================================================================
158 ---- unicode-normalization.orig/src/recompose.rs
159 -+++ unicode-normalization/src/recompose.rs
160 -@@ -10,7 +10,7 @@
161 -
162 - use crate::decompose::Decompositions;
163 - use core::fmt::{self, Write};
164 --use tinyvec::TinyVec;
165 -+use smallvec::SmallVec;
166 -
167 - #[derive(Clone)]
168 - enum RecompositionState {
169 -@@ -24,7 +24,7 @@ enum RecompositionState {
170 - pub struct Recompositions<I> {
171 - iter: Decompositions<I>,
172 - state: RecompositionState,
173 -- buffer: TinyVec<[char; 4]>,
174 -+ buffer: SmallVec<[char; 4]>,
175 - composee: Option<char>,
176 - last_ccc: Option<u8>,
177 - }
178 -@@ -34,7 +34,7 @@ pub fn new_canonical<I: Iterator<Item =
179 - Recompositions {
180 - iter: super::decompose::new_canonical(iter),
181 - state: self::RecompositionState::Composing,
182 -- buffer: TinyVec::new(),
183 -+ buffer: SmallVec::new(),
184 - composee: None,
185 - last_ccc: None,
186 - }
187 -@@ -45,7 +45,7 @@ pub fn new_compatible<I: Iterator<Item =
188 - Recompositions {
189 - iter: super::decompose::new_compatible(iter),
190 - state: self::RecompositionState::Composing,
191 -- buffer: TinyVec::new(),
192 -+ buffer: SmallVec::new(),
193 - composee: None,
194 - last_ccc: None,
195 - }
196 -Index: unicode-normalization/Cargo.toml
197 -===================================================================
198 ---- unicode-normalization.orig/Cargo.toml
199 -+++ unicode-normalization/Cargo.toml
200 -@@ -43,9 +43,8 @@ keywords = [
201 - license = "MIT/Apache-2.0"
202 - repository = "https://github.com/unicode-rs/unicode-normalization"
203 -
204 --[dependencies.tinyvec]
205 -+[dependencies.smallvec]
206 - version = "1"
207 --features = ["alloc"]
208 -
209 - [features]
210 - default = ["std"]
211 -Index: unicode-normalization/src/replace.rs
212 -===================================================================
213 ---- unicode-normalization.orig/src/replace.rs
214 -+++ unicode-normalization/src/replace.rs
215 -@@ -8,7 +8,7 @@
216 - // option. This file may not be copied, modified, or distributed
217 - // except according to those terms.
218 - use core::fmt::{self, Write};
219 --use tinyvec::ArrayVec;
220 -+use smallvec::SmallVec;
221 -
222 - /// External iterator for replacements for a string's characters.
223 - #[derive(Clone)]
224 -@@ -36,7 +36,7 @@ impl<I: Iterator<Item = char>> Iterator
225 - match self.iter.next() {
226 - Some(ch) => {
227 - // At this time, the longest replacement sequence has length 2.
228 -- let mut buffer = ArrayVec::<[char; 2]>::new();
229 -+ let mut buffer = SmallVec::<[char; 2]>::new();
230 - super::char::decompose_cjk_compat_variants(ch, |d| buffer.push(d));
231 - self.buffer = buffer.get(1).copied();
232 - Some(buffer[0])
233 diff --git a/src/vte/debian/patches/arrayvec.diff b/src/vte/debian/patches/arrayvec.diff
234 deleted file mode 100644
235 index 1923f9577..000000000
236 --- a/src/vte/debian/patches/arrayvec.diff
237 +++ /dev/null
238 @@ -1,26 +0,0 @@
239 -Index: vte/Cargo.toml
240 -===================================================================
241 ---- vte.orig/Cargo.toml
242 -+++ vte/Cargo.toml
243 -@@ -24,7 +24,7 @@ categories = ["parsing", "no-std"]
244 - license = "Apache-2.0 OR MIT"
245 - repository = "https://github.com/alacritty/vte"
246 - [dependencies.arrayvec]
247 --version = "0.5.1"
248 -+version = "0.7"
249 - optional = true
250 - default-features = false
251 -
252 -Index: vte/src/lib.rs
253 -===================================================================
254 ---- vte.orig/src/lib.rs
255 -+++ vte/src/lib.rs
256 -@@ -78,7 +78,7 @@ pub struct Parser {
257 - params: Params,
258 - param: u16,
259 - #[cfg(feature = "no_std")]
260 -- osc_raw: ArrayVec<[u8; MAX_OSC_RAW]>,
261 -+ osc_raw: ArrayVec<u8, MAX_OSC_RAW>,
262 - #[cfg(not(feature = "no_std"))]
263 - osc_raw: Vec<u8>,
264 - osc_params: [(usize, usize); MAX_OSC_PARAMS],
265 diff --git a/src/vte/debian/patches/series b/src/vte/debian/patches/series
266 index 011b1a629..203bdd762 100644
267 --- a/src/vte/debian/patches/series
268 +++ b/src/vte/debian/patches/series
269 @@ -1,2 +1 @@
270 00-remove-nightly-feature
271 -arrayvec.diff