From 508f30a9cfc36fca8fd17179cdc700c7614051d3 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 14 Apr 2023 18:39:07 +0200 Subject: [PATCH] Update to version 0.2.2; Fixes RHBZ#2125983 --- .gitignore | 1 + LICENSE | 12 ++++++++ README.md | 3 -- alloc-stdlib-fix-metadata.diff | 12 ++++++++ rust-alloc-stdlib.spec | 51 ++++++++++++++++------------------ sources | 2 +- 6 files changed, 50 insertions(+), 31 deletions(-) create mode 100644 LICENSE delete mode 100644 README.md create mode 100644 alloc-stdlib-fix-metadata.diff diff --git a/.gitignore b/.gitignore index f5b8cbc..9ce14c4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /alloc-stdlib-0.2.1.crate +/alloc-stdlib-0.2.2.crate diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..cd496ba --- /dev/null +++ b/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2016 Dropbox, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md deleted file mode 100644 index 662c1a5..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-alloc-stdlib - -The rust-alloc-stdlib package \ No newline at end of file diff --git a/alloc-stdlib-fix-metadata.diff b/alloc-stdlib-fix-metadata.diff new file mode 100644 index 0000000..3bb6d1d --- /dev/null +++ b/alloc-stdlib-fix-metadata.diff @@ -0,0 +1,12 @@ +--- alloc-stdlib-0.2.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ alloc-stdlib-0.2.2/Cargo.toml 2023-04-14T16:29:59.774576+00:00 +@@ -28,9 +28,6 @@ + license = "BSD-3-Clause" + repository = "https://github.com/dropbox/rust-alloc-no-stdlib" + +-[[bin]] +-name = "example" +- + [dependencies.alloc-no-stdlib] + version = "2.0.4" + diff --git a/rust-alloc-stdlib.spec b/rust-alloc-stdlib.spec index f54f70d..1e37726 100644 --- a/rust-alloc-stdlib.spec +++ b/rust-alloc-stdlib.spec @@ -1,32 +1,27 @@ -# Generated by rust2rpm 12 +# Generated by rust2rpm 24 %bcond_without check %global debug_package %{nil} -# The binary is useless -%global __cargo_is_bin() false - %global crate alloc-stdlib -Name: rust-%{crate} -Version: 0.2.1 +Name: rust-alloc-stdlib +Version: 0.2.2 Release: %autorelease Summary: Dynamic allocator example that may be used with the stdlib -# Upstream license specification: BSD-3-Clause -# * https://github.com/dropbox/rust-alloc-no-stdlib/issues/9 -License: BSD +# https://github.com/dropbox/rust-alloc-no-stdlib/issues/9 +License: BSD-3-Clause URL: https://crates.io/crates/alloc-stdlib -Source: %{crates_source} - -ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif +Source0: %{crates_source} +Source1: https://github.com/dropbox/rust-alloc-no-stdlib/raw/3b341cc/LICENSE +# Manually created patch for downstream crate metadata changes +# * prevent example executable from being installed and shipped +Patch: alloc-stdlib-fix-metadata.diff -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: -Dynamic allocator example that may be used with the stdlib.} +A dynamic allocator example that may be used with the stdlib.} %description %{_description} @@ -36,12 +31,13 @@ BuildArch: noarch %description devel %{_description} -This package contains library source intended for building other packages -which use "%{crate}" crate. +This package contains library source intended for building other packages which +use the "%{crate}" crate. %files devel -%doc README.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -49,11 +45,11 @@ BuildArch: noarch %description -n %{name}+default-devel %{_description} -This package contains library source intended for building other packages -which use "default" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+unsafe-devel Summary: %{summary} @@ -61,17 +57,18 @@ BuildArch: noarch %description -n %{name}+unsafe-devel %{_description} -This package contains library source intended for building other packages -which use "unsafe" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "unsafe" feature of the "%{crate}" crate. %files -n %{name}+unsafe-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 # https://github.com/dropbox/rust-alloc-no-stdlib/pull/8 find -type f -name '*.rs' -executable -exec chmod -x '{}' + %cargo_prep +cp -pav %{SOURCE1} . %generate_buildrequires %cargo_generate_buildrequires diff --git a/sources b/sources index 6906db3..a3bc08f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (alloc-stdlib-0.2.1.crate) = 282f1d34d40b994dfb008abba45c99c1bb7dd30a1bd7e168f4fda7297bec5edbfe28358eb3447d89d02cfada0a6035ef69388c7c533b00c31dbd4a1e873a483a +SHA512 (alloc-stdlib-0.2.2.crate) = 9c4169052ad460af2be6f2a128056661b2f26da0122877f13fcd4f4f3e2e9537783cb2b2bec47af43569629639aa8ad507ab010833982e5d942f5b26cfd46c14