public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rust-tera] f43: Update to verson 2.3.0; Fixes RHBZ#2493413
@ 2026-09-01 11:43 Benjamin A. Beasley
  0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-09-01 11:43 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/rust-tera
Branch : f43
Commit : 41603f9cd8ffb945d1eec8460d2e941b8cce90ae
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2026-09-01T11:43:45+01:00
Stats  : +207/-81 in 7 file(s)
URL    : https://src.fedoraproject.org/rpms/rust-tera/c/41603f9cd8ffb945d1eec8460d2e941b8cce90ae?branch=f43

Log:
Update to verson 2.3.0; Fixes RHBZ#2493413

---
diff --git a/0001-Only-run-parsing-instructions-tests-test_size-on-64-.patch b/0001-Only-run-parsing-instructions-tests-test_size-on-64-.patch
new file mode 100644
index 0000000..9735e37
--- /dev/null
+++ b/0001-Only-run-parsing-instructions-tests-test_size-on-64-.patch
@@ -0,0 +1,26 @@
+From c92d561b06b9c612c46dc79ca412c83753279c14 Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code@musicinmybrain.net>
+Date: Tue, 1 Sep 2026 11:31:51 +0100
+Subject: [PATCH] Only run parsing::instructions::tests::test_size on 64-bit
+ targets
+
+---
+ src/parsing/instructions.rs | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/parsing/instructions.rs b/src/parsing/instructions.rs
+index 2d0cb58..fab245f 100644
+--- a/src/parsing/instructions.rs
++++ b/src/parsing/instructions.rs
+@@ -348,6 +348,8 @@ impl fmt::Debug for Chunk {
+ mod tests {
+     use super::*;
+ 
++    // Expected size is based on a typical 64-bit target
++    #[cfg(target_pointer_width = "64")]
+     #[test]
+     fn test_size() {
+         assert_eq!(std::mem::size_of::<Instruction>(), 32);
+-- 
+2.55.0
+

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..dfa35b4
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2025 Vincent Prouillet
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+

diff --git a/rust-tera.spec b/rust-tera.spec
index 103bef5..7956aa5 100644
--- a/rust-tera.spec
+++ b/rust-tera.spec
@@ -1,26 +1,37 @@
 # Generated by rust2rpm 28
-# * files that are required by tests are not included in published crates
-%bcond check 0
+%bcond check 1
 %global debug_package %{nil}
 
 %global crate tera
 
 Name:           rust-tera
-Version:        1.20.1
+Version:        2.3.0
 Release:        %autorelease
-Summary:        Template engine based on Jinja2/Django templates
+Summary:        Template engine for Rust based on Jinja2/Django
 
 License:        MIT
 URL:            https://crates.io/crates/tera
 Source:         %{crates_source}
+# * Fix missing license text in published crates
+# * https://github.com/Keats/tera/pull/1031
+Source10:       https://github.com/Keats/tera/raw/refs/tags/v%{version}/LICENSE
 # Manually created patch for downstream crate metadata changes
-# * relax chrono-tz dependency to allow building with 0.9 and 0.10
+# * Remove unused, benchmark-only dev-dependency on criterion
+# * Explicitly specify the serde/derive dev-dependency (and stop using
+#   serde_derive directly): https://github.com/Keats/tera/pull/1032
 Patch:          tera-fix-metadata.diff
+# * Stop using serde_derive directly
+# * https://github.com/Keats/tera/pull/1032
+Patch10:        tera-2.3.0-serde_derive.patch
+# * Only run parsing::instructions::tests::test_size on 64-bit targets
+# * https://github.com/Keats/tera/pull/1033
+# * Exported with git format-patch --relative to apply to the published crate
+Patch11:        0001-Only-run-parsing-instructions-tests-test_size-on-64-.patch
 
 BuildRequires:  cargo-rpm-macros >= 24
 
 %global _description %{expand:
-Template engine based on Jinja2/Django templates.}
+A template engine for Rust based on Jinja2/Django.}
 
 %description %{_description}
 
@@ -35,7 +46,6 @@ use the "%{crate}" crate.
 
 %files          devel
 %license %{crate_instdir}/LICENSE
-%doc %{crate_instdir}/CHANGELOG.md
 %doc %{crate_instdir}/README.md
 %{crate_instdir}/
 
@@ -51,76 +61,64 @@ use the "default" feature of the "%{crate}" crate.
 %files       -n %{name}+default-devel
 %ghost %{crate_instdir}/Cargo.toml
 
-%package     -n %{name}+builtins-devel
+%package     -n %{name}+fast-devel
 Summary:        %{summary}
 BuildArch:      noarch
 
-%description -n %{name}+builtins-devel %{_description}
+%description -n %{name}+fast-devel %{_description}
 
 This package contains library source intended for building other packages which
-use the "builtins" feature of the "%{crate}" crate.
+use the "fast" feature of the "%{crate}" crate.
 
-%files       -n %{name}+builtins-devel
+%files       -n %{name}+fast-devel
 %ghost %{crate_instdir}/Cargo.toml
 
-%package     -n %{name}+chrono-devel
+%package     -n %{name}+fast_escape-devel
 Summary:        %{summary}
 BuildArch:      noarch
 
-%description -n %{name}+chrono-devel %{_description}
+%description -n %{name}+fast_escape-devel %{_description}
 
 This package contains library source intended for building other packages which
-use the "chrono" feature of the "%{crate}" crate.
+use the "fast_escape" feature of the "%{crate}" crate.
 
-%files       -n %{name}+chrono-devel
+%files       -n %{name}+fast_escape-devel
 %ghost %{crate_instdir}/Cargo.toml
 
-%package     -n %{name}+chrono-tz-devel
+%package     -n %{name}+fast_hash-devel
 Summary:        %{summary}
 BuildArch:      noarch
 
-%description -n %{name}+chrono-tz-devel %{_description}
+%description -n %{name}+fast_hash-devel %{_description}
 
 This package contains library source intended for building other packages which
-use the "chrono-tz" feature of the "%{crate}" crate.
+use the "fast_hash" feature of the "%{crate}" crate.
 
-%files       -n %{name}+chrono-tz-devel
+%files       -n %{name}+fast_hash-devel
 %ghost %{crate_instdir}/Cargo.toml
 
-%package     -n %{name}+date-locale-devel
+%package     -n %{name}+glob_fs-devel
 Summary:        %{summary}
 BuildArch:      noarch
 
-%description -n %{name}+date-locale-devel %{_description}
+%description -n %{name}+glob_fs-devel %{_description}
 
 This package contains library source intended for building other packages which
-use the "date-locale" feature of the "%{crate}" crate.
+use the "glob_fs" feature of the "%{crate}" crate.
 
-%files       -n %{name}+date-locale-devel
+%files       -n %{name}+glob_fs-devel
 %ghost %{crate_instdir}/Cargo.toml
 
-%package     -n %{name}+humansize-devel
+%package     -n %{name}+no_fmt-devel
 Summary:        %{summary}
 BuildArch:      noarch
 
-%description -n %{name}+humansize-devel %{_description}
+%description -n %{name}+no_fmt-devel %{_description}
 
 This package contains library source intended for building other packages which
-use the "humansize" feature of the "%{crate}" crate.
+use the "no_fmt" feature of the "%{crate}" crate.
 
-%files       -n %{name}+humansize-devel
-%ghost %{crate_instdir}/Cargo.toml
-
-%package     -n %{name}+percent-encoding-devel
-Summary:        %{summary}
-BuildArch:      noarch
-
-%description -n %{name}+percent-encoding-devel %{_description}
-
-This package contains library source intended for building other packages which
-use the "percent-encoding" feature of the "%{crate}" crate.
-
-%files       -n %{name}+percent-encoding-devel
+%files       -n %{name}+no_fmt-devel
 %ghost %{crate_instdir}/Cargo.toml
 
 %package     -n %{name}+preserve_order-devel
@@ -135,45 +133,22 @@ use the "preserve_order" feature of the "%{crate}" crate.
 %files       -n %{name}+preserve_order-devel
 %ghost %{crate_instdir}/Cargo.toml
 
-%package     -n %{name}+rand-devel
-Summary:        %{summary}
-BuildArch:      noarch
-
-%description -n %{name}+rand-devel %{_description}
-
-This package contains library source intended for building other packages which
-use the "rand" feature of the "%{crate}" crate.
-
-%files       -n %{name}+rand-devel
-%ghost %{crate_instdir}/Cargo.toml
-
-%package     -n %{name}+slug-devel
-Summary:        %{summary}
-BuildArch:      noarch
-
-%description -n %{name}+slug-devel %{_description}
-
-This package contains library source intended for building other packages which
-use the "slug" feature of the "%{crate}" crate.
-
-%files       -n %{name}+slug-devel
-%ghost %{crate_instdir}/Cargo.toml
-
-%package     -n %{name}+urlencode-devel
+%package     -n %{name}+unicode-devel
 Summary:        %{summary}
 BuildArch:      noarch
 
-%description -n %{name}+urlencode-devel %{_description}
+%description -n %{name}+unicode-devel %{_description}
 
 This package contains library source intended for building other packages which
-use the "urlencode" feature of the "%{crate}" crate.
+use the "unicode" feature of the "%{crate}" crate.
 
-%files       -n %{name}+urlencode-devel
+%files       -n %{name}+unicode-devel
 %ghost %{crate_instdir}/Cargo.toml
 
 %prep
 %autosetup -n %{crate}-%{version} -p1
 %cargo_prep
+cp --preserve '%{SOURCE10}' .
 
 %generate_buildrequires
 %cargo_generate_buildrequires

diff --git a/rust2rpm.toml b/rust2rpm.toml
index dffc967..6a1144c 100644
--- a/rust2rpm.toml
+++ b/rust2rpm.toml
@@ -1,11 +1,40 @@
 [package]
 cargo-toml-patch-comments = [
-    "relax chrono-tz dependency to allow building with 0.9 and 0.10",
+    "Remove unused, benchmark-only dev-dependency on criterion",
+    """\
+Explicitly specify the serde/derive dev-dependency \
+(and stop using serde_derive directly): \
+https://github.com/Keats/tera/pull/1032\
+""",
 ]
+license-files.include = ["LICENSE"]
 
-[tests]
-run = false
+[[package.extra-patches]]
+number = 10
+file = "tera-2.3.0-serde_derive.patch"
 comments = [
-    "files that are required by tests are not included in published crates",
+    "Stop using serde_derive directly",
+    "https://github.com/Keats/tera/pull/1032",
 ]
 
+[[package.extra-patches]]
+number = 11
+file = "0001-Only-run-parsing-instructions-tests-test_size-on-64-.patch"
+comments = [
+    "Only run parsing::instructions::tests::test_size on 64-bit targets",
+    "https://github.com/Keats/tera/pull/1033",
+    "Exported with git format-patch --relative to apply to the published crate",
+]
+
+[[package.extra-sources]]
+number = 10
+file = "https://github.com/Keats/tera/raw/refs/tags/v%{version}/LICENSE"
+comments = [
+    "Fix missing license text in published crates",
+    "https://github.com/Keats/tera/pull/1031",
+]
+
+[scripts.prep]
+post = [
+    "cp --preserve '%{SOURCE10}' .",
+]

diff --git a/sources b/sources
index 1c0bb53..583268a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (tera-1.20.1.crate) = b3423e6bafc94f51af17188c1397ea00928d950a1429348c3128fd626b5cb9bf3dd0e389282d307888c506cefb9784838189c370a26a3ac2a985dd58ad377c8a
+SHA512 (tera-2.3.0.crate) = 68a313472bf99c6ee4d8c8d2e716f95f7df3fde436b8db06c89d679956428e6b1ef75297ed40fceba578fcf0c42908f3a8d93151761a422ca3e2511a1f9c48cd

diff --git a/tera-2.3.0-serde_derive.patch b/tera-2.3.0-serde_derive.patch
new file mode 100644
index 0000000..f68fd96
--- /dev/null
+++ b/tera-2.3.0-serde_derive.patch
@@ -0,0 +1,64 @@
+diff --git a/benches/templates.rs b/benches/templates.rs
+index cdcf0c9..0e54a20 100644
+--- a/benches/templates.rs
++++ b/benches/templates.rs
+@@ -2,7 +2,7 @@ use std::hint::black_box;
+ 
+ use criterion::{Criterion, criterion_group, criterion_main};
+ 
+-use serde_derive::Serialize;
++use serde::Serialize;
+ 
+ use tera::{Context, Tera};
+ 
+diff --git a/benches/value.rs b/benches/value.rs
+index 9abb9e0..b55c126 100644
+--- a/benches/value.rs
++++ b/benches/value.rs
+@@ -2,7 +2,7 @@ use std::hint::black_box;
+ use std::path::PathBuf;
+ 
+ use criterion::{Criterion, criterion_group, criterion_main};
+-use serde_derive::Serialize;
++use serde::Serialize;
+ 
+ use tera::value::Value;
+ 
+diff --git a/src/value/de.rs b/src/value/de.rs
+index e6b4b2b..bf8115b 100644
+--- a/src/value/de.rs
++++ b/src/value/de.rs
+@@ -244,7 +244,7 @@ impl<'de> de::Deserializer<'de> for &Value {
+ mod tests {
+     use super::*;
+     use serde::Deserialize;
+-    use serde_derive::Serialize;
++    use serde::Serialize;
+ 
+     #[derive(Debug, Serialize, Deserialize, PartialEq)]
+     enum Kind {
+diff --git a/src/value/ser.rs b/src/value/ser.rs
+index fecc897..efaee38 100644
+--- a/src/value/ser.rs
++++ b/src/value/ser.rs
+@@ -632,7 +632,7 @@ mod tests {
+ 
+     #[test]
+     fn from_serializable_nested_values_are_cloned() {
+-        #[derive(serde_derive::Serialize)]
++        #[derive(serde::Serialize)]
+         struct Section {
+             name: &'static str,
+             children: Vec<Value>,
+diff --git a/tests/undefined.rs b/tests/undefined.rs
+index d22c5e9..b9301a3 100644
+--- a/tests/undefined.rs
++++ b/tests/undefined.rs
+@@ -1,6 +1,6 @@
+ use std::collections::BTreeMap;
+ 
+-use serde_derive::Serialize;
++use serde::Serialize;
+ 
+ use tera::{Context, Tera, Value};
+ 

diff --git a/tera-fix-metadata.diff b/tera-fix-metadata.diff
index 72828e8..e09db91 100644
--- a/tera-fix-metadata.diff
+++ b/tera-fix-metadata.diff
@@ -1,11 +1,21 @@
---- tera-1.20.1/Cargo.toml	1970-01-01T00:00:01+00:00
-+++ tera-1.20.1/Cargo.toml	2025-12-27T21:14:59.272079+00:00
-@@ -72,7 +72,7 @@
- default-features = false
- 
- [dependencies.chrono-tz]
--version = "0.9"
-+version = ">=0.9,<0.11"
+--- tera-2.3.0/Cargo.toml	2006-07-24T01:21:28+00:00
++++ tera-2.3.0/Cargo.toml	2026-09-01T10:43:36.360582+00:00
+@@ -135,15 +135,13 @@
+ version = "2.5.0"
  optional = true
  
- [dependencies.globwalk]
+-[dev-dependencies.criterion]
+-version = "0.8"
+-
+ [dev-dependencies.insta]
+ version = "1"
+ features = ["glob"]
+ 
+-[dev-dependencies.serde_derive]
+-version = "1.0.156"
++[dev-dependencies.serde]
++version = "1"
++features = ["derive"]
+ 
+ [dev-dependencies.tempfile]
+ version = "3"

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-01 11:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-01 11:43 [rpms/rust-tera] f43: Update to verson 2.3.0; Fixes RHBZ#2493413 Benjamin A. Beasley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox