--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: bullseye
User: release.debian....@packages.debian.org
Usertags: pu
X-Debbugs-Cc: pkg-rust-maintain...@alioth-lists.debian.net
This brings cargo 0.57 into bullseye as src:cargo-mozilla, following the
packaging changes done in previous releases (e.g. cargo-mozilla 0.47.0 in
buster). This is needed for the upcoming Firefox 102 ESR.
I'm attaching a diff from cargo 0.57. Since this is a separate source and
binary, it won't affect the rust ecosystem, unless you intentionally install
this in place of bin:cargo.
Cheers,
Emilio
diff -ruNp cargo-0.57.0/debian/cargo.bash-completion
cargo-mozilla-0.57.0/debian/cargo.bash-completion
--- cargo-0.57.0/debian/cargo.bash-completion 2022-03-15 13:09:01.000000000
+0100
+++ cargo-mozilla-0.57.0/debian/cargo.bash-completion 1970-01-01
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-src/etc/cargo.bashcomp.sh cargo
diff -ruNp cargo-0.57.0/debian/cargo.dirs cargo-mozilla-0.57.0/debian/cargo.dirs
--- cargo-0.57.0/debian/cargo.dirs 2022-03-15 13:09:01.000000000 +0100
+++ cargo-mozilla-0.57.0/debian/cargo.dirs 1970-01-01 01:00:00.000000000
+0100
@@ -1 +0,0 @@
-usr/bin
diff -ruNp cargo-0.57.0/debian/cargo-doc.docs
cargo-mozilla-0.57.0/debian/cargo-doc.docs
--- cargo-0.57.0/debian/cargo-doc.docs 2022-03-15 13:09:01.000000000 +0100
+++ cargo-mozilla-0.57.0/debian/cargo-doc.docs 1970-01-01 01:00:00.000000000
+0100
@@ -1 +0,0 @@
-target/doc
diff -ruNp cargo-0.57.0/debian/cargo.manpages
cargo-mozilla-0.57.0/debian/cargo.manpages
--- cargo-0.57.0/debian/cargo.manpages 2022-03-15 13:09:01.000000000 +0100
+++ cargo-mozilla-0.57.0/debian/cargo.manpages 1970-01-01 01:00:00.000000000
+0100
@@ -1,2 +0,0 @@
-src/etc/man/cargo-*.1
-src/etc/man/cargo.1
diff -ruNp cargo-0.57.0/debian/cargo-mozilla.bash-completion
cargo-mozilla-0.57.0/debian/cargo-mozilla.bash-completion
--- cargo-0.57.0/debian/cargo-mozilla.bash-completion 1970-01-01
01:00:00.000000000 +0100
+++ cargo-mozilla-0.57.0/debian/cargo-mozilla.bash-completion 2022-03-15
13:09:01.000000000 +0100
@@ -0,0 +1 @@
+src/etc/cargo.bashcomp.sh cargo
diff -ruNp cargo-0.57.0/debian/cargo-mozilla.dirs
cargo-mozilla-0.57.0/debian/cargo-mozilla.dirs
--- cargo-0.57.0/debian/cargo-mozilla.dirs 1970-01-01 01:00:00.000000000
+0100
+++ cargo-mozilla-0.57.0/debian/cargo-mozilla.dirs 2022-03-15
13:09:01.000000000 +0100
@@ -0,0 +1 @@
+usr/bin
diff -ruNp cargo-0.57.0/debian/cargo-mozilla-doc.docs
cargo-mozilla-0.57.0/debian/cargo-mozilla-doc.docs
--- cargo-0.57.0/debian/cargo-mozilla-doc.docs 1970-01-01 01:00:00.000000000
+0100
+++ cargo-mozilla-0.57.0/debian/cargo-mozilla-doc.docs 2022-03-15
13:09:01.000000000 +0100
@@ -0,0 +1 @@
+target/doc
diff -ruNp cargo-0.57.0/debian/cargo-mozilla.manpages
cargo-mozilla-0.57.0/debian/cargo-mozilla.manpages
--- cargo-0.57.0/debian/cargo-mozilla.manpages 1970-01-01 01:00:00.000000000
+0100
+++ cargo-mozilla-0.57.0/debian/cargo-mozilla.manpages 2022-03-15
13:09:01.000000000 +0100
@@ -0,0 +1,2 @@
+src/etc/man/cargo-*.1
+src/etc/man/cargo.1
diff -ruNp cargo-0.57.0/debian/changelog cargo-mozilla-0.57.0/debian/changelog
--- cargo-0.57.0/debian/changelog 2022-05-02 22:57:46.000000000 +0200
+++ cargo-mozilla-0.57.0/debian/changelog 2022-07-03 21:40:34.725134208
+0200
@@ -1,3 +1,15 @@
+cargo-mozilla (0.57.0-7~deb11u1) bullseye; urgency=medium
+
+ * Non-maintainer upload.
+ * Backport to bullseye as cargo-mozilla.
+ * Build-dep on rustc-mozilla.
+ * Don't build the doc package.
+ * Vendor libgit2 1.3.0, the system one is too old.
+ * Build-dep on libpcre3-dev, for libgit2.
+ * Disable build::close_output_during_drain test as it hangs in bullseye.
+
+ -- Emilio Pozuelo Monfort <po...@debian.org> Fri, 01 Jul 2022 12:25:10 +0200
+
cargo (0.57.0-7) unstable; urgency=medium
* Team upload.
diff -ruNp cargo-0.57.0/debian/control cargo-mozilla-0.57.0/debian/control
--- cargo-0.57.0/debian/control 2022-05-02 22:57:07.000000000 +0200
+++ cargo-mozilla-0.57.0/debian/control 2022-07-02 20:43:20.894722653 +0200
@@ -1,4 +1,4 @@
-Source: cargo
+Source: cargo-mozilla
Section: devel
Maintainer: Rust Maintainers <pkg-rust-maintain...@alioth-lists.debian.net>
Uploaders: Luca Bruno <lu...@debian.org>,
@@ -11,16 +11,17 @@ Build-Depends:
debhelper (>= 12~),
dpkg-dev (>= 1.17.14),
cargo:native (>= 0.17.0),
- rustc:native (>= 1.16),
- libstd-rust-dev (>= 1.16),
+ rustc-mozilla:native (>= 1.16),
+ libstd-rust-mozilla-dev (>= 1.16),
pkg-config,
bash-completion,
python3:native,
libcurl4-gnutls-dev | libcurl4-openssl-dev,
libssh2-1-dev,
- libgit2-dev (>= 1.3.0),
- libgit2-dev (<< 1.4~~),
+# libgit2-dev (>= 1.3.0),
+# libgit2-dev (<< 1.4~~),
libhttp-parser-dev,
+ libpcre3-dev,
libssl-dev,
zlib1g-dev,
git <!nocheck>
@@ -29,7 +30,7 @@ Standards-Version: 4.2.1
Vcs-Git: https://salsa.debian.org/rust-team/cargo.git
Vcs-Browser: https://salsa.debian.org/rust-team/cargo
-Package: cargo
+Package: cargo-mozilla
Architecture: any
Multi-Arch: allowed
Depends: ${shlibs:Depends}, ${misc:Depends},
@@ -37,6 +38,9 @@ Depends: ${shlibs:Depends}, ${misc:Depen
binutils,
gcc | clang | c-compiler
Suggests: cargo-doc, python3
+Conflicts: cargo
+Replaces: cargo
+Provides: cargo (= ${binary:Version})
Description: Rust package manager
Cargo is a tool that allows Rust projects to declare their various
dependencies, and ensure that you'll always get a repeatable build.
@@ -51,25 +55,25 @@ Description: Rust package manager
Cargo downloads your Rust project’s dependencies and compiles your
project.
-Package: cargo-doc
-Section: doc
-Architecture: all
-Build-Profiles: <!nodoc>
-Depends: ${misc:Depends}
-Description: Rust package manager, documentation
- Cargo is a tool that allows Rust projects to declare their various
- dependencies, and ensure that you'll always get a repeatable build.
- .
- To accomplish this goal, Cargo does four things:
- * Introduces two metadata files with various bits of project information.
- * Fetches and builds your project's dependencies.
- * Invokes rustc or another build tool with the correct parameters to build
- your project.
- * Introduces conventions, making working with Rust projects easier.
- .
- Cargo downloads your Rust project’s dependencies and compiles your
- project.
- .
- This package contains the documentation.
+#Package: cargo-mozilla-doc
+#Section: doc
+#Architecture: all
+#Build-Profiles: <!nodoc>
+#Depends: ${misc:Depends}
+#Description: Rust package manager, documentation
+# Cargo is a tool that allows Rust projects to declare their various
+# dependencies, and ensure that you'll always get a repeatable build.
+# .
+# To accomplish this goal, Cargo does four things:
+# * Introduces two metadata files with various bits of project information.
+# * Fetches and builds your project's dependencies.
+# * Invokes rustc or another build tool with the correct parameters to build
+# your project.
+# * Introduces conventions, making working with Rust projects easier.
+# .
+# Cargo downloads your Rust project’s dependencies and compiles your
+# project.
+# .
+# This package contains the documentation.
# TODO: add a cargo-src package
Binary files cargo-0.57.0/debian/libgit2_1.3.0+dfsg.1.orig.tar.xz and
cargo-mozilla-0.57.0/debian/libgit2_1.3.0+dfsg.1.orig.tar.xz differ
diff -ruNp
cargo-0.57.0/debian/patches/2300-disable-close_output_during_drain-test.patch
cargo-mozilla-0.57.0/debian/patches/2300-disable-close_output_during_drain-test.patch
---
cargo-0.57.0/debian/patches/2300-disable-close_output_during_drain-test.patch
1970-01-01 01:00:00.000000000 +0100
+++
cargo-mozilla-0.57.0/debian/patches/2300-disable-close_output_during_drain-test.patch
2022-07-01 18:53:29.915555263 +0200
@@ -0,0 +1,23 @@
+The test is to check that a hang doesn't happen, but it does happen
+in bullseye, so disable it.
+
+See https://github.com/rust-lang/cargo/pull/9201
+
+--- a/tests/testsuite/build.rs
++++ b/tests/testsuite/build.rs
+@@ -5376,6 +5376,7 @@ hello stderr!
+ assert_eq!(stdout, "hello stdout!\n");
+ }
+
++/*
+ #[cargo_test]
+ fn close_output_during_drain() {
+ // Test to close the output during the build phase (drain_the_queue).
+@@ -5454,6 +5455,7 @@ fn close_output_during_drain() {
+ Err(e) => panic!("child wait failed: {}", e),
+ }
+ }
++*/
+
+ use cargo_test_support::registry::Dependency;
+
diff -ruNp cargo-0.57.0/debian/patches/series
cargo-mozilla-0.57.0/debian/patches/series
--- cargo-0.57.0/debian/patches/series 2022-05-02 22:57:07.000000000 +0200
+++ cargo-mozilla-0.57.0/debian/patches/series 2022-07-02 20:38:35.028703006
+0200
@@ -8,3 +8,5 @@
2112-handle-4-siphasher-algorithms.patch
2200-workaround-x32-test.patch
+2300-disable-close_output_during_drain-test.patch
+use-vendored-libgit.patch
diff -ruNp cargo-0.57.0/debian/patches/use-vendored-libgit.patch
cargo-mozilla-0.57.0/debian/patches/use-vendored-libgit.patch
--- cargo-0.57.0/debian/patches/use-vendored-libgit.patch 1970-01-01
01:00:00.000000000 +0100
+++ cargo-mozilla-0.57.0/debian/patches/use-vendored-libgit.patch
2022-07-02 20:40:59.591437683 +0200
@@ -0,0 +1,54 @@
+Author: Emilio Pozuelo Monfort <po...@debian.org>
+
+Use vendored libgit
+
+--- a/vendor/libgit2-sys/build.rs
++++ b/vendor/libgit2-sys/build.rs
+@@ -11,7 +11,7 @@ fn main() {
+ let zlib_ng_compat = env::var("CARGO_FEATURE_ZLIB_NG_COMPAT").is_ok();
+
+ // To use zlib-ng in zlib-compat mode, we have to build libgit2 ourselves.
+- let try_to_use_system_libgit2 = !vendored && !zlib_ng_compat;
++ let try_to_use_system_libgit2 = false;
+ if try_to_use_system_libgit2 {
+ let mut cfg = pkg_config::Config::new();
+ if let Ok(lib) = cfg.atleast_version("1.1.0").probe("libgit2") {
+@@ -56,8 +56,8 @@ fn main() {
+ add_c_files(&mut cfg, "libgit2/src/streams");
+
+ // Always use bundled http-parser for now
+- cfg.include("libgit2/deps/http-parser")
+- .file("libgit2/deps/http-parser/http_parser.c");
++ //cfg.include("libgit2/deps/http-parser")
++ // .file("libgit2/deps/http-parser/http_parser.c");
+
+ // Use the included PCRE regex backend.
+ //
+@@ -66,7 +66,7 @@ fn main() {
+ // reasons, just define on the command-line for everything. Perhaps there
+ // is some way with cc to have different instructions per-file?
+ cfg.define("GIT_REGEX_BUILTIN", "1")
+- .include("libgit2/deps/pcre")
++ //.include("libgit2/deps/pcre")
+ .define("HAVE_STDINT_H", Some("1"))
+ .define("HAVE_MEMMOVE", Some("1"))
+ .define("NO_RECURSE", Some("1"))
+@@ -80,7 +80,8 @@ fn main() {
+ .define("MAX_NAME_COUNT", Some("10000"));
+ // "no symbols" warning on pcre_string_utils.c is because it is only used
+ // when when COMPILE_PCRE8 is not defined, which is the default.
+- add_c_files(&mut cfg, "libgit2/deps/pcre");
++ //add_c_files(&mut cfg, "libgit2/deps/pcre");
++ println!("cargo:rustc-link-lib=pcre");
+
+ cfg.file("libgit2/src/allocators/failalloc.c");
+ cfg.file("libgit2/src/allocators/stdalloc.c");
+@@ -175,6 +176,8 @@ fn main() {
+
+ println!("cargo:root={}", dst.display());
+
++ println!("cargo:rustc-link-lib=http_parser");
++
+ if target.contains("windows") {
+ println!("cargo:rustc-link-lib=winhttp");
+ println!("cargo:rustc-link-lib=rpcrt4");
diff -ruNp cargo-0.57.0/debian/rules cargo-mozilla-0.57.0/debian/rules
--- cargo-0.57.0/debian/rules 2022-03-15 13:09:01.000000000 +0100
+++ cargo-mozilla-0.57.0/debian/rules 2022-07-01 13:07:05.005451548 +0200
@@ -38,11 +38,15 @@ CARGO_TEST_FLAGS =
override_dh_auto_configure:
$(CARGO) prepare-debian $(CURDIR)/vendor
+ set -e; \
+ tar xf debian/libgit2_1.3.0+dfsg.1.orig.tar.xz; \
+ mv libgit2-1.3.0 vendor/libgit2-sys/libgit2
+
override_dh_auto_build-arch:
$(CARGO) build
-override_dh_auto_build-indep:
- $(CARGO) doc
+#override_dh_auto_build-indep:
+# $(CARGO) doc
override_dh_auto_test-arch:
CFG_DISABLE_CROSS_TESTS=1 $(CARGO) test $(CARGO_TEST_FLAGS)
@@ -51,11 +55,13 @@ override_dh_auto_test-indep:
# no arch-indep tests
override_dh_auto_install:
- DESTDIR=$(CURDIR)/debian/cargo $(CARGO) install
+ DESTDIR=$(CURDIR)/debian/cargo-mozilla $(CARGO) install
override_dh_auto_clean:
$(CARGO) clean
+ -$(RM) -rf vendor/libgit2-sys/libgit2
+
override_dh_clean:
# Upstream contains a lot of these
dh_clean -XCargo.toml.orig
diff -ruNp cargo-0.57.0/debian/source/include-binaries
cargo-mozilla-0.57.0/debian/source/include-binaries
--- cargo-0.57.0/debian/source/include-binaries 1970-01-01 01:00:00.000000000
+0100
+++ cargo-mozilla-0.57.0/debian/source/include-binaries 2022-07-01
12:52:26.515285679 +0200
@@ -0,0 +1 @@
+debian/libgit2_1.3.0+dfsg.1.orig.tar.xz
--- End Message ---