diff -Nru rust-ureq-2.7.1/debian/changelog rust-ureq-2.7.1/debian/changelog --- rust-ureq-2.7.1/debian/changelog 2023-08-13 12:51:16.000000000 +0000 +++ rust-ureq-2.7.1/debian/changelog 2023-08-20 09:31:57.000000000 +0000 @@ -1,3 +1,12 @@ +rust-ureq (2.7.1-5) unstable; urgency=medium + + * renumber patch 2004 -> 1001; + update DEP-3 patch headers + * update dh-cargo fork; + closes: bug#1047264, thanks to Lucas Nussbaum + + -- Jonas Smedegaard Sun, 20 Aug 2023 11:31:57 +0200 + rust-ureq (2.7.1-4) unstable; urgency=medium * extend patch 2001 diff -Nru rust-ureq-2.7.1/debian/copyright_hints rust-ureq-2.7.1/debian/copyright_hints --- rust-ureq-2.7.1/debian/copyright_hints 2023-08-13 12:51:13.000000000 +0000 +++ rust-ureq-2.7.1/debian/copyright_hints 2023-08-20 09:31:57.000000000 +0000 @@ -15,8 +15,8 @@ debian/dh-cargo/README.md debian/examples debian/gbp.conf + debian/patches/1001_webpki.patch debian/patches/2001_native_certs.patch - debian/patches/2004_webpki.patch debian/patches/README debian/patches/series debian/rules diff -Nru rust-ureq-2.7.1/debian/dh-cargo/bin/cargo rust-ureq-2.7.1/debian/dh-cargo/bin/cargo --- rust-ureq-2.7.1/debian/dh-cargo/bin/cargo 2023-07-29 22:16:26.000000000 +0000 +++ rust-ureq-2.7.1/debian/dh-cargo/bin/cargo 2023-08-20 09:31:57.000000000 +0000 @@ -222,11 +222,14 @@ newargs.append("--release") elif noopt and subcmd == "install": newargs.append("--debug") - elif (subcmd is None) and (a in ("check", "clean", "run")): + elif (subcmd is None) and (a in ("check", "run")): subcmd = a newargs.extend([a] + verbose) if not noopt: newargs.append("--release") + elif (subcmd is None) and (a == "clean"): + subcmd = a + newargs.extend([a] + verbose) else: newargs.append(a) diff -Nru rust-ureq-2.7.1/debian/dh-cargo/lib/Debian/Debhelper/Buildsystem/cargo.pm rust-ureq-2.7.1/debian/dh-cargo/lib/Debian/Debhelper/Buildsystem/cargo.pm --- rust-ureq-2.7.1/debian/dh-cargo/lib/Debian/Debhelper/Buildsystem/cargo.pm 2023-07-29 22:21:57.000000000 +0000 +++ rust-ureq-2.7.1/debian/dh-cargo/lib/Debian/Debhelper/Buildsystem/cargo.pm 2023-08-20 09:31:57.000000000 +0000 @@ -54,6 +54,7 @@ my %object = ( cratename => join( '-', $key->{name}, $key->{version} ), cratespec => join( '_', $key->{name}, $key->{version} ), + pkgid => join( '@', $key->{name}, $key->{version} ), ); $object{sourcepath} = File::Spec->abs2rel( $key->{manifest_path} =~ s{/Cargo\.toml$}{}r, @@ -74,6 +75,11 @@ $crates{_default} //= \%object if $key->{name} eq $default; } + # resolve amount of local dependencies + # TODO: use Graph to compute an always reliable order instead + for my $key ( @{ $manifest->{packages} } ) { + $crates{ $key->{name} =~ tr/_/-/r }{depcount} = grep { exists $crates{ $_->{name} =~ tr/_/-/r } } @{ $key->{dependencies} }; + } return \%crates; } @@ -288,16 +294,14 @@ sub install { my $this=shift; my $destdir=shift; - foreach my $crate ( map { @{ $_->{crates} } } sort values %{ $this->{libpkg} } ) { + foreach my $crate ( sort { $a->{depcount} cmp $b->{depcount} } map { @{ $_->{crates} } } sort values %{ $this->{libpkg} } ) { my $target = tmpdir( $crate->{libpkg}{name} ) . $crate->{systempath}; install_dir($target); - $this->doit_in_somedir( - $crate->{sourcepath}, - "env", "DEB_CARGO_CRATE=$crate->{cratespec}", - qw(cargo package --offline --allow-dirty --no-verify)); + $this->doit_in_sourcedir( + qw(cargo package --offline --allow-dirty --no-verify --package), $crate->{pkgid} ); $this->doit_in_somedir( "$target/..", - qw(tar --exclude debian/* --exclude debian --exclude Cargo.lock --exclude COPYING* --exclude LICENSE* -xvf), + 'tar', map( { ( '--exclude', $_ ) } qw(debian/* debian Cargo.toml.orig Cargo.lock COPYING* LICENSE*) ), '-xvf', $this->_rel2rel( $crate->{packagepath}, "$target/.." ), $crate->{cratename} ); complex_doit( @@ -307,6 +311,10 @@ ">", "$target/.cargo-checksum.json"); # prevent an ftpmaster auto-reject regarding files with old dates. doit("touch", "-d@" . $ENV{SOURCE_DATE_EPOCH}, "$target/Cargo.toml"); + # add crate to local registry, needed by some multi-crate workspaces + # maybe related: + complex_doit( + qw(ln --symbolic --relative --target-directory=debian/cargo_registry), $target ); } foreach my $featurepkg (@{$this->{featurepkg}}) { my $target = tmpdir( $featurepkg->{name} ) . "/usr/share/doc"; diff -Nru rust-ureq-2.7.1/debian/dh-cargo/README.md rust-ureq-2.7.1/debian/dh-cargo/README.md --- rust-ureq-2.7.1/debian/dh-cargo/README.md 2023-07-29 22:16:26.000000000 +0000 +++ rust-ureq-2.7.1/debian/dh-cargo/README.md 2023-08-20 09:31:57.000000000 +0000 @@ -15,11 +15,9 @@ * generate cargo-checksum during install * pass cargo --remap-path-prefix option sets in RUSTFLAGS * allow overriding CARGO_HOME - * omit installing crate metadata in binary library packages: - * use "cargo package" to install crate contents - * omit license files - * omit debian/patches - (see bug#880689) + * install crate contents using "cargo package" + * omit license files, Cargo.toml.orig, and debian/patches + (see bug#880689) * use debian/Cargo.lock or Cargo.lock (in that order) during build, if Cargo.lock exists * use crates below debian/vendorlibs when available @@ -64,4 +62,4 @@ ``` - -- Jonas Smedegaard Sat, Sat, 29 Jul 2023 20:14:19 +0200 + -- Jonas Smedegaard Sat, 19 Aug 2023 22:37:28 +0200 diff -Nru rust-ureq-2.7.1/debian/patches/1001_webpki.patch rust-ureq-2.7.1/debian/patches/1001_webpki.patch --- rust-ureq-2.7.1/debian/patches/1001_webpki.patch 1970-01-01 00:00:00.000000000 +0000 +++ rust-ureq-2.7.1/debian/patches/1001_webpki.patch 2023-08-20 09:31:57.000000000 +0000 @@ -0,0 +1,16 @@ +Description: extend dependency to match newer crate rustls-webpki 0.101.1 +Author: Jonas Smedegaard +Last-Update: 2023-08-14 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -37,7 +37,7 @@ + encoding_rs = { version = "0.8", optional = true } + cookie_store = { version = "0.19", optional = true, default-features = false, features = ["preserve_order"] } + log = "0.4" +-webpki = { package = "rustls-webpki", version = "0.100", optional = true } ++webpki = { package = "rustls-webpki", version = ">= 0.100, < 0.102", optional = true } + webpki-roots = { version = "0.23", optional = true } + rustls = { version = "0.21", optional = true } + rustls-native-certs = { version = "0.6", optional = true } diff -Nru rust-ureq-2.7.1/debian/patches/2001_native_certs.patch rust-ureq-2.7.1/debian/patches/2001_native_certs.patch --- rust-ureq-2.7.1/debian/patches/2001_native_certs.patch 2023-08-13 12:44:51.000000000 +0000 +++ rust-ureq-2.7.1/debian/patches/2001_native_certs.patch 2023-08-20 09:31:57.000000000 +0000 @@ -20,7 +20,7 @@ @@ -38,7 +38,6 @@ cookie_store = { version = "0.19", optional = true, default-features = false, features = ["preserve_order"] } log = "0.4" - webpki = { package = "rustls-webpki", version = "0.100", optional = true } + webpki = { package = "rustls-webpki", version = ">= 0.100, < 0.102", optional = true } -webpki-roots = { version = "0.23", optional = true } rustls = { version = "0.21", optional = true } rustls-native-certs = { version = "0.6", optional = true } diff -Nru rust-ureq-2.7.1/debian/patches/2004_webpki.patch rust-ureq-2.7.1/debian/patches/2004_webpki.patch --- rust-ureq-2.7.1/debian/patches/2004_webpki.patch 2023-08-13 12:41:51.000000000 +0000 +++ rust-ureq-2.7.1/debian/patches/2004_webpki.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -Description: extend dependency to cover system crate rustls-webpki 0.101.1 -Author: Jonas Smedegaard -Forwarded: not-needed -Last-Update: 2023-08-13 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -37,7 +37,7 @@ - encoding_rs = { version = "0.8", optional = true } - cookie_store = { version = "0.19", optional = true, default-features = false, features = ["preserve_order"] } - log = "0.4" --webpki = { package = "rustls-webpki", version = "0.100", optional = true } -+webpki = { package = "rustls-webpki", version = ">= 0.100, < 0.102", optional = true } - rustls = { version = "0.21", optional = true } - rustls-native-certs = { version = "0.6", optional = true } - native-tls = { version = "0.2", optional = true } diff -Nru rust-ureq-2.7.1/debian/patches/series rust-ureq-2.7.1/debian/patches/series --- rust-ureq-2.7.1/debian/patches/series 2023-08-10 23:50:16.000000000 +0000 +++ rust-ureq-2.7.1/debian/patches/series 2023-08-14 10:22:42.000000000 +0000 @@ -1,2 +1,2 @@ +1001_webpki.patch 2001_native_certs.patch -2004_webpki.patch