RE: For base packages, origin is always "base".

From: Sulev-Madis Silber <freebsd-current-freebsd-org111_at_ketas.si.pri.ee>
Date: Tue, 23 Sep 2025 02:32:44 UTC

On September 23, 2025 4:24:15 AM GMT+03:00, Mark Millard <marklmi@yahoo.com> wrote:
>Sulev-Madis Silber <freebsd-current-freebsd-org111_at_ketas.si.pri.ee> wrote on
>Date: Mon, 22 Sep 2025 22:19:03 UTC :
>
>> the subject is what i found from
>> 
>> release/packages/template.ucl
>> 
>> when i tried to figure out why
>> 
>> pkg info -qoa
>> 
>> gave me series of "bases" on my current-with-pkgbase test
>> 
>> i had to do
>> 
>> pkg query %n
>
>There is also the likes of:
>
># pkg query "%n-%v" | less
>pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
>FreeBSD-acct-16.snap20250915234127
>FreeBSD-acct-dbg-16.snap20250915234127
>FreeBSD-acpi-16.snap20250910190529
>FreeBSD-acpi-dbg-16.snap20250905060419
>. . .
>
>It also shows the version information (that has
>an encoded date/time in the name).
>
>I'll note that there is also remote query:
>
># pkg rquery "%n-%v" | less
>pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
>FreeBSD-acct-16.snap20250915234127
>FreeBSD-acct-dbg-16.snap20250915234127
>FreeBSD-acpi-16.snap20250910190529
>FreeBSD-acpi-dbg-16.snap20250905060419
>. . .
>
>and its "-r" variation, such as:
>
># pkg rquery -rFreeBSD-base "%n-%v" | less
>pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
>FreeBSD-acct-16.snap20250915234127
>FreeBSD-acct-dbg-16.snap20250915234127
>FreeBSD-acpi-16.snap20250910190529
>FreeBSD-acpi-dbg-16.snap20250905060419
>. . .
>
>(pkg query does not involve or support -rFreeBSD-base
>or the like.)
>
>> or
>> 
>> pkg query %C/%n
>
>For visual reference:
>
># pkg query "%C/%n" | less
>pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
>base/FreeBSD-acct
>base/FreeBSD-acct-dbg
>base/FreeBSD-acpi
>base/FreeBSD-acpi-dbg
>. . .
>
># pkg rquery -rFreeBSD-base "%C/%n" | less
>pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
>base/FreeBSD-acct
>base/FreeBSD-acct-dbg
>base/FreeBSD-acpi
>base/FreeBSD-acpi-dbg
>. . .
>
>> in order to get "real package names". latter blows up if more than one category is added, of course
>
>As an example, base/FreeBSD-acct is not a 'real base package name'
>at all (note the extra word before "package"):
>
># pkg info base/FreeBSD-acct
>pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
>pkg: No package(s) matching base/FreeBSD-acct
>
>By contrast:
>
># pkg info FreeBSD-acct-16.snap20250915234127
>pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
>FreeBSD-acct-16.snap20250915234127
>Name           : FreeBSD-acct
>Version        : 16.snap20250915234127
>Installed on   : Tue Sep 16 20:57:58 2025 PDT
>Origin         : base
>Architecture   : FreeBSD:16:amd64
>Prefix         : /
>Categories     : base
>Licenses       : BSD2CLAUSE
>Maintainer     : re@FreeBSD.org
>WWW            : https://www.FreeBSD.org
>Comment        : System Accounting Utilities
>Shared Libs required:
>	libc++.so.1
>	libc.so.7
>	libcxxrt.so.1
>	libgcc_s.so.1
>	libm.so.5
>	libxo.so.0
>Annotations    :
>	FreeBSD_version: 1600000
>	repo_type      : binary
>	repository     : FreeBSD-base
>	set            : base
>Flat size      : 129KiB
>Description    :
>System Accounting Utilities
>
>> is there any reason the origin can't be like with "normal" (ports) packages? any technical things i don't see here? dependencies from ports can't be resolved anymore? i mean yes category and name is correct. but i mean why? :)
>
>The notation base/FreeBSD-acct is supposed
>to mean that (presuming default ports placement)
>/usr/ports/base/FreeBSD-acct/ is were to
>find the content for base/FreeBSD-acct .
>That is not where any of the files are for
>the acct base package.
>
>The files related to base packages are not in the
>ports tree at all, but in the src git repository
>(usually used via /usr/src/ references). They are
>not stored with the pkg program source: they are
>FreeBSD configuration files that pkg processes.
>
>Also, the ports git repository has a history
>that includes time period that had a category
>"base", the last before that was removed is
>visible via:
>
>https://cgit.freebsd.org/ports/tree/?id=fb16dfecae4a6efac9f3a78e0b759fb7a3c53de4
>
>It shows a "base" directory. Looking in it,
>there was:
>
>base/Makefile
>base/README
>base/binutils/
>base/gcc6/
>
>The commit that removed that base directory was:
>
>https://cgit.freebsd.org/ports/commit/base?id=2ed924f5ecb1efe13229a0a77d5e7a2c0cfaac09
>
>author John Baldwin <jhb@FreeBSD.org> 2023-02-13 21:14:34 +0000
>committer John Baldwin <jhb@FreeBSD.org> 2023-02-13 21:14:34 +0000
>
>commit 2ed924f5ecb1efe13229a0a77d5e7a2c0cfaac09 (patch)
>tree d26d1548ef28cbecf4630f49462c79367d59e7af /base
>parent f3b6cfcaa96240335e8c343a90bcbfa3ff7534c7 (diff)
>
>base/*: Remove the base ports to install an external toolchain in /usr.
>
>. . .
>
>Avoiding confusions with the ports tree base category
>and its history seems appropriate to me.
>
>> i even wanted to change it but there must be a reason for this and i thought i ask first. maybe get some insight to this too
>> 
>> this is my first try with pkgbase!
>
>
>
>===
>Mark Millard
>marklmi at yahoo.com
>
>

oh yes that makes sense

but problem i have is that they all get installed by pkg into system and it's db

so it's very confusing

i mean pkg also allows one to install whatever one wants. doesn't have to come neither ports nor base

yes there are limiting per repo but if it's in all one pkg info list, it gets messy

this was all fine when pkg was just for ports

i wonder what linux distros do here. many of them allow own repos. it would extremely cursed if it's like pkg here is

but i don't have real solution for this

it just did bite my ass when i was playing around with altroot in a dir and local repo, when i found i have good set, i wanted to save it and with %n i indeed did eventually. that made me list of packages i would be able to feed into install, doesn't matter which version they are

that was a wtf so i looked around why

and the freebsd- prefix is also understandable but hmm typing that in is huge hassle. of course i have copy and paste and scripts but still

so yeah, those were first impressions of pkgbase from someone who never tried it before but knows it. imagine if you know less. i immediately went to pkg-query manpage to see for name only var so i can build a list

i never installed any ports there but if one uses pkg info (maybe with -q), it doesn't help to see that there's also 49 "bases" installed. but i don't know what's fix either...