Bug 1628005 (rust-criterion-plot)

Summary: Review Request: rust-criterion-plot - Criterion's plotting library
Product: [Fedora] Fedora Reporter: Igor Raits <igor.raits>
Component: Package ReviewAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: eclipseo, package-review
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-28 16:11:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1689563    

Description Igor Raits 2018-09-12 05:27:23 UTC
Spec URL: https://ignatenkobrain.fedorapeople.org/for-review/rust-criterion-plot.spec
SRPM URL: https://ignatenkobrain.fedorapeople.org/for-review/rust-criterion-plot-0.2.5-1.fc30.src.rpm
Description:
Criterion's plotting library.
Fedora Account System Username: ignatenkobrain

Comment 1 Robert-André Mauchin 🐧 2018-09-12 16:06:17 UTC
Same issue as before:

+ /usr/lib/rpm/redhat/brp-mangle-shebangs
BUILDSTDERR: *** WARNING: ./usr/share/cargo/registry/criterion-plot-0.2.5/Cargo.toml.orig is executable but has empty or no shebang, removing executable bit
BUILDSTDERR: *** WARNING: ./usr/share/cargo/registry/criterion-plot-0.2.5/README.md is executable but has empty or no shebang, removing executable bit
BUILDSTDERR: *** WARNING: ./usr/share/cargo/registry/criterion-plot-0.2.5/src/axis.rs is executable but has empty or no shebang, removing executable bit
BUILDSTDERR: *** WARNING: ./usr/share/cargo/registry/criterion-plot-0.2.5/src/candlestick.rs is executable but has empty or no shebang, removing executable bit
BUILDSTDERR: *** WARNING: ./usr/share/cargo/registry/criterion-plot-0.2.5/src/curve.rs is executable but has empty or no shebang, removing executable bit
BUILDSTDERR: *** ERROR: ./usr/share/cargo/registry/criterion-plot-0.2.5/src/data.rs has shebang which doesn't start with '/' ([allow(deprecated)])
BUILDSTDERR: *** WARNING: ./usr/share/cargo/registry/criterion-plot-0.2.5/src/display.rs is executable but has empty or no shebang, removing executable bit
BUILDSTDERR: *** WARNING: ./usr/share/cargo/registry/criterion-plot-0.2.5/src/errorbar.rs is executable but has empty or no shebang, removing executable bit
BUILDSTDERR: *** WARNING: ./usr/share/cargo/registry/criterion-plot-0.2.5/src/filledcurve.rs is executable but has empty or no shebang, removing executable bit
BUILDSTDERR: *** WARNING: ./usr/share/cargo/registry/criterion-plot-0.2.5/src/grid.rs is executable but has empty or no shebang, removing executable bit
BUILDSTDERR: *** WARNING: ./usr/share/cargo/registry/criterion-plot-0.2.5/src/key.rs is executable but has empty or no shebang, removing executable bit
BUILDSTDERR: *** WARNING: ./usr/share/cargo/registry/criterion-plot-0.2.5/src/lib.rs is executable but has empty or no shebang, removing executable bit
BUILDSTDERR: *** WARNING: ./usr/share/cargo/registry/criterion-plot-0.2.5/src/map.rs is executable but has empty or no shebang, removing executable bit
BUILDSTDERR: *** WARNING: ./usr/share/cargo/registry/criterion-plot-0.2.5/src/prelude.rs is executable but has empty or no shebang, removing executable bit
BUILDSTDERR: *** WARNING: ./usr/share/cargo/registry/criterion-plot-0.2.5/src/proxy.rs is executable but has empty or no shebang, removing executable bit
BUILDSTDERR: *** WARNING: ./usr/share/cargo/registry/criterion-plot-0.2.5/src/traits.rs is executable but has empty or no shebang, removing executable bit
Erreur de construction de RPM :
BUILDSTDERR: erreur : Mauvais statut de sortie pour /var/tmp/rpm-tmp.tJaLtG (%install)
BUILDSTDERR:     Mauvais statut de sortie pour /var/tmp/rpm-tmp.tJaLtG (%install)
Child return code was: 1


It seems the whole crate is marked as executable. You should patch that.

find . -type f -exec chmod 0644 "{}" \;
find . -type d -exec chmod 0755 "{}" \;


Then a test fails:

running 5 tests
test src/lib.rs -  (line 236) ... FAILED
test src/lib.rs -  (line 14) ... ok
test src/lib.rs -  (line 167) ... ok
test src/lib.rs -  (line 314) ... ok
test src/lib.rs -  (line 81) ... ok
failures:
---- src/lib.rs -  (line 236) stdout ----
error[E0599]: no method named `arg` found for type `num_complex::Complex<f64>` in the current scope
  --> src/lib.rs:259:38
   |
24 | let phase = xs.iter().map(|&x| tf(x).arg() * 180. / PI);
   |                                      ^^^
error[E0599]: no method named `norm` found for type `num_complex::Complex<f64>` in the current scope
  --> src/lib.rs:260:42
   |
25 | let magnitude = xs.iter().map(|&x| tf(x).norm());
   |                                          ^^^^
thread 'src/lib.rs -  (line 236)' panicked at 'couldn't compile the test', librustdoc/test.rs:330:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.
failures:
    src/lib.rs -  (line 236)
test result: FAILED. 4 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out


I believe this is due to your bump of num_complex. It fails in Travis too: https://travis-ci.org/japaric/criterion.rs/builds/427526252

Comment 2 Robert-André Mauchin 🐧 2018-09-12 16:13:52 UTC
The issue in criterion plot is that default features are disabled for num-complex:

   num-complex = { version = "0.1", default-features = false }

This disables #[cfg(feature = "std") and thus norm and arg:

#[cfg(feature = "std")]
impl<T: Clone + Float> Complex<T> {
    /// Calculate |self|
    #[inline]
    pub fn norm(&self) -> T {
        self.re.hypot(self.im)
    }
    /// Calculate the principal Arg of self.
    #[inline]
    pub fn arg(&self) -> T {
        self.im.atan2(self.re)
    }

Comment 3 Igor Raits 2019-01-28 16:11:35 UTC
Let's package it later.

Nothing uses it now.

Comment 5 Robert-André Mauchin 🐧 2019-03-16 17:10:08 UTC
Koji scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=33540836

Comment 7 Robert-André Mauchin 🐧 2019-03-16 17:16:36 UTC
Koji scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=33541030