]> git.proxmox.com Git - debcargo-conf.git/commitdiff
yaml: Patch for arch-dependent build failures + RFS
authorWolfgang Silbermayr <wolfgang@silbermayr.at>
Sat, 8 Dec 2018 09:02:19 +0000 (10:02 +0100)
committerWolfgang Silbermayr <wolfgang@silbermayr.at>
Sat, 8 Dec 2018 09:02:19 +0000 (10:02 +0100)
TODO.rst
src/yaml/debian/changelog
src/yaml/debian/copyright
src/yaml/debian/copyright.debcargo.hint
src/yaml/debian/debcargo.toml
src/yaml/debian/patches/0001-Allow-version-0.2.x-in-tests.patch [new file with mode: 0644]
src/yaml/debian/patches/0002-Use-c_char-instead-of-i8-for-ffi.patch [new file with mode: 0644]
src/yaml/debian/patches/series [new file with mode: 0644]

index 0cedb86f44731a3a76498a1236fff390b241bc7c..6d336717b06fffbd533ffbcc24c72e2f418f8128 100644 (file)
--- a/TODO.rst
+++ b/TODO.rst
@@ -85,6 +85,7 @@ and try to verify that they won't be broken by your update. If they are, then:
 These packages (RFS) are prepared in the master branch and can be uploaded
 because all required dependencies are available in main::
 
+    yaml (rebuild, fix arch-dependent build failures)
     sniffglue (update, bugfix - need better changelog)
     encoding-rs (update)
     cmake (update)
index bcb61197da57352150d2fbee6ddb84f3e4dbba47..80d11165eee700c501af0c3409d44cec079f9126 100644 (file)
@@ -1,3 +1,9 @@
+rust-yaml (0.3.0-2) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
+
+  * Package yaml 0.3.0 from crates.io using debcargo 2.2.9
+
+ -- Wolfgang Silbermayr <wolfgang@silbermayr.at>  Sat,  8 Dec 2018 09:58:42 +0100
+
 rust-yaml (0.3.0-1) unstable; urgency=medium
 
   * Package yaml 0.3.0 from crates.io using debcargo 2.2.6
index 529c1f86f92cdc0a24d74ff8565e8bed97f129ea..75c12c9bcdc9899b1b2823a6e8bb8b090095b52f 100644 (file)
@@ -11,6 +11,7 @@ Files: debian/*
 Copyright:
  2018 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
  2018 kpcyrd <git@rxv.cc>
+ 2018 Wolfgang Silbermayr <wolfgang@silbermayr.at>
 License: MIT
 
 License: MIT
index 8497ca8efc27c452a5690389d9ad03ec82420161..d0bdddda4523cb9e59488fe251b17fcf2212baa5 100644 (file)
@@ -22,7 +22,8 @@ Comment:
 Files: debian/*
 Copyright:
  2018 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
- 2018 FIXME (overlay) Your Name <Your Email>
+ 2018 kpcyrd <git@rxv.cc>
+ 2018 Wolfgang Silbermayr <wolfgang@silbermayr.at>
 License: MIT
 
 License: MIT
index 2e9cea062c542630a16c91c1d4d3318fb0e5b47a..bed22c7b5bcbd718d63a4a94adb0db69e8e81bcf 100644 (file)
@@ -1,4 +1,8 @@
 overlay = "."
+uploaders = [
+  "kpcyrd <git@rxv.cc>",
+  "Wolfgang Silbermayr <wolfgang@silbermayr.at>",
+]
 
 [packages.lib]
 depends = ["libyaml-dev"]
diff --git a/src/yaml/debian/patches/0001-Allow-version-0.2.x-in-tests.patch b/src/yaml/debian/patches/0001-Allow-version-0.2.x-in-tests.patch
new file mode 100644 (file)
index 0000000..b911d06
--- /dev/null
@@ -0,0 +1,32 @@
+From 7b49b600cb4b26169b0f95d28482e76e054eeb04 Mon Sep 17 00:00:00 2001
+From: Wolfgang Silbermayr <wolfgang@silbermayr.at>
+Date: Sat, 8 Dec 2018 09:37:08 +0100
+Subject: [PATCH 1/2] Allow version 0.2.x in tests
+
+---
+ src/lib.rs | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib.rs b/src/lib.rs
+index a166caf..2dc6df8 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -81,13 +81,13 @@ mod test {
+     #[test]
+     fn test_version_string() {
+         let vsn = super::version_string();
+-        assert!("0.1.4".to_string() <= vsn && vsn < "0.2".to_string())
++        assert!("0.1.4".to_string() <= vsn && vsn < "0.3".to_string())
+     }
+     #[test]
+     fn test_version() {
+         let vsn = super::version();
+-        assert!((0, 1, 4) <= vsn && vsn < (0, 2, 0))
++        assert!((0, 1, 4) <= vsn && vsn < (0, 3, 0))
+     }
+     #[test]
+-- 
+2.20.0.rc2
+
diff --git a/src/yaml/debian/patches/0002-Use-c_char-instead-of-i8-for-ffi.patch b/src/yaml/debian/patches/0002-Use-c_char-instead-of-i8-for-ffi.patch
new file mode 100644 (file)
index 0000000..9d22fca
--- /dev/null
@@ -0,0 +1,36 @@
+From e5261398fcb4cd3406d727973486d0178130825a Mon Sep 17 00:00:00 2001
+From: Wolfgang Silbermayr <wolfgang@silbermayr.at>
+Date: Sat, 8 Dec 2018 09:39:56 +0100
+Subject: [PATCH 2/2] Use c_char instead of i8 for ffi
+
+This allows the project to build on architectures which define c_char as u8.
+Fixes build problems in architectures provided by debian.
+---
+ src/codecs.rs | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/codecs.rs b/src/codecs.rs
+index b28f835..749e7a2 100644
+--- a/src/codecs.rs
++++ b/src/codecs.rs
+@@ -6,14 +6,15 @@ use std::slice;
+ use std::str;
+ use std::ptr;
+ use std::ffi::CStr;
++use std::os::raw::c_char;
+ pub fn decode_c_str(c_str: *const ffi::yaml_char_t) -> Option<String> {
+     if c_str == ptr::null() {
+         None
+     } else {
+         unsafe {
+-            let i8_str = c_str as *const i8;
+-            str::from_utf8(CStr::from_ptr(i8_str).to_bytes()).map(|s| s.to_string()).ok()
++            let c_char_str = c_str as *const c_char;
++            str::from_utf8(CStr::from_ptr(c_char_str).to_bytes()).map(|s| s.to_string()).ok()
+         }
+     }
+ }
+-- 
+2.20.0.rc2
+
diff --git a/src/yaml/debian/patches/series b/src/yaml/debian/patches/series
new file mode 100644 (file)
index 0000000..c06ebd6
--- /dev/null
@@ -0,0 +1,2 @@
+0001-Allow-version-0.2.x-in-tests.patch
+0002-Use-c_char-instead-of-i8-for-ffi.patch