From nobody Thu Oct 02 09:17:30 2025 X-Original-To: freebsd-current@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 4ccmR52dGGz69Qfw for ; Thu, 02 Oct 2025 09:17:37 +0000 (UTC) (envelope-from ivy@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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccmR528tXz3PDy; Thu, 02 Oct 2025 09:17:37 +0000 (UTC) (envelope-from ivy@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759396657; 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: in-reply-to:in-reply-to:references:references; bh=roZRo5bRlh2BAKadBushm3DCaM/p/jsFz0P7dUZG0fk=; b=pVBAsnLDNTWddRvew5RsTdv8fACQ0DoQcCpvbY0dW/JGUlkxD8fYjzP7jMtzliXfcgvN38 zjcRUmJYAuINVAUArRGKYejQN1XC2pTm/h4EsxeJCfh13WoDaNq/OskSNnPtM0tLfvBVxM wNEgNnHy/4YqNJUB4QrEyJrRvG+QDVVCSaj0BSdLSY9JV2izrdAPydMVtt25CosbJd4/10 AjyQ/ywbXNtGXUFqMuDTBzCOF66QvKYgUJ5W6iOU0bCNAI/u2JovNUTcVa+TMIbQeMYYXt t5zWsteqUUvjFxjvT/iEQmiEcxOCWoDI+pK27rUCKu8+zp7p3on2qwrIaXIjew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759396657; 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: in-reply-to:in-reply-to:references:references; bh=roZRo5bRlh2BAKadBushm3DCaM/p/jsFz0P7dUZG0fk=; b=Ivzc219k8W9NCQ1Ml600Q/F0I7Kkkt1CbrMqHvdGB9x3zIHChVflV3T9p152KtGXit8jyd bedvJJaCzw5eBespbtggzvB5O97/AJ8rytWwuhPzg98areb4ZhDsWlHAYcSppaBedtkrNr /+SmpPn3QFgT/+oMtHsbZ1irLD924xf8oT8tuXs7j2vyVPxuhOdSfaWZ9vn0ptHTNweWk2 LGVGxt6952gdmP7yHr3qUTLv3ZOD/red1RMPXfuKYFiJf3c3dRBObt2kKn8rtDAuVVWGp/ KrJmsJCxRX4cYc2uihZbnQP9sWh0s7Y9lHfGAIj/4REbUQ68ISpaNRWL4N5IwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759396657; a=rsa-sha256; cv=none; b=GVg7XGLrmp+YkWIid+AMPs/5tgkCozpkaFGUZywqXDzD8xiJETZskiLZR2gB9/8kQtQ7qo YxpQ931hDTJ356D+748HcWs/fC8fFSArwb2nSGrX9sphecW/ml1DB9hJqs9bjyQSramrue 5jYxxFcsTFCYILFpXAWxdDHamSKQbTfsitaGJVD4UkwzG3iFcg/W7iOCNXZBYJBfuCPdIY owVFDqwOGU6MWEvQPXm1TJ6sEr8KsZULQmPr00kbfbPjGmJDKkOGvxmWUYo/gY7NkN1Lhi G5fdSTBHohitBRpii47rh/uEn+sMB+IUqQBkAsFJ1V0/UILG5OOp/MZZYUritA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from amaryllis.le-fay.org (amaryllis.le-fay.org [IPv6:2a00:1098:6b:400::9]) (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: ivy/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ccmR466mPzsdv; Thu, 02 Oct 2025 09:17:36 +0000 (UTC) (envelope-from ivy@freebsd.org) Date: Thu, 2 Oct 2025 10:17:30 +0100 From: Lexi Winter To: Yasuhiro Kimura Cc: freebsd-current@freebsd.org Subject: Re: Questions about pkgbase Message-ID: Mail-Followup-To: Yasuhiro Kimura , freebsd-current@freebsd.org References: <20251002.180121.980053125503545103.yasu@FreeBSD.org> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oBNgGJcxUfeyafF4" Content-Disposition: inline In-Reply-To: <20251002.180121.980053125503545103.yasu@FreeBSD.org> --oBNgGJcxUfeyafF4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Yasuhiro Kimura wrote in <20251002.180121.980053125503545103.yasu@FreeBSD.o= rg>: > 1. Consistency with update using source tree >=20 > Let me assume I made clean install of 16.0-CURRENT system with pkgbase > and updated it using source tree (make {build,install}{kernel,world}). you shouldn't use installworld/installkernel to update a pkgbase system =66rom source. instead, use make buildworld buildkernel update-packages, which will build a package repository you can use to update with pkg(8). > After it has completed, base system itself shoule be updated > successfully. Then what about things about pkgbase (e.g. version of > package, list of included files, etc.)? Are they properly updated or > become inconsistent? =20 this would cause the package database to be inconsistent with the installed system, which will certainly break things later. >[...] > a. Follow the step 1 to step 10 explained in /usr/src/Makefile > b. Rebuild and reinstall all (non-pkgbase) packages. > c. Do `make delete-old-libs`. >=20 > On the other hand, it doesn't seems pkgbase keeps obsolete files while > updating. IIUC `pkg upgrade` uninstall all files included in old > version of package in question before installing files of new > version. So obsolete files dissapear after update has finished. Then > is there any way to prevent situation as above? pkg(8) has a feature called BACKUP_LIBRARIES which moves deleted shared libraries into a temporary package. this allows you to update ports, then delete the temporary package, which has the same effect as delete-old-libs. there is an outstanding issue that means this doesn't work as well as it should with pkgbase: https://github.com/freebsd/pkg/issues/2501. re@ is aware of this and it should be fixed for 15.0-RELEASE. >[...] > On pkgbase system, however, files under /etc seems to belong to > packages. So they are updated by `pkg upgrade`. Then how confliction > is handled if it happnes? pkg(8) will attempt a 3-way merge when installing a new configuration file. if this is successful, no action is required. if it fails, the existing file will be left unchanged and pkg will create a .pkgnew file, which you need to manually merge with the existing version of the file. this workflow is much worse than etcupdate or freebsd-update, and i'm not convinced we should release with pkgbase as the recommended option without a better solution, but we'll see. note that this is *not* the same way ports handles new configuration files; this feature is not used by ports at all, it is specific to the base system. > 4. Build pkgbase repository by myself >=20 > I'd like to build pkgbase repository and configure system to use > it. Is it documented somewhere? this is what 'make update-packages' does. it is briefly documented in build(7), there is (as far as i know) no Handbook documentation yet. >[...] > Then is there any way to (re|un)install all installed non-pkgbase > packages? this should be possible using 'pkg delete -r FreeBSD-ports', but currently this option does not exist. there is a feature request to add it: https://github.com/freebsd/pkg/issues/2494. --oBNgGJcxUfeyafF4 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaN5DJgAKCRD1nT63mIK/ YBu9AQCaW2S/2Bhvh0P7HbKh21iyBfoPARCUMl1ExIUM2QYDRgD8Dyy4IRmgNJfP +t8fTsm8eLJ0986EZUumBesu0qEejQs= =GWJE -----END PGP SIGNATURE----- --oBNgGJcxUfeyafF4--