# pkg failure after upgrading pkg



## Jur van der Burg (Jan 14, 2017)

I'm trying to upgrade pkg:

```
[root@thegate] ~> pkg upgrade pkg
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01
Fetching packagesite.txz: 100%    6 MiB   2.0MB/s    00:03
Processing entries: 100%
FreeBSD repository update completed. 25910 packages processed.
Updating database digests format: 100%
New version of pkg detected; it needs to be installed first.
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
        pkg: 1.9.4 -> 1.9.4_1

Number of packages to be upgraded: 1

2 MiB to be downloaded.

Proceed with this action? [y/N]: y
Fetching pkg-1.9.4_1.txz: 100%    2 MiB 127.4kB/s    00:20
Checking integrity... done (0 conflicting)
[1/1] Upgrading pkg from 1.9.4 to 1.9.4_1...
[1/1] Extracting pkg-1.9.4_1: 100%
You may need to manually remove /usr/local/etc/pkg.conf if it is no longer needed.
/lib/libc.so.7: version FBSD_1.4 required by /usr/local/lib/libpkg.so.3 not found
[root@thegate] ~> pkg upgrade pkg
/lib/libc.so.7: version FBSD_1.4 required by /usr/local/lib/libpkg.so.3 not found

What happened? This is a standard 10.0 release install.

[root@thegate] ~> uname -a
FreeBSD xxxxxxxxxxxx x10.0-RELEASE-p7 FreeBSD 10.0-RELEASE-p7 #1 r269455: Sun Aug  3 13:04:26 CEST 2014     root@xxxxxxxxxxxx:/usr/obj/usr/src/sys/THEGATE  amd64
```
Jur.


----------



## gkontos (Jan 14, 2017)

It is an unsupported version. You need to upgrade to 10.3-RELEASE


----------



## Scott O'Connell (Jan 17, 2017)

gkontos said:


> It is an unsupported version. You need to upgrade to 10.3-RELEASE



Updating to FreeBSD 10.3-RELEASE is not an immediate option for one of our production systems.  That same system needed a package update and is now in limbo due to pkg1.9.4_1 being installed.   Is there a work-around to downgrade pkg so we can get past this immediate issue while scheduling an upgrade path?

I don't recall, and perhaps I've just been lucky, ever being in a situation where software installed on a system rendered itself unusable.  

Thanks in advance,
scotto


----------



## SirDice (Jan 18, 2017)

Scott O'Connell said:


> Is there a work-around to downgrade pkg so we can get past this immediate issue while scheduling an upgrade path?


No, because you're going to run into other problems too. 

FreeBSD 10.0 has been end-of-life since February 2015 and should have been upgraded a long time ago.


----------



## gkontos (Jan 18, 2017)

Scott O'Connell said:


> I don't recall, and perhaps I've just been lucky, ever being in a situation where software installed on a system rendered itself unusable.


The system is not unusable. You simply can not upgrade your software if you don't first upgrade the system. Does this sound strange to you?


----------



## SirDice (Jan 18, 2017)

gkontos said:


> Does this sound strange to you?


Try installing the latest software on Windows XP for example


----------



## Jur van der Burg (Jan 18, 2017)

Well, old or not, breaking a system this way is not nice. It is an example of bad engineering.

I attempted to upgrade via the documented procedures, but at the final stage after rebooting I did *freebsd-update install* which hoses the system disk to the point that the filesystem is not recognized anymore. If I do a rollback of the latest zfs snapshot I can recover, but I'm still at the same point.

I will do a new install of V11.0.


----------



## gkontos (Jan 18, 2017)

Jur van der Burg said:


> Well, old or not, breaking a system this way is not nice. It is an example of bad engineering.



Not upgrading software, which includes the OS is an example of bad engineering. You rely on EOL for a production system and you blame the system for that. 



Jur van der Burg said:


> I attempted to upgrade via the documented procedures, but at the final stage after rebooting I did *freebsd-update install* which hoses the system disk to the point that the filesystem is not recognized anymore. If I do a rollback of the latest zfs snapshot I can recover, but I'm still at the same point.
> 
> I will do a new install of V11.0.



You should first go to the latest patchset of the system that you are running and then upgrade. If you don't like that you can always use the source way.


----------



## SirDice (Jan 18, 2017)

Jur van der Burg said:


> Well, old or not, breaking a system this way is not nice. It is an example of bad engineering.


Erm, sorry, but you've had 2 years to upgrade. And the impending deprecation of all .0 versions has been known since the earliest versions of FreeBSD. All .0 versions expire around 3 months after the release of the .1 versions.


----------



## getopt (Jan 18, 2017)

Jur van der Burg said:


> Well, old or not, breaking a system this way is not nice. It is an example of bad engineering.


This sentence is an example for blaming others for one's own failure/laziness.
If you use FreeBSD privately on your own, you are free to do all the stupidest things, 
but if you were an IT-professional I'd fire you right now.


----------



## Scott O'Connell (Jan 18, 2017)

Sorry to have opened such a can of worms. 

It had been my experience that FreeBSD never FORCED me into anything.  It was our fault for not keeping up on when 10.2 would force a user into upgrading to keep all aspects of the system from working.

While I appreciate these things being my responsibility, we had attempted an earlier upgrade from 10.2 to 10.3 and a few aspects of our system became unusable due to the openssh changes made in 10.3.  We are a small shop, and didn't have the expertise to fix the legacy problem, so we had to continue running 10.2 until ready to implement the replacement for the broken code.

We are also dependent on some commercial code that is not supported on 11, and we can't control that one, but have been working with the developer for certification.

So while it was clearly wrong, we weren't "just" lazy or _purposely_ irresponsible, we just got ourselves into a pickle.

It's not a perfect world for everyone.

What surprised me here was that I've never been treated this way by the FreeBSD community.  There has always been a best effort to help with a work-around/solution to a problem with education on what the correct way.  Nothing like that here, just judgement on why it is our fault.  

So, notwithstanding what the experts have pointed out, I was able to get past my issue with a temporary workaround to get the package I needed installed.  I simply replaced /usr/lib/libpkg.so* with an older version long enough to fix the problem.


----------



## Gdan (Jan 18, 2017)

getopt said:


> This sentence is an example for blaming others for one's own failure/laziness.
> If you use FreeBSD privately on your own, you are free to do all the stupidest things,
> but if you were an IT-professional I'd fire you right now.



It seems to me that there are a LOT of people/companies who are clingers to fbsd 10.  I've had no problems with 11, but I wonder if it more than just 'laziness' that is causing folks to forgo the upgrade.


----------



## fscorrea (Jan 18, 2017)

Whereas I do agree the tone of some reproaches may have been too rough, that statement on "bad engineering" sounded baseless as criticism. For both sides being able the same argument: legacy ain't always a question of choice. If there was something wrong or was found could it have been done better, "bad engineering" would be leaving the matter as-is just for the sake of legacy - which is desirable but never at any cost.



Scott O'Connell said:


> I was able to get past my issue with a temporary workaround to get the package I needed installed.  I simply replaced /usr/lib/libpkg.so* with an older version long enough to fix the problem.



It's nice you found a solution, but I was ready to suggest building from ports then install with no need for upgrading pkg. Of course, this would keep the versioning problem untouched, but could work as a temporary fix. Building from ports was not an option? If I got it right, there was a package relying on upgraded pkg and that was all that there is about the issue. Should this package demand newer versioning itself or through dependencies, things would boil down to the starting point or almost there. Since ports, like pkg, keep being updated as well from time to time. But it could be worth a try if there were no choices available (like downgrading libs as you've done).


----------



## gkontos (Jan 19, 2017)

Scott O'Connell said:


> Sorry to have opened such a can of worms.
> 
> It had been my experience that FreeBSD never FORCED me into anything.  It was our fault for not keeping up on when 10.2 would force a user into upgrading to keep all aspects of the system from working.
> 
> ...



You are really confusing us here. Are you running FreeBSD 10.0-RELEASE as indicated or 10.2-RELEASE? There is a big difference.


----------



## SirDice (Jan 19, 2017)

Scott O'Connell said:


> We are also dependent on some commercial code that is not supported on 11, and we can't control that one, but have been working with the developer for certification.


Have you tried it with misc/compat10x?


----------



## Scott O'Connell (Jan 19, 2017)

gkontos said:


> You are really confusing us here. Are you running FreeBSD 10.0-RELEASE as indicated or 10.2-RELEASE? There is a big difference.



This system is on FreeBSD vhqerp02 10.2-RELEASE-p18.

EDIT: I just read back in the thread and saw the OP mentioned 10.0.   The problem on my 10.2 is the same.


----------



## blackhaz (Apr 6, 2017)

Similar happened to be today:


```
Proceed with this action? [y/N]: y
Fetching pkg-1.10.1.txz: 100%    3 MiB   2.6MB/s    00:01
Checking integrity... done (0 conflicting)
[1/1] Upgrading pkg from 1.9.4_1 to 1.10.1...
[1/1] Extracting pkg-1.10.1: 100%
/lib/libc.so.7: version FBSD_1.4 required by /usr/local/lib/libpkg.so.4 not found
```

And that's it. It bricked pkg for me. Yes, I'm still on 10.0, and the reasons are beyond the scope of this discussion. I have been preferring FreeBSD as my default server OS of choice for many years but this kind of developer attitude is really discouraging.  

A package manager should not be able to break itself.


----------



## SirDice (Apr 6, 2017)

blackhaz said:


> A package manager should not be able to break itself.


It's not the package manager that's broken. You're trying to run something that's specifically built for 10.3 on 10.0. All .0 versions expire 3 months after the release of .1. And both 10.1 and 10.2 have expired by now (it was already known when they would expire when they were released, so you could have seen this coming and could have planned accordingly).


----------



## getopt (Apr 6, 2017)

blackhaz said:


> A package manager should not be able to break itself.


As this sentence is true I'd advocate writing a PR. 
Pkg should issue a warning with a decent information and that's it.


SirDice said:


> You're trying to run something that's specifically built for 10.3 on 10.0.


True, but a clever designed software should in such a case just refuse working but not break.


----------



## blackhaz (Apr 6, 2017)

SirDice, I would agree with you, but pkg suggested to upgrade itself. No warnings. Something that is specifically built for 10.3 should not be able to suggest to install on 10.0. So the pkg upgrade philosophy is broken somewhere. A user must be able to stay with whatever OS version he chooses, for reasons known only to himself, without fear that the current software will force to break itself. Maybe my galactic simulation code is written for 10.0? Each person has its own black holes. Pkg suggested the upgrade itself and broke itself.

There's already a related PR:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216805

The fix is planned already. I'll add a comment there.

Does anybody know how to downgrade pkg back?


----------



## getopt (Apr 6, 2017)

blackhaz said:


> Does anybody know how to downgrade pkg back?


Try to find saved previous version there `ls -l /var/cache/pkg/pkg*`.


----------



## blackhaz (Apr 6, 2017)

Thanks. pkg-static continues to work, by the way.


----------



## getopt (Apr 6, 2017)

Do `pkg-static bootstrap -f` to force a re-installation of pkg. See pkg(7).


----------



## SirDice (Apr 6, 2017)

blackhaz said:


> Something that is specifically built for 10.3 should not be able to suggest to install on 10.0.


It can't tell the difference. The ${ABI} string is the same so you're referencing the same repository.


----------



## sabri (Apr 11, 2017)

blackhaz said:


> I have been preferring FreeBSD as my default server OS of choice for many years but this kind of developer attitude is really discouraging.



Same here. I've been using FreeBSD since the Linux  < 2.2.19 root exploit came out in April 2001. It's increasingly difficult to properly maintain my FreeBSD systems, and an answer of "shut up and upgrade", is not acceptable if you want FreeBSD to be taken seriously.

Time to give Linux a chance again. Farewell FreeBSD, it is time to part ways.


----------



## Dmitriy_K (Oct 26, 2017)

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.


----------



## SirDice (Oct 26, 2017)

For production servers I highly recommend setting up your own repository. That will give you all the freedom you want.



Dmitriy_K said:


> 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.


----------



## ShelLuser (Oct 26, 2017)

Some people within this thread are obviously amateurs. If this is the future generation of systems administrators then <$entity> help us all 

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.


----------



## blackhaz (Jan 20, 2018)

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.


----------



## gkontos (Jan 20, 2018)

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.


----------



## Deleted member 45312 (Jan 20, 2018)

blackhaz said:


> 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.


----------



## blackhaz (Jan 21, 2018)

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.


----------



## tobik@ (Jan 21, 2018)

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.


----------



## illukas (Feb 9, 2018)

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....


----------



## SirDice (Feb 9, 2018)

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.



illukas said:


> What pkg did that broke it?


Packages for 10.x are built for 10.3 as that's the lowest, still supported, version.



illukas said:


> What is correct solution for this situation (manually remove zabbix-agent)?


Upgrade the system to 10.3 or 10.4.



illukas said:


> 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?



illukas said:


> 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.


----------



## illukas (Feb 9, 2018)

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)


----------



## CraigHB (Feb 9, 2018)

SirDice said:


> 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.


----------



## SirDice (Feb 9, 2018)

CraigHB said:


> 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.


----------



## ShelLuser (Feb 9, 2018)

illukas said:


> 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.



illukas said:


> 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    Not to mention totally irrelevant to the issue at hand.



illukas said:


> 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.



illukas said:


> 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).


----------



## illukas (Feb 9, 2018)

#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  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..._


----------



## ShelLuser (Feb 9, 2018)

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.



illukas said:


> 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.



illukas said:


> 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.


----------



## illukas (Feb 9, 2018)

ShelLuser said:


> 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...


----------



## topcat (Feb 10, 2018)

tobik@ said:


> 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.


----------



## fscorrea (Feb 11, 2018)

ShelLuser said:


> illukas said:
> 
> 
> > OK  it goes even more strange. Why it did not notice me? Where should i know it will SILENTLY update pkg also?
> ...


That's right. blackhaz said so himself:



blackhaz said:


> 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?


----------



## illukas (Feb 12, 2018)

topcat said:


> 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


----------

