Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Aug 2021 06:41:30 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Matthias Andree <mandree@FreeBSD.org>
Cc:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   Re: git: 54b26298c822 - main - sysutils/e2fsprogs: port rework
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>

next in thread | previous in thread | raw e-mail | index | archive | help

6 ao=C3=BBt 2021 23:26:18 Matthias Andree <mandree@FreeBSD.org>:

> Am 06.08.21 um 22:58 schrieb Baptiste Daroussin:
>>
>> 4 ao=C3=BBt 2021 23:23:27 Matthias Andree <mandree@FreeBSD.org>:
>>
>>> 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 <mandree@FreeBSD.org>
>>> AuthorDate: 2021-08-04 20:09:19 +0000
>>> Commit:=C2=A0=C2=A0=C2=A0=C2=A0 Matthias Andree <mandree@FreeBSD.org>
>>> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?90ce366f-fc72-4a74-81c6-4f23907c3f7d>