# FreeBSD 10.3 - Ports Collection support for your FreeBSD version has ended



## beostk (Jan 19, 2017)

Hello,

Today I tried to update all ports and I got strange error. I'm using portsnap and portmaster. This error appears when I'm trying to install any port:


```
/!\ 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.
```

My system:

```
freebsd-version -k
10.3-RELEASE-p11

freebsd-version -u
10.3-RELEASE-p16

uname -a
FreeBSD b2.domain.com 10.3-RELEASE-p11 FreeBSD 10.3-RELEASE-p11 #0: Mon Oct 24 18:49:24 UTC 2016     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
```

And I can't install any new port / reinstall old port. I can not do anything with ports.

I tried to make freebsd binary update (`freebsd-update fetch && freebsd-update install`) - no luck. What the problem? FreeBSD 10.3 not supported? This is not funny


----------



## beostk (Jan 19, 2017)

I'm sorry if this is wrong forum section  I think it is not ports problem, this is system problem? What I can do?


----------



## beostk (Jan 19, 2017)

Some time ago this server was on FreeBSD 10.2, then upgraded to 10.3. Maybe somewhere I need to change 10.2 to 10.3?


----------



## xtaz (Jan 19, 2017)

That's weird. The logic is in /usr/ports/Mk/bsd.port.mk where it checks for versions < 1003000 or >= 1100000 and < 1100122. This number comes from /usr/include/sys/param.h or if that doesn't exist /usr/src/sys/sys/param.h. Worth checking those files to see what they say. Look for a line like #define __FreeBSD_version. 10.3 is definitely supported.


----------



## beostk (Jan 19, 2017)

Thanks! I found the problem. But how better fix it and how this happened and why not fixed when I used freebsd-update fetch & install?

/usr/ports/Mk/bsd.port.mk

```
# Get __FreeBSD_version
.if !defined(OSVERSION)
.if exists(/usr/include/sys/param.h)
OSVERSION!=    ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h
.elif exists(${SRC_BASE}/sys/sys/param.h)
OSVERSION!=    ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${SRC_BASE}/sys/sys/param.h
.else
.error Unable to determine OS version.  Either define OSVERSION, install /usr/include/sys/param.h or define SRC_BASE.
.endif
.endif
_EXPORTED_VARS+=    OSVERSION
```

/usr/include/sys/param.h

```
#undef __FreeBSD_version
#define __FreeBSD_version 1002000    /* Master, propagated to newvers */
```


----------



## beostk (Jan 19, 2017)

I mean how I can check all system files and auto replace with right one if it wrong?


----------



## SirDice (Jan 19, 2017)

Have a look at the output of `freebsd-update IDS`. Hopefully that will indicate what's wrong/missing.


----------



## beostk (Jan 19, 2017)

As I can see in both files (/usr/include/sys/param.h AND /usr/src/sys/sys/param.h) I have wrong FreeBSD version defined (10.2) and in parent folders a lot of old files (10.2 FreeBSD version in files header).


----------



## SirDice (Jan 19, 2017)

Not sure if this is going to work but try removing all freebsd-update(8) caches: `rm -rf /var/db/freebsd-update/`. Then delete those files that are wrong (or at least move them out of the way). Then run `freebsd-update fetch install`. Hopefully this will detect the files are missing and add the correct ones.

Note that this might hose the system even further so make sure you have backups of everything important!


----------



## dpalme (Mar 10, 2017)

I'm getting the same error, although my version is 10.1 on uname -a.

I'm assuming I'm behind and need to update it, can that be done via remote ssh?


----------



## jrm@ (Mar 10, 2017)

The error is valid in your case since 10.1 is EOL.  Yes, freebsd-update can be run remotely.


----------



## dpalme (Mar 10, 2017)

jrm@ said:


> The error is valid in your case since 10.1 is EOL.  Yes, freebsd-update can be done remotely.



Thanks. I know that with some updates you should be at the console.


----------



## dpalme (Mar 10, 2017)

Any idea how long it'll take?


----------



## jrm@ (Mar 10, 2017)

If you are running a GENERIC kernel it shouldn't take long (maybe 10 to 15 minutes from my recollection).


----------



## wisdown (Jun 20, 2017)

Someone found an fix to this situation?

On previous endweek I have started update my servers and 3 of then are with same problem of this post.

I have tried the hint:




SirDice said:


> Not sure if this is going to work but try removing all freebsd-update(8) caches: `rm -rf /var/db/freebsd-update/`. Then delete those files that are wrong (or at least move them out of the way). Then run `freebsd-update fetch install`. Hopefully this will detect the files are missing and add the correct ones.
> 
> Note that this might hose the system even further so make sure you have backups of everything important!



But did not work.

My outputs inside of jail are:

`freebsd-version`


```
10.3-RELEASE-p19
```

`uname -r`


```
10.3-RELEASE-p18
```

At Sunday 06/28/2017 I have updated all /usr/src on my servers and then updated all Hosts followed those instructions:

https://www.freebsd.org/doc/handbook/makeworld.html

`svn checkout http://svn.freebsd.org/base/releng/10.3 /usr/src`

By the way, I can not update jails using:

`make installworld DESTDIR=/usr/jails/*`

* = name of each jail

This always fails with the error:


```
...
make[5]: exec(cp) failed (No such file or directory)
===> bin/freebsd-version (install)
cp -fp freebsd-version.sh freebsd-version
*** Error code 1

Stop.
make[5]: stopped in /usr/src/bin/freebsd-version

....
```

So for other servers the following workaround allowed me upgrade:


Host (after upgrade using installworld, etc..)

`freebsd-update fetch install
portsnap fetch update

freebsd-update -b /usr/jails/* fetch
freebsd-update -b /usr/jails/* install

portmaster -abdf

mount_nullfs /usr/ports /usr/jails/*/usr/ports
mount_nullfs /usr/src /usr/jails/*/usr/src`

Inside of jail:

`freebsd-update fetch install
portsnap fetch update

portmaster -abdf`

* = name of each jail

This last step worked only with some servers.


----------



## Yu Feng (Nov 3, 2017)

I 'm trying upgrade to the latest version (11.1) by

freebsd-update upgrade -r 11.1 

it may work...

and now freebsd-update install 

em......


----------

