git: 54b26298c822 - main - sysutils/e2fsprogs: port rework

Baptiste Daroussin bapt at FreeBSD.org
Sat Aug 7 06:41:33 UTC 2021


6 août 2021 23:26:18 Matthias Andree <mandree at FreeBSD.org>:

> Am 06.08.21 um 22:58 schrieb Baptiste Daroussin:
>>
>> 4 août 2021 23:23:27 Matthias Andree <mandree at FreeBSD.org>:
>>
>>> The branch main has been updated by mandree:
>>>
>>> URL: https://cgit.FreeBSD.org/ports/commit/?id=54b26298c82275501e6dcc6c733d21c0a6bf0d9f
>>>
>>> commit 54b26298c82275501e6dcc6c733d21c0a6bf0d9f
>>> Author:     Matthias Andree <mandree at FreeBSD.org>
>>> AuthorDate: 2021-08-04 20:09:19 +0000
>>> Commit:     Matthias Andree <mandree at FreeBSD.org>
>>> 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.

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.  I've
> removed the replace-by-hardlinks stuff from pkg-install.
>

I am questionning the need to do it since the beginning this is this need which 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 fsck on ext2fs, it can only be blocked if the root fs is on ext2 which make no 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 try.

No, pkg would have killed it because it becomes the reaper when executing scripts and kills all its child exactly to prevent such things.

Bapt


More information about the dev-commits-ports-main mailing list