Hello community, here is the log from the commit of package cargo-vendor for openSUSE:Leap:15.2 checked in at 2020-06-05 13:47:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/cargo-vendor (Old) and /work/SRC/openSUSE:Leap:15.2/.cargo-vendor.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cargo-vendor" Fri Jun 5 13:47:26 2020 rev:14 rq:811734 version:0.1.23 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/cargo-vendor/cargo-vendor.changes 2020-01-15 14:49:29.917381531 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.cargo-vendor.new.3606/cargo-vendor.changes 2020-06-05 13:47:28.245559243 +0200 @@ -1,0 +2,31 @@ +Thu Feb 14 12:31:50 UTC 2019 - [email protected] + +- Update to 0.1.23 + + no changelog provided + +------------------------------------------------------------------- +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 + +------------------------------------------------------------------- +Thu Jul 19 11:41:30 UTC 2018 - [email protected] + +- Update to 0.1.15 + + no changelog provided + +------------------------------------------------------------------- Old: ---- cargo-vendor-0.1.13.tar.gz vendor.tar.xz New: ---- cargo-vendor-src-0.1.23.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cargo-vendor.spec ++++++ --- /var/tmp/diff_new_pack.R393vK/_old 2020-06-05 13:47:28.785560695 +0200 +++ /var/tmp/diff_new_pack.R393vK/_new 2020-06-05 13:47:28.789560705 +0200 @@ -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) 2019 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 @@ -17,30 +17,33 @@ # +# Use hardening ldflags. +%global rustflags -Clink-arg=-Wl,-z,relro,-z,now Name: cargo-vendor -Version: 0.1.13 +Version: 0.1.23 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: https://github.com/alexcrichton/cargo-vendor/releases/download/%{version}/cargo-vendor-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
