From owner-freebsd-current@freebsd.org Sun Nov 15 20:16:00 2020 Return-Path: Delivered-To: freebsd-current@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 7BA0C467BE4 for ; Sun, 15 Nov 2020 20:16:00 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CZ3PD25bYz3Psq; Sun, 15 Nov 2020 20:15:59 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 82797885; Sun, 15 Nov 2020 15:15:58 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 15 Nov 2020 15:15:58 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddvledgudefkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpefutgho thhtucfnohhnghcuoehstghothhtlhesshgrmhhstghordhorhhgqeenucggtffrrghtth gvrhhnpeefjeeggfejhffgtdejveejkeegveeileeuheejgfduteevgfdttefggfeggfdv geenucfkphepkedrgeeirdekledrvddufeenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehstghothhtlhesshgrmhhstghordhorhhg X-ME-Proxy: Received: from [192.168.0.114] (unknown [8.46.89.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 889F53280063; Sun, 15 Nov 2020 15:15:57 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: pkg.c revision 367687 breaks pkg From: Scott Long In-Reply-To: Date: Sun, 15 Nov 2020 13:15:56 -0700 Cc: Kyle Evans , Guy Yur , freebsd-current , kaktus@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <004F3036-1481-4979-BDD2-4BA5D19194E1@samsco.org> References: <4e5fe0a6-7325-d413-f68f-2c0ebaa34763@gmail.com> To: Stefan Esser X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4CZ3PD25bYz3Psq X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2020 20:16:00 -0000 > On Nov 15, 2020, at 1:05 PM, Stefan Esser wrote: >=20 > Am 15.11.20 um 20:41 schrieb Kyle Evans: >> This is a separate (valid) problem, but not directly related to >> Scott's work here. sysctlbyname now goes directly to the kernel with >> no chance for the user.* sysctls to intercept. That should >> independently be fixed to maintain the illusion that they're real >> sysctl's. >=20 > user.localbase is a real sysctl, but with a default value returned > when sysctl(3) is used. >=20 > The getlocalbase() function should not depend on this default value, > since it contains an identicl default value that can be returned if > sysctlbyname fails (or rather returns a zero length string in case > no other value has been written to the kernel). >=20 sysctlbyname() was returning success and an empty string. = getlocalbase() has no way to know if this was intentional or not, so it can=E2=80=99t = rationally check. Switching to sysctlnametomib() + sysctl() seems to solve this problem. However, I=E2=80=99m going to revert all of this and let the experts = decide on the best path forward. Scott