Compare commits
4 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 571ec6779d | |||
| b4817e12a0 | |||
| cd462ad7a5 | |||
| 35ea1db539 |
@@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 13 16:55:22 UTC 2025 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||
|
||||
- Add reproducible.patch for deterministic translations (boo#1244083)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat May 10 07:09:58 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- build with fuse 3 (boo#1242079)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 20 06:39:30 UTC 2024 - Joshua Smith <smolsheep@opensuse.org>
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ Group: Productivity/Security
|
||||
URL: https://github.com/str4d/rage
|
||||
Source0: rage-%{version}.tar.gz
|
||||
Source1: vendor.tar.zst
|
||||
Patch0: reproducible.patch
|
||||
%if %{suse_version} > 1500
|
||||
BuildRequires: cargo-packaging
|
||||
%endif
|
||||
@@ -40,7 +41,7 @@ BuildRequires: cargo >= 1.59
|
||||
BuildRequires: libzstd-devel
|
||||
BuildRequires: vendored_licenses_packager
|
||||
# for feature mount
|
||||
BuildRequires: fuse-devel
|
||||
BuildRequires: fuse3-devel
|
||||
Recommends: pinentry
|
||||
BuildRequires: zstd
|
||||
Conflicts: rage
|
||||
@@ -88,7 +89,7 @@ BuildArch: noarch
|
||||
Zsh command-line completion support for %{name}.
|
||||
|
||||
%prep
|
||||
%autosetup -a 1 -n rage-%{version}
|
||||
%autosetup -a 1 -p1 -n rage-%{version}
|
||||
%vendored_licenses_packager_prep
|
||||
|
||||
%build
|
||||
|
||||
128
reproducible.patch
Normal file
128
reproducible.patch
Normal file
@@ -0,0 +1,128 @@
|
||||
This is https://github.com/kellpossible/cargo-i18n/pull/151
|
||||
|
||||
For reproducible builds
|
||||
* https://github.com/str4d/rage/issues/568
|
||||
* https://bugzilla.suse.com/show_bug.cgi?id=1244083
|
||||
|
||||
index a7cb31b6..27adc933 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -1290,8 +1290,6 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "i18n-embed-fl"
|
||||
version = "0.9.2"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "f6e9571c3cba9eba538eaa5ee40031b26debe76f0c7e17bafc97ea57a76cd82e"
|
||||
dependencies = [
|
||||
"dashmap",
|
||||
"find-crate",
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index 8468db45..7a14ba14 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -65,3 +65,6 @@ clap = { version = "4.3", features = ["derive"] }
|
||||
console = { version = "0.15", default-features = false }
|
||||
env_logger = "0.10"
|
||||
log = "0.4"
|
||||
+
|
||||
+[patch.crates-io]
|
||||
+i18n-embed-fl = { path="vendor/i18n-embed-fl-0.9.2" }
|
||||
diff --git a/vendor/i18n-embed-fl-0.9.2/src/lib.rs b/vendor/i18n-embed-fl-0.9.2/src/lib.rs
|
||||
index 6598997f..ef1ca69c 100644
|
||||
--- a/vendor/i18n-embed-fl-0.9.2/src/lib.rs
|
||||
+++ b/vendor/i18n-embed-fl-0.9.2/src/lib.rs
|
||||
@@ -58,7 +58,7 @@ enum FlArgs {
|
||||
/// arg3 = calc_value());
|
||||
/// ```
|
||||
KeyValuePairs {
|
||||
- specified_args: HashMap<syn::LitStr, Box<syn::Expr>>,
|
||||
+ specified_args: Vec<(syn::LitStr, Box<syn::Expr>)>,
|
||||
},
|
||||
/// `fl!(LOADER, "message", "optional-attribute")` no arguments after the message id and optional attribute id.
|
||||
None,
|
||||
@@ -75,7 +75,7 @@ impl Parse for FlArgs {
|
||||
return Ok(FlArgs::HashMap(hash_map));
|
||||
}
|
||||
|
||||
- let mut args_map: HashMap<syn::LitStr, Box<syn::Expr>> = HashMap::new();
|
||||
+ let mut args: Vec<(syn::LitStr, Box<syn::Expr>)> = Vec::new();
|
||||
|
||||
while let Ok(expr) = input.parse::<syn::ExprAssign>() {
|
||||
let argument_name_ident_opt = match &*expr.left {
|
||||
@@ -100,7 +100,10 @@ impl Parse for FlArgs {
|
||||
|
||||
let argument_value = expr.right;
|
||||
|
||||
- if let Some(_duplicate) = args_map.insert(argument_name_lit_str, argument_value) {
|
||||
+ if args
|
||||
+ .iter()
|
||||
+ .any(|(key, _value)| argument_name_lit_str == *key)
|
||||
+ {
|
||||
// There's no Clone implementation by default.
|
||||
let argument_name_lit_str =
|
||||
syn::LitStr::new(&argument_name_string, argument_name_ident.span());
|
||||
@@ -112,20 +115,22 @@ impl Parse for FlArgs {
|
||||
),
|
||||
));
|
||||
}
|
||||
+ args.push((argument_name_lit_str, argument_value));
|
||||
|
||||
// parse the next comma if there is one
|
||||
let _result = input.parse::<syn::Token![,]>();
|
||||
}
|
||||
|
||||
- if args_map.is_empty() {
|
||||
+ if args.is_empty() {
|
||||
let span = match input.fork().parse::<syn::Expr>() {
|
||||
Ok(expr) => expr.span(),
|
||||
Err(_) => input.span(),
|
||||
};
|
||||
Err(syn::Error::new(span, "fl!() unable to parse args input"))
|
||||
} else {
|
||||
+ args.sort_by_key(|(s, _)| s.value());
|
||||
Ok(FlArgs::KeyValuePairs {
|
||||
- specified_args: args_map,
|
||||
+ specified_args: args,
|
||||
})
|
||||
}
|
||||
} else {
|
||||
@@ -670,7 +675,7 @@ fn fuzzy_attribute_suggestions(
|
||||
|
||||
fn check_message_args(
|
||||
message: FluentMessage<'_>,
|
||||
- specified_args: &HashMap<syn::LitStr, Box<syn::Expr>>,
|
||||
+ specified_args: &Vec<(syn::LitStr, Box<syn::Expr>)>,
|
||||
) {
|
||||
if let Some(pattern) = message.value() {
|
||||
let mut args = Vec::new();
|
||||
@@ -679,8 +684,8 @@ fn check_message_args(
|
||||
let args_set: HashSet<&str> = args.into_iter().collect();
|
||||
|
||||
let key_args: Vec<String> = specified_args
|
||||
- .keys()
|
||||
- .map(|key| {
|
||||
+ .iter()
|
||||
+ .map(|(key, _value)| {
|
||||
let arg = key.value();
|
||||
|
||||
if !args_set.contains(arg.as_str()) {
|
||||
@@ -737,7 +742,7 @@ fn check_message_args(
|
||||
|
||||
fn check_attribute_args(
|
||||
attr: FluentAttribute<'_>,
|
||||
- specified_args: &HashMap<syn::LitStr, Box<syn::Expr>>,
|
||||
+ specified_args: &Vec<(syn::LitStr, Box<syn::Expr>)>,
|
||||
) {
|
||||
let pattern = attr.value();
|
||||
let mut args = Vec::new();
|
||||
@@ -746,8 +751,8 @@ fn check_attribute_args(
|
||||
let args_set: HashSet<&str> = args.into_iter().collect();
|
||||
|
||||
let key_args: Vec<String> = specified_args
|
||||
- .keys()
|
||||
- .map(|key| {
|
||||
+ .iter()
|
||||
+ .map(|(key, _value)| {
|
||||
let arg = key.value();
|
||||
|
||||
if !args_set.contains(arg.as_str()) {
|
||||
Reference in New Issue
Block a user