Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel Workaround for msgfmt -o /dev/null being broken ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fa990c2dea12
branches:  trunk
changeset: 436959:fa990c2dea12
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Wed Aug 12 23:31:09 2020 +0000

description:
Workaround for msgfmt -o /dev/null being broken on Illumos

On Illumos, O_TRUNC|O_WRONLY currently fails outside the global zone for
/dev/null. The mmap-safe rewrite logic used by gettext 0.21 fails for
that reason, breaking at least textproc/po4a with a rather mysterious
error.

diffstat:

 devel/gettext-tools/Makefile                             |   3 ++-
 devel/gettext/distinfo                                   |   3 ++-
 devel/gettext/patches/patch-gettext-tools_src_write-mo.c |  16 ++++++++++++++++
 3 files changed, 20 insertions(+), 2 deletions(-)

diffs (50 lines):

diff -r 4bae50b0b6e2 -r fa990c2dea12 devel/gettext-tools/Makefile
--- a/devel/gettext-tools/Makefile      Wed Aug 12 22:44:34 2020 +0000
+++ b/devel/gettext-tools/Makefile      Wed Aug 12 23:31:09 2020 +0000
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.40 2020/01/23 11:42:16 nia Exp $
+# $NetBSD: Makefile,v 1.41 2020/08/12 23:31:10 joerg Exp $
 
 .include "../../devel/gettext/Makefile.common"
 
 PKGNAME=       ${DISTNAME:S/-/-tools-/}
 COMMENT=       Tools for providing messages in different languages
+PKGREVISION=   1
 
 DISTINFO_FILE= ${.CURDIR}/../../devel/gettext/distinfo
 PATCHDIR=      ${.CURDIR}/../../devel/gettext/patches
diff -r 4bae50b0b6e2 -r fa990c2dea12 devel/gettext/distinfo
--- a/devel/gettext/distinfo    Wed Aug 12 22:44:34 2020 +0000
+++ b/devel/gettext/distinfo    Wed Aug 12 23:31:09 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.39 2020/07/29 07:00:15 wiz Exp $
+$NetBSD: distinfo,v 1.40 2020/08/12 23:31:09 joerg Exp $
 
 SHA1 (gettext-0.21.tar.gz) = e6c0a0cba5b00a604c9118403a8199c77a538526
 RMD160 (gettext-0.21.tar.gz) = 93b5bf20f0cb7f0fb5342a948b86d55682b99521
@@ -13,4 +13,5 @@
 SHA1 (patch-an) = 2284bfe8a44873776970af7fc70a419fa2a10054
 SHA1 (patch-ao) = d0ab5520f53f38c7b2eb76395c5d6dd24407ef4f
 SHA1 (patch-gettext-runtime_m4_gettext.m4) = a154919e5da2013c3a2eaa965dc5f12460b1d4f4
+SHA1 (patch-gettext-tools_src_write-mo.c) = e0d3512fd60b5d471248ffe9998d272bdc0a60ef
 SHA1 (patch-gettext-tools_tests_Makefile.in) = 17dbffc987536d56d2792cf5f459a3a0eccd33dc
diff -r 4bae50b0b6e2 -r fa990c2dea12 devel/gettext/patches/patch-gettext-tools_src_write-mo.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gettext/patches/patch-gettext-tools_src_write-mo.c  Wed Aug 12 23:31:09 2020 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-gettext-tools_src_write-mo.c,v 1.1 2020/08/12 23:31:09 joerg Exp $
+
+Workaround for /dev/null failing with O_TRUNC|O_WRONLY in Illumos zones.
+
+--- gettext-tools/src/write-mo.c.orig  2020-07-05 22:39:41.000000000 +0000
++++ gettext-tools/src/write-mo.c
+@@ -809,6 +809,9 @@ msgdomain_write_mo (message_list_ty *mlp
+              (through SIGSEGV or SIGBUS).  */
+           struct supersede_final_action action;
+           FILE *output_file =
++#ifdef __sun__
++            strcmp(file_name, "/dev/null") == 0 ? fopen (file_name, "wb") :
++#endif
+             fopen_supersede (file_name, "wb", true, true, &action);
+           if (output_file == NULL)
+             {



Home | Main Index | Thread Index | Old Index