From owner-svn-ports-all@freebsd.org Sat May 23 09:42:43 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 1DCDE2FD0D6; Sat, 23 May 2020 09:42:43 +0000 (UTC) (envelope-from lwhsu@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 49Tdgl00kSz4dG9; Sat, 23 May 2020 09:42:43 +0000 (UTC) (envelope-from lwhsu@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 D6036DD1D; Sat, 23 May 2020 09:42:42 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04N9ggli041420; Sat, 23 May 2020 09:42:42 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04N9ggIE041419; Sat, 23 May 2020 09:42:42 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202005230942.04N9ggIE041419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Sat, 23 May 2020 09:42:42 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r536278 - in head/sysutils/apache-mesos: . files X-SVN-Group: ports-head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: in head/sysutils/apache-mesos: . files X-SVN-Commit-Revision: 536278 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.33 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: Sat, 23 May 2020 09:42:43 -0000 Author: lwhsu Date: Sat May 23 09:42:42 2020 New Revision: 536278 URL: https://svnweb.freebsd.org/changeset/ports/536278 Log: - Apply fix for memory detection from upstream PR: 246667 Submitted by: James Wright (maintainer) MFH: 2020Q2 Differential Revision: https://reviews.freebsd.org/D24967 Added: head/sysutils/apache-mesos/files/patch-3rdparty_stout_include_stout_os_freebsd.hpp (contents, props changed) Modified: head/sysutils/apache-mesos/Makefile Modified: head/sysutils/apache-mesos/Makefile ============================================================================== --- head/sysutils/apache-mesos/Makefile Sat May 23 09:32:45 2020 (r536277) +++ head/sysutils/apache-mesos/Makefile Sat May 23 09:42:42 2020 (r536278) @@ -2,7 +2,7 @@ PORTNAME= mesos PORTVERSION= 1.9.0 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= sysutils MASTER_SITES= APACHE/mesos/${PORTVERSION} PKGNAMEPREFIX= apache- Added: head/sysutils/apache-mesos/files/patch-3rdparty_stout_include_stout_os_freebsd.hpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/apache-mesos/files/patch-3rdparty_stout_include_stout_os_freebsd.hpp Sat May 23 09:42:42 2020 (r536278) @@ -0,0 +1,49 @@ +--- 3rdparty/stout/include/stout/os/freebsd.hpp.orig 2020-05-22 20:48:06 UTC ++++ 3rdparty/stout/include/stout/os/freebsd.hpp +@@ -88,18 +88,29 @@ inline Try memory() + const size_t pageSize = os::pagesize(); + + unsigned int freeCount; +- size_t length = sizeof(freeCount); +- ++ size_t freeCountLength = sizeof(freeCount); + if (sysctlbyname( +- "vm.stats.v_free_count", ++ "vm.stats.vm.v_free_count", + &freeCount, +- &length, ++ &freeCountLength, + nullptr, + 0) != 0) { + return ErrnoError(); + } +- memory.free = Bytes(freeCount * pageSize); + ++ unsigned int inactiveCount; ++ size_t inactiveCountLength = sizeof(inactiveCount); ++ if (sysctlbyname( ++ "vm.stats.vm.v_inactive_count", ++ &inactiveCount, ++ &inactiveCountLength, ++ nullptr, ++ 0) != 0) { ++ return ErrnoError(); ++ } ++ ++ memory.free = Bytes((freeCount + inactiveCount) * pageSize); ++ + int totalBlocks = 0; + int usedBlocks = 0; + +@@ -112,8 +123,9 @@ inline Try memory() + // FreeBSD supports multiple swap devices. Here we sum across all of them. + struct xswdev xswd; + size_t xswdSize = sizeof(xswd); +- int* mibDevice = &(mib[mibSize + 1]); +- for (*mibDevice = 0; ; (*mibDevice)++) { ++ for (int ndev = 0; ; ndev++) { ++ mib[mibSize] = ndev; ++ + if (::sysctl(mib, 3, &xswd, &xswdSize, nullptr, 0) != 0) { + if (errno == ENOENT) { + break;