- add 0001-Skip-warnings.patch to allow building on rust 1.83

OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/cargo-audit?expand=0&rev=45
This commit is contained in:
William Brown 2025-01-08 02:41:54 +00:00 committed by Git OBS Bridge
commit b5db77aaa0
12 changed files with 1567 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

76
0001-Skip-warnings.patch Normal file
View File

@ -0,0 +1,76 @@
From 645cfd950abf7c2fff6fc12915e7562439007b57 Mon Sep 17 00:00:00 2001
From: William Brown <william@blackhats.net.au>
Date: Tue, 7 Jan 2025 10:08:13 +1000
Subject: [PATCH] Skip warnings
---
admin/src/bin/rustsec-admin/main.rs | 2 +-
admin/src/lib.rs | 2 +-
admin/tests/acceptance.rs | 2 +-
cargo-audit/src/bin/cargo-audit/main.rs | 2 +-
cargo-audit/tests/acceptance.rs | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/admin/src/bin/rustsec-admin/main.rs b/admin/src/bin/rustsec-admin/main.rs
index 36d5912..eda0452 100644
--- a/admin/src/bin/rustsec-admin/main.rs
+++ b/admin/src/bin/rustsec-admin/main.rs
@@ -1,6 +1,6 @@
//! Main entry point for the `rustsec-admin` CLI application
-#![deny(warnings, missing_docs, trivial_casts, unused_qualifications)]
+#![deny(missing_docs, trivial_casts, unused_qualifications)]
#![forbid(unsafe_code)]
use rustsec_admin::application::APPLICATION;
diff --git a/admin/src/lib.rs b/admin/src/lib.rs
index 6f4b8ba..564de2e 100644
--- a/admin/src/lib.rs
+++ b/admin/src/lib.rs
@@ -2,7 +2,7 @@
//!
//! Administrative tool for the RustSec Advisory Database
-#![deny(warnings, missing_docs, trivial_casts, unused_qualifications)]
+#![deny(missing_docs, trivial_casts, unused_qualifications)]
#![forbid(unsafe_code)]
pub mod application;
diff --git a/admin/tests/acceptance.rs b/admin/tests/acceptance.rs
index f559e4c..594dda8 100644
--- a/admin/tests/acceptance.rs
+++ b/admin/tests/acceptance.rs
@@ -1,4 +1,4 @@
-#![deny(warnings, missing_docs, trivial_casts, unused_qualifications)]
+#![deny(missing_docs, trivial_casts, unused_qualifications)]
#![forbid(unsafe_code)]
use abscissa_core::testing::prelude::*;
diff --git a/cargo-audit/src/bin/cargo-audit/main.rs b/cargo-audit/src/bin/cargo-audit/main.rs
index 7f0c3c0..78ce4f3 100644
--- a/cargo-audit/src/bin/cargo-audit/main.rs
+++ b/cargo-audit/src/bin/cargo-audit/main.rs
@@ -1,6 +1,6 @@
//! Main entry point for `cargo audit`
-#![deny(warnings, missing_docs, trivial_casts, unused_qualifications)]
+#![deny(missing_docs, trivial_casts, unused_qualifications)]
#![forbid(unsafe_code)]
use cargo_audit::application::APP;
diff --git a/cargo-audit/tests/acceptance.rs b/cargo-audit/tests/acceptance.rs
index 96d5529..982f8f3 100644
--- a/cargo-audit/tests/acceptance.rs
+++ b/cargo-audit/tests/acceptance.rs
@@ -4,7 +4,7 @@
//! For more information, see:
//! <https://docs.rs/abscissa_core/latest/abscissa_core/testing/index.html>
-#![deny(warnings, missing_docs, trivial_casts, unused_qualifications)]
+#![deny(missing_docs, trivial_casts, unused_qualifications)]
#![forbid(unsafe_code)]
use abscissa_core::testing::prelude::*;
--
2.39.5 (Apple Git-154)

9
_constraints Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<constraints>
<hardware>
<disk>
<!-- Needed because PPC chronically runs out of disk because sigghhh -->
<size unit="G">25</size>
</disk>
</hardware>
</constraints>

30
_service Normal file
View File

@ -0,0 +1,30 @@
<services>
<service mode="disabled" name="obs_scm">
<param name="url">https://github.com/RustSec/rustsec.git</param>
<param name="versionformat">@PARENT_TAG@~git@TAG_OFFSET@.%h</param>
<param name="scm">git</param>
<param name="revision">cargo-audit/v0.21.0</param>
<!-- <param name="revision">main</param> -->
<param name="match-tag">cargo-audit/v*</param>
<param name="versionrewrite-pattern">.*v(\d+\.\d+\.\d+)</param>
<param name="versionrewrite-replacement">\1</param>
<param name="changesgenerate">enable</param>
<param name="changesauthor">william.brown@suse.com</param>
</service>
<service mode="disabled" name="set_version"/>
<service mode="disabled" name="tar" />
<service mode="disabled" name="recompress">
<param name="file">*.tar</param>
<param name="compression">zst</param>
</service>
<service name="cargo_vendor" mode="disabled">
<param name="srcdir">rustsec</param>
<param name="compression">zst</param>
<param name="update">true</param>
<param name="i-accept-the-risk">RUSTSEC-2024-0019</param>
</service>
<service name="cargo_audit" mode="disabled">
<param name="srcdir">rustsec</param>
<param name="lockfile">Cargo.lock</param>
</service>
</services>

4
_servicedata Normal file
View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/RustSec/rustsec.git</param>
<param name="changesrevision">78f9859ef6a78bc4a7c7219dac1d0b250446c84c</param></service></servicedata>

1354
cargo-audit.changes Normal file

File diff suppressed because it is too large Load Diff

56
cargo-audit.spec Normal file
View File

@ -0,0 +1,56 @@
#
# spec file for package cargo-audit
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global rustflags -Clink-arg=-Wl,-z,relro,-z,now -C debuginfo=2
%global workspace_name rustsec
Name: cargo-audit
Version: 0.21.0~git0.78f9859
Release: 0
Summary: Audit rust sources for known security vulnerabilities
License: ( 0BSD OR MIT OR Apache-2.0 ) AND ( Apache-2.0 OR BSL-1.0 ) AND ( Apache-2.0 OR MIT ) AND ( MIT OR Zlib OR Apache-2.0 ) AND ( Unlicense OR MIT ) AND ( Zlib OR Apache-2.0 OR MIT ) AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND MIT AND MPL-2.0 AND MPL-2.0+
Group: Development/Languages/Rust
URL: https://github.com/RustSec/cargo-audit
Source0: %{workspace_name}-%{version}.tar.zst
Source1: vendor.tar.zst
Patch0: 0001-Skip-warnings.patch
BuildRequires: cargo-packaging
BuildRequires: pkgconfig(openssl)
ExclusiveArch: %{rust_tier1_arches}
%description
Audit Cargo.lock files for crates with security vulnerabilities reported to the RustSec Advisory Database.
%prep
%setup -q -n %{workspace_name}-%{version}
%setup -qa1 -n %{workspace_name}-%{version}
%autopatch -p 1
%build
%{cargo_build}
%install
install -D -d -m 0755 %{buildroot}%{_bindir}
install -m 0755 %{_builddir}/%{workspace_name}-%{version}/target/release/cargo-audit %{buildroot}%{_bindir}/cargo-audit
%files
%{_bindir}/cargo-audit
%changelog

5
cargo_config Normal file
View File

@ -0,0 +1,5 @@
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b2aa891ed289a8b0ec3165b52722186d5898a5316e022a8da22476b0cf2d2c76
size 656733

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b6b63ddf92f0be13845b839ca3e2c697da9d1c05a9a1cd3869186269e67f93ab
size 701261

3
vendor.tar.zst Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:430cb12fc7655fe88b8dc69ffcdc94563dd1fa94bce3343b2e2020c1c9a1e499
size 31522507