Compare commits

..

No commits in common. 'epel9' and 'i10ce' have entirely different histories.
epel9 ... i10ce

4
.gitignore vendored

@ -1,3 +1 @@
/hostname-0.1.5.crate SOURCES/hostname-0.3.1.crate
/hostname-0.3.0.crate
/hostname-0.3.1.crate

@ -0,0 +1 @@
869c9f98c93e2f505489655e72b7ebdde26bc094 SOURCES/hostname-0.3.1.crate

@ -1,3 +0,0 @@
# rust-hostname
The rust-hostname package

@ -0,0 +1,49 @@
From 3976c5bac1a5e7a4e9e0b8b12d8695ec6f8f00fb Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Sun, 22 Sep 2024 01:47:58 +0200
Subject: [PATCH] port from match_cfg to cfg-if
---
src/lib.rs | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/lib.rs b/src/lib.rs
index 1a817b3..7ac8fef 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -57,27 +57,25 @@ println!("{:?}", name);
#![allow(unknown_lints, unused_extern_crates)]
#[macro_use]
-extern crate match_cfg;
+extern crate cfg_if;
#[cfg(feature = "set")]
use std::ffi::OsStr;
use std::ffi::OsString;
use std::io;
-match_cfg! {
- #[cfg(any(unix, target_os = "redox"))] => {
+cfg_if! {
+ if #[cfg(any(unix, target_os = "redox"))] {
extern crate libc;
mod nix;
use ::nix as sys;
- }
- #[cfg(target_os = "windows")] => {
+ } else if #[cfg(target_os = "windows")] {
extern crate winapi;
mod windows;
use ::windows as sys;
- }
- _ => {
+ } else {
compile_error!("Unsupported target OS! Create an issue: https://github.com/svartalf/hostname/issues/new");
}
}
--
2.46.1

@ -1,9 +1,10 @@
--- hostname-0.3.1/Cargo.toml 2020-02-28T16:58:01+00:00 --- hostname-0.3.1/Cargo.toml 2020-02-28T16:58:01+00:00
+++ hostname-0.3.1/Cargo.toml 2020-02-28T17:24:51.895846+00:00 +++ hostname-0.3.1/Cargo.toml 2024-09-21T23:41:05.031544+00:00
@@ -33,6 +33,3 @@ @@ -33,6 +33,4 @@
set = [] set = []
[target."cfg(any(unix, target_os = \"redox\"))".dependencies.libc] [target."cfg(any(unix, target_os = \"redox\"))".dependencies.libc]
version = "^0.2" version = "^0.2"
-[target."cfg(target_os = \"windows\")".dependencies.winapi] -[target."cfg(target_os = \"windows\")".dependencies.winapi]
-version = "^0.3" -version = "^0.3"
-features = ["sysinfoapi"] -features = ["sysinfoapi"]
+

@ -0,0 +1,16 @@
--- hostname-0.3.1/Cargo.toml 2020-02-28T16:58:01+00:00
+++ hostname-0.3.1/Cargo.toml 2024-09-21T23:41:28.498611+00:00
@@ -23,10 +23,10 @@
[package.metadata.docs.rs]
features = ["set"]
rustdoc-args = ["--cfg", "docsrs"]
-[dependencies.match_cfg]
-version = "^0.1"
+[dependencies.cfg-if]
+version = "^1.0"
[dev-dependencies.version-sync]
-version = "0.8"
+version = "0.9"
[features]
default = []

@ -1,28 +1,38 @@
# Generated by rust2rpm 13 ## START: Set by rpmautospec
## (rpmautospec version 0.7.2)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 13;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
# Generated by rust2rpm 26
%bcond_without check %bcond_without check
%global debug_package %{nil} %global debug_package %{nil}
%global crate hostname %global crate hostname
Name: rust-%{crate} Name: rust-hostname
Version: 0.3.1 Version: 0.3.1
Release: 6%{?dist} Release: %autorelease
Summary: Cross-platform system's host name functions Summary: Cross-platform system's host name functions
# Upstream license specification: MIT
License: MIT License: MIT
URL: https://crates.io/crates/hostname URL: https://crates.io/crates/hostname
Source: %{crates_source} Source: %{crates_source}
# Initial patched metadata # Automatically generated patch to strip dependencies and normalize metadata
# * No windows Patch: hostname-fix-metadata-auto.diff
Patch0: hostname-fix-metadata.diff # Manually created patch for downstream crate metadata changes
# * bump version-sync dev-dependency from 0.8 to 0.9:
ExclusiveArch: %{rust_arches} # https://github.com/svartalf/hostname/commit/ecf28eb
%if %{__cargo_skip_build} # * backport upstream port from match_cfg to cfg-if:
BuildArch: noarch # https://github.com/svartalf/hostname/commit/7e930e9
%endif Patch: hostname-fix-metadata.diff
Patch: 0001-port-from-match_cfg-to-cfg-if.patch
BuildRequires: rust-packaging
BuildRequires: cargo-rpm-macros >= 24
%global _description %{expand: %global _description %{expand:
Cross-platform system's host name functions.} Cross-platform system's host name functions.}
@ -35,13 +45,14 @@ BuildArch: noarch
%description devel %{_description} %description devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "%{crate}" crate. use the "%{crate}" crate.
%files devel %files devel
%license LICENSE %license %{crate_instdir}/LICENSE
%doc README.md %doc %{crate_instdir}/CHANGELOG.md
%{cargo_registry}/%{crate}-%{version_no_tilde}/ %doc %{crate_instdir}/README.md
%{crate_instdir}/
%package -n %{name}+default-devel %package -n %{name}+default-devel
Summary: %{summary} Summary: %{summary}
@ -49,11 +60,11 @@ BuildArch: noarch
%description -n %{name}+default-devel %{_description} %description -n %{name}+default-devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "default" feature of "%{crate}" crate. use the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel %files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+set-devel %package -n %{name}+set-devel
Summary: %{summary} Summary: %{summary}
@ -61,14 +72,14 @@ BuildArch: noarch
%description -n %{name}+set-devel %{_description} %description -n %{name}+set-devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "set" feature of "%{crate}" crate. use the "set" feature of the "%{crate}" crate.
%files -n %{name}+set-devel %files -n %{name}+set-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %ghost %{crate_instdir}/Cargo.toml
%prep %prep
%autosetup -n %{crate}-%{version_no_tilde} -p1 %autosetup -n %{crate}-%{version} -p1
%cargo_prep %cargo_prep
%generate_buildrequires %generate_buildrequires
@ -86,6 +97,28 @@ which use "set" feature of "%{crate}" crate.
%endif %endif
%changelog %changelog
* Fri Dec 20 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 0.3.1-13
- Rebuilt for MSVSphere 10
## START: Generated by rpmautospec
* Sat Sep 21 2024 Fabio Valentini <decathorpe@gmail.com> - 0.3.1-13
- Port from match_cfg to cfg-if and bump version-sync from 0.8 to 0.9
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed May 17 2023 Fabio Valentini <decathorpe@gmail.com> - 0.3.1-9
- Regenerate with rust2rpm v24
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-6 * Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
@ -121,3 +154,5 @@ which use "set" feature of "%{crate}" crate.
* Mon Jan 28 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.1.5-1 * Mon Jan 28 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.1.5-1
- Initial package - Initial package
## END: Generated by rpmautospec

@ -1 +0,0 @@
SHA512 (hostname-0.3.1.crate) = a90407996353c9bcf5b76be03713e3a0455ac80a50892e77a508744cf436a938ddb87ef97d8cc91ec7dc4353cfb7bca0fd28c90a72f8a9ecd4f29220d174edf2
Loading…
Cancel
Save