Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Sep 2023 11:42:24 +0200
From:      Baptiste Daroussin <bapt@freebsd.org>
To:        David Chisnall <theraven@freebsd.org>
Cc:        ports@freebsd.org
Subject:   Re: kmod ports and conflicts when upgrading
Message-ID:  <rgknsilhvvzdtbxjekekvg7lhxwpig3nobpzrlxjlucjdt3jmu@esmiisi6aydy>
In-Reply-To: <69631434-DDFB-4FB0-A980-72B75341C303@FreeBSD.org>
References:  <69631434-DDFB-4FB0-A980-72B75341C303@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 12, 2023 at 10:25:40AM +0100, David Chisnall wrote:
> Hi,
> 
> As part of the work to run FreeBSD containers on other operating systems via Podman, I have written a device driver for the QEMU firmware config interface.  I am currently building this via an overlay port, but aim to upstream it into -CURRENT soonish.  In parallel, I’d like to add a port for it.
> 
> Both ports and base install kernel modules in the same place and so I’m worried that someone will install the port, update FreeBSD to a version that includes the module in base, and then end up with problems when the uninstall the port (or have the upgrade fail because the file already exists).
> 

Base installs modules in /boot/kernel, ports insyall them in /boot/modules so
you don't have the problem.

> I’m sure this problem must have been solved for other things that have migrated in a similar path.  Is there a way to automatically uninstall a port when doing a major version upgrade or when a base-system thing tries to write to the same location (or, at least, ensure that it is not removed when the package is removed later)?

no there is no mecanism for that except if you use pkgbase, in this case if you
have a conflict aka a file installed in the same location (which is not the case
for kernel modules from ports) then it will propose you to remove the
conflicting package.

bapt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?rgknsilhvvzdtbxjekekvg7lhxwpig3nobpzrlxjlucjdt3jmu>