rust: Switch to using `include`
authorColin Walters <walters@verbum.org>
Fri, 8 Sep 2023 11:50:37 +0000 (07:50 -0400)
committerColin Walters <walters@verbum.org>
Mon, 11 Sep 2023 21:16:41 +0000 (17:16 -0400)
This way we don't randomly pick up bits from the C library
unintentionally as things change on that side.

I think the support for `!` in `include` may be relatively new
and that's why the original author here chose to do things
via `exclude`.  But using `include` with a few specific exclusions
is just way better.

Cargo.toml

index 82ebd14c444c0a0a0b1eeef34cb3d3b5e070846d..4633410ed5e503d3c83a4577e8af6f22ed444f74 100644 (file)
@@ -11,17 +11,12 @@ repository = "https://github.com/ostreedev/ostree"
 rust-version = "1.70.0"
 version = "0.19.1"
 
-exclude = [
-    "/*.am", "/apidoc", "/autogen.sh", "/bash", "/bsdiff",
-    "/build-aux", "/buildutil", "/*.mk", "/ci", "/coccinelle",
-    "/*.ac", "/docs", "/libglnx", "/man", "/manual-tests",
-    "/*.yml", "/*.doap", "/src", "/tests",
-    "/.github", "/.cci.jenkinsfile", "/.dir-locals.el", "/.editorconfig",
-    "/.vimrc", "/.copr", "/.packit.yaml", "/GNUmakefile", "TODO",
-    "composefs",
-    "/rust-bindings/conf/**",
-    "/rust-bindings/gir-files/**",
-    "/rust-bindings/sys/**",
+include = [
+    "/COPYING",
+    "/rust-bindings/**",
+    "!/rust-bindings/conf/**",
+    "!/rust-bindings/gir-files/**",
+    "!/rust-bindings/sys/**",
 ]
 
 [package.metadata.docs.rs]