From owner-dev-commits-ports-main@freebsd.org Fri Aug 6 21:26:17 2021 Return-Path: Delivered-To: dev-commits-ports-main@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 7BBE065F521; Fri, 6 Aug 2021 21:26:17 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GhJST2sY5z3RK0; Fri, 6 Aug 2021 21:26:17 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from mandree.no-ip.org (pd9e0705c.dip0.t-ipconnect.de [217.224.112.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: mandree/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 2B54121422; Fri, 6 Aug 2021 21:26:17 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from ryzen.an3e.de (localhost [IPv6:::1]) by ryzen.an3e.de (Postfix) with ESMTP id D04AB122F2F; Fri, 6 Aug 2021 23:26:14 +0200 (CEST) To: Baptiste Daroussin Cc: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org References: <202108042123.174LNOj4042456@gitrepo.freebsd.org> <93738b88-4f35-4e56-b220-25026f9cd62f@FreeBSD.org> From: Matthias Andree Subject: Re: git: 54b26298c822 - main - sysutils/e2fsprogs: port rework Message-ID: <5a41362f-7d8c-695f-c851-027e0996a8c2@FreeBSD.org> Date: Fri, 6 Aug 2021 23:26:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <93738b88-4f35-4e56-b220-25026f9cd62f@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Aug 2021 21:26:17 -0000 Am 06.08.21 um 22:58 schrieb Baptiste Daroussin: > > 4 août 2021 23:23:27 Matthias Andree : > >> The branch main has been updated by mandree: >> >> URL: https://cgit.FreeBSD.org/ports/commit/?id=54b26298c82275501e6dcc6c733d21c0a6bf0d9f >> >> commit 54b26298c82275501e6dcc6c733d21c0a6bf0d9f >> Author:     Matthias Andree >> AuthorDate: 2021-08-04 20:09:19 +0000 >> Commit:     Matthias Andree >> CommitDate: 2021-08-04 21:23:08 +0000 >> >>     sysutils/e2fsprogs: port rework >>     >>     1 - sysutils/e2fsprogs: fix checksum mismatches >>     >>         e2fsprogs has replaced symlinks by hardlinks in its post-install if >>         /sbin and ${PREFIX}/sbin were on the same file system, and unless >>         script processing was defeated on install or upgrade. >>     >>         Leave symlinks in place to avoid checksum mismatches. >>     >>     PR:             252184 [1] > > We already discuss this, the problem here is what this package is doing, installing in base is a violation of the ports tree rules in 99% of the case if not 100%. The purpose of this installation of hardlinksto only support a case which is known not to be functionnal: using e2fs family as a root filesystem for freebsd is a bad reason to do it. Either install everything in base or in localbase but do not do both. > > Running pkg check -r is even worse. > 1/ i am not sure it works are both pkg install and pkg check will attempt to get an exclusive lock o' the db > 2/ by design is defeats the principle why we are having checksums on pkg Baptiste, you need to read and understand the whole of the two commits before you comment. * pkg seems to lack, or I am unaware, of a way to modify the install before recording files and checksums. * The current commit to e2fsprogs forgoes the need to do just that, the price we pay is "absolute symlinks" from $PREFIX/sbin to /sbin. I've removed the replace-by-hardlinks stuff from pkg-install. * installing into /sbin and $PREFIX/... at the same time is something that the port has been doing for ages, but feel free to send me a patch for review that splits it into one e2fsprogs port that installs only into / [/sbin] and RUN_DEPENDS on a separate e2fsprogs-bin port, or we can revisit this once we have subpackages and pkg grows a hardlink-or-copy or a hardlink-or-symlink feature that does not cause apparent checksum mismatches in the database. * as long as the kernel supports ext2fs we need to be able to fsck so we don't create circular dependencies that wedge the boot process. * e2fsck and fsck_ext2fs are linked semi-statically, in order to only require /lib but not $PREFIX/lib, for use from /sbin. * pkg check -r is not applied in the current state, and the port installs symlinks from $PREFIX/sbin to /sbin. * the current flavours address the installation matters, there is a flavor that leaves the root fs alone. And for the pkg matter: * you can't run pkg check from within a post-install shell script. Haven't tried Lua. For shell scripts, I explored stuffing a script into at(1) which worked with an up-to-5 minute delay to recalculate checksums, daemon(8) would probably have been another option I did not try. Finally, function overrules beauty. I will not pollute outside hier(7) just because someone wants either-or beyond the bare necessities to fsck from /etc/fstab on boot. Regards, Matthias