pkg failure after upgrading pkg

I completely agree with the previous summary of the situation with FreeBSD updates.
I had the same problem with pkg and so on.
Support for servers FreeBSD has become unacceptably difficult for those cases when it is production servers that have feature of lagging with updates for various reasons (usually caused by necessity of old versions PHP etc.).
Web developers require long-term stability of software versions, which can not be achieved with a OS release support period of less than 5 years.
I also have to partially migrate to Linux for this reason.
It would be nice if someone brought this to core-teem of FreeBSD.
 
For production servers I highly recommend setting up your own repository. That will give you all the freedom you want.

Web developers require long-term stability of software versions, which can not be achieved with a OS release support period of less than 5 years.
Webdevelopers don't care about the version of the OS. They only care about the version of PHP (or whatever else they're using). And since those are the same for every version on every architecture, there is no difference for them. It really doesn't matter if they're using PHP 5.6 on FreeBSD 9.x, 10.x or 11.x, the PHP version will be exactly the same. Besides that, you have a multitude of versions to pick from (PHP 5.6, 7.0 and 7.1) and you're not limited to a particular version.

I also have to partially migrate to Linux for this reason.
Good luck with that. Your webdevelopers aren't going to happy when an upgrade of the OS also upgrades to an entirely new version of PHP and you have no control over that as it's "baked" into the version of the OS you're using.

It would be nice if someone brought this to core-teem of FreeBSD.
The release and support schedule changed with 11.0. Now the whole 11.x branch will be supported for at least 5 years but only the last minor version will be supported. So when 11.2 eventually will come out 11.1 will be EoL three months later.
 
Some people within this thread are obviously amateurs. If this is the future generation of systems administrators then <$entity> help us all :D

Now, if you go through my posts you'll realize I'm hardly an RTFM kind of guy, but seriously... Do your homework already.

I started using FreeBSD 9 several years ago and eventually upgraded to 10. As it so happens 10.0 was released in January 2014, look here. We're now at October 2017, aka: 4 years and 9 months after the first release. And the 10 branch (now hinting at 10.4) will be supported until the 31st of October 2018.

Which will effectively account for a product giving you 5 years and 9 months worth of free of charge support.

Better yet: upgrading from 10.4 to 11.x won't be a nightmare because unlike Linux LTS versions you won't have to skip several major versions (because releases just kept ongoing in the background). LTS versions which also require constant updating I might add. Including the kernel (reboot!). Seriously, that's no different from upgrading from FreeBSD 10.3 to 10.4; with the main difference that those updates happen a whole lot less frequent.

However... I don't think that's why some of us gave some of you "attitude". Hardly.

The reason it rattles some of us is because you're basically using seriously out of date software which has a whole lot of exploits and other nastiness in it, and you obviously can't be bothered to upgrade. That would tick of any professional worth his dime because we can see what the effect of this severe negligence can be. You do too. You see it happening in your INBOX every day, provided your spam filter didn't catch it. And that's only the tip of the iceberg.

No, we're not giving you an attitude out of arrogance. We're doing that because we know what's most likely going to happen next.
 
Alas, I am seriously considering leaving FreeBSD back to Debian as my default go-to UNIX. pkg broke itself on a few of my other FreeBSD-10 servers. Bootstrapping with static pkg doesn't help. I need my own upgrade schedule and cannot afford my systems to follow somebody's else. Chromecast isn't working. Skype isn't working. I can cope with picking the right hardware, and as much as I appreciate and advocate FreeBSD, its hierarchy, cleanliness, its Handbook, licensing, community, and would sincerely like to continue using it, there are just too many real-life restrictions on using it as a both desktop and a server for me.

Perhaps, my use cases are wrong. I've been deploying FreeBSD as web (HTTP) optimization gateways for satellite networks, some basic stuff like web servers, DNS, etc, and as a desktop at home. Perhaps, it's all around ZFS and file storage now. My bottom line here is, pkg cannot break itself, even on an outdated system, and leave no point of return. This is an incredible engineering flaw.
 
I really don't understand the attitude that some people have when it comes to maintaining their systems. Package management was never that easy as it is today. Upgrading the base OS has also become a matter of a few minutes if you use the binary method.

You want to stay with a non supported version ? That's your choice too but do not complaint when you can't install new software.
 
My bottom line here is, pkg cannot break itself, even on an outdated system, and leave no point of return. This is an incredible engineering flaw.
Use the ports tree and build your own ports. This was the usual way long time ago. I'm running FreeBSD since 3.1-RELEASE.
Now I do the same but I'm using ports-mgmt/poudriere.
 
You know, I appreciate this advice, but as a FreeBSD user, I am seeking for an acknowledgement from the community this story with pkg isn't normal. I am looking for assurance my way of thinking is compatible with the community. That allows me to expect where the project is heading to. Maybe I am crazy, but if I complain on a critical system utility breaking itself and people tell me not to use it, I think something's wrong. Even if my FreeBSD version is not supported anymore, it shouldn't allow a critical part of it to suddenly break itself. By the way, pkg has suggested to install the new version of itself automatically. I was in the middle of doing "pkg install" of something, and it asked to update itself first, and broke.
 
Starting with pkg 1.10.4, pkg will refuse to deal with repositories with packages that were built for a FreeBSD version newer than the currently running version. So it'll not "break itself" anymore unless you decide to override this behavior.
 
Same thing happened with me today...
Got a old Freebsd (important)router as a heritage from old admin (BSD version 10.0-RELEASE FreeBSD 10.0-RELEASE).

I made:
pkg update
pkg search zabbix
pkg install zabbix34-agent-3.4.6
#pkg installed only agent (no pkg & other updates)...

and we ended a broken pkg system:
/lib/libc.so.7: version FBSD_1.4 required by /usr/local/lib/libpkg.so.4 not found

I know i should read more and should update etc etc.

What pkg did that broke it?
As far as i understand it installed only agent- nothing more?
What is actually broken: pkg or something else also deeper in system?
What is correct solution for this situation (manually remove zabbix-agent)?
How i can manually remove zabbix package, so that pkg works again?

I'm all linux guy, this kaind of BSD behavior is something new & unexpected to me...
#It's like debian 7 get's out of support and if you do apt-get update, it automatically (without notice) goes to debian9 repos. If you are installing something it installs automatically debian9 packages, witch as expected would not work....
 
FreeBSD 10.0 has been End-of-Life since February 2015 and is not supported any more. Ever since the dawn of time all .0 versions have expired three months after the release of a .1 version.

What pkg did that broke it?
Packages for 10.x are built for 10.3 as that's the lowest, still supported, version.

What is correct solution for this situation (manually remove zabbix-agent)?
Upgrade the system to 10.3 or 10.4.

I'm all Linux guy, this kind of BSD behavior is something new & unexpected to me...
So you're telling me that you've never had to upgrade your Linux systems because they were End-of-Life?

It's like debian 7 get's out of support and if you do apt-get update, it automatically (without notice) goes to debian9 repos.
It's more akin to silently getting upgraded from 7.1 to 7.5, except it doesn't upgrade the OS only third party software. One of the biggest differences with many Linux distributions is that the FreeBSD OS and port/packages are two separate entities.
 
Still my question remains;
What pkg did that broke it? Is only pkg broken or something else also?

#So you're telling me that you've never had to upgrade your Linux systems because they were End-of-Life?
Sure i have and i will in future, but in linux world it won't broke if you're using old outdated system and installing some software from repo- you can still install packages designated for this old system and you can be sure you are not breaking anything. Let's say i want to install nmap in debian 7: i do apt-get update && apt-get install nmap and everything is ok- it wont broke...

#It's more akin to silently getting upgraded from 7.1 to 7.5, except it doesn't upgrade the OS only third party software
i understand it, but as far as i understand i installed only third party soft (zabbix) and it somehow (i don't understand how) broke pkg, which is part of system packages, or i'm missing something?
So, when i remove zabbix-agent (somehow) everything would be ok..

Upgrading system is in plan but in meanwhile i want to be sure that this last install what i did, did not broke whole system- it is still ok: bootable and in working order (faulty is only pkg management)
 
So you're telling me that you've never had to upgrade your Linux systems because they were End-of-Life?

I was a Debian user for a long time. With Debian you can run any major version pretty much indefinitely by pointing the package tool to the appropriate repository. Though minor updates are automated. Control over major updates can be made fully manual by pointing to the version instead of the branch. In that way you can run any major version as long as you like, though doing that can lead to the usual problems in running unsupported software. Being new to FreeBSD I'm not that familiar with how things work with updates and the packaging system. With FreeBSD it seems you can't be stagnate in updating to the next major version, which is actually something I tend to do.
 
With FreeBSD it seems you can't be stagnate in updating to the next major version, which is actually something I tend to do.
With 10.x the support schedule is different, it changed rather significantly for 11.0 and onward. Previously, odd and even minor versions had different support schedules and multiple minor versions could be supported. With 11.0 this changed, now only the latest minor version from a major branch will be supported. So when 11.2 will be released, 11.1 will be EoL three months later.
 
Still my question remains;
What pkg did that broke it? Is only pkg broken or something else also?
You already answered your own question. I mean, you said yourself that you ended up with a broken pkg system? The moment you tried to install a new package the system also noticed pkg to be out of date so that got upgraded as well. With the above result.

I think it's safe to consider every package you installed as broken. For the simple reason that the ports collection is always based on the latest supported versions of FreeBSD. There are no separate repositories for specific versions, as SirDice also mentioned above.

Sure i have and i will in future, but in linux world it won't broke if you're using old outdated system and installing some software from repo- you can still install packages designated for this old system and you can be sure you are not breaking anything. Let's say i want to install nmap in debian 7: i do apt-get update && apt-get install nmap and everything is ok- it wont broke...
It's more likely that the repository won't be available therefor you can no longer install any software at all. After all: Debian only maintains 3 repositories: Stable, Unstable and Testing. Once a version goes EOL then so are your chances of installing software. You could try one of these repositories but chances are high that you'll get the exact same results as you had here.

There really isn't as much difference as you now pretend to be. See also Debian's official software repository.

Either way, that's kinda offtopic :D Not to mention totally irrelevant to the issue at hand.

i understand it, but as far as i understand i installed only third party soft (zabbix) and it somehow (i don't understand how) broke pkg, which is part of system packages, or i'm missing something?
So, when i remove zabbix-agent (somehow) everything would be ok..
ports-mgmt/pkg also got updated. It's not part of the base system and therefor follows the same directions as any other port. As mentioned above: the moment you installed those packages it started by updating pkg itself. You should be able to check I think because by default pkg logs to syslog, therefor all its actions can be traced back.

I heavily optimized my /etc/syslog.conf in order to maintain /var/log/pkg.log but by default... hmm. Probably in /var/log/messages, you might want to start looking there.

Upgrading system is in plan but in meanwhile i want to be sure that this last install what i did, did not broke whole system- it is still ok: bootable and in working order (faulty is only pkg management)
I know I'm playing the devils advocate right now but even so this is still true: you should honestly consider that entire system broken. I mean it's almost 3 years old and trust me: there have been numerous of bugs and exploits found in the mean time. Running that as a router is plain out a bad idea(tm).
 
#The moment you tried to install a new package the system also noticed pkg to be out of date so that got upgraded as well. With the above result.
OK it goes even more strange. Why it did not notice me? Where should i know it will SILENTLY update pkg also?
There were no notice at all, that pkg will update itself or install something other than zabbix-agent..

#I think it's safe to consider every package you installed as broken.
OK that's goot to hear, that only one package is broken, this what i tryed to install CORRECT?...

#It's more likely that the repository won't be available therefor you can no longer install any software at all. After all: Debian only maintains 3 repositories: Stable, Unstable and Testing. Once a version goes EOL then so are your chances of installing software. You could try one of these repositories but chances are high that you'll get the exact same results as you had here.
You are wrong. If release gets EOL, then it's repositories get's moved into archive. So if you do nothing you are correct- you are not able to install any additional software, BUT if you are aware and know that in EOL repo gets moved into archive, then you can change repo location and you good to go.. Even debian 1.2 :)
http://archive.debian.org/debian/dists/

#Either way, that's kinda offtopic :D Not to mention totally irrelevant to the issue at hand.
It's so and not so. This kaind of behaiviour what i had (not noticying user from additional software installs, no warning that it WILL broke system etc) is really a experience what drives users away from BSD. Before i had no feelings about BSD- i knew it still exist and i knew it feels a little like linux, but still totally different, but this kaind of breiking i had is not expected. Most of linux distros protect users from this kaind of breiking, even gentoo.... Seriously, it was a real bad experience...

#ports-mgmt/pkg also got updated. It's not part of the base system and therefor follows the same directions as any other port. As mentioned above: the moment you installed those packages it started by updating pkg itself.
As i noted it was without notice... All i saw, it installed zabbix-agent and all was golden... Except real result was totally different as expected :) IF there would be a warning about updating pkg i would stop (@gentoo updating portage or gcc)...

#I know I'm playing the devils advocate right now but even so this is still true: you should honestly consider that entire system broken. I mean it's almost 3 years old and trust me: there have been numerous of bugs and exploits found in the mean time.
Thank you, note taken and we consider it as broken system. For now it is important that machine will boot into working condition (without zabbix agent, what failed to install)

#Running that as a router is plain out a bad idea(tm).
I would argue with you...but it is out of this topic :) Think it as a black box with no external access, no services, plain routing, nat portfwd- no services to exploit etc...

For future BSD developmnets:
*warn users if something WILL broke system (pkg in EOL systems etc..)
*give user feedback about all packages to be installed (pkg lists ALL what it will do...)

Checked /var/log/messages no traces about pkg

Just in case: don't get me wrong, i don't want to say that *BSD is bad. I still think it has a place in this world and i see a way to make it better...
Just in my case it scares me away from BSD, because i do not know what os is actualy doing. For excample gentoo is very chatty and i as a user know excactly what it will do.
I have had very good experience with pfsense and now opposite experience with pure bsd and it is quite different, so mixed emotions...

It's not that i have to know what OS is doing it is OS that have to tell me what it is doing...
 
First... Please use the quote feature. It's not hard: if you click reply then the original message gets quoted and that makes it much easier to respond. This is kinda obnoxious because there's no easy way for me to differentiate between my comments and yours.

OK it goes even more strange. Why it did not notice me? Where should i know it will SILENTLY update pkg also?
There were no notice at all, that pkg will update itself or install something other than zabbix-agent..
I find that hard to believe. When you issue an upgrade / install command then PKG will always give a list of the things it's about to do. So a list of all the software it's about to install and/or upgrade. You might want to check /var/log/messages, it should list some stuff in there.

You are wrong. If release gets EOL, then it's repositories get's moved into archive.
Good call, I stand corrected on that. Totally forgot about the archives.
 
I find that hard to believe. When you issue an upgrade / install command then PKG will always give a list of the things it's about to do. So a list of all the software it's about to install and/or upgrade. You might want to check /var/log/messages, it should list some stuff in there.
As i noted did not see anything else to be installed/upgraded.
I did:
pkg update
pkg search zabbix
pkg install zabbix34-agent-3.4.6
#pkg installed only zabbix34-agent-3.4.6 (no pkg & other updates)...

Also checked /var/log/messages no traces about pkg
I'll give a little deeper investigation of logs in monday...
 
Starting with pkg 1.10.4, pkg will refuse to deal with repositories with packages that were built for a FreeBSD version newer than the currently running version. So it'll not "break itself" anymore unless you decide to override this behavior.

While I agree that upgrading is a good idea, I'm glad this got implemented. It's nice to have this kind of warning!

The point is that the ports system is like Kali or Arch/Manjaro, in other words a rolling release. There are no old versions after the tree gets updated. I can't remember ATM but I think the package repos point to the latest builds (there are different branches but they don't support EOL versions)?

So, once the tree/packages are updated to use libs from a new base system version, your entire old system is automatically broken. You cannot install any new software, from the web repos. This should not come as a surprise.

I think if you use the full DVD as your pkg source, then it will continue to work indefinitely. Worth a try going forward if an upgrade is impossible. However do try to avoid mixing and matching repos.
 
OK it goes even more strange. Why it did not notice me? Where should i know it will SILENTLY update pkg also?
There were no notice at all, that pkg will update itself or install something other than zabbix-agent..

I find that hard to believe. When you issue an upgrade / install command then PKG will always give a list of the things it's about to do. So a list of all the software it's about to install and/or upgrade.
That's right. blackhaz said so himself:

You know, I appreciate this advice, but as a FreeBSD user, I am seeking for an acknowledgement from the community this story with pkg isn't normal. I am looking for assurance my way of thinking is compatible with the community. That allows me to expect where the project is heading to. Maybe I am crazy, but if I complain on a critical system utility breaking itself and people tell me not to use it, I think something's wrong. Even if my FreeBSD version is not supported anymore, it shouldn't allow a critical part of it to suddenly break itself. By the way, pkg has suggested to install the new version of itself automatically. I was in the middle of doing "pkg install" of something, and it asked to update itself first, and broke.
Maybe pkg misbehaved since running in an EOL system after all?
 
So, once the tree/packages are updated to use libs from a new base system version, your entire old system is automatically broken. You cannot install any new software, from the web repos. This should not come as a surprise.
If it would be so, then it would be nice... at least give some warning to user, that pkg etc will be broken down if you continue... As i understand it got implemented in newer relases- good work.

Anyway about my case i can't argue about the warning, i already closed terminal but as far as i remember, install list contained only zabbix-agentd...

Only trace in log files was:
/var/log/messages:Feb 9 11:50:02 BLAH pkg: pkg reinstalled: 1.10.4
and no trace about zabbix-agentd...

Based on log files, i start to feel that i remember wrongly :)

Thank you for your help
 
Back
Top