From nobody Tue Dec 02 14:48:06 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 4dLNtL2QC7z6KY0Y for ; Tue, 02 Dec 2025 14:48:10 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 4dLNtK75WNz42jQ; Tue, 02 Dec 2025 14:48:09 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764686890; 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=foSe7stClLlOcbkngLg4+XWVl8W9iDoDGPxRvsvOB6g=; b=SiTO+Y0FasrIHeuTQjzIRXAYaPY0AY+m4iK8nbISIJZCjIbJvnela2P31B6eJyBPoOIRVO LO4G/EB2IP62vj8/2dVC1t17urtfW1OGAE5w8c2t0ZsNPMn8Nm1dA7ET3u9eCCGUmKTPw7 3xvzfDUyipVjqugcwUHbPdwHa60KaZxo0pKOaifMSYRBl8Z6bjqxAP5WdFCO7RY5sCcxWO CeKlgnNDhpyFRwwLT0y14xJgLSfVtNgf5LDdX+BhBBxhKxhaf0bAtvUyNSB5nsZ6eemjyc l6VNKdh/KdO+dNrTATIEZHAGIDQgrnLS1LH+DyTWtnozh/j4rMxwsaX3kXthzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764686890; 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=foSe7stClLlOcbkngLg4+XWVl8W9iDoDGPxRvsvOB6g=; b=Jokfd7Rlo0wHEHov3ttpBENbVIwa5kBZTEYgZ4p/EhqOwcG7753NQKPfPEkJa5gOr/7XEr ST35AXDGjRKLZFt0YoVwss/QYDw3KkPI3rpedJsi7mQkRC+UFbwbZeT78/eihPY9GRjEn5 P5oWaE8p3SB75ukmERO299f52+gcLugKL4MUk7JjXnX9WlcTQFQoWC87rREyeT4IAOjuy2 2/eNhzk50qU1Zn2jmt7oQDlxdg3Myv/7YHhNlTxBFw7jR39Z8CWVWnRbHF+1DgPTvfJlCe J4JNo3daGLrPuS413MtD7fzlAQKDk2U6DCB+OsphscpBKYE8VpoD4M+Ja8nkag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764686890; a=rsa-sha256; cv=none; b=Jbq51LkPa/kcGJgbBaf7/Sv2P66Ch89V48WBmND/WYPBX4PE8IHsqIbEc6wYXFhsoNQ4Pk JiSjfJcSjof8Vkqk0mJHkE2BeTwqiygkdrRFzKyi3C+GUk8DclpHmKPxwZveyzGb5cZPO0 ITjQ6Vx33iISvfCYoATwtYs36W48yNptx9h64HcoonfEeYP1nhNsYLfEv2I3+igGmx87hT zdiAGTqi3aNYX4yScq9aQGCGxivrpQ/PW/gYfAoVHzTt7ZShlbsdahUYpQ/L1NBnZ6+mkC nXfCjM7mjoIrn+C2WR1bkun2XbH6cqWsANb+uK2udIrdJLy1rwvKzB+S1LamuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from b.nours.eu (b.nours.eu [IPv6:2001:41d0:303:5e39::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 4dLNtK5j9YzvZ8; Tue, 02 Dec 2025 14:48:09 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by b.nours.eu (Postfix, from userid 1001) id 415D2114EB; Tue, 02 Dec 2025 15:48:06 +0100 (CET) Date: Tue, 2 Dec 2025 15:48:06 +0100 From: Baptiste Daroussin To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= Cc: polyduekes@proton.me, Lexi Winter , freebsd-current@freebsd.org Subject: Re: changing from pkgbase to regularbase Message-ID: References: <71e4b46c-8d69-451d-92ca-79316ffc4b63@app.fastmail.com> <20251122180931.52c1141475f5faec4fad633c@dec.sakura.ne.jp> <861pload1z.fsf@ltc.des.dev> 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: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <861pload1z.fsf@ltc.des.dev> On Sun 23 Nov 18:12, Dag-Erling Smørgrav wrote: > polyduekes@proton.me writes: > > what is the correct way to depkgbasify? > > There is no “correct” way. Here's what I would suggest: > > 1. Make sure your system is up-to-date and consistent and you have a > matching source tree installed: > > # pkg upgrade -y > # pkg install -y FreeBSD-set-src > # pkg autoremove -y > > 2. Make a list of non-pkgbase non-automatic packages: > > # pkg query -e '%a == 0 && %o !~ base/*' %n >packages > > 3. Delete your installed package database: > > # rm /var/db/pkg/local.sqlite > > 4. Reinstall non-pkgbase packages: > > # pkg install -fy $(cat packages) > > This will of course also reinstall all dependencies, but we are > deliberately only specifying non-automatic packages so the end result > is the same as what we started out with. If we had made a list of > _all_ installed packages, we would end up with everything now being > marked non-automatic, and `pkg autoremove` would no longer work > properly. > > 5. Populate /var/db/etcupdate so it will work when you later upgrade > from source: > > # etcupdate extract > > 6. Optional but recommended — disable the pkgbase repository: > > # rm /usr/local/etc/pkg/repos/FreeBSD.conf > > (this file will have been created by the installer and should contain > a single line that enables the FreeBSD-base repository; without it, > the repository remains defined in /etc/pkg/FreeBSD.conf but disabled) > > You can also remove cached information about the repository, which > you will no longer need: > > # rm -rf /var/db/pkg/repos/FreeBSD-base > > At this point you can replace /usr/src with a git clone and upgrade as > usual (`make -C /usr/src -j1.5 world kernel && etcupdate -B`). > > There is a shortcut for steps 2-4. I think it is both sufficient and > safe, but I don't know pkg's internals well enough to say for sure; > perhaps bapt@ can weight in. First you need to install the sqlite3 cli: > > # pkg install -Ay sqlite3 > > You can then use it to remove information about base packages from the > package database, leaving the rest intact so you don't have to reinstall > them: > > # sqlite3 /var/db/pkg/local.sqlite \ > "delete from packages where origin like 'base/%';" > > If you choose this route you can also drop the autoremove in step 1, > which I only put in to shorten steps 2 and 4. You still have to perform > step 5 (and optionally 6). > This looks good to me, I would simplify the last 2 steps in: # pkg shell "delete from packages where origin like 'base/%';" Aka no need to install sqlite3. Best regards, Bapt