Update to 0.20.1 release

This commit is contained in:
Sundeep Anand 2019-08-10 17:09:27 +05:30
parent 76b502edb8
commit f06c2682ab
6 changed files with 126 additions and 600 deletions

View File

@ -1,47 +0,0 @@
commit bd2c6ca2b7ae0be02d4bb85db79def454f3153fb
Author: rpm-build <rpm-build>
AuthorDate: Wed Dec 21 12:50:54 2016 +0100
Commit: rpm-build <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 \

View File

@ -1,43 +0,0 @@
From a0cab23332a254e3500cac2a3a984472d02180e5 Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
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

View File

@ -1,445 +0,0 @@
From dce3a16e5e9368245735e29bf498dcd5e3e474a4 Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@gnu.org>
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

View File

@ -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 ()

View File

@ -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 <loganjerry@gmail.com> - 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 <petersen@redhat.com> - 0.19.8.1-22
- temporarily disable testsuite (#1735245)

View File

@ -1 +1 @@
df3f5690eaa30fd228537b00cb7b7590 gettext-0.19.8.1.tar.xz
SHA512 (gettext-0.20.1.tar.xz) = 82ffa5a28068272d0587262f8d9269f9629c601da5d122b6645c9c4cf98bfe4149df01bb58522ccf8fe25b931672e18551d7fb34de1cbf6a0463a87f9f8ee221