# Updating with ports problems



## mdudley (Jun 13, 2018)

I am needing to update some ports for security reasons.  I am running FreeBSD 10.3.  When I try to run the "make install" on the openssl, it says that I need to update my perl first.  When I try to update perl from V5.20.3 to the V5.28 I get the following message:

```
This is *NOT* the DEFAULT perl version

It will *NOT* install /usr/local/bin/perl

It will *ONLY* install /usr/local/bin/perl5.28.0

DEFAULT_VERSIONS+=perl5=5.28

##################################################
/!\ ERROR: /!\

Ports Collection support for your FreeBSD version has ended, and no ports are
guaranteed to build on this system. Please upgrade to a supported release.

No support will be provided if you silence this message by defining
ALLOW_UNSUPPORTED_SYSTEM.

*** Error code 1

Stop.
make[1]: stopped in /usr/ports/lang/perl5.28
*** Error code 1
```
There is no make.conf file in the /etc directory, and even after creating one and adding the above line to it I still get the same message.  When I check the support for version 10.3, I find it is supposed to be supported until October of 2018 (and elsewhere I find it suppose to be supported for 5 years, from April 2016), so I don't understand why it is saying it is no longer supported by the ports.

Anyone have any insight on this?

Marshall


----------



## ShelLuser (Jun 13, 2018)

Perl 5.20? And you say you're running FreeBSD 10.3? To my knowledge 5.20 is ancient, how did you end up with that version on FreeBSD?

It also makes me wonder how you keep your system updated. Do you pay attention to /usr/ports/UPDATING for example? Because the best option to upgrade a library based port like Perl isn't merely running `make install clean`.

From entry 20161103 in /usr/ports/UPDATING:

```
First, add to /etc/make.conf:

  DEFAULT_VERSIONS+=  perl5=5.24

  Portupgrade users:
        portupgrade -o lang/perl5.24 -f lang/perl5.20

          You can now remove the DEFAULT_VERSIONS line added earlier
          from /etc/make.conf

          Then you will need to rebuild everything that uses libperl.so, you
          can do so with:

        portupgrade -f `pkg shlib -qR libperl.so.5.20`

  Portmaster users:
        portmaster -o lang/perl5.24 lang/perl5.20

          You can now remove the DEFAULT_VERSIONS line added earlier
          from /etc/make.conf

          Then you will need to rebuild everything that uses libperl.so, you
          can do so with:

        portmaster -f `pkg shlib -qR libperl.so.5.20`
```
As you can see it requires much more than that. You'll also need to re-build every port which utilized the Perl library in other to make sure it gets build against the upgraded version.

Based on what you're telling us my assumption is that you never checked /usr/ports/UPDATING and thus may have missed some very important steps with certain ports. And if you continue that long enough you could end up in a huge mess where upgrading ends up in a seemingly inconsistent process.

Anyway, back to the issue at hand...

FreeBSD 10.3 is no longer supported, the error messages above are correct. It got replaced by 10.4, see also this link.

So your best option at this time is to upgrade your FreeBSD version to either 10.4 or 11.1, and then upgrade your ports collection.

I would also strongly recommend using a utility such as Portmaster to help with the upgrading process (see ports-mgmt/portmaster). Because that can easily sort out upgrading all your ports for which a newer version is available, all in one run.

Hope this can help.


----------



## Minbari (Jun 13, 2018)

1.) FreeBSD 10.3 is no longer supported; FreeBSD 10.4 it's supported till October 2018.
2.) When using ports *always read* the /usr/ports/UPDATING file, always.
3.) To upgrade perl follow the instruction from UPDATING file.


----------



## SirDice (Jun 14, 2018)

mdudley said:


> When I check the support for version 10.3, I find it is supposed to be supported until October of 2018


FreeBSD 10.3 was supported until April 2018, it is 10.4 that's supported until October 2018.


> (and elsewhere I find it suppose to be supported for 5 years, from April 2016)


No, that's the new schedule and that's for 11.0 and onward. 

https://www.freebsd.org/security/unsupported.html

As for Perl, the default changed from 5.20 to 5.24 almost two years ago.
https://svnweb.freebsd.org/ports/head/Mk/bsd.default-versions.mk?r1=424707&r2=425221
The Perl5.20 port was removed last month because it was End-of-Life


Unless you have a reason to change any default option or feature I recommend you switch to using packages and keep the system updated that way. You really must be more diligent when it comes to installing updates.


----------



## mdudley (Jun 18, 2018)

I have never upgraded before.  I always did a reformat and install the new system then restore the files.  Reading how to do an update I find several different instructions, which seem to contradict each other.

https://www.freebsd.org/security/security.html#sup says:

# freebsd-update fetch
# freebsd-update install

and you are done with no reboot at all.

https://www.freebsd.org/doc/handbook/updating-upgrading-freebsdupdate.html says:

# *freebsd-update -r 9.1-RELEASE upgrade*
(where I use the correct revision number)
# *freebsd-update install*
# *shutdown -r now*
# *freebsd-update install*

Where it says to reboot and run the install a second time.
Is there some reason for using the shutdown command instead of the reboot command?

And https://www.freebsd.org/releases/11.1R/installation.html says:

# freebsd-update fetch
# freebsd-update install
# freebsd-update upgrade -r 11.1-RELEASE
# freebsd-update install
# shutdown -r now
# freebsd-update install
# freebsd-update install
# shutdown -r now

With 2 reboots, and 4 installs.

I am confused.  I can follow a set of instructions, but 3 different sets, and I have no idea which one I should be following.

Thanks,

Marshall


----------



## talsamon (Jun 18, 2018)

Maybe, it is a missunderstood with:

```
After updating installed third-party applications (and again, only if freebsd-update(8) printed a message indicating that this was necessary), run freebsd-update(8) again so that it can delete the old (no longer used) system libraries.
```

=>  only if freebsd-update(8) printed a message indicating that this was necessary


----------



## ShelLuser (Jun 18, 2018)

mdudley said:


> I have never upgraded before.  I always did a reformat and install the new system then restore the files.  Reading how to do an update I find several different instructions, which seem to contradict each other.


Not necessarily contradicting, but I can definitely see how this can become confusing. The problem is that the security advisor gives a very simplified method for upgrading and only provides the most basic technique. I think the idea behind this that people would always check the manualpage to learn about the details. So: `man freebsd-update` which will point you to freebsd-update(8). That also explains more about the process.

Basically: the userland programs can be upgraded without rebooting, but obviously the kernel cannot.

Also keep in mind that -r is only to be used when you're upgrading. So, for example from 10.4 to 11.1, but not when you're performing normal updates (from 11.1 to 11.2 for example).

When in doubt follow the handbook. That's the best set of instructions here.[/cmd]


----------



## Deleted member 30996 (Jun 18, 2018)

mdudley said:


> I have never upgraded before.  I always did a reformat and install the new system then restore the files.



That's the way I've always done it. I always rebuild from scratch and rebuild all my 3rd party programs from ports using ports-mgmt/portmaster. But there is approximately 1 year between those times and routine maintenance is called for in the interim. I run these commands daily in sequence and go from there:


```
portsnap fetch update
pkg audit -F
freebsd-update fetch
```


I always watch to see what new programs have been updated and if any I use are included. if it's something that's updated frequently, like editors/vim or I deem important I'll put ports-mgmt/portmaster to work and that will usually take care of updating anything with it that needs be. Sometime I'll have to take over manually if there's a problem, but not often.

Other than those circumstances, or it's a vulnerability, I don't update all my programs on a regular basis as general practice. Good or bad be it, but it seems to often cause more problems than if you left well enough alone.


----------



## SirDice (Jun 19, 2018)

mdudley said:


> Is there some reason for using the shutdown command instead of the reboot command?


Yes, there is a difference. A reboot(8) _kills_ running services, a shutdown(8) uses the proper service(8) stop to cleanly stop a service. Basically, don't use reboot(8) unless there's no other way to shut it down cleanly.


mdudley said:


> I am confused. I can follow a set of instructions, but 3 different sets, and I have no idea which one I should be following.


Short explanation, 
`freebsd-update fetch install` updates your installed version, i.e. updates 10.3-RELEASE-p1 to p2, p3, etc. 
`freebsd-update -r VERSION upgrade` downloads _upgrades_ for your version, i.e. from 10.3-RELEASE to 10.4-RELEASE or 11.1-RELEASE.

If you're on 10.3-RELEASE you must make sure to update to, at least, p6. This is because of a bug in freebsd-update(8) which would prevent you from upgrading to an 11.x version.


----------



## mdudley (Jun 20, 2018)

I got the updates done, but now have a major problem with perl.  I installed 5.28.0 and put the
DEFAULT_VERSIONS+=perl5=5.28 in /etc/make.conf

But any programs that depend on perl will not install.  They all give the message:

===> openssl-1.0.2o_4,1 depends on package: perl5>=5.28.r1<5.29 - not found

When I tried to install one package it went and tried to install perl 5.28.0 again.   That errored out saying to do a make deinstall on perl 5.28.0, which I did.  Then when I try to install again, it gives errors.

If I try to do a deinstall, it now says it can't find it.  If I try to install it again I get the following sequence.

Installing perl5-5.28.0.r3...
pkg-static: perl5-5.28.0.r3 conflicts with perl5.28-5.28.0.r2 (installs files into the same place).  Problematic file: /usr/local/bin/perl5.28.0
*** Error code 70

Stop.
make[1]: stopped in /usr/ports/lang/perl5.28
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/perl5.28

root@king-cart:/usr/ports/lang/perl5.28 # ls -l /usr/local/bin/perl5.28.0
ls: /usr/local/bin/perl5.28.0: No such file or directory
---------The problem file does not even exist!  I moved it early to try to get around this problem.-------

root@king-cart:/usr/ports/lang/perl5.28 # make clean
===>  Cleaning for perl5-5.28.0.r3
root@king-cart:/usr/ports/lang/perl5.28 # make deinstall
===>  Deinstalling for perl5
===>   perl5 not installed, skipping
root@king-cart:/usr/ports/lang/perl5.28 #


make: stopped in /usr/ports/lang/perl5.28
root@king-cart:/usr/ports/lang/perl5.28 #

I have spent 8 hours on this, and can't find any way to make it work.

Please advise.  And thanks for the previous help you have provided.

Marshall


----------



## Deleted member 30996 (Jun 20, 2018)

I just dealt with much the same thing updating graphics/ffmpg, with devel/automake being the stopping point.:

```
Problematic file: /usr/local/bin/aclocal
*** Error code 70
```

I _suggest_ deinstalling lang/perl, then installing security/openssl. That is what _I_ would do and may not be the correct solution for you.

It's `# make deinstall clean`.


----------



## mdudley (Jun 20, 2018)

But it says it can't find it:

root@king-cart:/usr/ports/lang/perl5.28 # make deinstall
===>  Deinstalling for perl5
===>   perl5 not installed, skipping
root@king-cart:/usr/ports/lang/perl5.28 #


Ports cannot find it, deinstall cannot find it, but if I try to install it says it conflicts.

Any other ideas?

Thanks,

Marshall


----------



## Deleted member 30996 (Jun 20, 2018)

mdudley said:


> Any other ideas?



Install ports-mgmt-portmaster and let it do the job for you? It could make things a lot easier.

I'm sorry, I know you're having a hard time of it. I'm at the point on my day I'm in need of caffiene and sugar to think more clearly.


----------



## ShelLuser (Jun 20, 2018)

How did you install those other programs? At the risk of repeating (I didn't re-read the thread): are you perhaps mixing ports and packages?  as in: `make install clean` together with `pkg install`?

And my apologies if actually did repeat myself here, but even so: this is a serious source for problems.

Onto Perl: 5.28. When in doubt... /usr/ports/Mk/bsd.default-versions.mk to the rescue.

Your shared line is correct. So if something refuses this and demands something else then I can't help but worry: binary package.


----------



## mdudley (Jun 20, 2018)

Thank Heavens!!!!  I used portmaster, and everything installed fine, and it appears the system is back on-line and working now.  Someone else had said to use portmaster, but when I had tried I got an error.  I did not realize I had to install it first.

Thanks millions.

Marshal


----------



## Deleted member 30996 (Jun 20, 2018)

mdudley said:


> Someone else had said to use portmaster, but when I had tried I got an error.  I did not realize I had to install it first.



That's always worked best for me, too.  It's the very first thing I install after rebuilding my system and I put it right to work installing ports from that point on.

I had to step in and fix my problem earlier, and had to look carefully to see exactly what needed done, but it was gravy from that point. I really like using it, and ports.


----------



## mdudley (Jun 20, 2018)

ShelLuser said:


> How did you install those other programs? At the risk of repeating (I didn't re-read the thread): are you perhaps mixing ports and packages?  as in: `make install clean` together with `pkg install`?
> 
> And my apologies if actually did repeat myself here, but even so: this is a serious source for problems.
> 
> ...



Everything was installed with the make install clean.  I did not do a pkg install, never have in 20 years.   But I just used portmaster and all seems to be good now.  Just have one more thing to update, Apache, but I am waiting til morning before biting that off.

Marshall


----------



## Deleted member 30996 (Jun 20, 2018)

One advantage of using it over `make install clean` is that you set all your dependency variables at the beginning of the build as opposed to during the build process. Unless it asks you if you want to delete a previous version of a file or there is a problem, it's set and forget till it's done compiling ports.

I prefer to work from the login terminal so I can monitor it at a glance instead of from the desktop if it's going to be a lengthy process.


----------



## VladiBG (Jun 20, 2018)

mdudley said:


> root@king-cart:/usr/ports/lang/perl5.28 # make deinstall
> ===> Deinstalling for perl5
> ===> perl5 not installed, skipping



You can use `pkg delete` then reinstall the perl5.28 and force rebuild all ports that depend of perl.


----------

