The package rpms/rust-pq-sys.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-pq-sys.git/commit/?id=34cc88....
Change:
+%ifarch %{ix86} %{arm}
Thanks.
Full change:
============
commit 34cc88ef3252e9d368982eb0b4321ed163798b2e
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Fri Aug 5 18:17:44 2022 +0200
Update to version 0.4.7; Fixes RHBZ#2108194
diff --git a/.gitignore b/.gitignore
index 0fa9d70..33da6d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/pq-sys-0.4.6.crate
+/pq-sys-0.4.7.crate
diff --git a/0001-Enforce-pkg-config-feature.patch
b/0001-Enforce-pkg-config-feature.patch
deleted file mode 100644
index b07fdad..0000000
--- a/0001-Enforce-pkg-config-feature.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From d130869572c621e13fe17fe68be7a8bd604f446c Mon Sep 17 00:00:00 2001
-From: Igor Raits <i.gnatenko.brain(a)gmail.com>
-Date: Wed, 17 Jun 2020 17:43:24 +0200
-Subject: [PATCH] Enforce pkg-config feature
-
-Signed-off-by: Igor Raits <i.gnatenko.brain(a)gmail.com>
----
- build.rs | 7 -------
- 1 file changed, 7 deletions(-)
-
-diff --git a/build.rs b/build.rs
-index aeb0e7e..ab2f8fc 100644
---- a/build.rs
-+++ b/build.rs
-@@ -1,4 +1,3 @@
--#[cfg(feature="pkg-config")]
- extern crate pkg_config;
-
- #[cfg(target_env = "msvc")]
-@@ -94,16 +93,10 @@ fn main() {
- println!("cargo:rustc-link-lib={}", LinkingOptions::from_env());
- }
-
--#[cfg(feature = "pkg-config")]
- fn configured_by_pkg_config() -> bool {
- pkg_config::probe_library("libpq").is_ok()
- }
-
--#[cfg(not(feature = "pkg-config"))]
--fn configured_by_pkg_config() -> bool {
-- false
--}
--
- #[cfg(target_env = "msvc")]
- fn configured_by_vcpkg() -> bool {
- vcpkg::probe_package("libpq").map(|_| {
---
-2.27.0
-
diff --git a/0001-unconditionally-use-pkg-config-to-link-against-syste.patch
b/0001-unconditionally-use-pkg-config-to-link-against-syste.patch
new file mode 100644
index 0000000..133d0fa
--- /dev/null
+++ b/0001-unconditionally-use-pkg-config-to-link-against-syste.patch
@@ -0,0 +1,215 @@
+From 6ad894cf364730af4b9c859a9f429e813d29e0e2 Mon Sep 17 00:00:00 2001
+From: Fabio Valentini <decathorpe(a)gmail.com>
+Date: Fri, 5 Aug 2022 17:34:40 +0200
+Subject: [PATCH] unconditionally use pkg-config to link against system libpq
+
+---
+ build.rs | 194 +------------------------------------------------------
+ 1 file changed, 1 insertion(+), 193 deletions(-)
+
+diff --git a/build.rs b/build.rs
+index c8f5a6b..3a146aa 100644
+--- a/build.rs
++++ b/build.rs
+@@ -1,197 +1,5 @@
+-#[cfg(feature="pkg-config")]
+ extern crate pkg_config;
+
+-#[cfg(target_env = "msvc")]
+-extern crate vcpkg;
+-
+-use std::process::Command;
+-use std::env;
+-use std::path::PathBuf;
+-use std::fmt::{self, Display};
+-
+-enum LinkType {
+- Static,
+- Dynamic
+-}
+-
+-impl Display for LinkType {
+- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+- match *self {
+- LinkType::Static => write!(f, "static"),
+- LinkType::Dynamic => write!(f, "dylib"),
+- }
+- }
+-}
+-
+-struct LinkingOptions {
+- linking_type: Option<LinkType>,
+- lib_name: &'static str,
+-}
+-
+-impl LinkingOptions {
+- fn from_name_and_type(lib_name: &'static str, tpe: LinkType) -> Self {
+- LinkingOptions {
+- linking_type: Some(tpe),
+- lib_name
+- }
+- }
+- fn from_name(lib_name: &'static str) -> Self {
+- LinkingOptions {
+- linking_type: None,
+- lib_name
+- }
+- }
+-
+- fn from_env() -> Self {
+- // On Windows-MSVC, always link dynamically
+- if cfg!(all(windows, target_env="msvc")) {
+- return LinkingOptions::from_name_and_type("libpq",
LinkType::Dynamic);
+- }
+-
+- // Link unconditionally statically
+- if env::var_os("PQ_LIB_STATIC").is_some() {
+- return LinkingOptions::from_name_and_type("pq",
LinkType::Static);
+- }
+-
+- // Examine the per-target env vars
+- if let Ok(target) = env::var("TARGET") {
+- let pg_config_for_target = format!("PQ_LIB_STATIC_{}",
target.to_ascii_uppercase().replace("-", "_"));
+- println!("cargo:rerun-if-env-changed={}", pg_config_for_target);
+- if env::var_os(&pg_config_for_target).is_some() {
+- return LinkingOptions::from_name_and_type("pq",
LinkType::Static);
+- }
+- }
+-
+- // Otherwise, don't specify
+- LinkingOptions::from_name("pq")
+- }
+-}
+-
+-impl Display for LinkingOptions {
+- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+- if let Some(ref t) = self.linking_type {
+- write!(f, "{}=", t)?;
+- }
+- write!(f, "{}", self.lib_name)
+- }
+-}
+-
+ fn main() {
+- println!("cargo:rerun-if-env-changed=PQ_LIB_STATIC");
+- println!("cargo:rerun-if-env-changed=TARGET");
+-
+- // if target is specified the more concrete pq_lib_dir overwrites a more general
one
+- let lib_dir = if let Ok(target) = env::var("TARGET") {
+- let pq_lib_dir_for_target = format!("PQ_LIB_DIR_{}",
target.to_ascii_uppercase().replace("-", "_"));
+- check_and_use_lib_dir(&pq_lib_dir_for_target).or_else(|_|
check_and_use_lib_dir("PQ_LIB_DIR"))
+- }
+- else{
+- check_and_use_lib_dir("PQ_LIB_DIR")
+- };
+-
+- if let Ok(lib_dir) = lib_dir {
+- println!("cargo:rustc-link-search=native={}", lib_dir);
+- } else if configured_by_pkg_config() {
+- return // pkg_config does everything for us, including output for cargo
+- } else if configured_by_vcpkg() {
+- return // vcpkg does everything for us, including output for cargo
+- } else if let Some(path) = pg_config_output("--libdir") {
+- let path = replace_homebrew_path_on_mac(path);
+- println!("cargo:rustc-link-search=native={}", path);
+- }
+- println!("cargo:rustc-link-lib={}", LinkingOptions::from_env());
+-}
+-
+-#[cfg(feature = "pkg-config")]
+-fn configured_by_pkg_config() -> bool {
+- pkg_config::probe_library("libpq").is_ok()
+-}
+-
+-#[cfg(not(feature = "pkg-config"))]
+-fn configured_by_pkg_config() -> bool {
+- false
+-}
+-
+-#[cfg(target_env = "msvc")]
+-fn configured_by_vcpkg() -> bool {
+- vcpkg::find_package("libpq").map(|_| {
+- println!("cargo:rustc-link-lib=crypt32");
+- println!("cargo:rustc-link-lib=gdi32");
+- println!("cargo:rustc-link-lib=user32");
+- println!("cargo:rustc-link-lib=secur32");
+- println!("cargo:rustc-link-lib=shell32");
+- }).is_ok()
+-}
+-
+-#[cfg(not(target_env = "msvc"))]
+-fn configured_by_vcpkg() -> bool {
+- false
+-}
+-
+-fn check_and_use_lib_dir(var_name: &str) -> Result<String, env::VarError>{
+- println!("cargo:rerun-if-env-changed={:?}", var_name);
+- println!("{:?} = {:?}", var_name , env::var(var_name));
+-
+- let pq_lib_dir = env::var(var_name);
+- if let Ok(pg_lib_path) = pq_lib_dir.clone() {
+- let path = PathBuf::from(&pg_lib_path);
+- if !path.exists() {
+- panic!("Folder {:?} doesn't exist in the configured path:
{:?}", var_name, path);
+- }
+- }
+- pq_lib_dir
+-}
+-
+-fn pg_config_path() -> PathBuf {
+- if let Ok(target) = env::var("TARGET") {
+- let pg_config_for_target = &format!("PG_CONFIG_{}",
target.to_ascii_uppercase().replace("-", "_"));
+- println!("cargo:rerun-if-env-changed={}", pg_config_for_target);
+- if let Some(pg_config_path) = env::var_os(pg_config_for_target) {
+-
+- let path = PathBuf::from(&pg_config_path);
+-
+- if !path.exists() {
+- panic!("pg_config doesn't exist in the configured path:
{:?}", path);
+- }
+-
+- return path;
+- }
+- }
+- PathBuf::from("pg_config")
+-}
+-
+-fn pg_config_output(command: &str) -> Option<String> {
+- Command::new(pg_config_path())
+- .arg(command)
+- .output()
+- .ok()
+- .into_iter()
+- .filter(|output| output.status.success())
+- .flat_map(|output| String::from_utf8(output.stdout).ok())
+- .map(|output| output.trim().to_string())
+- .next()
+-}
+-
+-#[cfg(not(target_os = "macos"))]
+-fn replace_homebrew_path_on_mac(path: String) -> String {
+- path
+-}
+-
+-#[cfg(target_os = "macos")]
+-fn replace_homebrew_path_on_mac(path: String) -> String {
+- if path == "/usr/local/lib" {
+- Command::new("brew")
+- .arg("--prefix")
+- .arg("postgres")
+- .output()
+- .ok()
+- .into_iter()
+- .filter(|output| output.status.success())
+- .flat_map(|output| String::from_utf8(output.stdout).ok())
+- .map(|output| format!("{}/lib", output.trim()))
+- .next()
+- .unwrap_or(path)
+- } else {
+- path
+- }
++ pkg_config::probe_library("libpq").unwrap();
+ }
+--
+2.37.1
+
diff --git a/pq-sys-fix-metadata-auto.diff b/pq-sys-fix-metadata-auto.diff
new file mode 100644
index 0000000..e85b31f
--- /dev/null
+++ b/pq-sys-fix-metadata-auto.diff
@@ -0,0 +1,8 @@
+--- pq-sys-0.4.7/Cargo.toml 1970-01-01T00:00:01+00:00
++++ pq-sys-0.4.7/Cargo.toml 1970-01-01T00:00:01+00:00
+@@ -25,5 +25,3 @@
+ version = "0.3.0"
+ optional = true
+
+-[target."cfg(target_env = \"msvc\")".build-dependencies.vcpkg]
+-version = "0.2.6"
diff --git a/pq-sys-fix-metadata.diff b/pq-sys-fix-metadata.diff
index 57754bc..2336a74 100644
--- a/pq-sys-fix-metadata.diff
+++ b/pq-sys-fix-metadata.diff
@@ -1,15 +1,10 @@
---- pq-sys-0.4.6/Cargo.toml 1970-01-01T00:00:00+00:00
-+++ pq-sys-0.4.6/Cargo.toml 2020-06-17T15:49:57.580950+00:00
-@@ -22,8 +22,8 @@
+--- pq-sys-0.4.7/Cargo.toml 1970-01-01T00:00:01+00:00
++++ pq-sys-0.4.7/Cargo.toml 2022-08-05T15:25:23.988681+00:00
+@@ -23,5 +23,6 @@
- [lib]
- name = "pq_sys"
--[build-dependencies.pkg-config]
-+[build-dependencies.pkg_config]
+ [build-dependencies.pkg-config]
version = "0.3.0"
-optional = true
--[target."cfg(target_env = \"msvc\")".build-dependencies.vcpkg]
--version = "0.2"
-+package = "pkg-config"
+
+[features]
+pkg-config = []
diff --git a/rust-pq-sys.spec b/rust-pq-sys.spec
index 29422d8..fc640f1 100644
--- a/rust-pq-sys.spec
+++ b/rust-pq-sys.spec
@@ -1,6 +1,7 @@
-# Generated by rust2rpm 15
-%if 0%{?__isa_bits} == 32
-#
https://github.com/sgrif/pq-sys/issues/32
+# Generated by rust2rpm 22
+%ifarch %{ix86} %{arm}
+# * generated bindgen tests only work on 64-bit architectures
+#
https://github.com/sgrif/pq-sys/issues/32
%bcond_with check
%else
%bcond_without check
@@ -9,27 +10,25 @@
%global crate pq-sys
-Name: rust-%{crate}
-Version: 0.4.6
+Name: rust-pq-sys
+Version: 0.4.7
Release: %autorelease
Summary: Auto-generated rust bindings for libpq
-# Upstream license specification: MIT OR Apache-2.0
-License: MIT or ASL 2.0
+License: MIT OR Apache-2.0
URL:
https://crates.io/crates/pq-sys
Source: %{crates_source}
-# Initial patched metadata
-# * No windows
-# * pkg-config by default
-Patch0: pq-sys-fix-metadata.diff
-Patch0001: 0001-Enforce-pkg-config-feature.patch
+# Automatically generated patch to strip foreign dependencies
+Patch: pq-sys-fix-metadata-auto.diff
+# Manually created patch for downstream crate metadata changes
+# * make build-dependency on pkg-config non-optional
+Patch: pq-sys-fix-metadata.diff
+# * unconditionally use pkg-config to link against system libpq
+Patch: 0001-unconditionally-use-pkg-config-to-link-against-syste.patch
ExclusiveArch: %{rust_arches}
-%if %{__cargo_skip_build}
-BuildArch: noarch
-%endif
-BuildRequires: rust-packaging
+BuildRequires: rust-packaging >= 21
%global _description %{expand:
Auto-generated rust bindings for libpq.}
@@ -43,11 +42,15 @@ Requires: pkgconfig(libpq)
%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
-%{cargo_registry}/%{crate}-%{version_no_tilde}/
+%license %{crate_instdir}/LICENSE-APACHE
+%license %{crate_instdir}/LICENSE-MIT
+%doc %{crate_instdir}/CHANGELOG.md
+%doc %{crate_instdir}/README.md
+%{crate_instdir}/
%package -n %{name}+default-devel
Summary: %{summary}
@@ -55,11 +58,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}+pkg-config-devel
Summary: %{summary}
@@ -67,11 +70,11 @@ BuildArch: noarch
%description -n %{name}+pkg-config-devel %{_description}
-This package contains library source intended for building other packages
-which use "pkg-config" feature of "%{crate}" crate.
+This package contains library source intended for building other packages which
+use the "pkg-config" feature of the "%{crate}" crate.
%files -n %{name}+pkg-config-devel
-%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
diff --git a/.rust2rpm.conf b/rust2rpm.conf
similarity index 100%
rename from .rust2rpm.conf
rename to rust2rpm.conf
diff --git a/sources b/sources
index c4feb68..b661c51 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (pq-sys-0.4.6.crate) =
dadabf47c3dfde30a445cb2165ed1cf8bc0e0c85d2ca20dd64cb35fd7c54a468c6533b2392d65369baf35bfacd70c9c93327deff350fea19407ae3b84a20d243
+SHA512 (pq-sys-0.4.7.crate) =
26d4c241ce607922b71eca87e753661dc4583b356279cdd3b693c34d8d3eda3cd188aa7f4daa632c4f8785ad7f5a42d58a4ec1fde059d42cc365a411170ef811
commit 190c4250ce9d92e6c820fc500e8879a7815c8d8f
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Fri Aug 5 17:23:27 2022 +0200
Convert to rpmautospec
diff --git a/changelog b/changelog
new file mode 100644
index 0000000..cf7afc1
--- /dev/null
+++ b/changelog
@@ -0,0 +1,17 @@
+* Sat Jul 23 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.4.6-6
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
+
+* Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.4.6-5
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
+
+* Fri Jul 23 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.4.6-4
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
+
+* Wed Jan 27 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.4.6-3
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+
+* Wed Jul 29 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.4.6-2
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+
+* Wed Jun 17 17:49:57 CEST 2020 Igor Raits <i.gnatenko.brain(a)gmail.com> - 0.4.6-1
+- Initial package
diff --git a/rust-pq-sys.spec b/rust-pq-sys.spec
index a010524..29422d8 100644
--- a/rust-pq-sys.spec
+++ b/rust-pq-sys.spec
@@ -11,7 +11,7 @@
Name: rust-%{crate}
Version: 0.4.6
-Release: 6%{?dist}
+Release: %autorelease
Summary: Auto-generated rust bindings for libpq
# Upstream license specification: MIT OR Apache-2.0
@@ -93,20 +93,4 @@ echo 'pkgconfig(libpq)'
%endif
%changelog
-* Sat Jul 23 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.4.6-6
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
-
-* Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.4.6-5
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
-
-* Fri Jul 23 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.4.6-4
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
-
-* Wed Jan 27 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.4.6-3
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
-
-* Wed Jul 29 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.4.6-2
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
-
-* Wed Jun 17 17:49:57 CEST 2020 Igor Raits <i.gnatenko.brain(a)gmail.com> - 0.4.6-1
-- Initial package
+%autochangelog
commit 455c690e5e248870a91374ed5e2a76da7a0a7fb5
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Sat Jul 23 05:51:27 2022 +0000
Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/rust-pq-sys.spec b/rust-pq-sys.spec
index 47749e8..a010524 100644
--- a/rust-pq-sys.spec
+++ b/rust-pq-sys.spec
@@ -11,7 +11,7 @@
Name: rust-%{crate}
Version: 0.4.6
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Auto-generated rust bindings for libpq
# Upstream license specification: MIT OR Apache-2.0
@@ -93,6 +93,9 @@ echo 'pkgconfig(libpq)'
%endif
%changelog
+* Sat Jul 23 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.4.6-6
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
+
* Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.4.6-5
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild