Compare commits

...

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

4
.gitignore vendored

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

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

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

@ -1,49 +0,0 @@
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,16 +0,0 @@
--- 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,10 +1,9 @@
--- 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 2024-09-21T23:41:05.031544+00:00 +++ hostname-0.3.1/Cargo.toml 2020-02-28T17:24:51.895846+00:00
@@ -33,6 +33,4 @@ @@ -33,6 +33,3 @@
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"]
+

@ -1,38 +1,28 @@
## START: Set by rpmautospec # Generated by rust2rpm 13
## (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-hostname Name: rust-%{crate}
Version: 0.3.1 Version: 0.3.1
Release: %autorelease Release: 6%{?dist}
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}
# Automatically generated patch to strip dependencies and normalize metadata # Initial patched metadata
Patch: hostname-fix-metadata-auto.diff # * No windows
# Manually created patch for downstream crate metadata changes Patch0: hostname-fix-metadata.diff
# * bump version-sync dev-dependency from 0.8 to 0.9:
# https://github.com/svartalf/hostname/commit/ecf28eb ExclusiveArch: %{rust_arches}
# * backport upstream port from match_cfg to cfg-if: %if %{__cargo_skip_build}
# https://github.com/svartalf/hostname/commit/7e930e9 BuildArch: noarch
Patch: hostname-fix-metadata.diff %endif
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.}
@ -45,14 +35,13 @@ BuildArch: noarch
%description devel %{_description} %description devel %{_description}
This package contains library source intended for building other packages which This package contains library source intended for building other packages
use the "%{crate}" crate. which use "%{crate}" crate.
%files devel %files devel
%license %{crate_instdir}/LICENSE %license LICENSE
%doc %{crate_instdir}/CHANGELOG.md %doc README.md
%doc %{crate_instdir}/README.md %{cargo_registry}/%{crate}-%{version_no_tilde}/
%{crate_instdir}/
%package -n %{name}+default-devel %package -n %{name}+default-devel
Summary: %{summary} Summary: %{summary}
@ -60,11 +49,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 which This package contains library source intended for building other packages
use the "default" feature of the "%{crate}" crate. which use "default" feature of "%{crate}" crate.
%files -n %{name}+default-devel %files -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%package -n %{name}+set-devel %package -n %{name}+set-devel
Summary: %{summary} Summary: %{summary}
@ -72,14 +61,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 which This package contains library source intended for building other packages
use the "set" feature of the "%{crate}" crate. which use "set" feature of "%{crate}" crate.
%files -n %{name}+set-devel %files -n %{name}+set-devel
%ghost %{crate_instdir}/Cargo.toml %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%prep %prep
%autosetup -n %{crate}-%{version} -p1 %autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep %cargo_prep
%generate_buildrequires %generate_buildrequires
@ -97,28 +86,6 @@ use the "set" feature of the "%{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
@ -154,5 +121,3 @@ use the "set" feature of the "%{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

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