Page MenuHomeFreeBSD

pkgbaseProject
ActivePublic

Details

Description

For reviews on pkgbase

Recent Activity

Fri, May 8

ziaee closed D56381: sysutils/firstboot-pkg-upgrade: New port.
Fri, May 8, 3:35 PM · pkgbase, releng

Thu, May 7

bapt accepted D56381: sysutils/firstboot-pkg-upgrade: New port.
Thu, May 7, 9:29 PM · pkgbase, releng
cperciva accepted D56381: sysutils/firstboot-pkg-upgrade: New port.

LGTM!

Thu, May 7, 5:46 PM · pkgbase, releng
ziaee updated the summary of D56381: sysutils/firstboot-pkg-upgrade: New port.
Thu, May 7, 5:43 PM · pkgbase, releng
ziaee updated the diff for D56381: sysutils/firstboot-pkg-upgrade: New port.

fix comment typos, thanks @cperciva!

Thu, May 7, 5:41 PM · pkgbase, releng
ziaee updated the summary of D56381: sysutils/firstboot-pkg-upgrade: New port.
Thu, May 7, 5:35 PM · pkgbase, releng
ziaee updated the diff for D56381: sysutils/firstboot-pkg-upgrade: New port.

implement cperciva/lwhsu sha256 suggestion, thanks guys!

Thu, May 7, 5:31 PM · pkgbase, releng
cperciva added a comment to D56381: sysutils/firstboot-pkg-upgrade: New port.

Fair point, but I'm a little bit concerned about this being brittle -- /var/db/pkg/local.sqlite is not a public interface for pkg, so there's no guarantee that a future pkg won't (a) change that path, or (b) touch that file even if nothing has changed. I don't want to suddenly discover in FreeBSD 16.3 that VMs aren't rebooting after applying security updates because something changed in pkg.

that is a valid concern from @cperciva I don't think I will change anything in that area, but yes the content of /var/db/pkg is supposed to be opaque. (I know I am the one who recommended the mtime check in the first place).

Thu, May 7, 4:41 PM · pkgbase, releng
bapt added a comment to D56381: sysutils/firstboot-pkg-upgrade: New port.

ok, what if we separate the pkg update, and take the state after updating, but before upgrading, then we will actually know if the upgrade did anything. maybe because of this we can simplify the logic at the end a bit more.

I think pkg info | sha256 would work? If any packages are updated (or installed or removed) then that hash will change.

I think it would work too, but I don't see why we wouldn't want to stat the mtime in between updating and upgrading instead. By my rough estimate, time(1) shows 0.08 real for the pkg info | sha256, but for stat -f %c /var/db/pkg/local.sqlite it shows 0.00 real, so, that's less electricity, right?

Fair point, but I'm a little bit concerned about this being brittle -- /var/db/pkg/local.sqlite is not a public interface for pkg, so there's no guarantee that a future pkg won't (a) change that path, or (b) touch that file even if nothing has changed. I don't want to suddenly discover in FreeBSD 16.3 that VMs aren't rebooting after applying security updates because something changed in pkg.

Thu, May 7, 4:20 PM · pkgbase, releng
cperciva added a comment to D56381: sysutils/firstboot-pkg-upgrade: New port.

ok, what if we separate the pkg update, and take the state after updating, but before upgrading, then we will actually know if the upgrade did anything. maybe because of this we can simplify the logic at the end a bit more.

I think pkg info | sha256 would work? If any packages are updated (or installed or removed) then that hash will change.

I think it would work too, but I don't see why we wouldn't want to stat the mtime in between updating and upgrading instead. By my rough estimate, time(1) shows 0.08 real for the pkg info | sha256, but for stat -f %c /var/db/pkg/local.sqlite it shows 0.00 real, so, that's less electricity, right?

Thu, May 7, 4:15 PM · pkgbase, releng
ziaee added a comment to D56381: sysutils/firstboot-pkg-upgrade: New port.

ok, what if we separate the pkg update, and take the state after updating, but before upgrading, then we will actually know if the upgrade did anything. maybe because of this we can simplify the logic at the end a bit more.

I think pkg info | sha256 would work? If any packages are updated (or installed or removed) then that hash will change.

Thu, May 7, 1:30 PM · pkgbase, releng

Wed, May 6

cperciva added a comment to D56381: sysutils/firstboot-pkg-upgrade: New port.

ok, what if we separate the pkg update, and take the state after updating, but before upgrading, then we will actually know if the upgrade did anything. maybe because of this we can simplify the logic at the end a bit more.

Wed, May 6, 11:42 PM · pkgbase, releng
ziaee updated the diff for D56381: sysutils/firstboot-pkg-upgrade: New port.

ok, what if we separate the pkg update, and take the state after updating, but before upgrading, then we will actually know if the upgrade did anything. maybe because of this we can simplify the logic at the end a bit more.

Wed, May 6, 11:08 PM · pkgbase, releng

Mon, May 4

ziaee updated the summary of D56381: sysutils/firstboot-pkg-upgrade: New port.
Mon, May 4, 9:53 PM · pkgbase, releng
ziaee added inline comments to D56381: sysutils/firstboot-pkg-upgrade: New port.
Mon, May 4, 9:31 PM · pkgbase, releng

Fri, May 1

ziaee updated the diff for D56381: sysutils/firstboot-pkg-upgrade: New port.

greatly simplify based on cperciva feedback.

Fri, May 1, 7:09 PM · pkgbase, releng

Thu, Apr 30

cperciva added a comment to D56381: sysutils/firstboot-pkg-upgrade: New port.

I'm inclined to skip the "figure out if we need to reboot or just restart services" complexity at this point because

Thu, Apr 30, 11:47 PM · pkgbase, releng
ziaee updated the diff for D56381: sysutils/firstboot-pkg-upgrade: New port.

incorperate suggestions by @bapt. Do not reboot unless kernel is updated. In all other situations, including situations where only the pkg database is updated, just restart all services.

Thu, Apr 30, 11:21 PM · pkgbase, releng

Wed, Apr 22

lwhsu added a comment to D56381: sysutils/firstboot-pkg-upgrade: New port.

note, i like a blank line at the end of scripts for cat reasons. if we don't want this, i can remove it, but it doesn't hurt anything and we do it all over the place.

Wed, Apr 22, 9:29 PM · pkgbase, releng
lwhsu added inline comments to D56381: sysutils/firstboot-pkg-upgrade: New port.
Wed, Apr 22, 9:26 PM · pkgbase, releng
lwhsu added a comment to D56381: sysutils/firstboot-pkg-upgrade: New port.

use logic inspired from @lwhsu to prevent reboot if nothing happened. compare the file size in bytes of the pkg database instead of using pkg inf and checksum to save water/coal. tested on my laptop

Wed, Apr 22, 9:23 PM · pkgbase, releng
lwhsu added a comment to D56381: sysutils/firstboot-pkg-upgrade: New port.
In D56381#1295532, @ivy wrote:

@lwhsu out of interest, how do you end up with a system that has FreeBSD-base packages installed but doesn't have pkg bootstrapped?

Wed, Apr 22, 9:18 PM · pkgbase, releng
ivy added a comment to D56381: sysutils/firstboot-pkg-upgrade: New port.

@lwhsu out of interest, how do you end up with a system that has FreeBSD-base packages installed but doesn't have pkg bootstrapped?

Wed, Apr 22, 8:53 PM · pkgbase, releng
ziaee updated the diff for D56381: sysutils/firstboot-pkg-upgrade: New port.

use logic inspired from @lwhsu to prevent reboot if nothing happened. compare the file size in bytes of the pkg database instead of using pkg inf and checksum to save water/coal. tested on my laptop

Wed, Apr 22, 8:50 PM · pkgbase, releng
ziaee updated the diff for D56381: sysutils/firstboot-pkg-upgrade: New port.

implement bootstrap pkg if it is not done so already, based on lwhsu feedback, thanks! note, i like a blank line at the end of scripts for cat reasons. if we don't want this, i can remove it, but it doesn't hurt anything and we do it all over the place.

Wed, Apr 22, 8:11 PM · pkgbase, releng
lwhsu added inline comments to D56381: sysutils/firstboot-pkg-upgrade: New port.
Wed, Apr 22, 6:36 PM · pkgbase, releng
lwhsu added a comment to D56381: sysutils/firstboot-pkg-upgrade: New port.

btw, you can try to run it with rclint, but I don't usually follow "Do not quote values unless necessary" error.

Wed, Apr 22, 6:05 PM · pkgbase, releng
lwhsu added a comment to D56381: sysutils/firstboot-pkg-upgrade: New port.

Hi, I am also working on this and didn't know this is earlier than me. I think this one is more complete while mine is only focusing on FreeBSD-base repo. However I guess there are still something useful (or not, as I'm still testing):

  • bootstrap/update pkg
  • only reboot when there is pkg updated
Wed, Apr 22, 6:03 PM · pkgbase, releng
ziaee updated the summary of D56381: sysutils/firstboot-pkg-upgrade: New port.
Wed, Apr 22, 5:22 PM · pkgbase, releng
ziaee updated the summary of D56381: sysutils/firstboot-pkg-upgrade: New port.
Wed, Apr 22, 5:10 PM · pkgbase, releng

Apr 14 2026

miguno_miguno.com added a watcher for pkgbase: miguno_miguno.com.
Apr 14 2026, 6:55 PM

Mar 28 2026

adrian added a member for pkgbase: adrian.
Mar 28 2026, 10:27 PM

Mar 25 2026

pete_nomadlogic.org removed a member for pkgbase: pete_nomadlogic.org.
Mar 25 2026, 5:25 PM
brd added a member for pkgbase: brd.
Mar 25 2026, 4:42 PM
pete_nomadlogic.org added a member for pkgbase: pete_nomadlogic.org.
Mar 25 2026, 2:45 PM

Dec 2 2025

ifreund_freebsdfoundation.org abandoned D51516: release: add FreeBSD-base.conf to pkgbase VM/cloud images.

Superseded by 8e0b1a1c03a35a5db13e370cb3e62585d3db68e3

Dec 2 2025, 3:48 PM · pkgbase

Nov 22 2025

gordon closed D53879: Add backup pkgbase signing key held by security-officer.
Nov 22 2025, 7:43 PM · pkgbase
cperciva accepted D53879: Add backup pkgbase signing key held by security-officer.
Nov 22 2025, 6:58 PM · pkgbase
gordon updated the diff for D53879: Add backup pkgbase signing key held by security-officer.
Nov 22 2025, 6:44 PM · pkgbase
gordon retitled D53879: Add backup pkgbase signing key held by security-officer from Add security-officer pkgbase keys to build to Add backup pkgbase signing key held by security-officer.
Nov 22 2025, 6:43 PM · pkgbase
gordon requested review of D53879: Add backup pkgbase signing key held by security-officer.
Nov 22 2025, 8:34 AM · pkgbase

Nov 19 2025

bcr closed D53534: Handbook pkgbase upgrade: Split pkgbase major upgrade to use zfs with boot environments, add workaround lock pkg.
Nov 19 2025, 10:26 AM · pkgbase
bcr accepted D53534: Handbook pkgbase upgrade: Split pkgbase major upgrade to use zfs with boot environments, add workaround lock pkg.

I'll bring this into the doc tree. I'll do a few minor textual fixes before committing, but nothing substantial.
Thanks for the update, it's definitely helpful to have accurate information for users on how to work with pkgbase to upgrade when 15.0 RELEASE hits.

Nov 19 2025, 10:16 AM · pkgbase
grahamperrin accepted D53534: Handbook pkgbase upgrade: Split pkgbase major upgrade to use zfs with boot environments, add workaround lock pkg.

Thanks! I'm (blindly) accepting without checking.

Nov 19 2025, 8:00 AM · pkgbase

Nov 18 2025

lukas.engelhardt_gmx.de updated the diff for D53534: Handbook pkgbase upgrade: Split pkgbase major upgrade to use zfs with boot environments, add workaround lock pkg.

@grahamperrin thank you for your suggestions.
I tried to integrate them to the best of my knowledge.

Nov 18 2025, 8:41 PM · pkgbase

Nov 7 2025

grahamperrin added a comment to D53534: Handbook pkgbase upgrade: Split pkgbase major upgrade to use zfs with boot environments, add workaround lock pkg.

My current thought is much the same as Sergio's in August:

Nov 7 2025, 1:54 PM · pkgbase

Nov 4 2025

grahamperrin requested changes to D53534: Handbook pkgbase upgrade: Split pkgbase major upgrade to use zfs with boot environments, add workaround lock pkg.

I'll pause for now, because I find it difficult to visualise with Phabricator. Clicking Undo does not undo (so, you may see repetition), and so on.

Nov 4 2025, 2:03 AM · pkgbase
grahamperrin added a comment to D53534: Handbook pkgbase upgrade: Split pkgbase major upgrade to use zfs with boot environments, add workaround lock pkg.

Can you tell when pkgbase.freebsd.org will be introduced?

Nov 4 2025, 12:38 AM · pkgbase
grahamperrin updated subscribers of D53534: Handbook pkgbase upgrade: Split pkgbase major upgrade to use zfs with boot environments, add workaround lock pkg.

A while ago, probably around August, I began referring to freebsd-update as legacy, because it was commonly understood that it would be "removed or at least neutered" with 15.0-RELEASE.

Nov 4 2025, 12:32 AM · pkgbase

Nov 3 2025

lukas.engelhardt_gmx.de added inline comments to D53534: Handbook pkgbase upgrade: Split pkgbase major upgrade to use zfs with boot environments, add workaround lock pkg.
Nov 3 2025, 9:01 PM · pkgbase