From owner-dev-commits-ports-main@freebsd.org Sat Aug 7 06:41:33 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 2980D665AE8; Sat, 7 Aug 2021 06:41:33 +0000 (UTC) (envelope-from bapt@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 4GhXn90G1Sz4l0y; Sat, 7 Aug 2021 06:41:33 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from aniel.nours.eu (nours.eu [IPv6:2001:41d0:8:3a4d::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id B67332585A; Sat, 7 Aug 2021 06:41:32 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from dummy.faircode.eu (mes17-1-78-222-128-87.fbx.proxad.net [78.222.128.87]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aniel.nours.eu (Postfix) with ESMTPSA id 199A36D413; Sat, 7 Aug 2021 08:41:31 +0200 (CEST) Date: Sat, 7 Aug 2021 06:41:30 +0000 (UTC) From: Baptiste Daroussin To: Matthias Andree Cc: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Message-ID: <90ce366f-fc72-4a74-81c6-4f23907c3f7d@FreeBSD.org> In-Reply-To: <5a41362f-7d8c-695f-c851-027e0996a8c2@FreeBSD.org> References: <202108042123.174LNOj4042456@gitrepo.freebsd.org> <93738b88-4f35-4e56-b220-25026f9cd62f@FreeBSD.org> <5a41362f-7d8c-695f-c851-027e0996a8c2@FreeBSD.org> Subject: Re: git: 54b26298c822 - main - sysutils/e2fsprogs: port rework MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Correlation-ID: <90ce366f-fc72-4a74-81c6-4f23907c3f7d@FreeBSD.org> 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: Sat, 07 Aug 2021 06:41:33 -0000 6 ao=C3=BBt 2021 23:26:18 Matthias Andree : > Am 06.08.21 um 22:58 schrieb Baptiste Daroussin: >> >> 4 ao=C3=BBt 2021 23:23:27 Matthias Andree : >> >>> The branch main has been updated by mandree: >>> >>> URL: https://cgit.FreeBSD.org/ports/commit/?id=3D54b26298c82275501e6dcc= 6c733d21c0a6bf0d9f >>> >>> commit 54b26298c82275501e6dcc6c733d21c0a6bf0d9f >>> Author:=C2=A0=C2=A0=C2=A0=C2=A0 Matthias Andree >>> AuthorDate: 2021-08-04 20:09:19 +0000 >>> Commit:=C2=A0=C2=A0=C2=A0=C2=A0 Matthias Andree >>> CommitDate: 2021-08-04 21:23:08 +0000 >>> >>> =C2=A0=C2=A0=C2=A0 sysutils/e2fsprogs: port rework >>> =C2=A0=C2=A0=C2=A0 >>> =C2=A0=C2=A0=C2=A0 1 - sysutils/e2fsprogs: fix checksum mismatches >>> =C2=A0=C2=A0=C2=A0 >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 e2fsprogs has replaced symli= nks by hardlinks in its post-install if >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /sbin and ${PREFIX}/sbin wer= e on the same file system, and unless >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 script processing was defeat= ed on install or upgrade. >>> =C2=A0=C2=A0=C2=A0 >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Leave symlinks in place to a= void checksum mismatches. >>> =C2=A0=C2=A0=C2=A0 >>> =C2=A0=C2=A0=C2=A0 PR:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 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 ca= se if not 100%. The purpose of this installation of hardlinksto only suppor= t 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 attemp= t 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. Because this is not how packaging is supposed to work in the first place! > > * The current commit to e2fsprogs forgoes the need to do just that, the > price we pay is "absolute symlinks" from $PREFIX/sbin to /sbin.=C2=A0 I'v= e > removed the replace-by-hardlinks stuff from pkg-install. > I am questionning the need to do it since the beginning this is this need w= hich is the problem > * 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. There is no such circular dependency, the boot will never get blocked on fs= ck on ext2fs, it can only be blocked if the root fs is on ext2 which make n= o sense on freebsd. None of the other filesystem tools are doing that! > > * e2fsck and fsck_ext2fs are linked semi-statically, in order to only > require /lib but not $PREFIX/lib, for use from /sbin. See above, not useful on freebsd > > * 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 At works but it is ugly > checksums, daemon(8) would probably have been another option I did not tr= y. No, pkg would have killed it because it becomes the reaper when executing s= cripts and kills all its child exactly to prevent such things. Bapt