Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release devicemapper-sys 0.2.0 #669

Closed
1 task done
mulkieran opened this issue Oct 3, 2023 · 4 comments
Closed
1 task done

Release devicemapper-sys 0.2.0 #669

mulkieran opened this issue Oct 3, 2023 · 4 comments
Assignees

Comments

@mulkieran
Copy link
Member

mulkieran commented Oct 3, 2023

Special Fedora experiment and orphan the -sys package if succesful.

@mulkieran mulkieran self-assigned this Oct 3, 2023
@mulkieran
Copy link
Member Author

Proposed patch:

diff --git a/devicemapper-adjust-metadata.diff b/devicemapper-adjust-metadata.diff
new file mode 100644
index 0000000..73817f3
--- /dev/null
+++ b/devicemapper-adjust-metadata.diff
@@ -0,0 +1,18 @@
+--- a/Cargo.toml       2023-10-03 14:15:51.630116693 -0400
++++ b/Cargo.toml       2023-10-03 14:23:16.838498944 -0400
+@@ -44,6 +44,7 @@
+ 
+ [dependencies.devicemapper-sys]
+ version = "0.1.5"
++path = "./devicemapper-rs-sys"
+ 
+ [dependencies.env_logger]
+ version = "0.10.0"
+@@ -88,6 +89,7 @@
+ 
+ [build-dependencies.devicemapper-sys]
+ version = "0.1.5"
++path = "./devicemapper-rs-sys"
+ 
+ [build-dependencies.semver]
+ version = "1.0.0"
diff --git a/rust-devicemapper.spec b/rust-devicemapper.spec
index a3d97ff..c025636 100644
--- a/rust-devicemapper.spec
+++ b/rust-devicemapper.spec
@@ -10,12 +10,16 @@ Release:        2%{?dist}
 Summary:        Library for using Linux device mapper
 
 License:        MPL-2.0
-URL:            https://crates.io/crates/devicemapper
-Source:         %{crates_source}
+URL:            https://github.com/stratis-storage/devicemapper-rs
+Source0:        %{crates_source}
+Source1:        %{url}/archive/refs/tags/v%{version}.tar.gz
+Patch:          devicemapper-adjust-metadata.diff
 
 BuildRequires:  rust-packaging >= 21
 BuildRequires:  device-mapper-devel
 
+Provides: bundled(crate(devicemapper-sys)) = 0.1.5
+
 %global _description %{expand:
 A library for using Linux device mapper.}
 
@@ -49,6 +53,10 @@ use the "default" feature of the "%{crate}" crate.
 %ghost %{crate_instdir}/Cargo.toml
 
 %prep
+tar --extract --file %{SOURCE0}
+tar --directory=devicemapper-%{version} --extract --file %{SOURCE1} devicemapper-rs-%{version}/devicemapper-rs-sys --strip-components=1
+tar --create --gzip --file %{SOURCE0}.newfile ./devicemapper-%{version} --remove-files
+mv %{SOURCE0}.newfile %{SOURCE0}
 %autosetup -n %{crate}-%{version_no_tilde} -p1
 %cargo_prep
 
@@ -67,6 +75,9 @@ use the "default" feature of the "%{crate}" crate.
 %endif
 
 %changelog
+* Tue Oct 3 2023 mulhern <[email protected]> - 0.33.5-3
+- Bundle -sys library
+
 * Fri Jul 21 2023 Fedora Release Engineering <[email protected]> - 0.33.5-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

@mulkieran
Copy link
Member Author

@mulkieran
Copy link
Member Author

It looks like the proposed metadata patch, which sets the Cargo.toml -sys dependency back to a path dependency is undesirable. However, it might be possible to use a patch table entry to do the same trick.

@mulkieran
Copy link
Member Author

Closed for #673

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant