From nobody Tue Sep 12 09:42:24 2023 X-Original-To: ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RlJXK6Fjmz4tR7n for ; Tue, 12 Sep 2023 09:42:25 +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 4RlJXK5n1Tz4N5f; Tue, 12 Sep 2023 09:42:25 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694511745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hYrqrl46X8BQg7X8+UA061+hMlj4t4cerAnxnldX2Sw=; b=RUuvrJ7tffUwDSmijBwDORd1FV4RAMLbWXbGJIL61plTF6kDWriSbZQ6YbxGEVRKHlZdIb j2gGiG4y7fEyYuBygOwZJ9PViDtuQexZf6WvHv1bqhVoIqyQSUuncsGRaIweMY9Z1v2zsm 7xQNhepg+Rz3Fb1W6QR+HpjrCKw+Ez5z39sZ2osFeaMdtHbb9M9Zi2V3oO9a/koVxK8gv+ b3yTr7ZJjNBCyv0rxQlfpwELrd+ufrKzWcHaAnVv/FAWiqZwsdSrSyIAXvuYViKV7ul22Q ajPUf67quR02hP3P0seHnZnTS/c3nDl4390QjiQ/nRRX/vNj0NQWHXyD3fgvEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694511745; a=rsa-sha256; cv=none; b=qwXcC0wkn9H1kto4QWRQ0rHyFMdjfkpPhni4+rkivg3ghEHstl74FkfWf4quUIkLr9MXKl Kbpv6WYAn1OZAqCD45UNRYIBbtWgxpWB3Sedk+nzjFDaQr2UrSWElA7ng5Nt1ZvLOcM4nn kL7LYCB1VGnpORHMSTin05LxRNSbKjUaG7VU6e1EdlafyR57twlExt4GwO9vz7W2sKjxCz M0nd5wDOM0xFWle6J8xGkp6BkiDkQ7JObAFsQvjLqkq/v5QgpGpzUYPoukP1j90jqKoHcV 7NDNlsRfijzRSZ3JY7TcvMdU/MXZjIj5lxVIyHmNLeoKGARSRHkkWSjhhvtVgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694511745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hYrqrl46X8BQg7X8+UA061+hMlj4t4cerAnxnldX2Sw=; b=dbg8y8Zt3IrBq/kCPNQd+6pQP0zNOTkWD5LhwQX8s1cdW/ZMFUPW8KECOKeu3ZyA627mk+ Qi8zrslTXTzejCUnJMyeydN8jmJHSzdtfvqT/PmvfPWauvm+NaMBJClxouyzS3QjNIu1H0 Jvu6qinKD1uBFIiC/gwjpnjCYTZ+1ZLS6xn7F/BvesHLYG/qf0+EHJcjbSh4VrcmLRCXuG w5OWB5+kWqWo6toYiG8skzA3UMCelslT5quChn75FYfVk6zTYSu/V2ymLgA7rcbNfBW3YC By7bvg5MXo8Xfh3ja4mXzoCY+rGDny1o3sPIs3H/sxZGgPNrXBKQVV7KjEeiXA== Received: from aniel.nours.eu (nours.eu [IPv6:2001:41d0:8:3a4d::1]) (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 did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RlJXK4K1nz1QD7; Tue, 12 Sep 2023 09:42:25 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id 4C0D714F8F2; Tue, 12 Sep 2023 11:42:24 +0200 (CEST) Date: Tue, 12 Sep 2023 11:42:24 +0200 From: Baptiste Daroussin To: David Chisnall Cc: ports@freebsd.org Subject: Re: kmod ports and conflicts when upgrading Message-ID: References: <69631434-DDFB-4FB0-A980-72B75341C303@FreeBSD.org> List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <69631434-DDFB-4FB0-A980-72B75341C303@FreeBSD.org> 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