fix: topgrade (#7284) (#7367)

(cherry picked from commit 7894fc2143)

Co-authored-by: madomado <madonuko@outlook.com>
This commit is contained in:
Raboneko
2025-11-13 21:33:19 -08:00
committed by GitHub
parent 4bd92e7dde
commit bb0149fc95
4 changed files with 79 additions and 113 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
project pkg {
rpm {
spec = "topgrade.spec"
spec = "rust-topgrade.spec"
}
}
+66
View File
@@ -0,0 +1,66 @@
%global __brp_mangle_shebangs %{nil}
%global crate topgrade
Name: rust-topgrade
# renovate: datasource=github-releases depName=topgrade-rs/topgrade
Version: 16.2.1
Release: 1%?dist
Summary: Upgrade all the things
SourceLicense: GPL-3.0-or-later
License: ((MIT OR Apache-2.0) AND Unicode-3.0) AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND GPL-3.0 AND GPL-3.0-only AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT)
URL: https://crates.io/crates/topgrade
Source: %crates_source
# Automatically generated patch to strip dependencies and normalize metadata
Patch: topgrade-fix-metadata-auto.diff
BuildRequires: cargo
BuildRequires: rust
BuildRequires: rpm_macro(cargo_install)
BuildRequires: anda-srpm-macros mold
%description
Keeping your system up to date usually involves invoking multiple package managers.
This results in big, non-portable shell one-liners saved in your shell.
To remedy this, Topgrade detects which tools you use and
runs the appropriate commands to update them.
%global _description %{expand:
Upgrade all the things.}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE
%license LICENSE.dependencies
%doc BREAKINGCHANGES.md
%doc CHANGELOG.md
%doc CODE_OF_CONDUCT.md
%doc CONTRIBUTING.md
%doc README.md
%doc RELEASE_PROCEDURE.md
%doc SECURITY.md
%{_bindir}/topgrade
%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep_online
%build
%cargo_license_summary_online
%{cargo_license_online} > LICENSE.dependencies
%install
%cargo_install
%changelog
* Tue Jul 02 2024 Andrey Brusnik <dev@shdwchn.io> - 15.0.0-1
- chore(topgrade): Bump to 15.0.0
* Tue Jun 18 2024 Andrey Brusnik <dev@shdwchn.io> - 14.0.1-1
- feat: Added topgrade package
@@ -1,9 +1,12 @@
--- topgrade-16.0.2/Cargo.toml 1970-01-01T00:00:01+00:00
+++ topgrade-16.0.2/Cargo.toml 2025-01-03T04:51:04.571554+00:00
@@ -204,19 +204,3 @@
--- topgrade-16.2.1/Cargo.toml 1970-01-01T00:00:01+00:00
+++ topgrade-16.2.1/Cargo.toml 2025-11-11T08:14:26.891440+00:00
@@ -246,26 +246,3 @@
default-features = false
package = "self_update"
-[target."cfg(windows)".dependencies.is_elevated]
-version = "~0.1"
-
-[target."cfg(windows)".dependencies.parselnk]
-version = "~0.1"
-
@@ -18,5 +21,9 @@
-default-features = false
-package = "self_update"
-
-[target."cfg(windows)".dependencies.winapi]
-version = "~0.3"
-[target."cfg(windows)".dependencies.windows]
-version = "~0.62"
-features = ["Win32_System_Console"]
-
-[target."cfg(windows)".dependencies.windows-registry]
-version = "~0.6"
-107
View File
@@ -1,107 +0,0 @@
%global __brp_mangle_shebangs %{nil}
%global crate topgrade
Name: topgrade
# renovate: datasource=github-releases depName=topgrade-rs/topgrade
Version: 16.2.1
Release: 1%?dist
Summary: Upgrade all the things
SourceLicense: GPL-3.0-or-later
License: ((MIT OR Apache-2.0) AND Unicode-DFS-2016) AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND GPL-3.0 AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND (Unlicense OR MIT)
URL: https://github.com/topgrade-rs/%{name}
Source: %crates_source
# Automatically generated patch to strip dependencies and normalize metadata
Patch: topgrade-fix-metadata-auto.diff
BuildRequires: cargo
BuildRequires: rust
BuildRequires: rpm_macro(cargo_install)
BuildRequires: anda-srpm-macros mold
%description
Keeping your system up to date usually involves invoking multiple package managers.
This results in big, non-portable shell one-liners saved in your shell.
To remedy this, Topgrade detects which tools you use and
runs the appropriate commands to update them.
%global _description %{expand:
Upgrade all the things.}
%package -n rust-%name-devel
Summary: %{summary}
BuildArch: noarch
%description -n rust-%name-devel %{_description}
This package contains library source intended for building other packages which
use the "%{crate}" crate.
%files -n rust-%name-devel
%dnl %license %{crate_instdir}/LICENSE
%dnl %doc %{crate_instdir}/BREAKINGCHANGES.md
%dnl %doc %{crate_instdir}/CODE_OF_CONDUCT.md
%dnl %doc %{crate_instdir}/CONTRIBUTING.md
%dnl %doc %{crate_instdir}/README.md
%dnl %doc %{crate_instdir}/RELEASE_PROCEDURE.md
%dnl %doc %{crate_instdir}/SECURITY.md
%{crate_instdir}/
%package -n rust-%{name}+default-devel
Summary: %{summary}
BuildArch: noarch
%description -n rust-%{name}+default-devel %{_description}
This package contains library source intended for building other packages which
use the "default" feature of the "%{crate}" crate.
%files -n rust-%{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n rust-%{name}+self-update-devel
Summary: %{summary}
BuildArch: noarch
%description -n rust-%{name}+self-update-devel %{_description}
This package contains library source intended for building other packages which
use the "self-update" feature of the "%{crate}" crate.
%files -n rust-%{name}+self-update-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n rust-%{name}+self_update_crate-devel
Summary: %{summary}
BuildArch: noarch
%description -n rust-%{name}+self_update_crate-devel %{_description}
This package contains library source intended for building other packages which
use the "self_update_crate" feature of the "%{crate}" crate.
%files -n rust-%{name}+self_update_crate-devel
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{name}-%{version} -p1
%cargo_prep_online
%build
%cargo_license_summary_online
%{cargo_license_online} > LICENSE.dependencies
%install
%cargo_install
%files
%license LICENSE LICENSE.dependencies
%doc BREAKINGCHANGES.md README.md
%{_bindir}/%{name}
%changelog
* Tue Jul 02 2024 Andrey Brusnik <dev@shdwchn.io> - 15.0.0-1
- chore(topgrade): Bump to 15.0.0
* Tue Jun 18 2024 Andrey Brusnik <dev@shdwchn.io> - 14.0.1-1
- feat: Added topgrade package