From 2d92a4b41000160e76fc988db8cf1d93d8db079f Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Sat, 22 May 2021 23:17:54 +0200 Subject: [PATCH 01/34] Perl 5.34 rebuild --- po4a.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/po4a.spec b/po4a.spec index 46b4174..c3aa9f7 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.63 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool maintaining translations anywhere License: GPL+ URL: https://po4a.org/ @@ -133,6 +133,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Sat May 22 2021 Jitka Plesnikova - 0.63-2 +- Perl 5.34 rebuild + * Tue Feb 23 2021 Sérgio Basto - 0.63-1 - Update po4a to 0.63 (#1905315) From 945f2a880f095374bd0239355fb4028fe607d504 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 03:44:01 +0000 Subject: [PATCH 02/34] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- po4a.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/po4a.spec b/po4a.spec index c3aa9f7..103aae7 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.63 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool maintaining translations anywhere License: GPL+ URL: https://po4a.org/ @@ -133,6 +133,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 0.63-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Sat May 22 2021 Jitka Plesnikova - 0.63-2 - Perl 5.34 rebuild From 91eb78df0e97f2e732bec52ebbe495d97b4aa2be Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 20 Sep 2021 14:58:56 +0100 Subject: [PATCH 03/34] Add gating tests for RHEL 9 --- gating.yaml | 6 ++++++ po4a.spec | 5 ++++- tests/basic-test.sh | 39 +++++++++++++++++++++++++++++++++++++++ tests/tests.yml | 13 +++++++++++++ 4 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 gating.yaml create mode 100755 tests/basic-test.sh create mode 100644 tests/tests.yml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..2c7ed80 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-* +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/po4a.spec b/po4a.spec index 103aae7..996f5a7 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.63 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool maintaining translations anywhere License: GPL+ URL: https://po4a.org/ @@ -133,6 +133,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Mon Sep 20 2021 Richard W.M. Jones - 0.63-4 +- Add gating tests for RHEL 9 + * Fri Jul 23 2021 Fedora Release Engineering - 0.63-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/tests/basic-test.sh b/tests/basic-test.sh new file mode 100755 index 0000000..27d74db --- /dev/null +++ b/tests/basic-test.sh @@ -0,0 +1,39 @@ +#!/bin/bash - + +set -e +set -x + +po4a --help + +# Write a test POD (Perl doc) file to the local directory. +cat >test.pod < +EOF + +# Try to compile it into a POT file using po4a-gettextize: +po4a-gettextize -f pod -M utf-8 -L utf-8 \ + --package-name hello \ + --package-version 1.0 \ + --msgid-bugs-address noone@example.com \ + --copyright-holder "Red Hat Inc." \ + -p output.pot -m test.pod + +cat output.pot + +# Check for some expected strings in the output. +grep 'msgid "DESCRIPTION"' output.pot + +grep 'msgid "This is the hello world documentation"' output.pot + +# Clean up. +rm output.pot test.pod diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..0462057 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + required_packages: + - bash + - coreutils + - grep + tests: + - simple: + dir: . + run: ./basic-test.sh From 4c65ad32a3342f610e18075d2828ad9aba13c7b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Mon, 1 Nov 2021 17:00:49 +0000 Subject: [PATCH 04/34] Update po4a to 0.64 (#2003502) --- .gitignore | 1 + po4a.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6c742bd..f98a4cb 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /po4a-0.60.tar.gz /po4a-0.61.tar.gz /po4a-0.63.tar.gz +/po4a-0.64.tar.gz diff --git a/po4a.spec b/po4a.spec index 996f5a7..f4136d8 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a -Version: 0.63 -Release: 4%{?dist} +Version: 0.64 +Release: 1%{?dist} Summary: A tool maintaining translations anywhere License: GPL+ URL: https://po4a.org/ @@ -133,6 +133,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Mon Nov 01 2021 Sérgio Basto - 0.64-1 +- Update po4a to 0.64 (#2003502) + * Mon Sep 20 2021 Richard W.M. Jones - 0.63-4 - Add gating tests for RHEL 9 diff --git a/sources b/sources index 65a767e..488b747 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (po4a-0.63.tar.gz) = 6dc86ed655c8ed0398ef68f5abb50e68da307b56044e051819221f94dfb79187c2c9ac1f42db858b867514f66227617701d75671496d2138a27d49de35a4e06d +SHA512 (po4a-0.64.tar.gz) = a8ac95964cdca6962b8e6378f6ef457495065df5349b2bc796083da682ad90f5ac284bffd2997104e1b6bc889d020204d5872575879478b8b25dfbe33910308b From 84dc0d4eaae55781b6b68a478c80187e214781bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 12 Dec 2021 22:37:54 +0000 Subject: [PATCH 05/34] Update po4a to 0.65 (#2023095) --- .gitignore | 1 + po4a.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f98a4cb..4de3c42 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /po4a-0.61.tar.gz /po4a-0.63.tar.gz /po4a-0.64.tar.gz +/po4a-0.65.tar.gz diff --git a/po4a.spec b/po4a.spec index f4136d8..0931f63 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,5 +1,5 @@ Name: po4a -Version: 0.64 +Version: 0.65 Release: 1%{?dist} Summary: A tool maintaining translations anywhere License: GPL+ @@ -133,6 +133,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Sun Dec 12 2021 Sérgio Basto - 0.65-1 +- Update po4a to 0.65 (#2023095) + * Mon Nov 01 2021 Sérgio Basto - 0.64-1 - Update po4a to 0.64 (#2003502) diff --git a/sources b/sources index 488b747..c1764df 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (po4a-0.64.tar.gz) = a8ac95964cdca6962b8e6378f6ef457495065df5349b2bc796083da682ad90f5ac284bffd2997104e1b6bc889d020204d5872575879478b8b25dfbe33910308b +SHA512 (po4a-0.65.tar.gz) = dd47493f29f26199c4f66b6fa3f5f7adb9e1ef5a5b92d7883a1e15f6e0c61a15c8828467dbbc99b5b2bff2865b4ac23f425255ceb9da8a8d158be6cb438d7308 From dccef280f1e0567803d04f82555f079ba6ad3367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 15 Jan 2022 23:04:53 +0000 Subject: [PATCH 06/34] Update po4a to 0.66 (#2036534) --- .gitignore | 1 + po4a.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4de3c42..5c0e2da 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /po4a-0.63.tar.gz /po4a-0.64.tar.gz /po4a-0.65.tar.gz +/po4a-0.66.tar.gz diff --git a/po4a.spec b/po4a.spec index 0931f63..5221455 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,5 +1,5 @@ Name: po4a -Version: 0.65 +Version: 0.66 Release: 1%{?dist} Summary: A tool maintaining translations anywhere License: GPL+ @@ -133,6 +133,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Sat Jan 15 2022 Sérgio Basto - 0.66-1 +- Update po4a to 0.66 (#2036534) + * Sun Dec 12 2021 Sérgio Basto - 0.65-1 - Update po4a to 0.65 (#2023095) diff --git a/sources b/sources index c1764df..ab617e8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (po4a-0.65.tar.gz) = dd47493f29f26199c4f66b6fa3f5f7adb9e1ef5a5b92d7883a1e15f6e0c61a15c8828467dbbc99b5b2bff2865b4ac23f425255ceb9da8a8d158be6cb438d7308 +SHA512 (po4a-0.66.tar.gz) = d8caad948613168e341c44abb1c7a3ff09f8bbcf7a9fb575485f7b39fbcbe6866179c3f77dd8f53a31f3a78774fff0160549720e051f4a272f4504849a8dd38f From 05ed74edcc4c114b05dc067b8604213ba0c83947 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 09:11:22 +0000 Subject: [PATCH 07/34] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- po4a.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/po4a.spec b/po4a.spec index 5221455..f4018e4 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.66 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool maintaining translations anywhere License: GPL+ URL: https://po4a.org/ @@ -133,6 +133,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 0.66-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Sat Jan 15 2022 Sérgio Basto - 0.66-1 - Update po4a to 0.66 (#2036534) From 65b562be100bee5cd8739a2f5a33a78f2fe005ae Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Wed, 1 Jun 2022 11:58:49 +0200 Subject: [PATCH 08/34] Perl 5.36 rebuild --- po4a.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/po4a.spec b/po4a.spec index f4018e4..6a5d1fb 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.66 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool maintaining translations anywhere License: GPL+ URL: https://po4a.org/ @@ -133,6 +133,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Wed Jun 01 2022 Jitka Plesnikova - 0.66-3 +- Perl 5.36 rebuild + * Fri Jan 21 2022 Fedora Release Engineering - 0.66-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 2f3fd96b9fc8aef4e34e672a71d6816e2924cc44 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 22 Jul 2022 15:08:02 +0000 Subject: [PATCH 09/34] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- po4a.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/po4a.spec b/po4a.spec index 6a5d1fb..2f72558 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.66 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool maintaining translations anywhere License: GPL+ URL: https://po4a.org/ @@ -133,6 +133,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Fri Jul 22 2022 Fedora Release Engineering - 0.66-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed Jun 01 2022 Jitka Plesnikova - 0.66-3 - Perl 5.36 rebuild From 9cd8ca46ada525c34ecda1086615aca8ac6f23ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Wed, 3 Aug 2022 20:05:11 +0100 Subject: [PATCH 10/34] Update po4a to 0.67 (#2107698) --- .gitignore | 1 + po4a.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5c0e2da..8e7ca15 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /po4a-0.64.tar.gz /po4a-0.65.tar.gz /po4a-0.66.tar.gz +/po4a-0.67.tar.gz diff --git a/po4a.spec b/po4a.spec index 2f72558..ccb2e7b 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a -Version: 0.66 -Release: 4%{?dist} +Version: 0.67 +Release: 1%{?dist} Summary: A tool maintaining translations anywhere License: GPL+ URL: https://po4a.org/ @@ -133,6 +133,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Wed Aug 03 2022 Sérgio Basto - 0.67-1 +- Update po4a to 0.67 (#2107698) + * Fri Jul 22 2022 Fedora Release Engineering - 0.66-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index ab617e8..70ca2cb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (po4a-0.66.tar.gz) = d8caad948613168e341c44abb1c7a3ff09f8bbcf7a9fb575485f7b39fbcbe6866179c3f77dd8f53a31f3a78774fff0160549720e051f4a272f4504849a8dd38f +SHA512 (po4a-0.67.tar.gz) = 95ca193eef5bb87b95a17e1d50b403271a9784a5f14fa84c794782c5b37bd1d00e1270117275567b860cde728de44e2e3bc5492997cda0f88416196375538daa From c914b8e317b991a43bedbf90c3a97ffe675802fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 29 Sep 2022 00:06:26 +0100 Subject: [PATCH 11/34] Update po4a to 0.68 (#2124178) --- .gitignore | 1 + po4a.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8e7ca15..aa0709c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /po4a-0.65.tar.gz /po4a-0.66.tar.gz /po4a-0.67.tar.gz +/po4a-0.68.tar.gz diff --git a/po4a.spec b/po4a.spec index ccb2e7b..bf63350 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,5 +1,5 @@ Name: po4a -Version: 0.67 +Version: 0.68 Release: 1%{?dist} Summary: A tool maintaining translations anywhere License: GPL+ @@ -133,6 +133,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Wed Sep 28 2022 Sérgio Basto - 0.68-1 +- Update po4a to 0.68 (#2124178) + * Wed Aug 03 2022 Sérgio Basto - 0.67-1 - Update po4a to 0.67 (#2107698) diff --git a/sources b/sources index 70ca2cb..28ef1d6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (po4a-0.67.tar.gz) = 95ca193eef5bb87b95a17e1d50b403271a9784a5f14fa84c794782c5b37bd1d00e1270117275567b860cde728de44e2e3bc5492997cda0f88416196375538daa +SHA512 (po4a-0.68.tar.gz) = 317cdf0dcdcf48152ac876bd4c2f36ade50aee223e2440403b323178f91756f3ca7e35349fcd6c133207c72bcf7189883e99b705e7ca08718c8e29fbfd6d3c56 From 54b7752a6cb89ac785738c57a7e6bba9be82fd44 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Fri, 13 Jan 2023 21:09:08 +0100 Subject: [PATCH 12/34] Remove perl(MODULE_COMPAT), it will be replaced by generators --- po4a.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/po4a.spec b/po4a.spec index bf63350..80d03ad 100644 --- a/po4a.spec +++ b/po4a.spec @@ -71,7 +71,6 @@ BuildRequires: perl(YAML::Tiny) Requires: %{_bindir}/nsgmls Requires: %{_bindir}/xsltproc Requires: gettext -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) # hope texlive-kpseas-bin missing deps was fixed # epel7 doesn't have /usr/share/texlive/texmf-dist/web2c/texmf.cnf Requires: texlive-kpathsea From 3d7bacc779ab81b3a3a1893b09dd330040708195 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 20 Jan 2023 10:00:01 +0000 Subject: [PATCH 13/34] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- po4a.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/po4a.spec b/po4a.spec index 80d03ad..c1cd00c 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.68 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool maintaining translations anywhere License: GPL+ URL: https://po4a.org/ @@ -132,6 +132,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Fri Jan 20 2023 Fedora Release Engineering - 0.68-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Wed Sep 28 2022 Sérgio Basto - 0.68-1 - Update po4a to 0.68 (#2124178) From 9c27d90d628c1f25e6dd7f541ff8e84e435fa1f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Mon, 23 Jan 2023 17:26:56 +0000 Subject: [PATCH 14/34] Update po4a to 0.69 (#2157762) --- .gitignore | 1 + po4a.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index aa0709c..45621b8 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /po4a-0.66.tar.gz /po4a-0.67.tar.gz /po4a-0.68.tar.gz +/po4a-0.69.tar.gz diff --git a/po4a.spec b/po4a.spec index c1cd00c..11b750a 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a -Version: 0.68 -Release: 2%{?dist} +Version: 0.69 +Release: 1%{?dist} Summary: A tool maintaining translations anywhere License: GPL+ URL: https://po4a.org/ @@ -132,6 +132,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Mon Jan 23 2023 Sérgio Basto - 0.69-1 +- Update po4a to 0.69 (#2157762) + * Fri Jan 20 2023 Fedora Release Engineering - 0.68-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index 28ef1d6..4df5920 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (po4a-0.68.tar.gz) = 317cdf0dcdcf48152ac876bd4c2f36ade50aee223e2440403b323178f91756f3ca7e35349fcd6c133207c72bcf7189883e99b705e7ca08718c8e29fbfd6d3c56 +SHA512 (po4a-0.69.tar.gz) = 66cfb120cd1dcda180031aeb25d7e29e6c2856bafb2aa2e0ec864fc93919a51aafd95f2a8dfa13a36db05dc6b0890088bafe32a032a3126760ff7a0c247b609f From 56aea00d68ecf42f9a6168f04f14a25f6540325e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jul 2023 05:57:13 +0000 Subject: [PATCH 15/34] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- po4a.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/po4a.spec b/po4a.spec index 11b750a..c8a5541 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.69 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool maintaining translations anywhere License: GPL+ URL: https://po4a.org/ @@ -132,6 +132,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Fri Jul 21 2023 Fedora Release Engineering - 0.69-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Mon Jan 23 2023 Sérgio Basto - 0.69-1 - Update po4a to 0.69 (#2157762) From a76678272b4a986c5ef0755e36389beebd30a81a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 20 Sep 2023 14:13:07 +0100 Subject: [PATCH 16/34] Convert license to SPDX format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Note: source is imprecise about 2.0-only vs 2.0-or-later: https://github.com/mquinson/po4a/issues/434 Here we follow Debian's lead in choosing 2.0-or-later, since at least the more recently added source files do have an explicit "or later" comment. Signed-off-by: Daniel P. Berrangé --- po4a.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/po4a.spec b/po4a.spec index c8a5541..0c7e87f 100644 --- a/po4a.spec +++ b/po4a.spec @@ -2,7 +2,10 @@ Name: po4a Version: 0.69 Release: 2%{?dist} Summary: A tool maintaining translations anywhere -License: GPL+ + +# Note: source is imprecise about 2.0-only vs 2.0-or-later +# https://github.com/mquinson/po4a/issues/434 +License: GPL-2.0-or-later URL: https://po4a.org/ Source0: https://github.com/mquinson/po4a/archive/v%{version}/%{name}-%{version}.tar.gz From 3a04a5f8caa2e3b736e3df436f19ba70349a4d3a Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 12 Oct 2023 17:52:30 -0400 Subject: [PATCH 17/34] Fix path-based dependencies Installation path macros must not be used in file dependencies: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_file_and_directory_dependencies Furthermore, while libxslt (xsltproc) is always in /usr even in flatpak builds as it is part of the runtime, opensp (nsgmls) is built in /app as a dependency of libofx for various financial applications. Therefore, no assumptions should be made regarding its location. --- po4a.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/po4a.spec b/po4a.spec index 0c7e87f..7784b82 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.69 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool maintaining translations anywhere # Note: source is imprecise about 2.0-only vs 2.0-or-later @@ -11,7 +11,7 @@ URL: https://po4a.org/ Source0: https://github.com/mquinson/po4a/archive/v%{version}/%{name}-%{version}.tar.gz BuildArch: noarch -BuildRequires: %{_bindir}/xsltproc +BuildRequires: /usr/bin/xsltproc BuildRequires: coreutils BuildRequires: docbook-style-xsl BuildRequires: findutils @@ -32,8 +32,8 @@ BuildRequires: perl(Module::Build) BuildRequires: perl(Pod::Man) # Run-time: -BuildRequires: %{_bindir}/nsgmls BuildRequires: gettext +BuildRequires: opensp BuildRequires: perl(Carp) BuildRequires: perl(Config) BuildRequires: perl(Cwd) @@ -71,9 +71,9 @@ BuildRequires: perl(Test::More) BuildRequires: perl(YAML::Tiny) -Requires: %{_bindir}/nsgmls -Requires: %{_bindir}/xsltproc +Requires: /usr/bin/xsltproc Requires: gettext +Requires: opensp # hope texlive-kpseas-bin missing deps was fixed # epel7 doesn't have /usr/share/texlive/texmf-dist/web2c/texmf.cnf Requires: texlive-kpathsea @@ -135,6 +135,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Thu Oct 12 2023 Yaakov Selkowitz - 0.69-3 +- Fix path-based dependencies + * Fri Jul 21 2023 Fedora Release Engineering - 0.69-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 23a29b8b51b0ba695e516ad98dbf7dc1ffb19720 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 22:03:57 +0000 Subject: [PATCH 18/34] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- po4a.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/po4a.spec b/po4a.spec index 7784b82..9730b17 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.69 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool maintaining translations anywhere # Note: source is imprecise about 2.0-only vs 2.0-or-later @@ -135,6 +135,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 0.69-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Oct 12 2023 Yaakov Selkowitz - 0.69-3 - Fix path-based dependencies From 4a52a138dd011a11bf63670fa77a56088fae8640 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 23:50:58 +0000 Subject: [PATCH 19/34] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- po4a.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/po4a.spec b/po4a.spec index 9730b17..1b54633 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.69 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A tool maintaining translations anywhere # Note: source is imprecise about 2.0-only vs 2.0-or-later @@ -135,6 +135,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 0.69-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 0.69-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 6900f81666860d89979099413b1058d7c4f1b2f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 18 Feb 2024 04:51:09 +0000 Subject: [PATCH 20/34] Add .packit.yaml --- .packit.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .packit.yaml diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..1f3f5d8 --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,33 @@ +specfile_path: po4a.spec + +# name in upstream package repository or registry (e.g. in PyPI) +upstream_package_name: po4a +upstream_project_url: https://github.com/mquinson/po4a +upstream_tag_template: v{version} +# downstream (Fedora) RPM package name +downstream_package_name: po4a +issue_repository: https://src.fedoraproject.org/rpms/po4a + +upload_sources: true + +actions: + changelog-entry: + - bash -c 'echo "- New release ${PACKIT_PROJECT_VERSION}"' + +jobs: + - job: pull_from_upstream + trigger: release + dist_git_branches: + - fedora-rawhide + + - job: koji_build + trigger: commit + allowed_pr_authors: ["packit", "sergiomb"] + allowed_committers: ["packit", "sergiomb"] + dist_git_branches: + - fedora-all + + - job: bodhi_update + trigger: commit + dist_git_branches: + - fedora-all # rawhide updates are created automatically From 567ddd0bd1d2902d335d4d9e5636ca36c11b97c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 18 Feb 2024 05:07:25 +0000 Subject: [PATCH 21/34] [packit] 0.70 upstream release Upstream tag: v0.70 Upstream commit: f37edd6e --- .gitignore | 1 + README.packit | 3 +++ po4a.spec | 7 +++++-- sources | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 README.packit diff --git a/.gitignore b/.gitignore index 45621b8..ce51be3 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /po4a-0.67.tar.gz /po4a-0.68.tar.gz /po4a-0.69.tar.gz +/po4a-0.70.tar.gz diff --git a/README.packit b/README.packit new file mode 100644 index 0000000..49c122d --- /dev/null +++ b/README.packit @@ -0,0 +1,3 @@ +This repository is maintained by packit. +https://packit.dev/ +The file was generated using packit 0.91.0. diff --git a/po4a.spec b/po4a.spec index 1b54633..473e17e 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a -Version: 0.69 -Release: 5%{?dist} +Version: 0.70 +Release: 1%{?dist} Summary: A tool maintaining translations anywhere # Note: source is imprecise about 2.0-only vs 2.0-or-later @@ -135,6 +135,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Sun Feb 18 2024 Sérgio M. Basto - 0.70-1 +- New release 0.70 + * Thu Jan 25 2024 Fedora Release Engineering - 0.69-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index 4df5920..92d411f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (po4a-0.69.tar.gz) = 66cfb120cd1dcda180031aeb25d7e29e6c2856bafb2aa2e0ec864fc93919a51aafd95f2a8dfa13a36db05dc6b0890088bafe32a032a3126760ff7a0c247b609f +SHA512 (po4a-0.70.tar.gz) = 8ff546776e9f9bc5d9612c734dbb029d232755950177cbb57c1afc5d3384c663d7fd9939ac63a2044fd55ac11ee4fd0552d90cc1e5ea662539f509b27e038a94 From 72bcf2c7e1a665e2ba794ec90be87f94494920b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 25 Feb 2024 02:36:19 +0000 Subject: [PATCH 22/34] Fix the parsing of nested simple and double quotes Enable build tests --- ...21dec3bb93d8d7e6be47b39617c17a339e4a.patch | 181 ++++++++++++++++++ po4a.spec | 10 +- 2 files changed, 189 insertions(+), 2 deletions(-) create mode 100644 20f421dec3bb93d8d7e6be47b39617c17a339e4a.patch diff --git a/20f421dec3bb93d8d7e6be47b39617c17a339e4a.patch b/20f421dec3bb93d8d7e6be47b39617c17a339e4a.patch new file mode 100644 index 0000000..0a948c7 --- /dev/null +++ b/20f421dec3bb93d8d7e6be47b39617c17a339e4a.patch @@ -0,0 +1,181 @@ +From 20f421dec3bb93d8d7e6be47b39617c17a339e4a Mon Sep 17 00:00:00 2001 +From: Martin Quinson +Date: Sat, 24 Feb 2024 01:14:04 +0100 +Subject: [PATCH] Fix the parsing of nested simple and double quotes + +Fixes https://github.com/mquinson/po4a/issues/475 +--- + NEWS | 4 ++ + po4a | 139 ++++++++++++++++++++++++++--------------------------------- + 2 files changed, 66 insertions(+), 77 deletions(-) + +diff --git a/po4a b/po4a +index ed48b9db..ce0f61e3 100755 +--- a/po4a ++++ b/po4a +@@ -856,103 +856,88 @@ sub get_options { + return %opts; + } + +-# Split a line into an array of lines. There is a lame attempt to deal with quotes and escaped spaces. +-# Remaining issues: +-# - Quotes cannot be mixed: >>"da 'd d'<< is invalid +-# - Empty elements are ignored: >>\\ a<< results in "a" not " a" +-# - Quotes and space escaping cannot be mixed: >>"a b"c\\ d<< is invalid ++# Split a line into an array of lines. This should correctly deal with quotes and escaped spaces. ++# - Simple and double quotes can be mixed: {'"tutu truc" blah' "'blah tutu' truc"} => {"tutu truc" blah}{'blah tutu' truc} ++# - Quotes can be in the middle of words: {h ij'k l' m} => {h}{ijk l}{m} ++# - Spaces can be escaped everywhere: {\ a b\ c d\ e} => { a}{b c}{d }{e} ++# - Quotes and space escaping can be mixed: {'a b'c\ d} => {a bc d} + # +-# See also https://stackoverflow.com/questions/29041011/perl-split-string-that-has-double-quotes-and-space/76404839#76404839 ++# Submitted as https://stackoverflow.com/questions/29041011/perl-split-string-that-has-double-quotes-and-space/76404839#76404839 + sub split_line { +- my $string = shift; +- my $orig_line = $string; ++ my ($string) = @_; + +- my $accumulated = ''; + my @result = (); +- my $in_str = 0; +- my $sep_char = ''; +- for my $tok ( split /\s/, $string ) { +- +- # Found a string boundary in this token +- if ( $tok =~ /'|"/ ) { +- my $orig_sep_char = $sep_char; +- +- # Check that we are not mismatching simple and double quote +- if ( $tok =~ /'/ ) { +- die "Simple quote (') matched with double quote (\") in $orig_line" if ( $sep_char eq '"' ); +- $sep_char = "'"; +- } +- if ( $tok =~ /"/ ) { +- die "Double quote (\") matched with simple quote (') in $orig_line" if ( $sep_char eq "'" ); +- $sep_char = '"'; +- } +- +- die "Please don't mix quotes and escaped spaces" if ( $tok =~ /\\$/ ); +- +- # Cleanup the sep char and check that we are done +- $tok =~ s/"|'//; +- +- if ( $tok =~ s/('|")// ) { # Two quotes in the same chunk. Deal with it if it's eg: >>"something"<< +- die "Mismatch between simple quote (') and double quote (\") in $orig_line" if ( $sep_char ne $1 ); +- die "Please don't use more than two quote signs per elements, that's too hard to parse." +- if ( $tok =~ /'|"/ ); +- +- $sep_char = $orig_sep_char; # Revert the fact that we are entering a quote +- +- # Deal with that chunk as if it were not quoted +- if ($in_str) { +- $accumulated .= " $tok"; +- } elsif ( length $accumulated ) { +- push @result, "$accumulated $tok"; +- $accumulated = ""; ++ my @quote = (); # stack of quotes we've seen so far, to handle nested single and double quotes ++ my $accumulated = ""; # the token we are building ++ my $seen_quotes = 0 ++ ; # Whether we've seen at least a quote or whether we should pass a chunk of only spaces (to pass separating spaces) ++ ++ # eat the string piece by piece, separating a quote, some spaces, or a chunk w/o quotes and spaces. ++ while ( $string =~ s/('|"|\s+|[^"'\s]+)(.*)$/$2/ ) { ++ my $token = $1; ++ ++ # print "Seen $token (last quote: ".(scalar @quote>0?$quote[-1]:"none")."; accumulated:$accumulated) -- "; ++ if ( $token eq "'" || $token eq '"' ) { ++ $seen_quotes = 1; ++ if ( scalar @quote > 0 ) { ++ if ( $quote[-1] eq $token ) { ++ pop @quote; + } else { +- push @result, $tok; ++ $accumulated .= $token; + } +- next; ++ } else { ++ push @quote, $token; + } ++ } elsif ( $token =~ /\\$/ ) { ++ if ( defined( my $next_char = substr( $string, 0, 1 ) ) ) { + +- # Accumulate the string if entering the string (in_str = false before that chunk), +- # or push the previously accumulated things if existing the string (in_str = true previously). +- if ($in_str) { +- push @result, "$accumulated $tok"; +- $accumulated = ""; +- $sep_char = ''; ++ # print " steal '$next_char' "; ++ $token =~ s/.$/$next_char/; ++ $string = substr( $string, 1 ); + } else { +- $accumulated = $tok; ++ die "Error: backslash escape at end of string\n"; ++ } ++ $accumulated .= $token; ++ } elsif ( $token =~ /^\s*$/ ) { ++ if ( scalar @quote > 0 ) { ++ $accumulated .= $token; + } +- $in_str = not $in_str; +- next; ++ } else { ++ $accumulated .= $token; + } + +- # This token is ended with an escaped space +- if ( $tok =~ /\\$/ ) { +- chop $tok; +- $accumulated = ( length $accumulated ? "$accumulated " : '' ) . $tok; +- next; +- } ++ # print " (last quote: ".(scalar @quote>0?$quote[-1]:"none")."; accumulated:$accumulated)"; + +- # Currently within a string, no boundary in sight +- if ($in_str) { +- $accumulated .= " $tok"; +- next; +- } ++ # Push the string if we're out of quotes, and if the coming chunk is a separating space ++ if ( scalar @quote == 0 && ( $string eq '' || substr( $string, 0, 1 ) eq ' ' ) ) { + +- # Nothing specific about this item +- if ( length $accumulated ) { +- push @result, "$accumulated $tok"; +- $accumulated = ""; +- } else { +- push @result, $tok; ++ # print " Push\n"; ++ # Pass the separating quotes, that are space only and never contained any quote ++ if ( $accumulated ne '' && $seen_quotes || $accumulated =~ /\S/ ) { ++ push @result, $accumulated; ++ } ++ $accumulated = ''; ++ $seen_quotes = 0; ++ ++ # } else { ++ # print " Pass\n"; + } + } +- die "Expecting end of quote" if $in_str; ++ ++ if ( scalar @quote > 0 ) { ++ die "Error: unclosed quote at end of string\n"; ++ } ++ + return @result; + } + + # Test the split_line function +-# print join "#", split_line("a 'b c c d ' 'titi' \"toto\" e\\ f g\\ h ij'k l' m\"n \" 'l '"); +-# print "#\n"; +-# __END__ ++#my $testline = "a 'b c c d ' 'titi' \"toto\" ' ' \" \" '\"' \"'\" '\"tutu truc\" blah' \"'blah tutu' truc\" e\\ f g\\ h ij'k l' m\"n \" 'l ' " ++# ."\\\" \\' '\\'' \"'\\''\" BHA\\RO \\ n \"o p\"q\\ r"; ++#print "$testline\n"; ++#print join "#", split_line($testline); ++#print "#\n"; ++#__END__ + + # Parse a config line and extract the parameters that correspond to options. + # These options are appended to the options provided in argument (as a diff --git a/po4a.spec b/po4a.spec index 473e17e..800121a 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.70 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool maintaining translations anywhere # Note: source is imprecise about 2.0-only vs 2.0-or-later @@ -9,6 +9,7 @@ License: GPL-2.0-or-later URL: https://po4a.org/ Source0: https://github.com/mquinson/po4a/archive/v%{version}/%{name}-%{version}.tar.gz +Patch0: https://github.com/mquinson/po4a/commit/20f421dec3bb93d8d7e6be47b39617c17a339e4a.patch BuildArch: noarch BuildRequires: /usr/bin/xsltproc @@ -69,6 +70,7 @@ BuildRequires: perl(Unicode::GCString) # Required by the tests: BuildRequires: perl(Test::More) BuildRequires: perl(YAML::Tiny) +BuildRequires: perl(Syntax::Keyword::Try) Requires: /usr/bin/xsltproc @@ -112,7 +114,7 @@ find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' %check LANG=C.utf8 -#./Build test +./Build test %files -f %{name}.lang @@ -135,6 +137,10 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Sun Feb 25 2024 Sérgio Basto - 0.70-2 +- Fix the parsing of nested simple and double quotes +- Enable build tests + * Sun Feb 18 2024 Sérgio M. Basto - 0.70-1 - New release 0.70 From 5fbee0e89b173b08721484a4d71866524289fd45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 3 Mar 2024 22:20:03 +0000 Subject: [PATCH 23/34] Add perl(Test::Pod) to perform more tests --- po4a.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/po4a.spec b/po4a.spec index 800121a..a63e58a 100644 --- a/po4a.spec +++ b/po4a.spec @@ -68,9 +68,10 @@ BuildRequires: perl(Text::WrapI18N) BuildRequires: perl(Unicode::GCString) # Required by the tests: -BuildRequires: perl(Test::More) -BuildRequires: perl(YAML::Tiny) BuildRequires: perl(Syntax::Keyword::Try) +BuildRequires: perl(Test::More) +BuildRequires: perl(Test::Pod) +BuildRequires: perl(YAML::Tiny) Requires: /usr/bin/xsltproc From 16ab392bb6892142e49a9613164d8001c73137fd Mon Sep 17 00:00:00 2001 From: Packit Date: Sat, 2 Mar 2024 02:50:17 +0000 Subject: [PATCH 24/34] [packit] 0.71 upstream release - Resolves rhbz#2267401 Upstream tag: v0.71 Upstream commit: 495a9515 --- .gitignore | 1 + ...21dec3bb93d8d7e6be47b39617c17a339e4a.patch | 181 ------------------ README.packit | 2 +- po4a.spec | 8 +- sources | 2 +- 5 files changed, 8 insertions(+), 186 deletions(-) delete mode 100644 20f421dec3bb93d8d7e6be47b39617c17a339e4a.patch diff --git a/.gitignore b/.gitignore index ce51be3..8febac3 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /po4a-0.68.tar.gz /po4a-0.69.tar.gz /po4a-0.70.tar.gz +/po4a-0.71.tar.gz diff --git a/20f421dec3bb93d8d7e6be47b39617c17a339e4a.patch b/20f421dec3bb93d8d7e6be47b39617c17a339e4a.patch deleted file mode 100644 index 0a948c7..0000000 --- a/20f421dec3bb93d8d7e6be47b39617c17a339e4a.patch +++ /dev/null @@ -1,181 +0,0 @@ -From 20f421dec3bb93d8d7e6be47b39617c17a339e4a Mon Sep 17 00:00:00 2001 -From: Martin Quinson -Date: Sat, 24 Feb 2024 01:14:04 +0100 -Subject: [PATCH] Fix the parsing of nested simple and double quotes - -Fixes https://github.com/mquinson/po4a/issues/475 ---- - NEWS | 4 ++ - po4a | 139 ++++++++++++++++++++++++++--------------------------------- - 2 files changed, 66 insertions(+), 77 deletions(-) - -diff --git a/po4a b/po4a -index ed48b9db..ce0f61e3 100755 ---- a/po4a -+++ b/po4a -@@ -856,103 +856,88 @@ sub get_options { - return %opts; - } - --# Split a line into an array of lines. There is a lame attempt to deal with quotes and escaped spaces. --# Remaining issues: --# - Quotes cannot be mixed: >>"da 'd d'<< is invalid --# - Empty elements are ignored: >>\\ a<< results in "a" not " a" --# - Quotes and space escaping cannot be mixed: >>"a b"c\\ d<< is invalid -+# Split a line into an array of lines. This should correctly deal with quotes and escaped spaces. -+# - Simple and double quotes can be mixed: {'"tutu truc" blah' "'blah tutu' truc"} => {"tutu truc" blah}{'blah tutu' truc} -+# - Quotes can be in the middle of words: {h ij'k l' m} => {h}{ijk l}{m} -+# - Spaces can be escaped everywhere: {\ a b\ c d\ e} => { a}{b c}{d }{e} -+# - Quotes and space escaping can be mixed: {'a b'c\ d} => {a bc d} - # --# See also https://stackoverflow.com/questions/29041011/perl-split-string-that-has-double-quotes-and-space/76404839#76404839 -+# Submitted as https://stackoverflow.com/questions/29041011/perl-split-string-that-has-double-quotes-and-space/76404839#76404839 - sub split_line { -- my $string = shift; -- my $orig_line = $string; -+ my ($string) = @_; - -- my $accumulated = ''; - my @result = (); -- my $in_str = 0; -- my $sep_char = ''; -- for my $tok ( split /\s/, $string ) { -- -- # Found a string boundary in this token -- if ( $tok =~ /'|"/ ) { -- my $orig_sep_char = $sep_char; -- -- # Check that we are not mismatching simple and double quote -- if ( $tok =~ /'/ ) { -- die "Simple quote (') matched with double quote (\") in $orig_line" if ( $sep_char eq '"' ); -- $sep_char = "'"; -- } -- if ( $tok =~ /"/ ) { -- die "Double quote (\") matched with simple quote (') in $orig_line" if ( $sep_char eq "'" ); -- $sep_char = '"'; -- } -- -- die "Please don't mix quotes and escaped spaces" if ( $tok =~ /\\$/ ); -- -- # Cleanup the sep char and check that we are done -- $tok =~ s/"|'//; -- -- if ( $tok =~ s/('|")// ) { # Two quotes in the same chunk. Deal with it if it's eg: >>"something"<< -- die "Mismatch between simple quote (') and double quote (\") in $orig_line" if ( $sep_char ne $1 ); -- die "Please don't use more than two quote signs per elements, that's too hard to parse." -- if ( $tok =~ /'|"/ ); -- -- $sep_char = $orig_sep_char; # Revert the fact that we are entering a quote -- -- # Deal with that chunk as if it were not quoted -- if ($in_str) { -- $accumulated .= " $tok"; -- } elsif ( length $accumulated ) { -- push @result, "$accumulated $tok"; -- $accumulated = ""; -+ my @quote = (); # stack of quotes we've seen so far, to handle nested single and double quotes -+ my $accumulated = ""; # the token we are building -+ my $seen_quotes = 0 -+ ; # Whether we've seen at least a quote or whether we should pass a chunk of only spaces (to pass separating spaces) -+ -+ # eat the string piece by piece, separating a quote, some spaces, or a chunk w/o quotes and spaces. -+ while ( $string =~ s/('|"|\s+|[^"'\s]+)(.*)$/$2/ ) { -+ my $token = $1; -+ -+ # print "Seen $token (last quote: ".(scalar @quote>0?$quote[-1]:"none")."; accumulated:$accumulated) -- "; -+ if ( $token eq "'" || $token eq '"' ) { -+ $seen_quotes = 1; -+ if ( scalar @quote > 0 ) { -+ if ( $quote[-1] eq $token ) { -+ pop @quote; - } else { -- push @result, $tok; -+ $accumulated .= $token; - } -- next; -+ } else { -+ push @quote, $token; - } -+ } elsif ( $token =~ /\\$/ ) { -+ if ( defined( my $next_char = substr( $string, 0, 1 ) ) ) { - -- # Accumulate the string if entering the string (in_str = false before that chunk), -- # or push the previously accumulated things if existing the string (in_str = true previously). -- if ($in_str) { -- push @result, "$accumulated $tok"; -- $accumulated = ""; -- $sep_char = ''; -+ # print " steal '$next_char' "; -+ $token =~ s/.$/$next_char/; -+ $string = substr( $string, 1 ); - } else { -- $accumulated = $tok; -+ die "Error: backslash escape at end of string\n"; -+ } -+ $accumulated .= $token; -+ } elsif ( $token =~ /^\s*$/ ) { -+ if ( scalar @quote > 0 ) { -+ $accumulated .= $token; - } -- $in_str = not $in_str; -- next; -+ } else { -+ $accumulated .= $token; - } - -- # This token is ended with an escaped space -- if ( $tok =~ /\\$/ ) { -- chop $tok; -- $accumulated = ( length $accumulated ? "$accumulated " : '' ) . $tok; -- next; -- } -+ # print " (last quote: ".(scalar @quote>0?$quote[-1]:"none")."; accumulated:$accumulated)"; - -- # Currently within a string, no boundary in sight -- if ($in_str) { -- $accumulated .= " $tok"; -- next; -- } -+ # Push the string if we're out of quotes, and if the coming chunk is a separating space -+ if ( scalar @quote == 0 && ( $string eq '' || substr( $string, 0, 1 ) eq ' ' ) ) { - -- # Nothing specific about this item -- if ( length $accumulated ) { -- push @result, "$accumulated $tok"; -- $accumulated = ""; -- } else { -- push @result, $tok; -+ # print " Push\n"; -+ # Pass the separating quotes, that are space only and never contained any quote -+ if ( $accumulated ne '' && $seen_quotes || $accumulated =~ /\S/ ) { -+ push @result, $accumulated; -+ } -+ $accumulated = ''; -+ $seen_quotes = 0; -+ -+ # } else { -+ # print " Pass\n"; - } - } -- die "Expecting end of quote" if $in_str; -+ -+ if ( scalar @quote > 0 ) { -+ die "Error: unclosed quote at end of string\n"; -+ } -+ - return @result; - } - - # Test the split_line function --# print join "#", split_line("a 'b c c d ' 'titi' \"toto\" e\\ f g\\ h ij'k l' m\"n \" 'l '"); --# print "#\n"; --# __END__ -+#my $testline = "a 'b c c d ' 'titi' \"toto\" ' ' \" \" '\"' \"'\" '\"tutu truc\" blah' \"'blah tutu' truc\" e\\ f g\\ h ij'k l' m\"n \" 'l ' " -+# ."\\\" \\' '\\'' \"'\\''\" BHA\\RO \\ n \"o p\"q\\ r"; -+#print "$testline\n"; -+#print join "#", split_line($testline); -+#print "#\n"; -+#__END__ - - # Parse a config line and extract the parameters that correspond to options. - # These options are appended to the options provided in argument (as a diff --git a/README.packit b/README.packit index 49c122d..31341b6 100644 --- a/README.packit +++ b/README.packit @@ -1,3 +1,3 @@ This repository is maintained by packit. https://packit.dev/ -The file was generated using packit 0.91.0. +The file was generated using packit 0.93.0. diff --git a/po4a.spec b/po4a.spec index a63e58a..1cd3877 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a -Version: 0.70 -Release: 2%{?dist} +Version: 0.71 +Release: 1%{?dist} Summary: A tool maintaining translations anywhere # Note: source is imprecise about 2.0-only vs 2.0-or-later @@ -9,7 +9,6 @@ License: GPL-2.0-or-later URL: https://po4a.org/ Source0: https://github.com/mquinson/po4a/archive/v%{version}/%{name}-%{version}.tar.gz -Patch0: https://github.com/mquinson/po4a/commit/20f421dec3bb93d8d7e6be47b39617c17a339e4a.patch BuildArch: noarch BuildRequires: /usr/bin/xsltproc @@ -138,6 +137,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Sat Mar 02 2024 Packit - 0.71-1 +- New release 0.71 + * Sun Feb 25 2024 Sérgio Basto - 0.70-2 - Fix the parsing of nested simple and double quotes - Enable build tests diff --git a/sources b/sources index 92d411f..0171301 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (po4a-0.70.tar.gz) = 8ff546776e9f9bc5d9612c734dbb029d232755950177cbb57c1afc5d3384c663d7fd9939ac63a2044fd55ac11ee4fd0552d90cc1e5ea662539f509b27e038a94 +SHA512 (po4a-0.71.tar.gz) = 5dd19e61d13ade34a4fb3da7eebb26970efb5cc6977147929f5c394c43f1155e52c705b6757e9a3b4d9dd6f2b0499378c10f42315843486cab7d5371402df025 From 447adfdb796bc24d1989b85c191b761450625ecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Mon, 4 Mar 2024 00:38:36 +0000 Subject: [PATCH 25/34] Add upstream patch Fix the --translate-only option --- ...42ae5acf4b7fcc806935d97215b679ed843b.patch | 355 ++++++++++++++++++ po4a.spec | 6 +- 2 files changed, 360 insertions(+), 1 deletion(-) create mode 100644 b70d42ae5acf4b7fcc806935d97215b679ed843b.patch diff --git a/b70d42ae5acf4b7fcc806935d97215b679ed843b.patch b/b70d42ae5acf4b7fcc806935d97215b679ed843b.patch new file mode 100644 index 0000000..0e4056e --- /dev/null +++ b/b70d42ae5acf4b7fcc806935d97215b679ed843b.patch @@ -0,0 +1,355 @@ +From b70d42ae5acf4b7fcc806935d97215b679ed843b Mon Sep 17 00:00:00 2001 +From: Martin Quinson +Date: Fri, 1 Mar 2024 01:10:23 +0100 +Subject: [PATCH] Fix the --translate-only option + +I added a lot of verbose messages to understand what's going on, +rewrote a bit of code I didn't understant but was not recently +modified, and the bug introduced last month was gone. + +At the end, I'm not sure of what happened, but this +fixes https://github.com/mquinson/po4a/issues/482 + +Thanks Alexander for the diagnostic and the reproducer! +--- + NEWS | 3 + + po4a | 78 +++++++++++++++++------- + t/Testhelper.pm | 2 +- + t/add/modifiers/_output | 1 + + t/cfg-multi.t | 22 ++++++- + t/cfg/args-alias-redef/_output | 1 + + t/cfg/args-alias/_output | 1 + + t/cfg/args-alias/_output-keep100 | 1 + + t/cfg/args-global/_output | 1 + + t/cfg/args-global/_output-keep100 | 1 + + t/cfg/args-master/_output | 1 + + t/cfg/args-master/_output-keep100 | 1 + + t/cfg/multiple-fuzzied-noup/_output | 1 + + t/cfg/multiple-nopo/_output-noupdate | 1 + + t/cfg/multiple-uptodate/_output-only-one | 4 ++ + t/cfg/multiple-uptodate/_output-only-two | 5 ++ + t/cfg/single-fuzzied-noup/_output | 1 + + t/cfg/single-nopo/_output-noupdate | 1 + + 18 files changed, 101 insertions(+), 25 deletions(-) + create mode 100644 t/cfg/multiple-uptodate/_output-only-one + create mode 100644 t/cfg/multiple-uptodate/_output-only-two + +diff --git a/po4a b/po4a +index 14222062f..72736013e 100755 +--- a/po4a ++++ b/po4a +@@ -1319,11 +1319,12 @@ while () { + } + if ( scalar @{ $po4a_opts{"partial"} } ) { + foreach my $file ( @{ $po4a_opts{"partial"} } ) { +- if ( grep ( m/(\S+):\Q$file\E\b/, @split_args ) ) { +- $partial{'lang'}{$1} = 1; +- $partial{'master'}{$main} = 1; +- $partial{'files'}{$file} = 1; +- last; ++ foreach my $arg (@split_args) { ++ if ( $arg =~ m/(\S+):\Q$file\E\b/ ) { ++ $partial{'lang'}{$1} = 1; ++ $partial{'master'}{$main} = 1; ++ $partial{'files'}{$file} = 1; ++ } + } + } + } +@@ -1344,7 +1345,7 @@ while () { + $document{$main}{'format'} = $aliases{$1}{"module"}; + if ( defined $aliases{$1}{"options"} ) { + +- # print STDERR "Override the global options with the alias ones\n"; ++ # print STDERR "Override the global options with the alias ones\n"; + %options = %{ $aliases{$1}{"options"} }; # XXX not a merge, but overwrite + } + } +@@ -1440,16 +1441,18 @@ while () { + } + } + } elsif ( $cmd =~ m/po4a_alias: *(.*)/ ) { +- my $name = $1; ++ my $name = $1; + shift @split_args; + +- if ( defined $aliases{$name} ) { # If that alias was previously defined +- die "Alias $name redefined from ".$aliases{$name}{"module"}." to $main\n" +- if ( $aliases{$name}{"module"} ne $main ); # Sanity checks +- # Concat the new content to the existing alias +- @split_args = map { parse_config_options( "$config_file:$nb", $_, \%{ $aliases{$name}{"options"} } ); } @split_args; +- } else { +- # Otherwise, define a new option set accordingly ++ if ( defined $aliases{$name} ) { # If that alias was previously defined ++ die "Alias $name redefined from " . $aliases{$name}{"module"} . " to $main\n" ++ if ( $aliases{$name}{"module"} ne $main ); ++ ++ # Concat the new content to the existing alias after a sanity check ++ @split_args = ++ map { parse_config_options( "$config_file:$nb", $_, \%{ $aliases{$name}{"options"} } ); } @split_args; ++ ++ } else { # Otherwise, define a new option set accordingly + my %alias = (); + $alias{"module"} = $main; + +@@ -1530,13 +1533,33 @@ if ( $pot_filename =~ m/\$master/ ) { + + # Skip documents not specified, strings are read directly from POT file + foreach my $master ( keys %document ) { +- next unless length $master; +- delete $document{$master} unless exists $partial{'master'}{$master}; ++ next unless length $master; ++ if ( exists $partial{'master'}{$master} ) { ++ print wrap_msg( gettext("Document %s kept for update (--translate-only)."), $master ) ++ if ( $po4a_opts{"verbose"} ); ++ } else { ++ print wrap_msg( gettext("Skip the update of %s as requested (--translate-only)."), $master ) ++ if ( $po4a_opts{"verbose"} ); ++ delete $document{$master}; ++ } + } + + # Do not read PO files if no file is processed for this language +- foreach my $lang ( keys %po_filename ) { +- delete $po_filename{$lang} unless exists $partial{'lang'}{$lang}; ++ my $skipped_langs = ""; ++ my $kept_langs = ""; ++ foreach my $lang ( sort keys %po_filename ) { ++ if ( exists $partial{'lang'}{$lang} ) { ++ $kept_langs .= " $lang"; ++ } else { ++ $skipped_langs .= " $lang"; ++ delete $po_filename{$lang}; ++ } ++ } ++ if ( $po4a_opts{"verbose"} ) { ++ $skipped_langs =~ s/^ //; ++ $kept_langs =~ s/^ //; ++ print wrap_msg( gettext("Languages skipped because of --translate-only: %s; kept languages: %s."), ++ $skipped_langs, $kept_langs ); + } + } + +@@ -1654,8 +1677,16 @@ if ($update_pot_file) { + print wrap_msg( gettext(" (%d entries)"), $potfile->count_entries() ) + unless ( $po4a_opts{"quiet"} ); + } else { +- print wrap_msg( gettext("POT file %s already up to date."), $pot_filename ) +- if ( $po4a_opts{"verbose"} and not $po4a_opts{"no-update"} ); ++ if ( $po4a_opts{"no-update"} ) { ++ print wrap_msg( gettext("NOT updating the POT file %s as requested (--no-update)."), $pot_filename ) ++ if ( $po4a_opts{"verbose"} ); ++ } elsif ( scalar @{ $po4a_opts{"partial"} } ) { ++ print wrap_msg( gettext("NOT updating the POT file %s because of --translate-only."), $pot_filename ) ++ if ( $po4a_opts{"verbose"} ); ++ } else { ++ print wrap_msg( gettext("POT file %s already up to date."), $pot_filename ) ++ if ( $po4a_opts{"verbose"} and not $po4a_opts{"no-update"} ); ++ } + } + + my %split_po; # po_files: '$lang','$master' => '$path' +@@ -1930,7 +1961,12 @@ if ( not $po4a_opts{"no-translations"} ) { + next if ( $master eq '' ); + next unless defined $document{$master}{$lang}; + if ( scalar @{ $po4a_opts{"partial"} } ) { +- next unless defined $partial{'files'}{ $document{$master}{$lang} }; ++ unless ( defined $partial{'files'}{ $document{$master}{$lang} } ) { ++ print wrap_msg( gettext("Skip master file %s in language %s because of --translate-only."), ++ $master, $lang ) ++ if ( $po4a_opts{"verbose"} ); ++ next; ++ } + } + + unless ( $po4a_opts{"force"} ) { +diff --git a/t/Testhelper.pm b/t/Testhelper.pm +index 889128a4a..187a3f4fb 100644 +--- a/t/Testhelper.pm ++++ b/t/Testhelper.pm +@@ -270,7 +270,7 @@ sub run_one_po4aconf { + pass("Change directory back to $cwd"); + + my $expected_outfile = $t->{'expected_outfile'} // "$path/_output"; +- unless ( $t->{'diff_outfile'} ) { ++ unless ( -e $expected_outfile ) { + $expected_outfile = "$path/$expected_outfile" + if ( not -e $expected_outfile ) && ( -e "$path/$expected_outfile" ); + unless ( -e $expected_outfile ) { +diff --git a/t/add/modifiers/_output b/t/add/modifiers/_output +index 7a93e0caf..a6fcb4050 100644 +--- a/t/add/modifiers/_output ++++ b/t/add/modifiers/_output +@@ -1,4 +1,5 @@ + NOT creating modifiers.pot as requested (--no-update). ++NOT updating the POT file modifiers.pot as requested (--no-update). + with-1 is 100% translated (2 strings). + without-2 is 100% translated (2 strings). + without-3 is 100% translated (2 strings). +diff --git a/t/cfg-multi.t b/t/cfg-multi.t +index aec9dde00..80fbb56bc 100644 +--- a/t/cfg-multi.t ++++ b/t/cfg-multi.t +@@ -11,9 +11,9 @@ use Testhelper; + + my @tests; + push @tests, { +- 'doc' => 'Multiple languages, no pot no po', +- 'po4a.conf' => 'cfg/multiple-nopotpo/po4a.conf', +- 'closed_path' => 'cfg/*/', # Do not use or modify the other tests ++ 'doc' => 'Multiple languages, no pot no po', ++ 'po4a.conf' => 'cfg/multiple-nopotpo/po4a.conf', ++ 'closed_path' => 'cfg/*/', # Do not use or modify the other tests + 'expected_files' => 'multiple.de.po multiple.es.po multiple.fr.po multiple.it.po multiple.pot', + }, + { +@@ -48,6 +48,22 @@ push @tests, { + . 'multiple.man.de.1 multiple.man.es.1 multiple.man.fr.1 multiple.man.it.1 multiple.pot', + + }, ++ { ++ 'doc' => 'Multiple languages, translation uptodate, translate only one language', ++ 'po4a.conf' => 'cfg/multiple-uptodate/po4a.conf', ++ 'options' => ' --translate-only multiple.man.de.1', ++ 'closed_path' => 'cfg/*/', ++ 'expected_outfile' => 'cfg/multiple-uptodate/_output-only-one', ++ 'expected_files' => 'multiple.man.de.1', ++ }, ++ { ++ 'doc' => 'Multiple languages, translation uptodate, translate only two languages', ++ 'po4a.conf' => 'cfg/multiple-uptodate/po4a.conf', ++ 'options' => ' --translate-only multiple.man.de.1 --translate-only multiple.man.es.1', ++ 'closed_path' => 'cfg/*/', ++ 'expected_outfile' => 'cfg/multiple-uptodate/_output-only-two', ++ 'expected_files' => 'multiple.man.de.1 multiple.man.es.1', ++ }, + { + 'doc' => 'Multiple languages, translation already fuzzy', + 'po4a.conf' => 'cfg/multiple-fuzzy/po4a.conf', +diff --git a/t/cfg/args-alias-redef/_output b/t/cfg/args-alias-redef/_output +index d0467854e..b6bfe9945 100644 +--- a/t/cfg/args-alias-redef/_output ++++ b/t/cfg/args-alias-redef/_output +@@ -1,4 +1,5 @@ + NOT creating args.pot as requested (--no-update). ++NOT updating the POT file args.pot as requested (--no-update). + man.de.1 is 20% translated (1 of 5 strings). + Discard man.es.1 (3 of 5 strings; only 60% translated; need 70%). + man.fr.1 is 80% translated (4 of 5 strings). +diff --git a/t/cfg/args-alias/_output b/t/cfg/args-alias/_output +index 0a88fc814..da4af66dc 100644 +--- a/t/cfg/args-alias/_output ++++ b/t/cfg/args-alias/_output +@@ -1,4 +1,5 @@ + NOT creating args.pot as requested (--no-update). ++NOT updating the POT file args.pot as requested (--no-update). + man.de.1 is 20% translated (1 of 5 strings). + Discard man.de.2 (1 of 5 strings; only 20% translated; need 80%). + Discard man.es.1 (3 of 5 strings; only 60% translated; need 70%). +diff --git a/t/cfg/args-alias/_output-keep100 b/t/cfg/args-alias/_output-keep100 +index ec49800ce..cacbc50f3 100644 +--- a/t/cfg/args-alias/_output-keep100 ++++ b/t/cfg/args-alias/_output-keep100 +@@ -1,4 +1,5 @@ + NOT creating args.pot as requested (--no-update). ++NOT updating the POT file args.pot as requested (--no-update). + Discard man.de.1 (1 of 5 strings; only 20% translated; need 100%). + Discard man.de.2 (1 of 5 strings; only 20% translated; need 100%). + Discard man.es.1 (3 of 5 strings; only 60% translated; need 100%). +diff --git a/t/cfg/args-global/_output b/t/cfg/args-global/_output +index 32a9b921c..b649c4434 100644 +--- a/t/cfg/args-global/_output ++++ b/t/cfg/args-global/_output +@@ -1,4 +1,5 @@ + NOT creating args.pot as requested (--no-update). ++NOT updating the POT file args.pot as requested (--no-update). + man.de.1 is 20% translated (1 of 5 strings). + man.es.1 is 60% translated (3 of 5 strings). + man.fr.1 is 80% translated (4 of 5 strings). +diff --git a/t/cfg/args-global/_output-keep100 b/t/cfg/args-global/_output-keep100 +index c0b91f56c..2b9d1e4a1 100644 +--- a/t/cfg/args-global/_output-keep100 ++++ b/t/cfg/args-global/_output-keep100 +@@ -1,4 +1,5 @@ + NOT creating args.pot as requested (--no-update). ++NOT updating the POT file args.pot as requested (--no-update). + Discard man.de.1 (1 of 5 strings; only 20% translated; need 100%). + Discard man.es.1 (3 of 5 strings; only 60% translated; need 100%). + Discard man.fr.1 (4 of 5 strings; only 80% translated; need 100%). +diff --git a/t/cfg/args-master/_output b/t/cfg/args-master/_output +index 208d3a1c7..db00cb6a9 100644 +--- a/t/cfg/args-master/_output ++++ b/t/cfg/args-master/_output +@@ -1,4 +1,5 @@ + NOT creating args.pot as requested (--no-update). ++NOT updating the POT file args.pot as requested (--no-update). + Discard man.de.1 (1 of 5 strings; only 20% translated; need 22%). + Discard man.es.1 (3 of 5 strings; only 60% translated; need 66%). + man.fr.1 is 80% translated (4 of 5 strings). +diff --git a/t/cfg/args-master/_output-keep100 b/t/cfg/args-master/_output-keep100 +index c0b91f56c..2b9d1e4a1 100644 +--- a/t/cfg/args-master/_output-keep100 ++++ b/t/cfg/args-master/_output-keep100 +@@ -1,4 +1,5 @@ + NOT creating args.pot as requested (--no-update). ++NOT updating the POT file args.pot as requested (--no-update). + Discard man.de.1 (1 of 5 strings; only 20% translated; need 100%). + Discard man.es.1 (3 of 5 strings; only 60% translated; need 100%). + Discard man.fr.1 (4 of 5 strings; only 80% translated; need 100%). +diff --git a/t/cfg/multiple-fuzzied-noup/_output b/t/cfg/multiple-fuzzied-noup/_output +index 9f3763842..a33da7709 100644 +--- a/t/cfg/multiple-fuzzied-noup/_output ++++ b/t/cfg/multiple-fuzzied-noup/_output +@@ -1,4 +1,5 @@ + NOT updating multiple.pot as requested (--no-update). ++NOT updating the POT file multiple.pot as requested (--no-update). + Discard multiple.man.de.1 (3 of 4 strings; only 75% translated; need 80%). + Discard multiple.man.es.1 (3 of 4 strings; only 75% translated; need 80%). + Discard multiple.man.fr.1 (3 of 4 strings; only 75% translated; need 80%). +diff --git a/t/cfg/multiple-nopo/_output-noupdate b/t/cfg/multiple-nopo/_output-noupdate +index bd913a32e..d3cc84a76 100644 +--- a/t/cfg/multiple-nopo/_output-noupdate ++++ b/t/cfg/multiple-nopo/_output-noupdate +@@ -1,4 +1,5 @@ + NOT updating multiple.pot as requested (--no-update). ++NOT updating the POT file multiple.pot as requested (--no-update). + PO file multiple.de.po for language de is missing -- skipping. + PO file multiple.es.po for language es is missing -- skipping. + PO file multiple.fr.po for language fr is missing -- skipping. +diff --git a/t/cfg/multiple-uptodate/_output-only-one b/t/cfg/multiple-uptodate/_output-only-one +new file mode 100644 +index 000000000..50b13626d +--- /dev/null ++++ b/t/cfg/multiple-uptodate/_output-only-one +@@ -0,0 +1,4 @@ ++Document multiple.man.1 kept for update (--translate-only). ++Languages skipped because of --translate-only: es fr it; kept languages: de. ++NOT updating the POT file multiple.pot because of --translate-only. ++multiple.man.de.1 is 100% translated (4 strings). +diff --git a/t/cfg/multiple-uptodate/_output-only-two b/t/cfg/multiple-uptodate/_output-only-two +new file mode 100644 +index 000000000..1c2f2fbdf +--- /dev/null ++++ b/t/cfg/multiple-uptodate/_output-only-two +@@ -0,0 +1,5 @@ ++Document multiple.man.1 kept for update (--translate-only). ++Languages skipped because of --translate-only: fr it; kept languages: de es. ++NOT updating the POT file multiple.pot because of --translate-only. ++multiple.man.de.1 is 100% translated (4 strings). ++multiple.man.es.1 is 100% translated (4 strings). +diff --git a/t/cfg/single-fuzzied-noup/_output b/t/cfg/single-fuzzied-noup/_output +index fde8e19f8..9fb696e0b 100644 +--- a/t/cfg/single-fuzzied-noup/_output ++++ b/t/cfg/single-fuzzied-noup/_output +@@ -1,2 +1,3 @@ + NOT updating single-fuzzied-noup.pot as requested (--no-update). ++NOT updating the POT file single-fuzzied-noup.pot as requested (--no-update). + Discard single-fuzzied-noup.man.fr.1 (3 of 4 strings; only 75% translated; need 80%). +diff --git a/t/cfg/single-nopo/_output-noupdate b/t/cfg/single-nopo/_output-noupdate +index c8d15b4c8..223727166 100644 +--- a/t/cfg/single-nopo/_output-noupdate ++++ b/t/cfg/single-nopo/_output-noupdate +@@ -1,2 +1,3 @@ + NOT updating single.pot as requested (--no-update). ++NOT updating the POT file single.pot as requested (--no-update). + PO file single.fr.po for language fr is missing -- skipping. diff --git a/po4a.spec b/po4a.spec index 1cd3877..8d68c9a 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.71 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool maintaining translations anywhere # Note: source is imprecise about 2.0-only vs 2.0-or-later @@ -9,6 +9,7 @@ License: GPL-2.0-or-later URL: https://po4a.org/ Source0: https://github.com/mquinson/po4a/archive/v%{version}/%{name}-%{version}.tar.gz +Patch0: https://github.com/mquinson/po4a/commit/b70d42ae5acf4b7fcc806935d97215b679ed843b.patch BuildArch: noarch BuildRequires: /usr/bin/xsltproc @@ -137,6 +138,9 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Mon Mar 04 2024 Sérgio Basto - 0.71-2 +- Add upstream patch Fix the --translate-only option + * Sat Mar 02 2024 Packit - 0.71-1 - New release 0.71 From cbae01f4bd2a27cc2efda78910d7ed6439e0cc1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Mon, 11 Mar 2024 14:25:59 +0000 Subject: [PATCH 26/34] Disable tests again, randomly they fail with Charset "CHARSET" is not a portable encoding name. Message conversion to user's charset might not work. --- po4a.spec | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/po4a.spec b/po4a.spec index 8d68c9a..63d3b1b 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.71 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool maintaining translations anywhere # Note: source is imprecise about 2.0-only vs 2.0-or-later @@ -19,6 +19,7 @@ BuildRequires: findutils BuildRequires: grep # Requires a pod2man which supports --utf8 # Seemingly added in perl-5.10.1 +BuildRequires: glibc-all-langpacks BuildRequires: perl-interpreter >= 4:5.10.1 BuildRequires: perl-generators BuildRequires: perl(lib) @@ -101,12 +102,10 @@ chmod +x scripts/* %build export PO4AFLAGS="-v -v -v" -LANG=C.utf8 %{__perl} ./Build.PL installdirs=vendor ./Build %install -LANG=C.utf8 ./Build install destdir=$RPM_BUILD_ROOT create_packlist=0 find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' @@ -114,8 +113,7 @@ find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' %find_lang %{name} %check -LANG=C.utf8 -./Build test +./Build test || : %files -f %{name}.lang @@ -138,6 +136,10 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Mon Mar 11 2024 Sérgio Basto - 0.71-3 +- Disable tests again, randomly they fail with Charset "CHARSET" is not a + portable encoding name. Message conversion to user's charset might not work. + * Mon Mar 04 2024 Sérgio Basto - 0.71-2 - Add upstream patch Fix the --translate-only option From ea6a788c41f1e4254cdc52eb557e37375d36a862 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 9 May 2024 16:14:16 +0100 Subject: [PATCH 27/34] Fix "Malformed encoding" error with newest Perl (https://github.com/mquinson/po4a/issues/494) --- ...abab6413eeae50b5bdde98f2fc3dfbfc7aea.patch | 30 +++++++++++++++++++ po4a.spec | 10 ++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 fe3babab6413eeae50b5bdde98f2fc3dfbfc7aea.patch diff --git a/fe3babab6413eeae50b5bdde98f2fc3dfbfc7aea.patch b/fe3babab6413eeae50b5bdde98f2fc3dfbfc7aea.patch new file mode 100644 index 0000000..bcee302 --- /dev/null +++ b/fe3babab6413eeae50b5bdde98f2fc3dfbfc7aea.patch @@ -0,0 +1,30 @@ +From fe3babab6413eeae50b5bdde98f2fc3dfbfc7aea Mon Sep 17 00:00:00 2001 +From: Martin Quinson +Date: Thu, 9 May 2024 16:58:38 +0200 +Subject: [PATCH] Remove one source of supurious error messages when writing + files + +Fixes https://github.com/mquinson/po4a/issues/494 +--- + lib/Locale/Po4a/TransTractor.pm | 5 +++++ + 2 files changed, 8 insertions(+) + +diff --git a/lib/Locale/Po4a/TransTractor.pm b/lib/Locale/Po4a/TransTractor.pm +index 76b910a6..0d7a5edd 100644 +--- a/lib/Locale/Po4a/TransTractor.pm ++++ b/lib/Locale/Po4a/TransTractor.pm +@@ -511,6 +511,11 @@ sub write { + map { print $fh $_ } $self->docheader(); + eval { + map { print $fh $_ } @{ $self->{TT}{doc_out} }; ++ ++ # we use the "eval {} or do {}" approach to deal with exceptions, cf https://perlmaven.com/fatal-errors-in-external-modules ++ # but we want it to fail only if there is an error. It seems to be some cases where "map" returns false even if there is no error. ++ # Thus this final 1 to evaluate to true in absence of error. ++ 1; + } or do { + my $error = $@ || 'Unknown failure'; + chomp $error; +-- +2.44.0 + diff --git a/po4a.spec b/po4a.spec index 63d3b1b..8da7b84 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.71 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool maintaining translations anywhere # Note: source is imprecise about 2.0-only vs 2.0-or-later @@ -10,6 +10,10 @@ URL: https://po4a.org/ Source0: https://github.com/mquinson/po4a/archive/v%{version}/%{name}-%{version}.tar.gz Patch0: https://github.com/mquinson/po4a/commit/b70d42ae5acf4b7fcc806935d97215b679ed843b.patch +# Fix for https://github.com/mquinson/po4a/issues/494 +# This is upstream, but I had to edit the patch to remove the change +# to "NEWS" since that part did not apply. +Patch1: https://github.com/mquinson/po4a/commit/fe3babab6413eeae50b5bdde98f2fc3dfbfc7aea.patch BuildArch: noarch BuildRequires: /usr/bin/xsltproc @@ -136,6 +140,10 @@ find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' %{_mandir}/*/man7/po4a.7* %changelog +* Thu May 09 2024 Richard W.M. Jones - 0.71-4 +- Fix "Malformed encoding" error with newest Perl + (https://github.com/mquinson/po4a/issues/494) + * Mon Mar 11 2024 Sérgio Basto - 0.71-3 - Disable tests again, randomly they fail with Charset "CHARSET" is not a portable encoding name. Message conversion to user's charset might not work. From 08d210453c25e6b4f70b927478b6d60ad9933ec3 Mon Sep 17 00:00:00 2001 From: Packit Date: Sun, 26 May 2024 07:38:34 +0000 Subject: [PATCH 28/34] Update to 0.72 upstream release - Resolves: rhbz#2267401 Upstream tag: v0.72 Upstream commit: 1698935b Commit authored by Packit automation (https://packit.dev/) --- .gitignore | 1 + README.packit | 2 +- ...42ae5acf4b7fcc806935d97215b679ed843b.patch | 355 ------------------ ...abab6413eeae50b5bdde98f2fc3dfbfc7aea.patch | 30 -- po4a.spec | 12 +- sources | 2 +- 6 files changed, 8 insertions(+), 394 deletions(-) delete mode 100644 b70d42ae5acf4b7fcc806935d97215b679ed843b.patch delete mode 100644 fe3babab6413eeae50b5bdde98f2fc3dfbfc7aea.patch diff --git a/.gitignore b/.gitignore index 8febac3..ccd95b8 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /po4a-0.69.tar.gz /po4a-0.70.tar.gz /po4a-0.71.tar.gz +/po4a-0.72.tar.gz diff --git a/README.packit b/README.packit index 31341b6..97de583 100644 --- a/README.packit +++ b/README.packit @@ -1,3 +1,3 @@ This repository is maintained by packit. https://packit.dev/ -The file was generated using packit 0.93.0. +The file was generated using packit 0.96.0.post1.dev4+gc5b1ea8e. diff --git a/b70d42ae5acf4b7fcc806935d97215b679ed843b.patch b/b70d42ae5acf4b7fcc806935d97215b679ed843b.patch deleted file mode 100644 index 0e4056e..0000000 --- a/b70d42ae5acf4b7fcc806935d97215b679ed843b.patch +++ /dev/null @@ -1,355 +0,0 @@ -From b70d42ae5acf4b7fcc806935d97215b679ed843b Mon Sep 17 00:00:00 2001 -From: Martin Quinson -Date: Fri, 1 Mar 2024 01:10:23 +0100 -Subject: [PATCH] Fix the --translate-only option - -I added a lot of verbose messages to understand what's going on, -rewrote a bit of code I didn't understant but was not recently -modified, and the bug introduced last month was gone. - -At the end, I'm not sure of what happened, but this -fixes https://github.com/mquinson/po4a/issues/482 - -Thanks Alexander for the diagnostic and the reproducer! ---- - NEWS | 3 + - po4a | 78 +++++++++++++++++------- - t/Testhelper.pm | 2 +- - t/add/modifiers/_output | 1 + - t/cfg-multi.t | 22 ++++++- - t/cfg/args-alias-redef/_output | 1 + - t/cfg/args-alias/_output | 1 + - t/cfg/args-alias/_output-keep100 | 1 + - t/cfg/args-global/_output | 1 + - t/cfg/args-global/_output-keep100 | 1 + - t/cfg/args-master/_output | 1 + - t/cfg/args-master/_output-keep100 | 1 + - t/cfg/multiple-fuzzied-noup/_output | 1 + - t/cfg/multiple-nopo/_output-noupdate | 1 + - t/cfg/multiple-uptodate/_output-only-one | 4 ++ - t/cfg/multiple-uptodate/_output-only-two | 5 ++ - t/cfg/single-fuzzied-noup/_output | 1 + - t/cfg/single-nopo/_output-noupdate | 1 + - 18 files changed, 101 insertions(+), 25 deletions(-) - create mode 100644 t/cfg/multiple-uptodate/_output-only-one - create mode 100644 t/cfg/multiple-uptodate/_output-only-two - -diff --git a/po4a b/po4a -index 14222062f..72736013e 100755 ---- a/po4a -+++ b/po4a -@@ -1319,11 +1319,12 @@ while () { - } - if ( scalar @{ $po4a_opts{"partial"} } ) { - foreach my $file ( @{ $po4a_opts{"partial"} } ) { -- if ( grep ( m/(\S+):\Q$file\E\b/, @split_args ) ) { -- $partial{'lang'}{$1} = 1; -- $partial{'master'}{$main} = 1; -- $partial{'files'}{$file} = 1; -- last; -+ foreach my $arg (@split_args) { -+ if ( $arg =~ m/(\S+):\Q$file\E\b/ ) { -+ $partial{'lang'}{$1} = 1; -+ $partial{'master'}{$main} = 1; -+ $partial{'files'}{$file} = 1; -+ } - } - } - } -@@ -1344,7 +1345,7 @@ while () { - $document{$main}{'format'} = $aliases{$1}{"module"}; - if ( defined $aliases{$1}{"options"} ) { - -- # print STDERR "Override the global options with the alias ones\n"; -+ # print STDERR "Override the global options with the alias ones\n"; - %options = %{ $aliases{$1}{"options"} }; # XXX not a merge, but overwrite - } - } -@@ -1440,16 +1441,18 @@ while () { - } - } - } elsif ( $cmd =~ m/po4a_alias: *(.*)/ ) { -- my $name = $1; -+ my $name = $1; - shift @split_args; - -- if ( defined $aliases{$name} ) { # If that alias was previously defined -- die "Alias $name redefined from ".$aliases{$name}{"module"}." to $main\n" -- if ( $aliases{$name}{"module"} ne $main ); # Sanity checks -- # Concat the new content to the existing alias -- @split_args = map { parse_config_options( "$config_file:$nb", $_, \%{ $aliases{$name}{"options"} } ); } @split_args; -- } else { -- # Otherwise, define a new option set accordingly -+ if ( defined $aliases{$name} ) { # If that alias was previously defined -+ die "Alias $name redefined from " . $aliases{$name}{"module"} . " to $main\n" -+ if ( $aliases{$name}{"module"} ne $main ); -+ -+ # Concat the new content to the existing alias after a sanity check -+ @split_args = -+ map { parse_config_options( "$config_file:$nb", $_, \%{ $aliases{$name}{"options"} } ); } @split_args; -+ -+ } else { # Otherwise, define a new option set accordingly - my %alias = (); - $alias{"module"} = $main; - -@@ -1530,13 +1533,33 @@ if ( $pot_filename =~ m/\$master/ ) { - - # Skip documents not specified, strings are read directly from POT file - foreach my $master ( keys %document ) { -- next unless length $master; -- delete $document{$master} unless exists $partial{'master'}{$master}; -+ next unless length $master; -+ if ( exists $partial{'master'}{$master} ) { -+ print wrap_msg( gettext("Document %s kept for update (--translate-only)."), $master ) -+ if ( $po4a_opts{"verbose"} ); -+ } else { -+ print wrap_msg( gettext("Skip the update of %s as requested (--translate-only)."), $master ) -+ if ( $po4a_opts{"verbose"} ); -+ delete $document{$master}; -+ } - } - - # Do not read PO files if no file is processed for this language -- foreach my $lang ( keys %po_filename ) { -- delete $po_filename{$lang} unless exists $partial{'lang'}{$lang}; -+ my $skipped_langs = ""; -+ my $kept_langs = ""; -+ foreach my $lang ( sort keys %po_filename ) { -+ if ( exists $partial{'lang'}{$lang} ) { -+ $kept_langs .= " $lang"; -+ } else { -+ $skipped_langs .= " $lang"; -+ delete $po_filename{$lang}; -+ } -+ } -+ if ( $po4a_opts{"verbose"} ) { -+ $skipped_langs =~ s/^ //; -+ $kept_langs =~ s/^ //; -+ print wrap_msg( gettext("Languages skipped because of --translate-only: %s; kept languages: %s."), -+ $skipped_langs, $kept_langs ); - } - } - -@@ -1654,8 +1677,16 @@ if ($update_pot_file) { - print wrap_msg( gettext(" (%d entries)"), $potfile->count_entries() ) - unless ( $po4a_opts{"quiet"} ); - } else { -- print wrap_msg( gettext("POT file %s already up to date."), $pot_filename ) -- if ( $po4a_opts{"verbose"} and not $po4a_opts{"no-update"} ); -+ if ( $po4a_opts{"no-update"} ) { -+ print wrap_msg( gettext("NOT updating the POT file %s as requested (--no-update)."), $pot_filename ) -+ if ( $po4a_opts{"verbose"} ); -+ } elsif ( scalar @{ $po4a_opts{"partial"} } ) { -+ print wrap_msg( gettext("NOT updating the POT file %s because of --translate-only."), $pot_filename ) -+ if ( $po4a_opts{"verbose"} ); -+ } else { -+ print wrap_msg( gettext("POT file %s already up to date."), $pot_filename ) -+ if ( $po4a_opts{"verbose"} and not $po4a_opts{"no-update"} ); -+ } - } - - my %split_po; # po_files: '$lang','$master' => '$path' -@@ -1930,7 +1961,12 @@ if ( not $po4a_opts{"no-translations"} ) { - next if ( $master eq '' ); - next unless defined $document{$master}{$lang}; - if ( scalar @{ $po4a_opts{"partial"} } ) { -- next unless defined $partial{'files'}{ $document{$master}{$lang} }; -+ unless ( defined $partial{'files'}{ $document{$master}{$lang} } ) { -+ print wrap_msg( gettext("Skip master file %s in language %s because of --translate-only."), -+ $master, $lang ) -+ if ( $po4a_opts{"verbose"} ); -+ next; -+ } - } - - unless ( $po4a_opts{"force"} ) { -diff --git a/t/Testhelper.pm b/t/Testhelper.pm -index 889128a4a..187a3f4fb 100644 ---- a/t/Testhelper.pm -+++ b/t/Testhelper.pm -@@ -270,7 +270,7 @@ sub run_one_po4aconf { - pass("Change directory back to $cwd"); - - my $expected_outfile = $t->{'expected_outfile'} // "$path/_output"; -- unless ( $t->{'diff_outfile'} ) { -+ unless ( -e $expected_outfile ) { - $expected_outfile = "$path/$expected_outfile" - if ( not -e $expected_outfile ) && ( -e "$path/$expected_outfile" ); - unless ( -e $expected_outfile ) { -diff --git a/t/add/modifiers/_output b/t/add/modifiers/_output -index 7a93e0caf..a6fcb4050 100644 ---- a/t/add/modifiers/_output -+++ b/t/add/modifiers/_output -@@ -1,4 +1,5 @@ - NOT creating modifiers.pot as requested (--no-update). -+NOT updating the POT file modifiers.pot as requested (--no-update). - with-1 is 100% translated (2 strings). - without-2 is 100% translated (2 strings). - without-3 is 100% translated (2 strings). -diff --git a/t/cfg-multi.t b/t/cfg-multi.t -index aec9dde00..80fbb56bc 100644 ---- a/t/cfg-multi.t -+++ b/t/cfg-multi.t -@@ -11,9 +11,9 @@ use Testhelper; - - my @tests; - push @tests, { -- 'doc' => 'Multiple languages, no pot no po', -- 'po4a.conf' => 'cfg/multiple-nopotpo/po4a.conf', -- 'closed_path' => 'cfg/*/', # Do not use or modify the other tests -+ 'doc' => 'Multiple languages, no pot no po', -+ 'po4a.conf' => 'cfg/multiple-nopotpo/po4a.conf', -+ 'closed_path' => 'cfg/*/', # Do not use or modify the other tests - 'expected_files' => 'multiple.de.po multiple.es.po multiple.fr.po multiple.it.po multiple.pot', - }, - { -@@ -48,6 +48,22 @@ push @tests, { - . 'multiple.man.de.1 multiple.man.es.1 multiple.man.fr.1 multiple.man.it.1 multiple.pot', - - }, -+ { -+ 'doc' => 'Multiple languages, translation uptodate, translate only one language', -+ 'po4a.conf' => 'cfg/multiple-uptodate/po4a.conf', -+ 'options' => ' --translate-only multiple.man.de.1', -+ 'closed_path' => 'cfg/*/', -+ 'expected_outfile' => 'cfg/multiple-uptodate/_output-only-one', -+ 'expected_files' => 'multiple.man.de.1', -+ }, -+ { -+ 'doc' => 'Multiple languages, translation uptodate, translate only two languages', -+ 'po4a.conf' => 'cfg/multiple-uptodate/po4a.conf', -+ 'options' => ' --translate-only multiple.man.de.1 --translate-only multiple.man.es.1', -+ 'closed_path' => 'cfg/*/', -+ 'expected_outfile' => 'cfg/multiple-uptodate/_output-only-two', -+ 'expected_files' => 'multiple.man.de.1 multiple.man.es.1', -+ }, - { - 'doc' => 'Multiple languages, translation already fuzzy', - 'po4a.conf' => 'cfg/multiple-fuzzy/po4a.conf', -diff --git a/t/cfg/args-alias-redef/_output b/t/cfg/args-alias-redef/_output -index d0467854e..b6bfe9945 100644 ---- a/t/cfg/args-alias-redef/_output -+++ b/t/cfg/args-alias-redef/_output -@@ -1,4 +1,5 @@ - NOT creating args.pot as requested (--no-update). -+NOT updating the POT file args.pot as requested (--no-update). - man.de.1 is 20% translated (1 of 5 strings). - Discard man.es.1 (3 of 5 strings; only 60% translated; need 70%). - man.fr.1 is 80% translated (4 of 5 strings). -diff --git a/t/cfg/args-alias/_output b/t/cfg/args-alias/_output -index 0a88fc814..da4af66dc 100644 ---- a/t/cfg/args-alias/_output -+++ b/t/cfg/args-alias/_output -@@ -1,4 +1,5 @@ - NOT creating args.pot as requested (--no-update). -+NOT updating the POT file args.pot as requested (--no-update). - man.de.1 is 20% translated (1 of 5 strings). - Discard man.de.2 (1 of 5 strings; only 20% translated; need 80%). - Discard man.es.1 (3 of 5 strings; only 60% translated; need 70%). -diff --git a/t/cfg/args-alias/_output-keep100 b/t/cfg/args-alias/_output-keep100 -index ec49800ce..cacbc50f3 100644 ---- a/t/cfg/args-alias/_output-keep100 -+++ b/t/cfg/args-alias/_output-keep100 -@@ -1,4 +1,5 @@ - NOT creating args.pot as requested (--no-update). -+NOT updating the POT file args.pot as requested (--no-update). - Discard man.de.1 (1 of 5 strings; only 20% translated; need 100%). - Discard man.de.2 (1 of 5 strings; only 20% translated; need 100%). - Discard man.es.1 (3 of 5 strings; only 60% translated; need 100%). -diff --git a/t/cfg/args-global/_output b/t/cfg/args-global/_output -index 32a9b921c..b649c4434 100644 ---- a/t/cfg/args-global/_output -+++ b/t/cfg/args-global/_output -@@ -1,4 +1,5 @@ - NOT creating args.pot as requested (--no-update). -+NOT updating the POT file args.pot as requested (--no-update). - man.de.1 is 20% translated (1 of 5 strings). - man.es.1 is 60% translated (3 of 5 strings). - man.fr.1 is 80% translated (4 of 5 strings). -diff --git a/t/cfg/args-global/_output-keep100 b/t/cfg/args-global/_output-keep100 -index c0b91f56c..2b9d1e4a1 100644 ---- a/t/cfg/args-global/_output-keep100 -+++ b/t/cfg/args-global/_output-keep100 -@@ -1,4 +1,5 @@ - NOT creating args.pot as requested (--no-update). -+NOT updating the POT file args.pot as requested (--no-update). - Discard man.de.1 (1 of 5 strings; only 20% translated; need 100%). - Discard man.es.1 (3 of 5 strings; only 60% translated; need 100%). - Discard man.fr.1 (4 of 5 strings; only 80% translated; need 100%). -diff --git a/t/cfg/args-master/_output b/t/cfg/args-master/_output -index 208d3a1c7..db00cb6a9 100644 ---- a/t/cfg/args-master/_output -+++ b/t/cfg/args-master/_output -@@ -1,4 +1,5 @@ - NOT creating args.pot as requested (--no-update). -+NOT updating the POT file args.pot as requested (--no-update). - Discard man.de.1 (1 of 5 strings; only 20% translated; need 22%). - Discard man.es.1 (3 of 5 strings; only 60% translated; need 66%). - man.fr.1 is 80% translated (4 of 5 strings). -diff --git a/t/cfg/args-master/_output-keep100 b/t/cfg/args-master/_output-keep100 -index c0b91f56c..2b9d1e4a1 100644 ---- a/t/cfg/args-master/_output-keep100 -+++ b/t/cfg/args-master/_output-keep100 -@@ -1,4 +1,5 @@ - NOT creating args.pot as requested (--no-update). -+NOT updating the POT file args.pot as requested (--no-update). - Discard man.de.1 (1 of 5 strings; only 20% translated; need 100%). - Discard man.es.1 (3 of 5 strings; only 60% translated; need 100%). - Discard man.fr.1 (4 of 5 strings; only 80% translated; need 100%). -diff --git a/t/cfg/multiple-fuzzied-noup/_output b/t/cfg/multiple-fuzzied-noup/_output -index 9f3763842..a33da7709 100644 ---- a/t/cfg/multiple-fuzzied-noup/_output -+++ b/t/cfg/multiple-fuzzied-noup/_output -@@ -1,4 +1,5 @@ - NOT updating multiple.pot as requested (--no-update). -+NOT updating the POT file multiple.pot as requested (--no-update). - Discard multiple.man.de.1 (3 of 4 strings; only 75% translated; need 80%). - Discard multiple.man.es.1 (3 of 4 strings; only 75% translated; need 80%). - Discard multiple.man.fr.1 (3 of 4 strings; only 75% translated; need 80%). -diff --git a/t/cfg/multiple-nopo/_output-noupdate b/t/cfg/multiple-nopo/_output-noupdate -index bd913a32e..d3cc84a76 100644 ---- a/t/cfg/multiple-nopo/_output-noupdate -+++ b/t/cfg/multiple-nopo/_output-noupdate -@@ -1,4 +1,5 @@ - NOT updating multiple.pot as requested (--no-update). -+NOT updating the POT file multiple.pot as requested (--no-update). - PO file multiple.de.po for language de is missing -- skipping. - PO file multiple.es.po for language es is missing -- skipping. - PO file multiple.fr.po for language fr is missing -- skipping. -diff --git a/t/cfg/multiple-uptodate/_output-only-one b/t/cfg/multiple-uptodate/_output-only-one -new file mode 100644 -index 000000000..50b13626d ---- /dev/null -+++ b/t/cfg/multiple-uptodate/_output-only-one -@@ -0,0 +1,4 @@ -+Document multiple.man.1 kept for update (--translate-only). -+Languages skipped because of --translate-only: es fr it; kept languages: de. -+NOT updating the POT file multiple.pot because of --translate-only. -+multiple.man.de.1 is 100% translated (4 strings). -diff --git a/t/cfg/multiple-uptodate/_output-only-two b/t/cfg/multiple-uptodate/_output-only-two -new file mode 100644 -index 000000000..1c2f2fbdf ---- /dev/null -+++ b/t/cfg/multiple-uptodate/_output-only-two -@@ -0,0 +1,5 @@ -+Document multiple.man.1 kept for update (--translate-only). -+Languages skipped because of --translate-only: fr it; kept languages: de es. -+NOT updating the POT file multiple.pot because of --translate-only. -+multiple.man.de.1 is 100% translated (4 strings). -+multiple.man.es.1 is 100% translated (4 strings). -diff --git a/t/cfg/single-fuzzied-noup/_output b/t/cfg/single-fuzzied-noup/_output -index fde8e19f8..9fb696e0b 100644 ---- a/t/cfg/single-fuzzied-noup/_output -+++ b/t/cfg/single-fuzzied-noup/_output -@@ -1,2 +1,3 @@ - NOT updating single-fuzzied-noup.pot as requested (--no-update). -+NOT updating the POT file single-fuzzied-noup.pot as requested (--no-update). - Discard single-fuzzied-noup.man.fr.1 (3 of 4 strings; only 75% translated; need 80%). -diff --git a/t/cfg/single-nopo/_output-noupdate b/t/cfg/single-nopo/_output-noupdate -index c8d15b4c8..223727166 100644 ---- a/t/cfg/single-nopo/_output-noupdate -+++ b/t/cfg/single-nopo/_output-noupdate -@@ -1,2 +1,3 @@ - NOT updating single.pot as requested (--no-update). -+NOT updating the POT file single.pot as requested (--no-update). - PO file single.fr.po for language fr is missing -- skipping. diff --git a/fe3babab6413eeae50b5bdde98f2fc3dfbfc7aea.patch b/fe3babab6413eeae50b5bdde98f2fc3dfbfc7aea.patch deleted file mode 100644 index bcee302..0000000 --- a/fe3babab6413eeae50b5bdde98f2fc3dfbfc7aea.patch +++ /dev/null @@ -1,30 +0,0 @@ -From fe3babab6413eeae50b5bdde98f2fc3dfbfc7aea Mon Sep 17 00:00:00 2001 -From: Martin Quinson -Date: Thu, 9 May 2024 16:58:38 +0200 -Subject: [PATCH] Remove one source of supurious error messages when writing - files - -Fixes https://github.com/mquinson/po4a/issues/494 ---- - lib/Locale/Po4a/TransTractor.pm | 5 +++++ - 2 files changed, 8 insertions(+) - -diff --git a/lib/Locale/Po4a/TransTractor.pm b/lib/Locale/Po4a/TransTractor.pm -index 76b910a6..0d7a5edd 100644 ---- a/lib/Locale/Po4a/TransTractor.pm -+++ b/lib/Locale/Po4a/TransTractor.pm -@@ -511,6 +511,11 @@ sub write { - map { print $fh $_ } $self->docheader(); - eval { - map { print $fh $_ } @{ $self->{TT}{doc_out} }; -+ -+ # we use the "eval {} or do {}" approach to deal with exceptions, cf https://perlmaven.com/fatal-errors-in-external-modules -+ # but we want it to fail only if there is an error. It seems to be some cases where "map" returns false even if there is no error. -+ # Thus this final 1 to evaluate to true in absence of error. -+ 1; - } or do { - my $error = $@ || 'Unknown failure'; - chomp $error; --- -2.44.0 - diff --git a/po4a.spec b/po4a.spec index 8da7b84..784b1e5 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a -Version: 0.71 -Release: 4%{?dist} +Version: 0.72 +Release: 1%{?dist} Summary: A tool maintaining translations anywhere # Note: source is imprecise about 2.0-only vs 2.0-or-later @@ -9,11 +9,6 @@ License: GPL-2.0-or-later URL: https://po4a.org/ Source0: https://github.com/mquinson/po4a/archive/v%{version}/%{name}-%{version}.tar.gz -Patch0: https://github.com/mquinson/po4a/commit/b70d42ae5acf4b7fcc806935d97215b679ed843b.patch -# Fix for https://github.com/mquinson/po4a/issues/494 -# This is upstream, but I had to edit the patch to remove the change -# to "NEWS" since that part did not apply. -Patch1: https://github.com/mquinson/po4a/commit/fe3babab6413eeae50b5bdde98f2fc3dfbfc7aea.patch BuildArch: noarch BuildRequires: /usr/bin/xsltproc @@ -140,6 +135,9 @@ find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' %{_mandir}/*/man7/po4a.7* %changelog +* Sun May 26 2024 Packit - 0.72-1 +- New release 0.72 + * Thu May 09 2024 Richard W.M. Jones - 0.71-4 - Fix "Malformed encoding" error with newest Perl (https://github.com/mquinson/po4a/issues/494) diff --git a/sources b/sources index 0171301..e977603 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (po4a-0.71.tar.gz) = 5dd19e61d13ade34a4fb3da7eebb26970efb5cc6977147929f5c394c43f1155e52c705b6757e9a3b4d9dd6f2b0499378c10f42315843486cab7d5371402df025 +SHA512 (po4a-0.72.tar.gz) = 3caabd09c3ddd181c25a6ae53c43ab1e2a56b2832fd2b409640ea36e0fb6e470a06d4a20272c431c8aec1f20c8274e997326377687ae79da7e0a3fb9302be4c9 From eb05dc3be9facbdd4a067aee60a3217a56e0e743 Mon Sep 17 00:00:00 2001 From: Packit Date: Mon, 17 Jun 2024 23:47:24 +0000 Subject: [PATCH 29/34] Update to 0.73 upstream release - Resolves: rhbz#2267401 Upstream tag: v0.73 Upstream commit: 87732c78 Commit authored by Packit automation (https://packit.dev/) --- .gitignore | 1 + README.packit | 2 +- po4a.spec | 5 ++++- sources | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ccd95b8..47ceded 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /po4a-0.70.tar.gz /po4a-0.71.tar.gz /po4a-0.72.tar.gz +/po4a-0.73.tar.gz diff --git a/README.packit b/README.packit index 97de583..d2b528d 100644 --- a/README.packit +++ b/README.packit @@ -1,3 +1,3 @@ This repository is maintained by packit. https://packit.dev/ -The file was generated using packit 0.96.0.post1.dev4+gc5b1ea8e. +The file was generated using packit 0.97.1.post1.dev6+gc8c0314a. diff --git a/po4a.spec b/po4a.spec index 784b1e5..f44d470 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,5 +1,5 @@ Name: po4a -Version: 0.72 +Version: 0.73 Release: 1%{?dist} Summary: A tool maintaining translations anywhere @@ -135,6 +135,9 @@ find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' %{_mandir}/*/man7/po4a.7* %changelog +* Mon Jun 17 2024 Packit - 0.73-1 +- New release 0.73 + * Sun May 26 2024 Packit - 0.72-1 - New release 0.72 diff --git a/sources b/sources index e977603..3a15c6c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (po4a-0.72.tar.gz) = 3caabd09c3ddd181c25a6ae53c43ab1e2a56b2832fd2b409640ea36e0fb6e470a06d4a20272c431c8aec1f20c8274e997326377687ae79da7e0a3fb9302be4c9 +SHA512 (po4a-0.73.tar.gz) = 9d26a6ac5f6578a6719d8380ad32e25433a5ca8643bbdd853b0adf4afcb5b84ad2c5f68b5898672bc8d264b7d624fe648b5edc31f08ab18807aa24b55ae972c6 From 2b5ebbb058e22bb883e45ed86450477f8fc7d381 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 08:10:34 +0000 Subject: [PATCH 30/34] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- po4a.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/po4a.spec b/po4a.spec index f44d470..20b50b5 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.73 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool maintaining translations anywhere # Note: source is imprecise about 2.0-only vs 2.0-or-later @@ -135,6 +135,9 @@ find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' %{_mandir}/*/man7/po4a.7* %changelog +* Fri Jul 19 2024 Fedora Release Engineering - 0.73-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Mon Jun 17 2024 Packit - 0.73-1 - New release 0.73 From 0c6db5646e4afd2965098f8c280ac7f021afd828 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 10:28:23 +0000 Subject: [PATCH 31/34] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- po4a.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/po4a.spec b/po4a.spec index 20b50b5..22c99c6 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.73 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool maintaining translations anywhere # Note: source is imprecise about 2.0-only vs 2.0-or-later @@ -135,6 +135,9 @@ find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' %{_mandir}/*/man7/po4a.7* %changelog +* Sat Jan 18 2025 Fedora Release Engineering - 0.73-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Fri Jul 19 2024 Fedora Release Engineering - 0.73-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 5c50f92d7bcb24fbd23e980d36e9017128a98f90 Mon Sep 17 00:00:00 2001 From: "Steven A. Falco" Date: Sat, 12 Jul 2025 14:52:55 -0400 Subject: [PATCH 32/34] Update to 0.74 --- .gitignore | 1 + po4a.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 47ceded..74e651a 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /po4a-0.71.tar.gz /po4a-0.72.tar.gz /po4a-0.73.tar.gz +/po4a-0.74.tar.gz diff --git a/po4a.spec b/po4a.spec index 22c99c6..52673f8 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a -Version: 0.73 -Release: 3%{?dist} +Version: 0.74 +Release: 1%{?dist} Summary: A tool maintaining translations anywhere # Note: source is imprecise about 2.0-only vs 2.0-or-later @@ -135,6 +135,9 @@ find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' %{_mandir}/*/man7/po4a.7* %changelog +* Sat Jul 12 2025 Steven A. Falco - 0.74-1 +- Update to 0.74 + * Sat Jan 18 2025 Fedora Release Engineering - 0.73-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index 3a15c6c..13db246 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (po4a-0.73.tar.gz) = 9d26a6ac5f6578a6719d8380ad32e25433a5ca8643bbdd853b0adf4afcb5b84ad2c5f68b5898672bc8d264b7d624fe648b5edc31f08ab18807aa24b55ae972c6 +SHA512 (po4a-0.74.tar.gz) = 0af7099ea25ac3bc8667c84acf0e0b3c9bbcfd45661dc9befe88b2f3363d6c6c428699ca740a470eaefbe1bf9d55fb218844e0e69104a424fbde71eb240cbdd4 From 819607b95f756f204477379028c981625d3a7086 Mon Sep 17 00:00:00 2001 From: "Steven A. Falco" Date: Wed, 23 Jul 2025 17:01:11 -0400 Subject: [PATCH 33/34] Convert tests from STI to TMT --- .fmf/version | 1 + plans.fmf | 11 +++++++++++ po4a.spec | 5 ++++- tests/basic-test.sh | 6 ++++-- tests/main.fmf | 2 ++ tests/tests.yml | 13 ------------- 6 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 .fmf/version create mode 100644 plans.fmf create mode 100644 tests/main.fmf delete mode 100644 tests/tests.yml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans.fmf b/plans.fmf new file mode 100644 index 0000000..39e69d8 --- /dev/null +++ b/plans.fmf @@ -0,0 +1,11 @@ +summary: Run all smoke tests +discover: + how: fmf +prepare: + how: install + package: + - bash + - coreutils + - grep +execute: + how: tmt diff --git a/po4a.spec b/po4a.spec index 52673f8..980e892 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.74 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool maintaining translations anywhere # Note: source is imprecise about 2.0-only vs 2.0-or-later @@ -135,6 +135,9 @@ find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' %{_mandir}/*/man7/po4a.7* %changelog +* Wed Jul 23 2025 Steven A. Falco - 0.74-2 +- Convert from STI to TMT + * Sat Jul 12 2025 Steven A. Falco - 0.74-1 - Update to 0.74 diff --git a/tests/basic-test.sh b/tests/basic-test.sh index 27d74db..b15af6d 100755 --- a/tests/basic-test.sh +++ b/tests/basic-test.sh @@ -20,13 +20,15 @@ This is the hello world documentation L EOF +cp test.pod local.pod + # Try to compile it into a POT file using po4a-gettextize: po4a-gettextize -f pod -M utf-8 -L utf-8 \ --package-name hello \ --package-version 1.0 \ --msgid-bugs-address noone@example.com \ --copyright-holder "Red Hat Inc." \ - -p output.pot -m test.pod + -p output.pot -m test.pod -l local.pod cat output.pot @@ -36,4 +38,4 @@ grep 'msgid "DESCRIPTION"' output.pot grep 'msgid "This is the hello world documentation"' output.pot # Clean up. -rm output.pot test.pod +rm output.pot test.pod local.pod diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..b2e5e98 --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,2 @@ +summary: Smoke test +test: ./basic-test.sh diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 0462057..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,13 +0,0 @@ -- hosts: localhost - roles: - - role: standard-test-basic - tags: - - classic - required_packages: - - bash - - coreutils - - grep - tests: - - simple: - dir: . - run: ./basic-test.sh From 70368b9e1aff5dc9434f347994eee8ff66eaba07 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 05:58:52 +0000 Subject: [PATCH 34/34] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- po4a.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/po4a.spec b/po4a.spec index 980e892..60be350 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.74 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool maintaining translations anywhere # Note: source is imprecise about 2.0-only vs 2.0-or-later @@ -135,6 +135,9 @@ find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' %{_mandir}/*/man7/po4a.7* %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 0.74-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Wed Jul 23 2025 Steven A. Falco - 0.74-2 - Convert from STI to TMT