Bug#1023842: rust-criterion - inconsistent dependencies on cast.

2022-11-11 Thread Jonas Smedegaard
Quoting Peter Green (2022-11-12 01:16:23)
> On 11/11/2022 16:02, Jonas Smedegaard wrote:
> 
> > 
> > My work on other packages (rust-test-case) recently revealed that my
> > approach to embedding crates is broken, so I will do some more poking to
> > get it to not only succeed building on its own but also builds as
> > dependency of other Rust crates.
> 
> Note that criterion-plot is packaged in Debian, so an alternative way
> to fix this would be to stop embedding it and use the packaged version.

Ahhh, *that* is probably why this bug wasn't caught earlier: Other
packages simply pull in the separately packaged version.

Thanks for pointing that out :-)

I do think, however, that the better approach is for rust-criterion to
take over that other binary package, since it is part of same upstream
source project (yes, I am aware that the Rust project has a different
approach...).  I'll think on it and fie a separate bugreport about that
unless I change my mind - i.e. let's not discuss that further here.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/
 * Sponsorship: https://ko-fi.com/drjones

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#1023842: rust-criterion - inconsistent dependencies on cast.

2022-11-11 Thread Peter Green

On 11/11/2022 16:02, Jonas Smedegaard wrote:



My work on other packages (rust-test-case) recently revealed that my
approach to embedding crates is broken, so I will do some more poking to
get it to not only succeed building on its own but also builds as
dependency of other Rust crates.


Note that criterion-plot is packaged in Debian, so an alternative way
to fix this would be to stop embedding it and use the packaged version.



Bug#1023842: rust-criterion - inconsistent dependencies on cast.

2022-11-11 Thread Jonas Smedegaard
Quoting Peter Green (2022-11-11 09:04:34)
> The rust-criterion package has inconsistent dependencies on the cast
> crate, the dependency in the main Cargo.toml is on version 0.3, but
> the dependencies in the debian packaging and in the embedded copy of
> the criterion-plot crate are at 0.2
> 
> I have updated the cast crate in Debian to 0.3, and prepared an update
> for the rust-criterion package to use 0.3 consistently. I tested that
> the package built succesfully and the autopkgtests passed with these
> changes.

Thanks!

I am now applying main parts of your proposed patch to the git repo
(only locally for now - will push when I have it in working shape).

I also extended the embedded patch  to the full original upstream
patch (turns out all of it is relevant for us), and adjusted to properly
use DEP-3 patch headers (helpful that you referenced upstream patch, but
for future sake beware especially to properly credit the author: You are
at most co-author when cherry-picking patched done by others, and in
most cases only reviewer).

My work on other packages (rust-test-case) recently revealed that my
approach to embedding crates is broken, so I will do some more poking to
get it to not only succeed building on its own but also builds as
dependency of other Rust crates.


> While working on the fix, I discovered the clean target wasn't
> cleaning up properly, so I fixed it to do so.

I have left that part out for now, as that sounds like a general flaw in
dh-cargo that I will try identify and fix (instead of papering over it).
Thanks for pointing it out!


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/
 * Sponsorship: https://ko-fi.com/drjones

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#1023842: rust-criterion - inconsistent dependencies on cast.

2022-11-11 Thread Peter Green

Package: rust-criterion
Version: 0.3.6-1
Severity: serious
Tags: patch

The rust-criterion package has inconsistent dependencies on the cast crate, the
dependency in the main Cargo.toml is on version 0.3, but the dependencies in the
debian packaging and in the embedded copy of the criterion-plot crate are at 0.2

I have updated the cast crate in Debian to 0.3, and prepared an update for the
rust-criterion package to use 0.3 consistently. I tested that the package built
succesfully and the autopkgtests passed with these changes.

While working on the fix, I discovered the clean target wasn't cleaning up
properly, so I fixed it to do so.

Debdiff attatched, If I get no response I will probablly NMU this in a week or
so.
diff -Nru rust-criterion-0.3.6/debian/changelog 
rust-criterion-0.3.6/debian/changelog
--- rust-criterion-0.3.6/debian/changelog   2022-11-07 07:51:45.0 
+
+++ rust-criterion-0.3.6/debian/changelog   2022-11-10 20:23:39.0 
+
@@ -1,3 +1,13 @@
+rust-criterion (0.3.6-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Update inconsistent cast dependencies to a consistent 0.3
++ The cast dependency in the main Cargo.toml was at 0.3 while the Debian
+  Dependency and the cast dependency in the plot subcrate were at 0.2.
+  * Fix clean target.
+
+ -- Peter Michael Green   Thu, 10 Nov 2022 20:23:39 +
+
 rust-criterion (0.3.6-1) unstable; urgency=medium
 
   [ upstream ]
diff -Nru rust-criterion-0.3.6/debian/control 
rust-criterion-0.3.6/debian/control
--- rust-criterion-0.3.6/debian/control 2022-11-07 07:50:12.0 +
+++ rust-criterion-0.3.6/debian/control 2022-11-10 20:23:39.0 +
@@ -7,7 +7,7 @@
  gnuplot-nox ,
  librust-approx-0.5+default-dev ,
  librust-atty-0.2+default-dev ,
- librust-cast-0.2+default-dev ,
+ librust-cast-0.3+default-dev ,
  librust-clap-2-dev (>= 2.33) ,
  librust-criterion-plot-0.4+default-dev (>= 0.4.4) ,
  librust-csv-1+default-dev (>= 1.1) ,
@@ -40,7 +40,7 @@
 Depends:
  gnuplot-nox,
  librust-atty-0.2+default-dev,
- librust-cast-0.2+default-dev,
+ librust-cast-0.3+default-dev,
  librust-clap-2-dev (>= 2.33),
  librust-criterion-plot-0.4+default-dev,
  librust-csv-1+default-dev,
diff -Nru 
rust-criterion-0.3.6/debian/patches/-bump-plot-cast-dependency.patch 
rust-criterion-0.3.6/debian/patches/-bump-plot-cast-dependency.patch
--- rust-criterion-0.3.6/debian/patches/-bump-plot-cast-dependency.patch
1970-01-01 00:00:00.0 +
+++ rust-criterion-0.3.6/debian/patches/-bump-plot-cast-dependency.patch
2022-11-10 20:23:39.0 +
@@ -0,0 +1,28 @@
+Description: Bump cast dependency in plot subcrate.
+ Taken from 
https://github.com/bheisler/criterion.rs/commit/06be43cda0169f5b9c91eb0298545c253ba8830f
+Author: Peter Michael Green 
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: , 
+Bug: 
+Bug-Debian: https://bugs.debian.org/
+Bug-Ubuntu: https://launchpad.net/bugs/
+Forwarded: 
+Reviewed-By: 
+Last-Update: 2022-11-10
+
+--- rust-criterion-0.3.6.orig/plot/Cargo.toml
 rust-criterion-0.3.6/plot/Cargo.toml
+@@ -12,7 +12,7 @@ categories = ["visualization"]
+ license = "MIT/Apache-2.0"
+ 
+ [dependencies]
+-cast = "0.2"
++cast = "0.3"
+ itertools = "0.10"
+ 
+ [dev-dependencies]
diff -Nru rust-criterion-0.3.6/debian/patches/series 
rust-criterion-0.3.6/debian/patches/series
--- rust-criterion-0.3.6/debian/patches/series  2022-11-07 07:45:44.0 
+
+++ rust-criterion-0.3.6/debian/patches/series  2022-11-10 20:23:39.0 
+
@@ -2,3 +2,4 @@
 1002_modernize_macro_syntax.patch
 2001_plotters.patch
 2002_no_unstable_features.patch
+-bump-plot-cast-dependency.patch
diff -Nru rust-criterion-0.3.6/debian/rules rust-criterion-0.3.6/debian/rules
--- rust-criterion-0.3.6/debian/rules   2022-06-22 12:00:18.0 +
+++ rust-criterion-0.3.6/debian/rules   2022-11-10 20:23:39.0 +
@@ -7,3 +7,6 @@
 
 %:
dh $@ --buildsystem cargo
+
+execute_after_dh_auto_clean:
+   rm -rf target