From nobody Tue Dec 02 15:27:11 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 4dLPlb4HCQz6HcwB for ; Tue, 02 Dec 2025 15:27:23 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4dLPlZ39Vmz4DV6; Tue, 02 Dec 2025 15:27:22 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com Received: from skull.home.blih.net (mwc0868.ftth.cust.milkywan.net [45.13.107.196]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 1db7da96 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 2 Dec 2025 15:27:14 +0000 (UTC) Date: Tue, 2 Dec 2025 16:27:11 +0100 From: Emmanuel Vadot To: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= Cc: polyduekes@proton.me, Lexi Winter , freebsd-current@freebsd.org, bapt@freebsd.org Subject: Re: changing from pkgbase to regularbase Message-Id: <20251202162711.16aec122152219f614c30beb@bidouilliste.com> In-Reply-To: <861pload1z.fsf@ltc.des.dev> References: <71e4b46c-8d69-451d-92ca-79316ffc4b63@app.fastmail.com> <20251122180931.52c1141475f5faec4fad633c@dec.sakura.ne.jp> <861pload1z.fsf@ltc.des.dev> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd16.0) 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=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.80 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.979]; NEURAL_HAM_MEDIUM(-0.72)[-0.718]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; ONCE_RECEIVED(0.20)[]; R_SPF_ALLOW(-0.20)[+ip4:212.83.155.74/32]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEFALL_USER(0.00)[manu]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4dLPlZ39Vmz4DV6 On Sun, 23 Nov 2025 18:12:08 +0100 Dag-Erling Sm=F8rgrav wrote: > polyduekes@proton.me writes: > > what is the correct way to depkgbasify? >=20 > There is no ?correct? way. Here's what I would suggest: >=20 > 1. Make sure your system is up-to-date and consistent and you have a > matching source tree installed: >=20 > # pkg upgrade -y > # pkg install -y FreeBSD-set-src > # pkg autoremove -y >=20 > 2. Make a list of non-pkgbase non-automatic packages: >=20 > # pkg query -e '%a =3D=3D 0 && %o !~ base/*' %n >packages >=20 > 3. Delete your installed package database: >=20 > # rm /var/db/pkg/local.sqlite >=20 > 4. Reinstall non-pkgbase packages: >=20 > # pkg install -fy $(cat packages) >=20 > 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. >=20 > 5. Populate /var/db/etcupdate so it will work when you later upgrade > from source: >=20 > # etcupdate extract >=20 > 6. Optional but recommended ? disable the pkgbase repository: >=20 > # rm /usr/local/etc/pkg/repos/FreeBSD.conf >=20 > (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) >=20 > You can also remove cached information about the repository, which > you will no longer need: >=20 > # rm -rf /var/db/pkg/repos/FreeBSD-base >=20 > 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`). >=20 > 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: >=20 > # pkg install -Ay sqlite3 >=20 > 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: >=20 > # sqlite3 /var/db/pkg/local.sqlite \ > "delete from packages where origin like 'base/%';" >=20 > 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). >=20 > DES > -- > Dag-Erling Sm=F8rgrav - des@FreeBSD.org >=20 And with https://github.com/freebsd/pkg/pull/2563 the shortcut for step 2-4 will just be 'pkg unregister FreeBSD-\*' Cheers, --=20 Emmanuel Vadot