Hello community, here is the log from the commit of package cargo-vendor for openSUSE:Factory checked in at 2018-11-26 10:22:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cargo-vendor (Old) and /work/SRC/openSUSE:Factory/.cargo-vendor.new.19453 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cargo-vendor" Mon Nov 26 10:22:45 2018 rev:6 rq:649825 version:0.1.21 Changes: -------- --- /work/SRC/openSUSE:Factory/cargo-vendor/cargo-vendor.changes 2018-08-03 12:38:41.291693195 +0200 +++ /work/SRC/openSUSE:Factory/.cargo-vendor.new.19453/cargo-vendor.changes 2018-11-26 10:23:58.753473662 +0100 @@ -1,0 +2,19 @@ +Sat Nov 17 00:58:45 UTC 2018 - Luke Jones <[email protected]> + +- Truncate any cargo-checksum.json in vendored sources to prevent + build errors when cargo rechecks after autoconf changes files. + +------------------------------------------------------------------- +Tue Nov 6 08:15:17 UTC 2018 - Luke Jones <[email protected]> + +- Re-export rustflags before install to prevent the rebuild of the + binary when cargo install detects the flags have changed (to + none). + +------------------------------------------------------------------- +Tue Nov 6 01:16:48 UTC 2018 - Luke Jones <[email protected]> + +- Update to 0.1.21 + + no changelog provided + +------------------------------------------------------------------- Old: ---- cargo-vendor-0.1.15.tar.gz vendor.tar.xz New: ---- cargo-vendor-src-0.1.21.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cargo-vendor.spec ++++++ --- /var/tmp/diff_new_pack.VFFnsI/_old 2018-11-26 10:24:00.973471052 +0100 +++ /var/tmp/diff_new_pack.VFFnsI/_new 2018-11-26 10:24:00.973471052 +0100 @@ -1,8 +1,8 @@ # # spec file for package cargo-vendor # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. -# Copyright (c) 2017 Luke Jones, [email protected] +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 Luke Jones, [email protected] # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -13,34 +13,37 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # +# Use hardening ldflags. +%global rustflags -Clink-arg=-Wl,-z,relro,-z,now Name: cargo-vendor -Version: 0.1.15 +Version: 0.1.21 Release: 0 Summary: A Cargo subcommand to vendor Rust dependencies -License: MIT or Apache-2.0 +License: MIT OR Apache-2.0 Group: Development/Languages/Rust -Url: https://github.com/alexcrichton/cargo-vendor -Source0: %{name}-%{version}.tar.gz -Source1: vendor.tar.xz +URL: https://github.com/alexcrichton/cargo-vendor +Source0: %{name}-src-%{version}.tar.gz BuildRequires: cargo BuildRequires: cmake -# BuildRequires: pkgconfig(libgit2) -BuildRequires: rust -BuildRequires: rust-std -BuildRequires: pkgconfig(libssl) +BuildRequires: pkgconfig +BuildRequires: rust >= 1.30.0 +BuildRequires: rust-std-static >= 1.30.0 +# curl-sys: libcurl, openssl +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libgit2) >= 0.23 +BuildRequires: pkgconfig(libssh2) >= 1.4.3 BuildRequires: pkgconfig(openssl) -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: pkgconfig(zlib) %description This is a Cargo subcommand which vendors all crates.io dependencies into a local directory using Cargo's support for source replacement. %prep -%setup -q -%setup -q -D -T -a 1 +%setup -q -n %{name}-src-%{version} mkdir cargo-home cat >cargo-home/config <<EOF [source.crates-io] @@ -50,19 +53,35 @@ directory = './vendor' EOF +# The configure macro will modify some autoconf-related files, which upsets +# cargo when it tries to verify checksums in those files. If we just truncate +# that file list, cargo won't have anything to complain about. +find vendor -name .cargo-checksum.json \ + -exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+' + %build +# This should eventually migrate to distro policy +# Enable optimization, debuginfo, and link hardening. +export RUSTFLAGS="%{rustflags}" export CARGO_HOME=`pwd`/cargo-home/ -cargo build --release %{?_smp_mflags} +export LIBGIT2_SYS_USE_PKG_CONFIG=1 +export LIBSSH2_SYS_USE_PKG_CONFIG=1 + +cargo build --release %install -mkdir build +# rustflags must be exported again at install as cargo build will +# rebuild the project if it detects flags have changed (to none or other) +export RUSTFLAGS="%{rustflags}" +# install stage also requires re-export of 'cargo-home' or cargo +# will try to download source deps and rebuild export CARGO_HOME=`pwd`/cargo-home/ -cargo install --root=build -mkdir -p %{buildroot}%{_bindir} -install -Dm0755 build/bin/cargo-vendor %{buildroot}%{_bindir}/cargo-vendor +# cargo install appends /bin to the path +cargo install --root=%{buildroot}%{_prefix} +# remove spurious file +rm %{buildroot}%{_prefix}/.crates.toml %files -%defattr(-,root,root) %doc LICENSE-MIT LICENSE-APACHE README.md %{_bindir}/cargo-vendor
