--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: buster
User: release.debian....@packages.debian.org
Usertags: pu
X-Debbugs-Cc: pkg-rust-maintain...@alioth-lists.debian.net,
team+pkg-mozi...@tracker.debian.org
Hi,
This update to cargo (with a renamed name to avoid disruption in the
rust/cargo ecosystem) is needed by the firefox / thunderbird updates.
It's a backport of the version in bullseye, which is enough for our
purposes. I've had to embed a newer version of libgit2, just like we've
done in previous cargo updates for buster and stretch. This time I've
used the tarball from a debian upload so that it's dfsg and easy to
verify.
I've used this to build and test firefox ESR 91.3 on amd64.
Cheers,
Emilio
diff -Nru cargo-0.47.0/debian/cargo.bash-completion
cargo-mozilla-0.47.0/debian/cargo.bash-completion
--- cargo-0.47.0/debian/cargo.bash-completion 2019-01-24 05:34:05.000000000
+0100
+++ cargo-mozilla-0.47.0/debian/cargo.bash-completion 1970-01-01
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-src/etc/cargo.bashcomp.sh cargo
diff -Nru cargo-0.47.0/debian/cargo.dirs cargo-mozilla-0.47.0/debian/cargo.dirs
--- cargo-0.47.0/debian/cargo.dirs 2018-11-04 12:47:23.000000000 +0100
+++ cargo-mozilla-0.47.0/debian/cargo.dirs 1970-01-01 01:00:00.000000000
+0100
@@ -1 +0,0 @@
-usr/bin
diff -Nru cargo-0.47.0/debian/cargo-doc.docs
cargo-mozilla-0.47.0/debian/cargo-doc.docs
--- cargo-0.47.0/debian/cargo-doc.docs 2018-11-04 12:47:23.000000000 +0100
+++ cargo-mozilla-0.47.0/debian/cargo-doc.docs 1970-01-01 01:00:00.000000000
+0100
@@ -1 +0,0 @@
-target/doc
diff -Nru cargo-0.47.0/debian/cargo.manpages
cargo-mozilla-0.47.0/debian/cargo.manpages
--- cargo-0.47.0/debian/cargo.manpages 2018-11-04 12:47:23.000000000 +0100
+++ cargo-mozilla-0.47.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 -Nru cargo-0.47.0/debian/cargo-mozilla.bash-completion
cargo-mozilla-0.47.0/debian/cargo-mozilla.bash-completion
--- cargo-0.47.0/debian/cargo-mozilla.bash-completion 1970-01-01
01:00:00.000000000 +0100
+++ cargo-mozilla-0.47.0/debian/cargo-mozilla.bash-completion 2019-01-24
05:34:05.000000000 +0100
@@ -0,0 +1 @@
+src/etc/cargo.bashcomp.sh cargo
diff -Nru cargo-0.47.0/debian/cargo-mozilla.dirs
cargo-mozilla-0.47.0/debian/cargo-mozilla.dirs
--- cargo-0.47.0/debian/cargo-mozilla.dirs 1970-01-01 01:00:00.000000000
+0100
+++ cargo-mozilla-0.47.0/debian/cargo-mozilla.dirs 2018-11-04
12:47:23.000000000 +0100
@@ -0,0 +1 @@
+usr/bin
diff -Nru cargo-0.47.0/debian/cargo-mozilla-doc.docs
cargo-mozilla-0.47.0/debian/cargo-mozilla-doc.docs
--- cargo-0.47.0/debian/cargo-mozilla-doc.docs 1970-01-01 01:00:00.000000000
+0100
+++ cargo-mozilla-0.47.0/debian/cargo-mozilla-doc.docs 2018-11-04
12:47:23.000000000 +0100
@@ -0,0 +1 @@
+target/doc
diff -Nru cargo-0.47.0/debian/cargo-mozilla.manpages
cargo-mozilla-0.47.0/debian/cargo-mozilla.manpages
--- cargo-0.47.0/debian/cargo-mozilla.manpages 1970-01-01 01:00:00.000000000
+0100
+++ cargo-mozilla-0.47.0/debian/cargo-mozilla.manpages 2018-11-04
12:47:23.000000000 +0100
@@ -0,0 +1,2 @@
+src/etc/man/cargo-*.1
+src/etc/man/cargo.1
diff -Nru cargo-0.47.0/debian/changelog cargo-mozilla-0.47.0/debian/changelog
--- cargo-0.47.0/debian/changelog 2020-12-08 02:43:58.000000000 +0100
+++ cargo-mozilla-0.47.0/debian/changelog 2021-12-14 13:46:50.000000000
+0100
@@ -1,3 +1,16 @@
+cargo-mozilla (0.47.0-3~deb10u1) buster; urgency=medium
+
+ * Non-maintainer upload.
+ * Backport to buster.
+ * Vendor libgit2 1.0.1, the system one is too old.
+ * Build-dep on rustc-mozilla.
+ * Build-dep on libpcre3-dev, for libgit2.
+ * Fix tests that now have execution time in the output.
+ * Rename to cargo-mozilla to avoid disruption in the rustc/cargo ecosystem,
+ and don't build the doc package.
+
+ -- Emilio Pozuelo Monfort <po...@debian.org> Tue, 14 Dec 2021 13:46:50 +0100
+
cargo (0.47.0-3) unstable; urgency=medium
* Disable close_output test for now, it is flaky. This is a test problem not
diff -Nru cargo-0.47.0/debian/control cargo-mozilla-0.47.0/debian/control
--- cargo-0.47.0/debian/control 2020-12-06 13:32:13.000000000 +0100
+++ cargo-mozilla-0.47.0/debian/control 2021-12-14 13:46:50.000000000 +0100
@@ -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>,
@@ -10,16 +10,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,
cmake,
bash-completion,
python3:native,
libcurl4-gnutls-dev | libcurl4-openssl-dev,
libssh2-1-dev,
- libgit2-dev (>= 1),
+# libgit2-dev (>= 1),
libhttp-parser-dev,
+ libpcre3-dev,
libssl-dev,
zlib1g-dev,
git <!nocheck>
@@ -28,7 +29,7 @@
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},
@@ -36,6 +37,9 @@
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.
@@ -50,25 +54,25 @@
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
/tmp/8V2EEsxbJI/cargo-0.47.0/debian/libgit2_1.0.1+dfsg.1.orig.tar.xz and
/tmp/AKgYiopGR_/cargo-mozilla-0.47.0/debian/libgit2_1.0.1+dfsg.1.orig.tar.xz
differ
diff -Nru cargo-0.47.0/debian/patches/accept-test-execution-time.patch
cargo-mozilla-0.47.0/debian/patches/accept-test-execution-time.patch
--- cargo-0.47.0/debian/patches/accept-test-execution-time.patch
1970-01-01 01:00:00.000000000 +0100
+++ cargo-mozilla-0.47.0/debian/patches/accept-test-execution-time.patch
2021-12-03 13:17:58.000000000 +0100
@@ -0,0 +1,128 @@
+From 62ddaf343ef261a4da457f6334874d1413b64783 Mon Sep 17 00:00:00 2001
+From: Jakob Schikowski <jakob.schikow...@gmx.de>
+Date: Mon, 23 Nov 2020 00:25:46 +0100
+Subject: [PATCH] Relaxes expectation of `cargo test` tests to accept test
+ execution time
+
+---
+ tests/testsuite/test.rs | 26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/tests/testsuite/test.rs b/tests/testsuite/test.rs
+index 4ba9a4db833..55345c216c8 100644
+--- a/tests/testsuite/test.rs
++++ b/tests/testsuite/test.rs
+@@ -175,7 +175,7 @@ fn cargo_test_quiet_with_harness() {
+ "
+ running 1 test
+ .
+-test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
++test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..]
+
+ ",
+ )
+@@ -1552,7 +1552,7 @@ fn test_filtered_excludes_compiling_examples() {
+ running 1 test
+ test tests::foo ... ok
+
+-test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
++test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..]
+
+ ",
+ )
+@@ -3724,13 +3724,13 @@ pub fn foo() -> u8 { 1 }
+ running 1 test
+ test tests::it_works ... ok
+
+-test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
++test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..]
+
+
+ running 1 test
+ test src/lib.rs - foo (line 1) ... ok
+
+-test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
++test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..]
+ \n",
+ )
+ .run();
+@@ -3746,7 +3746,7 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0
measured; 0 filtered out
+ running 1 test
+ test tests::it_works ... ok
+
+-test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
++test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..]
+ \n",
+ )
+ .run();
+@@ -3763,7 +3763,7 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0
measured; 0 filtered out
+ running 1 test
+ test src/lib.rs - foo (line 1) ... ok
+
+-test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
++test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..]
+
+ ",
+ )
+@@ -3877,14 +3877,14 @@ fn cargo_test_doctest_xcompile_ignores() {
+ #[cfg(not(target_arch = "x86_64"))]
+ p.cargo("test")
+ .with_stdout_contains(
+- "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0
filtered out",
++ "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0
filtered out[..]",
+ )
+ .run();
+ #[cfg(target_arch = "x86_64")]
+ p.cargo("test")
+ .with_status(101)
+ .with_stdout_contains(
+- "test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured;
0 filtered out",
++ "test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured;
0 filtered out[..]",
+ )
+ .run();
+
+@@ -3892,7 +3892,7 @@ fn cargo_test_doctest_xcompile_ignores() {
+ p.cargo("test -Zdoctest-xcompile")
+ .masquerade_as_nightly_cargo()
+ .with_stdout_contains(
+- "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0
filtered out",
++ "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0
filtered out[..]",
+ )
+ .run();
+
+@@ -3900,7 +3900,7 @@ fn cargo_test_doctest_xcompile_ignores() {
+ p.cargo("test -Zdoctest-xcompile")
+ .masquerade_as_nightly_cargo()
+ .with_stdout_contains(
+- "test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0
filtered out",
++ "test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0
filtered out[..]",
+ )
+ .run();
+ }
+@@ -3940,7 +3940,7 @@ fn cargo_test_doctest_xcompile() {
+ ))
+ .masquerade_as_nightly_cargo()
+ .with_stdout_contains(
+- "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0
filtered out",
++ "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0
filtered out[..]",
+ )
+ .run();
+ }
+@@ -4020,7 +4020,7 @@ fn cargo_test_doctest_xcompile_runner() {
+ ))
+ .masquerade_as_nightly_cargo()
+ .with_stdout_contains(
+- "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0
filtered out",
++ "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0
filtered out[..]",
+ )
+ .with_stderr_contains("this is a runner")
+ .run();
+@@ -4064,7 +4064,7 @@ fn cargo_test_doctest_xcompile_no_runner() {
+ ))
+ .masquerade_as_nightly_cargo()
+ .with_stdout_contains(
+- "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0
filtered out",
++ "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0
filtered out[..]",
+ )
+ .run();
+ }
diff -Nru cargo-0.47.0/debian/patches/series
cargo-mozilla-0.47.0/debian/patches/series
--- cargo-0.47.0/debian/patches/series 2020-12-08 02:39:33.000000000 +0100
+++ cargo-mozilla-0.47.0/debian/patches/series 2021-12-03 13:17:58.000000000
+0100
@@ -2,3 +2,5 @@
1005_relax_deprecated_diagnostic_message_check.patch
2002_disable-net-tests.patch
2003_disable_close_output.patch
+use-vendored-libgit.patch
+accept-test-execution-time.patch
diff -Nru cargo-0.47.0/debian/patches/use-vendored-libgit.patch
cargo-mozilla-0.47.0/debian/patches/use-vendored-libgit.patch
--- cargo-0.47.0/debian/patches/use-vendored-libgit.patch 1970-01-01
01:00:00.000000000 +0100
+++ cargo-mozilla-0.47.0/debian/patches/use-vendored-libgit.patch
2021-12-03 13:17:58.000000000 +0100
@@ -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
+@@ -9,7 +9,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.
+- if !zlib_ng_compat {
++ if false {
+ let mut cfg = pkg_config::Config::new();
+ if let Ok(lib) = cfg.probe("libgit2") {
+ for include in &lib.include_paths {
+@@ -51,8 +51,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.
+ //
+@@ -61,7 +61,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"))
+@@ -75,7 +75,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/stdalloc.c");
+
+@@ -168,6 +169,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 -Nru cargo-0.47.0/debian/rules cargo-mozilla-0.47.0/debian/rules
--- cargo-0.47.0/debian/rules 2020-12-08 01:27:26.000000000 +0100
+++ cargo-mozilla-0.47.0/debian/rules 2021-12-14 13:46:50.000000000 +0100
@@ -36,11 +36,15 @@
override_dh_auto_configure:
$(CARGO) prepare-debian $(CURDIR)/vendor
+ set -e; \
+ tar xf debian/libgit2_1.0.1+dfsg.1.orig.tar.xz; \
+ mv libgit2-1.0.1 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)
@@ -49,11 +53,13 @@
# 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 -Nru cargo-0.47.0/debian/source/include-binaries
cargo-mozilla-0.47.0/debian/source/include-binaries
--- cargo-0.47.0/debian/source/include-binaries 1970-01-01 01:00:00.000000000
+0100
+++ cargo-mozilla-0.47.0/debian/source/include-binaries 2021-12-03
13:17:58.000000000 +0100
@@ -0,0 +1 @@
+debian/libgit2_1.0.1+dfsg.1.orig.tar.xz
--- End Message ---