pkg 2.0.0 problems

Hmm. The problem I encountered is the same I've had when my poudriere package repo was instructed to rebuild some but not all packages. pkg wanted to remove some 300 packages. I used the list to generate a list of port origins which was fed back into poudriere to rebuild those packages and their prerequisites. After the rebuild had completed the pkg upgrade completed successfully.

This isn't a new problem. The fact that virtually everything depends on pkg means that if there are any missing packages in the (my) repo, those will be removed. I can't comment about the official FreeBSD repo, as I don't manage that, but my experience with my repo, this has always been the case. And it was here as well.

Since the upgrade and pkg upgrading/reinstalling affected packages from the almost rebuilt repo, life has been good. I don't think I can pile onto "there's something wrong with pkg" ATM.
 
In devel/llvm* and corresponding devel/llvm*@lite case and alike, assuming non-lite include 100% of @lite, ports framework should have mechanisms to allow non-lite flaver even if anything depending forcibly upon @lite version and pkg allows it, too
(i.e., BUILD_DEPENDS=llvm19>0:devel/llvm19@lite allow both devel/llvm19 and devel/llvm19@lite even if pkg has dependency info to devel/llvm19@lite).

If I recall correctly, ports allows it if anything specified before ":" exists, but maybe pkg doesn't.

Of course, non-inclucive flavors (in the example above, if llvm19-lite>0 is specified and it's only included in @lite flavor and not non-lite flavor), @lite should not be allowed anyway as ports.
 
However, my main concern here is for the reputation of FreeBSD. Given the scope of the problem, I hope that there's a lesson to be learned...

Agreed. Besides this issue there is currently the issue with bhyve and redhat derived linux distros on systems with AMD CPUs. Between the two it puts FreeBSD in an uncomfortable position.
 
I see a bunch of security advisories have just been released recommending that freebsd-update(8) be run.

It's quite usual to run pkg upgrade immediately prior to, and after, an update.

So the the security team are encouraging that pkg 2.0.x be installed as widely as possible... I hope that 2.0.x is fixed...

Edit: Sir Dice and Crivens, this bug should have never escaped "current", but it's now in "quarterly". I reckon that some better co-ordination, to stop the evolving rot, is desirable.
 
Edit: Sir Dice and Crivens, this bug should have never escaped "current", but it's now in "quarterly". I reckon that some better co-ordination, to stop the evolving rot, is desirable.
Y'know, the mods are not necessarily on the dev / releng team that releases the kernel and system components... According to the current team list, Colin Percival and Ed Maste are members. But even then there's gotta be something between the dev and irate, uninformed users... right?

A lot of my own commentary would probably betray just how uninformed I am about the actual FreeBSD testing and development processes taking place. Yeah, information about it is out there, it's just a matter of putting in some time and effort into research and follow-up, and a willingness to learn what's actually going on, and how the situation brewed up in the first place.

This does cut both ways...
 
Y'know, the mods are not necessarily on the dev / releng team
Hmm, I'm suspecting that the scope of the "pkg problem" may not yet be widely understood, and was kind of hoping that the moderators would know who to contact to suggest that a "whole of ecosystem" plan is required. Maybe issue a broadcast warning, and discourage updates until pkg is fixed?
 
Hmm, I'm suspecting that the scope of the "pkg problem" may not yet be widely understood, and was kind of hoping that the moderators would know who to contact to suggest that a "whole of ecosystem" plan is required. Maybe issue a broadcast warning, and discourage updates until pkg is fixed?
I vaguely recall seeing port compilation issues on 13.2-RELEASE, the Forums were abuzz with similar complaints. At the time, I had everything I needed already working on my systems, so I managed to sit back on the sidelines. I did make a backup of the ports-mgmt/pkg package, the source tarball, and the port's Makefile, so if I get hosed by this current storm, I will at least have a backup I can use.
 
I see a bunch of security advisories have just been released recommending that freebsd-update(8) be run.

It's quite usual to run pkg upgrade immediately prior to, and after, an update.

So the the security team are encouraging that pkg 2.0.x be installed as widely as possible... I hope that 2.0.x is fixed...
Can you elaborate: to what are you referring to in these last two sentences?

Looking at Blogs and Newsfeeds, I can see this list:
The only reference to pkg upgrade I see, is in FreeBSD-EN-25:03.tzdata:
Code:
Please note that some third party software, for instance PHP, Ruby, Java,
Perl and Python, may be using different zoneinfo data sources, in such cases
this software must be updated separately.  Software packages that are
installed via binary packages can be upgraded by executing 'pkg upgrade'.
 
Can you elaborate: to what are you referring to in these last two sentences?

Looking at Blogs and Newsfeeds, I can see this lis
The only reference to pkg upgrade I see, is in FreeBSD-EN-25:03.tzdata:
Code:
Please note that some third party software, for instance PHP, Ruby, Java,
Perl and Python, may be using different zoneinfo data sources, in such cases
this software must be updated separately.  Software packages that are
installed via binary packages can be upgraded by executing 'pkg upgrade'.
I automatically run a pkg upgrade after applying security updates with freebsd-update to cover all contingencies, like those you mention above.

For that reason, I convinced myself it was mandatory.

But you are quite right. It's not mandatory, and I was wrong to assert that it was. Reading the manual first would have been a good idea...
 
A lot of my own commentary would probably betray just how uninformed I am about the actual FreeBSD testing and development processes taking place. Yeah, information about it is out there, it's just a matter of putting in some time and effort into research and follow-up, and a willingness to learn what's actually going on, and how the situation brewed up in the first place.
What I noticed is that on large portals dedicated to open source (for example, opennet.ru) there is no mention of the problem that we are servicing here. Now, if the problem had reached the level of hacking something serious, then most likely all the media would have started writing about the consequences of pkg 2.x.x. But this did not happen. A kind of "local" collapse occurred, accompanied by nervousness, discontent, etc. What I learned from this:
1. Do not rush to update, but read reports and notes more carefully.
2. Freeze (lock) more programs. Which is what I do.
3. Make a backup of the SSD to ISO every week. Previously, I did it once a month.
4. It is impossible to keep track of everything.
5. FreeBSD is good because it has algorithms for recovery, rollback, repair. It is harder to fix something in Linux.

Although, even here, not everything can be tracked down and fixed. An example for users of Canon digital cameras: https://www.freshports.org/filesystems/gphotofs/ worked fine for me until a certain point. But after some update of something, gphotofs mounts the memory card, but... damn, the speed is so low that now I take out the card and transfer files to the PC via a card reader. Who the hell knows HOW TO FORESEE SUCH problems?
This just pisses me off...
 
Last edited:
I had the same issue with `pkg` (2.0.4), but today while running `pkg update / pkg upgrade`, FreeBSD proposed to upgrade to 2.0.5, which fixed my issue
 
I wonder what were the big changes that changed the major version of pkg. I looked in the commit log, but it did not tell me much. Are there any big improvements?
 
I wonder what were the big changes that changed the major version of pkg. I looked in the commit log, but it did not tell me much. Are there any big improvements?
Considering it "improvements" or not depends.
But recorded data format is changed, thus, major upgrade.
Code:
- pkg now tracks shlibs with tagging:  (Sponsored by the FreeBSD Foundation)
   libfoo.so.1.0.0          - native (no change to status quo)
   libfoo.so.1.0.0:32       - compat 32
   libfoo.so.1.0.0:Linux    - compat Linux
   libfoo.so.1.0.0:Linux:32 - compat Linux 32
- pkg tracks 32bit compat shlibs     (Sponsored by the FreeBSD Foundation)
- pkg can track linux shlibs for linux compatibility (disabled by default) via  TRACK_LINUX_COMPAT_SHLIBS
- new SHLIB_REQUIRE_IGNORE_GLOB and SHLIB_REQUIRE_IGNORE_REGEX to filter out some libraries to be added to shlibs_required list
- ALTABI is not used anymore at all and is considered deprecated, only ABI is considered

And more, in preparation with upcoming pkgbase,
Code:
- pkg now tracks libraries for the base system on FreeBSD in both pkgbase and non pkgbase setup

Finally, some options are removed, and if there are some scripts in the wild depends on the options must be rewritten. I think broken backward compatibilities SHALL be a reason for major version change, even if no other changes are made at all.
Code:
- check -B and -r options have been removed
 
I wonder what were the big changes that changed the major version of pkg. I looked in the commit log, but it did not tell me much. Are there any big improvements?
I don't have the technical level to explain them all, but in case you didn't see that already here is the changelog from 1.21.3 to 2.00:
I don't really know if these are big improvements but there are a lot of fixes and changes. It could be the source of the problem, may be too much at once I don't know.
One thing for sure praise all of quarterly and pkg version 1.21.3 🙏
 
in case you didn't see that already here is the changelog from 1.21.3 to 2.00
Not sure why, but currently cgit.freebsd.org seems to be malfunctioning.
No commit logs shown (diffs can be seen), impossible to see contents of each files.

In the mean time, not so good (entries in each pages are limited to 1000, thus cannot fully browse large directories like devel/ category, github mirror can be used. The entry for pkg 2.0.0 is here.
 
I wonder what were the big changes that changed the major version of pkg. I looked in the commit log, but it did not tell me much. Are there any big improvements?
Yes, there are. These can be viewed locally in /usr/local/share/doc/pkg/NEWS or at NEWS. Note that the rolling over to 2.0.0 relates to only the last (internal) small advancement of 1.21.99 to 2.0.0; you'll have to view everything from v. 1.20.99.12 and later*.
However, at FreshPorts: view commit 2.0.0 message from its Commit History section; also at ports-mgmt/pkg: update to 2.0.0**.

Given the essential role of pkg(8) for FreeBSD users, I'm hoping that ports-mgmt/pkg will, in the near future, get the attention in its development, communication, preparation and guidance in the run-up to a new big release more akin to FreeBSD Release Engineering.



* To pick one example that I bumped into, related to the 'kmods' where I couldn't get multiple repositories to work in one pkg-upgrade command. Later, I found this had been reported at pkg --repository option only works if repo is enabled - contrary to man page description #2197 on Nov 9, 2023 (no official response, still marked open). Mentioned as resolved in update to 2.0.0; more detailed in v. 1.21.99.4.:
Code:
- pkg: -r command can be used multiple times to only enable

** Edit: I missed that mentioned in #118 by T-Aoki already.
 
Edit: Sir Dice and Crivens, this bug should have never escaped "current", but it's now in "quarterly". I reckon that some better co-ordination, to stop the evolving rot, is desirable.
Y'know, the mods are not necessarily on the dev / releng team that releases the kernel and system components... According to the current team list, Colin Percival and Ed Maste are members. But even then there's gotta be something between the dev and irate, uninformed users... right?
Not this again? FreeBSD Forum staff != FreeBSD Foundation staff.
 
Can you see commit messages here, usually shown between "parent" line and "Diffstat" block? Currently I can see nothing there.
And can you read the contents of Makefile here? For me, line numbers are shown but actual contents aren't.
If you can see both properly, it should be the problem of the mirrors I'm introuced to by the load balancer.
Screenshot of commit messages that I'm seeing:
1738697066844.png

I'm happy bugs are getting fixed, but that still doesn't change my personal opinion that this should have been limited to 15-CURRENT if devs are gonna have a major version bump and a thorough re-working of how pkg(8) even functions. IMHO, this would be a nice feature announcement for the release of FreeBSD 15...
 
Can you see commit messages here, usually shown between "parent" line and "Diffstat" block? Currently I can see nothing there.
And can you read the contents of Makefile here? For me, line numbers are shown but actual contents aren't.
If you can see both properly, it should be the problem of the mirrors I'm introuced to by the load balancer.
As fernandel noted, no problems.

However, because of the special set-up of pkg and co. (at least pkg and pkg-devel), all/most activity and code changes are only visible at freebsd/pkg - github home* and are then 'transported' to their final git targets:
surrounded by more pkg-like utilities. Their targets visible as part of the (ports) source tree at both ports-mgmt/pkg - github view or ports-mgmt/pkg - cgit view but with minimal view of changes or detailed commit history.

The big (diff) changes you can view through for example: diff - v. 1.21.3... v. 2.0.0:
Code:
 Showing 2,582 changed files with 122,770 additions and 116,706 deletions.
I view this as substantial.

___
* I'm still having difficulty how everything works & finding my way; perhaps even pkg(7) is in there somewhere)
 
Back
Top