From owner-svn-ports-all@freebsd.org Thu Nov 5 18:20:06 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D0DE846DCF8; Thu, 5 Nov 2020 18:20:06 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRsJ65ZGPz3Fgq; Thu, 5 Nov 2020 18:20:06 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B0BFC17DE7; Thu, 5 Nov 2020 18:20:06 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5IK6Uo055560; Thu, 5 Nov 2020 18:20:06 GMT (envelope-from tcberner@FreeBSD.org) Received: (from tcberner@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5IK6Pe055558; Thu, 5 Nov 2020 18:20:06 GMT (envelope-from tcberner@FreeBSD.org) Message-Id: <202011051820.0A5IK6Pe055558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tcberner set sender to tcberner@FreeBSD.org using -f From: "Tobias C. Berner" Date: Thu, 5 Nov 2020 18:20:06 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r554147 - in head/www/epiphany: . files X-SVN-Group: ports-head X-SVN-Commit-Author: tcberner X-SVN-Commit-Paths: in head/www/epiphany: . files X-SVN-Commit-Revision: 554147 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 18:20:06 -0000 Author: tcberner Date: Thu Nov 5 18:20:05 2020 New Revision: 554147 URL: https://svnweb.freebsd.org/changeset/ports/554147 Log: www/epiphany: build error (no getrandom(2) on 11.x) Add alternate implementation for missing getrandom(2) on 11.x (v2) PR: 250128 Submitted by: John Hein Added: head/www/epiphany/files/extra-patch-lib_ephy-sync-utils.c (contents, props changed) Modified: head/www/epiphany/Makefile Modified: head/www/epiphany/Makefile ============================================================================== --- head/www/epiphany/Makefile Thu Nov 5 17:52:35 2020 (r554146) +++ head/www/epiphany/Makefile Thu Nov 5 18:20:05 2020 (r554147) @@ -41,6 +41,7 @@ PORTSCOUT= limitw:1,even USES= compiler:c++11-lib cpe desktop-file-utils gettext gnome \ localbase:ldflags meson pkgconfig python:3.4+ shebangfix \ sqlite tar:xz xorg + CPE_VENDOR= gnome USE_GNOME= cairo gnomedesktop3 intlhack libwnck3 libxml2 libxslt USE_XORG= x11 @@ -55,4 +56,10 @@ SHEBANG_FILES= post_install.py PLIST_SUB+= EPHY_VERSION=${PORTVERSION:R} -.include +.include + +.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1200000 +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-lib_ephy-sync-utils.c +.endif + +.include Added: head/www/epiphany/files/extra-patch-lib_ephy-sync-utils.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/epiphany/files/extra-patch-lib_ephy-sync-utils.c Thu Nov 5 18:20:05 2020 (r554147) @@ -0,0 +1,27 @@ +11.x does not have getrandom(2) (or getentropy(3)) + +--- lib/ephy-sync-utils.c.orig 2020-10-04 22:15:55 UTC ++++ lib/ephy-sync-utils.c +@@ -24,6 +24,7 @@ + #include "ephy-settings.h" + + #include ++#include + #include + #include + #include +@@ -189,7 +190,13 @@ ephy_sync_utils_generate_random_bytes (v + } + #else + do { +- ret = getrandom (out, num_bytes, 0); ++ int fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC); ++ if (fd != -1) { ++ ret = read(fd, out, num_bytes); ++ (void)close(fd); ++ } ++ else ++ g_error ("Failed to open /dev/urandom to generate randomness: %s", g_strerror (errno)); + } while (ret < (gssize)num_bytes && errno == EINTR); + + if (ret != (gssize)num_bytes)