pkgsrc-Bugs archive

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

pkg/42666: [PATCH] shells/bash (4.1) does not compile on DragonFly BSD



>Number:         42666
>Category:       pkg
>Synopsis:       [PATCH] shells/bash (4.1) does not compile on DragonFly BSD
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 23 12:20:00 +0000 2010
>Originator:     Rumko
>Release:        /
>Organization:
>Environment:
DragonFly rumko.rumko.net 2.5.1-DEVELOPMENT DragonFly 
v2.5.1.612.gdb42c-DEVELOPMENT #68: Mon Jan 18 13:19:58 CET 2010     
root%rumko.rumko.net@localhost:/usr/obj/usr/src/sys/MYPRECIOUS  i386
>Description:
Bash tries to access private fields of FILE, which is a no-no on DragonFly.
The previous version (4.0.x) did not try to do this, but current (4.1) version 
adds DragonFly "compatibility" in WRKSRC/lib/sh/fpurge line 56 (if __sferror is 
changed to if __sferror || _DragonFly_).
>How-To-Repeat:

>Fix:
From a58d7862862d2f60abeaa8c238993f7b15accbca Mon Sep 17 00:00:00 2001
From: Rumko <rumcic%gmail.com@localhost>
Date: Sat, 23 Jan 2010 12:53:57 +0100
Subject: [PATCH 7/7] Bash tries to access private fields of FILE which is a 
no-no.

---
 shells/bash/distinfo         |    1 +
 shells/bash/patches/patch-aa |   20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 shells/bash/patches/patch-aa

diff --git a/shells/bash/distinfo b/shells/bash/distinfo
index 421795a..1051bd5 100644
--- a/shells/bash/distinfo
+++ b/shells/bash/distinfo
@@ -3,5 +3,6 @@ $NetBSD: distinfo,v 1.19 2010/01/16 17:17:04 wiz Exp $
 SHA1 (bash-4.1.tar.gz) = 3bd1ec9c66f3689f6b3495bdaaf9077b2e5dc150
 RMD160 (bash-4.1.tar.gz) = 554c7ecb4a63da431768caed1f958c06b8fa7207
 Size (bash-4.1.tar.gz) = 6598300 bytes
+SHA1 (patch-aa) = c85a6c782c3133a42b0ca7064662b017b179dce7
 SHA1 (patch-af) = 34833c0628a60b5200a9559581c617d878eb62a8
 SHA1 (patch-ag) = 4da0a43f6b890482affff46b18eef4be67770e48
diff --git a/shells/bash/patches/patch-aa b/shells/bash/patches/patch-aa
new file mode 100644
index 0000000..1ee74ab
--- /dev/null
+++ b/shells/bash/patches/patch-aa
@@ -0,0 +1,20 @@
+--- lib/sh/fpurge.c.orig       2010-01-23 12:47:36 +0100
++++ lib/sh/fpurge.c    2010-01-23 12:48:07 +0100
+@@ -53,7 +53,7 @@
+   extern int fpurge (FILE *);
+ # endif
+   int result = fpurge (fp);
+-# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, 
DragonFly, MacOS X, Cygwin */
++# if defined __sferror /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, 
Cygwin */
+   if (result == 0)
+     /* Correct the invariants that fpurge broke.
+        <stdio.h> on BSD systems says:
+@@ -81,7 +81,7 @@
+       fp->_IO_save_base = NULL;
+     }
+   return 0;
+-# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, 
OpenBSD, DragonFly, MacOS X, Cygwin */
++# elif defined __sferror /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, 
Cygwin */
+   fp_->_p = fp_->_bf._base;
+   fp_->_r = 0;
+   fp_->_w = ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered 
and not currently reading? */
-- 
1.6.6



Home | Main Index | Thread Index | Old Index