From 811ad124b4bbd7be3c441311cf1fcdd67ec5e882 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 09:25:21 +0000 Subject: [PATCH 01/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 18f2284..31e6045 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.19.8.1 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv3+ and LGPLv2+ Group: Development/Tools URL: http://www.gnu.org/software/gettext/ @@ -352,6 +352,9 @@ fi %{_mandir}/man1/msghack.1* %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 0.19.8.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Wed Mar 15 2017 Kalev Lember - 0.19.8.1-9 - Depend on the exact version of the library sub package From 406636f46b5136caf7ca19c53a08e0c061cef210 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 2 Aug 2017 21:06:59 +0000 Subject: [PATCH 02/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 31e6045..3ec7495 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.19.8.1 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv3+ and LGPLv2+ Group: Development/Tools URL: http://www.gnu.org/software/gettext/ @@ -352,6 +352,9 @@ fi %{_mandir}/man1/msghack.1* %changelog +* Wed Aug 02 2017 Fedora Release Engineering - 0.19.8.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 0.19.8.1-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 94b4cda3bcf2c1b4539684ba71ce4548c91e5556 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Fri, 5 Jan 2018 10:19:37 +0100 Subject: [PATCH 03/89] xgettext: fix --its segfault Resolves: rhbz#1531476 Version: 0.19.8.1-12 --- gettext-0.19.8-its-segfault.patch | 43 +++++++++++++++++++++++++++++++ gettext.spec | 8 +++++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 gettext-0.19.8-its-segfault.patch diff --git a/gettext-0.19.8-its-segfault.patch b/gettext-0.19.8-its-segfault.patch new file mode 100644 index 0000000..430719f --- /dev/null +++ b/gettext-0.19.8-its-segfault.patch @@ -0,0 +1,43 @@ +From a0cab23332a254e3500cac2a3a984472d02180e5 Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Fri, 9 Dec 2016 21:04:31 +0100 +Subject: [PATCH] Fix crash of xgettext with --its option. + +* gettext-tools/src/xgettext.c (main): Free contents of its_dirs only when it +was initialized. Fixes bug introduced on 2016-05-16. +--- + gettext-tools/src/xgettext.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c +index f848d76d1..a80ee51ac 100644 +--- a/gettext-tools/src/xgettext.c ++++ b/gettext-tools/src/xgettext.c +@@ -330,7 +330,7 @@ main (int argc, char *argv[]) + bool sort_by_msgid = false; + bool sort_by_filepos = false; + char **dirs; +- char **its_dirs; ++ char **its_dirs = NULL; + char *explicit_its_filename = NULL; + const char *file_name; + const char *files_from = NULL; +@@ -1016,9 +1016,12 @@ warning: file '%s' extension '%s' is unknown; will try C"), filename, extension) + if (its_locating_rules) + locating_rule_list_free (its_locating_rules); + +- for (i = 0; its_dirs[i] != NULL; i++) +- free (its_dirs[i]); +- free (its_dirs); ++ if (its_dirs != NULL) ++ { ++ for (i = 0; its_dirs[i] != NULL; i++) ++ free (its_dirs[i]); ++ free (its_dirs); ++ } + + exit (EXIT_SUCCESS); + } +-- +2.14.3 + diff --git a/gettext.spec b/gettext.spec index 3ec7495..15f0257 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.19.8.1 -Release: 11%{?dist} +Release: 12%{?dist} License: GPLv3+ and LGPLv2+ Group: Development/Tools URL: http://www.gnu.org/software/gettext/ @@ -20,6 +20,9 @@ Patch0: disable-gettext-runtime-test-lock.patch # Upstreamed patch: # http://lists.gnu.org/archive/html/bug-gettext/2016-08/msg00006.html Patch1: gettext-po-send-mail.patch +# Rhbz#1531476, upstream a0cab23332a254e3500cac2a3a984472d02180e5 +Patch2: gettext-0.19.8-its-segfault.patch + Source2: msghack.py Source3: msghack.1 # for bootstrapping @@ -352,6 +355,9 @@ fi %{_mandir}/man1/msghack.1* %changelog +* Fri Jan 05 2018 Pavel Raiskup - 0.19.8.1-12 +- xgettext --its segfault fix (rhbz#1531476) + * Wed Aug 02 2017 Fedora Release Engineering - 0.19.8.1-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 45cef0410e4930dd9e7c835fd204f744beb49b85 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 3 Feb 2018 17:47:26 +0100 Subject: [PATCH 04/89] Switch to %ldconfig_scriptlets Signed-off-by: Igor Gnatenko --- gettext.spec | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/gettext.spec b/gettext.spec index 15f0257..d53c89b 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.19.8.1 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv3+ and LGPLv2+ Group: Development/Tools URL: http://www.gnu.org/software/gettext/ @@ -251,36 +251,23 @@ done make check LIBUNISTRING=-lunistring %endif - %post -/sbin/ldconfig /sbin/install-info %{_infodir}/gettext.info.gz %{_infodir}/dir || : - %preun if [ "$1" = 0 ]; then /sbin/install-info --delete %{_infodir}/gettext.info.gz %{_infodir}/dir || : fi - -%postun -p /sbin/ldconfig - - %post devel -/sbin/ldconfig /sbin/install-info %{_infodir}/autosprintf.info %{_infodir}/dir || : - %preun devel if [ "$1" = 0 ]; then /sbin/install-info --delete %{_infodir}/autosprintf.info %{_infodir}/dir || : fi - -%postun devel -p /sbin/ldconfig - -%post libs -p /sbin/ldconfig -%postun libs -p /sbin/ldconfig +%ldconfig_scriptlets libs %files -f %{name}.lang %doc AUTHORS gettext-runtime/BUGS @@ -355,6 +342,9 @@ fi %{_mandir}/man1/msghack.1* %changelog +* Sat Feb 03 2018 Igor Gnatenko - 0.19.8.1-13 +- Switch to %%ldconfig_scriptlets + * Fri Jan 05 2018 Pavel Raiskup - 0.19.8.1-12 - xgettext --its segfault fix (rhbz#1531476) From 3f0eb2ac035ba6009d8671c5178d964614a7a76a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 7 Feb 2018 11:02:58 +0000 Subject: [PATCH 05/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index d53c89b..3753db8 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.19.8.1 -Release: 13%{?dist} +Release: 14%{?dist} License: GPLv3+ and LGPLv2+ Group: Development/Tools URL: http://www.gnu.org/software/gettext/ @@ -342,6 +342,9 @@ fi %{_mandir}/man1/msghack.1* %changelog +* Wed Feb 07 2018 Fedora Release Engineering - 0.19.8.1-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Sat Feb 03 2018 Igor Gnatenko - 0.19.8.1-13 - Switch to %%ldconfig_scriptlets From 25c66aad7eaee9961e6be62ab464e38a47737877 Mon Sep 17 00:00:00 2001 From: Bruno Goncalves Date: Fri, 27 Oct 2017 10:36:59 +0200 Subject: [PATCH 06/89] Add CI tests using the standard test interface --- tests/tests.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/tests.yml diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..54627ef --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,16 @@ +--- +# Tests run on Atomic, Classic and Container +- hosts: localhost + roles: + - role: standard-test-beakerlib + tags: + - atomic + - classic + - container + repositories: + - repo: "https://src.fedoraproject.org/tests/gettext.git" + dest: "gettext" + tests: + - gettext/gettext-tests + required_packages: + - gettext From fcdd3f123cdb6f0c67312e3eae02b09085a86aac Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 01:23:58 +0000 Subject: [PATCH 07/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 3753db8..dac1199 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.19.8.1 -Release: 14%{?dist} +Release: 15%{?dist} License: GPLv3+ and LGPLv2+ Group: Development/Tools URL: http://www.gnu.org/software/gettext/ @@ -342,6 +342,9 @@ fi %{_mandir}/man1/msghack.1* %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 0.19.8.1-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Wed Feb 07 2018 Fedora Release Engineering - 0.19.8.1-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From b6c84e55be20311a7ddedddb294d5459ea245e26 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 28 Jul 2018 10:24:56 +0200 Subject: [PATCH 08/89] Replace obsolete scriptlets Signed-off-by: Igor Gnatenko --- gettext.spec | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/gettext.spec b/gettext.spec index dac1199..a1cfbde 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.19.8.1 -Release: 15%{?dist} +Release: 16%{?dist} License: GPLv3+ and LGPLv2+ Group: Development/Tools URL: http://www.gnu.org/software/gettext/ @@ -54,8 +54,6 @@ BuildRequires: libxml2-devel BuildRequires: glib2-devel BuildRequires: libcroco-devel BuildRequires: libunistring-devel -Requires(post): info -Requires(preun): info # Depend on the exact version of the library sub package Requires: %{name}-libs%{_isa} = %{version}-%{release} # for F17 UsrMove @@ -251,22 +249,6 @@ done make check LIBUNISTRING=-lunistring %endif -%post -/sbin/install-info %{_infodir}/gettext.info.gz %{_infodir}/dir || : - -%preun -if [ "$1" = 0 ]; then - /sbin/install-info --delete %{_infodir}/gettext.info.gz %{_infodir}/dir || : -fi - -%post devel -/sbin/install-info %{_infodir}/autosprintf.info %{_infodir}/dir || : - -%preun devel -if [ "$1" = 0 ]; then - /sbin/install-info --delete %{_infodir}/autosprintf.info %{_infodir}/dir || : -fi - %ldconfig_scriptlets libs %files -f %{name}.lang @@ -342,6 +324,9 @@ fi %{_mandir}/man1/msghack.1* %changelog +* Sat Jul 28 2018 Igor Gnatenko - 0.19.8.1-16 +- Replace obsolete scriptlets + * Fri Jul 13 2018 Fedora Release Engineering - 0.19.8.1-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 133691605861ea46edad7997bb61f31cf6ce1492 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 31 Jul 2018 11:26:12 +0200 Subject: [PATCH 09/89] Rebuild with fixed binutils --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index a1cfbde..05a8126 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.19.8.1 -Release: 16%{?dist} +Release: 17%{?dist} License: GPLv3+ and LGPLv2+ Group: Development/Tools URL: http://www.gnu.org/software/gettext/ @@ -324,6 +324,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Tue Jul 31 2018 Florian Weimer - 0.19.8.1-17 +- Rebuild with fixed binutils + * Sat Jul 28 2018 Igor Gnatenko - 0.19.8.1-16 - Replace obsolete scriptlets From 7a9956c8deebf90d4b6af9a3656cf3f09727f18a Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Thu, 8 Nov 2018 10:10:48 +0100 Subject: [PATCH 10/89] security: CVE-2018-18751 Resolves: rhbz#1647044 Version: 0.19.8.1-18 --- gettext-0.19.8.1-CVE-2018-18751.patch | 52 +++++++++++++++++++++++++++ gettext.spec | 7 +++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 gettext-0.19.8.1-CVE-2018-18751.patch diff --git a/gettext-0.19.8.1-CVE-2018-18751.patch b/gettext-0.19.8.1-CVE-2018-18751.patch new file mode 100644 index 0000000..72bf510 --- /dev/null +++ b/gettext-0.19.8.1-CVE-2018-18751.patch @@ -0,0 +1,52 @@ +From dce3a16e5e9368245735e29bf498dcd5e3e474a4 Mon Sep 17 00:00:00 2001 +From: Daiki Ueno +Date: Thu, 15 Sep 2016 13:57:24 +0200 +Subject: [PATCH] xgettext: Fix crash with *.po file input + +When xgettext was given two *.po files with the same msgid_plural, it +crashed with double-free. Problem reported by Davlet Panech in: +http://lists.gnu.org/archive/html/bug-gettext/2016-09/msg00001.html + +praiskup: I dropped the testsuite part, otherwise we'd have to +'autoreconf -vif' the sources. + +diff --git a/gettext-tools/src/po-gram-gen.y b/gettext-tools/src/po-gram-gen.y +index becf5e607..4428e7725 100644 +--- a/gettext-tools/src/po-gram-gen.y ++++ b/gettext-tools/src/po-gram-gen.y +@@ -221,14 +221,11 @@ message + check_obsolete ($1, $3); + check_obsolete ($1, $4); + if (!$1.obsolete || pass_obsolete_entries) +- { +- do_callback_message ($1.ctxt, string2, &$1.pos, $3.string, +- $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos, +- $1.prev_ctxt, +- $1.prev_id, $1.prev_id_plural, +- $1.obsolete); +- free ($3.string); +- } ++ do_callback_message ($1.ctxt, string2, &$1.pos, $3.string, ++ $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos, ++ $1.prev_ctxt, ++ $1.prev_id, $1.prev_id_plural, ++ $1.obsolete); + else + { + free_message_intro ($1); +diff --git a/gettext-tools/src/read-catalog.c b/gettext-tools/src/read-catalog.c +index 571d18e1b..6af6d2025 100644 +--- a/gettext-tools/src/read-catalog.c ++++ b/gettext-tools/src/read-catalog.c +@@ -397,6 +397,8 @@ default_add_message (default_catalog_reader_ty *this, + appropriate. */ + mp = message_alloc (msgctxt, msgid, msgid_plural, msgstr, msgstr_len, + msgstr_pos); ++ if (msgid_plural != NULL) ++ free (msgid_plural); + mp->prev_msgctxt = prev_msgctxt; + mp->prev_msgid = prev_msgid; + mp->prev_msgid_plural = prev_msgid_plural; +-- +2.19.1 + diff --git a/gettext.spec b/gettext.spec index 05a8126..74d218c 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.19.8.1 -Release: 17%{?dist} +Release: 18%{?dist} License: GPLv3+ and LGPLv2+ Group: Development/Tools URL: http://www.gnu.org/software/gettext/ @@ -22,6 +22,8 @@ Patch0: disable-gettext-runtime-test-lock.patch Patch1: gettext-po-send-mail.patch # Rhbz#1531476, upstream a0cab23332a254e3500cac2a3a984472d02180e5 Patch2: gettext-0.19.8-its-segfault.patch +# rhbz#1647044 +Patch3: gettext-0.19.8.1-CVE-2018-18751.patch Source2: msghack.py Source3: msghack.1 @@ -324,6 +326,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Nov 08 2018 Pavel Raiskup - 0.19.8.1-18 +- fix CVE-2018-18751 (rhbz#1647044) + * Tue Jul 31 2018 Florian Weimer - 0.19.8.1-17 - Rebuild with fixed binutils From 537c7adbc7ed4471f5d191a2b1f9bef21461c915 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Thu, 8 Nov 2018 10:50:31 +0100 Subject: [PATCH 11/89] patch also generated gettext-tools/src/po-gram-gen.c Complements previous commit. Related: rhbz#1647044 Version: 0.19.8.1-18 --- gettext-0.19.8.1-CVE-2018-18751.patch | 397 +++++++++++++++++++++++++- gettext.spec | 4 +- 2 files changed, 398 insertions(+), 3 deletions(-) diff --git a/gettext-0.19.8.1-CVE-2018-18751.patch b/gettext-0.19.8.1-CVE-2018-18751.patch index 72bf510..a857738 100644 --- a/gettext-0.19.8.1-CVE-2018-18751.patch +++ b/gettext-0.19.8.1-CVE-2018-18751.patch @@ -7,8 +7,10 @@ When xgettext was given two *.po files with the same msgid_plural, it crashed with double-free. Problem reported by Davlet Panech in: http://lists.gnu.org/archive/html/bug-gettext/2016-09/msg00001.html -praiskup: I dropped the testsuite part, otherwise we'd have to -'autoreconf -vif' the sources. +praiskup: +- I dropped the testsuite part, otherwise we'd have to 'autoreconf -vif' the + sources +- I'm patching manually the po-gram-gen.c file to avoid 'bison' BR diff --git a/gettext-tools/src/po-gram-gen.y b/gettext-tools/src/po-gram-gen.y index becf5e607..4428e7725 100644 @@ -47,6 +49,397 @@ index 571d18e1b..6af6d2025 100644 mp->prev_msgctxt = prev_msgctxt; mp->prev_msgid = prev_msgid; mp->prev_msgid_plural = prev_msgid_plural; +diff --git a/gettext-tools/src/po-gram-gen.c b/gettext-tools/src/po-gram-gen.c +--- a/gettext-tools/src/po-gram-gen.c ++++ b/gettext-tools/src/po-gram-gen.c +@@ -1,8 +1,8 @@ +-/* A Bison parser, made by GNU Bison 3.0.4. */ ++/* A Bison parser, made by GNU Bison 3.0.5. */ + + /* Bison implementation for Yacc-like parsers in C + +- Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. ++ Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -44,7 +44,7 @@ + #define YYBISON 1 + + /* Bison version. */ +-#define YYBISON_VERSION "3.0.4" ++#define YYBISON_VERSION "3.0.5" + + /* Skeleton name. */ + #define YYSKELETON_NAME "yacc.c" +@@ -568,9 +568,9 @@ + static const yytype_uint16 yyrline[] = + { + 0, 169, 169, 171, 172, 173, 174, 179, 187, 195, +- 216, 240, 249, 258, 269, 278, 292, 301, 315, 321, +- 332, 338, 350, 361, 372, 376, 391, 414, 422, 434, +- 442 ++ 216, 237, 246, 255, 266, 275, 289, 298, 312, 318, ++ 329, 335, 347, 358, 369, 373, 388, 411, 419, 431, ++ 439 + }; + #endif + +@@ -1054,6 +1054,7 @@ + case N: \ + yyformat = S; \ + break ++ default: /* Avoid compiler warnings. */ + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); +@@ -1370,23 +1371,23 @@ + switch (yyn) + { + case 7: +-#line 180 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 180 "po-gram-gen.y" /* yacc.c:1648 */ + { + po_callback_comment_dispatcher ((yyvsp[0].string).string); + } +-#line 1378 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1379 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 8: +-#line 188 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 188 "po-gram-gen.y" /* yacc.c:1648 */ + { + po_callback_domain ((yyvsp[0].string).string); + } +-#line 1386 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1387 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 9: +-#line 196 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 196 "po-gram-gen.y" /* yacc.c:1648 */ + { + char *string2 = string_list_concat_destroy (&(yyvsp[-2].stringlist).stringlist); + char *string4 = string_list_concat_destroy (&(yyvsp[0].stringlist).stringlist); +@@ -1407,11 +1408,11 @@ + free (string4); + } + } +-#line 1411 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1412 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 10: +-#line 217 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 217 "po-gram-gen.y" /* yacc.c:1648 */ + { + char *string2 = string_list_concat_destroy (&(yyvsp[-2].stringlist).stringlist); + +@@ -1419,14 +1420,11 @@ + check_obsolete ((yyvsp[-3].message_intro), (yyvsp[-1].string)); + check_obsolete ((yyvsp[-3].message_intro), (yyvsp[0].rhs)); + if (!(yyvsp[-3].message_intro).obsolete || pass_obsolete_entries) +- { +- do_callback_message ((yyvsp[-3].message_intro).ctxt, string2, &(yyvsp[-3].message_intro).pos, (yyvsp[-1].string).string, +- (yyvsp[0].rhs).rhs.msgstr, (yyvsp[0].rhs).rhs.msgstr_len, &(yyvsp[0].rhs).pos, +- (yyvsp[-3].message_intro).prev_ctxt, +- (yyvsp[-3].message_intro).prev_id, (yyvsp[-3].message_intro).prev_id_plural, +- (yyvsp[-3].message_intro).obsolete); +- free ((yyvsp[-1].string).string); +- } ++ do_callback_message ((yyvsp[-3].message_intro).ctxt, string2, &(yyvsp[-3].message_intro).pos, (yyvsp[-1].string).string, ++ (yyvsp[0].rhs).rhs.msgstr, (yyvsp[0].rhs).rhs.msgstr_len, &(yyvsp[0].rhs).pos, ++ (yyvsp[-3].message_intro).prev_ctxt, ++ (yyvsp[-3].message_intro).prev_id, (yyvsp[-3].message_intro).prev_id_plural, ++ (yyvsp[-3].message_intro).obsolete); + else + { + free_message_intro ((yyvsp[-3].message_intro)); +@@ -1435,11 +1433,11 @@ + free ((yyvsp[0].rhs).rhs.msgstr); + } + } +-#line 1439 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1437 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 11: +-#line 241 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 238 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-2].message_intro), (yyvsp[-1].stringlist)); + check_obsolete ((yyvsp[-2].message_intro), (yyvsp[0].string)); +@@ -1448,11 +1446,11 @@ + string_list_destroy (&(yyvsp[-1].stringlist).stringlist); + free ((yyvsp[0].string).string); + } +-#line 1452 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1450 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 12: +-#line 250 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 247 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-2].message_intro), (yyvsp[-1].stringlist)); + check_obsolete ((yyvsp[-2].message_intro), (yyvsp[0].rhs)); +@@ -1461,22 +1459,22 @@ + string_list_destroy (&(yyvsp[-1].stringlist).stringlist); + free ((yyvsp[0].rhs).rhs.msgstr); + } +-#line 1465 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1463 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 13: +-#line 259 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 256 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-1].message_intro), (yyvsp[0].stringlist)); + po_gram_error_at_line (&(yyvsp[-1].message_intro).pos, _("missing 'msgstr' section")); + free_message_intro ((yyvsp[-1].message_intro)); + string_list_destroy (&(yyvsp[0].stringlist).stringlist); + } +-#line 1476 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1474 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 14: +-#line 270 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 267 "po-gram-gen.y" /* yacc.c:1648 */ + { + (yyval.message_intro).prev_ctxt = NULL; + (yyval.message_intro).prev_id = NULL; +@@ -1485,11 +1483,11 @@ + (yyval.message_intro).pos = (yyvsp[0].string).pos; + (yyval.message_intro).obsolete = (yyvsp[0].string).obsolete; + } +-#line 1489 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1487 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 15: +-#line 279 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 276 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-1].prev), (yyvsp[0].string)); + (yyval.message_intro).prev_ctxt = (yyvsp[-1].prev).ctxt; +@@ -1499,11 +1497,11 @@ + (yyval.message_intro).pos = (yyvsp[0].string).pos; + (yyval.message_intro).obsolete = (yyvsp[0].string).obsolete; + } +-#line 1503 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1501 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 16: +-#line 293 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 290 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-1].string), (yyvsp[0].stringlist)); + (yyval.prev).ctxt = (yyvsp[-1].string).string; +@@ -1512,11 +1510,11 @@ + (yyval.prev).pos = (yyvsp[-1].string).pos; + (yyval.prev).obsolete = (yyvsp[-1].string).obsolete; + } +-#line 1516 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1514 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 17: +-#line 302 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 299 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-2].string), (yyvsp[-1].stringlist)); + check_obsolete ((yyvsp[-2].string), (yyvsp[0].string)); +@@ -1526,21 +1524,21 @@ + (yyval.prev).pos = (yyvsp[-2].string).pos; + (yyval.prev).obsolete = (yyvsp[-2].string).obsolete; + } +-#line 1530 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1528 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 18: +-#line 316 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 313 "po-gram-gen.y" /* yacc.c:1648 */ + { + (yyval.string).string = NULL; + (yyval.string).pos = (yyvsp[0].pos).pos; + (yyval.string).obsolete = (yyvsp[0].pos).obsolete; + } +-#line 1540 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1538 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 19: +-#line 322 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 319 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-2].pos), (yyvsp[-1].stringlist)); + check_obsolete ((yyvsp[-2].pos), (yyvsp[0].pos)); +@@ -1548,21 +1546,21 @@ + (yyval.string).pos = (yyvsp[0].pos).pos; + (yyval.string).obsolete = (yyvsp[0].pos).obsolete; + } +-#line 1552 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1550 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 20: +-#line 333 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 330 "po-gram-gen.y" /* yacc.c:1648 */ + { + (yyval.string).string = NULL; + (yyval.string).pos = (yyvsp[0].pos).pos; + (yyval.string).obsolete = (yyvsp[0].pos).obsolete; + } +-#line 1562 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1560 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 21: +-#line 339 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 336 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-2].pos), (yyvsp[-1].stringlist)); + check_obsolete ((yyvsp[-2].pos), (yyvsp[0].pos)); +@@ -1570,11 +1568,11 @@ + (yyval.string).pos = (yyvsp[0].pos).pos; + (yyval.string).obsolete = (yyvsp[0].pos).obsolete; + } +-#line 1574 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1572 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 22: +-#line 351 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 348 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-1].pos), (yyvsp[0].stringlist)); + plural_counter = 0; +@@ -1582,30 +1580,30 @@ + (yyval.string).pos = (yyvsp[-1].pos).pos; + (yyval.string).obsolete = (yyvsp[-1].pos).obsolete; + } +-#line 1586 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1584 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 23: +-#line 362 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 359 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-1].pos), (yyvsp[0].stringlist)); + (yyval.string).string = string_list_concat_destroy (&(yyvsp[0].stringlist).stringlist); + (yyval.string).pos = (yyvsp[-1].pos).pos; + (yyval.string).obsolete = (yyvsp[-1].pos).obsolete; + } +-#line 1597 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1595 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 24: +-#line 373 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 370 "po-gram-gen.y" /* yacc.c:1648 */ + { + (yyval.rhs) = (yyvsp[0].rhs); + } +-#line 1605 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1603 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 25: +-#line 377 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 374 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-1].rhs), (yyvsp[0].rhs)); + (yyval.rhs).rhs.msgstr = XNMALLOC ((yyvsp[-1].rhs).rhs.msgstr_len + (yyvsp[0].rhs).rhs.msgstr_len, char); +@@ -1617,11 +1615,11 @@ + (yyval.rhs).pos = (yyvsp[-1].rhs).pos; + (yyval.rhs).obsolete = (yyvsp[-1].rhs).obsolete; + } +-#line 1621 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1619 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 26: +-#line 392 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 389 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-4].pos), (yyvsp[-3].pos)); + check_obsolete ((yyvsp[-4].pos), (yyvsp[-2].number)); +@@ -1640,11 +1638,11 @@ + (yyval.rhs).pos = (yyvsp[-4].pos).pos; + (yyval.rhs).obsolete = (yyvsp[-4].pos).obsolete; + } +-#line 1644 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1642 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 27: +-#line 415 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 412 "po-gram-gen.y" /* yacc.c:1648 */ + { + string_list_init (&(yyval.stringlist).stringlist); + string_list_append (&(yyval.stringlist).stringlist, (yyvsp[0].string).string); +@@ -1652,11 +1650,11 @@ + (yyval.stringlist).pos = (yyvsp[0].string).pos; + (yyval.stringlist).obsolete = (yyvsp[0].string).obsolete; + } +-#line 1656 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1654 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 28: +-#line 423 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 420 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-1].stringlist), (yyvsp[0].string)); + (yyval.stringlist).stringlist = (yyvsp[-1].stringlist).stringlist; +@@ -1665,11 +1663,11 @@ + (yyval.stringlist).pos = (yyvsp[-1].stringlist).pos; + (yyval.stringlist).obsolete = (yyvsp[-1].stringlist).obsolete; + } +-#line 1669 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1667 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 29: +-#line 435 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 432 "po-gram-gen.y" /* yacc.c:1648 */ + { + string_list_init (&(yyval.stringlist).stringlist); + string_list_append (&(yyval.stringlist).stringlist, (yyvsp[0].string).string); +@@ -1677,11 +1675,11 @@ + (yyval.stringlist).pos = (yyvsp[0].string).pos; + (yyval.stringlist).obsolete = (yyvsp[0].string).obsolete; + } +-#line 1681 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1679 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 30: +-#line 443 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 440 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-1].stringlist), (yyvsp[0].string)); + (yyval.stringlist).stringlist = (yyvsp[-1].stringlist).stringlist; +@@ -1690,11 +1688,11 @@ + (yyval.stringlist).pos = (yyvsp[-1].stringlist).pos; + (yyval.stringlist).obsolete = (yyvsp[-1].stringlist).obsolete; + } +-#line 1694 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1692 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + +-#line 1698 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1696 "po-gram-gen.c" /* yacc.c:1648 */ + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires -- 2.19.1 diff --git a/gettext.spec b/gettext.spec index 74d218c..e39cb31 100644 --- a/gettext.spec +++ b/gettext.spec @@ -30,7 +30,9 @@ Source3: msghack.1 # for bootstrapping # BuildRequires: autoconf >= 2.62 # BuildRequires: automake -# BuildRequires: libtool, bison +# BuildRequires: libtool +# BuildRequires: bison + BuildRequires: gcc-c++ %if %{with java} # libintl.jar requires gcj >= 4.3 to build From c0dfab13cf7413d328b1e1bc9bfa5cd3d20146af Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Thu, 8 Nov 2018 11:04:48 +0100 Subject: [PATCH 12/89] man: move gettextize manpage to *-devel Related: rhbz#1611303 Version: 0.19.8.1-18 --- gettext.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gettext.spec b/gettext.spec index e39cb31..7735eff 100644 --- a/gettext.spec +++ b/gettext.spec @@ -267,6 +267,7 @@ make check LIBUNISTRING=-lunistring %exclude %{_bindir}/msghack %{_infodir}/gettext* %exclude %{_mandir}/man1/autopoint.1* +%exclude %{_mandir}/man1/gettextize.1* %exclude %{_mandir}/man1/msghack.1* %{_mandir}/man1/* %{_libdir}/%{name} @@ -299,6 +300,7 @@ make check LIBUNISTRING=-lunistring %{_libdir}/libgettextpo.so %{_libdir}/preloadable_libintl.so %{_mandir}/man1/autopoint.1* +%{_mandir}/man1/gettextize.1* %{_mandir}/man3/* %{_datadir}/%{name}/intl %{_datadir}/%{name}/javaversion.class @@ -330,6 +332,7 @@ make check LIBUNISTRING=-lunistring %changelog * Thu Nov 08 2018 Pavel Raiskup - 0.19.8.1-18 - fix CVE-2018-18751 (rhbz#1647044) +- put gettextize man page into gettext-devel (man page scan, rhbz#1611303) * Tue Jul 31 2018 Florian Weimer - 0.19.8.1-17 - Rebuild with fixed binutils From e3e0ce8d2ee1d24073f4095a2eae86953f63468b Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:45 +0100 Subject: [PATCH 13/89] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- gettext.spec | 5 ----- 1 file changed, 5 deletions(-) diff --git a/gettext.spec b/gettext.spec index 7735eff..a49f69a 100644 --- a/gettext.spec +++ b/gettext.spec @@ -10,7 +10,6 @@ Name: gettext Version: 0.19.8.1 Release: 18%{?dist} License: GPLv3+ and LGPLv2+ -Group: Development/Tools URL: http://www.gnu.org/software/gettext/ Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{tarversion}.tar.xz # Disable the test_lock test as it often hangs on a number of arches @@ -81,7 +80,6 @@ programs. %package common-devel Summary: Common development files for %{name} -Group: Development/Tools # autopoint archive License: GPLv3+ BuildArch: noarch @@ -92,7 +90,6 @@ This package contains common architecture independent gettext development files. %package devel Summary: Development files for %{name} -Group: Development/Tools # autopoint is GPLv3+ # libasprintf is LGPLv2+ # libgettextpo is GPLv3+ @@ -115,7 +112,6 @@ want to add gettext support for your project. %package libs Summary: Libraries for %{name} -Group: System Environment/Libraries # libasprintf is LGPLv2+ # libgettextpo is GPLv3+ License: LGPLv2+ and GPLv3+ @@ -126,7 +122,6 @@ This package contains libraries used internationalization support. %package -n emacs-%{name} Summary: Support for editing po files within GNU Emacs -Group: Applications/Editors BuildArch: noarch # help users find po-mode.el Provides: emacs-po-mode From 1658f67fda2d956a001174c8e0bb16e1a87b06fa Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 31 Jan 2019 20:56:30 +0000 Subject: [PATCH 14/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index a49f69a..74e0767 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.19.8.1 -Release: 18%{?dist} +Release: 19%{?dist} License: GPLv3+ and LGPLv2+ URL: http://www.gnu.org/software/gettext/ Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{tarversion}.tar.xz @@ -325,6 +325,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Jan 31 2019 Fedora Release Engineering - 0.19.8.1-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Thu Nov 08 2018 Pavel Raiskup - 0.19.8.1-18 - fix CVE-2018-18751 (rhbz#1647044) - put gettextize man page into gettext-devel (man page scan, rhbz#1611303) From f20882a98a59534d160162a9ceea8318e996488e Mon Sep 17 00:00:00 2001 From: Tim Landscheidt Date: Thu, 7 Mar 2019 22:47:57 +0000 Subject: [PATCH 15/89] Remove obsolete requirements for %post/%preun scriptlets --- gettext.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gettext.spec b/gettext.spec index 74e0767..afa2243 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.19.8.1 -Release: 19%{?dist} +Release: 20%{?dist} License: GPLv3+ and LGPLv2+ URL: http://www.gnu.org/software/gettext/ Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{tarversion}.tar.xz @@ -97,8 +97,6 @@ License: LGPLv2+ and GPLv3+ Requires: %{name} = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-common-devel = %{version}-%{release} -Requires(post): info -Requires(preun): info Requires: xz Obsoletes: gettext-autopoint < 0.18.1.1-3 Provides: gettext-autopoint = %{version}-%{release} @@ -325,6 +323,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Mar 7 2019 Tim Landscheidt - 0.19.8.1-20 +- Remove obsolete requirements for %%post/%%preun scriptlets + * Thu Jan 31 2019 Fedora Release Engineering - 0.19.8.1-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 7f499dbd3e4e3be4c13f1dd2331f55c98d1037a3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 01:51:52 +0000 Subject: [PATCH 16/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index afa2243..5b1ede0 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.19.8.1 -Release: 20%{?dist} +Release: 21%{?dist} License: GPLv3+ and LGPLv2+ URL: http://www.gnu.org/software/gettext/ Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{tarversion}.tar.xz @@ -323,6 +323,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 0.19.8.1-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Thu Mar 7 2019 Tim Landscheidt - 0.19.8.1-20 - Remove obsolete requirements for %%post/%%preun scriptlets From 2b1ba2ed02436ebf1ea7976a791b8714e18cd3a5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 8 Aug 2019 13:46:07 +0000 Subject: [PATCH 17/89] gettext fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1674958 --- .gitignore | 1 - STAGE2-gettext | 9 - dead.package | 1 + disable-gettext-runtime-test-lock.patch | 47 - gettext-0.19.8-its-segfault.patch | 43 - gettext-0.19.8.1-CVE-2018-18751.patch | 445 ---------- gettext-po-send-mail.patch | 21 - gettext.spec | 1040 ----------------------- msghack.1 | 45 - msghack.py | 417 --------- sources | 1 - tests/tests.yml | 16 - 12 files changed, 1 insertion(+), 2085 deletions(-) delete mode 100644 .gitignore delete mode 100644 STAGE2-gettext create mode 100644 dead.package delete mode 100644 disable-gettext-runtime-test-lock.patch delete mode 100644 gettext-0.19.8-its-segfault.patch delete mode 100644 gettext-0.19.8.1-CVE-2018-18751.patch delete mode 100644 gettext-po-send-mail.patch delete mode 100644 gettext.spec delete mode 100644 msghack.1 delete mode 100755 msghack.py delete mode 100644 sources delete mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 664f03a..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/gettext-0.*.tar.xz diff --git a/STAGE2-gettext b/STAGE2-gettext deleted file mode 100644 index dd61b05..0000000 --- a/STAGE2-gettext +++ /dev/null @@ -1,9 +0,0 @@ -#requires bison -#requires libtool - -mcd $BUILDDIR/gettext - -$SRC/gettext-*/configure $TCONFIGARGS --disable-static --enable-shared --with-pic-=yes --disable-csharp --disable-rpath - -make $J -make $J install diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..f331555 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +gettext fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1674958 diff --git a/disable-gettext-runtime-test-lock.patch b/disable-gettext-runtime-test-lock.patch deleted file mode 100644 index ec3a59b..0000000 --- a/disable-gettext-runtime-test-lock.patch +++ /dev/null @@ -1,47 +0,0 @@ -commit bd2c6ca2b7ae0be02d4bb85db79def454f3153fb -Author: rpm-build -AuthorDate: Wed Dec 21 12:50:54 2016 +0100 -Commit: rpm-build -CommitDate: Wed Dec 21 12:52:36 2016 +0100 - - disable-gettext-runtime-test-lock.patch - -diff --git a/gettext-runtime/tests/Makefile.am b/gettext-runtime/tests/Makefile.am -index 88a0684..3a27b79 100644 ---- a/gettext-runtime/tests/Makefile.am -+++ b/gettext-runtime/tests/Makefile.am -@@ -19,7 +19,7 @@ - AUTOMAKE_OPTIONS = 1.11 gnits no-dependencies color-tests subdir-objects - EXTRA_DIST = - --TESTS = test-lock -+TESTS = - - AM_CPPFLAGS = \ - -I.. \ -diff --git a/gettext-runtime/tests/Makefile.in b/gettext-runtime/tests/Makefile.in -index 4327733..5879146 100644 ---- a/gettext-runtime/tests/Makefile.in -+++ b/gettext-runtime/tests/Makefile.in -@@ -86,7 +86,7 @@ PRE_UNINSTALL = : - POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ --TESTS = test-lock$(EXEEXT) -+TESTS = - check_PROGRAMS = test-lock$(EXEEXT) - subdir = tests - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -diff --git a/gettext-tools/gnulib-tests/Makefile.in b/gettext-tools/gnulib-tests/Makefile.in -index 26becd9..4b9d0e4 100644 ---- a/gettext-tools/gnulib-tests/Makefile.in -+++ b/gettext-tools/gnulib-tests/Makefile.in -@@ -143,7 +143,7 @@ TESTS = test-set-mode-acl.sh test-set-mode-acl-1.sh \ - test-isnanl-nolibm$(EXEEXT) test-isnanl$(EXEEXT) \ - test-iswblank$(EXEEXT) test-langinfo$(EXEEXT) \ - test-linkedhash_list$(EXEEXT) test-locale$(EXEEXT) \ -- test-localename$(EXEEXT) test-lock$(EXEEXT) \ -+ test-localename$(EXEEXT) \ - test-log10$(EXEEXT) test-lseek.sh test-lstat$(EXEEXT) \ - test-malloca$(EXEEXT) test-math$(EXEEXT) test-mbrtowc1.sh \ - test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \ diff --git a/gettext-0.19.8-its-segfault.patch b/gettext-0.19.8-its-segfault.patch deleted file mode 100644 index 430719f..0000000 --- a/gettext-0.19.8-its-segfault.patch +++ /dev/null @@ -1,43 +0,0 @@ -From a0cab23332a254e3500cac2a3a984472d02180e5 Mon Sep 17 00:00:00 2001 -From: Bruno Haible -Date: Fri, 9 Dec 2016 21:04:31 +0100 -Subject: [PATCH] Fix crash of xgettext with --its option. - -* gettext-tools/src/xgettext.c (main): Free contents of its_dirs only when it -was initialized. Fixes bug introduced on 2016-05-16. ---- - gettext-tools/src/xgettext.c | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c -index f848d76d1..a80ee51ac 100644 ---- a/gettext-tools/src/xgettext.c -+++ b/gettext-tools/src/xgettext.c -@@ -330,7 +330,7 @@ main (int argc, char *argv[]) - bool sort_by_msgid = false; - bool sort_by_filepos = false; - char **dirs; -- char **its_dirs; -+ char **its_dirs = NULL; - char *explicit_its_filename = NULL; - const char *file_name; - const char *files_from = NULL; -@@ -1016,9 +1016,12 @@ warning: file '%s' extension '%s' is unknown; will try C"), filename, extension) - if (its_locating_rules) - locating_rule_list_free (its_locating_rules); - -- for (i = 0; its_dirs[i] != NULL; i++) -- free (its_dirs[i]); -- free (its_dirs); -+ if (its_dirs != NULL) -+ { -+ for (i = 0; its_dirs[i] != NULL; i++) -+ free (its_dirs[i]); -+ free (its_dirs); -+ } - - exit (EXIT_SUCCESS); - } --- -2.14.3 - diff --git a/gettext-0.19.8.1-CVE-2018-18751.patch b/gettext-0.19.8.1-CVE-2018-18751.patch deleted file mode 100644 index a857738..0000000 --- a/gettext-0.19.8.1-CVE-2018-18751.patch +++ /dev/null @@ -1,445 +0,0 @@ -From dce3a16e5e9368245735e29bf498dcd5e3e474a4 Mon Sep 17 00:00:00 2001 -From: Daiki Ueno -Date: Thu, 15 Sep 2016 13:57:24 +0200 -Subject: [PATCH] xgettext: Fix crash with *.po file input - -When xgettext was given two *.po files with the same msgid_plural, it -crashed with double-free. Problem reported by Davlet Panech in: -http://lists.gnu.org/archive/html/bug-gettext/2016-09/msg00001.html - -praiskup: -- I dropped the testsuite part, otherwise we'd have to 'autoreconf -vif' the - sources -- I'm patching manually the po-gram-gen.c file to avoid 'bison' BR - -diff --git a/gettext-tools/src/po-gram-gen.y b/gettext-tools/src/po-gram-gen.y -index becf5e607..4428e7725 100644 ---- a/gettext-tools/src/po-gram-gen.y -+++ b/gettext-tools/src/po-gram-gen.y -@@ -221,14 +221,11 @@ message - check_obsolete ($1, $3); - check_obsolete ($1, $4); - if (!$1.obsolete || pass_obsolete_entries) -- { -- do_callback_message ($1.ctxt, string2, &$1.pos, $3.string, -- $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos, -- $1.prev_ctxt, -- $1.prev_id, $1.prev_id_plural, -- $1.obsolete); -- free ($3.string); -- } -+ do_callback_message ($1.ctxt, string2, &$1.pos, $3.string, -+ $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos, -+ $1.prev_ctxt, -+ $1.prev_id, $1.prev_id_plural, -+ $1.obsolete); - else - { - free_message_intro ($1); -diff --git a/gettext-tools/src/read-catalog.c b/gettext-tools/src/read-catalog.c -index 571d18e1b..6af6d2025 100644 ---- a/gettext-tools/src/read-catalog.c -+++ b/gettext-tools/src/read-catalog.c -@@ -397,6 +397,8 @@ default_add_message (default_catalog_reader_ty *this, - appropriate. */ - mp = message_alloc (msgctxt, msgid, msgid_plural, msgstr, msgstr_len, - msgstr_pos); -+ if (msgid_plural != NULL) -+ free (msgid_plural); - mp->prev_msgctxt = prev_msgctxt; - mp->prev_msgid = prev_msgid; - mp->prev_msgid_plural = prev_msgid_plural; -diff --git a/gettext-tools/src/po-gram-gen.c b/gettext-tools/src/po-gram-gen.c ---- a/gettext-tools/src/po-gram-gen.c -+++ b/gettext-tools/src/po-gram-gen.c -@@ -1,8 +1,8 @@ --/* A Bison parser, made by GNU Bison 3.0.4. */ -+/* A Bison parser, made by GNU Bison 3.0.5. */ - - /* Bison implementation for Yacc-like parsers in C - -- Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. -+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by -@@ -44,7 +44,7 @@ - #define YYBISON 1 - - /* Bison version. */ --#define YYBISON_VERSION "3.0.4" -+#define YYBISON_VERSION "3.0.5" - - /* Skeleton name. */ - #define YYSKELETON_NAME "yacc.c" -@@ -568,9 +568,9 @@ - static const yytype_uint16 yyrline[] = - { - 0, 169, 169, 171, 172, 173, 174, 179, 187, 195, -- 216, 240, 249, 258, 269, 278, 292, 301, 315, 321, -- 332, 338, 350, 361, 372, 376, 391, 414, 422, 434, -- 442 -+ 216, 237, 246, 255, 266, 275, 289, 298, 312, 318, -+ 329, 335, 347, 358, 369, 373, 388, 411, 419, 431, -+ 439 - }; - #endif - -@@ -1054,6 +1054,7 @@ - case N: \ - yyformat = S; \ - break -+ default: /* Avoid compiler warnings. */ - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); -@@ -1370,23 +1371,23 @@ - switch (yyn) - { - case 7: --#line 180 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 180 "po-gram-gen.y" /* yacc.c:1648 */ - { - po_callback_comment_dispatcher ((yyvsp[0].string).string); - } --#line 1378 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1379 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 8: --#line 188 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 188 "po-gram-gen.y" /* yacc.c:1648 */ - { - po_callback_domain ((yyvsp[0].string).string); - } --#line 1386 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1387 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 9: --#line 196 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 196 "po-gram-gen.y" /* yacc.c:1648 */ - { - char *string2 = string_list_concat_destroy (&(yyvsp[-2].stringlist).stringlist); - char *string4 = string_list_concat_destroy (&(yyvsp[0].stringlist).stringlist); -@@ -1407,11 +1408,11 @@ - free (string4); - } - } --#line 1411 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1412 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 10: --#line 217 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 217 "po-gram-gen.y" /* yacc.c:1648 */ - { - char *string2 = string_list_concat_destroy (&(yyvsp[-2].stringlist).stringlist); - -@@ -1419,14 +1420,11 @@ - check_obsolete ((yyvsp[-3].message_intro), (yyvsp[-1].string)); - check_obsolete ((yyvsp[-3].message_intro), (yyvsp[0].rhs)); - if (!(yyvsp[-3].message_intro).obsolete || pass_obsolete_entries) -- { -- do_callback_message ((yyvsp[-3].message_intro).ctxt, string2, &(yyvsp[-3].message_intro).pos, (yyvsp[-1].string).string, -- (yyvsp[0].rhs).rhs.msgstr, (yyvsp[0].rhs).rhs.msgstr_len, &(yyvsp[0].rhs).pos, -- (yyvsp[-3].message_intro).prev_ctxt, -- (yyvsp[-3].message_intro).prev_id, (yyvsp[-3].message_intro).prev_id_plural, -- (yyvsp[-3].message_intro).obsolete); -- free ((yyvsp[-1].string).string); -- } -+ do_callback_message ((yyvsp[-3].message_intro).ctxt, string2, &(yyvsp[-3].message_intro).pos, (yyvsp[-1].string).string, -+ (yyvsp[0].rhs).rhs.msgstr, (yyvsp[0].rhs).rhs.msgstr_len, &(yyvsp[0].rhs).pos, -+ (yyvsp[-3].message_intro).prev_ctxt, -+ (yyvsp[-3].message_intro).prev_id, (yyvsp[-3].message_intro).prev_id_plural, -+ (yyvsp[-3].message_intro).obsolete); - else - { - free_message_intro ((yyvsp[-3].message_intro)); -@@ -1435,11 +1433,11 @@ - free ((yyvsp[0].rhs).rhs.msgstr); - } - } --#line 1439 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1437 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 11: --#line 241 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 238 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-2].message_intro), (yyvsp[-1].stringlist)); - check_obsolete ((yyvsp[-2].message_intro), (yyvsp[0].string)); -@@ -1448,11 +1446,11 @@ - string_list_destroy (&(yyvsp[-1].stringlist).stringlist); - free ((yyvsp[0].string).string); - } --#line 1452 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1450 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 12: --#line 250 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 247 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-2].message_intro), (yyvsp[-1].stringlist)); - check_obsolete ((yyvsp[-2].message_intro), (yyvsp[0].rhs)); -@@ -1461,22 +1459,22 @@ - string_list_destroy (&(yyvsp[-1].stringlist).stringlist); - free ((yyvsp[0].rhs).rhs.msgstr); - } --#line 1465 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1463 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 13: --#line 259 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 256 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-1].message_intro), (yyvsp[0].stringlist)); - po_gram_error_at_line (&(yyvsp[-1].message_intro).pos, _("missing 'msgstr' section")); - free_message_intro ((yyvsp[-1].message_intro)); - string_list_destroy (&(yyvsp[0].stringlist).stringlist); - } --#line 1476 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1474 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 14: --#line 270 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 267 "po-gram-gen.y" /* yacc.c:1648 */ - { - (yyval.message_intro).prev_ctxt = NULL; - (yyval.message_intro).prev_id = NULL; -@@ -1485,11 +1483,11 @@ - (yyval.message_intro).pos = (yyvsp[0].string).pos; - (yyval.message_intro).obsolete = (yyvsp[0].string).obsolete; - } --#line 1489 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1487 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 15: --#line 279 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 276 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-1].prev), (yyvsp[0].string)); - (yyval.message_intro).prev_ctxt = (yyvsp[-1].prev).ctxt; -@@ -1499,11 +1497,11 @@ - (yyval.message_intro).pos = (yyvsp[0].string).pos; - (yyval.message_intro).obsolete = (yyvsp[0].string).obsolete; - } --#line 1503 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1501 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 16: --#line 293 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 290 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-1].string), (yyvsp[0].stringlist)); - (yyval.prev).ctxt = (yyvsp[-1].string).string; -@@ -1512,11 +1510,11 @@ - (yyval.prev).pos = (yyvsp[-1].string).pos; - (yyval.prev).obsolete = (yyvsp[-1].string).obsolete; - } --#line 1516 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1514 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 17: --#line 302 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 299 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-2].string), (yyvsp[-1].stringlist)); - check_obsolete ((yyvsp[-2].string), (yyvsp[0].string)); -@@ -1526,21 +1524,21 @@ - (yyval.prev).pos = (yyvsp[-2].string).pos; - (yyval.prev).obsolete = (yyvsp[-2].string).obsolete; - } --#line 1530 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1528 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 18: --#line 316 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 313 "po-gram-gen.y" /* yacc.c:1648 */ - { - (yyval.string).string = NULL; - (yyval.string).pos = (yyvsp[0].pos).pos; - (yyval.string).obsolete = (yyvsp[0].pos).obsolete; - } --#line 1540 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1538 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 19: --#line 322 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 319 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-2].pos), (yyvsp[-1].stringlist)); - check_obsolete ((yyvsp[-2].pos), (yyvsp[0].pos)); -@@ -1548,21 +1546,21 @@ - (yyval.string).pos = (yyvsp[0].pos).pos; - (yyval.string).obsolete = (yyvsp[0].pos).obsolete; - } --#line 1552 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1550 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 20: --#line 333 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 330 "po-gram-gen.y" /* yacc.c:1648 */ - { - (yyval.string).string = NULL; - (yyval.string).pos = (yyvsp[0].pos).pos; - (yyval.string).obsolete = (yyvsp[0].pos).obsolete; - } --#line 1562 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1560 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 21: --#line 339 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 336 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-2].pos), (yyvsp[-1].stringlist)); - check_obsolete ((yyvsp[-2].pos), (yyvsp[0].pos)); -@@ -1570,11 +1568,11 @@ - (yyval.string).pos = (yyvsp[0].pos).pos; - (yyval.string).obsolete = (yyvsp[0].pos).obsolete; - } --#line 1574 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1572 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 22: --#line 351 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 348 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-1].pos), (yyvsp[0].stringlist)); - plural_counter = 0; -@@ -1582,30 +1580,30 @@ - (yyval.string).pos = (yyvsp[-1].pos).pos; - (yyval.string).obsolete = (yyvsp[-1].pos).obsolete; - } --#line 1586 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1584 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 23: --#line 362 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 359 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-1].pos), (yyvsp[0].stringlist)); - (yyval.string).string = string_list_concat_destroy (&(yyvsp[0].stringlist).stringlist); - (yyval.string).pos = (yyvsp[-1].pos).pos; - (yyval.string).obsolete = (yyvsp[-1].pos).obsolete; - } --#line 1597 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1595 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 24: --#line 373 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 370 "po-gram-gen.y" /* yacc.c:1648 */ - { - (yyval.rhs) = (yyvsp[0].rhs); - } --#line 1605 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1603 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 25: --#line 377 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 374 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-1].rhs), (yyvsp[0].rhs)); - (yyval.rhs).rhs.msgstr = XNMALLOC ((yyvsp[-1].rhs).rhs.msgstr_len + (yyvsp[0].rhs).rhs.msgstr_len, char); -@@ -1617,11 +1615,11 @@ - (yyval.rhs).pos = (yyvsp[-1].rhs).pos; - (yyval.rhs).obsolete = (yyvsp[-1].rhs).obsolete; - } --#line 1621 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1619 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 26: --#line 392 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 389 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-4].pos), (yyvsp[-3].pos)); - check_obsolete ((yyvsp[-4].pos), (yyvsp[-2].number)); -@@ -1640,11 +1638,11 @@ - (yyval.rhs).pos = (yyvsp[-4].pos).pos; - (yyval.rhs).obsolete = (yyvsp[-4].pos).obsolete; - } --#line 1644 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1642 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 27: --#line 415 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 412 "po-gram-gen.y" /* yacc.c:1648 */ - { - string_list_init (&(yyval.stringlist).stringlist); - string_list_append (&(yyval.stringlist).stringlist, (yyvsp[0].string).string); -@@ -1652,11 +1650,11 @@ - (yyval.stringlist).pos = (yyvsp[0].string).pos; - (yyval.stringlist).obsolete = (yyvsp[0].string).obsolete; - } --#line 1656 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1654 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 28: --#line 423 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 420 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-1].stringlist), (yyvsp[0].string)); - (yyval.stringlist).stringlist = (yyvsp[-1].stringlist).stringlist; -@@ -1665,11 +1663,11 @@ - (yyval.stringlist).pos = (yyvsp[-1].stringlist).pos; - (yyval.stringlist).obsolete = (yyvsp[-1].stringlist).obsolete; - } --#line 1669 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1667 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 29: --#line 435 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 432 "po-gram-gen.y" /* yacc.c:1648 */ - { - string_list_init (&(yyval.stringlist).stringlist); - string_list_append (&(yyval.stringlist).stringlist, (yyvsp[0].string).string); -@@ -1677,11 +1675,11 @@ - (yyval.stringlist).pos = (yyvsp[0].string).pos; - (yyval.stringlist).obsolete = (yyvsp[0].string).obsolete; - } --#line 1681 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1679 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 30: --#line 443 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 440 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-1].stringlist), (yyvsp[0].string)); - (yyval.stringlist).stringlist = (yyvsp[-1].stringlist).stringlist; -@@ -1690,11 +1688,11 @@ - (yyval.stringlist).pos = (yyvsp[-1].stringlist).pos; - (yyval.stringlist).obsolete = (yyvsp[-1].stringlist).obsolete; - } --#line 1694 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1692 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - --#line 1698 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1696 "po-gram-gen.c" /* yacc.c:1648 */ - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires --- -2.19.1 - diff --git a/gettext-po-send-mail.patch b/gettext-po-send-mail.patch deleted file mode 100644 index 2602e1d..0000000 --- a/gettext-po-send-mail.patch +++ /dev/null @@ -1,21 +0,0 @@ -Index: gettext-0.19.8.1/gettext-tools/misc/po-mode.el -=================================================================== ---- gettext-0.19.8.1.orig/gettext-tools/misc/po-mode.el -+++ gettext-0.19.8.1/gettext-tools/misc/po-mode.el -@@ -3518,10 +3518,12 @@ Write to your team? ('n' if writing to - (re-search-forward - (concat "^" (regexp-quote mail-header-separator) "\n")) - (save-excursion -- (insert-buffer-substring buffer) -- (shell-command-on-region -- (region-beginning) (region-end) -- (concat po-gzip-uuencode-command " " name ".gz") t t)))))) -+ (save-restriction -+ (narrow-to-region (point) (point)) -+ (insert-buffer-substring buffer) -+ (shell-command-on-region -+ (point-min) (point-max) -+ (concat po-gzip-uuencode-command " " name ".gz") t t))))))) - (message "")) - - (defun po-confirm-and-quit () diff --git a/gettext.spec b/gettext.spec deleted file mode 100644 index 5b1ede0..0000000 --- a/gettext.spec +++ /dev/null @@ -1,1040 +0,0 @@ -%bcond_with jar -%bcond_with java -%bcond_without check - -%global tarversion 0.19.8.1 -%global archiveversion 0.19.8 - -Summary: GNU libraries and utilities for producing multi-lingual messages -Name: gettext -Version: 0.19.8.1 -Release: 21%{?dist} -License: GPLv3+ and LGPLv2+ -URL: http://www.gnu.org/software/gettext/ -Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{tarversion}.tar.xz -# Disable the test_lock test as it often hangs on a number of arches -# https://bugzilla.redhat.com/show_bug.cgi?id=1155291 -# http://savannah.gnu.org/bugs/?43487 -Patch0: disable-gettext-runtime-test-lock.patch -# Upstreamed patch: -# http://lists.gnu.org/archive/html/bug-gettext/2016-08/msg00006.html -Patch1: gettext-po-send-mail.patch -# Rhbz#1531476, upstream a0cab23332a254e3500cac2a3a984472d02180e5 -Patch2: gettext-0.19.8-its-segfault.patch -# rhbz#1647044 -Patch3: gettext-0.19.8.1-CVE-2018-18751.patch - -Source2: msghack.py -Source3: msghack.1 -# for bootstrapping -# BuildRequires: autoconf >= 2.62 -# BuildRequires: automake -# BuildRequires: libtool -# BuildRequires: bison - -BuildRequires: gcc-c++ -%if %{with java} -# libintl.jar requires gcj >= 4.3 to build -BuildRequires: gcc-java, libgcj -# For javadoc -BuildRequires: java-1.6.0-openjdk-devel -%if %{with jar} -BuildRequires: %{_bindir}/fastjar -# require zip and unzip for brp-java-repack-jars -BuildRequires: zip, unzip -%endif -%endif -# for po-mode.el -BuildRequires: emacs -# for autosetup -BuildRequires: git -# ensure 'ARCHIVE_FORMAT=dirxz' -BuildRequires: xz -BuildRequires: chrpath -# following suggested by DEPENDENCIES: -BuildRequires: ncurses-devel -BuildRequires: libxml2-devel -BuildRequires: glib2-devel -BuildRequires: libcroco-devel -BuildRequires: libunistring-devel -# Depend on the exact version of the library sub package -Requires: %{name}-libs%{_isa} = %{version}-%{release} -# for F17 UsrMove -Conflicts: filesystem < 3 -Provides: /bin/gettext -# exception for bundled gnulib copylib -Provides: bundled(gnulib) - -%description -The GNU gettext package provides a set of tools and documentation for -producing multi-lingual messages in programs. Tools include a set of -conventions about how programs should be written to support message -catalogs, a directory and file naming organization for the message -catalogs, a runtime library which supports the retrieval of translated -messages, and stand-alone programs for handling the translatable and -the already translated strings. Gettext provides an easy to use -library and tools for creating, using, and modifying natural language -catalogs and is a powerful and simple method for internationalizing -programs. - - -%package common-devel -Summary: Common development files for %{name} -# autopoint archive -License: GPLv3+ -BuildArch: noarch - -%description common-devel -This package contains common architecture independent gettext development files. - - -%package devel -Summary: Development files for %{name} -# autopoint is GPLv3+ -# libasprintf is LGPLv2+ -# libgettextpo is GPLv3+ -License: LGPLv2+ and GPLv3+ -Requires: %{name} = %{version}-%{release} -Requires: %{name}-libs = %{version}-%{release} -Requires: %{name}-common-devel = %{version}-%{release} -Requires: xz -Obsoletes: gettext-autopoint < 0.18.1.1-3 -Provides: gettext-autopoint = %{version}-%{release} - -%description devel -This package contains all development related files necessary for -developing or compiling applications/libraries that needs -internationalization capability. You also need this package if you -want to add gettext support for your project. - - -%package libs -Summary: Libraries for %{name} -# libasprintf is LGPLv2+ -# libgettextpo is GPLv3+ -License: LGPLv2+ and GPLv3+ - -%description libs -This package contains libraries used internationalization support. - - -%package -n emacs-%{name} -Summary: Support for editing po files within GNU Emacs -BuildArch: noarch -# help users find po-mode.el -Provides: emacs-po-mode -Requires: emacs(bin) >= %{_emacs_version} -Provides: emacs-%{name}-el = %{version}-%{release} -Obsoletes: emacs-%{name}-el < %{version}-%{release} - -%description -n emacs-%{name} -This package provides a major mode for editing po files within GNU Emacs. - -%package -n msghack -Summary: Alter PO files in ways -BuildArch: noarch - -%description -n msghack -This program can be used to alter .po files in ways no sane mind would -think about. - - -%prep -%autosetup -n %{name}-%{tarversion} -S git - - -%build -%if %{with java} -export JAVAC=gcj -%if %{with jar} -export JAR=fastjar -%endif -%endif -%ifarch ppc ppc64 ppc64le -# prevent test-isinf from failing with gcc-5.3.1 on ppc64le (#1294016) -export CFLAGS="$RPM_OPT_FLAGS -D__SUPPORT_SNAN__" -%endif -# --disable-rpath doesn't work properly on lib64 -%configure --without-included-gettext --enable-nls --disable-static \ - --enable-shared --with-pic --disable-csharp --disable-rpath \ -%if %{with java} - --enable-java \ -%else - --disable-java --disable-native-java \ -%endif - --with-xz - -make %{?_smp_mflags} %{?with_java:GCJFLAGS="-findirect-dispatch"} - - -%install -make install DESTDIR=${RPM_BUILD_ROOT} INSTALL="%{__install} -p" \ - lispdir=%{_datadir}/emacs/site-lisp/gettext \ - aclocaldir=%{_datadir}/aclocal EXAMPLESFILES="" - - -install -pm 755 %SOURCE2 ${RPM_BUILD_ROOT}/%{_bindir}/msghack -install -pm 644 %SOURCE3 ${RPM_BUILD_ROOT}/%{_mandir}/man1/msghack.1 - - -# make preloadable_libintl.so executable -chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/preloadable_libintl.so - -rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir - -# doc relocations -for i in gettext-runtime/man/*.html; do - rm ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/`basename $i` -done -rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/javadoc* - -rm -rf ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/examples - -rm -rf htmldoc -mkdir htmldoc -mv ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/* ${RPM_BUILD_ROOT}/%{_datadir}/doc/libasprintf/* htmldoc -rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/libasprintf -rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext - -## note libintl.jar does not build with gcj < 4.3 -## since it would not be fully portable -%if %{with jar} -### this is no longer needed since examples not packaged -## set timestamp of examples ChangeLog timestamp for brp-java-repack-jars -#for i in `find ${RPM_BUILD_ROOT} examples -newer ChangeLog -type f -name ChangeLog`; do -# touch -r ChangeLog $i -#done -%else -# in case another java compiler is installed -rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/libintl.jar -%endif - -rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/gettext.jar - -# own this directory for third-party *.its files -mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/its - -# remove .la files -rm ${RPM_BUILD_ROOT}%{_libdir}/lib*.la - -# remove internal .so lib files -rm ${RPM_BUILD_ROOT}%{_libdir}/libgettext{src,lib}.so - -# move po-mode initialization elisp file to the right place, and remove byte -# compiled file -install -d ${RPM_BUILD_ROOT}%{_emacs_sitestartdir} -mv ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.el ${RPM_BUILD_ROOT}%{_emacs_sitestartdir} -rm ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.elc - -%find_lang %{name}-runtime -%find_lang %{name}-tools -cat %{name}-*.lang > %{name}.lang - -# cleanup rpaths -for i in $RPM_BUILD_ROOT%{_bindir}/* `find $RPM_BUILD_ROOT%{_libdir} -type f`; do - if file $i | grep "ELF 64-bit" >/dev/null; then - chrpath -l $i && chrpath --delete $i - fi -done - - -%if %{with check} -%check -# this takes quite a lot of time to run - -# override LIBUNISTRING to prevent reordering of lib objects -make check LIBUNISTRING=-lunistring -%endif - -%ldconfig_scriptlets libs - -%files -f %{name}.lang -%doc AUTHORS gettext-runtime/BUGS -%doc COPYING gettext-tools/misc/DISCLAIM README -%doc NEWS THANKS -%doc gettext-runtime/man/*.1.html -%doc gettext-runtime/intl/COPYING* -%{_bindir}/* -%exclude %{_bindir}/autopoint -%exclude %{_bindir}/gettextize -%exclude %{_bindir}/msghack -%{_infodir}/gettext* -%exclude %{_mandir}/man1/autopoint.1* -%exclude %{_mandir}/man1/gettextize.1* -%exclude %{_mandir}/man1/msghack.1* -%{_mandir}/man1/* -%{_libdir}/%{name} -%if %{with java} -%exclude %{_libdir}/%{name}/gnu.gettext.* -%endif -%dir %{_datadir}/%{name} -%dir %{_datadir}/%{name}/its -%{_datadir}/%{name}/ABOUT-NLS -%{_datadir}/%{name}/po -%{_datadir}/%{name}/styles -%dir %{_datadir}/%{name}-%{archiveversion} -%{_datadir}/%{name}-%{archiveversion}/its - -%files common-devel -%{_datadir}/%{name}/archive.*.tar.xz - -%files devel -%doc gettext-runtime/man/*.3.html ChangeLog -%{_bindir}/autopoint -%{_bindir}/gettextize -%{_datadir}/%{name}/projects/ -%{_datadir}/%{name}/config.rpath -%{_datadir}/%{name}/*.h -%{_datadir}/%{name}/msgunfmt.tcl -%{_datadir}/aclocal/* -%{_includedir}/* -%{_infodir}/autosprintf* -%{_libdir}/libasprintf.so -%{_libdir}/libgettextpo.so -%{_libdir}/preloadable_libintl.so -%{_mandir}/man1/autopoint.1* -%{_mandir}/man1/gettextize.1* -%{_mandir}/man3/* -%{_datadir}/%{name}/intl -%{_datadir}/%{name}/javaversion.class -%doc gettext-runtime/intl-java/javadoc* -%if %{with java} -%{_libdir}/%{name}/gnu.gettext.* -%endif - -%files libs -%{_libdir}/libasprintf.so.0* -%{_libdir}/libgettextpo.so.0* -%{_libdir}/libgettextlib-0.*.so -%{_libdir}/libgettextsrc-0.*.so -%if %{with jar} -%{_datadir}/%{name}/libintl.jar -%endif - -%files -n emacs-%{name} -%dir %{_emacs_sitelispdir}/%{name} -%{_emacs_sitelispdir}/%{name}/*.elc -%{_emacs_sitelispdir}/%{name}/*.el -%{_emacs_sitestartdir}/*.el - -%files -n msghack -%license COPYING -%{_bindir}/msghack -%{_mandir}/man1/msghack.1* - -%changelog -* Thu Jul 25 2019 Fedora Release Engineering - 0.19.8.1-21 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Thu Mar 7 2019 Tim Landscheidt - 0.19.8.1-20 -- Remove obsolete requirements for %%post/%%preun scriptlets - -* Thu Jan 31 2019 Fedora Release Engineering - 0.19.8.1-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Thu Nov 08 2018 Pavel Raiskup - 0.19.8.1-18 -- fix CVE-2018-18751 (rhbz#1647044) -- put gettextize man page into gettext-devel (man page scan, rhbz#1611303) - -* Tue Jul 31 2018 Florian Weimer - 0.19.8.1-17 -- Rebuild with fixed binutils - -* Sat Jul 28 2018 Igor Gnatenko - 0.19.8.1-16 -- Replace obsolete scriptlets - -* Fri Jul 13 2018 Fedora Release Engineering - 0.19.8.1-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Wed Feb 07 2018 Fedora Release Engineering - 0.19.8.1-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Sat Feb 03 2018 Igor Gnatenko - 0.19.8.1-13 -- Switch to %%ldconfig_scriptlets - -* Fri Jan 05 2018 Pavel Raiskup - 0.19.8.1-12 -- xgettext --its segfault fix (rhbz#1531476) - -* Wed Aug 02 2017 Fedora Release Engineering - 0.19.8.1-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 0.19.8.1-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Wed Mar 15 2017 Kalev Lember - 0.19.8.1-9 -- Depend on the exact version of the library sub package - -* Fri Feb 10 2017 Fedora Release Engineering - 0.19.8.1-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Thu Jan 26 2017 Pavel Raiskup - 0.19.8.1-7 -- really remove Requires: git from gettext-devel (rhbz#1161284) -- make the BuildRequires unconditional (rhbz#1416691) - -* Wed Dec 21 2016 Pavel Raiskup - 0.19.8.1-6 -- disable test-lock for 'gettext-tool' subdir too (rhbz#1406031) - -* Mon Dec 19 2016 Miro Hrončok - 0.19.8.1-5 -- Rebuild for Python 3.6 - -* Fri Dec 16 2016 Petr Šabata - 0.19.8.1-4 -- Subpackage msghack so that gettext doesn't depend on python -- name the new sub-package 'msghack' - -* Tue Nov 29 2016 Pavel Raiskup - 0.19.8.1-3 -- devel subpackage to Require 'xz' (rhbz#1399270) - -* Wed Aug 10 2016 Daiki Ueno - 0.19.8.1-2 -- utilize %%autosetup -- apply patch to fix po-send-mail when used with Emacs 25 (#1356642) - -* Sat Jun 11 2016 Daiki Ueno - 0.19.8.1-1 -- update to 0.19.8.1 release - -* Thu Jun 9 2016 Daiki Ueno - 0.19.8-1 -- update to 0.19.8 release - -* Wed Feb 03 2016 Fedora Release Engineering - 0.19.7-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Jan 12 2016 Daiki Ueno - 0.19.7-3 -- own .../gettext/its for third-party *.its files -- add a work around for test-isinf failure on ppc64le (#1297387) - -* Fri Jan 8 2016 Daiki Ueno - 0.19.7-2 -- apply patch to recognize .glade extension for GtkBuilder files (#1296653) - -* Thu Dec 10 2015 Daiki Ueno - 0.19.7-1 -- update to 0.19.7 release - -* Thu Sep 24 2015 Daiki Ueno - 0.19.6-1 -- update to 0.19.6 release - -* Wed Jul 22 2015 Daiki Ueno - 0.19.5.1-2 -- work around version conflict between gettextize and autopoint - -* Thu Jul 16 2015 Daiki Ueno - 0.19.5.1-1 -- update to 0.19.5.1 release - -* Fri Jun 26 2015 Daiki Ueno - 0.19.4-7 -- drop -el subpackage (#1234583) - -* Wed Jun 17 2015 Fedora Release Engineering - 0.19.4-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sat May 02 2015 Kalev Lember - 0.19.4-5 -- Rebuilt for GCC 5 C++11 ABI change - -* Sat Feb 21 2015 Till Maas - 0.19.4-4 -- Rebuilt for Fedora 23 Change - https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code - -* Thu Feb 19 2015 Daiki Ueno - 0.19.4-3 -- port msghack.py to Python 3 (#1192086) - -* Wed Dec 31 2014 Daiki Ueno - 0.19.4-2 -- remove git dependency from -devel subpackage (#1161284) - -* Fri Dec 26 2014 Daiki Ueno - 0.19.4-1 -- update to 0.19.4 release - -* Tue Oct 28 2014 Peter Robinson 0.19.3-2 -- Disable the test_lock test as it often hangs on a number of arches - -* Thu Oct 16 2014 Daiki Ueno - 0.19.3-1 -- update to 0.19.3 release -- remove patches included in 0.19.3 -- remove autoconf/automake/libtool/bison from BR, as we don't do bootstrap - -* Wed Oct 15 2014 Daiki Ueno - 0.19.2-5 -- apply patch to fix infloop in autopoint (Closes: #1151238) -- apply patch to support newer ncurses in F-22 - -* Fri Oct 3 2014 Daiki Ueno - 0.19.2-4 -- apply patch to fix C octal character escape handling (Closes: #1147535) - -* Tue Sep 02 2014 Dennis Gilmore - 0.19.2-3 -- rebuild for libunistring soname bump - -* Sat Aug 16 2014 Fedora Release Engineering - 0.19.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Mon Jul 14 2014 Daiki Ueno - 0.19.2-1 -- update to 0.19.2 release - -* Mon Jul 7 2014 Daiki Ueno - 0.19.1-2 -- apply patch to msghack.py, for Python 3 compatibility (Closes: #1113425, - thanks to Bohuslav "Slavek" Kabrda) - -* Tue Jun 10 2014 Daiki Ueno - 0.19.1-1 -- update to 0.19.1 release -- switch to xz-compressed archive - -* Sat Jun 07 2014 Fedora Release Engineering - 0.19-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Mon Jun 2 2014 Daiki Ueno - 0.19-2 -- apply patch to workaround msgfmt bug that counts warnings as errors - -* Mon Jun 2 2014 Daiki Ueno - 0.19-1 -- update to 0.19 release -- remove upstreamed -Wformat-security patch - -* Tue Jan 7 2014 Daiki Ueno - 0.18.3.2-1 -- update to 0.18.3.2 release -- apply patch to suppress -Wformat-security warnings in gnulib-tests - -* Sun Aug 25 2013 Daiki Ueno - 0.18.3.1-1 -- update to 0.18.3.1 release - -* Sat Aug 03 2013 Fedora Release Engineering - 0.18.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Wed Jul 10 2013 Daiki Ueno - 0.18.3-1 -- update to 0.18.3 release - -* Wed Jun 26 2013 Daiki Ueno - 0.18.2.1-2 -- add a man page for msghack -- fix bogus date in %%changelog - -* Tue Mar 12 2013 Daiki Ueno - 0.18.2.1-1 -- update to 0.18.2.1 release (not really necessary though) - -* Wed Feb 13 2013 Fedora Release Engineering - 0.18.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Wed Dec 26 2012 Daiki Ueno - 0.18.2-1 -- update to 0.18.2 release (based on the spec patch by Jens Petersen) - -* Tue Oct 2 2012 Jens Petersen - 0.18.1.1-17 -- move gettextize to the devel subpackage with its source data files -- update msghack to GPL v3 - -* Fri Jul 27 2012 Jens Petersen - 0.18.1.1-16 -- patch gnulib since glibc and C11 dropped gets - -* Thu Jul 19 2012 Fedora Release Engineering - 0.18.1.1-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Tue May 29 2012 Remi Collet - 0.18.1.1-14 -- add upstream patch from debian to fix xgettext segfault in - remember_a_message_plural (#826138) - -* Thu May 17 2012 Jens Petersen - 0.18.1.1-13 -- base package now provides bundled(gnulib) to make it clear that - gettext is built with bundled gnulib (#821757) - -* Wed Jan 25 2012 Harald Hoyer 0.18.1.1-12 -- add filesystem guard - -* Wed Jan 25 2012 Harald Hoyer 0.18.1.1-11 -- install everything in /usr - https://fedoraproject.org/wiki/Features/UsrMove - -* Tue Jan 10 2012 Nils Philippsen - 0.18.1.1-10 -- rebuild for gcc 4.7 - -* Tue Oct 4 2011 Jens Petersen - 0.18.1.1-9 -- correct the configure --with-pic option syntax (Gilles Espinasse) - -* Wed Sep 28 2011 Jens Petersen - 0.18.1.1-8 -- add gettext-readlink-einval.patch to fix build on kernel >= 2.6.39 (#739188) -- add optional buildrequires suggested in the DEPENDENCIES file - -* Tue Feb 08 2011 Fedora Release Engineering - 0.18.1.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Mon Feb 7 2011 Jens Petersen - 0.18.1.1-6 -- remove internal libgettextlib.so and libgettextsrc.so (#650471) - -* Mon Feb 7 2011 Jens Petersen - 0.18.1.1-5 -- fix license field of gettext-libs since libgettextpo is GPLv3+ (#640158) - -* Thu Sep 9 2010 Jens Petersen - 0.18.1.1-4 -- subpackage archive.git.tar.gz to avoid multilib conflicts (#631733) -- update msghack.py header - -* Mon Aug 23 2010 Jens Petersen - 0.18.1.1-3 -- merge autopoint subpackage into devel to simplify deps (#625325) -- have ABOUT-NLS only in the base package datadir - -* Wed Jun 23 2010 Jens Petersen - 0.18.1.1-2 -- correct license tag from GPLv3 to GPLv3+ -- subpackage autopoint which requires git (#574031) -- no longer require cvs (#606746) -- add bcond for git - -* Fri May 21 2010 Jens Petersen - 0.18.1.1-1 -- update to 0.18.1.1 release (#591044) -- gettext-0.17-autopoint-CVS-441481.patch, gettext-0.17-long-long-int-m4.patch - gettext-0.17-open-args.patch, and - gettext-xgettext-python-unicode-surrogate-473946.patch are upstream -- move libintl.jar to lib subpackage to avoid multilib problems - (reported by Jim Radford in #595922) -- disable java for now -- use chrpath to get us out of rpath hell instead of complicated libtool hacks -- enable git support - -* Fri Apr 23 2010 Jens Petersen - 0.17-17 -- create emacs subpackages for po-mode.el (thanks for patch from - Jonathan Underwood, #579452) -- provide emacs-po-mode -- move libgettextlib and libgettextsrc from base to libs subpackage - (requested by Peter Robinson for blender, #579388) - -* Fri Nov 27 2009 Jens Petersen - 0.17-16 -- fix FTBFS by removing openmp.m4 which conflicts with recent autoconf (#539211) -- cleanup gettext-0.17-rpathFix.patch - - separate gl_AC_TYPE_LONG_LONG replacement to another patch - - use trailing ':' for tests LD_LIBRARY_PATH -- run autogen.sh with --quick and --skip-gnulib - -* Tue Sep 1 2009 Jens Petersen - 0.17-15 -- bring back autopoint requires cvs (#517361) -- requires info rather than /sbin/install-info -- drop install_info and remove_install_info macros - -* Fri Jul 24 2009 Fedora Release Engineering - 0.17-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Jun 24 2009 Jens Petersen - 0.17-13 -- buildrequire automake (#507275) -- run autogen - -* Mon Jun 22 2009 Jens Petersen - 0.17-12 -- move intl/ and po/ to base package for gettextize - (reported by Serge Pavlovsky, #496902) - -* Fri May 22 2009 Jens Petersen - 0.17-11 -- use bcond's for build switches - -* Tue Feb 24 2009 Fedora Release Engineering - 0.17-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Thu Feb 12 2009 Jens Petersen - 0.17-9 -- add buildjava switch to allow turning off the java bits completely -- add buildcheck to allow turning off make check -- drop cvs requires for autopoint (Karl Lattimer, #469555) -- add upstream gettext-xgettext-python-unicode-surrogate-473946.patch by - Bruno Haible to fix xgettext handling of utf16 surrogates in python (#473946) - -* Fri Aug 29 2008 Ding-Yi Chen - 0.17-8 -- Fix the build failure with koji. - -* Fri Aug 29 2008 Ding-Yi Chen - 0.17-7 -- Remove the gettext-libs docs, as they are talking about autoconf, libtool, - which are not directly related to the gettext-libs. -- Remove unused definition and trailing space. -- Fix the build failure with mock . - -* Tue Aug 19 2008 Ding-Yi Chen - 0.17-6 -- Fixed Bug 456666 msghack doesn't check for mandatory cmd line params - by adding checking statements and display usage (msghack.py modified) -- rpath patch for binary-or-shlib-defines-rpath in x86_64. - -* Thu Apr 24 2008 Jens Petersen - 0.17-5 -- fix autopoint messing up CVS files with upstream patch (#441481) - -* Mon Feb 18 2008 Jens Petersen - 0.17-4 -- if %%buildjar is off make sure libintl.jar does not get installed (#433210) - -* Mon Feb 18 2008 Jens Petersen - 0.17-3 -- turn on building of libintl.jar now that we have gcc43 - -* Thu Feb 14 2008 Jens Petersen - 0.17-2 -- rebuild with gcc43 - -* Thu Jan 24 2008 Jens Petersen - 0.17-1 -- update to 0.17 release - - update License field to GPLv3 - - add gettext-0.17-open-args.patch to fix build from upstream - - gettext-tools-tests-lang-gawk-fail.patch, gettext-php-headers.patch, - gettext-php-prinf-output-237241.patch, and - gettext-xglade-define-xml-major-version-285701.patch are no longer needed -- drop superfluous po-mode-init.el source -- no need to run autoconf and autoheader when building -- pass -findirect-dispatch to gcj to make java binaries ABI independent - (jakub,#427796) -- move autopoint, gettextize, and {_datadir}/{name}/ to main package -- force removal of emacs/ so install does not fail when no emacs - -* Fri Sep 21 2007 Jens Petersen - 0.16.1-12 -- add a libs subpackage (suggested by Dwayne Bailey, #294891) -- move preloadable_libintl.so to the devel subpackage - -* Fri Sep 14 2007 Nils Philippsen - 0.16.1-11 -- remove gettext-xglade-include-expat-285701.patch, add - gettext-xglade-define-xml-major-version-285701.patch to determine - XML_MAJOR_VERSION from expat.h and define it in config.h (#285701) - -* Wed Sep 12 2007 Jens Petersen - 0.16.1-10 -- buildrequire expat-devel -- add gettext-xglade-include-expat-285701.patch to include expat.h - to get xgettext to dl the right libexpat (Nils Philippsen, #285701) - -* Thu Aug 16 2007 Jens Petersen -- specify license is GPL and LGPL version 2 or later - -* Wed Aug 1 2007 Jens Petersen - 0.16.1-9 -- fix encoding of msghack script (Dwayne Bailey, #250248) - -* Mon Apr 30 2007 Jens Petersen - 0.16.1-8 -- add gettext-php-prinf-output-237241.patch to workaround php test failure - (#237241) -- add gettext-php-headers.patch to correct php test headers - (Robert Scheck, #232832) - -* Thu Mar 15 2007 Jens Petersen - 0.16.1-7 -- set preloadable_libintl.so executable in %%install so it gets stripped -- force removal of infodir/dir since it is not there when /sbin is not in path - -* Tue Mar 13 2007 Jens Petersen - 0.16.1-6 -- add buildjar switch for building of libintl.jar -- lots of spec file cleanup (Mamoru Tasaka, #225791): -- preserve timestamps of installed files -- disable building of static library -- use %%find_lang for .mo files -- remove examples from -devel package -- do not own en@*quot locale dirs -- set preloadable_libintl.so executable -- add ChangeLog to -devel package -- add %%check to run make check -- add gettext-tools-tests-lang-gawk-fail.patch to work around gawk test failure - -* Fri Feb 23 2007 Karsten Hopp 0.16.1-5 -- rebuild to pick up dependency on libgcj.so.8rh instead libgcj.so.7rh - -* Thu Feb 1 2007 Jens Petersen - 0.16.1-4 -- protect install-info in devel %%post and %%preun too (Ville Skyttä, #223689) -- forward port fix to reset of timestamp of examples ChangeLog for - brp-java-repack-jars libintl.jar multilib conflict (#205207) - -* Mon Jan 22 2007 Jens Petersen - 0.16.1-3 -- protect install-info in %%post and %%preun (Ville Skyttä, #223689) - -* Fri Dec 22 2006 Jens Petersen - 0.16.1-1 -- update to 0.16.1 - -* Mon Nov 27 2006 Jens Petersen - 0.16-2 -- re-enable openmp on ia64 - -* Thu Nov 23 2006 Jens Petersen - 0.16-1 -- update to 0.16 release -- disable openmp on ia64 (#216988) - -* Fri Oct 27 2006 Jens Petersen - 0.15-1 -- update to 0.15 release -- mkinstalldirs and libintl.jar are gone -- javaversion.class added - -* Mon Oct 2 2006 Jens Petersen - 0.14.6-3 -- buildrequire zip and unzip to fix libintl.jar multilib conflict (#205207) - -* Fri Aug 25 2006 Jens Petersen - 0.14.6-2 -- move libgettext*.so devel files to devel package (Patrice Dumas, #203622) - -* Mon Aug 7 2006 Jens Petersen - 0.14.6-1 -- update to 0.14.6 -- include preloadable_libintl.so again (Roozbeh Pournader, #149809) -- remove .la files (Kjartan Maraas, #172624) -- cleanup spec file - -* Tue Jul 25 2006 Thomas Fitzsimmons - 0.14.5-4 -- Bump release number. - -* Wed Jul 12 2006 Jesse Keating - 0.14.5-3.1 -- rebuild - -* Wed Feb 22 2006 Karsten Hopp 0.14.5-3 -- --disable-csharp, otherwise it'll build a dll when mono is - installed in the buildroot. - -* Fri Feb 10 2006 Jesse Keating - 0.14.5-2.2.2 -- bump again for double-long bug on ppc(64) - -* Tue Feb 07 2006 Jesse Keating - 0.14.5-2.2.1 -- rebuilt for new gcc4.1 snapshot and glibc changes - -* Tue Jan 3 2006 Jesse Keating 0.14.5-2.2 -- rebuilt again - -* Fri Dec 09 2005 Jesse Keating -- rebuilt - -* Wed Sep 28 2005 Jindrich Novy 0.14.5-2 -- convert spec to UTF-8 -- remove old tarballs from sources - -* Thu Aug 11 2005 Leon Ho -- updated to 0.14.5 -- Add cvs as Requires for gettext-devel - -* Mon Mar 21 2005 Leon Ho -- updated to 0.14.3 -- fixed compiling problem on gcc4 (#150992) -- fixed Group for -devel (#138303) -- moved gettextize and autopoint to -devel (#137542, #145768) -- moved some of the man pages - -* Tue Mar 01 2005 Jakub Jelinek -- rebuilt with gcc 4.0 - -* Wed Dec 01 2004 Leon Ho -- Add env var to redirect use fastjar instead of jar -- BuildRequires fastjar and libgcj - -* Mon Nov 01 2004 Leon Ho -- fix call on phase0_getc() -- fix temp file issue (#136323 - CAN-2004-0966 - mjc) - -* Sun Oct 03 2004 Leon Ho -- fixed typo on %%preun on -devel - -* Fri Oct 01 2004 Leon Ho -- fix install_info -- add gcc-java build requirement - -* Mon Sep 13 2004 Leon Ho -- move java stuff to gettext-devel (#132239) -- add BuildRequires: gcc-c++ (#132518) -- add some missing install-info and ldconfig (#131272) -- fix dir ownership (#133696) -- run autotools for 1.9 - -* Tue Jun 15 2004 Elliot Lee -- rebuilt - -* Tue Jun 08 2004 Leon Ho -- use --without-included-gettext to avoid the need of libintl.so (#125497) -- remove preloadable_libintl.so - -* Sun Jun 06 2004 Leon Ho -- moved some of the shared lib to main pkg -- added more build requires - -* Thu Jun 03 2004 Leon Ho -- add conditionals for patch and requires auto* (#125216) - -* Wed Jun 02 2004 Leon Ho -- packaged lib files for devel -- moved some of the files to different sub-pkg -- fix problem on x86_64 build - -* Tue Mar 02 2004 Elliot Lee -- rebuilt - -* Fri Feb 13 2004 Elliot Lee -- rebuilt - -* Mon Feb 02 2004 Leon Ho -- rebuilt to 0.14.1 - -* Fri Sep 19 2003 Leon Ho -- rebuilt 0.12.1 -- fix including files and excludes some patches - -* Wed Jun 04 2003 Elliot Lee -- rebuilt - -* Wed May 14 2003 Leon Ho -- 0.11.5 - -* Wed Jan 22 2003 Tim Powers -- rebuilt - -* Thu Jan 16 2003 Leon Ho 0.11.4-6 -- add online help for msghack replacement - -* Thu Dec 5 2002 Leon Ho 0.11.4-5 -- add patch to fix gettextize (#78720) - -* Wed Nov 27 2002 Tim Powers 0.11.4-4 -- remove unpackaged files from the buildroot - -* Wed Aug 28 2002 Trond Eivind Glomsrød 0.11.4-3 -- Use %%{_libdir} instead of /usr/lib (#72524) - -* Fri Aug 2 2002 Nalin Dahyabhai 0.11.4-2 -- install ulonglong.m4, which is required by uintmax_t.m4, which is already - being installed - -* Sun Jul 28 2002 Trond Eivind Glomsrød 0.11.4-1 -- 0.11.4 - -* Fri Jun 21 2002 Tim Powers -- automated rebuild - -* Thu May 23 2002 Tim Powers -- automated rebuild - -* Tue May 14 2002 Trond Eivind Glomsrød 0.11.2-1 -- 0.11.2 -- include some new files - -* Fri Apr 5 2002 Trond Eivind Glomsrød 0.11.1-2 -- Add patch to make it compile with C99 compilers (#62313) - -* Wed Mar 13 2002 Trond Eivind Glomsrød 0.11.1-1 -- 0.11.1 - -* Sun Feb 17 2002 Florian La Roche -- update gettext to 0.11 -- disable patch4 - -* Wed Jan 09 2002 Tim Powers -- automated rebuild - -* Wed Dec 5 2001 Trond Eivind Glomsrød 0.10.40-3 -- improve automake handling - -* Wed Nov 14 2001 Trond Eivind Glomsrød 0.10.40-2 -- Add URL -- Add automake workaround (#56081) - -* Sun Sep 16 2001 Trond Eivind Glomsrød 0.10.40-1 -- 0.10.40 - libintl is now LGPLed (it was GPLed). Note that RHL - uses the glibc version, and don't include libintl from gettext. -- include new man pages -- don't include the elisp mode - bundle it into the main emacs package, - like we do for XEmacs. -- README-alpha no longer exists, so don't list it as a doc file - -* Fri Aug 24 2001 Trond Eivind Glomsrød 0.10.38-7 -- Rebuild - this should fix #52463 - -* Wed Aug 22 2001 Trond Eivind Glomsrød 0.10.38-6 -- Fix handling of multiline entries (rest of #50065) -- don't use the references of the last entry in a po file -- remove duplicates when inverting -- Own the en@quot and en@boldquot locale dirs (#52164) -- Handle entries with a first line of "" as identical to those - without - -* Thu Aug 9 2001 Trond Eivind Glomsrød -- Added "--append" and "-o" to msghack, which should address - initial concerns in #50065 - -* Thu Jul 19 2001 Trond Eivind Glomsrød -- New msghack - from scratch, in python - -* Tue Jul 17 2001 Trond Eivind Glomsrød -- msghack is back - -* Mon Jun 4 2001 Trond Eivind Glomsrød -- Include some docfiles - -* Sun Jun 03 2001 Florian La Roche -- 0.10.38 -- do not include charset.alias - -* Wed May 2 2001 Nalin Dahyabhai -- Build statically. - -* Mon Apr 30 2001 Trond Eivind Glomsrød -- 0.10.37 -- Disable all but two patches - -* Sun Feb 25 2001 Trond Eivind Glomsrød -- Initialize proper fonts when entering po-mode (#29152) - -* Mon Feb 12 2001 Yukihiro Nakai -- More fix about msgmerge. - -* Mon Feb 12 2001 Yukihiro Nakai -- Fix for msgmerge not to break multibyte strings - at Japanese locale. - -* Wed Jan 24 2001 Matt Wilson -- fixed the %%lang generator to not have "./" in the lang - -* Sun Jan 14 2001 Trond Eivind Glomsrød -- add an init file for the emacs po-mode -- update source URL - -* Thu Jan 11 2001 Bill Nottingham -- put gettext in /bin for initscripts use -- %%langify - -* Fri Dec 29 2000 Bill Nottingham -- prereq /sbin/install-info - -* Wed Aug 23 2000 Trond Eivind Glomsrød -- Added patch from Ulrich Drepper - -* Fri Aug 04 2000 Trond Eivind Glomsrød -- update DESTDIR patch (#12072) - -* Thu Jul 13 2000 Prospector -- automatic rebuild - -* Mon Jul 10 2000 Trond Eivind Glomsrød -- fix problems wrt to DESTDIR (#12072) - -* Thu Jun 22 2000 Preston Brown -- use FHS paths -- add buildroot patch for .../intl/Makefile.in, was using abs. install path - -* Fri Apr 28 2000 Bill Nottingham -- minor configure tweaks for ia64 - -* Sun Feb 27 2000 Cristian Gafton -- add --comments to msghack - -* Thu Feb 10 2000 Cristian Gafton -- fix bug #9240 - gettextize has the right aclocal patch - -* Wed Jan 12 2000 Cristian Gafton -- add the --diff and --dummy options - -* Wed Oct 06 1999 Cristian Gafton -- add the --missing option to msghack - -* Wed Sep 22 1999 Cristian Gafton -- updated msghack not to merge in fuzzies in the master catalogs - -* Thu Aug 26 1999 Cristian Gafton -- updated msghack to understand --append - -* Wed Aug 11 1999 Cristian Gafton -- updated msghack to correctly deal with sorting files - -* Thu May 06 1999 Cristian Gafton -- msghack updates - -* Sun Mar 21 1999 Cristian Gafton -- auto rebuild in the new build environment (release 8) - -* Mon Mar 08 1999 Cristian Gafton -- added patch for misc hacks to facilitate rpm translations - -* Thu Dec 03 1998 Cristian Gafton -- patch to allow to build on ARM - -* Wed Sep 30 1998 Jeff Johnson -- add Emacs po-mode.el files. - -* Sun Sep 13 1998 Cristian Gafton -- include the aclocal support files - -* Thu Sep 3 1998 Bill Nottingham -- remove devel package (functionality is in glibc) - -* Tue Sep 1 1998 Jeff Johnson -- update to 0.10.35. - -* Mon Jun 29 1998 Jeff Johnson -- add gettextize. -- create devel package for libintl.a and libgettext.h. - -* Mon Apr 27 1998 Prospector System -- translations modified for de, fr, tr - -* Sun Nov 02 1997 Cristian Gafton -- added info handling -- added misc-patch (skip emacs-lisp modofications) - -* Sat Nov 01 1997 Erik Troan -- removed locale.aliases as we get it from glibc now -- uses a buildroot - -* Mon Jun 02 1997 Erik Troan -- Built against glibc diff --git a/msghack.1 b/msghack.1 deleted file mode 100644 index 42fcc5b..0000000 --- a/msghack.1 +++ /dev/null @@ -1,45 +0,0 @@ -.TH MSGHACK "1" "June 2013" "msghack" "User Commands" -.SH NAME -msghack \- alter PO files in ways -.SH SYNOPSIS -.B msghack -[\fIOPTION\fR] \fIfile.po \fR[\fIref.po\fR] -.SH DESCRIPTION -.PP -This program can be used to alter .po files in ways no sane mind would think about. -.TP -\fB\-o\fR -result will be written to FILE -.TP -\fB\-\-invert\fR -invert a po file by switching msgid and msgstr -.TP -\fB\-\-master\fR -join any number of files in a master\-formatted catalog -.TP -\fB\-\-empty\fR -empty the contents of the .po file, creating a .pot -.TP -\fB\-\-append\fR -append entries from ref.po that don't exist in file.po -.PP -Note: It is just a replacement of msghack for backward support. -.PP -This program can be used to alter .po files in ways no sane mind would think about. -.TP -\fB\-o\fR -result will be written to FILE -.TP -\fB\-\-invert\fR -invert a po file by switching msgid and msgstr -.TP -\fB\-\-master\fR -join any number of files in a master\-formatted catalog -.TP -\fB\-\-empty\fR -empty the contents of the .po file, creating a .pot -.TP -\fB\-\-append\fR -append entries from ref.po that don't exist in file.po -.PP -Note: It is just a replacement of msghack for backward support. diff --git a/msghack.py b/msghack.py deleted file mode 100755 index 358552c..0000000 --- a/msghack.py +++ /dev/null @@ -1,417 +0,0 @@ -#!/usr/bin/python3 -## -*- coding: utf-8 -*- -## Copyright (C) 2001, 2004, 2008, 2012 Red Hat, Inc. -## Copyright (C) 2001 Trond Eivind Glomsrød - -## This program is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. - -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. - -## You should have received a copy of the GNU General Public License -## along with this program. If not, see . - -""" -A msghack replacement -""" - -import sys - -class GTMessage: - """ - A class containing a message, its msgid and various references pointing at it - """ - - def __init__(self,id=None,message=None,refs=[]): - """ - The constructor for the GTMessage class - @self The object instance - @message The message - @id The messageid associated with the object - """ - self._message=message.strip() - self._id=id.strip() - self._refs=[] - for ref in refs: - self._refs.append(ref) - - def __str__(self): - """ - Return a string representation of the object - @self The object instance - """ - res="" - for ref in self._refs: - res=res+ref+"\n" - res=res+"msgid %s\nmsgstr %s\n" % (self._id,self._message) - return res - - def invertedStrings(self): - """ - Returns a string representation, but with msgid and msgstr inverted. - Note: Don't invert the "" string - @self The object instance - """ - res="" - for ref in self._refs: - res=res+ref+"\n" - if not self._id=="\"\"": - res=res+"msgid %s\nmsgstr %s\n" % (self._message,self._id) - else: - res=res+"msgid %s\nmsgstr %s\n" % (self._id,self._message) - return res - - def emptyMsgStrings(self): - """ - Return a string representation of the object, but leave the msgstr - empty - create a pot file from a po file - Note: Won't remove the "" string - @self The object instance - """ - res="" - for ref in self._refs: - res=res+ref+"\n" - if not self._id=="\"\"": - res=res+"msgid %s\nmsgstr \"\"\n" % (self._id) - else: - res=res+"msgid %s\nmsgstr %s\n" % (self._id,self._message) - return res - - def compareMessage(self,msg): - """ - Return if the messages have identical msgids, 0 otherwise - @self The object instance - @msg The message to compare to - """ - - if self._id == msg._id: - return 1 - return 0 - - -class GTMasterMessage: - """ - A class containing a message, its msgid and various references pointing at it - The difference between GTMessage and GTMasterMessage is that this class - can do less operations, but is able to store multiple msgstrs with identifiers - (usually language, like 'msgst(no)' - """ - - def __init__(self,id=None,refs=[]): - """ - The constructor for the GTMessage class - @self The object instance - @id The messageid associated with the object - """ - self._id=id - self._refs=[] - self._messages=[] - for ref in refs: - self._refs.append(ref) - - def addMessage(self,message,identifier): - """ - Add a new message and identifier to the GTMasterMessage object - @self The object instance - @message The message to append - @identifier The identifier of the message - """ - self._messages.append((identifier,message)) - - def __str__(self): - """ - Return a string representation of the object - @self The object instance - """ - res="" - for ref in self._refs: - res=res+ref+"\n" - res=res+"msgid %s\n" % self._id - for message in self._messages: - res=res+"msgstr(%s) %s\n" %(message[0],message[1]) - res=res+"\n" - return res - -class GTFile: - """ - A class containing the GTMessages contained in a file - """ - - def __init__(self,filename): - """ - The constructor of the GTMFile class - @self The object instance - @filename The file to initialize from - """ - self._filename=filename - self._messages=[] - self.readFile(filename) - - def __str__(self): - """ - Return a string representation of the object - @self The object instance - """ - res="" - for message in self._messages: - res=res+str(message)+"\n" - return res - - def invertedStrings(self): - """ - Return a string representation of the object, with msgid and msgstr - swapped. Will remove duplicates... - @self The object instance - """ - - msght={} - msgar=[] - - for message in self._messages: - if message._id=='""' and len(msgar)==0: - msgar.append(GTMessage(message._id,message._message,message._refs)) - continue - msg=GTMessage(message._message,message._id,message._refs) - if msg._id not in msght: - msght[msg._id]=msg - msgar.append(msg) - else: - msg2=msght[msg._id] - for ref in msg._refs: - msg2._refs.append(ref) - res="" - for message in msgar: - res=res+str(message)+"\n" - return res - - def msgidDupes(self): - """ - Search for duplicates in the msgids. - @self The object instance - """ - msgids={} - res="" - for message in self._messages: - msgid=message._id - if msgid in msgids: - res=res+"Duplicate: %s\n" % (msgid) - else: - msgids[msgid]=1 - return res - - def getMsgstr(self,msgid): - """ - Return the msgstr matching the given id. 'None' if missing - @self The object instance - @msgid The msgid key - """ - - for message in self._messages: - if msgid == message._id: - return message._message - return None - - def emptyMsgStrings(self): - """ - Return a string representation of the object, but leave the msgstr - empty - create a pot file from a po file - @self The object instance - """ - - res="" - for message in self._messages: - res=res+message.emptyMsgStrings()+"\n" - return res - - - def append(self,B): - """ - Append entries from dictionary B which aren't - already present in this dictionary - @self The object instance - @B the dictionary to append messages from - """ - - for message in B._messages: - if not self.getMsgstr(message._id): - self._messages.append(message) - - - def readFile(self,filename): - """ - Read the contents of a file into the GTFile object - @self The object instance - @filename The name of the file to read - """ - - file=open(filename,"r") - msgid="" - msgstr="" - refs=[] - lines=[] - inmsgid=0 - inmsgstr=0 - templines=file.readlines() - for line in templines: - lines.append(line.strip()) - for line in lines: - pos=line.find('"') - pos2=line.rfind('"') - if line and line[0]=="#": - refs.append(line.strip()) - if inmsgstr==0 and line[:6]=="msgstr": - msgstr="" - inmsgstr=1 - inmsgid=0 - if inmsgstr==1: - if pos==-1: - inmsgstr=0 - #Handle entries with and without "" consistently - if msgid[:2]=='""' and len(msgid)>4: - msgid=msgid[2:] - if msgstr[:2]=='""' and len(msgstr)>4: - msgstr=msgstr[2:] - message=GTMessage(msgid,msgstr,refs) - self._messages.append(message) - msgstr="" - msgid="" - refs=[] - else: - msgstr=msgstr+line[pos:pos2+1]+"\n" - if inmsgid==0 and line[:5]=="msgid": - msgid="" - inmsgid=1 - if inmsgid==1: - if pos==-1: - inmsgid=0 - else: - msgid=msgid+line[pos:pos2+1]+"\n" - if msgstr and msgid: - message=GTMessage(msgid,msgstr,refs) - self._messages.append(message) - - -class GTMaster: - """ - A class containing a master catalogue of gettext dictionaries - """ - - def __init__(self,dicts): - """ - The constructor for the GTMaster class - @self The object instance - @dicts An array of dictionaries to merge - """ - self._messages=[] - self.createMaster(dicts) - - def createMaster(self,dicts): - """ - Create the master catalogue - @self The object instance - @dicts An array of dictionaries to merge - """ - - self._master=dicts[0] - self._dicts=dicts[1:] - - for message in self._master._messages: - gtm=GTMasterMessage(message._id,message._refs) - gtm.addMessage(message._message,self._master._filename[:-3]) - for dict in self._dicts: - res=dict.getMsgstr(message._id) - if(res): - gtm.addMessage(res,dict._filename[:-3]) - self._messages.append(gtm) - - def __str__(self): - """ - Return a string representation of the object - @self The object instance - """ - res="" - for message in self._messages: - res=res+str(message)+"\n" - return res - -def printUsage(): - "Print the usage messages" - print("Usage: " + str(sys.argv[0]) + " [OPTION] file.po [ref.po]\n\ -This program can be used to alter .po files in ways no sane mind would think about.\n\ - -o result will be written to FILE\n\ - --invert invert a po file by switching msgid and msgstr\n\ - --master join any number of files in a master-formatted catalog\n\ - --empty empty the contents of the .po file, creating a .pot\n\ - --append append entries from ref.po that don't exist in file.po\n\ -\n\ -Note: It is just a replacement of msghack for backward support.\n") - - -if __name__=="__main__": - output=None - res=None - if("-o") in sys.argv: - if (len(sys.argv)<=sys.argv.index("-o")+1): - print("file.po and ref.po are not specified!\n") - printUsage() - exit(1) - output=sys.argv[sys.argv.index("-o")+1] - sys.argv.remove("-o") - sys.argv.remove(output) - if("--invert") in sys.argv: - if (len(sys.argv)<=sys.argv.index("--invert")+1): - print("file.po is not specified!\n") - printUsage() - exit(1) - file=sys.argv[sys.argv.index("--invert")+1] - gtf=GTFile(file) - res1=gtf.msgidDupes() - if res1: - sys.stderr.write(res1) - sys.exit(1) - res=str(gtf.invertedStrings()) - elif("--empty") in sys.argv: - if (len(sys.argv)<=sys.argv.index("--empty")+1): - print("file.po is not specified!\n") - printUsage() - exit(1) - file=sys.argv[sys.argv.index("--empty")+1] - gtf=GTFile(file) - res=str(gtf.emptyMsgStrings()) - elif("--master") in sys.argv: - if (len(sys.argv)<=sys.argv.index("--master")+1): - print("file.po is not specified!\n") - printUsage() - exit(1) - loc=sys.argv.index("--master")+1 - gtfs=[] - for file in sys.argv[loc:]: - gtfs.append(GTFile(file)) - master=GTMaster(gtfs) - res=str(master) - elif("--append") in sys.argv: - if (len(sys.argv)<=sys.argv.index("--append")+2): - print("file.po and/or ref.po are not specified!\n") - printUsage() - exit(1) - file=sys.argv[sys.argv.index("--append")+1] - file2=sys.argv[sys.argv.index("--append")+2] - gtf=GTFile(file) - gtf2=GTFile(file2) - gtf.append(gtf2) - res=str(gtf) - else: - #print("Not implemented: "+str(sys.argv)) - printUsage() - sys.exit(1) - if not output: - print(res) - else: - file=open(output,"w") - file.write(res) - sys.exit(0) diff --git a/sources b/sources deleted file mode 100644 index 5cf8953..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -df3f5690eaa30fd228537b00cb7b7590 gettext-0.19.8.1.tar.xz diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 54627ef..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -# Tests run on Atomic, Classic and Container -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - atomic - - classic - - container - repositories: - - repo: "https://src.fedoraproject.org/tests/gettext.git" - dest: "gettext" - tests: - - gettext/gettext-tests - required_packages: - - gettext From 35c094b5df8daba10e6cc5e39b972af96a814d2c Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 9 Aug 2019 09:21:31 +0200 Subject: [PATCH 18/89] Revert "gettext fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1674958" This reverts commit 2b1ba2ed02436ebf1ea7976a791b8714e18cd3a5. https://pagure.io/releng/issue/8596 Signed-off-by: Igor Gnatenko --- .gitignore | 1 + STAGE2-gettext | 9 + dead.package | 1 - disable-gettext-runtime-test-lock.patch | 47 + gettext-0.19.8-its-segfault.patch | 43 + gettext-0.19.8.1-CVE-2018-18751.patch | 445 ++++++++++ gettext-po-send-mail.patch | 21 + gettext.spec | 1040 +++++++++++++++++++++++ msghack.1 | 45 + msghack.py | 417 +++++++++ sources | 1 + tests/tests.yml | 16 + 12 files changed, 2085 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 STAGE2-gettext delete mode 100644 dead.package create mode 100644 disable-gettext-runtime-test-lock.patch create mode 100644 gettext-0.19.8-its-segfault.patch create mode 100644 gettext-0.19.8.1-CVE-2018-18751.patch create mode 100644 gettext-po-send-mail.patch create mode 100644 gettext.spec create mode 100644 msghack.1 create mode 100755 msghack.py create mode 100644 sources create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..664f03a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/gettext-0.*.tar.xz diff --git a/STAGE2-gettext b/STAGE2-gettext new file mode 100644 index 0000000..dd61b05 --- /dev/null +++ b/STAGE2-gettext @@ -0,0 +1,9 @@ +#requires bison +#requires libtool + +mcd $BUILDDIR/gettext + +$SRC/gettext-*/configure $TCONFIGARGS --disable-static --enable-shared --with-pic-=yes --disable-csharp --disable-rpath + +make $J +make $J install diff --git a/dead.package b/dead.package deleted file mode 100644 index f331555..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -gettext fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1674958 diff --git a/disable-gettext-runtime-test-lock.patch b/disable-gettext-runtime-test-lock.patch new file mode 100644 index 0000000..ec3a59b --- /dev/null +++ b/disable-gettext-runtime-test-lock.patch @@ -0,0 +1,47 @@ +commit bd2c6ca2b7ae0be02d4bb85db79def454f3153fb +Author: rpm-build +AuthorDate: Wed Dec 21 12:50:54 2016 +0100 +Commit: rpm-build +CommitDate: Wed Dec 21 12:52:36 2016 +0100 + + disable-gettext-runtime-test-lock.patch + +diff --git a/gettext-runtime/tests/Makefile.am b/gettext-runtime/tests/Makefile.am +index 88a0684..3a27b79 100644 +--- a/gettext-runtime/tests/Makefile.am ++++ b/gettext-runtime/tests/Makefile.am +@@ -19,7 +19,7 @@ + AUTOMAKE_OPTIONS = 1.11 gnits no-dependencies color-tests subdir-objects + EXTRA_DIST = + +-TESTS = test-lock ++TESTS = + + AM_CPPFLAGS = \ + -I.. \ +diff --git a/gettext-runtime/tests/Makefile.in b/gettext-runtime/tests/Makefile.in +index 4327733..5879146 100644 +--- a/gettext-runtime/tests/Makefile.in ++++ b/gettext-runtime/tests/Makefile.in +@@ -86,7 +86,7 @@ PRE_UNINSTALL = : + POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ +-TESTS = test-lock$(EXEEXT) ++TESTS = + check_PROGRAMS = test-lock$(EXEEXT) + subdir = tests + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +diff --git a/gettext-tools/gnulib-tests/Makefile.in b/gettext-tools/gnulib-tests/Makefile.in +index 26becd9..4b9d0e4 100644 +--- a/gettext-tools/gnulib-tests/Makefile.in ++++ b/gettext-tools/gnulib-tests/Makefile.in +@@ -143,7 +143,7 @@ TESTS = test-set-mode-acl.sh test-set-mode-acl-1.sh \ + test-isnanl-nolibm$(EXEEXT) test-isnanl$(EXEEXT) \ + test-iswblank$(EXEEXT) test-langinfo$(EXEEXT) \ + test-linkedhash_list$(EXEEXT) test-locale$(EXEEXT) \ +- test-localename$(EXEEXT) test-lock$(EXEEXT) \ ++ test-localename$(EXEEXT) \ + test-log10$(EXEEXT) test-lseek.sh test-lstat$(EXEEXT) \ + test-malloca$(EXEEXT) test-math$(EXEEXT) test-mbrtowc1.sh \ + test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \ diff --git a/gettext-0.19.8-its-segfault.patch b/gettext-0.19.8-its-segfault.patch new file mode 100644 index 0000000..430719f --- /dev/null +++ b/gettext-0.19.8-its-segfault.patch @@ -0,0 +1,43 @@ +From a0cab23332a254e3500cac2a3a984472d02180e5 Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Fri, 9 Dec 2016 21:04:31 +0100 +Subject: [PATCH] Fix crash of xgettext with --its option. + +* gettext-tools/src/xgettext.c (main): Free contents of its_dirs only when it +was initialized. Fixes bug introduced on 2016-05-16. +--- + gettext-tools/src/xgettext.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c +index f848d76d1..a80ee51ac 100644 +--- a/gettext-tools/src/xgettext.c ++++ b/gettext-tools/src/xgettext.c +@@ -330,7 +330,7 @@ main (int argc, char *argv[]) + bool sort_by_msgid = false; + bool sort_by_filepos = false; + char **dirs; +- char **its_dirs; ++ char **its_dirs = NULL; + char *explicit_its_filename = NULL; + const char *file_name; + const char *files_from = NULL; +@@ -1016,9 +1016,12 @@ warning: file '%s' extension '%s' is unknown; will try C"), filename, extension) + if (its_locating_rules) + locating_rule_list_free (its_locating_rules); + +- for (i = 0; its_dirs[i] != NULL; i++) +- free (its_dirs[i]); +- free (its_dirs); ++ if (its_dirs != NULL) ++ { ++ for (i = 0; its_dirs[i] != NULL; i++) ++ free (its_dirs[i]); ++ free (its_dirs); ++ } + + exit (EXIT_SUCCESS); + } +-- +2.14.3 + diff --git a/gettext-0.19.8.1-CVE-2018-18751.patch b/gettext-0.19.8.1-CVE-2018-18751.patch new file mode 100644 index 0000000..a857738 --- /dev/null +++ b/gettext-0.19.8.1-CVE-2018-18751.patch @@ -0,0 +1,445 @@ +From dce3a16e5e9368245735e29bf498dcd5e3e474a4 Mon Sep 17 00:00:00 2001 +From: Daiki Ueno +Date: Thu, 15 Sep 2016 13:57:24 +0200 +Subject: [PATCH] xgettext: Fix crash with *.po file input + +When xgettext was given two *.po files with the same msgid_plural, it +crashed with double-free. Problem reported by Davlet Panech in: +http://lists.gnu.org/archive/html/bug-gettext/2016-09/msg00001.html + +praiskup: +- I dropped the testsuite part, otherwise we'd have to 'autoreconf -vif' the + sources +- I'm patching manually the po-gram-gen.c file to avoid 'bison' BR + +diff --git a/gettext-tools/src/po-gram-gen.y b/gettext-tools/src/po-gram-gen.y +index becf5e607..4428e7725 100644 +--- a/gettext-tools/src/po-gram-gen.y ++++ b/gettext-tools/src/po-gram-gen.y +@@ -221,14 +221,11 @@ message + check_obsolete ($1, $3); + check_obsolete ($1, $4); + if (!$1.obsolete || pass_obsolete_entries) +- { +- do_callback_message ($1.ctxt, string2, &$1.pos, $3.string, +- $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos, +- $1.prev_ctxt, +- $1.prev_id, $1.prev_id_plural, +- $1.obsolete); +- free ($3.string); +- } ++ do_callback_message ($1.ctxt, string2, &$1.pos, $3.string, ++ $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos, ++ $1.prev_ctxt, ++ $1.prev_id, $1.prev_id_plural, ++ $1.obsolete); + else + { + free_message_intro ($1); +diff --git a/gettext-tools/src/read-catalog.c b/gettext-tools/src/read-catalog.c +index 571d18e1b..6af6d2025 100644 +--- a/gettext-tools/src/read-catalog.c ++++ b/gettext-tools/src/read-catalog.c +@@ -397,6 +397,8 @@ default_add_message (default_catalog_reader_ty *this, + appropriate. */ + mp = message_alloc (msgctxt, msgid, msgid_plural, msgstr, msgstr_len, + msgstr_pos); ++ if (msgid_plural != NULL) ++ free (msgid_plural); + mp->prev_msgctxt = prev_msgctxt; + mp->prev_msgid = prev_msgid; + mp->prev_msgid_plural = prev_msgid_plural; +diff --git a/gettext-tools/src/po-gram-gen.c b/gettext-tools/src/po-gram-gen.c +--- a/gettext-tools/src/po-gram-gen.c ++++ b/gettext-tools/src/po-gram-gen.c +@@ -1,8 +1,8 @@ +-/* A Bison parser, made by GNU Bison 3.0.4. */ ++/* A Bison parser, made by GNU Bison 3.0.5. */ + + /* Bison implementation for Yacc-like parsers in C + +- Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. ++ Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -44,7 +44,7 @@ + #define YYBISON 1 + + /* Bison version. */ +-#define YYBISON_VERSION "3.0.4" ++#define YYBISON_VERSION "3.0.5" + + /* Skeleton name. */ + #define YYSKELETON_NAME "yacc.c" +@@ -568,9 +568,9 @@ + static const yytype_uint16 yyrline[] = + { + 0, 169, 169, 171, 172, 173, 174, 179, 187, 195, +- 216, 240, 249, 258, 269, 278, 292, 301, 315, 321, +- 332, 338, 350, 361, 372, 376, 391, 414, 422, 434, +- 442 ++ 216, 237, 246, 255, 266, 275, 289, 298, 312, 318, ++ 329, 335, 347, 358, 369, 373, 388, 411, 419, 431, ++ 439 + }; + #endif + +@@ -1054,6 +1054,7 @@ + case N: \ + yyformat = S; \ + break ++ default: /* Avoid compiler warnings. */ + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); +@@ -1370,23 +1371,23 @@ + switch (yyn) + { + case 7: +-#line 180 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 180 "po-gram-gen.y" /* yacc.c:1648 */ + { + po_callback_comment_dispatcher ((yyvsp[0].string).string); + } +-#line 1378 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1379 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 8: +-#line 188 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 188 "po-gram-gen.y" /* yacc.c:1648 */ + { + po_callback_domain ((yyvsp[0].string).string); + } +-#line 1386 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1387 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 9: +-#line 196 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 196 "po-gram-gen.y" /* yacc.c:1648 */ + { + char *string2 = string_list_concat_destroy (&(yyvsp[-2].stringlist).stringlist); + char *string4 = string_list_concat_destroy (&(yyvsp[0].stringlist).stringlist); +@@ -1407,11 +1408,11 @@ + free (string4); + } + } +-#line 1411 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1412 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 10: +-#line 217 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 217 "po-gram-gen.y" /* yacc.c:1648 */ + { + char *string2 = string_list_concat_destroy (&(yyvsp[-2].stringlist).stringlist); + +@@ -1419,14 +1420,11 @@ + check_obsolete ((yyvsp[-3].message_intro), (yyvsp[-1].string)); + check_obsolete ((yyvsp[-3].message_intro), (yyvsp[0].rhs)); + if (!(yyvsp[-3].message_intro).obsolete || pass_obsolete_entries) +- { +- do_callback_message ((yyvsp[-3].message_intro).ctxt, string2, &(yyvsp[-3].message_intro).pos, (yyvsp[-1].string).string, +- (yyvsp[0].rhs).rhs.msgstr, (yyvsp[0].rhs).rhs.msgstr_len, &(yyvsp[0].rhs).pos, +- (yyvsp[-3].message_intro).prev_ctxt, +- (yyvsp[-3].message_intro).prev_id, (yyvsp[-3].message_intro).prev_id_plural, +- (yyvsp[-3].message_intro).obsolete); +- free ((yyvsp[-1].string).string); +- } ++ do_callback_message ((yyvsp[-3].message_intro).ctxt, string2, &(yyvsp[-3].message_intro).pos, (yyvsp[-1].string).string, ++ (yyvsp[0].rhs).rhs.msgstr, (yyvsp[0].rhs).rhs.msgstr_len, &(yyvsp[0].rhs).pos, ++ (yyvsp[-3].message_intro).prev_ctxt, ++ (yyvsp[-3].message_intro).prev_id, (yyvsp[-3].message_intro).prev_id_plural, ++ (yyvsp[-3].message_intro).obsolete); + else + { + free_message_intro ((yyvsp[-3].message_intro)); +@@ -1435,11 +1433,11 @@ + free ((yyvsp[0].rhs).rhs.msgstr); + } + } +-#line 1439 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1437 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 11: +-#line 241 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 238 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-2].message_intro), (yyvsp[-1].stringlist)); + check_obsolete ((yyvsp[-2].message_intro), (yyvsp[0].string)); +@@ -1448,11 +1446,11 @@ + string_list_destroy (&(yyvsp[-1].stringlist).stringlist); + free ((yyvsp[0].string).string); + } +-#line 1452 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1450 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 12: +-#line 250 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 247 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-2].message_intro), (yyvsp[-1].stringlist)); + check_obsolete ((yyvsp[-2].message_intro), (yyvsp[0].rhs)); +@@ -1461,22 +1459,22 @@ + string_list_destroy (&(yyvsp[-1].stringlist).stringlist); + free ((yyvsp[0].rhs).rhs.msgstr); + } +-#line 1465 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1463 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 13: +-#line 259 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 256 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-1].message_intro), (yyvsp[0].stringlist)); + po_gram_error_at_line (&(yyvsp[-1].message_intro).pos, _("missing 'msgstr' section")); + free_message_intro ((yyvsp[-1].message_intro)); + string_list_destroy (&(yyvsp[0].stringlist).stringlist); + } +-#line 1476 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1474 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 14: +-#line 270 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 267 "po-gram-gen.y" /* yacc.c:1648 */ + { + (yyval.message_intro).prev_ctxt = NULL; + (yyval.message_intro).prev_id = NULL; +@@ -1485,11 +1483,11 @@ + (yyval.message_intro).pos = (yyvsp[0].string).pos; + (yyval.message_intro).obsolete = (yyvsp[0].string).obsolete; + } +-#line 1489 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1487 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 15: +-#line 279 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 276 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-1].prev), (yyvsp[0].string)); + (yyval.message_intro).prev_ctxt = (yyvsp[-1].prev).ctxt; +@@ -1499,11 +1497,11 @@ + (yyval.message_intro).pos = (yyvsp[0].string).pos; + (yyval.message_intro).obsolete = (yyvsp[0].string).obsolete; + } +-#line 1503 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1501 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 16: +-#line 293 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 290 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-1].string), (yyvsp[0].stringlist)); + (yyval.prev).ctxt = (yyvsp[-1].string).string; +@@ -1512,11 +1510,11 @@ + (yyval.prev).pos = (yyvsp[-1].string).pos; + (yyval.prev).obsolete = (yyvsp[-1].string).obsolete; + } +-#line 1516 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1514 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 17: +-#line 302 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 299 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-2].string), (yyvsp[-1].stringlist)); + check_obsolete ((yyvsp[-2].string), (yyvsp[0].string)); +@@ -1526,21 +1524,21 @@ + (yyval.prev).pos = (yyvsp[-2].string).pos; + (yyval.prev).obsolete = (yyvsp[-2].string).obsolete; + } +-#line 1530 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1528 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 18: +-#line 316 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 313 "po-gram-gen.y" /* yacc.c:1648 */ + { + (yyval.string).string = NULL; + (yyval.string).pos = (yyvsp[0].pos).pos; + (yyval.string).obsolete = (yyvsp[0].pos).obsolete; + } +-#line 1540 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1538 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 19: +-#line 322 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 319 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-2].pos), (yyvsp[-1].stringlist)); + check_obsolete ((yyvsp[-2].pos), (yyvsp[0].pos)); +@@ -1548,21 +1546,21 @@ + (yyval.string).pos = (yyvsp[0].pos).pos; + (yyval.string).obsolete = (yyvsp[0].pos).obsolete; + } +-#line 1552 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1550 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 20: +-#line 333 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 330 "po-gram-gen.y" /* yacc.c:1648 */ + { + (yyval.string).string = NULL; + (yyval.string).pos = (yyvsp[0].pos).pos; + (yyval.string).obsolete = (yyvsp[0].pos).obsolete; + } +-#line 1562 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1560 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 21: +-#line 339 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 336 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-2].pos), (yyvsp[-1].stringlist)); + check_obsolete ((yyvsp[-2].pos), (yyvsp[0].pos)); +@@ -1570,11 +1568,11 @@ + (yyval.string).pos = (yyvsp[0].pos).pos; + (yyval.string).obsolete = (yyvsp[0].pos).obsolete; + } +-#line 1574 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1572 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 22: +-#line 351 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 348 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-1].pos), (yyvsp[0].stringlist)); + plural_counter = 0; +@@ -1582,30 +1580,30 @@ + (yyval.string).pos = (yyvsp[-1].pos).pos; + (yyval.string).obsolete = (yyvsp[-1].pos).obsolete; + } +-#line 1586 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1584 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 23: +-#line 362 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 359 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-1].pos), (yyvsp[0].stringlist)); + (yyval.string).string = string_list_concat_destroy (&(yyvsp[0].stringlist).stringlist); + (yyval.string).pos = (yyvsp[-1].pos).pos; + (yyval.string).obsolete = (yyvsp[-1].pos).obsolete; + } +-#line 1597 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1595 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 24: +-#line 373 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 370 "po-gram-gen.y" /* yacc.c:1648 */ + { + (yyval.rhs) = (yyvsp[0].rhs); + } +-#line 1605 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1603 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 25: +-#line 377 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 374 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-1].rhs), (yyvsp[0].rhs)); + (yyval.rhs).rhs.msgstr = XNMALLOC ((yyvsp[-1].rhs).rhs.msgstr_len + (yyvsp[0].rhs).rhs.msgstr_len, char); +@@ -1617,11 +1615,11 @@ + (yyval.rhs).pos = (yyvsp[-1].rhs).pos; + (yyval.rhs).obsolete = (yyvsp[-1].rhs).obsolete; + } +-#line 1621 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1619 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 26: +-#line 392 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 389 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-4].pos), (yyvsp[-3].pos)); + check_obsolete ((yyvsp[-4].pos), (yyvsp[-2].number)); +@@ -1640,11 +1638,11 @@ + (yyval.rhs).pos = (yyvsp[-4].pos).pos; + (yyval.rhs).obsolete = (yyvsp[-4].pos).obsolete; + } +-#line 1644 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1642 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 27: +-#line 415 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 412 "po-gram-gen.y" /* yacc.c:1648 */ + { + string_list_init (&(yyval.stringlist).stringlist); + string_list_append (&(yyval.stringlist).stringlist, (yyvsp[0].string).string); +@@ -1652,11 +1650,11 @@ + (yyval.stringlist).pos = (yyvsp[0].string).pos; + (yyval.stringlist).obsolete = (yyvsp[0].string).obsolete; + } +-#line 1656 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1654 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 28: +-#line 423 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 420 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-1].stringlist), (yyvsp[0].string)); + (yyval.stringlist).stringlist = (yyvsp[-1].stringlist).stringlist; +@@ -1665,11 +1663,11 @@ + (yyval.stringlist).pos = (yyvsp[-1].stringlist).pos; + (yyval.stringlist).obsolete = (yyvsp[-1].stringlist).obsolete; + } +-#line 1669 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1667 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 29: +-#line 435 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 432 "po-gram-gen.y" /* yacc.c:1648 */ + { + string_list_init (&(yyval.stringlist).stringlist); + string_list_append (&(yyval.stringlist).stringlist, (yyvsp[0].string).string); +@@ -1677,11 +1675,11 @@ + (yyval.stringlist).pos = (yyvsp[0].string).pos; + (yyval.stringlist).obsolete = (yyvsp[0].string).obsolete; + } +-#line 1681 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1679 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + case 30: +-#line 443 "po-gram-gen.y" /* yacc.c:1646 */ ++#line 440 "po-gram-gen.y" /* yacc.c:1648 */ + { + check_obsolete ((yyvsp[-1].stringlist), (yyvsp[0].string)); + (yyval.stringlist).stringlist = (yyvsp[-1].stringlist).stringlist; +@@ -1690,11 +1688,11 @@ + (yyval.stringlist).pos = (yyvsp[-1].stringlist).pos; + (yyval.stringlist).obsolete = (yyvsp[-1].stringlist).obsolete; + } +-#line 1694 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1692 "po-gram-gen.c" /* yacc.c:1648 */ + break; + + +-#line 1698 "po-gram-gen.c" /* yacc.c:1646 */ ++#line 1696 "po-gram-gen.c" /* yacc.c:1648 */ + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires +-- +2.19.1 + diff --git a/gettext-po-send-mail.patch b/gettext-po-send-mail.patch new file mode 100644 index 0000000..2602e1d --- /dev/null +++ b/gettext-po-send-mail.patch @@ -0,0 +1,21 @@ +Index: gettext-0.19.8.1/gettext-tools/misc/po-mode.el +=================================================================== +--- gettext-0.19.8.1.orig/gettext-tools/misc/po-mode.el ++++ gettext-0.19.8.1/gettext-tools/misc/po-mode.el +@@ -3518,10 +3518,12 @@ Write to your team? ('n' if writing to + (re-search-forward + (concat "^" (regexp-quote mail-header-separator) "\n")) + (save-excursion +- (insert-buffer-substring buffer) +- (shell-command-on-region +- (region-beginning) (region-end) +- (concat po-gzip-uuencode-command " " name ".gz") t t)))))) ++ (save-restriction ++ (narrow-to-region (point) (point)) ++ (insert-buffer-substring buffer) ++ (shell-command-on-region ++ (point-min) (point-max) ++ (concat po-gzip-uuencode-command " " name ".gz") t t))))))) + (message "")) + + (defun po-confirm-and-quit () diff --git a/gettext.spec b/gettext.spec new file mode 100644 index 0000000..5b1ede0 --- /dev/null +++ b/gettext.spec @@ -0,0 +1,1040 @@ +%bcond_with jar +%bcond_with java +%bcond_without check + +%global tarversion 0.19.8.1 +%global archiveversion 0.19.8 + +Summary: GNU libraries and utilities for producing multi-lingual messages +Name: gettext +Version: 0.19.8.1 +Release: 21%{?dist} +License: GPLv3+ and LGPLv2+ +URL: http://www.gnu.org/software/gettext/ +Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{tarversion}.tar.xz +# Disable the test_lock test as it often hangs on a number of arches +# https://bugzilla.redhat.com/show_bug.cgi?id=1155291 +# http://savannah.gnu.org/bugs/?43487 +Patch0: disable-gettext-runtime-test-lock.patch +# Upstreamed patch: +# http://lists.gnu.org/archive/html/bug-gettext/2016-08/msg00006.html +Patch1: gettext-po-send-mail.patch +# Rhbz#1531476, upstream a0cab23332a254e3500cac2a3a984472d02180e5 +Patch2: gettext-0.19.8-its-segfault.patch +# rhbz#1647044 +Patch3: gettext-0.19.8.1-CVE-2018-18751.patch + +Source2: msghack.py +Source3: msghack.1 +# for bootstrapping +# BuildRequires: autoconf >= 2.62 +# BuildRequires: automake +# BuildRequires: libtool +# BuildRequires: bison + +BuildRequires: gcc-c++ +%if %{with java} +# libintl.jar requires gcj >= 4.3 to build +BuildRequires: gcc-java, libgcj +# For javadoc +BuildRequires: java-1.6.0-openjdk-devel +%if %{with jar} +BuildRequires: %{_bindir}/fastjar +# require zip and unzip for brp-java-repack-jars +BuildRequires: zip, unzip +%endif +%endif +# for po-mode.el +BuildRequires: emacs +# for autosetup +BuildRequires: git +# ensure 'ARCHIVE_FORMAT=dirxz' +BuildRequires: xz +BuildRequires: chrpath +# following suggested by DEPENDENCIES: +BuildRequires: ncurses-devel +BuildRequires: libxml2-devel +BuildRequires: glib2-devel +BuildRequires: libcroco-devel +BuildRequires: libunistring-devel +# Depend on the exact version of the library sub package +Requires: %{name}-libs%{_isa} = %{version}-%{release} +# for F17 UsrMove +Conflicts: filesystem < 3 +Provides: /bin/gettext +# exception for bundled gnulib copylib +Provides: bundled(gnulib) + +%description +The GNU gettext package provides a set of tools and documentation for +producing multi-lingual messages in programs. Tools include a set of +conventions about how programs should be written to support message +catalogs, a directory and file naming organization for the message +catalogs, a runtime library which supports the retrieval of translated +messages, and stand-alone programs for handling the translatable and +the already translated strings. Gettext provides an easy to use +library and tools for creating, using, and modifying natural language +catalogs and is a powerful and simple method for internationalizing +programs. + + +%package common-devel +Summary: Common development files for %{name} +# autopoint archive +License: GPLv3+ +BuildArch: noarch + +%description common-devel +This package contains common architecture independent gettext development files. + + +%package devel +Summary: Development files for %{name} +# autopoint is GPLv3+ +# libasprintf is LGPLv2+ +# libgettextpo is GPLv3+ +License: LGPLv2+ and GPLv3+ +Requires: %{name} = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} +Requires: %{name}-common-devel = %{version}-%{release} +Requires: xz +Obsoletes: gettext-autopoint < 0.18.1.1-3 +Provides: gettext-autopoint = %{version}-%{release} + +%description devel +This package contains all development related files necessary for +developing or compiling applications/libraries that needs +internationalization capability. You also need this package if you +want to add gettext support for your project. + + +%package libs +Summary: Libraries for %{name} +# libasprintf is LGPLv2+ +# libgettextpo is GPLv3+ +License: LGPLv2+ and GPLv3+ + +%description libs +This package contains libraries used internationalization support. + + +%package -n emacs-%{name} +Summary: Support for editing po files within GNU Emacs +BuildArch: noarch +# help users find po-mode.el +Provides: emacs-po-mode +Requires: emacs(bin) >= %{_emacs_version} +Provides: emacs-%{name}-el = %{version}-%{release} +Obsoletes: emacs-%{name}-el < %{version}-%{release} + +%description -n emacs-%{name} +This package provides a major mode for editing po files within GNU Emacs. + +%package -n msghack +Summary: Alter PO files in ways +BuildArch: noarch + +%description -n msghack +This program can be used to alter .po files in ways no sane mind would +think about. + + +%prep +%autosetup -n %{name}-%{tarversion} -S git + + +%build +%if %{with java} +export JAVAC=gcj +%if %{with jar} +export JAR=fastjar +%endif +%endif +%ifarch ppc ppc64 ppc64le +# prevent test-isinf from failing with gcc-5.3.1 on ppc64le (#1294016) +export CFLAGS="$RPM_OPT_FLAGS -D__SUPPORT_SNAN__" +%endif +# --disable-rpath doesn't work properly on lib64 +%configure --without-included-gettext --enable-nls --disable-static \ + --enable-shared --with-pic --disable-csharp --disable-rpath \ +%if %{with java} + --enable-java \ +%else + --disable-java --disable-native-java \ +%endif + --with-xz + +make %{?_smp_mflags} %{?with_java:GCJFLAGS="-findirect-dispatch"} + + +%install +make install DESTDIR=${RPM_BUILD_ROOT} INSTALL="%{__install} -p" \ + lispdir=%{_datadir}/emacs/site-lisp/gettext \ + aclocaldir=%{_datadir}/aclocal EXAMPLESFILES="" + + +install -pm 755 %SOURCE2 ${RPM_BUILD_ROOT}/%{_bindir}/msghack +install -pm 644 %SOURCE3 ${RPM_BUILD_ROOT}/%{_mandir}/man1/msghack.1 + + +# make preloadable_libintl.so executable +chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/preloadable_libintl.so + +rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir + +# doc relocations +for i in gettext-runtime/man/*.html; do + rm ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/`basename $i` +done +rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/javadoc* + +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/examples + +rm -rf htmldoc +mkdir htmldoc +mv ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/* ${RPM_BUILD_ROOT}/%{_datadir}/doc/libasprintf/* htmldoc +rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/libasprintf +rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext + +## note libintl.jar does not build with gcj < 4.3 +## since it would not be fully portable +%if %{with jar} +### this is no longer needed since examples not packaged +## set timestamp of examples ChangeLog timestamp for brp-java-repack-jars +#for i in `find ${RPM_BUILD_ROOT} examples -newer ChangeLog -type f -name ChangeLog`; do +# touch -r ChangeLog $i +#done +%else +# in case another java compiler is installed +rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/libintl.jar +%endif + +rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/gettext.jar + +# own this directory for third-party *.its files +mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/its + +# remove .la files +rm ${RPM_BUILD_ROOT}%{_libdir}/lib*.la + +# remove internal .so lib files +rm ${RPM_BUILD_ROOT}%{_libdir}/libgettext{src,lib}.so + +# move po-mode initialization elisp file to the right place, and remove byte +# compiled file +install -d ${RPM_BUILD_ROOT}%{_emacs_sitestartdir} +mv ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.el ${RPM_BUILD_ROOT}%{_emacs_sitestartdir} +rm ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.elc + +%find_lang %{name}-runtime +%find_lang %{name}-tools +cat %{name}-*.lang > %{name}.lang + +# cleanup rpaths +for i in $RPM_BUILD_ROOT%{_bindir}/* `find $RPM_BUILD_ROOT%{_libdir} -type f`; do + if file $i | grep "ELF 64-bit" >/dev/null; then + chrpath -l $i && chrpath --delete $i + fi +done + + +%if %{with check} +%check +# this takes quite a lot of time to run + +# override LIBUNISTRING to prevent reordering of lib objects +make check LIBUNISTRING=-lunistring +%endif + +%ldconfig_scriptlets libs + +%files -f %{name}.lang +%doc AUTHORS gettext-runtime/BUGS +%doc COPYING gettext-tools/misc/DISCLAIM README +%doc NEWS THANKS +%doc gettext-runtime/man/*.1.html +%doc gettext-runtime/intl/COPYING* +%{_bindir}/* +%exclude %{_bindir}/autopoint +%exclude %{_bindir}/gettextize +%exclude %{_bindir}/msghack +%{_infodir}/gettext* +%exclude %{_mandir}/man1/autopoint.1* +%exclude %{_mandir}/man1/gettextize.1* +%exclude %{_mandir}/man1/msghack.1* +%{_mandir}/man1/* +%{_libdir}/%{name} +%if %{with java} +%exclude %{_libdir}/%{name}/gnu.gettext.* +%endif +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/its +%{_datadir}/%{name}/ABOUT-NLS +%{_datadir}/%{name}/po +%{_datadir}/%{name}/styles +%dir %{_datadir}/%{name}-%{archiveversion} +%{_datadir}/%{name}-%{archiveversion}/its + +%files common-devel +%{_datadir}/%{name}/archive.*.tar.xz + +%files devel +%doc gettext-runtime/man/*.3.html ChangeLog +%{_bindir}/autopoint +%{_bindir}/gettextize +%{_datadir}/%{name}/projects/ +%{_datadir}/%{name}/config.rpath +%{_datadir}/%{name}/*.h +%{_datadir}/%{name}/msgunfmt.tcl +%{_datadir}/aclocal/* +%{_includedir}/* +%{_infodir}/autosprintf* +%{_libdir}/libasprintf.so +%{_libdir}/libgettextpo.so +%{_libdir}/preloadable_libintl.so +%{_mandir}/man1/autopoint.1* +%{_mandir}/man1/gettextize.1* +%{_mandir}/man3/* +%{_datadir}/%{name}/intl +%{_datadir}/%{name}/javaversion.class +%doc gettext-runtime/intl-java/javadoc* +%if %{with java} +%{_libdir}/%{name}/gnu.gettext.* +%endif + +%files libs +%{_libdir}/libasprintf.so.0* +%{_libdir}/libgettextpo.so.0* +%{_libdir}/libgettextlib-0.*.so +%{_libdir}/libgettextsrc-0.*.so +%if %{with jar} +%{_datadir}/%{name}/libintl.jar +%endif + +%files -n emacs-%{name} +%dir %{_emacs_sitelispdir}/%{name} +%{_emacs_sitelispdir}/%{name}/*.elc +%{_emacs_sitelispdir}/%{name}/*.el +%{_emacs_sitestartdir}/*.el + +%files -n msghack +%license COPYING +%{_bindir}/msghack +%{_mandir}/man1/msghack.1* + +%changelog +* Thu Jul 25 2019 Fedora Release Engineering - 0.19.8.1-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Mar 7 2019 Tim Landscheidt - 0.19.8.1-20 +- Remove obsolete requirements for %%post/%%preun scriptlets + +* Thu Jan 31 2019 Fedora Release Engineering - 0.19.8.1-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Nov 08 2018 Pavel Raiskup - 0.19.8.1-18 +- fix CVE-2018-18751 (rhbz#1647044) +- put gettextize man page into gettext-devel (man page scan, rhbz#1611303) + +* Tue Jul 31 2018 Florian Weimer - 0.19.8.1-17 +- Rebuild with fixed binutils + +* Sat Jul 28 2018 Igor Gnatenko - 0.19.8.1-16 +- Replace obsolete scriptlets + +* Fri Jul 13 2018 Fedora Release Engineering - 0.19.8.1-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 0.19.8.1-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Feb 03 2018 Igor Gnatenko - 0.19.8.1-13 +- Switch to %%ldconfig_scriptlets + +* Fri Jan 05 2018 Pavel Raiskup - 0.19.8.1-12 +- xgettext --its segfault fix (rhbz#1531476) + +* Wed Aug 02 2017 Fedora Release Engineering - 0.19.8.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.19.8.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Mar 15 2017 Kalev Lember - 0.19.8.1-9 +- Depend on the exact version of the library sub package + +* Fri Feb 10 2017 Fedora Release Engineering - 0.19.8.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Jan 26 2017 Pavel Raiskup - 0.19.8.1-7 +- really remove Requires: git from gettext-devel (rhbz#1161284) +- make the BuildRequires unconditional (rhbz#1416691) + +* Wed Dec 21 2016 Pavel Raiskup - 0.19.8.1-6 +- disable test-lock for 'gettext-tool' subdir too (rhbz#1406031) + +* Mon Dec 19 2016 Miro Hrončok - 0.19.8.1-5 +- Rebuild for Python 3.6 + +* Fri Dec 16 2016 Petr Šabata - 0.19.8.1-4 +- Subpackage msghack so that gettext doesn't depend on python +- name the new sub-package 'msghack' + +* Tue Nov 29 2016 Pavel Raiskup - 0.19.8.1-3 +- devel subpackage to Require 'xz' (rhbz#1399270) + +* Wed Aug 10 2016 Daiki Ueno - 0.19.8.1-2 +- utilize %%autosetup +- apply patch to fix po-send-mail when used with Emacs 25 (#1356642) + +* Sat Jun 11 2016 Daiki Ueno - 0.19.8.1-1 +- update to 0.19.8.1 release + +* Thu Jun 9 2016 Daiki Ueno - 0.19.8-1 +- update to 0.19.8 release + +* Wed Feb 03 2016 Fedora Release Engineering - 0.19.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Jan 12 2016 Daiki Ueno - 0.19.7-3 +- own .../gettext/its for third-party *.its files +- add a work around for test-isinf failure on ppc64le (#1297387) + +* Fri Jan 8 2016 Daiki Ueno - 0.19.7-2 +- apply patch to recognize .glade extension for GtkBuilder files (#1296653) + +* Thu Dec 10 2015 Daiki Ueno - 0.19.7-1 +- update to 0.19.7 release + +* Thu Sep 24 2015 Daiki Ueno - 0.19.6-1 +- update to 0.19.6 release + +* Wed Jul 22 2015 Daiki Ueno - 0.19.5.1-2 +- work around version conflict between gettextize and autopoint + +* Thu Jul 16 2015 Daiki Ueno - 0.19.5.1-1 +- update to 0.19.5.1 release + +* Fri Jun 26 2015 Daiki Ueno - 0.19.4-7 +- drop -el subpackage (#1234583) + +* Wed Jun 17 2015 Fedora Release Engineering - 0.19.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 02 2015 Kalev Lember - 0.19.4-5 +- Rebuilt for GCC 5 C++11 ABI change + +* Sat Feb 21 2015 Till Maas - 0.19.4-4 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + +* Thu Feb 19 2015 Daiki Ueno - 0.19.4-3 +- port msghack.py to Python 3 (#1192086) + +* Wed Dec 31 2014 Daiki Ueno - 0.19.4-2 +- remove git dependency from -devel subpackage (#1161284) + +* Fri Dec 26 2014 Daiki Ueno - 0.19.4-1 +- update to 0.19.4 release + +* Tue Oct 28 2014 Peter Robinson 0.19.3-2 +- Disable the test_lock test as it often hangs on a number of arches + +* Thu Oct 16 2014 Daiki Ueno - 0.19.3-1 +- update to 0.19.3 release +- remove patches included in 0.19.3 +- remove autoconf/automake/libtool/bison from BR, as we don't do bootstrap + +* Wed Oct 15 2014 Daiki Ueno - 0.19.2-5 +- apply patch to fix infloop in autopoint (Closes: #1151238) +- apply patch to support newer ncurses in F-22 + +* Fri Oct 3 2014 Daiki Ueno - 0.19.2-4 +- apply patch to fix C octal character escape handling (Closes: #1147535) + +* Tue Sep 02 2014 Dennis Gilmore - 0.19.2-3 +- rebuild for libunistring soname bump + +* Sat Aug 16 2014 Fedora Release Engineering - 0.19.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Mon Jul 14 2014 Daiki Ueno - 0.19.2-1 +- update to 0.19.2 release + +* Mon Jul 7 2014 Daiki Ueno - 0.19.1-2 +- apply patch to msghack.py, for Python 3 compatibility (Closes: #1113425, + thanks to Bohuslav "Slavek" Kabrda) + +* Tue Jun 10 2014 Daiki Ueno - 0.19.1-1 +- update to 0.19.1 release +- switch to xz-compressed archive + +* Sat Jun 07 2014 Fedora Release Engineering - 0.19-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Jun 2 2014 Daiki Ueno - 0.19-2 +- apply patch to workaround msgfmt bug that counts warnings as errors + +* Mon Jun 2 2014 Daiki Ueno - 0.19-1 +- update to 0.19 release +- remove upstreamed -Wformat-security patch + +* Tue Jan 7 2014 Daiki Ueno - 0.18.3.2-1 +- update to 0.18.3.2 release +- apply patch to suppress -Wformat-security warnings in gnulib-tests + +* Sun Aug 25 2013 Daiki Ueno - 0.18.3.1-1 +- update to 0.18.3.1 release + +* Sat Aug 03 2013 Fedora Release Engineering - 0.18.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jul 10 2013 Daiki Ueno - 0.18.3-1 +- update to 0.18.3 release + +* Wed Jun 26 2013 Daiki Ueno - 0.18.2.1-2 +- add a man page for msghack +- fix bogus date in %%changelog + +* Tue Mar 12 2013 Daiki Ueno - 0.18.2.1-1 +- update to 0.18.2.1 release (not really necessary though) + +* Wed Feb 13 2013 Fedora Release Engineering - 0.18.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Dec 26 2012 Daiki Ueno - 0.18.2-1 +- update to 0.18.2 release (based on the spec patch by Jens Petersen) + +* Tue Oct 2 2012 Jens Petersen - 0.18.1.1-17 +- move gettextize to the devel subpackage with its source data files +- update msghack to GPL v3 + +* Fri Jul 27 2012 Jens Petersen - 0.18.1.1-16 +- patch gnulib since glibc and C11 dropped gets + +* Thu Jul 19 2012 Fedora Release Engineering - 0.18.1.1-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue May 29 2012 Remi Collet - 0.18.1.1-14 +- add upstream patch from debian to fix xgettext segfault in + remember_a_message_plural (#826138) + +* Thu May 17 2012 Jens Petersen - 0.18.1.1-13 +- base package now provides bundled(gnulib) to make it clear that + gettext is built with bundled gnulib (#821757) + +* Wed Jan 25 2012 Harald Hoyer 0.18.1.1-12 +- add filesystem guard + +* Wed Jan 25 2012 Harald Hoyer 0.18.1.1-11 +- install everything in /usr + https://fedoraproject.org/wiki/Features/UsrMove + +* Tue Jan 10 2012 Nils Philippsen - 0.18.1.1-10 +- rebuild for gcc 4.7 + +* Tue Oct 4 2011 Jens Petersen - 0.18.1.1-9 +- correct the configure --with-pic option syntax (Gilles Espinasse) + +* Wed Sep 28 2011 Jens Petersen - 0.18.1.1-8 +- add gettext-readlink-einval.patch to fix build on kernel >= 2.6.39 (#739188) +- add optional buildrequires suggested in the DEPENDENCIES file + +* Tue Feb 08 2011 Fedora Release Engineering - 0.18.1.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Feb 7 2011 Jens Petersen - 0.18.1.1-6 +- remove internal libgettextlib.so and libgettextsrc.so (#650471) + +* Mon Feb 7 2011 Jens Petersen - 0.18.1.1-5 +- fix license field of gettext-libs since libgettextpo is GPLv3+ (#640158) + +* Thu Sep 9 2010 Jens Petersen - 0.18.1.1-4 +- subpackage archive.git.tar.gz to avoid multilib conflicts (#631733) +- update msghack.py header + +* Mon Aug 23 2010 Jens Petersen - 0.18.1.1-3 +- merge autopoint subpackage into devel to simplify deps (#625325) +- have ABOUT-NLS only in the base package datadir + +* Wed Jun 23 2010 Jens Petersen - 0.18.1.1-2 +- correct license tag from GPLv3 to GPLv3+ +- subpackage autopoint which requires git (#574031) +- no longer require cvs (#606746) +- add bcond for git + +* Fri May 21 2010 Jens Petersen - 0.18.1.1-1 +- update to 0.18.1.1 release (#591044) +- gettext-0.17-autopoint-CVS-441481.patch, gettext-0.17-long-long-int-m4.patch + gettext-0.17-open-args.patch, and + gettext-xgettext-python-unicode-surrogate-473946.patch are upstream +- move libintl.jar to lib subpackage to avoid multilib problems + (reported by Jim Radford in #595922) +- disable java for now +- use chrpath to get us out of rpath hell instead of complicated libtool hacks +- enable git support + +* Fri Apr 23 2010 Jens Petersen - 0.17-17 +- create emacs subpackages for po-mode.el (thanks for patch from + Jonathan Underwood, #579452) +- provide emacs-po-mode +- move libgettextlib and libgettextsrc from base to libs subpackage + (requested by Peter Robinson for blender, #579388) + +* Fri Nov 27 2009 Jens Petersen - 0.17-16 +- fix FTBFS by removing openmp.m4 which conflicts with recent autoconf (#539211) +- cleanup gettext-0.17-rpathFix.patch + - separate gl_AC_TYPE_LONG_LONG replacement to another patch + - use trailing ':' for tests LD_LIBRARY_PATH +- run autogen.sh with --quick and --skip-gnulib + +* Tue Sep 1 2009 Jens Petersen - 0.17-15 +- bring back autopoint requires cvs (#517361) +- requires info rather than /sbin/install-info +- drop install_info and remove_install_info macros + +* Fri Jul 24 2009 Fedora Release Engineering - 0.17-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Jun 24 2009 Jens Petersen - 0.17-13 +- buildrequire automake (#507275) +- run autogen + +* Mon Jun 22 2009 Jens Petersen - 0.17-12 +- move intl/ and po/ to base package for gettextize + (reported by Serge Pavlovsky, #496902) + +* Fri May 22 2009 Jens Petersen - 0.17-11 +- use bcond's for build switches + +* Tue Feb 24 2009 Fedora Release Engineering - 0.17-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Feb 12 2009 Jens Petersen - 0.17-9 +- add buildjava switch to allow turning off the java bits completely +- add buildcheck to allow turning off make check +- drop cvs requires for autopoint (Karl Lattimer, #469555) +- add upstream gettext-xgettext-python-unicode-surrogate-473946.patch by + Bruno Haible to fix xgettext handling of utf16 surrogates in python (#473946) + +* Fri Aug 29 2008 Ding-Yi Chen - 0.17-8 +- Fix the build failure with koji. + +* Fri Aug 29 2008 Ding-Yi Chen - 0.17-7 +- Remove the gettext-libs docs, as they are talking about autoconf, libtool, + which are not directly related to the gettext-libs. +- Remove unused definition and trailing space. +- Fix the build failure with mock . + +* Tue Aug 19 2008 Ding-Yi Chen - 0.17-6 +- Fixed Bug 456666 msghack doesn't check for mandatory cmd line params + by adding checking statements and display usage (msghack.py modified) +- rpath patch for binary-or-shlib-defines-rpath in x86_64. + +* Thu Apr 24 2008 Jens Petersen - 0.17-5 +- fix autopoint messing up CVS files with upstream patch (#441481) + +* Mon Feb 18 2008 Jens Petersen - 0.17-4 +- if %%buildjar is off make sure libintl.jar does not get installed (#433210) + +* Mon Feb 18 2008 Jens Petersen - 0.17-3 +- turn on building of libintl.jar now that we have gcc43 + +* Thu Feb 14 2008 Jens Petersen - 0.17-2 +- rebuild with gcc43 + +* Thu Jan 24 2008 Jens Petersen - 0.17-1 +- update to 0.17 release + - update License field to GPLv3 + - add gettext-0.17-open-args.patch to fix build from upstream + - gettext-tools-tests-lang-gawk-fail.patch, gettext-php-headers.patch, + gettext-php-prinf-output-237241.patch, and + gettext-xglade-define-xml-major-version-285701.patch are no longer needed +- drop superfluous po-mode-init.el source +- no need to run autoconf and autoheader when building +- pass -findirect-dispatch to gcj to make java binaries ABI independent + (jakub,#427796) +- move autopoint, gettextize, and {_datadir}/{name}/ to main package +- force removal of emacs/ so install does not fail when no emacs + +* Fri Sep 21 2007 Jens Petersen - 0.16.1-12 +- add a libs subpackage (suggested by Dwayne Bailey, #294891) +- move preloadable_libintl.so to the devel subpackage + +* Fri Sep 14 2007 Nils Philippsen - 0.16.1-11 +- remove gettext-xglade-include-expat-285701.patch, add + gettext-xglade-define-xml-major-version-285701.patch to determine + XML_MAJOR_VERSION from expat.h and define it in config.h (#285701) + +* Wed Sep 12 2007 Jens Petersen - 0.16.1-10 +- buildrequire expat-devel +- add gettext-xglade-include-expat-285701.patch to include expat.h + to get xgettext to dl the right libexpat (Nils Philippsen, #285701) + +* Thu Aug 16 2007 Jens Petersen +- specify license is GPL and LGPL version 2 or later + +* Wed Aug 1 2007 Jens Petersen - 0.16.1-9 +- fix encoding of msghack script (Dwayne Bailey, #250248) + +* Mon Apr 30 2007 Jens Petersen - 0.16.1-8 +- add gettext-php-prinf-output-237241.patch to workaround php test failure + (#237241) +- add gettext-php-headers.patch to correct php test headers + (Robert Scheck, #232832) + +* Thu Mar 15 2007 Jens Petersen - 0.16.1-7 +- set preloadable_libintl.so executable in %%install so it gets stripped +- force removal of infodir/dir since it is not there when /sbin is not in path + +* Tue Mar 13 2007 Jens Petersen - 0.16.1-6 +- add buildjar switch for building of libintl.jar +- lots of spec file cleanup (Mamoru Tasaka, #225791): +- preserve timestamps of installed files +- disable building of static library +- use %%find_lang for .mo files +- remove examples from -devel package +- do not own en@*quot locale dirs +- set preloadable_libintl.so executable +- add ChangeLog to -devel package +- add %%check to run make check +- add gettext-tools-tests-lang-gawk-fail.patch to work around gawk test failure + +* Fri Feb 23 2007 Karsten Hopp 0.16.1-5 +- rebuild to pick up dependency on libgcj.so.8rh instead libgcj.so.7rh + +* Thu Feb 1 2007 Jens Petersen - 0.16.1-4 +- protect install-info in devel %%post and %%preun too (Ville Skyttä, #223689) +- forward port fix to reset of timestamp of examples ChangeLog for + brp-java-repack-jars libintl.jar multilib conflict (#205207) + +* Mon Jan 22 2007 Jens Petersen - 0.16.1-3 +- protect install-info in %%post and %%preun (Ville Skyttä, #223689) + +* Fri Dec 22 2006 Jens Petersen - 0.16.1-1 +- update to 0.16.1 + +* Mon Nov 27 2006 Jens Petersen - 0.16-2 +- re-enable openmp on ia64 + +* Thu Nov 23 2006 Jens Petersen - 0.16-1 +- update to 0.16 release +- disable openmp on ia64 (#216988) + +* Fri Oct 27 2006 Jens Petersen - 0.15-1 +- update to 0.15 release +- mkinstalldirs and libintl.jar are gone +- javaversion.class added + +* Mon Oct 2 2006 Jens Petersen - 0.14.6-3 +- buildrequire zip and unzip to fix libintl.jar multilib conflict (#205207) + +* Fri Aug 25 2006 Jens Petersen - 0.14.6-2 +- move libgettext*.so devel files to devel package (Patrice Dumas, #203622) + +* Mon Aug 7 2006 Jens Petersen - 0.14.6-1 +- update to 0.14.6 +- include preloadable_libintl.so again (Roozbeh Pournader, #149809) +- remove .la files (Kjartan Maraas, #172624) +- cleanup spec file + +* Tue Jul 25 2006 Thomas Fitzsimmons - 0.14.5-4 +- Bump release number. + +* Wed Jul 12 2006 Jesse Keating - 0.14.5-3.1 +- rebuild + +* Wed Feb 22 2006 Karsten Hopp 0.14.5-3 +- --disable-csharp, otherwise it'll build a dll when mono is + installed in the buildroot. + +* Fri Feb 10 2006 Jesse Keating - 0.14.5-2.2.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 0.14.5-2.2.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Tue Jan 3 2006 Jesse Keating 0.14.5-2.2 +- rebuilt again + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Wed Sep 28 2005 Jindrich Novy 0.14.5-2 +- convert spec to UTF-8 +- remove old tarballs from sources + +* Thu Aug 11 2005 Leon Ho +- updated to 0.14.5 +- Add cvs as Requires for gettext-devel + +* Mon Mar 21 2005 Leon Ho +- updated to 0.14.3 +- fixed compiling problem on gcc4 (#150992) +- fixed Group for -devel (#138303) +- moved gettextize and autopoint to -devel (#137542, #145768) +- moved some of the man pages + +* Tue Mar 01 2005 Jakub Jelinek +- rebuilt with gcc 4.0 + +* Wed Dec 01 2004 Leon Ho +- Add env var to redirect use fastjar instead of jar +- BuildRequires fastjar and libgcj + +* Mon Nov 01 2004 Leon Ho +- fix call on phase0_getc() +- fix temp file issue (#136323 - CAN-2004-0966 - mjc) + +* Sun Oct 03 2004 Leon Ho +- fixed typo on %%preun on -devel + +* Fri Oct 01 2004 Leon Ho +- fix install_info +- add gcc-java build requirement + +* Mon Sep 13 2004 Leon Ho +- move java stuff to gettext-devel (#132239) +- add BuildRequires: gcc-c++ (#132518) +- add some missing install-info and ldconfig (#131272) +- fix dir ownership (#133696) +- run autotools for 1.9 + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Tue Jun 08 2004 Leon Ho +- use --without-included-gettext to avoid the need of libintl.so (#125497) +- remove preloadable_libintl.so + +* Sun Jun 06 2004 Leon Ho +- moved some of the shared lib to main pkg +- added more build requires + +* Thu Jun 03 2004 Leon Ho +- add conditionals for patch and requires auto* (#125216) + +* Wed Jun 02 2004 Leon Ho +- packaged lib files for devel +- moved some of the files to different sub-pkg +- fix problem on x86_64 build + +* Tue Mar 02 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Mon Feb 02 2004 Leon Ho +- rebuilt to 0.14.1 + +* Fri Sep 19 2003 Leon Ho +- rebuilt 0.12.1 +- fix including files and excludes some patches + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Wed May 14 2003 Leon Ho +- 0.11.5 + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Thu Jan 16 2003 Leon Ho 0.11.4-6 +- add online help for msghack replacement + +* Thu Dec 5 2002 Leon Ho 0.11.4-5 +- add patch to fix gettextize (#78720) + +* Wed Nov 27 2002 Tim Powers 0.11.4-4 +- remove unpackaged files from the buildroot + +* Wed Aug 28 2002 Trond Eivind Glomsrød 0.11.4-3 +- Use %%{_libdir} instead of /usr/lib (#72524) + +* Fri Aug 2 2002 Nalin Dahyabhai 0.11.4-2 +- install ulonglong.m4, which is required by uintmax_t.m4, which is already + being installed + +* Sun Jul 28 2002 Trond Eivind Glomsrød 0.11.4-1 +- 0.11.4 + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Tue May 14 2002 Trond Eivind Glomsrød 0.11.2-1 +- 0.11.2 +- include some new files + +* Fri Apr 5 2002 Trond Eivind Glomsrød 0.11.1-2 +- Add patch to make it compile with C99 compilers (#62313) + +* Wed Mar 13 2002 Trond Eivind Glomsrød 0.11.1-1 +- 0.11.1 + +* Sun Feb 17 2002 Florian La Roche +- update gettext to 0.11 +- disable patch4 + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Wed Dec 5 2001 Trond Eivind Glomsrød 0.10.40-3 +- improve automake handling + +* Wed Nov 14 2001 Trond Eivind Glomsrød 0.10.40-2 +- Add URL +- Add automake workaround (#56081) + +* Sun Sep 16 2001 Trond Eivind Glomsrød 0.10.40-1 +- 0.10.40 - libintl is now LGPLed (it was GPLed). Note that RHL + uses the glibc version, and don't include libintl from gettext. +- include new man pages +- don't include the elisp mode - bundle it into the main emacs package, + like we do for XEmacs. +- README-alpha no longer exists, so don't list it as a doc file + +* Fri Aug 24 2001 Trond Eivind Glomsrød 0.10.38-7 +- Rebuild - this should fix #52463 + +* Wed Aug 22 2001 Trond Eivind Glomsrød 0.10.38-6 +- Fix handling of multiline entries (rest of #50065) +- don't use the references of the last entry in a po file +- remove duplicates when inverting +- Own the en@quot and en@boldquot locale dirs (#52164) +- Handle entries with a first line of "" as identical to those + without + +* Thu Aug 9 2001 Trond Eivind Glomsrød +- Added "--append" and "-o" to msghack, which should address + initial concerns in #50065 + +* Thu Jul 19 2001 Trond Eivind Glomsrød +- New msghack - from scratch, in python + +* Tue Jul 17 2001 Trond Eivind Glomsrød +- msghack is back + +* Mon Jun 4 2001 Trond Eivind Glomsrød +- Include some docfiles + +* Sun Jun 03 2001 Florian La Roche +- 0.10.38 +- do not include charset.alias + +* Wed May 2 2001 Nalin Dahyabhai +- Build statically. + +* Mon Apr 30 2001 Trond Eivind Glomsrød +- 0.10.37 +- Disable all but two patches + +* Sun Feb 25 2001 Trond Eivind Glomsrød +- Initialize proper fonts when entering po-mode (#29152) + +* Mon Feb 12 2001 Yukihiro Nakai +- More fix about msgmerge. + +* Mon Feb 12 2001 Yukihiro Nakai +- Fix for msgmerge not to break multibyte strings + at Japanese locale. + +* Wed Jan 24 2001 Matt Wilson +- fixed the %%lang generator to not have "./" in the lang + +* Sun Jan 14 2001 Trond Eivind Glomsrød +- add an init file for the emacs po-mode +- update source URL + +* Thu Jan 11 2001 Bill Nottingham +- put gettext in /bin for initscripts use +- %%langify + +* Fri Dec 29 2000 Bill Nottingham +- prereq /sbin/install-info + +* Wed Aug 23 2000 Trond Eivind Glomsrød +- Added patch from Ulrich Drepper + +* Fri Aug 04 2000 Trond Eivind Glomsrød +- update DESTDIR patch (#12072) + +* Thu Jul 13 2000 Prospector +- automatic rebuild + +* Mon Jul 10 2000 Trond Eivind Glomsrød +- fix problems wrt to DESTDIR (#12072) + +* Thu Jun 22 2000 Preston Brown +- use FHS paths +- add buildroot patch for .../intl/Makefile.in, was using abs. install path + +* Fri Apr 28 2000 Bill Nottingham +- minor configure tweaks for ia64 + +* Sun Feb 27 2000 Cristian Gafton +- add --comments to msghack + +* Thu Feb 10 2000 Cristian Gafton +- fix bug #9240 - gettextize has the right aclocal patch + +* Wed Jan 12 2000 Cristian Gafton +- add the --diff and --dummy options + +* Wed Oct 06 1999 Cristian Gafton +- add the --missing option to msghack + +* Wed Sep 22 1999 Cristian Gafton +- updated msghack not to merge in fuzzies in the master catalogs + +* Thu Aug 26 1999 Cristian Gafton +- updated msghack to understand --append + +* Wed Aug 11 1999 Cristian Gafton +- updated msghack to correctly deal with sorting files + +* Thu May 06 1999 Cristian Gafton +- msghack updates + +* Sun Mar 21 1999 Cristian Gafton +- auto rebuild in the new build environment (release 8) + +* Mon Mar 08 1999 Cristian Gafton +- added patch for misc hacks to facilitate rpm translations + +* Thu Dec 03 1998 Cristian Gafton +- patch to allow to build on ARM + +* Wed Sep 30 1998 Jeff Johnson +- add Emacs po-mode.el files. + +* Sun Sep 13 1998 Cristian Gafton +- include the aclocal support files + +* Thu Sep 3 1998 Bill Nottingham +- remove devel package (functionality is in glibc) + +* Tue Sep 1 1998 Jeff Johnson +- update to 0.10.35. + +* Mon Jun 29 1998 Jeff Johnson +- add gettextize. +- create devel package for libintl.a and libgettext.h. + +* Mon Apr 27 1998 Prospector System +- translations modified for de, fr, tr + +* Sun Nov 02 1997 Cristian Gafton +- added info handling +- added misc-patch (skip emacs-lisp modofications) + +* Sat Nov 01 1997 Erik Troan +- removed locale.aliases as we get it from glibc now +- uses a buildroot + +* Mon Jun 02 1997 Erik Troan +- Built against glibc diff --git a/msghack.1 b/msghack.1 new file mode 100644 index 0000000..42fcc5b --- /dev/null +++ b/msghack.1 @@ -0,0 +1,45 @@ +.TH MSGHACK "1" "June 2013" "msghack" "User Commands" +.SH NAME +msghack \- alter PO files in ways +.SH SYNOPSIS +.B msghack +[\fIOPTION\fR] \fIfile.po \fR[\fIref.po\fR] +.SH DESCRIPTION +.PP +This program can be used to alter .po files in ways no sane mind would think about. +.TP +\fB\-o\fR +result will be written to FILE +.TP +\fB\-\-invert\fR +invert a po file by switching msgid and msgstr +.TP +\fB\-\-master\fR +join any number of files in a master\-formatted catalog +.TP +\fB\-\-empty\fR +empty the contents of the .po file, creating a .pot +.TP +\fB\-\-append\fR +append entries from ref.po that don't exist in file.po +.PP +Note: It is just a replacement of msghack for backward support. +.PP +This program can be used to alter .po files in ways no sane mind would think about. +.TP +\fB\-o\fR +result will be written to FILE +.TP +\fB\-\-invert\fR +invert a po file by switching msgid and msgstr +.TP +\fB\-\-master\fR +join any number of files in a master\-formatted catalog +.TP +\fB\-\-empty\fR +empty the contents of the .po file, creating a .pot +.TP +\fB\-\-append\fR +append entries from ref.po that don't exist in file.po +.PP +Note: It is just a replacement of msghack for backward support. diff --git a/msghack.py b/msghack.py new file mode 100755 index 0000000..358552c --- /dev/null +++ b/msghack.py @@ -0,0 +1,417 @@ +#!/usr/bin/python3 +## -*- coding: utf-8 -*- +## Copyright (C) 2001, 2004, 2008, 2012 Red Hat, Inc. +## Copyright (C) 2001 Trond Eivind Glomsrød + +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. + +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. + +## You should have received a copy of the GNU General Public License +## along with this program. If not, see . + +""" +A msghack replacement +""" + +import sys + +class GTMessage: + """ + A class containing a message, its msgid and various references pointing at it + """ + + def __init__(self,id=None,message=None,refs=[]): + """ + The constructor for the GTMessage class + @self The object instance + @message The message + @id The messageid associated with the object + """ + self._message=message.strip() + self._id=id.strip() + self._refs=[] + for ref in refs: + self._refs.append(ref) + + def __str__(self): + """ + Return a string representation of the object + @self The object instance + """ + res="" + for ref in self._refs: + res=res+ref+"\n" + res=res+"msgid %s\nmsgstr %s\n" % (self._id,self._message) + return res + + def invertedStrings(self): + """ + Returns a string representation, but with msgid and msgstr inverted. + Note: Don't invert the "" string + @self The object instance + """ + res="" + for ref in self._refs: + res=res+ref+"\n" + if not self._id=="\"\"": + res=res+"msgid %s\nmsgstr %s\n" % (self._message,self._id) + else: + res=res+"msgid %s\nmsgstr %s\n" % (self._id,self._message) + return res + + def emptyMsgStrings(self): + """ + Return a string representation of the object, but leave the msgstr + empty - create a pot file from a po file + Note: Won't remove the "" string + @self The object instance + """ + res="" + for ref in self._refs: + res=res+ref+"\n" + if not self._id=="\"\"": + res=res+"msgid %s\nmsgstr \"\"\n" % (self._id) + else: + res=res+"msgid %s\nmsgstr %s\n" % (self._id,self._message) + return res + + def compareMessage(self,msg): + """ + Return if the messages have identical msgids, 0 otherwise + @self The object instance + @msg The message to compare to + """ + + if self._id == msg._id: + return 1 + return 0 + + +class GTMasterMessage: + """ + A class containing a message, its msgid and various references pointing at it + The difference between GTMessage and GTMasterMessage is that this class + can do less operations, but is able to store multiple msgstrs with identifiers + (usually language, like 'msgst(no)' + """ + + def __init__(self,id=None,refs=[]): + """ + The constructor for the GTMessage class + @self The object instance + @id The messageid associated with the object + """ + self._id=id + self._refs=[] + self._messages=[] + for ref in refs: + self._refs.append(ref) + + def addMessage(self,message,identifier): + """ + Add a new message and identifier to the GTMasterMessage object + @self The object instance + @message The message to append + @identifier The identifier of the message + """ + self._messages.append((identifier,message)) + + def __str__(self): + """ + Return a string representation of the object + @self The object instance + """ + res="" + for ref in self._refs: + res=res+ref+"\n" + res=res+"msgid %s\n" % self._id + for message in self._messages: + res=res+"msgstr(%s) %s\n" %(message[0],message[1]) + res=res+"\n" + return res + +class GTFile: + """ + A class containing the GTMessages contained in a file + """ + + def __init__(self,filename): + """ + The constructor of the GTMFile class + @self The object instance + @filename The file to initialize from + """ + self._filename=filename + self._messages=[] + self.readFile(filename) + + def __str__(self): + """ + Return a string representation of the object + @self The object instance + """ + res="" + for message in self._messages: + res=res+str(message)+"\n" + return res + + def invertedStrings(self): + """ + Return a string representation of the object, with msgid and msgstr + swapped. Will remove duplicates... + @self The object instance + """ + + msght={} + msgar=[] + + for message in self._messages: + if message._id=='""' and len(msgar)==0: + msgar.append(GTMessage(message._id,message._message,message._refs)) + continue + msg=GTMessage(message._message,message._id,message._refs) + if msg._id not in msght: + msght[msg._id]=msg + msgar.append(msg) + else: + msg2=msght[msg._id] + for ref in msg._refs: + msg2._refs.append(ref) + res="" + for message in msgar: + res=res+str(message)+"\n" + return res + + def msgidDupes(self): + """ + Search for duplicates in the msgids. + @self The object instance + """ + msgids={} + res="" + for message in self._messages: + msgid=message._id + if msgid in msgids: + res=res+"Duplicate: %s\n" % (msgid) + else: + msgids[msgid]=1 + return res + + def getMsgstr(self,msgid): + """ + Return the msgstr matching the given id. 'None' if missing + @self The object instance + @msgid The msgid key + """ + + for message in self._messages: + if msgid == message._id: + return message._message + return None + + def emptyMsgStrings(self): + """ + Return a string representation of the object, but leave the msgstr + empty - create a pot file from a po file + @self The object instance + """ + + res="" + for message in self._messages: + res=res+message.emptyMsgStrings()+"\n" + return res + + + def append(self,B): + """ + Append entries from dictionary B which aren't + already present in this dictionary + @self The object instance + @B the dictionary to append messages from + """ + + for message in B._messages: + if not self.getMsgstr(message._id): + self._messages.append(message) + + + def readFile(self,filename): + """ + Read the contents of a file into the GTFile object + @self The object instance + @filename The name of the file to read + """ + + file=open(filename,"r") + msgid="" + msgstr="" + refs=[] + lines=[] + inmsgid=0 + inmsgstr=0 + templines=file.readlines() + for line in templines: + lines.append(line.strip()) + for line in lines: + pos=line.find('"') + pos2=line.rfind('"') + if line and line[0]=="#": + refs.append(line.strip()) + if inmsgstr==0 and line[:6]=="msgstr": + msgstr="" + inmsgstr=1 + inmsgid=0 + if inmsgstr==1: + if pos==-1: + inmsgstr=0 + #Handle entries with and without "" consistently + if msgid[:2]=='""' and len(msgid)>4: + msgid=msgid[2:] + if msgstr[:2]=='""' and len(msgstr)>4: + msgstr=msgstr[2:] + message=GTMessage(msgid,msgstr,refs) + self._messages.append(message) + msgstr="" + msgid="" + refs=[] + else: + msgstr=msgstr+line[pos:pos2+1]+"\n" + if inmsgid==0 and line[:5]=="msgid": + msgid="" + inmsgid=1 + if inmsgid==1: + if pos==-1: + inmsgid=0 + else: + msgid=msgid+line[pos:pos2+1]+"\n" + if msgstr and msgid: + message=GTMessage(msgid,msgstr,refs) + self._messages.append(message) + + +class GTMaster: + """ + A class containing a master catalogue of gettext dictionaries + """ + + def __init__(self,dicts): + """ + The constructor for the GTMaster class + @self The object instance + @dicts An array of dictionaries to merge + """ + self._messages=[] + self.createMaster(dicts) + + def createMaster(self,dicts): + """ + Create the master catalogue + @self The object instance + @dicts An array of dictionaries to merge + """ + + self._master=dicts[0] + self._dicts=dicts[1:] + + for message in self._master._messages: + gtm=GTMasterMessage(message._id,message._refs) + gtm.addMessage(message._message,self._master._filename[:-3]) + for dict in self._dicts: + res=dict.getMsgstr(message._id) + if(res): + gtm.addMessage(res,dict._filename[:-3]) + self._messages.append(gtm) + + def __str__(self): + """ + Return a string representation of the object + @self The object instance + """ + res="" + for message in self._messages: + res=res+str(message)+"\n" + return res + +def printUsage(): + "Print the usage messages" + print("Usage: " + str(sys.argv[0]) + " [OPTION] file.po [ref.po]\n\ +This program can be used to alter .po files in ways no sane mind would think about.\n\ + -o result will be written to FILE\n\ + --invert invert a po file by switching msgid and msgstr\n\ + --master join any number of files in a master-formatted catalog\n\ + --empty empty the contents of the .po file, creating a .pot\n\ + --append append entries from ref.po that don't exist in file.po\n\ +\n\ +Note: It is just a replacement of msghack for backward support.\n") + + +if __name__=="__main__": + output=None + res=None + if("-o") in sys.argv: + if (len(sys.argv)<=sys.argv.index("-o")+1): + print("file.po and ref.po are not specified!\n") + printUsage() + exit(1) + output=sys.argv[sys.argv.index("-o")+1] + sys.argv.remove("-o") + sys.argv.remove(output) + if("--invert") in sys.argv: + if (len(sys.argv)<=sys.argv.index("--invert")+1): + print("file.po is not specified!\n") + printUsage() + exit(1) + file=sys.argv[sys.argv.index("--invert")+1] + gtf=GTFile(file) + res1=gtf.msgidDupes() + if res1: + sys.stderr.write(res1) + sys.exit(1) + res=str(gtf.invertedStrings()) + elif("--empty") in sys.argv: + if (len(sys.argv)<=sys.argv.index("--empty")+1): + print("file.po is not specified!\n") + printUsage() + exit(1) + file=sys.argv[sys.argv.index("--empty")+1] + gtf=GTFile(file) + res=str(gtf.emptyMsgStrings()) + elif("--master") in sys.argv: + if (len(sys.argv)<=sys.argv.index("--master")+1): + print("file.po is not specified!\n") + printUsage() + exit(1) + loc=sys.argv.index("--master")+1 + gtfs=[] + for file in sys.argv[loc:]: + gtfs.append(GTFile(file)) + master=GTMaster(gtfs) + res=str(master) + elif("--append") in sys.argv: + if (len(sys.argv)<=sys.argv.index("--append")+2): + print("file.po and/or ref.po are not specified!\n") + printUsage() + exit(1) + file=sys.argv[sys.argv.index("--append")+1] + file2=sys.argv[sys.argv.index("--append")+2] + gtf=GTFile(file) + gtf2=GTFile(file2) + gtf.append(gtf2) + res=str(gtf) + else: + #print("Not implemented: "+str(sys.argv)) + printUsage() + sys.exit(1) + if not output: + print(res) + else: + file=open(output,"w") + file.write(res) + sys.exit(0) diff --git a/sources b/sources new file mode 100644 index 0000000..5cf8953 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +df3f5690eaa30fd228537b00cb7b7590 gettext-0.19.8.1.tar.xz diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..54627ef --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,16 @@ +--- +# Tests run on Atomic, Classic and Container +- hosts: localhost + roles: + - role: standard-test-beakerlib + tags: + - atomic + - classic + - container + repositories: + - repo: "https://src.fedoraproject.org/tests/gettext.git" + dest: "gettext" + tests: + - gettext/gettext-tests + required_packages: + - gettext From 76b502edb81c6e517add51b14bb4b75f9aa97988 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 9 Aug 2019 13:14:23 +0200 Subject: [PATCH 19/89] temporarily disable testsuite to workaround FTBFS --- gettext.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gettext.spec b/gettext.spec index 5b1ede0..7736a7e 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,6 +1,6 @@ %bcond_with jar %bcond_with java -%bcond_without check +%bcond_with check %global tarversion 0.19.8.1 %global archiveversion 0.19.8 @@ -8,7 +8,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.19.8.1 -Release: 21%{?dist} +Release: 22%{?dist} License: GPLv3+ and LGPLv2+ URL: http://www.gnu.org/software/gettext/ Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{tarversion}.tar.xz @@ -323,6 +323,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Fri Aug 9 2019 Jens Petersen - 0.19.8.1-22 +- temporarily disable testsuite (#1735245) + * Thu Jul 25 2019 Fedora Release Engineering - 0.19.8.1-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From f06c2682abcf26176ade3ff046cad2ffacb09d5c Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Sat, 10 Aug 2019 17:09:27 +0530 Subject: [PATCH 20/89] Update to 0.20.1 release --- disable-gettext-runtime-test-lock.patch | 47 --- gettext-0.19.8-its-segfault.patch | 43 --- gettext-0.19.8.1-CVE-2018-18751.patch | 445 ------------------------ gettext-po-send-mail.patch | 21 -- gettext.spec | 168 ++++++--- sources | 2 +- 6 files changed, 126 insertions(+), 600 deletions(-) delete mode 100644 disable-gettext-runtime-test-lock.patch delete mode 100644 gettext-0.19.8-its-segfault.patch delete mode 100644 gettext-0.19.8.1-CVE-2018-18751.patch delete mode 100644 gettext-po-send-mail.patch diff --git a/disable-gettext-runtime-test-lock.patch b/disable-gettext-runtime-test-lock.patch deleted file mode 100644 index ec3a59b..0000000 --- a/disable-gettext-runtime-test-lock.patch +++ /dev/null @@ -1,47 +0,0 @@ -commit bd2c6ca2b7ae0be02d4bb85db79def454f3153fb -Author: rpm-build -AuthorDate: Wed Dec 21 12:50:54 2016 +0100 -Commit: rpm-build -CommitDate: Wed Dec 21 12:52:36 2016 +0100 - - disable-gettext-runtime-test-lock.patch - -diff --git a/gettext-runtime/tests/Makefile.am b/gettext-runtime/tests/Makefile.am -index 88a0684..3a27b79 100644 ---- a/gettext-runtime/tests/Makefile.am -+++ b/gettext-runtime/tests/Makefile.am -@@ -19,7 +19,7 @@ - AUTOMAKE_OPTIONS = 1.11 gnits no-dependencies color-tests subdir-objects - EXTRA_DIST = - --TESTS = test-lock -+TESTS = - - AM_CPPFLAGS = \ - -I.. \ -diff --git a/gettext-runtime/tests/Makefile.in b/gettext-runtime/tests/Makefile.in -index 4327733..5879146 100644 ---- a/gettext-runtime/tests/Makefile.in -+++ b/gettext-runtime/tests/Makefile.in -@@ -86,7 +86,7 @@ PRE_UNINSTALL = : - POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ --TESTS = test-lock$(EXEEXT) -+TESTS = - check_PROGRAMS = test-lock$(EXEEXT) - subdir = tests - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -diff --git a/gettext-tools/gnulib-tests/Makefile.in b/gettext-tools/gnulib-tests/Makefile.in -index 26becd9..4b9d0e4 100644 ---- a/gettext-tools/gnulib-tests/Makefile.in -+++ b/gettext-tools/gnulib-tests/Makefile.in -@@ -143,7 +143,7 @@ TESTS = test-set-mode-acl.sh test-set-mode-acl-1.sh \ - test-isnanl-nolibm$(EXEEXT) test-isnanl$(EXEEXT) \ - test-iswblank$(EXEEXT) test-langinfo$(EXEEXT) \ - test-linkedhash_list$(EXEEXT) test-locale$(EXEEXT) \ -- test-localename$(EXEEXT) test-lock$(EXEEXT) \ -+ test-localename$(EXEEXT) \ - test-log10$(EXEEXT) test-lseek.sh test-lstat$(EXEEXT) \ - test-malloca$(EXEEXT) test-math$(EXEEXT) test-mbrtowc1.sh \ - test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \ diff --git a/gettext-0.19.8-its-segfault.patch b/gettext-0.19.8-its-segfault.patch deleted file mode 100644 index 430719f..0000000 --- a/gettext-0.19.8-its-segfault.patch +++ /dev/null @@ -1,43 +0,0 @@ -From a0cab23332a254e3500cac2a3a984472d02180e5 Mon Sep 17 00:00:00 2001 -From: Bruno Haible -Date: Fri, 9 Dec 2016 21:04:31 +0100 -Subject: [PATCH] Fix crash of xgettext with --its option. - -* gettext-tools/src/xgettext.c (main): Free contents of its_dirs only when it -was initialized. Fixes bug introduced on 2016-05-16. ---- - gettext-tools/src/xgettext.c | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c -index f848d76d1..a80ee51ac 100644 ---- a/gettext-tools/src/xgettext.c -+++ b/gettext-tools/src/xgettext.c -@@ -330,7 +330,7 @@ main (int argc, char *argv[]) - bool sort_by_msgid = false; - bool sort_by_filepos = false; - char **dirs; -- char **its_dirs; -+ char **its_dirs = NULL; - char *explicit_its_filename = NULL; - const char *file_name; - const char *files_from = NULL; -@@ -1016,9 +1016,12 @@ warning: file '%s' extension '%s' is unknown; will try C"), filename, extension) - if (its_locating_rules) - locating_rule_list_free (its_locating_rules); - -- for (i = 0; its_dirs[i] != NULL; i++) -- free (its_dirs[i]); -- free (its_dirs); -+ if (its_dirs != NULL) -+ { -+ for (i = 0; its_dirs[i] != NULL; i++) -+ free (its_dirs[i]); -+ free (its_dirs); -+ } - - exit (EXIT_SUCCESS); - } --- -2.14.3 - diff --git a/gettext-0.19.8.1-CVE-2018-18751.patch b/gettext-0.19.8.1-CVE-2018-18751.patch deleted file mode 100644 index a857738..0000000 --- a/gettext-0.19.8.1-CVE-2018-18751.patch +++ /dev/null @@ -1,445 +0,0 @@ -From dce3a16e5e9368245735e29bf498dcd5e3e474a4 Mon Sep 17 00:00:00 2001 -From: Daiki Ueno -Date: Thu, 15 Sep 2016 13:57:24 +0200 -Subject: [PATCH] xgettext: Fix crash with *.po file input - -When xgettext was given two *.po files with the same msgid_plural, it -crashed with double-free. Problem reported by Davlet Panech in: -http://lists.gnu.org/archive/html/bug-gettext/2016-09/msg00001.html - -praiskup: -- I dropped the testsuite part, otherwise we'd have to 'autoreconf -vif' the - sources -- I'm patching manually the po-gram-gen.c file to avoid 'bison' BR - -diff --git a/gettext-tools/src/po-gram-gen.y b/gettext-tools/src/po-gram-gen.y -index becf5e607..4428e7725 100644 ---- a/gettext-tools/src/po-gram-gen.y -+++ b/gettext-tools/src/po-gram-gen.y -@@ -221,14 +221,11 @@ message - check_obsolete ($1, $3); - check_obsolete ($1, $4); - if (!$1.obsolete || pass_obsolete_entries) -- { -- do_callback_message ($1.ctxt, string2, &$1.pos, $3.string, -- $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos, -- $1.prev_ctxt, -- $1.prev_id, $1.prev_id_plural, -- $1.obsolete); -- free ($3.string); -- } -+ do_callback_message ($1.ctxt, string2, &$1.pos, $3.string, -+ $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos, -+ $1.prev_ctxt, -+ $1.prev_id, $1.prev_id_plural, -+ $1.obsolete); - else - { - free_message_intro ($1); -diff --git a/gettext-tools/src/read-catalog.c b/gettext-tools/src/read-catalog.c -index 571d18e1b..6af6d2025 100644 ---- a/gettext-tools/src/read-catalog.c -+++ b/gettext-tools/src/read-catalog.c -@@ -397,6 +397,8 @@ default_add_message (default_catalog_reader_ty *this, - appropriate. */ - mp = message_alloc (msgctxt, msgid, msgid_plural, msgstr, msgstr_len, - msgstr_pos); -+ if (msgid_plural != NULL) -+ free (msgid_plural); - mp->prev_msgctxt = prev_msgctxt; - mp->prev_msgid = prev_msgid; - mp->prev_msgid_plural = prev_msgid_plural; -diff --git a/gettext-tools/src/po-gram-gen.c b/gettext-tools/src/po-gram-gen.c ---- a/gettext-tools/src/po-gram-gen.c -+++ b/gettext-tools/src/po-gram-gen.c -@@ -1,8 +1,8 @@ --/* A Bison parser, made by GNU Bison 3.0.4. */ -+/* A Bison parser, made by GNU Bison 3.0.5. */ - - /* Bison implementation for Yacc-like parsers in C - -- Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. -+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by -@@ -44,7 +44,7 @@ - #define YYBISON 1 - - /* Bison version. */ --#define YYBISON_VERSION "3.0.4" -+#define YYBISON_VERSION "3.0.5" - - /* Skeleton name. */ - #define YYSKELETON_NAME "yacc.c" -@@ -568,9 +568,9 @@ - static const yytype_uint16 yyrline[] = - { - 0, 169, 169, 171, 172, 173, 174, 179, 187, 195, -- 216, 240, 249, 258, 269, 278, 292, 301, 315, 321, -- 332, 338, 350, 361, 372, 376, 391, 414, 422, 434, -- 442 -+ 216, 237, 246, 255, 266, 275, 289, 298, 312, 318, -+ 329, 335, 347, 358, 369, 373, 388, 411, 419, 431, -+ 439 - }; - #endif - -@@ -1054,6 +1054,7 @@ - case N: \ - yyformat = S; \ - break -+ default: /* Avoid compiler warnings. */ - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); -@@ -1370,23 +1371,23 @@ - switch (yyn) - { - case 7: --#line 180 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 180 "po-gram-gen.y" /* yacc.c:1648 */ - { - po_callback_comment_dispatcher ((yyvsp[0].string).string); - } --#line 1378 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1379 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 8: --#line 188 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 188 "po-gram-gen.y" /* yacc.c:1648 */ - { - po_callback_domain ((yyvsp[0].string).string); - } --#line 1386 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1387 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 9: --#line 196 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 196 "po-gram-gen.y" /* yacc.c:1648 */ - { - char *string2 = string_list_concat_destroy (&(yyvsp[-2].stringlist).stringlist); - char *string4 = string_list_concat_destroy (&(yyvsp[0].stringlist).stringlist); -@@ -1407,11 +1408,11 @@ - free (string4); - } - } --#line 1411 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1412 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 10: --#line 217 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 217 "po-gram-gen.y" /* yacc.c:1648 */ - { - char *string2 = string_list_concat_destroy (&(yyvsp[-2].stringlist).stringlist); - -@@ -1419,14 +1420,11 @@ - check_obsolete ((yyvsp[-3].message_intro), (yyvsp[-1].string)); - check_obsolete ((yyvsp[-3].message_intro), (yyvsp[0].rhs)); - if (!(yyvsp[-3].message_intro).obsolete || pass_obsolete_entries) -- { -- do_callback_message ((yyvsp[-3].message_intro).ctxt, string2, &(yyvsp[-3].message_intro).pos, (yyvsp[-1].string).string, -- (yyvsp[0].rhs).rhs.msgstr, (yyvsp[0].rhs).rhs.msgstr_len, &(yyvsp[0].rhs).pos, -- (yyvsp[-3].message_intro).prev_ctxt, -- (yyvsp[-3].message_intro).prev_id, (yyvsp[-3].message_intro).prev_id_plural, -- (yyvsp[-3].message_intro).obsolete); -- free ((yyvsp[-1].string).string); -- } -+ do_callback_message ((yyvsp[-3].message_intro).ctxt, string2, &(yyvsp[-3].message_intro).pos, (yyvsp[-1].string).string, -+ (yyvsp[0].rhs).rhs.msgstr, (yyvsp[0].rhs).rhs.msgstr_len, &(yyvsp[0].rhs).pos, -+ (yyvsp[-3].message_intro).prev_ctxt, -+ (yyvsp[-3].message_intro).prev_id, (yyvsp[-3].message_intro).prev_id_plural, -+ (yyvsp[-3].message_intro).obsolete); - else - { - free_message_intro ((yyvsp[-3].message_intro)); -@@ -1435,11 +1433,11 @@ - free ((yyvsp[0].rhs).rhs.msgstr); - } - } --#line 1439 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1437 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 11: --#line 241 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 238 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-2].message_intro), (yyvsp[-1].stringlist)); - check_obsolete ((yyvsp[-2].message_intro), (yyvsp[0].string)); -@@ -1448,11 +1446,11 @@ - string_list_destroy (&(yyvsp[-1].stringlist).stringlist); - free ((yyvsp[0].string).string); - } --#line 1452 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1450 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 12: --#line 250 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 247 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-2].message_intro), (yyvsp[-1].stringlist)); - check_obsolete ((yyvsp[-2].message_intro), (yyvsp[0].rhs)); -@@ -1461,22 +1459,22 @@ - string_list_destroy (&(yyvsp[-1].stringlist).stringlist); - free ((yyvsp[0].rhs).rhs.msgstr); - } --#line 1465 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1463 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 13: --#line 259 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 256 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-1].message_intro), (yyvsp[0].stringlist)); - po_gram_error_at_line (&(yyvsp[-1].message_intro).pos, _("missing 'msgstr' section")); - free_message_intro ((yyvsp[-1].message_intro)); - string_list_destroy (&(yyvsp[0].stringlist).stringlist); - } --#line 1476 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1474 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 14: --#line 270 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 267 "po-gram-gen.y" /* yacc.c:1648 */ - { - (yyval.message_intro).prev_ctxt = NULL; - (yyval.message_intro).prev_id = NULL; -@@ -1485,11 +1483,11 @@ - (yyval.message_intro).pos = (yyvsp[0].string).pos; - (yyval.message_intro).obsolete = (yyvsp[0].string).obsolete; - } --#line 1489 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1487 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 15: --#line 279 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 276 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-1].prev), (yyvsp[0].string)); - (yyval.message_intro).prev_ctxt = (yyvsp[-1].prev).ctxt; -@@ -1499,11 +1497,11 @@ - (yyval.message_intro).pos = (yyvsp[0].string).pos; - (yyval.message_intro).obsolete = (yyvsp[0].string).obsolete; - } --#line 1503 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1501 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 16: --#line 293 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 290 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-1].string), (yyvsp[0].stringlist)); - (yyval.prev).ctxt = (yyvsp[-1].string).string; -@@ -1512,11 +1510,11 @@ - (yyval.prev).pos = (yyvsp[-1].string).pos; - (yyval.prev).obsolete = (yyvsp[-1].string).obsolete; - } --#line 1516 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1514 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 17: --#line 302 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 299 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-2].string), (yyvsp[-1].stringlist)); - check_obsolete ((yyvsp[-2].string), (yyvsp[0].string)); -@@ -1526,21 +1524,21 @@ - (yyval.prev).pos = (yyvsp[-2].string).pos; - (yyval.prev).obsolete = (yyvsp[-2].string).obsolete; - } --#line 1530 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1528 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 18: --#line 316 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 313 "po-gram-gen.y" /* yacc.c:1648 */ - { - (yyval.string).string = NULL; - (yyval.string).pos = (yyvsp[0].pos).pos; - (yyval.string).obsolete = (yyvsp[0].pos).obsolete; - } --#line 1540 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1538 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 19: --#line 322 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 319 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-2].pos), (yyvsp[-1].stringlist)); - check_obsolete ((yyvsp[-2].pos), (yyvsp[0].pos)); -@@ -1548,21 +1546,21 @@ - (yyval.string).pos = (yyvsp[0].pos).pos; - (yyval.string).obsolete = (yyvsp[0].pos).obsolete; - } --#line 1552 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1550 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 20: --#line 333 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 330 "po-gram-gen.y" /* yacc.c:1648 */ - { - (yyval.string).string = NULL; - (yyval.string).pos = (yyvsp[0].pos).pos; - (yyval.string).obsolete = (yyvsp[0].pos).obsolete; - } --#line 1562 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1560 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 21: --#line 339 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 336 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-2].pos), (yyvsp[-1].stringlist)); - check_obsolete ((yyvsp[-2].pos), (yyvsp[0].pos)); -@@ -1570,11 +1568,11 @@ - (yyval.string).pos = (yyvsp[0].pos).pos; - (yyval.string).obsolete = (yyvsp[0].pos).obsolete; - } --#line 1574 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1572 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 22: --#line 351 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 348 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-1].pos), (yyvsp[0].stringlist)); - plural_counter = 0; -@@ -1582,30 +1580,30 @@ - (yyval.string).pos = (yyvsp[-1].pos).pos; - (yyval.string).obsolete = (yyvsp[-1].pos).obsolete; - } --#line 1586 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1584 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 23: --#line 362 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 359 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-1].pos), (yyvsp[0].stringlist)); - (yyval.string).string = string_list_concat_destroy (&(yyvsp[0].stringlist).stringlist); - (yyval.string).pos = (yyvsp[-1].pos).pos; - (yyval.string).obsolete = (yyvsp[-1].pos).obsolete; - } --#line 1597 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1595 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 24: --#line 373 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 370 "po-gram-gen.y" /* yacc.c:1648 */ - { - (yyval.rhs) = (yyvsp[0].rhs); - } --#line 1605 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1603 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 25: --#line 377 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 374 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-1].rhs), (yyvsp[0].rhs)); - (yyval.rhs).rhs.msgstr = XNMALLOC ((yyvsp[-1].rhs).rhs.msgstr_len + (yyvsp[0].rhs).rhs.msgstr_len, char); -@@ -1617,11 +1615,11 @@ - (yyval.rhs).pos = (yyvsp[-1].rhs).pos; - (yyval.rhs).obsolete = (yyvsp[-1].rhs).obsolete; - } --#line 1621 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1619 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 26: --#line 392 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 389 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-4].pos), (yyvsp[-3].pos)); - check_obsolete ((yyvsp[-4].pos), (yyvsp[-2].number)); -@@ -1640,11 +1638,11 @@ - (yyval.rhs).pos = (yyvsp[-4].pos).pos; - (yyval.rhs).obsolete = (yyvsp[-4].pos).obsolete; - } --#line 1644 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1642 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 27: --#line 415 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 412 "po-gram-gen.y" /* yacc.c:1648 */ - { - string_list_init (&(yyval.stringlist).stringlist); - string_list_append (&(yyval.stringlist).stringlist, (yyvsp[0].string).string); -@@ -1652,11 +1650,11 @@ - (yyval.stringlist).pos = (yyvsp[0].string).pos; - (yyval.stringlist).obsolete = (yyvsp[0].string).obsolete; - } --#line 1656 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1654 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 28: --#line 423 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 420 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-1].stringlist), (yyvsp[0].string)); - (yyval.stringlist).stringlist = (yyvsp[-1].stringlist).stringlist; -@@ -1665,11 +1663,11 @@ - (yyval.stringlist).pos = (yyvsp[-1].stringlist).pos; - (yyval.stringlist).obsolete = (yyvsp[-1].stringlist).obsolete; - } --#line 1669 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1667 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 29: --#line 435 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 432 "po-gram-gen.y" /* yacc.c:1648 */ - { - string_list_init (&(yyval.stringlist).stringlist); - string_list_append (&(yyval.stringlist).stringlist, (yyvsp[0].string).string); -@@ -1677,11 +1675,11 @@ - (yyval.stringlist).pos = (yyvsp[0].string).pos; - (yyval.stringlist).obsolete = (yyvsp[0].string).obsolete; - } --#line 1681 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1679 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - case 30: --#line 443 "po-gram-gen.y" /* yacc.c:1646 */ -+#line 440 "po-gram-gen.y" /* yacc.c:1648 */ - { - check_obsolete ((yyvsp[-1].stringlist), (yyvsp[0].string)); - (yyval.stringlist).stringlist = (yyvsp[-1].stringlist).stringlist; -@@ -1690,11 +1688,11 @@ - (yyval.stringlist).pos = (yyvsp[-1].stringlist).pos; - (yyval.stringlist).obsolete = (yyvsp[-1].stringlist).obsolete; - } --#line 1694 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1692 "po-gram-gen.c" /* yacc.c:1648 */ - break; - - --#line 1698 "po-gram-gen.c" /* yacc.c:1646 */ -+#line 1696 "po-gram-gen.c" /* yacc.c:1648 */ - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires --- -2.19.1 - diff --git a/gettext-po-send-mail.patch b/gettext-po-send-mail.patch deleted file mode 100644 index 2602e1d..0000000 --- a/gettext-po-send-mail.patch +++ /dev/null @@ -1,21 +0,0 @@ -Index: gettext-0.19.8.1/gettext-tools/misc/po-mode.el -=================================================================== ---- gettext-0.19.8.1.orig/gettext-tools/misc/po-mode.el -+++ gettext-0.19.8.1/gettext-tools/misc/po-mode.el -@@ -3518,10 +3518,12 @@ Write to your team? ('n' if writing to - (re-search-forward - (concat "^" (regexp-quote mail-header-separator) "\n")) - (save-excursion -- (insert-buffer-substring buffer) -- (shell-command-on-region -- (region-beginning) (region-end) -- (concat po-gzip-uuencode-command " " name ".gz") t t)))))) -+ (save-restriction -+ (narrow-to-region (point) (point)) -+ (insert-buffer-substring buffer) -+ (shell-command-on-region -+ (point-min) (point-max) -+ (concat po-gzip-uuencode-command " " name ".gz") t t))))))) - (message "")) - - (defun po-confirm-and-quit () diff --git a/gettext.spec b/gettext.spec index 7736a7e..e277a7e 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,31 +1,32 @@ %bcond_with jar %bcond_with java -%bcond_with check -%global tarversion 0.19.8.1 -%global archiveversion 0.19.8 +%global tarversion 0.20.1 +%global archiveversion 0.20 Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext -Version: 0.19.8.1 -Release: 22%{?dist} -License: GPLv3+ and LGPLv2+ +Version: %{tarversion} +Release: 1%{?dist} +# The following are licensed under LGPLv2+: +# - libintl and its headers +# - libasprintf and its headers +# - libintl.jar +# - GNU.Gettext.dll +# - gettext.sh +# The following are licensed under GFDL: +# - gettext-tools/doc/FAQ.html +# - gettext-tools/doc/tutorial.html +# - gettext info files +# - libasprintf info files +# - libtextstyle info files +# Everything else is GPLv3+ +License: GPLv3+ and LGPLv2+ and GFDL URL: http://www.gnu.org/software/gettext/ -Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{tarversion}.tar.xz -# Disable the test_lock test as it often hangs on a number of arches -# https://bugzilla.redhat.com/show_bug.cgi?id=1155291 -# http://savannah.gnu.org/bugs/?43487 -Patch0: disable-gettext-runtime-test-lock.patch -# Upstreamed patch: -# http://lists.gnu.org/archive/html/bug-gettext/2016-08/msg00006.html -Patch1: gettext-po-send-mail.patch -# Rhbz#1531476, upstream a0cab23332a254e3500cac2a3a984472d02180e5 -Patch2: gettext-0.19.8-its-segfault.patch -# rhbz#1647044 -Patch3: gettext-0.19.8.1-CVE-2018-18751.patch - +Source: https://ftp.gnu.org/pub/gnu/gettext/%{name}-%{version}.tar.xz Source2: msghack.py Source3: msghack.1 + # for bootstrapping # BuildRequires: autoconf >= 2.62 # BuildRequires: automake @@ -50,18 +51,29 @@ BuildRequires: emacs BuildRequires: git # ensure 'ARCHIVE_FORMAT=dirxz' BuildRequires: xz -BuildRequires: chrpath +# for documentation +BuildRequires: teckit +BuildRequires: texlive-dvips +BuildRequires: texlive-dvipdfmx +BuildRequires: texinfo-tex +BuildRequires: texlive-xetex # following suggested by DEPENDENCIES: BuildRequires: ncurses-devel BuildRequires: libxml2-devel BuildRequires: glib2-devel +BuildRequires: libacl-devel BuildRequires: libcroco-devel BuildRequires: libunistring-devel +# for the tests +BuildRequires: glibc-langpack-de +BuildRequires: glibc-langpack-en +BuildRequires: glibc-langpack-fa +BuildRequires: glibc-langpack-fr +BuildRequires: glibc-langpack-ja +BuildRequires: glibc-langpack-tr +BuildRequires: glibc-langpack-zh # Depend on the exact version of the library sub package Requires: %{name}-libs%{_isa} = %{version}-%{release} -# for F17 UsrMove -Conflicts: filesystem < 3 -Provides: /bin/gettext # exception for bundled gnulib copylib Provides: bundled(gnulib) @@ -93,7 +105,7 @@ Summary: Development files for %{name} # autopoint is GPLv3+ # libasprintf is LGPLv2+ # libgettextpo is GPLv3+ -License: LGPLv2+ and GPLv3+ +License: LGPLv2+ and GPLv3+ and GFDL Requires: %{name} = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-common-devel = %{version}-%{release} @@ -118,6 +130,26 @@ License: LGPLv2+ and GPLv3+ This package contains libraries used internationalization support. +%package -n libtextstyle +Summary: Text styling library +License: GPLv3+ + +%description -n libtextstyle +Library for producing styled text to be displayed in a terminal +emulator. + + +%package -n libtextstyle-devel +Summary: Development files for libtextstyle +License: GPLv3+ and GFDL +Requires: libtextstyle%{?_isa} = %{version}-%{release} + +%description -n libtextstyle-devel +This package contains all development related files necessary for +developing or compiling applications/libraries that needs text +styling. + + %package -n emacs-%{name} Summary: Support for editing po files within GNU Emacs BuildArch: noarch @@ -142,6 +174,14 @@ think about. %prep %autosetup -n %{name}-%{tarversion} -S git +# Defeat libtextstyle attempt to bundle libcroco and libxml2. The comments +# indicate this is done because the libtextstyle authors do not want +# applications using their code to suffer startup delays due to the +# relocations in the two libraries. This is not a sufficient reason for Fedora. +sed -e 's/\(gl_cv_libcroco_force_included=\)yes/\1no/' \ + -e 's/\(gl_cv_libxml_force_included=\)yes/\1no/' \ + -i libtextstyle/configure + %build %if %{with java} @@ -154,9 +194,13 @@ export JAR=fastjar # prevent test-isinf from failing with gcc-5.3.1 on ppc64le (#1294016) export CFLAGS="$RPM_OPT_FLAGS -D__SUPPORT_SNAN__" %endif -# --disable-rpath doesn't work properly on lib64 +# Fedora's libcroco-devel has an extra "libcroco" path component, and the +# libxml2-devel package has an extra "libxml2" path component. +export CPPFLAGS="-I$(ls -1d %{_includedir}/libcroco-*/libcroco) -I%{_includedir}/libxml2" +# Side effect of unbundling libcroco and libxml2 from libtextstyle. +export LIBS="-lcroco-0.6 -lxml2" %configure --without-included-gettext --enable-nls --disable-static \ - --enable-shared --with-pic --disable-csharp --disable-rpath \ + --enable-shared --disable-csharp --disable-rpath \ %if %{with java} --enable-java \ %else @@ -164,11 +208,18 @@ export CFLAGS="$RPM_OPT_FLAGS -D__SUPPORT_SNAN__" %endif --with-xz -make %{?_smp_mflags} %{?with_java:GCJFLAGS="-findirect-dispatch"} +# Eliminate hardcoded rpaths; workaround libtool reordering -Wl,--as-needed +# after all the libraries. +sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ + -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \ + -e 's|CC=.g..|& -Wl,--as-needed|' \ + -i $(find . -name libtool) + +%make_build %{?with_java:GCJFLAGS="-findirect-dispatch"} %install -make install DESTDIR=${RPM_BUILD_ROOT} INSTALL="%{__install} -p" \ +%make_install \ lispdir=%{_datadir}/emacs/site-lisp/gettext \ aclocaldir=%{_datadir}/aclocal EXAMPLESFILES="" @@ -230,21 +281,15 @@ rm ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.elc %find_lang %{name}-tools cat %{name}-*.lang > %{name}.lang -# cleanup rpaths -for i in $RPM_BUILD_ROOT%{_bindir}/* `find $RPM_BUILD_ROOT%{_libdir} -type f`; do - if file $i | grep "ELF 64-bit" >/dev/null; then - chrpath -l $i && chrpath --delete $i - fi -done - -%if %{with check} %check # this takes quite a lot of time to run +# adapt to rpath removal +export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs + # override LIBUNISTRING to prevent reordering of lib objects make check LIBUNISTRING=-lunistring -%endif %ldconfig_scriptlets libs @@ -254,10 +299,26 @@ make check LIBUNISTRING=-lunistring %doc NEWS THANKS %doc gettext-runtime/man/*.1.html %doc gettext-runtime/intl/COPYING* -%{_bindir}/* -%exclude %{_bindir}/autopoint -%exclude %{_bindir}/gettextize -%exclude %{_bindir}/msghack +%{_bindir}/envsubst +%{_bindir}/gettext +%{_bindir}/gettext.sh +%{_bindir}/msgattrib +%{_bindir}/msgcat +%{_bindir}/msgcmp +%{_bindir}/msgcomm +%{_bindir}/msgconv +%{_bindir}/msgen +%{_bindir}/msgexec +%{_bindir}/msgfilter +%{_bindir}/msgfmt +%{_bindir}/msggrep +%{_bindir}/msginit +%{_bindir}/msgmerge +%{_bindir}/msgunfmt +%{_bindir}/msguniq +%{_bindir}/ngettext +%{_bindir}/recode-sr-latin +%{_bindir}/xgettext %{_infodir}/gettext* %exclude %{_mandir}/man1/autopoint.1* %exclude %{_mandir}/man1/gettextize.1* @@ -287,7 +348,8 @@ make check LIBUNISTRING=-lunistring %{_datadir}/%{name}/*.h %{_datadir}/%{name}/msgunfmt.tcl %{_datadir}/aclocal/* -%{_includedir}/* +%{_includedir}/autosprintf.h +%{_includedir}/gettext-po.h %{_infodir}/autosprintf* %{_libdir}/libasprintf.so %{_libdir}/libgettextpo.so @@ -295,7 +357,6 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/autopoint.1* %{_mandir}/man1/gettextize.1* %{_mandir}/man3/* -%{_datadir}/%{name}/intl %{_datadir}/%{name}/javaversion.class %doc gettext-runtime/intl-java/javadoc* %if %{with java} @@ -311,6 +372,16 @@ make check LIBUNISTRING=-lunistring %{_datadir}/%{name}/libintl.jar %endif +%files -n libtextstyle +%{_libdir}/libtextstyle.so.0* + +%files -n libtextstyle-devel +%{_docdir}/libtextstyle/ +%{_includedir}/textstyle/ +%{_includedir}/textstyle.h +%{_infodir}/libtextstyle* +%{_libdir}/libtextstyle.so + %files -n emacs-%{name} %dir %{_emacs_sitelispdir}/%{name} %{_emacs_sitelispdir}/%{name}/*.elc @@ -323,6 +394,17 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Fri Aug 9 2019 Jerry James - 0.20.1-1 +- update to 0.20.1 release, all patches upstreamed +- add GFDL to License fields due to info files +- add libtextstyle{,-devel} subpackages +- reenable testsuite +- build with libacl support +- BR various glibc langpacks wanted by the tests +- drop ancient Conflicts due to UsrMove +- prevent rpaths rather than removing them +- explicitly list binaries in the main package to avoid extra build-ids + * Fri Aug 9 2019 Jens Petersen - 0.19.8.1-22 - temporarily disable testsuite (#1735245) diff --git a/sources b/sources index 5cf8953..778b436 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -df3f5690eaa30fd228537b00cb7b7590 gettext-0.19.8.1.tar.xz +SHA512 (gettext-0.20.1.tar.xz) = 82ffa5a28068272d0587262f8d9269f9629c601da5d122b6645c9c4cf98bfe4149df01bb58522ccf8fe25b931672e18551d7fb34de1cbf6a0463a87f9f8ee221 From eca5567f1cea67ac86556ef3d4a4fa7402dfb891 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Tue, 20 Aug 2019 13:48:11 +0200 Subject: [PATCH 21/89] Fix misbehavior of msgmerge --for-msgfmt This fixes build errors in packages with empty .po files: https://gitlab.gnome.org/GNOME/gcr/issues/25 https://github.com/p11-glue/p11-kit/issues/238 --- gettext-msgmerge-for-msgfmt.patch | 82 +++++++++++++++++++++++++++++++ gettext.spec | 7 ++- 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 gettext-msgmerge-for-msgfmt.patch diff --git a/gettext-msgmerge-for-msgfmt.patch b/gettext-msgmerge-for-msgfmt.patch new file mode 100644 index 0000000..ba85080 --- /dev/null +++ b/gettext-msgmerge-for-msgfmt.patch @@ -0,0 +1,82 @@ +From 2336451ed68d91ff4b5ae1acbc1eca30e47a86a9 Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Sun, 19 May 2019 13:10:06 +0200 +Subject: [PATCH] msgmerge: Fix behaviour of --for-msgfmt on PO files with no + translations. + +Reported by Don Lawrence +in +via Daiki Ueno +in . + +* gettext-tools/src/msgmerge.c (main): Treat force_po like true if for_msgfmt +is true. +* gettext-tools/tests/msgmerge-26: Add test of PO file with no translations. +--- + gettext-tools/src/msgmerge.c | 4 ++-- + gettext-tools/tests/msgmerge-26 | 36 ++++++++++++++++++++++++++++++--- + 2 files changed, 35 insertions(+), 5 deletions(-) + +diff --git a/gettext-tools/src/msgmerge.c b/gettext-tools/src/msgmerge.c +index cd762c029..92c9b7a8e 100644 +--- a/gettext-tools/src/msgmerge.c ++++ b/gettext-tools/src/msgmerge.c +@@ -520,8 +520,8 @@ There is NO WARRANTY, to the extent permitted by law.\n\ + else + { + /* Write the merged message list out. */ +- msgdomain_list_print (result, output_file, output_syntax, force_po, +- false); ++ msgdomain_list_print (result, output_file, output_syntax, ++ for_msgfmt || force_po, false); + } + + exit (EXIT_SUCCESS); +diff --git a/gettext-tools/tests/msgmerge-26 b/gettext-tools/tests/msgmerge-26 +index cd3862e33..b86f7a073 100755 +--- a/gettext-tools/tests/msgmerge-26 ++++ b/gettext-tools/tests/msgmerge-26 +@@ -73,7 +73,37 @@ msgstr "Papaya" + EOF + + : ${DIFF=diff} +-${DIFF} mm-test26.ok mm-test26.out +-result=$? ++${DIFF} mm-test26.ok mm-test26.out || Exit 1 + +-exit $result ++# Test with a PO file that has no translated messages. ++ ++cat <<\EOF > mm-test26a.in1 ++msgid "" ++msgstr "" ++"Content-Type: text/plain; charset=UTF-8\n" ++ ++msgid "Hello world" ++msgstr "Hallo Welt" ++EOF ++ ++cat <<\EOF > mm-test26a.in2 ++msgid "" ++msgstr "" ++"Content-Type: text/plain; charset=ASCII\n" ++ ++msgid "Hello, world!" ++msgstr "" ++EOF ++ ++: ${MSGMERGE=msgmerge} ++${MSGMERGE} --for-msgfmt -o mm-test26a.tmp mm-test26a.in1 mm-test26a.in2 \ ++ || Exit 1 ++LC_ALL=C tr -d '\r' < mm-test26a.tmp > mm-test26a.out || Exit 1 ++ ++cat <<\EOF > mm-test26a.ok ++msgid "" ++msgstr "Content-Type: text/plain; charset=UTF-8\n" ++EOF ++ ++: ${DIFF=diff} ++${DIFF} mm-test26a.ok mm-test26a.out || Exit 1 +-- +2.21.0 + diff --git a/gettext.spec b/gettext.spec index e277a7e..6450437 100644 --- a/gettext.spec +++ b/gettext.spec @@ -7,7 +7,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: %{tarversion} -Release: 1%{?dist} +Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -27,6 +27,8 @@ Source: https://ftp.gnu.org/pub/gnu/gettext/%{name}-%{version}.tar.xz Source2: msghack.py Source3: msghack.1 +Patch1: gettext-msgmerge-for-msgfmt.patch + # for bootstrapping # BuildRequires: autoconf >= 2.62 # BuildRequires: automake @@ -394,6 +396,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Tue Aug 20 2019 Daiki Ueno - 0.20.1-2 +- Fix misbehavior of msgmerge --for-msgfmt + * Fri Aug 9 2019 Jerry James - 0.20.1-1 - update to 0.20.1 release, all patches upstreamed - add GFDL to License fields due to info files From 0c963d926a1b4b432ad0caf68af67c0a26a5fd7d Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Mon, 6 Jan 2020 17:09:28 +0530 Subject: [PATCH 22/89] add diffutils as dependency on gettext-devel --- gettext.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 6450437..50fa218 100644 --- a/gettext.spec +++ b/gettext.spec @@ -7,7 +7,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: %{tarversion} -Release: 2%{?dist} +Release: 3%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -112,6 +112,7 @@ Requires: %{name} = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-common-devel = %{version}-%{release} Requires: xz +Requires: diffutils Obsoletes: gettext-autopoint < 0.18.1.1-3 Provides: gettext-autopoint = %{version}-%{release} @@ -396,6 +397,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Mon Jan 06 2020 Sundeep Anand - 0.20.1-3 +- Add diffutils dependency on gettext-devel (rhbz#1774899) + * Tue Aug 20 2019 Daiki Ueno - 0.20.1-2 - Fix misbehavior of msgmerge --for-msgfmt From 15ad2cff3c626ef9df7ec7afd50199e7d1159d96 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jan 2020 20:00:00 +0000 Subject: [PATCH 23/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 50fa218..3bf5127 100644 --- a/gettext.spec +++ b/gettext.spec @@ -7,7 +7,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: %{tarversion} -Release: 3%{?dist} +Release: 4%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -397,6 +397,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Tue Jan 28 2020 Fedora Release Engineering - 0.20.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Mon Jan 06 2020 Sundeep Anand - 0.20.1-3 - Add diffutils dependency on gettext-devel (rhbz#1774899) From 2c0418a6cc04d308c15d39c666f84d8dd56f3bd8 Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Tue, 14 Apr 2020 19:04:45 +0530 Subject: [PATCH 24/89] Update to 0.20.2 release (rhbz#1823721) --- gettext.spec | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gettext.spec b/gettext.spec index 3bf5127..83d2be8 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,13 +1,13 @@ %bcond_with jar %bcond_with java -%global tarversion 0.20.1 +%global tarversion 0.20.2 %global archiveversion 0.20 Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: %{tarversion} -Release: 4%{?dist} +Release: 1%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -27,7 +27,8 @@ Source: https://ftp.gnu.org/pub/gnu/gettext/%{name}-%{version}.tar.xz Source2: msghack.py Source3: msghack.1 -Patch1: gettext-msgmerge-for-msgfmt.patch +# this patch has merged upstream +# Patch1: gettext-msgmerge-for-msgfmt.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 @@ -336,8 +337,8 @@ make check LIBUNISTRING=-lunistring %{_datadir}/%{name}/ABOUT-NLS %{_datadir}/%{name}/po %{_datadir}/%{name}/styles -%dir %{_datadir}/%{name}-%{archiveversion} -%{_datadir}/%{name}-%{archiveversion}/its +%dir %{_datadir}/%{name}-%{tarversion} +%{_datadir}/%{name}-%{tarversion}/its %files common-devel %{_datadir}/%{name}/archive.*.tar.xz @@ -397,6 +398,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Tue Apr 14 2020 Sundeep Anand - 0.20.2-1 +- gettext-0.20.2 is available (rhbz#1823721) + * Tue Jan 28 2020 Fedora Release Engineering - 0.20.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 58556efb97dc0481e7ebc61ce2f5dc7905e7a1d5 Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Tue, 14 Apr 2020 21:16:30 +0530 Subject: [PATCH 25/89] upload gettext-0.20.2.tar.xz --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 778b436..5075748 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.20.1.tar.xz) = 82ffa5a28068272d0587262f8d9269f9629c601da5d122b6645c9c4cf98bfe4149df01bb58522ccf8fe25b931672e18551d7fb34de1cbf6a0463a87f9f8ee221 +SHA512 (gettext-0.20.2.tar.xz) = 08d20c659004a77e607af17df15f5ce9bd4fc0feca9436aa206b0cbd2516f9f0c98c7ee1faacf7ff429f9b0dd9de219947b300216887a60727602a688acabc82 From 5077e71eb35e6eca0809b9364d13273faeddf131 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 27 Jul 2020 18:34:18 +0000 Subject: [PATCH 26/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 83d2be8..88c0041 100644 --- a/gettext.spec +++ b/gettext.spec @@ -7,7 +7,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: %{tarversion} -Release: 1%{?dist} +Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -398,6 +398,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Mon Jul 27 2020 Fedora Release Engineering - 0.20.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Tue Apr 14 2020 Sundeep Anand - 0.20.2-1 - gettext-0.20.2 is available (rhbz#1823721) From 093dcc4088340167126723346095247ed336c9d0 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Wed, 29 Jul 2020 09:41:41 -0500 Subject: [PATCH 27/89] Bundle libcroco so we can remove the system package --- gettext.spec | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/gettext.spec b/gettext.spec index 88c0041..81a5837 100644 --- a/gettext.spec +++ b/gettext.spec @@ -7,7 +7,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: %{tarversion} -Release: 2%{?dist} +Release: 3%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -65,7 +65,6 @@ BuildRequires: ncurses-devel BuildRequires: libxml2-devel BuildRequires: glib2-devel BuildRequires: libacl-devel -BuildRequires: libcroco-devel BuildRequires: libunistring-devel # for the tests BuildRequires: glibc-langpack-de @@ -77,8 +76,8 @@ BuildRequires: glibc-langpack-tr BuildRequires: glibc-langpack-zh # Depend on the exact version of the library sub package Requires: %{name}-libs%{_isa} = %{version}-%{release} -# exception for bundled gnulib copylib Provides: bundled(gnulib) +Provides: bundled(libcroco) = 0.6.12 %description The GNU gettext package provides a set of tools and documentation for @@ -178,12 +177,11 @@ think about. %prep %autosetup -n %{name}-%{tarversion} -S git -# Defeat libtextstyle attempt to bundle libcroco and libxml2. The comments +# Defeat libtextstyle attempt to bundle libxml2. The comments # indicate this is done because the libtextstyle authors do not want # applications using their code to suffer startup delays due to the -# relocations in the two libraries. This is not a sufficient reason for Fedora. -sed -e 's/\(gl_cv_libcroco_force_included=\)yes/\1no/' \ - -e 's/\(gl_cv_libxml_force_included=\)yes/\1no/' \ +# relocations. This is not a sufficient reason for Fedora. +sed -e 's/\(gl_cv_libxml_force_included=\)yes/\1no/' \ -i libtextstyle/configure @@ -198,11 +196,10 @@ export JAR=fastjar # prevent test-isinf from failing with gcc-5.3.1 on ppc64le (#1294016) export CFLAGS="$RPM_OPT_FLAGS -D__SUPPORT_SNAN__" %endif -# Fedora's libcroco-devel has an extra "libcroco" path component, and the -# libxml2-devel package has an extra "libxml2" path component. -export CPPFLAGS="-I$(ls -1d %{_includedir}/libcroco-*/libcroco) -I%{_includedir}/libxml2" -# Side effect of unbundling libcroco and libxml2 from libtextstyle. -export LIBS="-lcroco-0.6 -lxml2" +# Fedora's libxml2-devel package has an extra "libxml2" path component. +export CPPFLAGS="-I%{_includedir}/libxml2" +# Side effect of unbundling libxml2 from libtextstyle. +export LIBS="-lxml2" %configure --without-included-gettext --enable-nls --disable-static \ --enable-shared --disable-csharp --disable-rpath \ %if %{with java} @@ -398,6 +395,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Jul 29 2020 Michael Catanzaro - 0.20.2-3 +- Bundle libcroco so we can remove the system package + * Mon Jul 27 2020 Fedora Release Engineering - 0.20.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 9aa0b07ad55f033039fdfd4b2d2a9c3f0e26b8c6 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 31 Jul 2020 19:41:41 +0200 Subject: [PATCH 28/89] Force check to always pass Test suite is currently broken on ARMv7HL. See: https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00195.html --- gettext.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 81a5837..2d3efcb 100644 --- a/gettext.spec +++ b/gettext.spec @@ -290,7 +290,8 @@ cat %{name}-*.lang > %{name}.lang export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs # override LIBUNISTRING to prevent reordering of lib objects -make check LIBUNISTRING=-lunistring +# FIXME: https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00195.html +make check LIBUNISTRING=-lunistring || : %ldconfig_scriptlets libs From 802fdef83507cc36cba0627c7b58760460fe63af Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 31 Jul 2020 20:27:19 +0200 Subject: [PATCH 29/89] Really disable check stage this time --- gettext.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 2d3efcb..2198c4f 100644 --- a/gettext.spec +++ b/gettext.spec @@ -291,7 +291,7 @@ export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs # override LIBUNISTRING to prevent reordering of lib objects # FIXME: https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00195.html -make check LIBUNISTRING=-lunistring || : +# make check LIBUNISTRING=-lunistring %ldconfig_scriptlets libs From 78951b97431904611fc130d133d9bd9717c4efa7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 1 Aug 2020 01:09:27 +0000 Subject: [PATCH 30/89] - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gettext.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 2198c4f..de13c9f 100644 --- a/gettext.spec +++ b/gettext.spec @@ -7,7 +7,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: %{tarversion} -Release: 3%{?dist} +Release: 4%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -396,6 +396,10 @@ export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs %{_mandir}/man1/msghack.1* %changelog +* Sat Aug 01 2020 Fedora Release Engineering - 0.20.2-4 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jul 29 2020 Michael Catanzaro - 0.20.2-3 - Bundle libcroco so we can remove the system package From 9a741fcbe09273ea7b535c6b2da9d20995427c65 Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Mon, 3 Aug 2020 13:58:24 +0530 Subject: [PATCH 31/89] update to gettext-0.21 (rhbz#1860728) --- gettext.spec | 9 ++++++--- sources | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gettext.spec b/gettext.spec index de13c9f..c983205 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,13 +1,13 @@ %bcond_with jar %bcond_with java -%global tarversion 0.20.2 -%global archiveversion 0.20 +%global tarversion 0.21 +%global archiveversion 0.21 Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: %{tarversion} -Release: 4%{?dist} +Release: 1%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -396,6 +396,9 @@ export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs %{_mandir}/man1/msghack.1* %changelog +* Mon Aug 03 2020 Sundeep Anand - 0.21 +- gettext-0.21 is available (rhbz#1860728) + * Sat Aug 01 2020 Fedora Release Engineering - 0.20.2-4 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 5075748..bfe361b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.20.2.tar.xz) = 08d20c659004a77e607af17df15f5ce9bd4fc0feca9436aa206b0cbd2516f9f0c98c7ee1faacf7ff429f9b0dd9de219947b300216887a60727602a688acabc82 +SHA512 (gettext-0.21.tar.xz) = f7e2968651879f8444d43a176a149db9f9411f4a03132a7f3b37c2ed97e3978ae6888169c995c1953cb78943b6e3573811abcbb8661b6631edbbe067b2699ddf From 7581bbfd347fdef759962dd79409cba61b0261f6 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 6 Aug 2020 22:58:39 +0800 Subject: [PATCH 32/89] reenable testsuite except failing armv7hl --- gettext.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gettext.spec b/gettext.spec index c983205..72ca6f8 100644 --- a/gettext.spec +++ b/gettext.spec @@ -7,7 +7,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: %{tarversion} -Release: 1%{?dist} +Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -291,7 +291,9 @@ export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs # override LIBUNISTRING to prevent reordering of lib objects # FIXME: https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00195.html -# make check LIBUNISTRING=-lunistring +%ifnarch armv7hl +make check LIBUNISTRING=-lunistring +%endif %ldconfig_scriptlets libs @@ -396,7 +398,10 @@ export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs %{_mandir}/man1/msghack.1* %changelog -* Mon Aug 03 2020 Sundeep Anand - 0.21 +* Thu Aug 6 2020 Jens Petersen - 0.21-2 +- reenable testsuite except for armv7hl which is failing + +* Mon Aug 03 2020 Sundeep Anand - 0.21-1 - gettext-0.21 is available (rhbz#1860728) * Sat Aug 01 2020 Fedora Release Engineering - 0.20.2-4 From 306be9bb5f7dcb33515353b23f7d3f252d52ea8b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 6 Aug 2020 22:59:55 +0800 Subject: [PATCH 33/89] %tarversion seems redundant now seems older gettext versions (< 0.20?) used major version for some paths --- gettext.spec | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gettext.spec b/gettext.spec index 72ca6f8..8b7b2e8 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,12 +1,9 @@ %bcond_with jar %bcond_with java -%global tarversion 0.21 -%global archiveversion 0.21 - Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext -Version: %{tarversion} +Version: 0.21 Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -175,7 +172,7 @@ think about. %prep -%autosetup -n %{name}-%{tarversion} -S git +%autosetup -S git # Defeat libtextstyle attempt to bundle libxml2. The comments # indicate this is done because the libtextstyle authors do not want @@ -337,8 +334,8 @@ make check LIBUNISTRING=-lunistring %{_datadir}/%{name}/ABOUT-NLS %{_datadir}/%{name}/po %{_datadir}/%{name}/styles -%dir %{_datadir}/%{name}-%{tarversion} -%{_datadir}/%{name}-%{tarversion}/its +%dir %{_datadir}/%{name}-%{version} +%{_datadir}/%{name}-%{version}/its %files common-devel %{_datadir}/%{name}/archive.*.tar.xz From e3ec4313fc37346118bf791f222038612acbd403 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 6 Aug 2020 23:01:21 +0800 Subject: [PATCH 34/89] nuke trailing whitespace --- gettext.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gettext.spec b/gettext.spec index 8b7b2e8..30b2338 100644 --- a/gettext.spec +++ b/gettext.spec @@ -297,7 +297,7 @@ make check LIBUNISTRING=-lunistring %files -f %{name}.lang %doc AUTHORS gettext-runtime/BUGS %doc COPYING gettext-tools/misc/DISCLAIM README -%doc NEWS THANKS +%doc NEWS THANKS %doc gettext-runtime/man/*.1.html %doc gettext-runtime/intl/COPYING* %{_bindir}/envsubst @@ -735,13 +735,13 @@ make check LIBUNISTRING=-lunistring - Fix the build failure with koji. * Fri Aug 29 2008 Ding-Yi Chen - 0.17-7 -- Remove the gettext-libs docs, as they are talking about autoconf, libtool, +- Remove the gettext-libs docs, as they are talking about autoconf, libtool, which are not directly related to the gettext-libs. - Remove unused definition and trailing space. - Fix the build failure with mock . * Tue Aug 19 2008 Ding-Yi Chen - 0.17-6 -- Fixed Bug 456666 msghack doesn't check for mandatory cmd line params +- Fixed Bug 456666 msghack doesn't check for mandatory cmd line params by adding checking statements and display usage (msghack.py modified) - rpath patch for binary-or-shlib-defines-rpath in x86_64. @@ -859,7 +859,7 @@ make check LIBUNISTRING=-lunistring - rebuild * Wed Feb 22 2006 Karsten Hopp 0.14.5-3 -- --disable-csharp, otherwise it'll build a dll when mono is +- --disable-csharp, otherwise it'll build a dll when mono is installed in the buildroot. * Fri Feb 10 2006 Jesse Keating - 0.14.5-2.2.2 @@ -1024,7 +1024,7 @@ make check LIBUNISTRING=-lunistring without * Thu Aug 9 2001 Trond Eivind Glomsrød -- Added "--append" and "-o" to msghack, which should address +- Added "--append" and "-o" to msghack, which should address initial concerns in #50065 * Thu Jul 19 2001 Trond Eivind Glomsrød @@ -1114,7 +1114,7 @@ make check LIBUNISTRING=-lunistring * Thu May 06 1999 Cristian Gafton - msghack updates -* Sun Mar 21 1999 Cristian Gafton +* Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 8) * Mon Mar 08 1999 Cristian Gafton From 26b1c1422c9c81b394cad698179548d54c197703 Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Mon, 7 Sep 2020 18:43:16 +0530 Subject: [PATCH 35/89] Port Gnulib test fixes from upstream --- gettext-0.21-gnulib-perror-tests.patch | 44 ++++++++++++++++++++++++++ gettext.spec | 11 ++++--- 2 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 gettext-0.21-gnulib-perror-tests.patch diff --git a/gettext-0.21-gnulib-perror-tests.patch b/gettext-0.21-gnulib-perror-tests.patch new file mode 100644 index 0000000..983264d --- /dev/null +++ b/gettext-0.21-gnulib-perror-tests.patch @@ -0,0 +1,44 @@ +From 175e0bc72808d564074c4adcc72aeadb74adfcc6 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Thu, 27 Aug 2020 17:52:58 -0700 +Subject: [PATCH] perror, strerror_r: remove unportable tests + +Problem reported by Florian Weimer in: +https://lists.gnu.org/r/bug-gnulib/2020-08/msg00220.html +* tests/test-perror2.c (main): +* tests/test-strerror_r.c (main): Omit unportable tests. +--- + ChangeLog | 8 ++++++++ + tests/test-perror2.c | 3 --- + tests/test-strerror_r.c | 3 --- + 3 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/gettext-tools/gnulib-tests/test-perror2.c b/gettext-tools/gnulib-tests/test-perror2.c +index 1d14eda7b..c6214dd25 100644 +--- a/gettext-tools/gnulib-tests/test-perror2.c ++++ b/gettext-tools/gnulib-tests/test-perror2.c +@@ -79,9 +79,6 @@ main (void) + errno = -5; + perror (""); + ASSERT (!ferror (stderr)); +- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1)); +- ASSERT (msg2 == msg4 || STREQ (msg2, str2)); +- ASSERT (msg3 == msg4 || STREQ (msg3, str3)); + ASSERT (STREQ (msg4, str4)); + + free (str1); +diff --git a/gettext-tools/gnulib-tests/test-strerror_r.c b/gettext-tools/gnulib-tests/test-strerror_r.c +index b11d6fd9f..c1dbcf837 100644 +--- a/gettext-tools/gnulib-tests/test-strerror_r.c ++++ b/gettext-tools/gnulib-tests/test-strerror_r.c +@@ -165,9 +165,6 @@ main (void) + + strerror_r (EACCES, buf, sizeof buf); + strerror_r (-5, buf, sizeof buf); +- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1)); +- ASSERT (msg2 == msg4 || STREQ (msg2, str2)); +- ASSERT (msg3 == msg4 || STREQ (msg3, str3)); + ASSERT (STREQ (msg4, str4)); + + free (str1); + diff --git a/gettext.spec b/gettext.spec index 30b2338..935abfa 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.21 -Release: 2%{?dist} +Release: 3%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -27,6 +27,9 @@ Source3: msghack.1 # this patch has merged upstream # Patch1: gettext-msgmerge-for-msgfmt.patch +# https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00195.html +Patch1: gettext-0.21-gnulib-perror-tests.patch + # for bootstrapping # BuildRequires: autoconf >= 2.62 # BuildRequires: automake @@ -287,10 +290,7 @@ cat %{name}-*.lang > %{name}.lang export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs # override LIBUNISTRING to prevent reordering of lib objects -# FIXME: https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00195.html -%ifnarch armv7hl make check LIBUNISTRING=-lunistring -%endif %ldconfig_scriptlets libs @@ -395,6 +395,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Mon Sep 7 2020 Sundeep Anand - 0.21-3 +- include patch to fix gnulib perror tests (rhbz#1867021) + * Thu Aug 6 2020 Jens Petersen - 0.21-2 - reenable testsuite except for armv7hl which is failing From 8c125f4d85068ed91e17bf9523e4d06876d962c6 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 18 Dec 2020 23:15:58 +0000 Subject: [PATCH 36/89] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- gettext.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/gettext.spec b/gettext.spec index 935abfa..4bdccb0 100644 --- a/gettext.spec +++ b/gettext.spec @@ -74,6 +74,7 @@ BuildRequires: glibc-langpack-fr BuildRequires: glibc-langpack-ja BuildRequires: glibc-langpack-tr BuildRequires: glibc-langpack-zh +BuildRequires: make # Depend on the exact version of the library sub package Requires: %{name}-libs%{_isa} = %{version}-%{release} Provides: bundled(gnulib) From 3d2b5ea0099e88098f105c237c89d6e5ded542e6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 06:38:07 +0000 Subject: [PATCH 37/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 4bdccb0..0f01715 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.21 -Release: 3%{?dist} +Release: 4%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -396,6 +396,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 0.21-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Mon Sep 7 2020 Sundeep Anand - 0.21-3 - include patch to fix gnulib perror tests (rhbz#1867021) From 685e15bd6535dcf5923898641f72f02d57078ff7 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Wed, 20 Jan 2021 23:22:37 +0000 Subject: [PATCH 38/89] Spec file cleanup --- gettext.spec | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gettext.spec b/gettext.spec index 0f01715..3664352 100644 --- a/gettext.spec +++ b/gettext.spec @@ -19,7 +19,7 @@ Release: 4%{?dist} # - libtextstyle info files # Everything else is GPLv3+ License: GPLv3+ and LGPLv2+ and GFDL -URL: http://www.gnu.org/software/gettext/ +URL: https://www.gnu.org/software/gettext/ Source: https://ftp.gnu.org/pub/gnu/gettext/%{name}-%{version}.tar.xz Source2: msghack.py Source3: msghack.1 @@ -226,8 +226,8 @@ sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ aclocaldir=%{_datadir}/aclocal EXAMPLESFILES="" -install -pm 755 %SOURCE2 ${RPM_BUILD_ROOT}/%{_bindir}/msghack -install -pm 644 %SOURCE3 ${RPM_BUILD_ROOT}/%{_mandir}/man1/msghack.1 +install -pm 755 %SOURCE2 ${RPM_BUILD_ROOT}%{_bindir}/msghack +install -pm 644 %SOURCE3 ${RPM_BUILD_ROOT}%{_mandir}/man1/msghack.1 # make preloadable_libintl.so executable @@ -245,7 +245,7 @@ rm -rf ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/examples rm -rf htmldoc mkdir htmldoc -mv ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/* ${RPM_BUILD_ROOT}/%{_datadir}/doc/libasprintf/* htmldoc +mv ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/* ${RPM_BUILD_ROOT}%{_datadir}/doc/libasprintf/* htmldoc rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/libasprintf rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext @@ -296,8 +296,9 @@ make check LIBUNISTRING=-lunistring %ldconfig_scriptlets libs %files -f %{name}.lang +%license COPYING %doc AUTHORS gettext-runtime/BUGS -%doc COPYING gettext-tools/misc/DISCLAIM README +%doc gettext-tools/misc/DISCLAIM README %doc NEWS THANKS %doc gettext-runtime/man/*.1.html %doc gettext-runtime/intl/COPYING* From 1b17af56abe8f1ba5df0218a88bb495ce81466b5 Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Tue, 27 Apr 2021 18:14:25 +0530 Subject: [PATCH 39/89] disable libtextstyle as it is dependent on libcroco, which is unmaintained now --- gettext-0.21-disable-libtextstyle.patch | 128 ++++++++++++++++++++++++ gettext.spec | 43 ++------ 2 files changed, 139 insertions(+), 32 deletions(-) create mode 100644 gettext-0.21-disable-libtextstyle.patch diff --git a/gettext-0.21-disable-libtextstyle.patch b/gettext-0.21-disable-libtextstyle.patch new file mode 100644 index 0000000..66271ad --- /dev/null +++ b/gettext-0.21-disable-libtextstyle.patch @@ -0,0 +1,128 @@ +diff --git a/Makefile.am b/Makefile.am +index 815e3c7..e897de7 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -19,7 +19,7 @@ + AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = gnulib-local gettext-runtime libtextstyle gettext-tools ++SUBDIRS = gnulib-local gettext-runtime gettext-tools + + changelog_etc = \ + gettext-runtime/ChangeLog.0 \ +@@ -123,7 +123,6 @@ distcheck-hook: + test "`sed 1,16d $(srcdir)/gettext-runtime/intl/xsize.h | md5sum`" = "`sed 1,16d $(srcdir)/gettext-tools/gnulib-lib/xsize.h | md5sum`" + cmp -s $(srcdir)/gettext-runtime/man/help2man $(srcdir)/gettext-tools/man/help2man + cmp -s $(srcdir)/gettext-runtime/man/x-to-1.in $(srcdir)/gettext-tools/man/x-to-1.in +- cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4 + cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.java $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.java + cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.class $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.class + test "`sed 1,15d $(srcdir)/gnulib-local/lib/alloca.in.h | md5sum`" = "`sed 1,15d $(srcdir)/gettext-runtime/libasprintf/alloca.in.h | md5sum`" +diff --git a/configure.ac b/configure.ac +index 49689fb..2d23b44 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -37,7 +37,7 @@ dnl Checks for typedefs, structures, and compiler characteristics. + + dnl Checks for library functions. + +-AC_CONFIG_SUBDIRS([gettext-runtime libtextstyle gettext-tools]) ++AC_CONFIG_SUBDIRS([gettext-runtime gettext-tools]) + + AM_EXTRA_RECURSIVE_TARGETS([maintainer-update-po]) + +@@ -49,7 +49,7 @@ AC_CANONICAL_HOST + dnl Optional Features: AC_ARG_ENABLE calls + dnl Optional Packages: AC_ARG_WITH calls + dnl Some influential environment variables: AC_ARG_VAR calls +-esyscmd([{ cd gettext-runtime && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; cd libtextstyle && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; { cd gettext-tools && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; } | grep -v installed.libtextstyle | grep -v installed.csharp | grep -v 'installed C#'; } | sed -f build-aux/ac-help.sed ]) ++esyscmd([{ cd gettext-runtime && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; { cd gettext-tools && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; } | grep -v installed.csharp | grep -v 'installed C#'; } | sed -f build-aux/ac-help.sed ]) + + AC_CONFIG_FILES([Makefile]) + +diff --git a/gettext-tools/Makefile.am b/gettext-tools/Makefile.am +index 449a797..c5719c2 100644 +--- a/gettext-tools/Makefile.am ++++ b/gettext-tools/Makefile.am +@@ -19,7 +19,7 @@ + AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies + ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4 + +-SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc ++SUBDIRS = intl gnulib-lib libgrep libgettextpo src po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc + + EXTRA_DIST = misc/DISCLAIM + MOSTLYCLEANFILES = core *.stackdump +diff --git a/gettext-tools/libgettextpo/textstyle.in.h b/gettext-tools/libgettextpo/textstyle.in.h +index 536b51b..585ce66 100644 +--- a/gettext-tools/libgettextpo/textstyle.in.h ++++ b/gettext-tools/libgettextpo/textstyle.in.h +@@ -213,7 +213,8 @@ typedef ostream_t file_ostream_t; + static inline file_ostream_t + file_ostream_create (FILE *fp) + { +- return fp; ++ /* Closing the stream we return should not close 'fp'. */ ++ return fdopen (dup (fileno (fp)), "w"); + } + + /* --------------------------- From fd-ostream.h --------------------------- */ +@@ -413,6 +414,30 @@ html_styled_ostream_create (ostream_t destination _GL_UNUSED, + return NULL; + } + ++/* ----------------------- From noop-styled-ostream.h ----------------------- */ ++ ++/* noop_styled_ostream_t is a subtype of ostream_t. */ ++typedef ostream_t noop_styled_ostream_t; ++ ++#define noop_styled_ostream_write_mem ostream_write_mem ++#define noop_styled_ostream_flush ostream_flush ++#define noop_styled_ostream_free ostream_free ++#define noop_styled_ostream_begin_use_class styled_ostream_begin_use_class ++#define noop_styled_ostream_end_use_class styled_ostream_end_use_class ++#define noop_styled_ostream_get_hyperlink_ref styled_ostream_get_hyperlink_ref ++#define noop_styled_ostream_get_hyperlink_id styled_ostream_get_hyperlink_id ++#define noop_styled_ostream_set_hyperlink styled_ostream_set_hyperlink ++#define noop_styled_ostream_flush_to_current_style styled_ostream_flush_to_current_style ++ ++static inline ostream_t ++noop_styled_ostream_create (ostream_t destination, bool pass_ownership) ++{ ++ if (pass_ownership) ++ return destination; ++ else ++ return fdopen (dup (fileno (destination)), "w"); ++} ++ + /* ------------------------------ From color.h ------------------------------ */ + + #define color_test_mode false +diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am +index 764ffad..eccfbbd 100644 +--- a/gettext-tools/src/Makefile.am ++++ b/gettext-tools/src/Makefile.am +@@ -292,19 +292,9 @@ cldr_plurals_SOURCES = cldr-plural.y cldr-plural-exp.c cldr-plurals.c + cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML) + cldr_plurals_LDADD = libgettextsrc.la $(LDADD) + +-if USE_INSTALLED_LIBTEXTSTYLE +-LT_LIBTEXTSTYLE = @LTLIBTEXTSTYLE@ +-else +-# How to get the include files of libtextstyle. +-textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h: +- here=`pwd`; \ +- cd ../../libtextstyle/lib && \ +- $(MAKE) install-nobase_includeHEADERS install-nobase_nodist_includeHEADERS includedir="$$here" +-BUILT_SOURCES += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h +-MOSTLYCLEANFILES += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h +-# Where to find the built libtextstyle library. +-LT_LIBTEXTSTYLE = ../../libtextstyle/lib/libtextstyle.la +-endif ++# Use the dummy libtextstyle from gnulib, as libgettextpo does. ++LT_LIBTEXTSTYLE = ++AM_CPPFLAGS += -I../libgettextpo -I$(top_srcdir)/libgettextpo + + # How to build libgettextsrc.la. + # Need ../gnulib-lib/libgettextlib.la. diff --git a/gettext.spec b/gettext.spec index 3664352..ba8ec9d 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.21 -Release: 4%{?dist} +Release: 5%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -29,10 +29,11 @@ Source3: msghack.1 # https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00195.html Patch1: gettext-0.21-gnulib-perror-tests.patch +Patch2: gettext-0.21-disable-libtextstyle.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 -# BuildRequires: automake +BuildRequires: automake # BuildRequires: libtool # BuildRequires: bison @@ -116,6 +117,7 @@ Requires: xz Requires: diffutils Obsoletes: gettext-autopoint < 0.18.1.1-3 Provides: gettext-autopoint = %{version}-%{release} +Obsoletes: libtextstyle-devel < %{version}-%{release} %description devel This package contains all development related files necessary for @@ -129,31 +131,12 @@ Summary: Libraries for %{name} # libasprintf is LGPLv2+ # libgettextpo is GPLv3+ License: LGPLv2+ and GPLv3+ +Obsoletes: libtextstyle < %{version}-%{release} %description libs This package contains libraries used internationalization support. -%package -n libtextstyle -Summary: Text styling library -License: GPLv3+ - -%description -n libtextstyle -Library for producing styled text to be displayed in a terminal -emulator. - - -%package -n libtextstyle-devel -Summary: Development files for libtextstyle -License: GPLv3+ and GFDL -Requires: libtextstyle%{?_isa} = %{version}-%{release} - -%description -n libtextstyle-devel -This package contains all development related files necessary for -developing or compiling applications/libraries that needs text -styling. - - %package -n emacs-%{name} Summary: Support for editing po files within GNU Emacs BuildArch: noarch @@ -375,16 +358,6 @@ make check LIBUNISTRING=-lunistring %{_datadir}/%{name}/libintl.jar %endif -%files -n libtextstyle -%{_libdir}/libtextstyle.so.0* - -%files -n libtextstyle-devel -%{_docdir}/libtextstyle/ -%{_includedir}/textstyle/ -%{_includedir}/textstyle.h -%{_infodir}/libtextstyle* -%{_libdir}/libtextstyle.so - %files -n emacs-%{name} %dir %{_emacs_sitelispdir}/%{name} %{_emacs_sitelispdir}/%{name}/*.elc @@ -397,6 +370,12 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Fri Apr 30 2021 Sundeep Anand - 0.21-5 +- Add gettext-0.21-disable-libtextstyle.patch + Do not build libtextstyle, as it depends on libcroco + which is now unmaintained and has known security bugs. + Obsolete libtextstyle and libtextstyle-devel packages. + * Tue Jan 26 2021 Fedora Release Engineering - 0.21-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 5412b389441ff175effb37f132dbdd1e753a2c03 Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Fri, 7 May 2021 14:56:16 +0530 Subject: [PATCH 40/89] fix issues detected by static analyzers --- gettext-0.21-covscan.patch | 68 ++++++++++++++++++++++++++++++++++++++ gettext.spec | 6 +++- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 gettext-0.21-covscan.patch diff --git a/gettext-0.21-covscan.patch b/gettext-0.21-covscan.patch new file mode 100644 index 0000000..64ac78f --- /dev/null +++ b/gettext-0.21-covscan.patch @@ -0,0 +1,68 @@ +diff --git a/gettext-tools/src/msgl-cat.c b/gettext-tools/src/msgl-cat.c +index 990d39e..9814502 100644 +--- a/gettext-tools/src/msgl-cat.c ++++ b/gettext-tools/src/msgl-cat.c +@@ -306,6 +306,7 @@ catenate_msgdomain_list (string_list_ty *file_list, + mp->msgid); + multiline_error (xstrdup (""), + xasprintf ("%s\n", errormsg)); ++ free (errormsg); + } + } + else +diff --git a/gettext-tools/src/x-csharp.c b/gettext-tools/src/x-csharp.c +index 5cf72ad..7a0e5d3 100644 +--- a/gettext-tools/src/x-csharp.c ++++ b/gettext-tools/src/x-csharp.c +@@ -560,6 +560,7 @@ comment_line_end (size_t chars_to_remove) + buffer[buflen] = '\0'; + savable_comment_add (buffer); + lexical_context = lc_outside; ++ free (buffer); + } + + +diff --git a/gettext-tools/src/x-java.c b/gettext-tools/src/x-java.c +index eff1e6f..7e1bb78 100644 +--- a/gettext-tools/src/x-java.c ++++ b/gettext-tools/src/x-java.c +@@ -460,6 +460,7 @@ comment_line_end (size_t chars_to_remove) + --buflen; + buffer[buflen] = '\0'; + savable_comment_add (buffer); ++ free (buffer); + } + + +diff --git a/gettext-tools/src/x-rst.c b/gettext-tools/src/x-rst.c +index cde1ee6..fca441e 100644 +--- a/gettext-tools/src/x-rst.c ++++ b/gettext-tools/src/x-rst.c +@@ -651,6 +651,7 @@ extract_rsj (FILE *f, + else + goto invalid_rsj; + ++ free (s1); + /* Parse a comma. */ + c = phase2_getc (); + if (c == '}') +@@ -667,6 +668,7 @@ extract_rsj (FILE *f, + + fp = NULL; + real_file_name = NULL; ++ free (logical_file_name); + logical_file_name = NULL; + line_number = 0; + +diff --git a/gettext-tools/src/xg-arglist-callshape.c b/gettext-tools/src/xg-arglist-callshape.c +index 06b7076..2189aac 100644 +--- a/gettext-tools/src/xg-arglist-callshape.c ++++ b/gettext-tools/src/xg-arglist-callshape.c +@@ -118,6 +118,7 @@ split_keywordspec (const char *spec, + memcpy (xcomment, xcomment_start, xcomment_len); + xcomment[xcomment_len] = '\0'; + string_list_append (&xcomments, xcomment); ++ free (xcomment); + } + else + break; diff --git a/gettext.spec b/gettext.spec index ba8ec9d..8ddd481 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.21 -Release: 5%{?dist} +Release: 6%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -30,6 +30,7 @@ Source3: msghack.1 # https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00195.html Patch1: gettext-0.21-gnulib-perror-tests.patch Patch2: gettext-0.21-disable-libtextstyle.patch +Patch3: gettext-0.21-covscan.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 @@ -370,6 +371,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Tue May 11 2021 Sundeep Anand - 0.21-6 +- Add gettext-0.21-covscan.patch to fix issues detected by static analyzers + * Fri Apr 30 2021 Sundeep Anand - 0.21-5 - Add gettext-0.21-disable-libtextstyle.patch Do not build libtextstyle, as it depends on libcroco From 8b2ebf94ec153f4f3a3703249cff2711059d636d Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 25 May 2021 12:18:26 +0200 Subject: [PATCH 41/89] Rebuild with new binutils to fix ppc64le corruption (#1960730) --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 8ddd481..bc582d5 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.21 -Release: 6%{?dist} +Release: 7%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -371,6 +371,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Tue May 25 2021 Florian Weimer - 0.21-7 +- Rebuild with new binutils to fix ppc64le corruption (#1960730) + * Tue May 11 2021 Sundeep Anand - 0.21-6 - Add gettext-0.21-covscan.patch to fix issues detected by static analyzers From 757ca1de4bbdc8fe86dd60ed38f17796ceaf420a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 00:04:17 +0000 Subject: [PATCH 42/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index bc582d5..3ae3358 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.21 -Release: 7%{?dist} +Release: 8%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -371,6 +371,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 0.21-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue May 25 2021 Florian Weimer - 0.21-7 - Rebuild with new binutils to fix ppc64le corruption (#1960730) From fd237eb4dfb7374905e616a0471d32b7fb018f9c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 23 Nov 2021 19:49:48 +0800 Subject: [PATCH 43/89] update autotools files with autoreconf to fix FTBFS (#2000426) --- gettext.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 3ae3358..94b7327 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.21 -Release: 8%{?dist} +Release: 9%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -161,6 +161,9 @@ think about. %prep %autosetup -S git +# Refresh autotools files to latest versions +# Should be removed after 0.21: +autoreconf --force # Defeat libtextstyle attempt to bundle libxml2. The comments # indicate this is done because the libtextstyle authors do not want @@ -371,6 +374,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Tue Nov 23 2021 Jens Petersen - 0.21-9 +- update autotools files with autoreconf to fix FTBFS (#2000426) + * Thu Jul 22 2021 Fedora Release Engineering - 0.21-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From fe68ad1d543b02fae5344a8e5c6eb271aa378f32 Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Wed, 24 Nov 2021 11:52:15 +0530 Subject: [PATCH 44/89] Patch msgmerge-for-msgfmt has been merged upstream hence removed --- gettext-msgmerge-for-msgfmt.patch | 82 ------------------------------- gettext.spec | 3 -- 2 files changed, 85 deletions(-) delete mode 100644 gettext-msgmerge-for-msgfmt.patch diff --git a/gettext-msgmerge-for-msgfmt.patch b/gettext-msgmerge-for-msgfmt.patch deleted file mode 100644 index ba85080..0000000 --- a/gettext-msgmerge-for-msgfmt.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 2336451ed68d91ff4b5ae1acbc1eca30e47a86a9 Mon Sep 17 00:00:00 2001 -From: Bruno Haible -Date: Sun, 19 May 2019 13:10:06 +0200 -Subject: [PATCH] msgmerge: Fix behaviour of --for-msgfmt on PO files with no - translations. - -Reported by Don Lawrence -in -via Daiki Ueno -in . - -* gettext-tools/src/msgmerge.c (main): Treat force_po like true if for_msgfmt -is true. -* gettext-tools/tests/msgmerge-26: Add test of PO file with no translations. ---- - gettext-tools/src/msgmerge.c | 4 ++-- - gettext-tools/tests/msgmerge-26 | 36 ++++++++++++++++++++++++++++++--- - 2 files changed, 35 insertions(+), 5 deletions(-) - -diff --git a/gettext-tools/src/msgmerge.c b/gettext-tools/src/msgmerge.c -index cd762c029..92c9b7a8e 100644 ---- a/gettext-tools/src/msgmerge.c -+++ b/gettext-tools/src/msgmerge.c -@@ -520,8 +520,8 @@ There is NO WARRANTY, to the extent permitted by law.\n\ - else - { - /* Write the merged message list out. */ -- msgdomain_list_print (result, output_file, output_syntax, force_po, -- false); -+ msgdomain_list_print (result, output_file, output_syntax, -+ for_msgfmt || force_po, false); - } - - exit (EXIT_SUCCESS); -diff --git a/gettext-tools/tests/msgmerge-26 b/gettext-tools/tests/msgmerge-26 -index cd3862e33..b86f7a073 100755 ---- a/gettext-tools/tests/msgmerge-26 -+++ b/gettext-tools/tests/msgmerge-26 -@@ -73,7 +73,37 @@ msgstr "Papaya" - EOF - - : ${DIFF=diff} --${DIFF} mm-test26.ok mm-test26.out --result=$? -+${DIFF} mm-test26.ok mm-test26.out || Exit 1 - --exit $result -+# Test with a PO file that has no translated messages. -+ -+cat <<\EOF > mm-test26a.in1 -+msgid "" -+msgstr "" -+"Content-Type: text/plain; charset=UTF-8\n" -+ -+msgid "Hello world" -+msgstr "Hallo Welt" -+EOF -+ -+cat <<\EOF > mm-test26a.in2 -+msgid "" -+msgstr "" -+"Content-Type: text/plain; charset=ASCII\n" -+ -+msgid "Hello, world!" -+msgstr "" -+EOF -+ -+: ${MSGMERGE=msgmerge} -+${MSGMERGE} --for-msgfmt -o mm-test26a.tmp mm-test26a.in1 mm-test26a.in2 \ -+ || Exit 1 -+LC_ALL=C tr -d '\r' < mm-test26a.tmp > mm-test26a.out || Exit 1 -+ -+cat <<\EOF > mm-test26a.ok -+msgid "" -+msgstr "Content-Type: text/plain; charset=UTF-8\n" -+EOF -+ -+: ${DIFF=diff} -+${DIFF} mm-test26a.ok mm-test26a.out || Exit 1 --- -2.21.0 - diff --git a/gettext.spec b/gettext.spec index 94b7327..86c3db1 100644 --- a/gettext.spec +++ b/gettext.spec @@ -24,9 +24,6 @@ Source: https://ftp.gnu.org/pub/gnu/gettext/%{name}-%{version}.tar.xz Source2: msghack.py Source3: msghack.1 -# this patch has merged upstream -# Patch1: gettext-msgmerge-for-msgfmt.patch - # https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00195.html Patch1: gettext-0.21-gnulib-perror-tests.patch Patch2: gettext-0.21-disable-libtextstyle.patch From b2e6e951dce2e341eb1db4e916d888647352d7be Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 04:15:12 +0000 Subject: [PATCH 45/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 86c3db1..0252db9 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.21 -Release: 9%{?dist} +Release: 10%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -371,6 +371,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 0.21-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Tue Nov 23 2021 Jens Petersen - 0.21-9 - update autotools files with autoreconf to fix FTBFS (#2000426) From 7d0cd2d7e2031f9086d7a719d6352acbcfc5b026 Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Fri, 4 Mar 2022 12:23:38 +0530 Subject: [PATCH 46/89] Rebuild with gettext-snapshot-20220228 to fix ppc64le and tests Removed gettext-0.21-gnulib-perror-tests.patch as it is upstreamed. Resolves: rhbz#2045414 Signed-off-by: Sundeep Anand --- .gitignore | 1 + gettext-0.21-covscan.patch | 20 ++++++----- gettext-0.21-disable-libtextstyle.patch | 27 +++++++-------- gettext-0.21-gnulib-perror-tests.patch | 44 ------------------------- gettext.spec | 29 +++++++++------- sources | 2 +- 6 files changed, 45 insertions(+), 78 deletions(-) delete mode 100644 gettext-0.21-gnulib-perror-tests.patch diff --git a/.gitignore b/.gitignore index 664f03a..2676bef 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /gettext-0.*.tar.xz +/gettext-2022-02-28.tar.gz diff --git a/gettext-0.21-covscan.patch b/gettext-0.21-covscan.patch index 64ac78f..af87a6d 100644 --- a/gettext-0.21-covscan.patch +++ b/gettext-0.21-covscan.patch @@ -1,8 +1,8 @@ diff --git a/gettext-tools/src/msgl-cat.c b/gettext-tools/src/msgl-cat.c -index 990d39e..9814502 100644 +index 965cc8c..38c7ca1 100644 --- a/gettext-tools/src/msgl-cat.c +++ b/gettext-tools/src/msgl-cat.c -@@ -306,6 +306,7 @@ catenate_msgdomain_list (string_list_ty *file_list, +@@ -307,6 +307,7 @@ catenate_msgdomain_list (string_list_ty *file_list, mp->msgid); multiline_error (xstrdup (""), xasprintf ("%s\n", errormsg)); @@ -11,10 +11,10 @@ index 990d39e..9814502 100644 } else diff --git a/gettext-tools/src/x-csharp.c b/gettext-tools/src/x-csharp.c -index 5cf72ad..7a0e5d3 100644 +index 13d4a53..669db2f 100644 --- a/gettext-tools/src/x-csharp.c +++ b/gettext-tools/src/x-csharp.c -@@ -560,6 +560,7 @@ comment_line_end (size_t chars_to_remove) +@@ -561,6 +561,7 @@ comment_line_end (size_t chars_to_remove) buffer[buflen] = '\0'; savable_comment_add (buffer); lexical_context = lc_outside; @@ -23,10 +23,10 @@ index 5cf72ad..7a0e5d3 100644 diff --git a/gettext-tools/src/x-java.c b/gettext-tools/src/x-java.c -index eff1e6f..7e1bb78 100644 +index e89ab95..6c1b4a7 100644 --- a/gettext-tools/src/x-java.c +++ b/gettext-tools/src/x-java.c -@@ -460,6 +460,7 @@ comment_line_end (size_t chars_to_remove) +@@ -461,6 +461,7 @@ comment_line_end (size_t chars_to_remove) --buflen; buffer[buflen] = '\0'; savable_comment_add (buffer); @@ -35,18 +35,19 @@ index eff1e6f..7e1bb78 100644 diff --git a/gettext-tools/src/x-rst.c b/gettext-tools/src/x-rst.c -index cde1ee6..fca441e 100644 +index cde1ee6..82f645f 100644 --- a/gettext-tools/src/x-rst.c +++ b/gettext-tools/src/x-rst.c -@@ -651,6 +651,7 @@ extract_rsj (FILE *f, +@@ -651,6 +651,8 @@ extract_rsj (FILE *f, else goto invalid_rsj; + free (s1); ++ /* Parse a comma. */ c = phase2_getc (); if (c == '}') -@@ -667,6 +668,7 @@ extract_rsj (FILE *f, +@@ -667,6 +669,7 @@ extract_rsj (FILE *f, fp = NULL; real_file_name = NULL; @@ -66,3 +67,4 @@ index 06b7076..2189aac 100644 } else break; + diff --git a/gettext-0.21-disable-libtextstyle.patch b/gettext-0.21-disable-libtextstyle.patch index 66271ad..ae6a11a 100644 --- a/gettext-0.21-disable-libtextstyle.patch +++ b/gettext-0.21-disable-libtextstyle.patch @@ -1,5 +1,5 @@ diff --git a/Makefile.am b/Makefile.am -index 815e3c7..e897de7 100644 +index 764336c..daed715 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,7 @@ @@ -11,16 +11,16 @@ index 815e3c7..e897de7 100644 changelog_etc = \ gettext-runtime/ChangeLog.0 \ -@@ -123,7 +123,6 @@ distcheck-hook: - test "`sed 1,16d $(srcdir)/gettext-runtime/intl/xsize.h | md5sum`" = "`sed 1,16d $(srcdir)/gettext-tools/gnulib-lib/xsize.h | md5sum`" +@@ -85,7 +85,6 @@ distcheck-hook: + cmp -s $(srcdir)/gettext-runtime/m4/xsize.m4 $(srcdir)/gettext-tools/gnulib-m4/xsize.m4 cmp -s $(srcdir)/gettext-runtime/man/help2man $(srcdir)/gettext-tools/man/help2man cmp -s $(srcdir)/gettext-runtime/man/x-to-1.in $(srcdir)/gettext-tools/man/x-to-1.in - cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4 cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.java $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.java cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.class $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.class - test "`sed 1,15d $(srcdir)/gnulib-local/lib/alloca.in.h | md5sum`" = "`sed 1,15d $(srcdir)/gettext-runtime/libasprintf/alloca.in.h | md5sum`" + # Verify that all files have appropriate copyright headers. diff --git a/configure.ac b/configure.ac -index 49689fb..2d23b44 100644 +index f4e54ea..ff850ae 100644 --- a/configure.ac +++ b/configure.ac @@ -37,7 +37,7 @@ dnl Checks for typedefs, structures, and compiler characteristics. @@ -42,23 +42,23 @@ index 49689fb..2d23b44 100644 AC_CONFIG_FILES([Makefile]) diff --git a/gettext-tools/Makefile.am b/gettext-tools/Makefile.am -index 449a797..c5719c2 100644 +index 90f5548..cdf2834 100644 --- a/gettext-tools/Makefile.am +++ b/gettext-tools/Makefile.am @@ -19,7 +19,7 @@ AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4 --SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc -+SUBDIRS = intl gnulib-lib libgrep libgettextpo src po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc +-SUBDIRS = gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc ++SUBDIRS = gnulib-lib libgrep libgettextpo src po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc EXTRA_DIST = misc/DISCLAIM MOSTLYCLEANFILES = core *.stackdump diff --git a/gettext-tools/libgettextpo/textstyle.in.h b/gettext-tools/libgettextpo/textstyle.in.h -index 536b51b..585ce66 100644 +index 60015bd..ae5f5fb 100644 --- a/gettext-tools/libgettextpo/textstyle.in.h +++ b/gettext-tools/libgettextpo/textstyle.in.h -@@ -213,7 +213,8 @@ typedef ostream_t file_ostream_t; +@@ -239,7 +239,8 @@ typedef ostream_t file_ostream_t; static inline file_ostream_t file_ostream_create (FILE *fp) { @@ -68,7 +68,7 @@ index 536b51b..585ce66 100644 } /* --------------------------- From fd-ostream.h --------------------------- */ -@@ -413,6 +414,30 @@ html_styled_ostream_create (ostream_t destination _GL_UNUSED, +@@ -439,6 +440,30 @@ html_styled_ostream_create (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t destination, return NULL; } @@ -100,10 +100,10 @@ index 536b51b..585ce66 100644 #define color_test_mode false diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am -index 764ffad..eccfbbd 100644 +index f5e52ea..a9c9fac 100644 --- a/gettext-tools/src/Makefile.am +++ b/gettext-tools/src/Makefile.am -@@ -292,19 +292,9 @@ cldr_plurals_SOURCES = cldr-plural.y cldr-plural-exp.c cldr-plurals.c +@@ -300,19 +300,9 @@ cldr_plurals_SOURCES = cldr-plural.y cldr-plural-exp.c cldr-plurals.c cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML) cldr_plurals_LDADD = libgettextsrc.la $(LDADD) @@ -126,3 +126,4 @@ index 764ffad..eccfbbd 100644 # How to build libgettextsrc.la. # Need ../gnulib-lib/libgettextlib.la. + diff --git a/gettext-0.21-gnulib-perror-tests.patch b/gettext-0.21-gnulib-perror-tests.patch deleted file mode 100644 index 983264d..0000000 --- a/gettext-0.21-gnulib-perror-tests.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 175e0bc72808d564074c4adcc72aeadb74adfcc6 Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Thu, 27 Aug 2020 17:52:58 -0700 -Subject: [PATCH] perror, strerror_r: remove unportable tests - -Problem reported by Florian Weimer in: -https://lists.gnu.org/r/bug-gnulib/2020-08/msg00220.html -* tests/test-perror2.c (main): -* tests/test-strerror_r.c (main): Omit unportable tests. ---- - ChangeLog | 8 ++++++++ - tests/test-perror2.c | 3 --- - tests/test-strerror_r.c | 3 --- - 3 files changed, 8 insertions(+), 6 deletions(-) - -diff --git a/gettext-tools/gnulib-tests/test-perror2.c b/gettext-tools/gnulib-tests/test-perror2.c -index 1d14eda7b..c6214dd25 100644 ---- a/gettext-tools/gnulib-tests/test-perror2.c -+++ b/gettext-tools/gnulib-tests/test-perror2.c -@@ -79,9 +79,6 @@ main (void) - errno = -5; - perror (""); - ASSERT (!ferror (stderr)); -- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1)); -- ASSERT (msg2 == msg4 || STREQ (msg2, str2)); -- ASSERT (msg3 == msg4 || STREQ (msg3, str3)); - ASSERT (STREQ (msg4, str4)); - - free (str1); -diff --git a/gettext-tools/gnulib-tests/test-strerror_r.c b/gettext-tools/gnulib-tests/test-strerror_r.c -index b11d6fd9f..c1dbcf837 100644 ---- a/gettext-tools/gnulib-tests/test-strerror_r.c -+++ b/gettext-tools/gnulib-tests/test-strerror_r.c -@@ -165,9 +165,6 @@ main (void) - - strerror_r (EACCES, buf, sizeof buf); - strerror_r (-5, buf, sizeof buf); -- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1)); -- ASSERT (msg2 == msg4 || STREQ (msg2, str2)); -- ASSERT (msg3 == msg4 || STREQ (msg3, str3)); - ASSERT (STREQ (msg4, str4)); - - free (str1); - diff --git a/gettext.spec b/gettext.spec index 0252db9..c5c0ac6 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,10 +1,13 @@ %bcond_with jar %bcond_with java +%global snapshot 2022-02-28 Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.21 -Release: 10%{?dist} +# Snapshot date not included in version and in release to avoid build errors. +Release: 11%{?dist}.0.20220228 + # The following are licensed under LGPLv2+: # - libintl and its headers # - libasprintf and its headers @@ -20,19 +23,19 @@ Release: 10%{?dist} # Everything else is GPLv3+ License: GPLv3+ and LGPLv2+ and GFDL URL: https://www.gnu.org/software/gettext/ -Source: https://ftp.gnu.org/pub/gnu/gettext/%{name}-%{version}.tar.xz +# Source tarball has been extracted from below URL. +# https://gitlab.com/gnu-gettext/ci-distcheck/-/jobs/artifacts/master/raw/gettext-snapshot.tar?job=check-optimized +Source: %{name}-%{snapshot}.tar.gz Source2: msghack.py Source3: msghack.1 -# https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00195.html -Patch1: gettext-0.21-gnulib-perror-tests.patch -Patch2: gettext-0.21-disable-libtextstyle.patch -Patch3: gettext-0.21-covscan.patch +Patch1: gettext-0.21-disable-libtextstyle.patch +Patch2: gettext-0.21-covscan.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 BuildRequires: automake -# BuildRequires: libtool +BuildRequires: libtool # BuildRequires: bison BuildRequires: gcc-c++ @@ -157,10 +160,10 @@ think about. %prep -%autosetup -S git +%autosetup -n %{name}-%{snapshot} -S git # Refresh autotools files to latest versions # Should be removed after 0.21: -autoreconf --force +autoreconf --force --install # Defeat libtextstyle attempt to bundle libxml2. The comments # indicate this is done because the libtextstyle authors do not want @@ -353,8 +356,8 @@ make check LIBUNISTRING=-lunistring %files libs %{_libdir}/libasprintf.so.0* %{_libdir}/libgettextpo.so.0* -%{_libdir}/libgettextlib-0.*.so -%{_libdir}/libgettextsrc-0.*.so +%{_libdir}/libgettextlib-*.so +%{_libdir}/libgettextsrc-*.so %if %{with jar} %{_datadir}/%{name}/libintl.jar %endif @@ -371,6 +374,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Mar 3 2022 Sundeep Anand - 0.21-11 +- Rebuild with gettext-snapshot-20220228 to fix ppc64le and tests (#2045414) + Removed gettext-0.21-gnulib-perror-tests.patch as it is upstreamed. + * Thu Jan 20 2022 Fedora Release Engineering - 0.21-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index bfe361b..ecef20e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.21.tar.xz) = f7e2968651879f8444d43a176a149db9f9411f4a03132a7f3b37c2ed97e3978ae6888169c995c1953cb78943b6e3573811abcbb8661b6631edbbe067b2699ddf +SHA512 (gettext-2022-02-28.tar.gz) = abfce9e0aa0945ee3dc7fd559da2d475f7efefc3b1d322009fbadd33f1e5853dae749ebfde535b38c09bf00100d47b3709eb258870dbb9b43a7c228b8737c0a2 From b217c073ed4091e740358190c07ce2c17e3f8c5d Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Tue, 8 Mar 2022 22:33:51 +0530 Subject: [PATCH 47/89] fix gettext snapshot versioning issue to make it canonical Resolves: rhbz#2061646 Signed-off-by: Sundeep Anand --- .gitignore | 3 +-- gettext.spec | 24 +++++++++++++----------- sources | 2 +- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 2676bef..3efcfa0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/gettext-0.*.tar.xz -/gettext-2022-02-28.tar.gz +/gettext-0.*.tar.* diff --git a/gettext.spec b/gettext.spec index c5c0ac6..28f605c 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,12 +1,11 @@ %bcond_with jar %bcond_with java -%global snapshot 2022-02-28 +%global snapshot 20220203 Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.21 -# Snapshot date not included in version and in release to avoid build errors. -Release: 11%{?dist}.0.20220228 +Release: 12%{?dist}.0.%{snapshot} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -23,14 +22,14 @@ Release: 11%{?dist}.0.20220228 # Everything else is GPLv3+ License: GPLv3+ and LGPLv2+ and GFDL URL: https://www.gnu.org/software/gettext/ -# Source tarball has been extracted from below URL. -# https://gitlab.com/gnu-gettext/ci-distcheck/-/jobs/artifacts/master/raw/gettext-snapshot.tar?job=check-optimized -Source: %{name}-%{snapshot}.tar.gz +# Snapshot tarball has been generated by following upstream release steps. +# https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=blob;f=Admin/release-steps +Source: %{name}-%{version}-%{snapshot}.tar.gz Source2: msghack.py Source3: msghack.1 -Patch1: gettext-0.21-disable-libtextstyle.patch -Patch2: gettext-0.21-covscan.patch +Patch1: %{name}-%{version}-disable-libtextstyle.patch +Patch2: %{name}-%{version}-covscan.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 @@ -160,7 +159,7 @@ think about. %prep -%autosetup -n %{name}-%{snapshot} -S git +%autosetup -S git # Refresh autotools files to latest versions # Should be removed after 0.21: autoreconf --force --install @@ -356,8 +355,8 @@ make check LIBUNISTRING=-lunistring %files libs %{_libdir}/libasprintf.so.0* %{_libdir}/libgettextpo.so.0* -%{_libdir}/libgettextlib-*.so -%{_libdir}/libgettextsrc-*.so +%{_libdir}/libgettextlib-0.*.so +%{_libdir}/libgettextsrc-0.*.so %if %{with jar} %{_datadir}/%{name}/libintl.jar %endif @@ -374,6 +373,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Mar 9 2022 Sundeep Anand - 0.21-12 +- fix gettext snapshot versioning issue to make it canonical (#2061646) + * Thu Mar 3 2022 Sundeep Anand - 0.21-11 - Rebuild with gettext-snapshot-20220228 to fix ppc64le and tests (#2045414) Removed gettext-0.21-gnulib-perror-tests.patch as it is upstreamed. diff --git a/sources b/sources index ecef20e..7f8673c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-2022-02-28.tar.gz) = abfce9e0aa0945ee3dc7fd559da2d475f7efefc3b1d322009fbadd33f1e5853dae749ebfde535b38c09bf00100d47b3709eb258870dbb9b43a7c228b8737c0a2 +SHA512 (gettext-0.21-20220203.tar.gz) = ffa90ef2fe7894504a35ee1cee8e45e4e500dd22a10e70e888a95e4aa80002fad063e9ecc5610b4617908ddef05b50e780115b1c26864bce16fea9d02a44665b From be4c5c778be562b8cc10dee5dbd76ce797fb023a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 31 Mar 2022 10:44:30 +0800 Subject: [PATCH 48/89] add Java 17 support patch from Mamoru Tasaka (#2062407) --- gettext-java17-2062407.patch | 116 +++++++++++++++++++++++++++++++++++ gettext.spec | 10 ++- 2 files changed, 123 insertions(+), 3 deletions(-) create mode 100644 gettext-java17-2062407.patch diff --git a/gettext-java17-2062407.patch b/gettext-java17-2062407.patch new file mode 100644 index 0000000..e29fe77 --- /dev/null +++ b/gettext-java17-2062407.patch @@ -0,0 +1,116 @@ +diff -urp '--exclude=*~' gettext-0.21.orig/gettext-tools/gnulib-lib/javacomp.c gettext-0.21/gettext-tools/gnulib-lib/javacomp.c +--- gettext-0.21.orig/gettext-tools/gnulib-lib/javacomp.c 2022-03-09 12:22:05.000000000 +0900 ++++ gettext-0.21/gettext-tools/gnulib-lib/javacomp.c 2022-03-20 18:23:53.636052943 +0900 +@@ -116,9 +116,8 @@ default_target_version (void) + && (java_version_cache[1] >= '2' + && java_version_cache[1] <= '7') + && java_version_cache[2] == '\0') +- /* Assume that these (not yet released) Java versions will behave +- like the preceding ones. */ +- java_version_cache = "11"; ++ /* It's one of the valid target version values. */ ++ ; + else + java_version_cache = "1.1"; + } +@@ -128,7 +127,7 @@ default_target_version (void) + /* ======================= Source version dependent ======================= */ + + /* Convert a source version to an index. */ +-#define SOURCE_VERSION_BOUND 8 /* exclusive upper bound */ ++#define SOURCE_VERSION_BOUND 14 /* exclusive upper bound */ + static unsigned int + source_version_index (const char *source_version) + { +@@ -144,7 +143,7 @@ source_version_index (const char *source + else if (source_version[0] == '9' && source_version[1] == '\0') + return 5; + else if (source_version[0] == '1' +- && (source_version[1] >= '0' && source_version[1] <= '1') ++ && (source_version[1] >= '0' && source_version[1] <= '7') + && source_version[2] == '\0') + return source_version[1] - '0' + 6; + error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class")); +@@ -171,6 +170,10 @@ get_goodcode_snippet (const char *source + return "class conftest { public void m() { var i = new Integer(0); } }\n"; + if (strcmp (source_version, "11") == 0) + return "class conftest { Readable r = (var b) -> 0; }\n"; ++ if (source_version[0] == '1' ++ && (source_version[1] >= '2' && source_version[1] <= '7') ++ && source_version[2] == '\0') ++ return "class conftest { Readable r = (var b) -> 0; }\n"; + error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class")); + return NULL; + } +@@ -197,6 +200,10 @@ get_failcode_snippet (const char *source + return "class conftestfail { Readable r = (var b) -> 0; }\n"; + if (strcmp (source_version, "11") == 0) + return NULL; ++ if (source_version[0] == '1' ++ && (source_version[1] >= '2' && source_version[1] <= '7') ++ && source_version[2] == '\0') ++ return NULL; + error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class")); + return NULL; + } +@@ -204,7 +211,7 @@ get_failcode_snippet (const char *source + /* ======================= Target version dependent ======================= */ + + /* Convert a target version to an index. */ +-#define TARGET_VERSION_BOUND 11 /* exclusive upper bound */ ++#define TARGET_VERSION_BOUND 17 /* exclusive upper bound */ + static unsigned int + target_version_index (const char *target_version) + { +@@ -215,7 +222,7 @@ target_version_index (const char *target + else if (target_version[0] == '9' && target_version[1] == '\0') + return 8; + else if (target_version[0] == '1' +- && (target_version[1] >= '0' && target_version[1] <= '1') ++ && (target_version[1] >= '0' && target_version[1] <= '7') + && target_version[2] == '\0') + return target_version[1] - '0' + 9; + error (EXIT_FAILURE, 0, _("invalid target_version argument to compile_java_class")); +@@ -245,10 +252,10 @@ corresponding_classfile_version (const c + return 52; + if (strcmp (target_version, "9") == 0) + return 53; +- if (strcmp (target_version, "10") == 0) +- return 54; +- if (strcmp (target_version, "11") == 0) +- return 55; ++ if (target_version[0] == '1' ++ && (target_version[1] >= '0' && target_version[1] <= '7') ++ && target_version[2] == '\0') ++ return target_version[1] + 54; + error (EXIT_FAILURE, 0, _("invalid target_version argument to compile_java_class")); + return 0; + } +@@ -2439,7 +2446,7 @@ compile_java_class (const char * const * + } + } + +- error (0, 0, _("Java compiler not found, try installing gcj or set $JAVAC")); ++ /* error (0, 0, _("Java compiler not found, try installing gcj or set $JAVAC")); */ + err = true; + + done2: +diff -urp '--exclude=*~' gettext-0.21.orig/gettext-tools/src/write-java.c gettext-0.21/gettext-tools/src/write-java.c +--- gettext-0.21.orig/gettext-tools/src/write-java.c 2022-03-09 12:17:21.000000000 +0900 ++++ gettext-0.21/gettext-tools/src/write-java.c 2022-03-20 18:26:06.941734979 +0900 +@@ -1209,8 +1209,14 @@ msgdomain_write_java (message_list_ty *m + Java compilers create the class files in the source file's directory - + which is in a temporary directory in our case. */ + java_sources[0] = java_file_name; +- if (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory, ++ if (1 ++ && (compile_java_class (java_sources, 1, NULL, 0, "17", "17", directory, ++ true, false, true, verbose > 0)) /* assume JDK 17 */ ++ && (compile_java_class (java_sources, 1, NULL, 0, "11", "11", directory, ++ true, false, true, verbose > 0)) /* assume JDK 11 */ ++ && (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory, + true, false, true, verbose > 0)) ++ ) + { + if (!verbose) + error (0, 0, diff --git a/gettext.spec b/gettext.spec index 28f605c..d5f284e 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.21 -Release: 12%{?dist}.0.%{snapshot} +Release: 13%{?dist}.0.%{snapshot} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -30,6 +30,7 @@ Source3: msghack.1 Patch1: %{name}-%{version}-disable-libtextstyle.patch Patch2: %{name}-%{version}-covscan.patch +Patch3: gettext-java17-2062407.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 @@ -373,10 +374,13 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog -* Wed Mar 9 2022 Sundeep Anand - 0.21-12 +* Thu Mar 31 2022 Jens Petersen - 0.21-13.0.20220203 +- add Java 17 support patch from Mamoru Tasaka (#2062407) + +* Wed Mar 9 2022 Sundeep Anand - 0.21-12.0.20220203 - fix gettext snapshot versioning issue to make it canonical (#2061646) -* Thu Mar 3 2022 Sundeep Anand - 0.21-11 +* Thu Mar 3 2022 Sundeep Anand - 0.21-11.0.20220203 - Rebuild with gettext-snapshot-20220228 to fix ppc64le and tests (#2045414) Removed gettext-0.21-gnulib-perror-tests.patch as it is upstreamed. From 419fa91470735f1ca1f7c6774d81b7f14c0ee553 Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Mon, 6 Jun 2022 11:52:12 +0530 Subject: [PATCH 49/89] Adding Provides: gettext-tools to the gettext package for forward compatibility, to support proposed gettext-tools package. See https://fedoraproject.org/wiki/Changes/GettextToolsPackage Signed-off-by: Sundeep Anand --- gettext.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/gettext.spec b/gettext.spec index d5f284e..7c283b3 100644 --- a/gettext.spec +++ b/gettext.spec @@ -81,6 +81,7 @@ BuildRequires: make Requires: %{name}-libs%{_isa} = %{version}-%{release} Provides: bundled(gnulib) Provides: bundled(libcroco) = 0.6.12 +Provides: gettext-tools = %{version}-%{release} %description The GNU gettext package provides a set of tools and documentation for From 205b2f420a07abb0649aa200f5843920771d0a8f Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Mon, 6 Jun 2022 11:52:12 +0530 Subject: [PATCH 50/89] Adding Provides: gettext-tools to the gettext package for forward compatibility, to support proposed gettext-tools package. See https://fedoraproject.org/wiki/Changes/GettextToolsPackage Signed-off-by: Sundeep Anand --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 7c283b3..9ad56b5 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.21 -Release: 13%{?dist}.0.%{snapshot} +Release: 14%{?dist}.0.%{snapshot} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -375,6 +375,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Mon Jun 6 2022 Sundeep Anand - 0.21-14.0.20220203 +- add Provides: gettext-tools to gettext package for forward compatibility. + * Thu Mar 31 2022 Jens Petersen - 0.21-13.0.20220203 - add Java 17 support patch from Mamoru Tasaka (#2062407) From 7036fc870c4c86e9e54eed57617144fc67d46440 Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Tue, 7 Jun 2022 16:28:52 +0530 Subject: [PATCH 51/89] add Provides: gettext-runtime to gettext package for forward compatibility --- gettext.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gettext.spec b/gettext.spec index 9ad56b5..2fa2f4c 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.21 -Release: 14%{?dist}.0.%{snapshot} +Release: 15%{?dist}.0.%{snapshot} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -81,7 +81,7 @@ BuildRequires: make Requires: %{name}-libs%{_isa} = %{version}-%{release} Provides: bundled(gnulib) Provides: bundled(libcroco) = 0.6.12 -Provides: gettext-tools = %{version}-%{release} +Provides: gettext-runtime = %{version}-%{release} %description The GNU gettext package provides a set of tools and documentation for @@ -375,6 +375,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Tue Jun 7 2022 Sundeep Anand - 0.21-15.0.20220203 +- add Provides: gettext-runtime to gettext package for forward compatibility. +- and removed Provides: gettext-tools + * Mon Jun 6 2022 Sundeep Anand - 0.21-14.0.20220203 - add Provides: gettext-tools to gettext package for forward compatibility. From 59393a077243d2caeba80b3b7b8fe5f41011fc8b Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Mon, 6 Jun 2022 11:52:12 +0530 Subject: [PATCH 52/89] separate out gettext-runtime from the main package into a subpackage --- gettext.spec | 98 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 61 insertions(+), 37 deletions(-) diff --git a/gettext.spec b/gettext.spec index 2fa2f4c..3f80cbe 100644 --- a/gettext.spec +++ b/gettext.spec @@ -2,17 +2,11 @@ %bcond_with java %global snapshot 20220203 -Summary: GNU libraries and utilities for producing multi-lingual messages +Summary: GNU Gettext tools and documentation for developers and translators Name: gettext Version: 0.21 -Release: 15%{?dist}.0.%{snapshot} +Release: 16%{?dist}.0.%{snapshot} -# The following are licensed under LGPLv2+: -# - libintl and its headers -# - libasprintf and its headers -# - libintl.jar -# - GNU.Gettext.dll -# - gettext.sh # The following are licensed under GFDL: # - gettext-tools/doc/FAQ.html # - gettext-tools/doc/tutorial.html @@ -77,23 +71,34 @@ BuildRequires: glibc-langpack-ja BuildRequires: glibc-langpack-tr BuildRequires: glibc-langpack-zh BuildRequires: make +Requires: %{name}-runtime = %{version}-%{release} + +%description +Gettext include a set of conventions about how programs should +be written to support message catalogs, a directory and file naming +organization for the message catalogs, a runtime library which supports +the retrieval of translated messages, and stand-alone programs for handling +the translatable and the already translated strings. + + +%package runtime +Summary: GNU runtime libraries and programs for producing multi-lingual messages +# The following are licensed under LGPLv2+: +# - libintl and its headers +# - libasprintf and its headers +# - libintl.jar +# - GNU.Gettext.dll +# - gettext.sh +License: GPLv3+ and LGPLv2+ # Depend on the exact version of the library sub package Requires: %{name}-libs%{_isa} = %{version}-%{release} Provides: bundled(gnulib) Provides: bundled(libcroco) = 0.6.12 -Provides: gettext-runtime = %{version}-%{release} -%description -The GNU gettext package provides a set of tools and documentation for -producing multi-lingual messages in programs. Tools include a set of -conventions about how programs should be written to support message -catalogs, a directory and file naming organization for the message -catalogs, a runtime library which supports the retrieval of translated -messages, and stand-alone programs for handling the translatable and -the already translated strings. Gettext provides an easy to use -library and tools for creating, using, and modifying natural language -catalogs and is a powerful and simple method for internationalizing -programs. +%description runtime +The GNU gettext-runtime package provides an easy to use runtime libraries and +programs for creating, using, and modifying natural language catalogs +and is a powerful and simple method for internationalizing programs. %package common-devel @@ -269,7 +274,6 @@ rm ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.elc %find_lang %{name}-runtime %find_lang %{name}-tools -cat %{name}-*.lang > %{name}.lang %check @@ -283,16 +287,41 @@ make check LIBUNISTRING=-lunistring %ldconfig_scriptlets libs -%files -f %{name}.lang +%files runtime -f %{name}-runtime.lang %license COPYING %doc AUTHORS gettext-runtime/BUGS -%doc gettext-tools/misc/DISCLAIM README -%doc NEWS THANKS +%doc COPYING NEWS THANKS README %doc gettext-runtime/man/*.1.html %doc gettext-runtime/intl/COPYING* %{_bindir}/envsubst %{_bindir}/gettext %{_bindir}/gettext.sh +%{_bindir}/ngettext +%exclude %{_mandir}/man1/autopoint.1* +%exclude %{_mandir}/man1/gettextize.1* +%exclude %{_mandir}/man1/msg* +%exclude %{_mandir}/man1/recode-sr-latin.1* +%exclude %{_mandir}/man1/xgettext.1* +%{_mandir}/man1/* +%{_libdir}/%{name} +%if %{with java} +%exclude %{_libdir}/%{name}/gnu.gettext.* +%endif +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/its +%{_datadir}/%{name}/ABOUT-NLS +%{_datadir}/%{name}/po +%{_datadir}/%{name}/styles +%dir %{_datadir}/%{name}-%{version} +%{_datadir}/%{name}-%{version}/its + +%files -f %{name}-tools.lang +%doc gettext-tools/misc/DISCLAIM README +%doc gettext-tools/man/msg*.1.html +%doc gettext-tools/man/xgettext.1.html +%doc gettext-tools/man/recode*.1.html +%doc gettext-tools/doc/FAQ.html +%doc gettext-tools/doc/tutorial.html %{_bindir}/msgattrib %{_bindir}/msgcat %{_bindir}/msgcmp @@ -307,31 +336,23 @@ make check LIBUNISTRING=-lunistring %{_bindir}/msgmerge %{_bindir}/msgunfmt %{_bindir}/msguniq -%{_bindir}/ngettext %{_bindir}/recode-sr-latin %{_bindir}/xgettext %{_infodir}/gettext* %exclude %{_mandir}/man1/autopoint.1* %exclude %{_mandir}/man1/gettextize.1* %exclude %{_mandir}/man1/msghack.1* -%{_mandir}/man1/* -%{_libdir}/%{name} -%if %{with java} -%exclude %{_libdir}/%{name}/gnu.gettext.* -%endif -%dir %{_datadir}/%{name} -%dir %{_datadir}/%{name}/its -%{_datadir}/%{name}/ABOUT-NLS -%{_datadir}/%{name}/po -%{_datadir}/%{name}/styles -%dir %{_datadir}/%{name}-%{version} -%{_datadir}/%{name}-%{version}/its +%{_mandir}/man1/msg* +%{_mandir}/man1/recode*.1* +%{_mandir}/man1/xgettext.1* %files common-devel %{_datadir}/%{name}/archive.*.tar.xz %files devel %doc gettext-runtime/man/*.3.html ChangeLog +%doc gettext-tools/man/autopoint.1.html +%doc gettext-tools/man/gettextize.1.html %{_bindir}/autopoint %{_bindir}/gettextize %{_datadir}/%{name}/projects/ @@ -375,6 +396,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Jun 8 2022 Sundeep Anand - 0.21-16.0.20220203 +- separate out gettext-runtime from the main package into a subpackage + * Tue Jun 7 2022 Sundeep Anand - 0.21-15.0.20220203 - add Provides: gettext-runtime to gettext package for forward compatibility. - and removed Provides: gettext-tools From 2dabab53d8e023b20768f0bbbee2b76fc737f1ba Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 21 Jul 2022 11:39:25 +0800 Subject: [PATCH 53/89] few cleanup tweaks slightly lessening some minor changes list base files first before the runtime file list --- gettext.spec | 91 +++++++++++++++++++++++++++------------------------- 1 file changed, 48 insertions(+), 43 deletions(-) diff --git a/gettext.spec b/gettext.spec index 3f80cbe..3ee5b40 100644 --- a/gettext.spec +++ b/gettext.spec @@ -2,11 +2,17 @@ %bcond_with java %global snapshot 20220203 -Summary: GNU Gettext tools and documentation for developers and translators +Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.21 Release: 16%{?dist}.0.%{snapshot} +# The following are licensed under LGPLv2+: +# - libintl and its headers +# - libasprintf and its headers +# - libintl.jar +# - GNU.Gettext.dll +# - gettext.sh # The following are licensed under GFDL: # - gettext-tools/doc/FAQ.html # - gettext-tools/doc/tutorial.html @@ -71,29 +77,28 @@ BuildRequires: glibc-langpack-ja BuildRequires: glibc-langpack-tr BuildRequires: glibc-langpack-zh BuildRequires: make +Provides: bundled(gnulib) +Provides: bundled(libcroco) = 0.6.12 Requires: %{name}-runtime = %{version}-%{release} %description -Gettext include a set of conventions about how programs should -be written to support message catalogs, a directory and file naming -organization for the message catalogs, a runtime library which supports -the retrieval of translated messages, and stand-alone programs for handling -the translatable and the already translated strings. +The GNU gettext package provides a set of tools and documentation for +producing multi-lingual messages in programs. Tools include a set of +conventions about how programs should be written to support message +catalogs, a directory and file naming organization for the message +catalogs, a runtime library which supports the retrieval of translated +messages, and stand-alone programs for handling the translatable and +the already translated strings. Gettext provides an easy to use +library and tools for creating, using, and modifying natural language +catalogs and is a powerful and simple method for internationalizing +programs. %package runtime Summary: GNU runtime libraries and programs for producing multi-lingual messages -# The following are licensed under LGPLv2+: -# - libintl and its headers -# - libasprintf and its headers -# - libintl.jar -# - GNU.Gettext.dll -# - gettext.sh License: GPLv3+ and LGPLv2+ # Depend on the exact version of the library sub package Requires: %{name}-libs%{_isa} = %{version}-%{release} -Provides: bundled(gnulib) -Provides: bundled(libcroco) = 0.6.12 %description runtime The GNU gettext-runtime package provides an easy to use runtime libraries and @@ -287,39 +292,12 @@ make check LIBUNISTRING=-lunistring %ldconfig_scriptlets libs -%files runtime -f %{name}-runtime.lang -%license COPYING -%doc AUTHORS gettext-runtime/BUGS -%doc COPYING NEWS THANKS README -%doc gettext-runtime/man/*.1.html -%doc gettext-runtime/intl/COPYING* -%{_bindir}/envsubst -%{_bindir}/gettext -%{_bindir}/gettext.sh -%{_bindir}/ngettext -%exclude %{_mandir}/man1/autopoint.1* -%exclude %{_mandir}/man1/gettextize.1* -%exclude %{_mandir}/man1/msg* -%exclude %{_mandir}/man1/recode-sr-latin.1* -%exclude %{_mandir}/man1/xgettext.1* -%{_mandir}/man1/* -%{_libdir}/%{name} -%if %{with java} -%exclude %{_libdir}/%{name}/gnu.gettext.* -%endif -%dir %{_datadir}/%{name} -%dir %{_datadir}/%{name}/its -%{_datadir}/%{name}/ABOUT-NLS -%{_datadir}/%{name}/po -%{_datadir}/%{name}/styles -%dir %{_datadir}/%{name}-%{version} -%{_datadir}/%{name}-%{version}/its - %files -f %{name}-tools.lang +%doc AUTHORS NEWS README THANKS %doc gettext-tools/misc/DISCLAIM README %doc gettext-tools/man/msg*.1.html -%doc gettext-tools/man/xgettext.1.html %doc gettext-tools/man/recode*.1.html +%doc gettext-tools/man/xgettext.1.html %doc gettext-tools/doc/FAQ.html %doc gettext-tools/doc/tutorial.html %{_bindir}/msgattrib @@ -346,6 +324,33 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/recode*.1* %{_mandir}/man1/xgettext.1* +%files runtime -f %{name}-runtime.lang +%license COPYING +%doc gettext-runtime/BUGS +%doc gettext-runtime/man/*.1.html +%doc gettext-runtime/intl/COPYING* +%{_bindir}/envsubst +%{_bindir}/gettext +%{_bindir}/gettext.sh +%{_bindir}/ngettext +%exclude %{_mandir}/man1/autopoint.1* +%exclude %{_mandir}/man1/gettextize.1* +%exclude %{_mandir}/man1/msg* +%exclude %{_mandir}/man1/recode-sr-latin.1* +%exclude %{_mandir}/man1/xgettext.1* +%{_mandir}/man1/* +%{_libdir}/%{name} +%if %{with java} +%exclude %{_libdir}/%{name}/gnu.gettext.* +%endif +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/its +%{_datadir}/%{name}/ABOUT-NLS +%{_datadir}/%{name}/po +%{_datadir}/%{name}/styles +%dir %{_datadir}/%{name}-%{version} +%{_datadir}/%{name}-%{version}/its + %files common-devel %{_datadir}/%{name}/archive.*.tar.xz From 43488c96895d4a2028d50275cb23d795f428cf2c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 21 Jul 2022 12:15:03 +0800 Subject: [PATCH 54/89] remove duplicate README from base filelist --- gettext.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 3ee5b40..3acb3ec 100644 --- a/gettext.spec +++ b/gettext.spec @@ -294,7 +294,7 @@ make check LIBUNISTRING=-lunistring %files -f %{name}-tools.lang %doc AUTHORS NEWS README THANKS -%doc gettext-tools/misc/DISCLAIM README +%doc gettext-tools/misc/DISCLAIM %doc gettext-tools/man/msg*.1.html %doc gettext-tools/man/recode*.1.html %doc gettext-tools/man/xgettext.1.html From 8faf1377232061050f121478fb9e78e0e960c5fe Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 04:25:47 +0000 Subject: [PATCH 55/89] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 3acb3ec..49ad3c4 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.21 -Release: 16%{?dist}.0.%{snapshot} +Release: 17%{?dist}.0.%{snapshot} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -401,6 +401,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 0.21-17.0.20220203 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed Jun 8 2022 Sundeep Anand - 0.21-16.0.20220203 - separate out gettext-runtime from the main package into a subpackage From 4dc394f96990484285a909631bbcc6012457389f Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Thu, 11 Aug 2022 10:47:28 +0530 Subject: [PATCH 56/89] Introduce gettext-envsubst sub-package for allow install envsubst with minimal footprint --- gettext.spec | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/gettext.spec b/gettext.spec index 49ad3c4..ccad38c 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.21 -Release: 17%{?dist}.0.%{snapshot} +Release: 18%{?dist}.0.%{snapshot} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -99,6 +99,8 @@ Summary: GNU runtime libraries and programs for producing multi-lingual messages License: GPLv3+ and LGPLv2+ # Depend on the exact version of the library sub package Requires: %{name}-libs%{_isa} = %{version}-%{release} +Requires: %{name}-envsubst = %{version}-%{release} + %description runtime The GNU gettext-runtime package provides an easy to use runtime libraries and @@ -170,6 +172,13 @@ This program can be used to alter .po files in ways no sane mind would think about. +%package envsubst +Summary: Substitutes the values of environment variables + +%description envsubst +Substitutes the values of environment variables. + + %prep %autosetup -S git # Refresh autotools files to latest versions @@ -329,7 +338,6 @@ make check LIBUNISTRING=-lunistring %doc gettext-runtime/BUGS %doc gettext-runtime/man/*.1.html %doc gettext-runtime/intl/COPYING* -%{_bindir}/envsubst %{_bindir}/gettext %{_bindir}/gettext.sh %{_bindir}/ngettext @@ -351,6 +359,10 @@ make check LIBUNISTRING=-lunistring %dir %{_datadir}/%{name}-%{version} %{_datadir}/%{name}-%{version}/its +%files envsubst +%license COPYING +%{_bindir}/envsubst + %files common-devel %{_datadir}/%{name}/archive.*.tar.xz @@ -401,6 +413,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Aug 10 2022 Honza Horak - 0.21-18.0.20220203 +- Introduce envsubst sub-package for allow install envsubst with minimal + footprint + * Thu Jul 21 2022 Fedora Release Engineering - 0.21-17.0.20220203 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From b032e270f1c5e9dd027793702cd3ae218b356ca1 Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Tue, 30 Aug 2022 14:52:29 +0530 Subject: [PATCH 57/89] Pulling snapshot info before dist in the release string Signed-off-by: Sundeep Anand --- gettext.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index ccad38c..42c6b8b 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.21 -Release: 18%{?dist}.0.%{snapshot} +Release: 18.0.%{snapshot}%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers From adb95f50203522263692adec1757a39ed0414e0b Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Wed, 7 Sep 2022 15:31:23 +0530 Subject: [PATCH 58/89] Add conflicts to enable new (sub)packages installable independently of the original package. Signed-off-by: Sundeep Anand --- gettext.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 42c6b8b..12226f0 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.21 -Release: 18.0.%{snapshot}%{?dist} +Release: 19.0.%{snapshot}%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -100,6 +100,7 @@ License: GPLv3+ and LGPLv2+ # Depend on the exact version of the library sub package Requires: %{name}-libs%{_isa} = %{version}-%{release} Requires: %{name}-envsubst = %{version}-%{release} +Conflicts: %{name} <= 0.21-15%{?dist}.0.20220203 %description runtime @@ -174,6 +175,7 @@ think about. %package envsubst Summary: Substitutes the values of environment variables +Conflicts: %{name} <= 0.21-15%{?dist}.0.20220203 %description envsubst Substitutes the values of environment variables. @@ -413,6 +415,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Mon Sep 12 2022 Sundeep Anand - 0.21-19.0.20220203 +- Add conflicts to enable new (sub)packages installable independently of the original package. + * Wed Aug 10 2022 Honza Horak - 0.21-18.0.20220203 - Introduce envsubst sub-package for allow install envsubst with minimal footprint From e09fc9f99332dfb6f97095cb2aabcae9df8a64bd Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Thu, 13 Oct 2022 15:28:24 +0530 Subject: [PATCH 59/89] Include doc and man pages for envsubst subpackage. Move _libdir and _datadir from gettext-runtime to gettext package. --- gettext.spec | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/gettext.spec b/gettext.spec index 12226f0..43c53ef 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.21 -Release: 19.0.%{snapshot}%{?dist} +Release: 20.0.%{snapshot}%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -329,26 +329,12 @@ make check LIBUNISTRING=-lunistring %{_bindir}/xgettext %{_infodir}/gettext* %exclude %{_mandir}/man1/autopoint.1* +%exclude %{_mandir}/man1/envsubst.1* %exclude %{_mandir}/man1/gettextize.1* %exclude %{_mandir}/man1/msghack.1* %{_mandir}/man1/msg* %{_mandir}/man1/recode*.1* %{_mandir}/man1/xgettext.1* - -%files runtime -f %{name}-runtime.lang -%license COPYING -%doc gettext-runtime/BUGS -%doc gettext-runtime/man/*.1.html -%doc gettext-runtime/intl/COPYING* -%{_bindir}/gettext -%{_bindir}/gettext.sh -%{_bindir}/ngettext -%exclude %{_mandir}/man1/autopoint.1* -%exclude %{_mandir}/man1/gettextize.1* -%exclude %{_mandir}/man1/msg* -%exclude %{_mandir}/man1/recode-sr-latin.1* -%exclude %{_mandir}/man1/xgettext.1* -%{_mandir}/man1/* %{_libdir}/%{name} %if %{with java} %exclude %{_libdir}/%{name}/gnu.gettext.* @@ -361,9 +347,28 @@ make check LIBUNISTRING=-lunistring %dir %{_datadir}/%{name}-%{version} %{_datadir}/%{name}-%{version}/its +%files runtime -f %{name}-runtime.lang +%license COPYING +%doc gettext-runtime/BUGS +%doc gettext-runtime/man/gettext.1.html +%doc gettext-runtime/man/ngettext.1.html +%doc gettext-runtime/intl/COPYING* +%{_bindir}/gettext +%{_bindir}/gettext.sh +%{_bindir}/ngettext +%exclude %{_mandir}/man1/autopoint.1* +%exclude %{_mandir}/man1/envsubst.1* +%exclude %{_mandir}/man1/gettextize.1* +%exclude %{_mandir}/man1/msg* +%exclude %{_mandir}/man1/recode-sr-latin.1* +%exclude %{_mandir}/man1/xgettext.1* +%{_mandir}/man1/* + %files envsubst %license COPYING +%doc gettext-runtime/man/envsubst.1.html %{_bindir}/envsubst +%{_mandir}/man1/envsubst.1* %files common-devel %{_datadir}/%{name}/archive.*.tar.xz @@ -415,6 +420,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Oct 13 2022 Sundeep Anand - 0.21-20.0.20220203 +- Include doc and man pages for envsubst subpackage. + Move _libdir and _datadir from gettext-runtime to gettext package. + * Mon Sep 12 2022 Sundeep Anand - 0.21-19.0.20220203 - Add conflicts to enable new (sub)packages installable independently of the original package. From 7aca11f7d43d10c47fbeb4efd16af2884b34f9c7 Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Fri, 14 Oct 2022 13:38:25 +0530 Subject: [PATCH 60/89] update to 0.21.1 release --- ...scan.patch => gettext-0.21.1-covscan.patch | 0 ... gettext-0.21.1-disable-libtextstyle.patch | 20 +++++++++---------- gettext.spec | 17 ++++++++-------- sources | 2 +- 4 files changed, 19 insertions(+), 20 deletions(-) rename gettext-0.21-covscan.patch => gettext-0.21.1-covscan.patch (100%) rename gettext-0.21-disable-libtextstyle.patch => gettext-0.21.1-disable-libtextstyle.patch (88%) diff --git a/gettext-0.21-covscan.patch b/gettext-0.21.1-covscan.patch similarity index 100% rename from gettext-0.21-covscan.patch rename to gettext-0.21.1-covscan.patch diff --git a/gettext-0.21-disable-libtextstyle.patch b/gettext-0.21.1-disable-libtextstyle.patch similarity index 88% rename from gettext-0.21-disable-libtextstyle.patch rename to gettext-0.21.1-disable-libtextstyle.patch index ae6a11a..cb70687 100644 --- a/gettext-0.21-disable-libtextstyle.patch +++ b/gettext-0.21.1-disable-libtextstyle.patch @@ -1,5 +1,5 @@ diff --git a/Makefile.am b/Makefile.am -index 764336c..daed715 100644 +index 5a7184c..28267a5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,7 @@ @@ -11,14 +11,14 @@ index 764336c..daed715 100644 changelog_etc = \ gettext-runtime/ChangeLog.0 \ -@@ -85,7 +85,6 @@ distcheck-hook: - cmp -s $(srcdir)/gettext-runtime/m4/xsize.m4 $(srcdir)/gettext-tools/gnulib-m4/xsize.m4 +@@ -124,7 +124,6 @@ distcheck-hook: + test "`sed 1,16d $(srcdir)/gettext-runtime/intl/xsize.h | md5sum`" = "`sed 1,16d $(srcdir)/gettext-tools/gnulib-lib/xsize.h | md5sum`" cmp -s $(srcdir)/gettext-runtime/man/help2man $(srcdir)/gettext-tools/man/help2man cmp -s $(srcdir)/gettext-runtime/man/x-to-1.in $(srcdir)/gettext-tools/man/x-to-1.in - cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4 cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.java $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.java cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.class $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.class - # Verify that all files have appropriate copyright headers. + test "`sed 1,15d $(srcdir)/gnulib-local/lib/alloca.in.h | md5sum`" = "`sed 1,15d $(srcdir)/gettext-runtime/libasprintf/alloca.in.h | md5sum`" diff --git a/configure.ac b/configure.ac index f4e54ea..ff850ae 100644 --- a/configure.ac @@ -42,20 +42,20 @@ index f4e54ea..ff850ae 100644 AC_CONFIG_FILES([Makefile]) diff --git a/gettext-tools/Makefile.am b/gettext-tools/Makefile.am -index 90f5548..cdf2834 100644 +index 449a797..bce4ad8 100644 --- a/gettext-tools/Makefile.am +++ b/gettext-tools/Makefile.am @@ -19,7 +19,7 @@ AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4 --SUBDIRS = gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc -+SUBDIRS = gnulib-lib libgrep libgettextpo src po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc +-SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc ++SUBDIRS = intl gnulib-lib libgrep libgettextpo src po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc EXTRA_DIST = misc/DISCLAIM MOSTLYCLEANFILES = core *.stackdump diff --git a/gettext-tools/libgettextpo/textstyle.in.h b/gettext-tools/libgettextpo/textstyle.in.h -index 60015bd..ae5f5fb 100644 +index 05ce0cf..936331c 100644 --- a/gettext-tools/libgettextpo/textstyle.in.h +++ b/gettext-tools/libgettextpo/textstyle.in.h @@ -239,7 +239,8 @@ typedef ostream_t file_ostream_t; @@ -100,10 +100,10 @@ index 60015bd..ae5f5fb 100644 #define color_test_mode false diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am -index f5e52ea..a9c9fac 100644 +index 510ab2a..72791ba 100644 --- a/gettext-tools/src/Makefile.am +++ b/gettext-tools/src/Makefile.am -@@ -300,19 +300,9 @@ cldr_plurals_SOURCES = cldr-plural.y cldr-plural-exp.c cldr-plurals.c +@@ -291,19 +291,9 @@ cldr_plurals_SOURCES = cldr-plural.y cldr-plural-exp.c cldr-plurals.c cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML) cldr_plurals_LDADD = libgettextsrc.la $(LDADD) diff --git a/gettext.spec b/gettext.spec index 43c53ef..cc3b892 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,11 +1,10 @@ %bcond_with jar %bcond_with java -%global snapshot 20220203 Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.21 -Release: 20.0.%{snapshot}%{?dist} +Version: 0.21.1 +Release: 1%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -22,15 +21,13 @@ Release: 20.0.%{snapshot}%{?dist} # Everything else is GPLv3+ License: GPLv3+ and LGPLv2+ and GFDL URL: https://www.gnu.org/software/gettext/ -# Snapshot tarball has been generated by following upstream release steps. -# https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=blob;f=Admin/release-steps -Source: %{name}-%{version}-%{snapshot}.tar.gz +Source: https://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz Source2: msghack.py Source3: msghack.1 Patch1: %{name}-%{version}-disable-libtextstyle.patch Patch2: %{name}-%{version}-covscan.patch -Patch3: gettext-java17-2062407.patch +Patch3: %{name}-java17-2062407.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 @@ -210,7 +207,7 @@ export CFLAGS="$RPM_OPT_FLAGS -D__SUPPORT_SNAN__" export CPPFLAGS="-I%{_includedir}/libxml2" # Side effect of unbundling libxml2 from libtextstyle. export LIBS="-lxml2" -%configure --without-included-gettext --enable-nls --disable-static \ +%configure --enable-nls --disable-static \ --enable-shared --disable-csharp --disable-rpath \ %if %{with java} --enable-java \ @@ -238,7 +235,6 @@ sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ install -pm 755 %SOURCE2 ${RPM_BUILD_ROOT}%{_bindir}/msghack install -pm 644 %SOURCE3 ${RPM_BUILD_ROOT}%{_mandir}/man1/msghack.1 - # make preloadable_libintl.so executable chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/preloadable_libintl.so @@ -420,6 +416,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Fri Oct 14 2022 Sundeep Anand - 0.21.1-1 +- update to 0.21.1 release + * Thu Oct 13 2022 Sundeep Anand - 0.21-20.0.20220203 - Include doc and man pages for envsubst subpackage. Move _libdir and _datadir from gettext-runtime to gettext package. diff --git a/sources b/sources index 7f8673c..04e6282 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.21-20220203.tar.gz) = ffa90ef2fe7894504a35ee1cee8e45e4e500dd22a10e70e888a95e4aa80002fad063e9ecc5610b4617908ddef05b50e780115b1c26864bce16fea9d02a44665b +SHA512 (gettext-0.21.1.tar.gz) = ccd43a43fab3c90ed99b3e27628c9aeb7186398153b137a4997f8c7ddfd9729b0ba9d15348567e5206af50ac027673d2b8a3415bb3fc65f87ad778f85dc03a05 From aa5465907019db3696ef4c9397ae6656d5c5ab95 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 04:40:41 +0000 Subject: [PATCH 61/89] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index cc3b892..dd7a590 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.21.1 -Release: 1%{?dist} +Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -416,6 +416,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 0.21.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Fri Oct 14 2022 Sundeep Anand - 0.21.1-1 - update to 0.21.1 release From 15c3691527bd5d4d20e8f753c7f72e28a6ce533f Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Wed, 29 Mar 2023 17:57:09 +0530 Subject: [PATCH 62/89] update license tag to as per SPDX identifiers --- gettext.spec | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gettext.spec b/gettext.spec index dd7a590..43e451a 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.21.1 -Release: 2%{?dist} +Release: 3%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -19,7 +19,7 @@ Release: 2%{?dist} # - libasprintf info files # - libtextstyle info files # Everything else is GPLv3+ -License: GPLv3+ and LGPLv2+ and GFDL +License: GPL-3.0-or-later and LGPL-2.0-or-later and GFDL-1.2-or-later URL: https://www.gnu.org/software/gettext/ Source: https://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz Source2: msghack.py @@ -93,7 +93,7 @@ programs. %package runtime Summary: GNU runtime libraries and programs for producing multi-lingual messages -License: GPLv3+ and LGPLv2+ +License: GPL-3.0-or-later and LGPL-2.0-or-later # Depend on the exact version of the library sub package Requires: %{name}-libs%{_isa} = %{version}-%{release} Requires: %{name}-envsubst = %{version}-%{release} @@ -109,7 +109,7 @@ and is a powerful and simple method for internationalizing programs. %package common-devel Summary: Common development files for %{name} # autopoint archive -License: GPLv3+ +License: GPL-3.0-or-later BuildArch: noarch %description common-devel @@ -121,7 +121,7 @@ Summary: Development files for %{name} # autopoint is GPLv3+ # libasprintf is LGPLv2+ # libgettextpo is GPLv3+ -License: LGPLv2+ and GPLv3+ and GFDL +License: LGPL-2.0-or-later and GPL-3.0-or-later and GFDL-1.2-or-later Requires: %{name} = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-common-devel = %{version}-%{release} @@ -142,7 +142,7 @@ want to add gettext support for your project. Summary: Libraries for %{name} # libasprintf is LGPLv2+ # libgettextpo is GPLv3+ -License: LGPLv2+ and GPLv3+ +License: LGPL-2.0-or-later and GPL-3.0-or-later Obsoletes: libtextstyle < %{version}-%{release} %description libs @@ -416,6 +416,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Mar 29 2023 Sundeep Anand - 0.21.1-3 +- update license tag to as per SPDX identifiers + * Thu Jan 19 2023 Fedora Release Engineering - 0.21.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 6a2dc0e302225010471d92fc1abd9938b256855a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 23 Jun 2023 18:28:59 +0800 Subject: [PATCH 63/89] update to 0.22 release --- ...=> gettext-0.22-disable-libtextstyle.patch | 57 ++++----- gettext-java17-2062407.patch | 116 ------------------ gettext.spec | 21 ++-- sources | 2 +- 4 files changed, 37 insertions(+), 159 deletions(-) rename gettext-0.21.1-disable-libtextstyle.patch => gettext-0.22-disable-libtextstyle.patch (71%) delete mode 100644 gettext-java17-2062407.patch diff --git a/gettext-0.21.1-disable-libtextstyle.patch b/gettext-0.22-disable-libtextstyle.patch similarity index 71% rename from gettext-0.21.1-disable-libtextstyle.patch rename to gettext-0.22-disable-libtextstyle.patch index cb70687..993163e 100644 --- a/gettext-0.21.1-disable-libtextstyle.patch +++ b/gettext-0.22-disable-libtextstyle.patch @@ -1,7 +1,6 @@ -diff --git a/Makefile.am b/Makefile.am -index 5a7184c..28267a5 100644 ---- a/Makefile.am -+++ b/Makefile.am +diff -ur gettext-0.22.orig/Makefile.am gettext-0.22/Makefile.am +--- gettext-0.22.orig/Makefile.am 2023-06-23 17:44:45.388281215 +0800 ++++ gettext-0.22/Makefile.am 2023-06-23 17:43:14.098701787 +0800 @@ -19,7 +19,7 @@ AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies ACLOCAL_AMFLAGS = -I m4 @@ -11,19 +10,19 @@ index 5a7184c..28267a5 100644 changelog_etc = \ gettext-runtime/ChangeLog.0 \ -@@ -124,7 +124,6 @@ distcheck-hook: - test "`sed 1,16d $(srcdir)/gettext-runtime/intl/xsize.h | md5sum`" = "`sed 1,16d $(srcdir)/gettext-tools/gnulib-lib/xsize.h | md5sum`" +@@ -87,7 +87,7 @@ + cmp -s $(srcdir)/gettext-runtime/m4/xsize.m4 $(srcdir)/gettext-tools/gnulib-m4/xsize.m4 cmp -s $(srcdir)/gettext-runtime/man/help2man $(srcdir)/gettext-tools/man/help2man cmp -s $(srcdir)/gettext-runtime/man/x-to-1.in $(srcdir)/gettext-tools/man/x-to-1.in - cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4 ++# cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4 cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.java $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.java cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.class $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.class - test "`sed 1,15d $(srcdir)/gnulib-local/lib/alloca.in.h | md5sum`" = "`sed 1,15d $(srcdir)/gettext-runtime/libasprintf/alloca.in.h | md5sum`" -diff --git a/configure.ac b/configure.ac -index f4e54ea..ff850ae 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -37,7 +37,7 @@ dnl Checks for typedefs, structures, and compiler characteristics. + # Verify that all files have appropriate copyright headers. +diff -ur gettext-0.22.orig/configure.ac gettext-0.22/configure.ac +--- gettext-0.22.orig/configure.ac 2020-09-06 18:01:37.000000000 +0800 ++++ gettext-0.22/configure.ac 2023-06-23 17:43:14.099701793 +0800 +@@ -37,7 +37,7 @@ dnl Checks for library functions. @@ -32,7 +31,7 @@ index f4e54ea..ff850ae 100644 AM_EXTRA_RECURSIVE_TARGETS([maintainer-update-po]) -@@ -49,7 +49,7 @@ AC_CANONICAL_HOST +@@ -49,7 +49,7 @@ dnl Optional Features: AC_ARG_ENABLE calls dnl Optional Packages: AC_ARG_WITH calls dnl Some influential environment variables: AC_ARG_VAR calls @@ -41,24 +40,22 @@ index f4e54ea..ff850ae 100644 AC_CONFIG_FILES([Makefile]) -diff --git a/gettext-tools/Makefile.am b/gettext-tools/Makefile.am -index 449a797..bce4ad8 100644 ---- a/gettext-tools/Makefile.am -+++ b/gettext-tools/Makefile.am +diff -ur gettext-0.22.orig/gettext-tools/Makefile.am gettext-0.22/gettext-tools/Makefile.am +--- gettext-0.22.orig/gettext-tools/Makefile.am 2021-06-15 04:22:46.000000000 +0800 ++++ gettext-0.22/gettext-tools/Makefile.am 2023-06-23 18:24:08.822906444 +0800 @@ -19,7 +19,7 @@ AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4 --SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc -+SUBDIRS = intl gnulib-lib libgrep libgettextpo src po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc +-SUBDIRS = gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc ++SUBDIRS = gnulib-lib libgrep libgettextpo src po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc EXTRA_DIST = misc/DISCLAIM MOSTLYCLEANFILES = core *.stackdump -diff --git a/gettext-tools/libgettextpo/textstyle.in.h b/gettext-tools/libgettextpo/textstyle.in.h -index 05ce0cf..936331c 100644 ---- a/gettext-tools/libgettextpo/textstyle.in.h -+++ b/gettext-tools/libgettextpo/textstyle.in.h -@@ -239,7 +239,8 @@ typedef ostream_t file_ostream_t; +diff -ur gettext-0.22.orig/gettext-tools/libgettextpo/textstyle.in.h gettext-0.22/gettext-tools/libgettextpo/textstyle.in.h +--- gettext-0.22.orig/gettext-tools/libgettextpo/textstyle.in.h 2023-05-19 12:20:56.000000000 +0800 ++++ gettext-0.22/gettext-tools/libgettextpo/textstyle.in.h 2023-06-23 17:43:14.099701793 +0800 +@@ -243,7 +243,8 @@ static inline file_ostream_t file_ostream_create (FILE *fp) { @@ -68,7 +65,7 @@ index 05ce0cf..936331c 100644 } /* --------------------------- From fd-ostream.h --------------------------- */ -@@ -439,6 +440,30 @@ html_styled_ostream_create (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t destination, +@@ -443,6 +444,30 @@ return NULL; } @@ -99,11 +96,10 @@ index 05ce0cf..936331c 100644 /* ------------------------------ From color.h ------------------------------ */ #define color_test_mode false -diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am -index 510ab2a..72791ba 100644 ---- a/gettext-tools/src/Makefile.am -+++ b/gettext-tools/src/Makefile.am -@@ -291,19 +291,9 @@ cldr_plurals_SOURCES = cldr-plural.y cldr-plural-exp.c cldr-plurals.c +diff -ur gettext-0.22.orig/gettext-tools/src/Makefile.am gettext-0.22/gettext-tools/src/Makefile.am +--- gettext-0.22.orig/gettext-tools/src/Makefile.am 2023-06-09 05:03:36.000000000 +0800 ++++ gettext-0.22/gettext-tools/src/Makefile.am 2023-06-23 17:43:14.099701793 +0800 +@@ -305,19 +305,9 @@ cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML) cldr_plurals_LDADD = libgettextsrc.la $(LDADD) @@ -126,4 +122,3 @@ index 510ab2a..72791ba 100644 # How to build libgettextsrc.la. # Need ../gnulib-lib/libgettextlib.la. - diff --git a/gettext-java17-2062407.patch b/gettext-java17-2062407.patch deleted file mode 100644 index e29fe77..0000000 --- a/gettext-java17-2062407.patch +++ /dev/null @@ -1,116 +0,0 @@ -diff -urp '--exclude=*~' gettext-0.21.orig/gettext-tools/gnulib-lib/javacomp.c gettext-0.21/gettext-tools/gnulib-lib/javacomp.c ---- gettext-0.21.orig/gettext-tools/gnulib-lib/javacomp.c 2022-03-09 12:22:05.000000000 +0900 -+++ gettext-0.21/gettext-tools/gnulib-lib/javacomp.c 2022-03-20 18:23:53.636052943 +0900 -@@ -116,9 +116,8 @@ default_target_version (void) - && (java_version_cache[1] >= '2' - && java_version_cache[1] <= '7') - && java_version_cache[2] == '\0') -- /* Assume that these (not yet released) Java versions will behave -- like the preceding ones. */ -- java_version_cache = "11"; -+ /* It's one of the valid target version values. */ -+ ; - else - java_version_cache = "1.1"; - } -@@ -128,7 +127,7 @@ default_target_version (void) - /* ======================= Source version dependent ======================= */ - - /* Convert a source version to an index. */ --#define SOURCE_VERSION_BOUND 8 /* exclusive upper bound */ -+#define SOURCE_VERSION_BOUND 14 /* exclusive upper bound */ - static unsigned int - source_version_index (const char *source_version) - { -@@ -144,7 +143,7 @@ source_version_index (const char *source - else if (source_version[0] == '9' && source_version[1] == '\0') - return 5; - else if (source_version[0] == '1' -- && (source_version[1] >= '0' && source_version[1] <= '1') -+ && (source_version[1] >= '0' && source_version[1] <= '7') - && source_version[2] == '\0') - return source_version[1] - '0' + 6; - error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class")); -@@ -171,6 +170,10 @@ get_goodcode_snippet (const char *source - return "class conftest { public void m() { var i = new Integer(0); } }\n"; - if (strcmp (source_version, "11") == 0) - return "class conftest { Readable r = (var b) -> 0; }\n"; -+ if (source_version[0] == '1' -+ && (source_version[1] >= '2' && source_version[1] <= '7') -+ && source_version[2] == '\0') -+ return "class conftest { Readable r = (var b) -> 0; }\n"; - error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class")); - return NULL; - } -@@ -197,6 +200,10 @@ get_failcode_snippet (const char *source - return "class conftestfail { Readable r = (var b) -> 0; }\n"; - if (strcmp (source_version, "11") == 0) - return NULL; -+ if (source_version[0] == '1' -+ && (source_version[1] >= '2' && source_version[1] <= '7') -+ && source_version[2] == '\0') -+ return NULL; - error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class")); - return NULL; - } -@@ -204,7 +211,7 @@ get_failcode_snippet (const char *source - /* ======================= Target version dependent ======================= */ - - /* Convert a target version to an index. */ --#define TARGET_VERSION_BOUND 11 /* exclusive upper bound */ -+#define TARGET_VERSION_BOUND 17 /* exclusive upper bound */ - static unsigned int - target_version_index (const char *target_version) - { -@@ -215,7 +222,7 @@ target_version_index (const char *target - else if (target_version[0] == '9' && target_version[1] == '\0') - return 8; - else if (target_version[0] == '1' -- && (target_version[1] >= '0' && target_version[1] <= '1') -+ && (target_version[1] >= '0' && target_version[1] <= '7') - && target_version[2] == '\0') - return target_version[1] - '0' + 9; - error (EXIT_FAILURE, 0, _("invalid target_version argument to compile_java_class")); -@@ -245,10 +252,10 @@ corresponding_classfile_version (const c - return 52; - if (strcmp (target_version, "9") == 0) - return 53; -- if (strcmp (target_version, "10") == 0) -- return 54; -- if (strcmp (target_version, "11") == 0) -- return 55; -+ if (target_version[0] == '1' -+ && (target_version[1] >= '0' && target_version[1] <= '7') -+ && target_version[2] == '\0') -+ return target_version[1] + 54; - error (EXIT_FAILURE, 0, _("invalid target_version argument to compile_java_class")); - return 0; - } -@@ -2439,7 +2446,7 @@ compile_java_class (const char * const * - } - } - -- error (0, 0, _("Java compiler not found, try installing gcj or set $JAVAC")); -+ /* error (0, 0, _("Java compiler not found, try installing gcj or set $JAVAC")); */ - err = true; - - done2: -diff -urp '--exclude=*~' gettext-0.21.orig/gettext-tools/src/write-java.c gettext-0.21/gettext-tools/src/write-java.c ---- gettext-0.21.orig/gettext-tools/src/write-java.c 2022-03-09 12:17:21.000000000 +0900 -+++ gettext-0.21/gettext-tools/src/write-java.c 2022-03-20 18:26:06.941734979 +0900 -@@ -1209,8 +1209,14 @@ msgdomain_write_java (message_list_ty *m - Java compilers create the class files in the source file's directory - - which is in a temporary directory in our case. */ - java_sources[0] = java_file_name; -- if (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory, -+ if (1 -+ && (compile_java_class (java_sources, 1, NULL, 0, "17", "17", directory, -+ true, false, true, verbose > 0)) /* assume JDK 17 */ -+ && (compile_java_class (java_sources, 1, NULL, 0, "11", "11", directory, -+ true, false, true, verbose > 0)) /* assume JDK 11 */ -+ && (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory, - true, false, true, verbose > 0)) -+ ) - { - if (!verbose) - error (0, 0, diff --git a/gettext.spec b/gettext.spec index 43e451a..0811325 100644 --- a/gettext.spec +++ b/gettext.spec @@ -3,8 +3,8 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.21.1 -Release: 3%{?dist} +Version: 0.22 +Release: 1%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -26,8 +26,7 @@ Source2: msghack.py Source3: msghack.1 Patch1: %{name}-%{version}-disable-libtextstyle.patch -Patch2: %{name}-%{version}-covscan.patch -Patch3: %{name}-java17-2062407.patch +Patch2: %{name}-0.21.1-covscan.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 @@ -49,8 +48,6 @@ BuildRequires: zip, unzip %endif # for po-mode.el BuildRequires: emacs -# for autosetup -BuildRequires: git # ensure 'ARCHIVE_FORMAT=dirxz' BuildRequires: xz # for documentation @@ -75,7 +72,6 @@ BuildRequires: glibc-langpack-tr BuildRequires: glibc-langpack-zh BuildRequires: make Provides: bundled(gnulib) -Provides: bundled(libcroco) = 0.6.12 Requires: %{name}-runtime = %{version}-%{release} %description @@ -179,10 +175,9 @@ Substitutes the values of environment variables. %prep -%autosetup -S git -# Refresh autotools files to latest versions -# Should be removed after 0.21: -autoreconf --force --install +%autosetup -p1 +# patch 1 +automake # Defeat libtextstyle attempt to bundle libxml2. The comments # indicate this is done because the libtextstyle authors do not want @@ -416,6 +411,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Fri Jun 23 2023 Jens Petersen - 0.22-1 +- update to 0.22 release +- https://savannah.gnu.org/news/?id=10378 + * Wed Mar 29 2023 Sundeep Anand - 0.21.1-3 - update license tag to as per SPDX identifiers diff --git a/sources b/sources index 04e6282..aaf6ad9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.21.1.tar.gz) = ccd43a43fab3c90ed99b3e27628c9aeb7186398153b137a4997f8c7ddfd9729b0ba9d15348567e5206af50ac027673d2b8a3415bb3fc65f87ad778f85dc03a05 +SHA512 (gettext-0.22.tar.gz) = e2a58dde1cae3e6b79c03e7ef3d888f7577c1f4cba283b3b0f31123ceea8c33d7c9700e83de57104644de23e5f5c374868caa0e091f9c45edbbe87b98ee51c04 From 4f470a9f5000738cd54dda63d0531038c7e337c7 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 12 Jul 2023 12:19:32 -0400 Subject: [PATCH 64/89] Fix LD_LIBRARY_PATH in %check gettext-0.22 dropped the second copy of libintl in gettext-tools, and now relies on the copy in gettext-runtime. These are used for the tests, without which a number will fail. --- gettext.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 0811325..83f92ae 100644 --- a/gettext.spec +++ b/gettext.spec @@ -287,7 +287,7 @@ rm ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.elc # this takes quite a lot of time to run # adapt to rpath removal -export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs +export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-runtime/intl/.libs # override LIBUNISTRING to prevent reordering of lib objects make check LIBUNISTRING=-lunistring From 89be005c970f09211b0b757861a64dc68c256efb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 21:06:30 +0000 Subject: [PATCH 65/89] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 83f92ae..8cd9790 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22 -Release: 1%{?dist} +Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -411,6 +411,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 0.22-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Fri Jun 23 2023 Jens Petersen - 0.22-1 - update to 0.22 release - https://savannah.gnu.org/news/?id=10378 From f09e35ca28e9c491cc7c4db72b18e3392a7d1f80 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 20:34:15 +0000 Subject: [PATCH 66/89] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 8cd9790..295a7a3 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22 -Release: 2%{?dist} +Release: 3%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -411,6 +411,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 0.22-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Wed Jul 19 2023 Fedora Release Engineering - 0.22-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 0c9f02314220a12728f8b72f6780a8b941caeaed Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 12:49:35 +0000 Subject: [PATCH 67/89] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 295a7a3..6a9f881 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22 -Release: 3%{?dist} +Release: 4%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -411,6 +411,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 0.22-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 0.22-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From eb1d1dcd33b81df1007cb4e15697dc07151eabc9 Mon Sep 17 00:00:00 2001 From: matiwari Date: Fri, 9 Feb 2024 15:03:46 +0530 Subject: [PATCH 68/89] Update to 0.22.4 release --- gettext-0.22-disable-libtextstyle.patch | 149 ++++++++++++------------ gettext.spec | 16 ++- sources | 2 +- 3 files changed, 86 insertions(+), 81 deletions(-) diff --git a/gettext-0.22-disable-libtextstyle.patch b/gettext-0.22-disable-libtextstyle.patch index 993163e..7514704 100644 --- a/gettext-0.22-disable-libtextstyle.patch +++ b/gettext-0.22-disable-libtextstyle.patch @@ -1,27 +1,6 @@ -diff -ur gettext-0.22.orig/Makefile.am gettext-0.22/Makefile.am ---- gettext-0.22.orig/Makefile.am 2023-06-23 17:44:45.388281215 +0800 -+++ gettext-0.22/Makefile.am 2023-06-23 17:43:14.098701787 +0800 -@@ -19,7 +19,7 @@ - AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies - ACLOCAL_AMFLAGS = -I m4 - --SUBDIRS = gnulib-local gettext-runtime libtextstyle gettext-tools -+SUBDIRS = gnulib-local gettext-runtime gettext-tools - - changelog_etc = \ - gettext-runtime/ChangeLog.0 \ -@@ -87,7 +87,7 @@ - cmp -s $(srcdir)/gettext-runtime/m4/xsize.m4 $(srcdir)/gettext-tools/gnulib-m4/xsize.m4 - cmp -s $(srcdir)/gettext-runtime/man/help2man $(srcdir)/gettext-tools/man/help2man - cmp -s $(srcdir)/gettext-runtime/man/x-to-1.in $(srcdir)/gettext-tools/man/x-to-1.in -- cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4 -+# cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4 - cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.java $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.java - cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.class $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.class - # Verify that all files have appropriate copyright headers. -diff -ur gettext-0.22.orig/configure.ac gettext-0.22/configure.ac ---- gettext-0.22.orig/configure.ac 2020-09-06 18:01:37.000000000 +0800 -+++ gettext-0.22/configure.ac 2023-06-23 17:43:14.099701793 +0800 +diff -ur gettext-0.22.4.orig/configure.ac gettext-0.22.4/configure.ac +--- gettext-0.22.4.orig/configure.ac 2022-10-09 08:05:42.000000000 +0530 ++++ gettext-0.22.4/configure.ac 2024-02-09 12:31:57.502525589 +0530 @@ -37,7 +37,7 @@ dnl Checks for library functions. @@ -40,9 +19,52 @@ diff -ur gettext-0.22.orig/configure.ac gettext-0.22/configure.ac AC_CONFIG_FILES([Makefile]) -diff -ur gettext-0.22.orig/gettext-tools/Makefile.am gettext-0.22/gettext-tools/Makefile.am ---- gettext-0.22.orig/gettext-tools/Makefile.am 2021-06-15 04:22:46.000000000 +0800 -+++ gettext-0.22/gettext-tools/Makefile.am 2023-06-23 18:24:08.822906444 +0800 +diff -ur gettext-0.22.4.orig/gettext-tools/libgettextpo/textstyle.in.h gettext-0.22.4/gettext-tools/libgettextpo/textstyle.in.h +--- gettext-0.22.4.orig/gettext-tools/libgettextpo/textstyle.in.h 2023-09-19 02:06:31.000000000 +0530 ++++ gettext-0.22.4/gettext-tools/libgettextpo/textstyle.in.h 2024-02-09 13:14:44.995080091 +0530 +@@ -255,7 +255,8 @@ + static inline file_ostream_t + file_ostream_create (FILE *fp) + { +- return fp; ++ /* Closing the stream we return should not close 'fp'. */ ++ return fdopen (dup (fileno (fp)), "w"); + } + + static inline bool +@@ -649,8 +650,8 @@ + + /* ----------------------- From noop-styled-ostream.h ----------------------- */ + +-typedef styled_ostream_t noop_styled_ostream_t; +- ++typedef ostream_t noop_styled_ostream_t; ++ + #define noop_styled_ostream_write_mem ostream_write_mem + #define noop_styled_ostream_flush ostream_flush + #define noop_styled_ostream_free ostream_free +@@ -673,13 +674,13 @@ + return true; + } + +-static inline noop_styled_ostream_t ++static inline ostream_t + noop_styled_ostream_create (ostream_t destination, bool pass_ownership) + { +- if (!pass_ownership) +- /* Not supported without the real libtextstyle. */ +- abort (); +- return destination; ++ if (pass_ownership) ++ return destination; ++ else ++ return fdopen (dup (fileno (destination)), "w"); + } + + static inline bool +diff -ur gettext-0.22.4.orig/gettext-tools/Makefile.am gettext-0.22.4/gettext-tools/Makefile.am +--- gettext-0.22.4.orig/gettext-tools/Makefile.am 2023-09-19 01:38:31.000000000 +0530 ++++ gettext-0.22.4/gettext-tools/Makefile.am 2024-02-09 12:32:57.710481641 +0530 @@ -19,7 +19,7 @@ AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4 @@ -52,54 +74,10 @@ diff -ur gettext-0.22.orig/gettext-tools/Makefile.am gettext-0.22/gettext-tools/ EXTRA_DIST = misc/DISCLAIM MOSTLYCLEANFILES = core *.stackdump -diff -ur gettext-0.22.orig/gettext-tools/libgettextpo/textstyle.in.h gettext-0.22/gettext-tools/libgettextpo/textstyle.in.h ---- gettext-0.22.orig/gettext-tools/libgettextpo/textstyle.in.h 2023-05-19 12:20:56.000000000 +0800 -+++ gettext-0.22/gettext-tools/libgettextpo/textstyle.in.h 2023-06-23 17:43:14.099701793 +0800 -@@ -243,7 +243,8 @@ - static inline file_ostream_t - file_ostream_create (FILE *fp) - { -- return fp; -+ /* Closing the stream we return should not close 'fp'. */ -+ return fdopen (dup (fileno (fp)), "w"); - } - - /* --------------------------- From fd-ostream.h --------------------------- */ -@@ -443,6 +444,30 @@ - return NULL; - } - -+/* ----------------------- From noop-styled-ostream.h ----------------------- */ -+ -+/* noop_styled_ostream_t is a subtype of ostream_t. */ -+typedef ostream_t noop_styled_ostream_t; -+ -+#define noop_styled_ostream_write_mem ostream_write_mem -+#define noop_styled_ostream_flush ostream_flush -+#define noop_styled_ostream_free ostream_free -+#define noop_styled_ostream_begin_use_class styled_ostream_begin_use_class -+#define noop_styled_ostream_end_use_class styled_ostream_end_use_class -+#define noop_styled_ostream_get_hyperlink_ref styled_ostream_get_hyperlink_ref -+#define noop_styled_ostream_get_hyperlink_id styled_ostream_get_hyperlink_id -+#define noop_styled_ostream_set_hyperlink styled_ostream_set_hyperlink -+#define noop_styled_ostream_flush_to_current_style styled_ostream_flush_to_current_style -+ -+static inline ostream_t -+noop_styled_ostream_create (ostream_t destination, bool pass_ownership) -+{ -+ if (pass_ownership) -+ return destination; -+ else -+ return fdopen (dup (fileno (destination)), "w"); -+} -+ - /* ------------------------------ From color.h ------------------------------ */ - - #define color_test_mode false -diff -ur gettext-0.22.orig/gettext-tools/src/Makefile.am gettext-0.22/gettext-tools/src/Makefile.am ---- gettext-0.22.orig/gettext-tools/src/Makefile.am 2023-06-09 05:03:36.000000000 +0800 -+++ gettext-0.22/gettext-tools/src/Makefile.am 2023-06-23 17:43:14.099701793 +0800 -@@ -305,19 +305,9 @@ +diff -ur gettext-0.22.4.orig/gettext-tools/src/Makefile.am gettext-0.22.4/gettext-tools/src/Makefile.am +--- gettext-0.22.4.orig/gettext-tools/src/Makefile.am 2023-11-17 17:14:38.000000000 +0530 ++++ gettext-0.22.4/gettext-tools/src/Makefile.am 2024-02-09 12:35:40.445065728 +0530 +@@ -311,19 +311,9 @@ cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML) cldr_plurals_LDADD = libgettextsrc.la $(LDADD) @@ -122,3 +100,24 @@ diff -ur gettext-0.22.orig/gettext-tools/src/Makefile.am gettext-0.22/gettext-to # How to build libgettextsrc.la. # Need ../gnulib-lib/libgettextlib.la. +diff -ur gettext-0.22.4.orig/Makefile.am gettext-0.22.4/Makefile.am +--- gettext-0.22.4.orig/Makefile.am 2023-11-17 17:39:11.000000000 +0530 ++++ gettext-0.22.4/Makefile.am 2024-02-09 12:29:57.994627891 +0530 +@@ -19,7 +19,7 @@ + AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = gnulib-local gettext-runtime libtextstyle gettext-tools ++SUBDIRS = gnulib-local gettext-runtime gettext-tools + + changelog_etc = \ + gettext-runtime/ChangeLog.0 \ +@@ -87,7 +87,7 @@ + cmp -s $(srcdir)/gettext-runtime/m4/xsize.m4 $(srcdir)/gettext-tools/gnulib-m4/xsize.m4 + cmp -s $(srcdir)/gettext-runtime/man/help2man $(srcdir)/gettext-tools/man/help2man + cmp -s $(srcdir)/gettext-runtime/man/x-to-1.in $(srcdir)/gettext-tools/man/x-to-1.in +- cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4 ++# cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4 + cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.java $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.java + cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.class $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.class + # Verify that all files have appropriate copyright headers. diff --git a/gettext.spec b/gettext.spec index 6a9f881..c287c26 100644 --- a/gettext.spec +++ b/gettext.spec @@ -3,8 +3,8 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.22 -Release: 4%{?dist} +Version: 0.22.4 +Release: 1%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -25,8 +25,8 @@ Source: https://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz Source2: msghack.py Source3: msghack.1 -Patch1: %{name}-%{version}-disable-libtextstyle.patch -Patch2: %{name}-0.21.1-covscan.patch +Patch1: gettext-0.22-disable-libtextstyle.patch +Patch2: gettext-0.21.1-covscan.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 @@ -175,7 +175,9 @@ Substitutes the values of environment variables. %prep -%autosetup -p1 +%setup -q +%patch 1 -p1 -b .orig~ +%patch 2 -p1 -b .orig~ # patch 1 automake @@ -411,6 +413,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Fri Feb 9 2024 Manish Tiwari - 0.22.4-1 +- update to 0.22.4 release +- https://savannah.gnu.org/news/?id=10544 + * Wed Jan 24 2024 Fedora Release Engineering - 0.22-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index aaf6ad9..ff8d342 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.22.tar.gz) = e2a58dde1cae3e6b79c03e7ef3d888f7577c1f4cba283b3b0f31123ceea8c33d7c9700e83de57104644de23e5f5c374868caa0e091f9c45edbbe87b98ee51c04 +SHA512 (gettext-0.22.4.tar.gz) = ad2fa2f69be996a637e9b51e8941a39e10050060245dcec1fe75c15b68d0ff973043c87b77e4e2830e407e3bdd040b578f8e24fd05bba43adb94eaee34001aa5 From 875215f268271ed075d8144e404b87e02392837b Mon Sep 17 00:00:00 2001 From: matiwari Date: Tue, 13 Feb 2024 13:44:40 +0530 Subject: [PATCH 69/89] Minor Patch Update --- gettext-0.22-disable-libtextstyle.patch | 35 ++++++++----------------- 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/gettext-0.22-disable-libtextstyle.patch b/gettext-0.22-disable-libtextstyle.patch index 7514704..771c49c 100644 --- a/gettext-0.22-disable-libtextstyle.patch +++ b/gettext-0.22-disable-libtextstyle.patch @@ -1,6 +1,6 @@ diff -ur gettext-0.22.4.orig/configure.ac gettext-0.22.4/configure.ac --- gettext-0.22.4.orig/configure.ac 2022-10-09 08:05:42.000000000 +0530 -+++ gettext-0.22.4/configure.ac 2024-02-09 12:31:57.502525589 +0530 ++++ gettext-0.22.4/configure.ac 2024-02-13 12:47:32.099238869 +0530 @@ -37,7 +37,7 @@ dnl Checks for library functions. @@ -21,34 +21,21 @@ diff -ur gettext-0.22.4.orig/configure.ac gettext-0.22.4/configure.ac diff -ur gettext-0.22.4.orig/gettext-tools/libgettextpo/textstyle.in.h gettext-0.22.4/gettext-tools/libgettextpo/textstyle.in.h --- gettext-0.22.4.orig/gettext-tools/libgettextpo/textstyle.in.h 2023-09-19 02:06:31.000000000 +0530 -+++ gettext-0.22.4/gettext-tools/libgettextpo/textstyle.in.h 2024-02-09 13:14:44.995080091 +0530 -@@ -255,7 +255,8 @@ ++++ gettext-0.22.4/gettext-tools/libgettextpo/textstyle.in.h 2024-02-13 13:04:15.238643775 +0530 +@@ -254,8 +254,9 @@ + static inline file_ostream_t file_ostream_create (FILE *fp) - { +-{ - return fp; ++{ + /* Closing the stream we return should not close 'fp'. */ + return fdopen (dup (fileno (fp)), "w"); } static inline bool -@@ -649,8 +650,8 @@ - - /* ----------------------- From noop-styled-ostream.h ----------------------- */ - --typedef styled_ostream_t noop_styled_ostream_t; -- -+typedef ostream_t noop_styled_ostream_t; -+ - #define noop_styled_ostream_write_mem ostream_write_mem - #define noop_styled_ostream_flush ostream_flush - #define noop_styled_ostream_free ostream_free -@@ -673,13 +674,13 @@ - return true; - } - --static inline noop_styled_ostream_t -+static inline ostream_t +@@ -676,10 +677,10 @@ + static inline noop_styled_ostream_t noop_styled_ostream_create (ostream_t destination, bool pass_ownership) { - if (!pass_ownership) @@ -64,7 +51,7 @@ diff -ur gettext-0.22.4.orig/gettext-tools/libgettextpo/textstyle.in.h gettext-0 static inline bool diff -ur gettext-0.22.4.orig/gettext-tools/Makefile.am gettext-0.22.4/gettext-tools/Makefile.am --- gettext-0.22.4.orig/gettext-tools/Makefile.am 2023-09-19 01:38:31.000000000 +0530 -+++ gettext-0.22.4/gettext-tools/Makefile.am 2024-02-09 12:32:57.710481641 +0530 ++++ gettext-0.22.4/gettext-tools/Makefile.am 2024-02-13 12:49:27.145661060 +0530 @@ -19,7 +19,7 @@ AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4 @@ -76,7 +63,7 @@ diff -ur gettext-0.22.4.orig/gettext-tools/Makefile.am gettext-0.22.4/gettext-to MOSTLYCLEANFILES = core *.stackdump diff -ur gettext-0.22.4.orig/gettext-tools/src/Makefile.am gettext-0.22.4/gettext-tools/src/Makefile.am --- gettext-0.22.4.orig/gettext-tools/src/Makefile.am 2023-11-17 17:14:38.000000000 +0530 -+++ gettext-0.22.4/gettext-tools/src/Makefile.am 2024-02-09 12:35:40.445065728 +0530 ++++ gettext-0.22.4/gettext-tools/src/Makefile.am 2024-02-13 13:06:34.194367930 +0530 @@ -311,19 +311,9 @@ cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML) cldr_plurals_LDADD = libgettextsrc.la $(LDADD) @@ -102,7 +89,7 @@ diff -ur gettext-0.22.4.orig/gettext-tools/src/Makefile.am gettext-0.22.4/gettex # Need ../gnulib-lib/libgettextlib.la. diff -ur gettext-0.22.4.orig/Makefile.am gettext-0.22.4/Makefile.am --- gettext-0.22.4.orig/Makefile.am 2023-11-17 17:39:11.000000000 +0530 -+++ gettext-0.22.4/Makefile.am 2024-02-09 12:29:57.994627891 +0530 ++++ gettext-0.22.4/Makefile.am 2024-02-13 12:44:18.309841774 +0530 @@ -19,7 +19,7 @@ AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies ACLOCAL_AMFLAGS = -I m4 From 807312ab8f5aa60594c635c81c779234d0c1a713 Mon Sep 17 00:00:00 2001 From: matiwari Date: Wed, 21 Feb 2024 15:25:54 +0530 Subject: [PATCH 70/89] Add back libtextstyle library file for rawhide --- gettext.spec | 47 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/gettext.spec b/gettext.spec index c287c26..c7cbf65 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,10 +1,11 @@ %bcond_with jar %bcond_with java +%bcond libtextstyle %[0%{?fedora} > 40] Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22.4 -Release: 1%{?dist} +Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -25,8 +26,8 @@ Source: https://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz Source2: msghack.py Source3: msghack.1 -Patch1: gettext-0.22-disable-libtextstyle.patch -Patch2: gettext-0.21.1-covscan.patch +Patch1: gettext-0.21.1-covscan.patch +Patch2: gettext-0.22-disable-libtextstyle.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 @@ -144,6 +145,25 @@ Obsoletes: libtextstyle < %{version}-%{release} %description libs This package contains libraries used internationalization support. +%if %{with libtextstyle} +%package -n libtextstyle +Summary: Text styling library +License: GPL-3.0-or-later + +%description -n libtextstyle +Library for producing styled text to be displayed in a terminal +emulator. + +%package -n libtextstyle-devel +Summary: Development files for libtextstyle +License: GPL-3.0-or-later and GFDL-1.2-or-later +Requires: libtextstyle%{?_isa} = %{version}-%{release} + +%description -n libtextstyle-devel +This package contains all development related files necessary for +developing or compiling applications/libraries that needs text +styling. +%endif %package -n emacs-%{name} Summary: Support for editing po files within GNU Emacs @@ -177,9 +197,10 @@ Substitutes the values of environment variables. %prep %setup -q %patch 1 -p1 -b .orig~ +%if %{without libtextstyle} %patch 2 -p1 -b .orig~ -# patch 1 -automake +%endif +autoreconf # Defeat libtextstyle attempt to bundle libxml2. The comments # indicate this is done because the libtextstyle authors do not want @@ -204,6 +225,7 @@ export CFLAGS="$RPM_OPT_FLAGS -D__SUPPORT_SNAN__" export CPPFLAGS="-I%{_includedir}/libxml2" # Side effect of unbundling libxml2 from libtextstyle. export LIBS="-lxml2" +export CFLAGS="$CFLAGS -Wformat" %configure --enable-nls --disable-static \ --enable-shared --disable-csharp --disable-rpath \ %if %{with java} @@ -401,6 +423,18 @@ make check LIBUNISTRING=-lunistring %{_datadir}/%{name}/libintl.jar %endif +%if %{with libtextstyle} +%files -n libtextstyle +%{_libdir}/libtextstyle.so.0* + +%files -n libtextstyle-devel +%{_docdir}/libtextstyle/ +%{_includedir}/textstyle/ +%{_includedir}/textstyle.h +%{_infodir}/libtextstyle* +%{_libdir}/libtextstyle.so +%endif + %files -n emacs-%{name} %dir %{_emacs_sitelispdir}/%{name} %{_emacs_sitelispdir}/%{name}/*.elc @@ -413,6 +447,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Feb 21 2024 Manish Tiwari - 0.22.4-2 +- Add back libtextstyle library for rawhide (#2264128) + * Fri Feb 9 2024 Manish Tiwari - 0.22.4-1 - update to 0.22.4 release - https://savannah.gnu.org/news/?id=10544 From d0e44692345d902a8c9df882ba1fc8ba4f9a9fe2 Mon Sep 17 00:00:00 2001 From: matiwari Date: Wed, 28 Feb 2024 12:27:36 +0530 Subject: [PATCH 71/89] Use Uppercase AND operator for multiple licenses in SPDX --- gettext.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gettext.spec b/gettext.spec index c7cbf65..6c948e2 100644 --- a/gettext.spec +++ b/gettext.spec @@ -20,7 +20,7 @@ Release: 2%{?dist} # - libasprintf info files # - libtextstyle info files # Everything else is GPLv3+ -License: GPL-3.0-or-later and LGPL-2.0-or-later and GFDL-1.2-or-later +License: GPL-3.0-or-later AND LGPL-2.0-or-later AND GFDL-1.2-or-later URL: https://www.gnu.org/software/gettext/ Source: https://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz Source2: msghack.py @@ -90,7 +90,7 @@ programs. %package runtime Summary: GNU runtime libraries and programs for producing multi-lingual messages -License: GPL-3.0-or-later and LGPL-2.0-or-later +License: GPL-3.0-or-later AND LGPL-2.0-or-later # Depend on the exact version of the library sub package Requires: %{name}-libs%{_isa} = %{version}-%{release} Requires: %{name}-envsubst = %{version}-%{release} @@ -118,7 +118,7 @@ Summary: Development files for %{name} # autopoint is GPLv3+ # libasprintf is LGPLv2+ # libgettextpo is GPLv3+ -License: LGPL-2.0-or-later and GPL-3.0-or-later and GFDL-1.2-or-later +License: LGPL-2.0-or-later AND GPL-3.0-or-later AND GFDL-1.2-or-later Requires: %{name} = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-common-devel = %{version}-%{release} @@ -139,7 +139,7 @@ want to add gettext support for your project. Summary: Libraries for %{name} # libasprintf is LGPLv2+ # libgettextpo is GPLv3+ -License: LGPL-2.0-or-later and GPL-3.0-or-later +License: LGPL-2.0-or-later AND GPL-3.0-or-later Obsoletes: libtextstyle < %{version}-%{release} %description libs @@ -156,7 +156,7 @@ emulator. %package -n libtextstyle-devel Summary: Development files for libtextstyle -License: GPL-3.0-or-later and GFDL-1.2-or-later +License: GPL-3.0-or-later AND GFDL-1.2-or-later Requires: libtextstyle%{?_isa} = %{version}-%{release} %description -n libtextstyle-devel From 2880ae9755c22730160179d2101e03b9ba2dc227 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 1 Mar 2024 20:32:59 +0800 Subject: [PATCH 72/89] remove trailing whitespace for libtextstyle subpackages --- gettext.spec | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/gettext.spec b/gettext.spec index 6c948e2..91634c3 100644 --- a/gettext.spec +++ b/gettext.spec @@ -146,22 +146,22 @@ Obsoletes: libtextstyle < %{version}-%{release} This package contains libraries used internationalization support. %if %{with libtextstyle} -%package -n libtextstyle -Summary: Text styling library -License: GPL-3.0-or-later - -%description -n libtextstyle -Library for producing styled text to be displayed in a terminal -emulator. - -%package -n libtextstyle-devel -Summary: Development files for libtextstyle -License: GPL-3.0-or-later AND GFDL-1.2-or-later -Requires: libtextstyle%{?_isa} = %{version}-%{release} - -%description -n libtextstyle-devel -This package contains all development related files necessary for -developing or compiling applications/libraries that needs text +%package -n libtextstyle +Summary: Text styling library +License: GPL-3.0-or-later + +%description -n libtextstyle +Library for producing styled text to be displayed in a terminal +emulator. + +%package -n libtextstyle-devel +Summary: Development files for libtextstyle +License: GPL-3.0-or-later AND GFDL-1.2-or-later +Requires: libtextstyle%{?_isa} = %{version}-%{release} + +%description -n libtextstyle-devel +This package contains all development related files necessary for +developing or compiling applications/libraries that needs text styling. %endif @@ -424,14 +424,14 @@ make check LIBUNISTRING=-lunistring %endif %if %{with libtextstyle} -%files -n libtextstyle -%{_libdir}/libtextstyle.so.0* - -%files -n libtextstyle-devel -%{_docdir}/libtextstyle/ -%{_includedir}/textstyle/ -%{_includedir}/textstyle.h -%{_infodir}/libtextstyle* +%files -n libtextstyle +%{_libdir}/libtextstyle.so.0* + +%files -n libtextstyle-devel +%{_docdir}/libtextstyle/ +%{_includedir}/textstyle/ +%{_includedir}/textstyle.h +%{_infodir}/libtextstyle* %{_libdir}/libtextstyle.so %endif From 9c4e3965b5ebad4d42711007dd29564a857e2687 Mon Sep 17 00:00:00 2001 From: matiwari Date: Mon, 4 Mar 2024 01:00:10 +0530 Subject: [PATCH 73/89] Update to 0.22.5 release --- gettext.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gettext.spec b/gettext.spec index 91634c3..66a15fc 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,8 +4,8 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.22.4 -Release: 2%{?dist} +Version: 0.22.5 +Release: 1%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -447,6 +447,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Mon Mar 4 2024 Manish Tiwari - 0.22.5-1 +- update to 0.22.5 release +- https://savannah.gnu.org/news/?id=10597 + * Wed Feb 21 2024 Manish Tiwari - 0.22.4-2 - Add back libtextstyle library for rawhide (#2264128) diff --git a/sources b/sources index ff8d342..a34bba2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.22.4.tar.gz) = ad2fa2f69be996a637e9b51e8941a39e10050060245dcec1fe75c15b68d0ff973043c87b77e4e2830e407e3bdd040b578f8e24fd05bba43adb94eaee34001aa5 +SHA512 (gettext-0.22.5.tar.gz) = d8b22d7fba10052a2045f477f0a5b684d932513bdb3b295c22fbd9dfc2a9d8fccd9aefd90692136c62897149aa2f7d1145ce6618aa1f0be787cb88eba5bc09be From 935d833dd9e9892c5f11f7b23384eb7f831627d0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 8 Mar 2024 14:49:40 +0800 Subject: [PATCH 74/89] condition libtextstyle obsoletes --- gettext.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 66a15fc..1358f4c 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22.5 -Release: 1%{?dist} +Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -126,7 +126,9 @@ Requires: xz Requires: diffutils Obsoletes: gettext-autopoint < 0.18.1.1-3 Provides: gettext-autopoint = %{version}-%{release} +%if %{without libtextstyle} Obsoletes: libtextstyle-devel < %{version}-%{release} +%endif %description devel This package contains all development related files necessary for @@ -140,7 +142,9 @@ Summary: Libraries for %{name} # libasprintf is LGPLv2+ # libgettextpo is GPLv3+ License: LGPL-2.0-or-later AND GPL-3.0-or-later +%if %{without libtextstyle} Obsoletes: libtextstyle < %{version}-%{release} +%endif %description libs This package contains libraries used internationalization support. @@ -447,6 +451,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Fri Mar 8 2024 Jens Petersen - 0.22.5-2 +- condition libtextstyle obsoletes + * Mon Mar 4 2024 Manish Tiwari - 0.22.5-1 - update to 0.22.5 release - https://savannah.gnu.org/news/?id=10597 From 44a6e9d2bed23e6b6404319e27f093c3a2936a77 Mon Sep 17 00:00:00 2001 From: matiwari Date: Tue, 2 Jul 2024 23:01:16 +0530 Subject: [PATCH 75/89] Enable libtextstyle for f40 --- gettext.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gettext.spec b/gettext.spec index 1358f4c..6e82178 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,11 +1,11 @@ %bcond_with jar %bcond_with java -%bcond libtextstyle %[0%{?fedora} > 40] +%bcond libtextstyle %[0%{?fedora} >= 40] Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22.5 -Release: 2%{?dist} +Release: 3%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -451,6 +451,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Tue Jul 2 2024 Manish Tiwari - 0.22.5-3 +- Add back libtextstyle for f40 (#2278984) + * Fri Mar 8 2024 Jens Petersen - 0.22.5-2 - condition libtextstyle obsoletes From 205b6879b5d3c1d5b2608b4e02fc8b898950bc5a Mon Sep 17 00:00:00 2001 From: matiwari Date: Thu, 4 Jul 2024 19:32:24 +0530 Subject: [PATCH 76/89] Add explicit package version requirement for libtextstyle --- gettext.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 6e82178..36dcf60 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22.5 -Release: 3%{?dist} +Release: 4%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -74,6 +74,9 @@ BuildRequires: glibc-langpack-zh BuildRequires: make Provides: bundled(gnulib) Requires: %{name}-runtime = %{version}-%{release} +%if %{with libtextstyle} +Requires: libtextstyle%{?_isa} = %{version}-%{release} +%endif %description The GNU gettext package provides a set of tools and documentation for @@ -142,6 +145,9 @@ Summary: Libraries for %{name} # libasprintf is LGPLv2+ # libgettextpo is GPLv3+ License: LGPL-2.0-or-later AND GPL-3.0-or-later +%if %{with libtextstyle} +Requires: libtextstyle%{?_isa} = %{version}-%{release} +%endif %if %{without libtextstyle} Obsoletes: libtextstyle < %{version}-%{release} %endif @@ -451,6 +457,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Jul 4 2024 Manish Tiwari - 0.22.5-4 +- Add explicit package version requirement for libtextstyle + * Tue Jul 2 2024 Manish Tiwari - 0.22.5-3 - Add back libtextstyle for f40 (#2278984) From 1a3bc0afb588f9f1365ae5b78875389a286845e0 Mon Sep 17 00:00:00 2001 From: matiwari Date: Wed, 10 Jul 2024 23:47:52 +0530 Subject: [PATCH 77/89] CI tests migration to tmt --- .fmf/version | 1 + gettext.spec | 5 +- plans/basic.fmf | 5 + tests/main.fmf | 5 + tests/test.sh | 25 +++++ tests/test_gettext.py | 227 ++++++++++++++++++++++++++++++++++++++++++ tests/test_i18n.py | 14 +++ tests/tests.yml | 16 --- 8 files changed, 281 insertions(+), 17 deletions(-) create mode 100644 .fmf/version create mode 100644 plans/basic.fmf create mode 100644 tests/main.fmf create mode 100755 tests/test.sh create mode 100644 tests/test_gettext.py create mode 100644 tests/test_i18n.py 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/gettext.spec b/gettext.spec index 36dcf60..94fc142 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22.5 -Release: 4%{?dist} +Release: 5%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -457,6 +457,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Jul 11 2024 Manish Tiwari - 0.22.5-5 +- CI gating tests migration to tmt + * Thu Jul 4 2024 Manish Tiwari - 0.22.5-4 - Add explicit package version requirement for libtextstyle diff --git a/plans/basic.fmf b/plans/basic.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/basic.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..2ff84b6 --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,5 @@ +summary: Run gettext test +test: ./test.sh +framework: beakerlib +require: + - gettext diff --git a/tests/test.sh b/tests/test.sh new file mode 100755 index 0000000..507b6c5 --- /dev/null +++ b/tests/test.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="gettext" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory" + rlRun "cp test_i18n.py test_gettext.py $TmpDir" + rlRun "pushd $TmpDir" + rlPhaseEnd + + rlPhaseStartTest + rlLog "Run test_gettext.py" + rlRun "python3 test_gettext.py" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/test_gettext.py b/tests/test_gettext.py new file mode 100644 index 0000000..3bda128 --- /dev/null +++ b/tests/test_gettext.py @@ -0,0 +1,227 @@ +# -*- coding: utf-8 -*- + +import logging +import os +import subprocess + + +# Saving logs +logging.basicConfig(level=logging.INFO) + +DECORATE_STR = "************************************" +logging.info("TEST RESULTS FOR GETTEXT\n{0}".format(DECORATE_STR)) + +# CONSTANTS +PACKAGE_TO_TEST = "gettext" +DOMAIN_TO_BIND = "testdomain" +PYTHON_INTERPRETER = "python3" +TEST_I18N_FILE = "test_i18n.py" + +LOG_INFO_PASS = "[ PASS ]" +LOG_INFO_FAIL = "[ FAIL ]" +LOG_INFO_OS_ERROR = "[ OS Error ]" + +# Test Data +TEST_DATA = {"fr_FR": '''msgstr "Bonjour le monde!"''', + "de_DE": '''msgstr "Hallo Welt!"''', + "es_ES": '''msgstr "Hola Mundo!"''', + "it_IT": '''msgstr "Ciao mondo!"''', + "pt_BR": '''msgstr "Olá Mundo!"''', + "ja_JP": '''msgstr "「こんにちは世界」"''', + "ko_KR": '''msgstr "안녕하세요!"''', + "ru_RU": '''msgstr "Привет мир!"''', + "zh_CN": '''msgstr "你好,世界!"''', + "zh_TW": '''msgstr "你好,世界!"'''} + + +def test_locale(): + """ + Check common files for locale support + """ + + subject = "Locale Support Test" + + try: + all_locales = subprocess.Popen(["locale", "-a"], stdout=subprocess.PIPE) + all_locales_data = all_locales.communicate() + + if all_locales_data: + actual = all_locales_data[0].decode().split('\n') + else: + logging.error("{0}: ERROR\n".format(subject)) + return + + expected_locales = ['en_US', 'en_US.iso88591', + 'en_US.iso885915', 'en_US.utf8'] + if set(expected_locales).issubset(set(actual)): + logging.info("{0}: {1}\n".format(subject, LOG_INFO_PASS)) + else: + logging.error("{0}: {1}\n".format(subject, LOG_INFO_FAIL)) + + except OSError as e: + logging.error("{0}: {1}\n".format(subject, LOG_INFO_OS_ERROR)) + + +def test_gettext(): + """ + Check if gettext is present + """ + + subject = "GNU Internationalization Utilities Test" + + try: + cmd_check_gettext = ['rpm', '-q', PACKAGE_TO_TEST] + p1 = subprocess.Popen(cmd_check_gettext, stdout=subprocess.PIPE) + std_data, stderr = p1.communicate() + std_data = std_data.decode() + logging.info("Found {0} NVR: {1}".format(PACKAGE_TO_TEST, std_data)) + if PACKAGE_TO_TEST in std_data: + logging.info("{0}: {1}\n".format(subject, LOG_INFO_PASS)) + else: + logging.error("{0}: {1}\n".format(subject, LOG_INFO_FAIL)) + except OSError as e: + logging.error("{0}: {1}\n".format(subject, LOG_INFO_OS_ERROR)) + + +def test_pot_creation(): + """ + Creates hello.pot file using test_i18n.py file + """ + + subject = "POT file Creation Test" + + try: + pot_file = subprocess.Popen( + "xgettext -d '{0}' -o {1}.pot {2}".format(DOMAIN_TO_BIND, + DOMAIN_TO_BIND, + TEST_I18N_FILE), + shell=True + ) + pot_file.communicate() + except OSError as e: + logging.error("{0}: {1}\n".format(subject, LOG_INFO_OS_ERROR)) + else: + logging.info("{0}: {1}\n".format(subject, LOG_INFO_PASS)) + + +def make_dir(locale_dir): + path = "./locale/{0}/LC_MESSAGES".format(locale_dir) + os.makedirs(path) + + +def create_po_files(active_locale): + """ + creates .po file using POT file + """ + + subject = "PO file Creation" + + try: + cmd_po_files = subprocess.Popen( + "msginit --no-translator -l {0} -i {1}.pot -o ./locale/{2}/LC_MESSAGES/{3}.po".format( + active_locale, DOMAIN_TO_BIND, active_locale, active_locale), shell=True + ) + cmd_po_files.communicate() + except OSError as e: + logging.error("{0} failed: {1}\n".format(subject, LOG_INFO_OS_ERROR)) + else: + logging.info("{0} Succeed.".format(subject)) + + +def translate(active_locale): + """ + Updates .po file with the translations for respective language + """ + + data = TEST_DATA.get(active_locale) + if not data: + return + with open('./locale/{0}/LC_MESSAGES/{1}.po'.format(active_locale, + active_locale), + 'r', encoding='latin-1') as f1: + data1 = f1.readlines() + data1.pop() + data1.append(data) + for index, data in enumerate(data1): + if "Content-Type" in data: + data1[index] = '"Content-Type: text/plain; charset=UTF-8\\n"\n' + + with open('./locale/{0}/LC_MESSAGES/{1}'.format(active_locale, + active_locale) + ".po", 'w') as f2: + for line in data1: + f2.write(line) + + +def create_mo_files(active_locale): + """ + Creates .mo file for different locale form .po file + """ + + subject = "MO file Creation" + + try: + mo_files = subprocess.Popen( + "msgfmt ./locale/{0}/LC_MESSAGES/{1}.po --output-file ./locale/{2}/LC_MESSAGES/{3}.mo".format( + active_locale, active_locale, active_locale, active_locale + ), shell=True + ) + mo_files.communicate() + except OSError as e: + logging.error("{0} failed: {1}\n".format(subject, LOG_INFO_OS_ERROR)) + else: + logging.info("{0} Succeed.".format(subject)) + + +def test_translations(active_locale): + """ + Verify if the output is correct for different language + """ + + subject = "Translation Test" + + try: + cmd_translation_test = subprocess.check_output( + 'LANGUAGE={0} {1} {2} {3}'.format(active_locale, + PYTHON_INTERPRETER, + TEST_I18N_FILE, + active_locale), + encoding='UTF-8', shell=True + ) + if cmd_translation_test.strip() == TEST_DATA[active_locale].strip('msgstr "'): + logging.info("{0} for {1}: {2}\n".format(subject, active_locale, LOG_INFO_PASS)) + else: + logging.error("{0} for {1}: {2}\n".format(subject, active_locale, LOG_INFO_FAIL)) + except OSError as e: + logging.error("{0} for {1}: {2}\n".format(subject, active_locale, LOG_INFO_OS_ERROR)) + + +def tear_off(): + try: + subprocess.call(['rm', '-rf', './locale', '{0}.pot'.format(DOMAIN_TO_BIND)]) + except OSError as e: + logging.error("OSError\n") + + +if __name__ == "__main__": + """ + Gettext Tests + """ + + # Prepare tests + env_tests = [test_locale, + test_gettext, + test_pot_creation] + + translation_tests = [make_dir, + create_po_files, + translate, + create_mo_files, + test_translations] + + # Execute tests + [env_test() for env_test in env_tests] + + for locale in TEST_DATA.keys(): + [test(locale) for test in translation_tests] + + tear_off() diff --git a/tests/test_i18n.py b/tests/test_i18n.py new file mode 100644 index 0000000..84a3318 --- /dev/null +++ b/tests/test_i18n.py @@ -0,0 +1,14 @@ +import gettext +import sys + + +def print_message(locale): + # Set up message catalog access + t = gettext.translation('%s' % locale, 'locale', fallback=True) + _ = t.gettext + + s = _('Hello World!') + print(s) + + +print_message(sys.argv[1]) diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 54627ef..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -# Tests run on Atomic, Classic and Container -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - atomic - - classic - - container - repositories: - - repo: "https://src.fedoraproject.org/tests/gettext.git" - dest: "gettext" - tests: - - gettext/gettext-tests - required_packages: - - gettext From 057981b3714b1206c78ba7db483519ee0066114f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 00:29:00 +0000 Subject: [PATCH 78/89] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 94fc142..d329b5a 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22.5 -Release: 5%{?dist} +Release: 6%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -457,6 +457,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 0.22.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Jul 11 2024 Manish Tiwari - 0.22.5-5 - CI gating tests migration to tmt From 368c0cc2837cc79b27eadae62739e4f519b10f42 Mon Sep 17 00:00:00 2001 From: matiwari Date: Wed, 11 Dec 2024 14:25:19 +0530 Subject: [PATCH 79/89] Update to 0.23 release --- gettext-0.22-disable-libtextstyle.patch | 110 ------------------------ gettext-0.23-libxml2.patch | 25 ++++++ gettext.spec | 42 +++++---- sources | 2 +- 4 files changed, 46 insertions(+), 133 deletions(-) delete mode 100644 gettext-0.22-disable-libtextstyle.patch create mode 100644 gettext-0.23-libxml2.patch diff --git a/gettext-0.22-disable-libtextstyle.patch b/gettext-0.22-disable-libtextstyle.patch deleted file mode 100644 index 771c49c..0000000 --- a/gettext-0.22-disable-libtextstyle.patch +++ /dev/null @@ -1,110 +0,0 @@ -diff -ur gettext-0.22.4.orig/configure.ac gettext-0.22.4/configure.ac ---- gettext-0.22.4.orig/configure.ac 2022-10-09 08:05:42.000000000 +0530 -+++ gettext-0.22.4/configure.ac 2024-02-13 12:47:32.099238869 +0530 -@@ -37,7 +37,7 @@ - - dnl Checks for library functions. - --AC_CONFIG_SUBDIRS([gettext-runtime libtextstyle gettext-tools]) -+AC_CONFIG_SUBDIRS([gettext-runtime gettext-tools]) - - AM_EXTRA_RECURSIVE_TARGETS([maintainer-update-po]) - -@@ -49,7 +49,7 @@ - dnl Optional Features: AC_ARG_ENABLE calls - dnl Optional Packages: AC_ARG_WITH calls - dnl Some influential environment variables: AC_ARG_VAR calls --esyscmd([{ cd gettext-runtime && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; cd libtextstyle && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; { cd gettext-tools && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; } | grep -v installed.libtextstyle | grep -v installed.csharp | grep -v 'installed C#'; } | sed -f build-aux/ac-help.sed ]) -+esyscmd([{ cd gettext-runtime && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; { cd gettext-tools && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; } | grep -v installed.csharp | grep -v 'installed C#'; } | sed -f build-aux/ac-help.sed ]) - - AC_CONFIG_FILES([Makefile]) - -diff -ur gettext-0.22.4.orig/gettext-tools/libgettextpo/textstyle.in.h gettext-0.22.4/gettext-tools/libgettextpo/textstyle.in.h ---- gettext-0.22.4.orig/gettext-tools/libgettextpo/textstyle.in.h 2023-09-19 02:06:31.000000000 +0530 -+++ gettext-0.22.4/gettext-tools/libgettextpo/textstyle.in.h 2024-02-13 13:04:15.238643775 +0530 -@@ -254,8 +254,9 @@ - - static inline file_ostream_t - file_ostream_create (FILE *fp) --{ -- return fp; -+{ -+ /* Closing the stream we return should not close 'fp'. */ -+ return fdopen (dup (fileno (fp)), "w"); - } - - static inline bool -@@ -676,10 +677,10 @@ - static inline noop_styled_ostream_t - noop_styled_ostream_create (ostream_t destination, bool pass_ownership) - { -- if (!pass_ownership) -- /* Not supported without the real libtextstyle. */ -- abort (); -- return destination; -+ if (pass_ownership) -+ return destination; -+ else -+ return fdopen (dup (fileno (destination)), "w"); - } - - static inline bool -diff -ur gettext-0.22.4.orig/gettext-tools/Makefile.am gettext-0.22.4/gettext-tools/Makefile.am ---- gettext-0.22.4.orig/gettext-tools/Makefile.am 2023-09-19 01:38:31.000000000 +0530 -+++ gettext-0.22.4/gettext-tools/Makefile.am 2024-02-13 12:49:27.145661060 +0530 -@@ -19,7 +19,7 @@ - AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies - ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4 - --SUBDIRS = gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc -+SUBDIRS = gnulib-lib libgrep libgettextpo src po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc - - EXTRA_DIST = misc/DISCLAIM - MOSTLYCLEANFILES = core *.stackdump -diff -ur gettext-0.22.4.orig/gettext-tools/src/Makefile.am gettext-0.22.4/gettext-tools/src/Makefile.am ---- gettext-0.22.4.orig/gettext-tools/src/Makefile.am 2023-11-17 17:14:38.000000000 +0530 -+++ gettext-0.22.4/gettext-tools/src/Makefile.am 2024-02-13 13:06:34.194367930 +0530 -@@ -311,19 +311,9 @@ - cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML) - cldr_plurals_LDADD = libgettextsrc.la $(LDADD) - --if USE_INSTALLED_LIBTEXTSTYLE --LT_LIBTEXTSTYLE = @LTLIBTEXTSTYLE@ --else --# How to get the include files of libtextstyle. --textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h: -- here=`pwd`; \ -- cd ../../libtextstyle/lib && \ -- $(MAKE) install-nobase_includeHEADERS install-nobase_nodist_includeHEADERS includedir="$$here" --BUILT_SOURCES += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h --MOSTLYCLEANFILES += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h --# Where to find the built libtextstyle library. --LT_LIBTEXTSTYLE = ../../libtextstyle/lib/libtextstyle.la --endif -+# Use the dummy libtextstyle from gnulib, as libgettextpo does. -+LT_LIBTEXTSTYLE = -+AM_CPPFLAGS += -I../libgettextpo -I$(top_srcdir)/libgettextpo - - # How to build libgettextsrc.la. - # Need ../gnulib-lib/libgettextlib.la. -diff -ur gettext-0.22.4.orig/Makefile.am gettext-0.22.4/Makefile.am ---- gettext-0.22.4.orig/Makefile.am 2023-11-17 17:39:11.000000000 +0530 -+++ gettext-0.22.4/Makefile.am 2024-02-13 12:44:18.309841774 +0530 -@@ -19,7 +19,7 @@ - AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies - ACLOCAL_AMFLAGS = -I m4 - --SUBDIRS = gnulib-local gettext-runtime libtextstyle gettext-tools -+SUBDIRS = gnulib-local gettext-runtime gettext-tools - - changelog_etc = \ - gettext-runtime/ChangeLog.0 \ -@@ -87,7 +87,7 @@ - cmp -s $(srcdir)/gettext-runtime/m4/xsize.m4 $(srcdir)/gettext-tools/gnulib-m4/xsize.m4 - cmp -s $(srcdir)/gettext-runtime/man/help2man $(srcdir)/gettext-tools/man/help2man - cmp -s $(srcdir)/gettext-runtime/man/x-to-1.in $(srcdir)/gettext-tools/man/x-to-1.in -- cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4 -+# cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4 - cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.java $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.java - cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.class $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.class - # Verify that all files have appropriate copyright headers. diff --git a/gettext-0.23-libxml2.patch b/gettext-0.23-libxml2.patch new file mode 100644 index 0000000..21e6589 --- /dev/null +++ b/gettext-0.23-libxml2.patch @@ -0,0 +1,25 @@ +diff -ur gettext-0.23.orig/gettext-tools/src/its.c gettext-0.23/gettext-tools/src/its.c +--- gettext-0.23.orig/gettext-tools/src/its.c 2024-10-13 16:14:36.000000000 +0530 ++++ gettext-0.23/gettext-tools/src/its.c 2024-12-05 23:24:03.100545103 +0530 +@@ -28,6 +28,7 @@ + #include + #include + ++#include + #include + #include + #include +@@ -82,7 +83,13 @@ + /* ----------------------------- Error handling ----------------------------- */ + + static void ++/* Adapt to API change in libxml 2.12.0. +++ See . */ ++#if LIBXML_VERSION >= 21200 ++structured_error (void *data, const xmlError *err) ++#else + structured_error (void *data, xmlError *err) ++#endif + { + error (0, err->level == XML_ERR_FATAL ? EXIT_FAILURE : 0, + _("%s error: %s"), "libxml2", err->message); diff --git a/gettext.spec b/gettext.spec index d329b5a..6c3906f 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,11 +1,10 @@ %bcond_with jar %bcond_with java -%bcond libtextstyle %[0%{?fedora} >= 40] Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.22.5 -Release: 6%{?dist} +Version: 0.23 +Release: 1%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -27,8 +26,7 @@ Source2: msghack.py Source3: msghack.1 Patch1: gettext-0.21.1-covscan.patch -Patch2: gettext-0.22-disable-libtextstyle.patch - +Patch2: gettext-0.23-libxml2.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 BuildRequires: automake @@ -74,9 +72,7 @@ BuildRequires: glibc-langpack-zh BuildRequires: make Provides: bundled(gnulib) Requires: %{name}-runtime = %{version}-%{release} -%if %{with libtextstyle} Requires: libtextstyle%{?_isa} = %{version}-%{release} -%endif %description The GNU gettext package provides a set of tools and documentation for @@ -129,9 +125,6 @@ Requires: xz Requires: diffutils Obsoletes: gettext-autopoint < 0.18.1.1-3 Provides: gettext-autopoint = %{version}-%{release} -%if %{without libtextstyle} -Obsoletes: libtextstyle-devel < %{version}-%{release} -%endif %description devel This package contains all development related files necessary for @@ -145,17 +138,11 @@ Summary: Libraries for %{name} # libasprintf is LGPLv2+ # libgettextpo is GPLv3+ License: LGPL-2.0-or-later AND GPL-3.0-or-later -%if %{with libtextstyle} Requires: libtextstyle%{?_isa} = %{version}-%{release} -%endif -%if %{without libtextstyle} -Obsoletes: libtextstyle < %{version}-%{release} -%endif %description libs This package contains libraries used internationalization support. -%if %{with libtextstyle} %package -n libtextstyle Summary: Text styling library License: GPL-3.0-or-later @@ -173,7 +160,6 @@ Requires: libtextstyle%{?_isa} = %{version}-%{release} This package contains all development related files necessary for developing or compiling applications/libraries that needs text styling. -%endif %package -n emacs-%{name} Summary: Support for editing po files within GNU Emacs @@ -207,9 +193,7 @@ Substitutes the values of environment variables. %prep %setup -q %patch 1 -p1 -b .orig~ -%if %{without libtextstyle} %patch 2 -p1 -b .orig~ -%endif autoreconf # Defeat libtextstyle attempt to bundle libxml2. The comments @@ -330,7 +314,7 @@ make check LIBUNISTRING=-lunistring %files -f %{name}-tools.lang %doc AUTHORS NEWS README THANKS -%doc gettext-tools/misc/DISCLAIM +%doc gettext-tools/misc/disclaim-translations.txt %doc gettext-tools/man/msg*.1.html %doc gettext-tools/man/recode*.1.html %doc gettext-tools/man/xgettext.1.html @@ -369,8 +353,18 @@ make check LIBUNISTRING=-lunistring %{_datadir}/%{name}/ABOUT-NLS %{_datadir}/%{name}/po %{_datadir}/%{name}/styles +%{_datadir}/%{name}/disclaim-translations.txt %dir %{_datadir}/%{name}-%{version} %{_datadir}/%{name}-%{version}/its +%dir %{_datadir}/%{name}/schema +%{_datadir}/%{name}/schema/its*.xsd* +%{_datadir}/%{name}/schema/locating-rules.xsd* +%dir %{_libexecdir}/%{name} +%{_libexecdir}/%{name}/cldr-plurals +%{_libexecdir}/%{name}/hostname +%{_libexecdir}/%{name}/project-id +%{_libexecdir}/%{name}/urlget +%{_libexecdir}/%{name}/user-email %files runtime -f %{name}-runtime.lang %license COPYING @@ -433,7 +427,6 @@ make check LIBUNISTRING=-lunistring %{_datadir}/%{name}/libintl.jar %endif -%if %{with libtextstyle} %files -n libtextstyle %{_libdir}/libtextstyle.so.0* @@ -443,7 +436,6 @@ make check LIBUNISTRING=-lunistring %{_includedir}/textstyle.h %{_infodir}/libtextstyle* %{_libdir}/libtextstyle.so -%endif %files -n emacs-%{name} %dir %{_emacs_sitelispdir}/%{name} @@ -457,6 +449,12 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Dec 11 2024 Manish Tiwari - 0.23-1 +- update to 0.23 release +- https://savannah.gnu.org/news/?id=10699 +- Add patch to fix compilation error with libxml2 >= 2.12.0 and gcc >= 14. +- Remove gettext-0.22-disable-libtextstyle patch + * Thu Jul 18 2024 Fedora Release Engineering - 0.22.5-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources index a34bba2..7e00b88 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.22.5.tar.gz) = d8b22d7fba10052a2045f477f0a5b684d932513bdb3b295c22fbd9dfc2a9d8fccd9aefd90692136c62897149aa2f7d1145ce6618aa1f0be787cb88eba5bc09be +SHA512 (gettext-0.23.tar.gz) = bdccfdf9441e704862745098014aa02a27c6a4cbcefbbf430496169d30be6b72d91081754666ceb4f1a79daceb26de1da149627f205121ee1a83efe33e354525 From ec95bbdbda72697d32aaab2071db029770ec6bd7 Mon Sep 17 00:00:00 2001 From: matiwari Date: Sat, 21 Dec 2024 13:12:36 +0530 Subject: [PATCH 80/89] Use lowercase boolean in SPDX expression to avoid mixed case --- gettext.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gettext.spec b/gettext.spec index 6c3906f..1107cfe 100644 --- a/gettext.spec +++ b/gettext.spec @@ -19,7 +19,7 @@ Release: 1%{?dist} # - libasprintf info files # - libtextstyle info files # Everything else is GPLv3+ -License: GPL-3.0-or-later AND LGPL-2.0-or-later AND GFDL-1.2-or-later +License: GPL-3.0-or-later and LGPL-2.0-or-later and GFDL-1.2-or-later URL: https://www.gnu.org/software/gettext/ Source: https://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz Source2: msghack.py @@ -89,7 +89,7 @@ programs. %package runtime Summary: GNU runtime libraries and programs for producing multi-lingual messages -License: GPL-3.0-or-later AND LGPL-2.0-or-later +License: GPL-3.0-or-later and LGPL-2.0-or-later # Depend on the exact version of the library sub package Requires: %{name}-libs%{_isa} = %{version}-%{release} Requires: %{name}-envsubst = %{version}-%{release} @@ -117,7 +117,7 @@ Summary: Development files for %{name} # autopoint is GPLv3+ # libasprintf is LGPLv2+ # libgettextpo is GPLv3+ -License: LGPL-2.0-or-later AND GPL-3.0-or-later AND GFDL-1.2-or-later +License: LGPL-2.0-or-later and GPL-3.0-or-later and GFDL-1.2-or-later Requires: %{name} = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-common-devel = %{version}-%{release} @@ -137,7 +137,7 @@ want to add gettext support for your project. Summary: Libraries for %{name} # libasprintf is LGPLv2+ # libgettextpo is GPLv3+ -License: LGPL-2.0-or-later AND GPL-3.0-or-later +License: LGPL-2.0-or-later and GPL-3.0-or-later Requires: libtextstyle%{?_isa} = %{version}-%{release} %description libs @@ -153,7 +153,7 @@ emulator. %package -n libtextstyle-devel Summary: Development files for libtextstyle -License: GPL-3.0-or-later AND GFDL-1.2-or-later +License: GPL-3.0-or-later and GFDL-1.2-or-later Requires: libtextstyle%{?_isa} = %{version}-%{release} %description -n libtextstyle-devel From f92414c279f61e8d5ad6c5e556d2e055ca65d19c Mon Sep 17 00:00:00 2001 From: matiwari Date: Wed, 1 Jan 2025 16:19:26 +0530 Subject: [PATCH 81/89] Update to 0.23.1 release --- gettext-0.23-libxml2.patch | 25 ------------------------- gettext.spec | 8 +++++--- sources | 2 +- 3 files changed, 6 insertions(+), 29 deletions(-) delete mode 100644 gettext-0.23-libxml2.patch diff --git a/gettext-0.23-libxml2.patch b/gettext-0.23-libxml2.patch deleted file mode 100644 index 21e6589..0000000 --- a/gettext-0.23-libxml2.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -ur gettext-0.23.orig/gettext-tools/src/its.c gettext-0.23/gettext-tools/src/its.c ---- gettext-0.23.orig/gettext-tools/src/its.c 2024-10-13 16:14:36.000000000 +0530 -+++ gettext-0.23/gettext-tools/src/its.c 2024-12-05 23:24:03.100545103 +0530 -@@ -28,6 +28,7 @@ - #include - #include - -+#include - #include - #include - #include -@@ -82,7 +83,13 @@ - /* ----------------------------- Error handling ----------------------------- */ - - static void -+/* Adapt to API change in libxml 2.12.0. -++ See . */ -+#if LIBXML_VERSION >= 21200 -+structured_error (void *data, const xmlError *err) -+#else - structured_error (void *data, xmlError *err) -+#endif - { - error (0, err->level == XML_ERR_FATAL ? EXIT_FAILURE : 0, - _("%s error: %s"), "libxml2", err->message); diff --git a/gettext.spec b/gettext.spec index 1107cfe..6cfde83 100644 --- a/gettext.spec +++ b/gettext.spec @@ -3,7 +3,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.23 +Version: 0.23.1 Release: 1%{?dist} # The following are licensed under LGPLv2+: @@ -26,7 +26,6 @@ Source2: msghack.py Source3: msghack.1 Patch1: gettext-0.21.1-covscan.patch -Patch2: gettext-0.23-libxml2.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 BuildRequires: automake @@ -193,7 +192,6 @@ Substitutes the values of environment variables. %prep %setup -q %patch 1 -p1 -b .orig~ -%patch 2 -p1 -b .orig~ autoreconf # Defeat libtextstyle attempt to bundle libxml2. The comments @@ -449,6 +447,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Jan 1 2025 Manish Tiwari - 0.23.1-1 +- update to 0.23.1 release +- Remove gettext-0.23-libxml2 patch + * Wed Dec 11 2024 Manish Tiwari - 0.23-1 - update to 0.23 release - https://savannah.gnu.org/news/?id=10699 diff --git a/sources b/sources index 7e00b88..f886dc3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.23.tar.gz) = bdccfdf9441e704862745098014aa02a27c6a4cbcefbbf430496169d30be6b72d91081754666ceb4f1a79daceb26de1da149627f205121ee1a83efe33e354525 +SHA512 (gettext-0.23.1.tar.gz) = 39ccf78961e4baae761a6117dcec02957bbbdbd398197b8b11ea18e53c04bf2500a7c143d3f9ea3ded48c55f71a323eb05ee0e461c1d9b397297e971b8ad6eef From 9f7d17485699c5a4ed31e6ae74d36ad84f5a30c8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 19:50:07 +0000 Subject: [PATCH 82/89] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 6cfde83..46c58b3 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.23.1 -Release: 1%{?dist} +Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -447,6 +447,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 0.23.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Jan 1 2025 Manish Tiwari - 0.23.1-1 - update to 0.23.1 release - Remove gettext-0.23-libxml2 patch From 74ac9f07a14d26e5dad0dabb73eaa0089c2f128d Mon Sep 17 00:00:00 2001 From: matiwari Date: Sat, 1 Mar 2025 00:17:23 +0530 Subject: [PATCH 83/89] Update to 0.24 release --- gettext.spec | 12 ++++++++++-- sources | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gettext.spec b/gettext.spec index 46c58b3..7bd2ce7 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,10 +1,14 @@ %bcond_with jar %bcond_with java +# Disabled lto flags on i686 to avoid lto memory allocation error +%ifarch i686 +%global _lto_cflags %{nil} +%endif Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.23.1 -Release: 2%{?dist} +Version: 0.24 +Release: 1%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -447,6 +451,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Feb 27 2025 Manish Tiwari - 0.24-1 +- update to 0.24 release +- https://savannah.gnu.org/news/?id=10730 + * Thu Jan 16 2025 Fedora Release Engineering - 0.23.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index f886dc3..0314194 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.23.1.tar.gz) = 39ccf78961e4baae761a6117dcec02957bbbdbd398197b8b11ea18e53c04bf2500a7c143d3f9ea3ded48c55f71a323eb05ee0e461c1d9b397297e971b8ad6eef +SHA512 (gettext-0.24.tar.gz) = 9e9913fec1d3eeff65e023ee00c5da456baceabd49ce0c0d21f19b9911a60b67546f4ee5716f6f5b7a160b4c13c47604da8762854eba6f17f9bf3fd1c6056828 From 9b44db8d2186b3d52ece9adddc945de27dac580a Mon Sep 17 00:00:00 2001 From: matiwari Date: Tue, 13 May 2025 19:06:43 +0530 Subject: [PATCH 84/89] Update to 0.25 release --- gettext.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gettext.spec b/gettext.spec index 7bd2ce7..e0a92b6 100644 --- a/gettext.spec +++ b/gettext.spec @@ -7,7 +7,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.24 +Version: 0.25 Release: 1%{?dist} # The following are licensed under LGPLv2+: @@ -404,7 +404,7 @@ make check LIBUNISTRING=-lunistring %{_datadir}/%{name}/config.rpath %{_datadir}/%{name}/*.h %{_datadir}/%{name}/msgunfmt.tcl -%{_datadir}/aclocal/* +%{_datadir}/%{name}/m4/* %{_includedir}/autosprintf.h %{_includedir}/gettext-po.h %{_infodir}/autosprintf* @@ -451,6 +451,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Mon May 12 2025 Manish Tiwari - 0.25-1 +- update to 0.25 release +- https://savannah.gnu.org/news/?id=10769 + * Thu Feb 27 2025 Manish Tiwari - 0.24-1 - update to 0.24 release - https://savannah.gnu.org/news/?id=10730 diff --git a/sources b/sources index 0314194..267fa7c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.24.tar.gz) = 9e9913fec1d3eeff65e023ee00c5da456baceabd49ce0c0d21f19b9911a60b67546f4ee5716f6f5b7a160b4c13c47604da8762854eba6f17f9bf3fd1c6056828 +SHA512 (gettext-0.25.tar.gz) = a086191926f9d9d87ec45136e0796626140f0209d71b498756cda8212b71343b76643cd28aaeb74370b661d99d8ceea25ba3afd24d9dca4814a552436066d393 From 7e8960bf7649f4511d26145faf0777c7844dee6c Mon Sep 17 00:00:00 2001 From: matiwari Date: Wed, 23 Jul 2025 13:19:10 +0530 Subject: [PATCH 85/89] Update to release 0.25.1 --- gettext.spec | 9 ++++++++- sources | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gettext.spec b/gettext.spec index e0a92b6..64031f3 100644 --- a/gettext.spec +++ b/gettext.spec @@ -7,7 +7,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.25 +Version: 0.25.1 Release: 1%{?dist} # The following are licensed under LGPLv2+: @@ -405,6 +405,7 @@ make check LIBUNISTRING=-lunistring %{_datadir}/%{name}/*.h %{_datadir}/%{name}/msgunfmt.tcl %{_datadir}/%{name}/m4/* +%{_datadir}/aclocal/nls.m4 %{_includedir}/autosprintf.h %{_includedir}/gettext-po.h %{_infodir}/autosprintf* @@ -451,6 +452,12 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Jul 23 2025 Manish Tiwari - 0.25.1-1 +- update to 0.25.1 release +- Bug fixes: +- autopoint no longer fails if configure.ac contains no AM_GNU_GETTEXT_VERSION or AM_GNU_GETTEXT_REQUIRE_VERSION invocation. +- nls.m4 is installed again under $PREFIX/share/aclocal/. + * Mon May 12 2025 Manish Tiwari - 0.25-1 - update to 0.25 release - https://savannah.gnu.org/news/?id=10769 diff --git a/sources b/sources index 267fa7c..8f30fb0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.25.tar.gz) = a086191926f9d9d87ec45136e0796626140f0209d71b498756cda8212b71343b76643cd28aaeb74370b661d99d8ceea25ba3afd24d9dca4814a552436066d393 +SHA512 (gettext-0.25.1.tar.gz) = f7cac3969628edde007f0378e8c4536dda98228ec7b806ecf35bec2367ddd1c169d258310e0ed4310e71614421028cbaf7aeedda87924020db38c43460ab10df From c94ec5b16a723e1c182c06535889c564d7f1d3f4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 21:17:40 +0000 Subject: [PATCH 86/89] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 64031f3..eb76ccf 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.25.1 -Release: 1%{?dist} +Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -452,6 +452,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 0.25.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Wed Jul 23 2025 Manish Tiwari - 0.25.1-1 - update to 0.25.1 release - Bug fixes: From a40f3de97fefd556582543a4268acb342da52859 Mon Sep 17 00:00:00 2001 From: matiwari Date: Tue, 19 Aug 2025 23:15:33 +0530 Subject: [PATCH 87/89] Update to release 0.26 --- gettext.spec | 10 ++++++++-- sources | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gettext.spec b/gettext.spec index eb76ccf..40e26d9 100644 --- a/gettext.spec +++ b/gettext.spec @@ -7,8 +7,8 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.25.1 -Release: 2%{?dist} +Version: 0.26 +Release: 1%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -377,6 +377,8 @@ make check LIBUNISTRING=-lunistring %{_bindir}/gettext %{_bindir}/gettext.sh %{_bindir}/ngettext +%{_bindir}/printf_gettext +%{_bindir}/printf_ngettext %exclude %{_mandir}/man1/autopoint.1* %exclude %{_mandir}/man1/envsubst.1* %exclude %{_mandir}/man1/gettextize.1* @@ -452,6 +454,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Tue Aug 19 2025 Manish Tiwari - 0.26-1 +- update to 0.26 release +- https://savannah.gnu.org/news/?id=10789 + * Wed Jul 23 2025 Fedora Release Engineering - 0.25.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/sources b/sources index 8f30fb0..2017c93 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.25.1.tar.gz) = f7cac3969628edde007f0378e8c4536dda98228ec7b806ecf35bec2367ddd1c169d258310e0ed4310e71614421028cbaf7aeedda87924020db38c43460ab10df +SHA512 (gettext-0.26.tar.gz) = 6c2afb0737843028e1cd27f1cd7dd5b81372ccff8cd8e01e17cfdc517afdd9a849c232f1ff5adca5eb4b03f2cc64f4a3f689ae8b84e523ceeae85384f3844083 From bb34f17628e02dd95e395157b1d3bd98b3b28ad8 Mon Sep 17 00:00:00 2001 From: matiwari Date: Thu, 18 Dec 2025 11:42:38 +0530 Subject: [PATCH 88/89] Fix build failure with glibc 2.42 C23 const-preserving macros --- gettext-0.26-c23.diff | 486 ++++++++++++++++++++++++++++++++++++++++++ gettext.spec | 8 +- 2 files changed, 493 insertions(+), 1 deletion(-) create mode 100644 gettext-0.26-c23.diff diff --git a/gettext-0.26-c23.diff b/gettext-0.26-c23.diff new file mode 100644 index 0000000..a4f7584 --- /dev/null +++ b/gettext-0.26-c23.diff @@ -0,0 +1,486 @@ +diff -r -u gettext-0.26/gettext-runtime/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-runtime/gnulib-lib/c++defs.h +--- gettext-0.26/gettext-runtime/gnulib-lib/c++defs.h 2025-07-08 10:54:38.000000000 +0200 ++++ gettext-0.26-patched/gettext-runtime/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100 +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff -r -u gettext-0.26/gettext-runtime/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-runtime/gnulib-lib/stdlib.in.h +--- gettext-0.26/gettext-runtime/gnulib-lib/stdlib.in.h 2025-07-08 10:54:38.000000000 +0200 ++++ gettext-0.26-patched/gettext-runtime/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.891299356 +0100 +@@ -237,9 +237,9 @@ + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff -r -u gettext-0.26/gettext-runtime/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-runtime/gnulib-lib/wchar.in.h +--- gettext-0.26/gettext-runtime/gnulib-lib/wchar.in.h 2025-07-08 10:54:38.000000000 +0200 ++++ gettext-0.26-patched/gettext-runtime/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.399876581 +0100 +@@ -316,7 +316,7 @@ + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff -r -u gettext-0.26/gettext-runtime/intl/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/c++defs.h +--- gettext-0.26/gettext-runtime/intl/gnulib-lib/c++defs.h 2025-07-08 10:54:39.000000000 +0200 ++++ gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100 +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff -r -u gettext-0.26/gettext-runtime/intl/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/stdlib.in.h +--- gettext-0.26/gettext-runtime/intl/gnulib-lib/stdlib.in.h 2025-07-08 10:54:39.000000000 +0200 ++++ gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.892299363 +0100 +@@ -237,9 +237,9 @@ + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff -r -u gettext-0.26/gettext-runtime/intl/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/wchar.in.h +--- gettext-0.26/gettext-runtime/intl/gnulib-lib/wchar.in.h 2025-07-08 10:54:39.000000000 +0200 ++++ gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.401876594 +0100 +@@ -316,7 +316,7 @@ + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff -r -u gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/c++defs.h +--- gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/c++defs.h 2025-07-08 10:54:39.000000000 +0200 ++++ gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100 +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff -r -u gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/stdlib.in.h +--- gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/stdlib.in.h 2025-07-08 10:54:39.000000000 +0200 ++++ gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.889299343 +0100 +@@ -237,9 +237,9 @@ + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff -r -u gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/wchar.in.h +--- gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/wchar.in.h 2025-07-08 10:54:39.000000000 +0200 ++++ gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.397876567 +0100 +@@ -316,7 +316,7 @@ + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff -r -u gettext-0.26/gettext-tools/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-tools/gnulib-lib/c++defs.h +--- gettext-0.26/gettext-tools/gnulib-lib/c++defs.h 2025-07-08 10:54:39.000000000 +0200 ++++ gettext-0.26-patched/gettext-tools/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100 +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff -r -u gettext-0.26/gettext-tools/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-tools/gnulib-lib/stdlib.in.h +--- gettext-0.26/gettext-tools/gnulib-lib/stdlib.in.h 2025-07-08 10:54:39.000000000 +0200 ++++ gettext-0.26-patched/gettext-tools/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.896299390 +0100 +@@ -237,9 +237,9 @@ + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff -r -u gettext-0.26/gettext-tools/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-tools/gnulib-lib/wchar.in.h +--- gettext-0.26/gettext-tools/gnulib-lib/wchar.in.h 2025-07-08 10:54:40.000000000 +0200 ++++ gettext-0.26-patched/gettext-tools/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.404876615 +0100 +@@ -316,7 +316,7 @@ + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff -r -u gettext-0.26/gettext-tools/gnulib-tests/c++defs.h gettext-0.26-patched/gettext-tools/gnulib-tests/c++defs.h +--- gettext-0.26/gettext-tools/gnulib-tests/c++defs.h 2025-07-08 10:54:40.000000000 +0200 ++++ gettext-0.26-patched/gettext-tools/gnulib-tests/c++defs.h 2025-12-18 13:08:56.338779679 +0100 +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff -r -u gettext-0.26/gettext-tools/libgettextpo/c++defs.h gettext-0.26-patched/gettext-tools/libgettextpo/c++defs.h +--- gettext-0.26/gettext-tools/libgettextpo/c++defs.h 2025-07-08 10:54:49.000000000 +0200 ++++ gettext-0.26-patched/gettext-tools/libgettextpo/c++defs.h 2025-12-18 13:08:56.338779679 +0100 +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff -r -u gettext-0.26/gettext-tools/libgettextpo/stdlib.in.h gettext-0.26-patched/gettext-tools/libgettextpo/stdlib.in.h +--- gettext-0.26/gettext-tools/libgettextpo/stdlib.in.h 2025-07-08 10:54:49.000000000 +0200 ++++ gettext-0.26-patched/gettext-tools/libgettextpo/stdlib.in.h 2025-12-18 13:05:15.899299410 +0100 +@@ -237,9 +237,9 @@ + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff -r -u gettext-0.26/gettext-tools/libgettextpo/wchar.in.h gettext-0.26-patched/gettext-tools/libgettextpo/wchar.in.h +--- gettext-0.26/gettext-tools/libgettextpo/wchar.in.h 2025-07-08 10:54:49.000000000 +0200 ++++ gettext-0.26-patched/gettext-tools/libgettextpo/wchar.in.h 2025-12-18 13:04:13.407876635 +0100 +@@ -316,7 +316,7 @@ + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff -r -u gettext-0.26/gettext-tools/libgrep/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/c++defs.h +--- gettext-0.26/gettext-tools/libgrep/gnulib-lib/c++defs.h 2025-07-08 10:54:49.000000000 +0200 ++++ gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100 +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff -r -u gettext-0.26/gettext-tools/libgrep/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/stdlib.in.h +--- gettext-0.26/gettext-tools/libgrep/gnulib-lib/stdlib.in.h 2025-07-08 10:54:49.000000000 +0200 ++++ gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.897299397 +0100 +@@ -237,9 +237,9 @@ + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff -r -u gettext-0.26/gettext-tools/libgrep/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/wchar.in.h +--- gettext-0.26/gettext-tools/libgrep/gnulib-lib/wchar.in.h 2025-07-08 10:54:49.000000000 +0200 ++++ gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.406876628 +0100 +@@ -316,7 +316,7 @@ + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff -r -u gettext-0.26/gettext-tools/tests/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-tools/tests/gnulib-lib/c++defs.h +--- gettext-0.26/gettext-tools/tests/gnulib-lib/c++defs.h 2025-07-08 10:55:10.000000000 +0200 ++++ gettext-0.26-patched/gettext-tools/tests/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100 +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff -r -u gettext-0.26/libtextstyle/lib/c++defs.h gettext-0.26-patched/libtextstyle/lib/c++defs.h +--- gettext-0.26/libtextstyle/lib/c++defs.h 2025-07-08 10:55:22.000000000 +0200 ++++ gettext-0.26-patched/libtextstyle/lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100 +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff -r -u gettext-0.26/libtextstyle/lib/stdlib.in.h gettext-0.26-patched/libtextstyle/lib/stdlib.in.h +--- gettext-0.26/libtextstyle/lib/stdlib.in.h 2025-07-08 10:55:22.000000000 +0200 ++++ gettext-0.26-patched/libtextstyle/lib/stdlib.in.h 2025-12-18 13:05:15.894299376 +0100 +@@ -237,9 +237,9 @@ + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff -r -u gettext-0.26/libtextstyle/lib/wchar.in.h gettext-0.26-patched/libtextstyle/lib/wchar.in.h +--- gettext-0.26/libtextstyle/lib/wchar.in.h 2025-07-08 10:55:22.000000000 +0200 ++++ gettext-0.26-patched/libtextstyle/lib/wchar.in.h 2025-12-18 13:04:13.402876601 +0100 +@@ -316,7 +316,7 @@ + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff -r -u gettext-0.26/libtextstyle/tests/c++defs.h gettext-0.26-patched/libtextstyle/tests/c++defs.h +--- gettext-0.26/libtextstyle/tests/c++defs.h 2025-07-08 10:55:22.000000000 +0200 ++++ gettext-0.26-patched/libtextstyle/tests/c++defs.h 2025-12-18 13:08:56.338779679 +0100 +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func diff --git a/gettext.spec b/gettext.spec index 40e26d9..b6a2c6b 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.26 -Release: 1%{?dist} +Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -30,6 +30,7 @@ Source2: msghack.py Source3: msghack.1 Patch1: gettext-0.21.1-covscan.patch +Patch2: gettext-0.26-c23.diff # for bootstrapping # BuildRequires: autoconf >= 2.62 BuildRequires: automake @@ -196,6 +197,7 @@ Substitutes the values of environment variables. %prep %setup -q %patch 1 -p1 -b .orig~ +%patch 2 -p1 -b .orig~ autoreconf # Defeat libtextstyle attempt to bundle libxml2. The comments @@ -454,6 +456,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Dec 18 2025 Manish Tiwari - 0.26-2 +- Add upstream provided patch to fix build failure with glibc 2.42 C23 const-preserving macros +- https://lists.gnu.org/archive/html/bug-gnulib/2025-11/msg00220.html + * Tue Aug 19 2025 Manish Tiwari - 0.26-1 - update to 0.26 release - https://savannah.gnu.org/news/?id=10789 From 98705c64dddad7c67ccf5a43cbf9858fd1264a39 Mon Sep 17 00:00:00 2001 From: matiwari Date: Mon, 12 Jan 2026 11:02:16 +0530 Subject: [PATCH 89/89] stdcountof-h tests: Fix compilation error with gcc-16 --- gettext-0.26-stdcountof-h.patch | 25 +++++++++++++++++++++++++ gettext.spec | 8 +++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 gettext-0.26-stdcountof-h.patch diff --git a/gettext-0.26-stdcountof-h.patch b/gettext-0.26-stdcountof-h.patch new file mode 100644 index 0000000..9070710 --- /dev/null +++ b/gettext-0.26-stdcountof-h.patch @@ -0,0 +1,25 @@ +diff -ur gettext-0.26.orig/gettext-tools/gnulib-tests/test-stdcountof-h.c gettext-0.26/gettext-tools/gnulib-tests/test-stdcountof-h.c +--- gettext-0.26.orig/gettext-tools/gnulib-tests/test-stdcountof-h.c 2025-07-08 14:24:40.000000000 +0530 ++++ gettext-0.26/gettext-tools/gnulib-tests/test-stdcountof-h.c 2026-01-13 13:07:35.226196031 +0530 +@@ -42,17 +42,21 @@ + + (void) local_bounded; + ++#ifdef _gl_verify_is_array + (void) _gl_verify_is_array (unbounded); + (void) _gl_verify_is_array (bounded); + (void) _gl_verify_is_array (multidimensional); ++#endif + + ASSERT (countof (bounded) == 10); + ASSERT (countof (multidimensional) == 10); + ASSERT (countof (local_bounded) == 20); + + #if 0 /* These produce compilation errors. */ ++#ifdef _gl_verify_is_array + (void) _gl_verify_is_array (integer); + (void) _gl_verify_is_array (parameter); ++#endif + + ASSERT (countof (integer) >= 0); + ASSERT (countof (unbounded) >= 0); diff --git a/gettext.spec b/gettext.spec index b6a2c6b..b71e10c 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.26 -Release: 2%{?dist} +Release: 3%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -31,6 +31,7 @@ Source3: msghack.1 Patch1: gettext-0.21.1-covscan.patch Patch2: gettext-0.26-c23.diff +Patch3: gettext-0.26-stdcountof-h.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 BuildRequires: automake @@ -198,6 +199,7 @@ Substitutes the values of environment variables. %setup -q %patch 1 -p1 -b .orig~ %patch 2 -p1 -b .orig~ +%patch 3 -p1 -b .orig~ autoreconf # Defeat libtextstyle attempt to bundle libxml2. The comments @@ -456,6 +458,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Sun Jan 11 2026 Manish Tiwari - 0.26-3 +- https://lists.gnu.org/archive/html/bug-gnulib/2025-09/msg00095.html +- Upstream patch to fix implicit declaration error with GCC-16 + * Thu Dec 18 2025 Manish Tiwari - 0.26-2 - Add upstream provided patch to fix build failure with glibc 2.42 C23 const-preserving macros - https://lists.gnu.org/archive/html/bug-gnulib/2025-11/msg00220.html