From fdbe09248335330cc174768ff7fc34481d7a5c8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= Date: Fri, 12 Nov 2021 01:51:52 +0100 Subject: [PATCH] Update to 0.23.1 Close: rhbz#1946044 --- .gitignore | 1 + Restrict-vcpkg-feature.patch | 21 +++++++++++++++++++++ libsqlite3-sys-fix-metadata.diff | 24 +++++++++++++----------- rust-libsqlite3-sys.spec | 26 ++++++++++++++++++++------ sources | 2 +- 5 files changed, 56 insertions(+), 18 deletions(-) create mode 100644 Restrict-vcpkg-feature.patch diff --git a/.gitignore b/.gitignore index 55db102..63f0bfc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /libsqlite3-sys-0.18.0.crate /libsqlite3-sys-0.20.1.crate +/libsqlite3-sys-0.23.1.crate diff --git a/Restrict-vcpkg-feature.patch b/Restrict-vcpkg-feature.patch new file mode 100644 index 0000000..2259c6e --- /dev/null +++ b/Restrict-vcpkg-feature.patch @@ -0,0 +1,21 @@ +diff -up libsqlite3-sys-0.23.1/build.rs.orig libsqlite3-sys-0.23.1/build.rs +--- libsqlite3-sys-0.23.1/build.rs.orig 1973-11-29 22:33:09.000000000 +0100 ++++ libsqlite3-sys-0.23.1/build.rs 2021-11-12 01:46:07.337024842 +0100 +@@ -423,6 +423,7 @@ mod build_linked { + return HeaderLocation::FromEnvironment; + } + ++ #[cfg(all(feature = "vcpkg", target_env = "msvc"))] + if let Some(header) = try_vcpkg() { + return header; + } +@@ -450,7 +451,8 @@ mod build_linked { + } + } + } +- ++ ++ #[cfg(all(feature = "vcpkg", target_env = "msvc"))] + fn try_vcpkg() -> Option { + if cfg!(feature = "vcpkg") && is_compiler("msvc") { + // See if vcpkg can find it. diff --git a/libsqlite3-sys-fix-metadata.diff b/libsqlite3-sys-fix-metadata.diff index e333e93..b01eb5d 100644 --- a/libsqlite3-sys-fix-metadata.diff +++ b/libsqlite3-sys-fix-metadata.diff @@ -1,21 +1,26 @@ ---- libsqlite3-sys-0.20.1/Cargo.toml 2020-10-07T22:54:16+00:00 -+++ libsqlite3-sys-0.20.1/Cargo.toml 2021-03-05T13:43:46.101915+00:00 -@@ -23,8 +23,7 @@ - license = "MIT" - repository = "https://github.com/rusqlite/rusqlite" +--- libsqlite3-sys-0.23.1/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ libsqlite3-sys-0.23.1/Cargo.toml 2021-11-11T23:59:58.779046+00:00 +@@ -26,7 +26,6 @@ + optional = true [build-dependencies.bindgen] --version = "0.55" + version = "0.59" -features = ["runtime"] -+version = "0.57" optional = true default-features = false -@@ -37,23 +36,15 @@ +@@ -38,27 +37,16 @@ + version = "0.3.19" optional = true +-[build-dependencies.vcpkg] +-version = "0.2" +-optional = true +- [features] -buildtime_bindgen = ["bindgen", "pkg-config", "vcpkg"] -bundled = ["cc", "bundled_bindings"] +-bundled-sqlcipher = ["bundled"] +-bundled-sqlcipher-vendored-openssl = ["bundled-sqlcipher", "openssl-sys/vendored"] -bundled-windows = ["cc", "bundled_bindings"] -bundled_bindings = [] -default = ["min_sqlite_version_3_6_8"] @@ -37,6 +42,3 @@ -wasm32-wasi-vfs = [] -winsqlite3 = ["min_sqlite_version_3_7_16"] with-asan = [] --[target."cfg(target_env = \"msvc\")".build-dependencies.vcpkg] --version = "0.2" --optional = true diff --git a/rust-libsqlite3-sys.spec b/rust-libsqlite3-sys.spec index e1e85f7..cd032d0 100644 --- a/rust-libsqlite3-sys.spec +++ b/rust-libsqlite3-sys.spec @@ -1,11 +1,11 @@ -# Generated by rust2rpm 17 +# Generated by rust2rpm 18 %bcond_without check %global debug_package %{nil} %global crate libsqlite3-sys Name: rust-%{crate} -Version: 0.20.1 +Version: 0.23.1 Release: %autorelease Summary: Native bindings to the libsqlite3 library @@ -16,8 +16,8 @@ Source: %{crates_source} # Initial patched metadata # * No bundled sqlite # * Remove windows and WASM features -# * Bump to bindgen 0.57: https://github.com/rusqlite/rusqlite/commit/18bc6dd Patch0: libsqlite3-sys-fix-metadata.diff +Patch1: Restrict-vcpkg-feature.patch ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build} @@ -35,6 +35,7 @@ Native bindings to the libsqlite3 library.} Summary: %{summary} BuildArch: noarch Requires: pkgconfig(sqlite3) >= 3.7.16 +Requires: pkgconfig(sqlcipher) %description devel %{_description} @@ -42,7 +43,8 @@ This package contains library source intended for building other packages which use "%{crate}" crate. %files devel -%license LICENSE +%license LICENSE sqlcipher/LICENSE +%doc README.md %{cargo_registry}/%{crate}-%{version_no_tilde}/ %package -n %{name}+default-devel @@ -153,6 +155,18 @@ which use "min_sqlite_version_3_7_7" feature of "%{crate}" crate. %files -n %{name}+min_sqlite_version_3_7_7-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%package -n %{name}+openssl-sys-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+openssl-sys-devel %{_description} + +This package contains library source intended for building other packages +which use "openssl-sys" feature of "%{crate}" crate. + +%files -n %{name}+openssl-sys-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + %package -n %{name}+pkg-config-devel Summary: %{summary} BuildArch: noarch @@ -228,13 +242,13 @@ which use "with-asan" feature of "%{crate}" crate. %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 -# No bundled sqlite -rm -vr bindgen-bindings sqlite3 upgrade.sh +rm -vr bindgen-bindings sqlite3 sqlcipher upgrade.sh %cargo_prep %generate_buildrequires %cargo_generate_buildrequires echo 'pkgconfig(sqlite3) >= 3.7.16' +echo 'pkgconfig(sqlcipher)' %build %cargo_build diff --git a/sources b/sources index d05a8a0..48b8edb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libsqlite3-sys-0.20.1.crate) = 8ba1e7c7a6a5dc11ee4a2c817879478c7e3d349b237b418edf72489a232d39904537abfa2274553b06ae2dc909f4f9e2b3d8ae91a4c75768a3215ebeb5c057d1 +SHA512 (libsqlite3-sys-0.23.1.crate) = 06ae4fcfb7537fdf2e85bd4c5f1f61da51cf0b946c7364baae2c15e9e84bb89257cb21eae575d1542327f6685e879130a853c445504ceb86c9b00b4d9e85b2a1