]> git.sesse.net Git - bcachefs-tools-debian/blob - debian/patches/revert-bindgen-changes.patch
Disable pristine-tar option in gbp.conf, since there is no pristine-tar branch.
[bcachefs-tools-debian] / debian / patches / revert-bindgen-changes.patch
1 Revert upstream patch f6b619da.
2
3 With this revert (and a loosening of the version dependency in
4 Cargo.toml), we compile and run with bindgen 0.66, which is in Debian.
5 It can safely be removed when Debian upgrades to at least 0.69.4.
6
7 The patch doesn't revert cleanly anymore, so some comment changes
8 have been dropped, but they are not important.
9
10 Index: bcachefs-tools/Cargo.lock
11 ===================================================================
12 --- bcachefs-tools.orig/Cargo.lock
13 +++ bcachefs-tools/Cargo.lock
14 @@ -107,17 +107,17 @@ dependencies = [
15  
16  [[package]]
17  name = "bindgen"
18 -version = "0.69.4"
19 +version = "0.69.2"
20  source = "registry+https://github.com/rust-lang/crates.io-index"
21 -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0"
22 +checksum = "a4c69fae65a523209d34240b60abe0c42d33d1045d445c0839d8a4894a736e2d"
23  dependencies = [
24   "bitflags 2.4.2",
25   "cexpr",
26   "clang-sys",
27 - "itertools",
28   "lazy_static",
29   "lazycell",
30   "log",
31 + "peeking_take_while",
32   "prettyplease",
33   "proc-macro2",
34   "quote",
35 @@ -312,15 +312,6 @@ dependencies = [
36  ]
37  
38  [[package]]
39 -name = "itertools"
40 -version = "0.12.1"
41 -source = "registry+https://github.com/rust-lang/crates.io-index"
42 -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
43 -dependencies = [
44 - "either",
45 -]
46 -
47 -[[package]]
48  name = "lazy_static"
49  version = "1.4.0"
50  source = "registry+https://github.com/rust-lang/crates.io-index"
51 @@ -414,6 +405,12 @@ source = "registry+https://github.com/ru
52  checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
53  
54  [[package]]
55 +name = "peeking_take_while"
56 +version = "0.1.2"
57 +source = "registry+https://github.com/rust-lang/crates.io-index"
58 +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
59 +
60 +[[package]]
61  name = "pkg-config"
62  version = "0.3.29"
63  source = "registry+https://github.com/rust-lang/crates.io-index"
64 Index: bcachefs-tools/bch_bindgen/Cargo.toml
65 ===================================================================
66 --- bcachefs-tools.orig/bch_bindgen/Cargo.toml
67 +++ bcachefs-tools/bch_bindgen/Cargo.toml
68 @@ -19,4 +19,4 @@ paste = "1.0.11"
69  
70  [build-dependencies]
71  pkg-config = "0.3"
72 -bindgen = "0.69.4"
73 +bindgen = "0.69.2"
74 Index: bcachefs-tools/bch_bindgen/build.rs
75 ===================================================================
76 --- bcachefs-tools.orig/bch_bindgen/build.rs
77 +++ bcachefs-tools/bch_bindgen/build.rs
78 @@ -160,4 +160,16 @@ fn packed_and_align_fix(bindings: std::s
79              "#[repr(C, packed(8))]\npub struct bch_sb {",
80              "#[repr(C, align(8))]\npub struct bch_sb {",
81          )
82 +        .replace(
83 +            "#[repr(C, packed(8))]\n#[repr(align(8))]\n#[derive(Debug, Default, Copy, Clone)]\npub struct bkey {",
84 +            "#[repr(C, align(8))]\n#[derive(Debug, Default, Copy, Clone)]\npub struct bkey {",
85 +        )
86 +        .replace(
87 +            "#[repr(C, packed(8))]\n#[repr(align(8))]\n#[derive(Debug, Default, Copy, Clone)]\npub struct bch_extent_crc32 {",
88 +            "#[repr(C, align(8))]\n#[derive(Debug, Default, Copy, Clone)]\npub struct bch_extent_crc32 {",
89 +        )
90 +        .replace(
91 +            "#[repr(C, packed(8))]\n#[repr(align(8))]\n#[derive(Debug, Default, Copy, Clone)]\npub struct bch_extent_ptr {",
92 +            "#[repr(C, align(8))]\n#[derive(Debug, Default, Copy, Clone)]\npub struct bch_extent_ptr {",
93 +        )
94  }