No offence pkgbase looks to me like an idea without any clear deadline.

I don't imagine that a deadline was ever intended, there is the timeline above.

Also above:

Michael W Lucas has a few laughs …

:) understandable, however I am fairly optimistic about things not straying too far from the timeline, since the FreeBSD Foundation is involved.

Personally: I'll refocus on PkgBase after <https://codeberg.org/pkgbase/website/issues/8> (recently discussed in EFNet) is progressed.
 

Attachments

  • 1699928241137.png
    1699928241137.png
    77.5 KB · Views: 88
… Is there a way I can add the dbg components and continue to use freebsd-update

You might (in the following order):
  1. upgrade to 14.0-RELEASE
  2. add some of what's available for PkgBase.
Assuming AMD64:
– please note, directory listings such as this may be 403 (forbidden) in future.

I'll ping someone in Matrix who'll probably know which packages to choose. FreeBSD Cafe at <https://matrix.to/#/#FreeBSD:bsd.cafe>.
 
Last edited:
– please note, directory listings such as this may be 403 (forbidden) in future.
Now that is a bit unfortunate, I sometimes want to get a directory listing, rather than fetch a specific package. Well, in my case, I did need that years ago, before I learned to work with ports.

The long way around that 403 would be to switch the repo in /etc/pkg.conf and then navigate to package listings in bsdconfig(8)...
 
You might (in the following order):
  1. upgrade to 14.0-RELEASE
  2. add some of what's available for PkgBase.
That looked interesting so I gave it a try but hit some snags.

First I created the following as /usr/local/etc/pkg/repos/FreeBSD-base.conf

Code:
FreeBSD-base: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/base_release_0"
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

But this complained about a kernel version mismatch

Code:
curlew:/tmp# pkg update -r FreeBSD-base 
Updating FreeBSD-base repository catalogue...
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01    
Fetching packagesite.pkg: 100%   33 KiB  33.8kB/s    00:01    
Processing entries:  97%
Newer FreeBSD version for package FreeBSD-kernel-generic:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1500000
- running kernel: 1400097
Ignore the mismatch and continue? [y/N]:  
pkg: repository FreeBSD-base contains packages for wrong OS version: FreeBSD:14:amd64
Processing entries: 100%
Unable to update repository FreeBSD-base
Error updating repositories!
curlew:/tmp#

So I changed 'base_release_0' to 'base_weekly' and got a package version of 1400500 which was closer to my value of 1400097 and then tried to install a package.

Code:
curlew:/tmp# pkg install -r FreeBSD-base FreeBSD-at-dbg
Updating FreeBSD-base repository catalogue...
FreeBSD-base repository is up to date.
All repositories are up to date.
The following 9 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        FreeBSD-at: 14.snap20231120020451 [FreeBSD-base]
        FreeBSD-at-dbg: 14.snap20231120020451 [FreeBSD-base]
        FreeBSD-clibs: 14.snap20231126071433 [FreeBSD-base]
        FreeBSD-libarchive: 14.snap20231120020451 [FreeBSD-base]
        FreeBSD-libbsm: 14.snap20231120020451 [FreeBSD-base]
        FreeBSD-libbz2: 14.snap20231120020451 [FreeBSD-base]
        FreeBSD-liblzma: 14.snap20231120020451 [FreeBSD-base]
        FreeBSD-openssl-lib: 14.snap20231120020451 [FreeBSD-base]
        FreeBSD-runtime: 14.snap20231126071433 [FreeBSD-base]

Number of packages to be installed: 9

The process will require 19 MiB more space.
6 MiB to be downloaded.

Proceed with this action? [y/N]:  
curlew:/tmp#
So it looks like I can't add a single package unless the whole system is built with pkg-base. I understand that PkgBase isn't quite ready for production use yet so I expect it will be safer for me to rebuild from source to add the missing dbg components instead of rebuilding the whole system from packages.

But I've been trying this out in a spare boot environment so if there's any workaround to allow individual base packages to be added to my existing system I'm happy to give it a try.
 
BTW, I only read today (like, a few hours ago) what pkgbase even is... And I realized something:

To be able to submit patches to the actual code of pkgbase, there's no way around having a good handle on how to install FreeBSD from a command-line rescue environment, without the help of an installer script. Picking out individual sets, detecting the SSD, using /bin/dd, and the like. I can probably figure out the ropes, and put the details together into something coherent - but as things stand now, just putting it all together and reporting on whether it works as intended is probably the limit of what I have the ability do with pkgbase...

And that's OK. 🤷‍♂️

Reporting on whether it works as intended is no less valuable than patching. Thanks.

Edge case (not in Bugzilla, developers in Discord are aware):


I'll request addition of <https://mastodon.bsd.cafe/tags/PkgBase> to the wiki.
 
I have just upgraded a vm from 14.0-RELEASE to 14-STABLE using PkgBase. Everything went well. It was great completing the upgrade in few minutes without having to build from source, which would have taken hours for a vm.

A few questions/observations:
  1. Dealing with .pkgsave config files manually, doesn't seem the most elegant solution. Unless one knows exactly what to copy, it's likely to cause issues for many users.
  2. I'm not sure if /etc/src.conf does anything. Despite having WITHOUT_LIB32= I saw a lot of 32-libraries packages being installed.
  3. I'm not sure I fully understand the step of removing linker.hints rm /boot/kernel/linker.hints
 
I'm not sure if /etc/src.conf does anything. Despite having WITHOUT_LIB32= I saw a lot of 32-libraries packages being installed.
PkgBase provides precompiled, packaged base... all the compilation work was done by the FreeBSD project devs already, just find your kernel and install it. /etc/src.conf is for situations when you do your own kernel recompilation.
 
PkgBase provides precompiled, packaged base... all the compilation work was done by the FreeBSD project devs already, just find your kernel and install it. /etc/src.conf is for situations when you do your own kernel recompilation.
I undertand that src.conf is used for updating from source. However the following sentence from wiki:
PkgBase comprises a few hundred packages with the default build (empty src.conf(5) and make.conf(5)) for amd64. The number of packages depends on several factors.

made me assume that PkgBase could be sophisticated enough to filter out the relevant packages that relate to settings in src.conf. At least theoretically that could be possible for 32-bit libraries as according to wiki:

Debugging symbols and most shared libraries are packaged individually. 32-bit is bit packaged separately.

Obviously, I made the wrong assumption!

It does make me think however that the main benefit of using PkgBase (i.e. convenience of speed) when tracking STABLE or CURRENT becomes limited, as often users who track them like to customise their builds more often than those that track RELEASE. There are no real benefits at the moment in using PkgBase to track RELEASE as freebsd-update provides similar speed and better control in merging the config files. Perhaps as PkgBase matures it will offer more options to tweak the list of installed packages.
 
Two recent developments that might help to paint a big picture:

  • base, kernel, ports, and src are distributions.
  • towards installation of multiple kernels.
A user of CURRENT or STABLE might:
  • typically boot GENERIC-DEBUG, only rarely boot GENERIC for debug purposes
– or vice versa.



More broadly (search results across doc and three other trees):
 
… it looks like I can't add a single package unless the whole system is built with pkg-base. …

Download the file, then use pkg-add(8).

Example: experimentally adding vi, and its manual page, to a system that's normally without these things​

Code:
% uname -KU
1500010 1500010
% man vi
No manual entry for "vi"
% which vi
vi: Command not found.
% su -
Password:
root@mowa219-gjp4-zbook-freebsd:~ # bectl list -c creation | tail -n 5
n267378-8bf0882e186e-h -      -          1.33G 2024-01-13 11:50
n267555-e3c7b76fa810-a -      -          727M  2024-01-13 19:52
n267555-e3c7b76fa810-b -      -          438M  2024-01-16 09:34
n267555-e3c7b76fa810-c -      -          384M  2024-01-21 11:42
n267555-e3c7b76fa810-f NR     /          213G  2024-01-26 13:42
root@mowa219-gjp4-zbook-freebsd:~ # bectl create n267555-e3c7b76fa810-g
root@mowa219-gjp4-zbook-freebsd:~ # bectl mount n267555-e3c7b76fa810-g /tmp/up
/tmp/up
root@mowa219-gjp4-zbook-freebsd:~ # pkg -r /tmp/up add /tmp/FreeBSD-vi-man-15.snap20240125183519.pkg
Installing FreeBSD-vi-man-15.snap20240125183519...
Newer FreeBSD version for package FreeBSD-vi-man:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1500012
- running kernel: 1500010
Ignore the mismatch and continue? [y/N]: y
`-- Installing FreeBSD-vi-15.snap20240125183519...
`-- Extracting FreeBSD-vi-15.snap20240125183519: 100%
Extracting FreeBSD-vi-man-15.snap20240125183519: 100%
root@mowa219-gjp4-zbook-freebsd:~ # chroot /tmp/up
root@mowa219-gjp4-zbook-freebsd:/ # which vi
/usr/bin/vi
root@mowa219-gjp4-zbook-freebsd:/ # man vi
root@mowa219-gjp4-zbook-freebsd:/ # exit
exit
root@mowa219-gjp4-zbook-freebsd:~ # bectl umount n267555-e3c7b76fa810-g
root@mowa219-gjp4-zbook-freebsd:~ # bectl destroy n267555-e3c7b76fa810-g
root@mowa219-gjp4-zbook-freebsd:~ # exit
logout
% man vi
No manual entry for "vi"
% which vi
vi: Command not found.
%

Condensed:
  1. prior to the commands, download two files to /tmp
  2. create then mount a boot environment
  3. add one file (for the manual page) to the mounted boot environment
  4. two packages are added
  5. test
  6. unmount then destroy the environment.
 
<https://wiki.freebsd.org/PkgBase#Initial_setup> step 6 of 6, additional surprises for me included three files in root's home directory:

Code:
root@mowa219-gjp4-zbook-freebsd:~ # pwd
/root
root@mowa219-gjp4-zbook-freebsd:~ # find . -name "*.pkgsave" -print
./.cshrc.pkgsave
./.shrc.pkgsave
./.profile.pkgsave
root@mowa219-gjp4-zbook-freebsd:~ #

Discussing at <https://discord.com/channels/727023752348434432/1204547751925391360> with a view to updating the wiki.



Attached: notes from an update to CURRENT. Condensed:

pkg -r /tmp/up upgrade --quiet

– whilst a new boot environment was mounted at /tmp/up, then:
  1. a check for *.pkgsave files in two places
  2. activate and boot the new environment.
 

Attachments

  • 2024-02-06 base and ports package upgrades.txt
    21.3 KB · Views: 38
So it looks like I can't add a single package unless the whole system is built with pkg-base.

Download the file, then use pkg-add(8).

Thanks, that works fine.

Though it turns out that my initial need to add kernel debugging has gone away. Some time ago I was suffering from intermittent crashes when trying to start certain programs such as libreoffice, audacity and gimp These problems have gone away after upgrading from 13.2 to 14.0 but I'll keep this procedure in mind if the need arises in the future.
 
Back
Top