From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 85F6C139694 for ; Fri, 24 Mar 2017 10:23:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DB07A21C088; Fri, 24 Mar 2017 10:23:41 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8CD8221C054 for ; Fri, 24 Mar 2017 10:23:41 +0000 (UTC) Received: from localhost (unknown [IPv6:2a01:e34:eeaa:6bd0:4ecc:6aff:fe03:1cfc]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: aballier) by smtp.gentoo.org (Postfix) with ESMTPSA id C653134165D for ; Fri, 24 Mar 2017 10:23:39 +0000 (UTC) Date: Fri, 24 Mar 2017 11:23:33 +0100 From: Alexis Ballier To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Re: [PATCH] sys-devel/autoconf: Convert from eblits into an eclass, #586424 Message-ID: <20170324112333.47c918d9@gentoo.org> In-Reply-To: <20170323214541.78eff3c1@snowblower> References: <20170316093806.31977-1-mgorny@gentoo.org> <20170320083544.GZ24205@vapier> <2240597.YoP4Ev77Vx@porto> <1652433.oqbzW57v8l@porto> <20170323105101.0f622f66@gentoo.org> <1490288005.1534.1.camel@gentoo.org> <20170323195213.406ba9f8@gentoo.org> <1490295612.1534.3.camel@gentoo.org> <20170323212254.1bb17f3d@gentoo.org> <20170323203040.598f6278@snowblower> <20170323223749.71de6c09@gentoo.org> <20170323214541.78eff3c1@snowblower> Organization: Gentoo X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: ce731b37-b902-431a-9857-43b5b39c39cb X-Archives-Hash: 60914c580bfdf37220265ef0dd847d00 On Thu, 23 Mar 2017 21:45:41 +0000 Ciaran McCreesh wrote: [...] > > after a few dozens of emails, what i understand of the issue is: > > autoconf assumes either the eblit stuff is in the environment, or > > FILESDIR variable is empty or points to its files dir; this might be > > borderline but definitely not hostile. > > No, the issue is that eblits are a dodgy mechanism that go beyond what > ebuilds are supposed to do and that cause problems for package > manglers. When we're working with a general purpose shell underneath, > it's very hard to write a specification that can preemptively forbid > every kind of perverse mess any developer can come up with, > particularly when the developer starts looking for loopholes like > claiming it's OK to try to access a directory which is defined as > potentially not existing when the clear intent of the specification is > that "the directory isn't guaranteed to be there so don't try to use > it for anything". What, exactly, is causing problems then ? I'd really like to understand, because so far I've only seen blatant argument-less refusals of anything coming close to eblits based on some subjective code beauty standard. I reiterate: An eblit loading eclass wouldn't access anything in global scope and use FILESDIR the same way things like eapply do, which whatever the spec might say I think is safe to assume is the proper intent. As for preemptively forbidding everything, well, that's the same issue as with anything being expressive enough: Best you can do is provide an api and laugh when people shoot themselves in the feet. But you have to maintain said API, or make a new revision of it to change it. Do we have any (non artificial) implementation that implements this differently ? Either FILESDIR is empty or points to a non-existent directory (binpkgs, no files/ subdir) either it points to the packages files directory consistently. The latter always holds when package has a files/ subdir and before sourcing the ebuild for running any src_* phase. If there is, then we do indeed have an issue, if there is not, then maybe it's more pragmatic to stop adding arbitrary and useless restrictions to the spec. Also, note that I do consider that pushing patches into portage setting FILESDIR to some location under /var/tmp/portage and playing with symlinks to make it point to something valid or not is also trying to find loopholes in the spec: The spec says the variable is consistent but not what it points to ? For a read-only input ? Really ? > > this breaks in the (hypothetical?) case where the package is > > installed from a binpkg *and* the binpkg format does not include > > the whole environment but rather a verbatim copy of the ebuild and > > its eclasses(*). > > > > (*) not sure how that can even work with env saving between phases > > but that's not the point > > It can't, so that weird hypothetical is irrelevant. But more to the > point, we're only wondering about these weird hypothetical situations > because someone felt the need to make everyone's life a misery by > putting some special snowflake code in the tree. It's a misery only if you look at it :) autoconf is insignificant here, but I'm very happy not having to maintain the libc, I'm very happy the maintainer does it the way that pleases him as long as this does not cause breakages (or when it does it gets fixed, bugs happen), and more importantly I won't force my style nor beauty standards upon him.