From be2649ba8114627db0d1fa9b16dcac9c363565d2 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 10 Feb 2019 09:57:34 +0100 Subject: [PATCH] Update to 0.4.1 Signed-off-by: Igor Gnatenko --- .gitignore | 1 + ...-to-0.8.0-reimplement-plist-prologue.patch | 76 ------------------- plist-fix-metadata.diff | 11 --- rust-plist.spec | 19 +++-- sources | 2 +- 5 files changed, 11 insertions(+), 98 deletions(-) delete mode 100644 0001-Update-xml-rs-to-0.8.0-reimplement-plist-prologue.patch delete mode 100644 plist-fix-metadata.diff diff --git a/.gitignore b/.gitignore index 1d8625a..ffa545b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /plist-0.3.0.crate +/plist-0.4.1.crate diff --git a/0001-Update-xml-rs-to-0.8.0-reimplement-plist-prologue.patch b/0001-Update-xml-rs-to-0.8.0-reimplement-plist-prologue.patch deleted file mode 100644 index a3a0559..0000000 --- a/0001-Update-xml-rs-to-0.8.0-reimplement-plist-prologue.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 45ab6d492c1a031485962e17d2af932d8af069d8 Mon Sep 17 00:00:00 2001 -From: Kevin Ballard -Date: Wed, 16 May 2018 14:28:31 -0700 -Subject: [PATCH] Update xml-rs to 0.8.0, reimplement plist prologue - -xml-rs 0.8.0 has an `inner_mut()` method we can use instead of turning -off character escaping. ---- - src/xml/writer.rs | 17 ++++++----------- - 1 file changed, 6 insertions(+), 11 deletions(-) - -diff --git a/src/xml/writer.rs b/src/xml/writer.rs -index e168128..4facfd2 100644 ---- a/src/xml/writer.rs -+++ b/src/xml/writer.rs -@@ -1,7 +1,6 @@ - use base64; - use std::borrow::Cow; - use std::io::Write; --use xml_rs::escape::escape_str_pcdata; - use xml_rs::name::Name; - use xml_rs::namespace::Namespace; - use xml_rs::writer::events::XmlEvent as WriteXmlEvent; -@@ -38,7 +37,7 @@ pub struct EventWriter { - - impl EventWriter { - pub fn new(writer: W) -> EventWriter { -- let mut config = EmitterConfig::new() -+ let config = EmitterConfig::new() - .line_separator("\n") - .indent_string("\t") - .perform_indent(true) -@@ -47,7 +46,6 @@ impl EventWriter { - .cdata_to_characters(true) - .keep_element_names_stack(false) - .autopad_comments(true); -- config.perform_escaping = false; - - EventWriter { - xml_writer: XmlEventWriter::new_with_config(writer, config), -@@ -80,19 +78,16 @@ impl EventWriter { - } - - fn write_value(&mut self, value: &str) -> Result<()> { -- self.xml_writer -- .write(WriteXmlEvent::Characters(&escape_str_pcdata(value)))?; -+ self.xml_writer.write(WriteXmlEvent::Characters(value))?; - Ok(()) - } - - fn maybe_end_plist(&mut self) -> Result<()> { - // If there are no more open tags then write the element - if self.stack.len() == 1 { -- // We didn't tell the xml_writer about the tag so it thinks we're already at -- // the root. As such, it's not going to prettify our output, so we need to include -- // the newline ourselves. -- self.xml_writer.write(WriteXmlEvent::Characters("\n"))?; -- self.end_element("plist")?; -+ // We didn't tell the xml_writer about the tag so we'll skip telling it -+ // about the tag as well. -+ self.xml_writer.inner_mut().write(b"\n")?; - if let Some(Element::Root) = self.stack.pop() { - } else { - return Err(Error::InvalidData); -@@ -134,7 +129,7 @@ impl PlistEventWriter for EventWriter { - - - "#; -- self.xml_writer.write(WriteXmlEvent::Characters(prologue))?; -+ self.xml_writer.inner_mut().write(prologue.as_bytes())?; - - self.stack.push(Element::Root); - } --- -2.19.0.rc1 - diff --git a/plist-fix-metadata.diff b/plist-fix-metadata.diff deleted file mode 100644 index 52fd5ed..0000000 --- a/plist-fix-metadata.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- plist-0.3.0/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ plist-0.3.0/Cargo.toml 2018-11-03T15:27:40.071803+01:00 -@@ -34,7 +34,7 @@ - optional = true - - [dependencies.xml-rs] --version = "0.7.0" -+version = "0.8.0" - [dev-dependencies.serde_derive] - version = "1.0.2" - diff --git a/rust-plist.spec b/rust-plist.spec index 412a4c7..2788288 100644 --- a/rust-plist.spec +++ b/rust-plist.spec @@ -6,25 +6,21 @@ %global crate plist Name: rust-%{crate} -Version: 0.3.0 -Release: 3%{?dist} +Version: 0.4.1 +Release: 1%{?dist} Summary: Rusty plist parser License: MIT URL: https://crates.io/crates/plist -Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate -# Initial patched metadata -# * Bump xml-rs to 0.8.0, https://github.com/ebarnard/rust-plist/commit/45ab6d492c1a031485962e17d2af932d8af069d8 -Patch0: plist-fix-metadata.diff -# Make it work with new xml-rs -Patch0001: 0001-Update-xml-rs-to-0.8.0-reimplement-plist-prologue.patch +Source: %{crates_source} ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -BuildRequires: (crate(base64/default) >= 0.9.0 with crate(base64/default) < 0.10.0) +BuildRequires: (crate(base64/default) >= 0.10.1 with crate(base64/default) < 0.11.0) BuildRequires: (crate(byteorder/default) >= 1.1.0 with crate(byteorder/default) < 2.0.0) BuildRequires: (crate(humantime/default) >= 1.1.1 with crate(humantime/default) < 2.0.0) +BuildRequires: (crate(line-wrap/default) >= 0.1.1 with crate(line-wrap/default) < 0.2.0) BuildRequires: (crate(serde/default) >= 1.0.2 with crate(serde/default) < 2.0.0) BuildRequires: (crate(xml-rs/default) >= 0.8.0 with crate(xml-rs/default) < 0.9.0) %if %{with check} @@ -75,7 +71,7 @@ which use "serde" feature of "%{crate}" crate. %ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep -%autosetup -n %{crate}-%{version} -p1 +%autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep %build @@ -90,6 +86,9 @@ which use "serde" feature of "%{crate}" crate. %endif %changelog +* Sun Feb 10 2019 Igor Gnatenko - 0.4.1-1 +- Update to 0.4.1 + * Sat Feb 02 2019 Fedora Release Engineering - 0.3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 88ee6b3..09a1474 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (plist-0.3.0.crate) = 8171689f24ad9c8579722d3a6269a80c955f11bb5fbae25050e07f518da339d91091b91cb0c6c41a6980402513f466d4e1e0e56abf6b9d09e68e95dbfc2175e6 +SHA512 (plist-0.4.1.crate) = 062196f66c3ce93cd83a0043d13d6a6173daa9fe57fd5a1c926fafc1c3f0d17b7ac63c2aa81c14a4598f6eb572acd6e3debab5372a3ec51368357806b9ac8b15