pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/x11/libXdmcp libXdmcp: apply upstream version of SunOS...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3563416910db
branches:  trunk
changeset: 375592:3563416910db
user:      gutteridge <gutteridge%pkgsrc.org@localhost>
date:      Thu Mar 17 01:05:48 2022 +0000

description:
libXdmcp: apply upstream version of SunOS compilation fix

Patch to match what the next release will do here, in part so we don't
run the risk of merging two versions of handling the same issue on next
update. Addresses PR pkg/54628. (Compile tested on Fedora Linux and
OmniOS, but as neither of these are affected by the issue to begin
with, and not having an environment where I can reproduce it, I can't
verify the fix myself.)

diffstat:

 x11/libXdmcp/distinfo                  |   6 ++++--
 x11/libXdmcp/patches/patch-Key.c       |  23 ++++++++++++-----------
 x11/libXdmcp/patches/patch-config.h.in |  18 ++++++++++++++++++
 x11/libXdmcp/patches/patch-configure   |  20 ++++++++++++++++++++
 4 files changed, 54 insertions(+), 13 deletions(-)

diffs (95 lines):

diff -r 7e3199ce849a -r 3563416910db x11/libXdmcp/distinfo
--- a/x11/libXdmcp/distinfo     Thu Mar 17 00:19:25 2022 +0000
+++ b/x11/libXdmcp/distinfo     Thu Mar 17 01:05:48 2022 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.13 2022/02/23 03:10:26 gutteridge Exp $
+$NetBSD: distinfo,v 1.14 2022/03/17 01:05:48 gutteridge Exp $
 
 BLAKE2s (libXdmcp-1.1.3.tar.bz2) = a830d9b0484d17db15080be824ba9f9819ea08c56fe07670c2bd2e17fafc2386
 SHA512 (libXdmcp-1.1.3.tar.bz2) = cb1d4650f97d66e73acd2465ec7d757b9b797cce2f85e301860a44997a461837eea845ec9bd5b639ec5ca34c804f8bdd870697a5ce3f4e270b687c9ef74f25ec
 Size (libXdmcp-1.1.3.tar.bz2) = 332795 bytes
-SHA1 (patch-Key.c) = 1a065472f34d4d8453efce44263bd6d66a7c4d86
+SHA1 (patch-Key.c) = 4080e63823818b464718fc7c09a7c53ba350aa48
+SHA1 (patch-config.h.in) = 0470c2eaa4e431027e1507c5b01367ca2267b0ec
+SHA1 (patch-configure) = 803ae824fcc3e281dde6fc1b3b5b65975ca0b051
diff -r 7e3199ce849a -r 3563416910db x11/libXdmcp/patches/patch-Key.c
--- a/x11/libXdmcp/patches/patch-Key.c  Thu Mar 17 00:19:25 2022 +0000
+++ b/x11/libXdmcp/patches/patch-Key.c  Thu Mar 17 01:05:48 2022 +0000
@@ -1,19 +1,20 @@
-$NetBSD: patch-Key.c,v 1.3 2022/02/23 03:10:26 gutteridge Exp $
+$NetBSD: patch-Key.c,v 1.4 2022/03/17 01:05:48 gutteridge Exp $
 
 Fix builds where getentropy() exists but arc4random_buf() does not, as
-reported to be the case with Solaris 11.3 in PR pkg/54628.
+the case with Solaris 11.3, reported in PR pkg/54628.
+https://gitlab.freedesktop.org/xorg/lib/libxdmcp/-/commit/4a71fdf6d34df67d3f1335590da6ae3050128fb2
 
 --- Key.c.orig 2019-03-16 16:21:22.000000000 +0000
 +++ Key.c
-@@ -82,6 +82,11 @@ arc4random_buf (void *auth, int len)
-     int           ret;
+@@ -64,6 +64,11 @@ getbits (long data, unsigned char *dst)
+ 
+ #ifndef HAVE_ARC4RANDOM_BUF
  
- #if HAVE_GETENTROPY
-+
-+#ifdef __sun
-+#include <sys/random.h>
++/* Solaris 11.3.0 - 11.4.15 only define getentropy() in <sys/random.h> */
++#if HAVE_GETENTROPY && HAVE_SYS_RANDOM_H
++# include <sys/random.h>
 +#endif
 +
-     /* weak emulation of arc4random through the getentropy libc call */
-     ret = getentropy (auth, len);
-     if (ret == 0)
+ static void
+ insecure_getrandom_buf (unsigned char *auth, int len)
+ {
diff -r 7e3199ce849a -r 3563416910db x11/libXdmcp/patches/patch-config.h.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/libXdmcp/patches/patch-config.h.in    Thu Mar 17 01:05:48 2022 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-config.h.in,v 1.1 2022/03/17 01:05:48 gutteridge Exp $
+
+Fix builds where getentropy() exists but arc4random_buf() does not, as
+the case with Solaris 11.3, reported in PR pkg/54628.
+https://gitlab.freedesktop.org/xorg/lib/libxdmcp/-/commit/4a71fdf6d34df67d3f1335590da6ae3050128fb2
+
+--- config.h.in.orig   2019-03-16 16:21:32.000000000 +0000
++++ config.h.in
+@@ -42,6 +42,9 @@
+ /* Define to 1 if you have the <string.h> header file. */
+ #undef HAVE_STRING_H
+ 
++/* Define to 1 if you have the <sys/random.h> header file. */
++#undef HAVE_SYS_RANDOM_H
++
+ /* Define to 1 if you have the <sys/stat.h> header file. */
+ #undef HAVE_SYS_STAT_H
+ 
diff -r 7e3199ce849a -r 3563416910db x11/libXdmcp/patches/patch-configure
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/libXdmcp/patches/patch-configure      Thu Mar 17 01:05:48 2022 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-configure,v 1.1 2022/03/17 01:05:48 gutteridge Exp $
+
+Fix builds where getentropy() exists but arc4random_buf() does not, as
+the case with Solaris 11.3, reported in PR pkg/54628.
+https://gitlab.freedesktop.org/xorg/lib/libxdmcp/-/commit/4a71fdf6d34df67d3f1335590da6ae3050128fb2
+
+--- configure.orig     2019-03-16 16:21:31.000000000 +0000
++++ configure
+@@ -19342,6 +19342,11 @@ else
+ $as_echo "no, using $LN_S" >&6; }
+ fi
+ 
++# Checks for header files.
++ac_fn_c_check_header_compile "$LINENO" "sys/random.h" "ac_cv_header_sys_random_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_random_h" = xyes; then :
++  printf "%s\n" "#define HAVE_SYS_RANDOM_H 1" >>confdefs.h
++fi
+ 
+ # Checks for libraries.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing recvfrom" >&5



Home | Main Index | Thread Index | Old Index