Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jan 2020 11:53:08 +0000 (UTC)
From:      Niclas Zeising <zeising@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r524473 - in head/graphics/wayland: . files
Message-ID:  <202001281153.00SBr8bJ081534@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: zeising
Date: Tue Jan 28 11:53:07 2020
New Revision: 524473
URL: https://svnweb.freebsd.org/changeset/ports/524473

Log:
  graphics/wayland: Update to 1.17
  
  Update graphics/wayland to 1.17 [1]
  Add a patch to use shm_anon instead of posix_fallocate(), as the latter
  doesn't work on ZFS.  [2]
  
  PR:		237650 [1], 224226 [2]
  Submitted by:	jbeich [1], jbeich and Greg V [2] (original version)
  Reviewed by:	Greg V, manu
  Differential Revision:	https://reviews.freebsd.org/D20099

Added:
  head/graphics/wayland/files/patch-cursor_os-compatibility.c   (contents, props changed)
Deleted:
  head/graphics/wayland/files/patch-tests_sanity-test.c
Modified:
  head/graphics/wayland/Makefile
  head/graphics/wayland/distinfo
  head/graphics/wayland/files/patch-Makefile.am
  head/graphics/wayland/files/patch-tests_test-runner.c

Modified: head/graphics/wayland/Makefile
==============================================================================
--- head/graphics/wayland/Makefile	Tue Jan 28 11:20:40 2020	(r524472)
+++ head/graphics/wayland/Makefile	Tue Jan 28 11:53:07 2020	(r524473)
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	wayland
-PORTVERSION=	1.16.0
-PORTREVISION=	1
+PORTVERSION=	1.17.0
 CATEGORIES=	graphics wayland
 MASTER_SITES=	https://wayland.freedesktop.org/releases/
 

Modified: head/graphics/wayland/distinfo
==============================================================================
--- head/graphics/wayland/distinfo	Tue Jan 28 11:20:40 2020	(r524472)
+++ head/graphics/wayland/distinfo	Tue Jan 28 11:53:07 2020	(r524473)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1539381179
-SHA256 (wayland-1.16.0.tar.xz) = 4e72c2b56109ccfb6610d776e465f4ca0af2280c9c2f7d5cc23f0ed2548752f5
-SIZE (wayland-1.16.0.tar.xz) = 435216
+TIMESTAMP = 1553129725
+SHA256 (wayland-1.17.0.tar.xz) = 72aa11b8ac6e22f4777302c9251e8fec7655dc22f9d94ee676c6b276f95f91a4
+SIZE (wayland-1.17.0.tar.xz) = 437680

Modified: head/graphics/wayland/files/patch-Makefile.am
==============================================================================
--- head/graphics/wayland/files/patch-Makefile.am	Tue Jan 28 11:20:40 2020	(r524472)
+++ head/graphics/wayland/files/patch-Makefile.am	Tue Jan 28 11:53:07 2020	(r524473)
@@ -1,4 +1,4 @@
---- Makefile.am.orig	2018-04-10 14:53:32 UTC
+--- Makefile.am.orig	2019-03-21 00:55:25 UTC
 +++ Makefile.am
 @@ -71,7 +71,7 @@ nodist_include_HEADERS =			\
  	protocol/wayland-client-protocol.h
@@ -18,12 +18,12 @@
  libwayland_client_la_LDFLAGS = -version-info 3:0:3
  libwayland_client_la_SOURCES =			\
  	src/wayland-client.c
-@@ -223,7 +223,7 @@ libtest_runner_la_LIBADD =			\
- 	libwayland-util.la			\
+@@ -227,7 +227,7 @@ libtest_runner_la_LIBADD =			\
  	libwayland-client.la			\
  	libwayland-server.la			\
+ 	libtest-helpers.la			\
 -	-lrt -ldl $(FFI_LIBS)
 +	-lrt $(DL_LIBS) $(FFI_LIBS) $(EPOLLSHIM_LIBS)
  
- 
  array_test_SOURCES = tests/array-test.c
+ array_test_LDADD = libtest-runner.la

Added: head/graphics/wayland/files/patch-cursor_os-compatibility.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/wayland/files/patch-cursor_os-compatibility.c	Tue Jan 28 11:53:07 2020	(r524473)
@@ -0,0 +1,60 @@
+--- cursor/os-compatibility.c.orig	2019-03-21 00:55:25 UTC
++++ cursor/os-compatibility.c
+@@ -23,6 +23,10 @@
+  * SOFTWARE.
+  */
+ 
++#ifdef __FreeBSD__
++#include <sys/mman.h>
++#endif
++
+ #define _GNU_SOURCE
+ 
+ #include <sys/types.h>
+@@ -59,6 +63,7 @@ err:
+ }
+ #endif
+ 
++#ifndef __FreeBSD__
+ static int
+ create_tmpfile_cloexec(char *tmpname)
+ {
+@@ -78,6 +83,7 @@ create_tmpfile_cloexec(char *tmpname)
+ 
+ 	return fd;
+ }
++#endif
+ 
+ /*
+  * Create a new, unique, anonymous file of the given size, and
+@@ -103,11 +109,14 @@ create_tmpfile_cloexec(char *tmpname)
+ int
+ os_create_anonymous_file(off_t size)
+ {
++	int fd;
++	int ret;
++#ifdef __FreeBSD__
++	fd = shm_open(SHM_ANON, O_CREAT | O_RDWR | O_CLOEXEC, 0600); // shm_open is always CLOEXEC
++#else
+ 	static const char template[] = "/wayland-cursor-shared-XXXXXX";
+ 	const char *path;
+ 	char *name;
+-	int fd;
+-	int ret;
+ 
+ 	path = getenv("XDG_RUNTIME_DIR");
+ 	if (!path) {
+@@ -125,11 +134,12 @@ os_create_anonymous_file(off_t size)
+ 	fd = create_tmpfile_cloexec(name);
+ 
+ 	free(name);
++#endif /* __FreeBSD__ */
+ 
+ 	if (fd < 0)
+ 		return -1;
+ 
+-#ifdef HAVE_POSIX_FALLOCATE
++#if defined(HAVE_POSIX_FALLOCATE) && !defined(__FreeBSD__)
+ 	ret = posix_fallocate(fd, 0, size);
+ 	if (ret != 0) {
+ 		close(fd);

Modified: head/graphics/wayland/files/patch-tests_test-runner.c
==============================================================================
--- head/graphics/wayland/files/patch-tests_test-runner.c	Tue Jan 28 11:20:40 2020	(r524472)
+++ head/graphics/wayland/files/patch-tests_test-runner.c	Tue Jan 28 11:53:07 2020	(r524473)
@@ -1,4 +1,4 @@
---- tests/test-runner.c.orig	2018-08-24 18:04:36 UTC
+--- tests/test-runner.c.orig	2019-03-21 00:55:25 UTC
 +++ tests/test-runner.c
 @@ -25,6 +25,12 @@
  
@@ -13,7 +13,7 @@
  #include <unistd.h>
  #include <stdio.h>
  #include <stdlib.h>
-@@ -37,19 +43,36 @@
+@@ -37,13 +43,23 @@
  #include <errno.h>
  #include <limits.h>
  #include <sys/ptrace.h>
@@ -27,19 +27,6 @@
  
  #include "test-runner.h"
  
- static int num_alloc;
-+
-+extern const struct test __start_test_section, __stop_test_section;
-+
-+/* This is all disabled for FreeBSD because it gives "can't allocate initial
-+ * thread" aborts otherwise. */
-+#ifndef __FreeBSD__
- static void* (*sys_malloc)(size_t);
- static void (*sys_free)(void*);
- static void* (*sys_realloc)(void*, size_t);
- static void* (*sys_calloc)(size_t, size_t);
-+#endif
- 
 +#ifdef __FreeBSD__
 +/* XXX review ptrace() usage */
 +#define PTRACE_ATTACH PT_ATTACH
@@ -47,10 +34,10 @@
 +#define PTRACE_DETACH PT_DETACH
 +#endif
 +
- /* when set to 1, check if tests are not leaking memory and opened files.
+ /* when set to 1, check if tests are not leaking opened files.
   * It is turned on by default. It can be turned off by
   * WAYLAND_TEST_NO_LEAK_CHECK environment variable. */
-@@ -57,7 +80,7 @@ int leak_check_enabled;
+@@ -51,7 +67,7 @@ int fd_leak_check_enabled;
  
  /* when this var is set to 0, every call to test_set_timeout() is
   * suppressed - handy when debugging the test. Can be set by
@@ -59,23 +46,7 @@
  static int timeouts_enabled = 1;
  
  /* set to one if the output goes to the terminal */
-@@ -65,6 +88,7 @@ static int is_atty = 0;
- 
- extern const struct test __start_test_section, __stop_test_section;
- 
-+#ifndef __FreeBSD__
- __attribute__ ((visibility("default"))) void *
- malloc(size_t size)
- {
-@@ -98,6 +122,7 @@ calloc(size_t nmemb, size_t size)
- 
- 	return sys_calloc(nmemb, size);
- }
-+#endif
- 
- static const struct test *
- find_test(const char *name)
-@@ -292,6 +317,8 @@ is_debugger_attached(void)
+@@ -239,6 +255,8 @@ is_debugger_attached(void)
  		return 0;
  	}
  
@@ -84,7 +55,7 @@
  	pid = fork();
  	if (pid == -1) {
  		perror("fork");
-@@ -312,13 +339,14 @@ is_debugger_attached(void)
+@@ -259,13 +277,14 @@ is_debugger_attached(void)
  			_exit(1);
  		if (!waitpid(-1, NULL, 0))
  			_exit(1);
@@ -100,7 +71,7 @@
  		rc = prctl(PR_SET_PTRACER, pid);
  		if (rc != 0 && errno != EINVAL) {
  			/* An error prevents us from telling if a debugger is attached.
-@@ -328,7 +356,9 @@ is_debugger_attached(void)
+@@ -275,7 +294,9 @@ is_debugger_attached(void)
  			 */
  			perror("prctl");
  			write(pipefd[1], "-", 1);
@@ -111,7 +82,7 @@
  			/* Signal to client that parent is ready by passing '+' */
  			write(pipefd[1], "+", 1);
  		}
-@@ -346,17 +376,19 @@ int main(int argc, char *argv[])
+@@ -293,7 +314,11 @@ int main(int argc, char *argv[])
  	const struct test *t;
  	pid_t pid;
  	int total, pass;
@@ -121,38 +92,9 @@
 +	int status;
 +#endif
  
-+#ifndef __FreeBSD__
- 	/* Load system malloc, free, and realloc */
- 	sys_calloc = dlsym(RTLD_NEXT, "calloc");
- 	sys_realloc = dlsym(RTLD_NEXT, "realloc");
- 	sys_malloc = dlsym(RTLD_NEXT, "malloc");
- 	sys_free = dlsym(RTLD_NEXT, "free");
- 
--	if (isatty(fileno(stderr)))
--		is_atty = 1;
--
- 	if (is_debugger_attached()) {
- 		leak_check_enabled = 0;
- 		timeouts_enabled = 0;
-@@ -364,7 +396,17 @@ int main(int argc, char *argv[])
- 		leak_check_enabled = !getenv("WAYLAND_TEST_NO_LEAK_CHECK");
- 		timeouts_enabled = !getenv("WAYLAND_TEST_NO_TIMEOUTS");
- 	}
-+#else
-+	/* Disable leak checking on FreeBSD since we can't override malloc().  */
-+	leak_check_enabled = 0;
-+	/* XXX review later */
-+	timeouts_enabled = 0;
-+#endif
- 
-+	if (isatty(fileno(stderr)))
-+		is_atty = 1;
-+
-+
- 	if (argc == 2 && strcmp(argv[1], "--help") == 0)
- 		usage(argv[0], EXIT_SUCCESS);
- 
-@@ -395,7 +437,8 @@ int main(int argc, char *argv[])
+ 	if (isatty(fileno(stderr)))
+ 		is_atty = 1;
+@@ -336,7 +361,8 @@ int main(int argc, char *argv[])
  		if (pid == 0)
  			run_test(t); /* never returns */
  
@@ -162,7 +104,7 @@
  			stderr_set_color(RED);
  			fprintf(stderr, "waitid failed: %m\n");
  			stderr_reset_color();
-@@ -426,6 +469,25 @@ int main(int argc, char *argv[])
+@@ -367,6 +393,25 @@ int main(int argc, char *argv[])
  
  			break;
  		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001281153.00SBr8bJ081534>