Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Aug 2021 10:28:02 +0200
From:      Matthias Andree <mandree@FreeBSD.org>
To:        Baptiste Daroussin <bapt@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:  <7ab4796b-9694-4865-9fe9-c5343fa8c29a@FreeBSD.org>
In-Reply-To: <90ce366f-fc72-4a74-81c6-4f23907c3f7d@FreeBSD.org>
References:  <202108042123.174LNOj4042456@gitrepo.freebsd.org> <93738b88-4f35-4e56-b220-25026f9cd62f@FreeBSD.org> <5a41362f-7d8c-695f-c851-027e0996a8c2@FreeBSD.org> <90ce366f-fc72-4a74-81c6-4f23907c3f7d@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 07.08.21 um 08:41 schrieb Baptiste Daroussin:

>> * 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!

We're doing it all the time => @sample, @postexec, whatnot.

>> * 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!

There is no enforced file system layout and it's perfectly legit to let
$PREFIX or /usr (not /) reside on ext2, ext3 or ext4.  It may seem less
prevalent today with fallen prices for storage over the decades, but
it's a use case we need to care for.

Trust the maintainer who also sees non-public mail for his package.

>> * 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

Function comes before beauty.

>> 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.

I'll try that at some point. If daemon(8) (without options to
synchronize to the invoking shell) were to not reparent itself or its
children ultimately to init(8), then its detaching would be incomplete.

A simple "daemon sleep 100" shows sleep with its own PID and PPID 1, as
I expect.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7ab4796b-9694-4865-9fe9-c5343fa8c29a>