pkgsrc-Changes archive

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

CVS commit: pkgsrc/x11/libXdmcp



Module Name:    pkgsrc
Committed By:   gutteridge
Date:           Thu Mar 17 01:05:48 UTC 2022

Modified Files:
        pkgsrc/x11/libXdmcp: distinfo
        pkgsrc/x11/libXdmcp/patches: patch-Key.c
Added Files:
        pkgsrc/x11/libXdmcp/patches: patch-config.h.in patch-configure

Log Message:
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.)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/x11/libXdmcp/distinfo
cvs rdiff -u -r1.3 -r1.4 pkgsrc/x11/libXdmcp/patches/patch-Key.c
cvs rdiff -u -r0 -r1.1 pkgsrc/x11/libXdmcp/patches/patch-config.h.in \
    pkgsrc/x11/libXdmcp/patches/patch-configure

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/x11/libXdmcp/distinfo
diff -u pkgsrc/x11/libXdmcp/distinfo:1.13 pkgsrc/x11/libXdmcp/distinfo:1.14
--- pkgsrc/x11/libXdmcp/distinfo:1.13   Wed Feb 23 03:10:26 2022
+++ pkgsrc/x11/libXdmcp/distinfo        Thu Mar 17 01:05:48 2022
@@ -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

Index: pkgsrc/x11/libXdmcp/patches/patch-Key.c
diff -u pkgsrc/x11/libXdmcp/patches/patch-Key.c:1.3 pkgsrc/x11/libXdmcp/patches/patch-Key.c:1.4
--- pkgsrc/x11/libXdmcp/patches/patch-Key.c:1.3 Wed Feb 23 03:10:26 2022
+++ pkgsrc/x11/libXdmcp/patches/patch-Key.c     Thu Mar 17 01:05:48 2022
@@ -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)
  
- #if HAVE_GETENTROPY
-+
-+#ifdef __sun
-+#include <sys/random.h>
+ #ifndef HAVE_ARC4RANDOM_BUF
+ 
++/* 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)
+ {

Added files:

Index: pkgsrc/x11/libXdmcp/patches/patch-config.h.in
diff -u /dev/null pkgsrc/x11/libXdmcp/patches/patch-config.h.in:1.1
--- /dev/null   Thu Mar 17 01:05:48 2022
+++ pkgsrc/x11/libXdmcp/patches/patch-config.h.in       Thu Mar 17 01:05:48 2022
@@ -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
+ 
Index: pkgsrc/x11/libXdmcp/patches/patch-configure
diff -u /dev/null pkgsrc/x11/libXdmcp/patches/patch-configure:1.1
--- /dev/null   Thu Mar 17 01:05:48 2022
+++ pkgsrc/x11/libXdmcp/patches/patch-configure Thu Mar 17 01:05:48 2022
@@ -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