Solved FreeBSD 9.3 "Malformed conditional" bsd.licenses.mk

I now know 9.3 is not supported any more - did not know before last portsnap. So I have managed to portupgrade some ports, but others don't compile. I get similar error messages:

Code:
"/usr/ports/Mk/bsd.licenses.mk", line 427: Malformed conditional (${_LICENSE_PERMS_GPLv3+:Mauto-accept} != "" && !defined(LICENSES_ASK))
"/usr/ports/Mk/bsd.licenses.mk", line 427: Malformed conditional (${_LICENSE_PERMS_LGPL3+:Mauto-accept} != "" && !defined(LICENSES_ASK))
"/usr/ports/Mk/bsd.licenses.mk", line 491: Malformed conditional (${_LICENSE_PERMS_GPLv3+:Mdist-mirror} == "")
"/usr/ports/Mk/bsd.licenses.mk", line 491: Malformed conditional (${_LICENSE_PERMS_GPLv3+:Mdist-sell} == "")
"/usr/ports/Mk/bsd.licenses.mk", line 491: Malformed conditional (${_LICENSE_PERMS_GPLv3+:Mpkg-mirror} == "")
"/usr/ports/Mk/bsd.licenses.mk", line 491: Malformed conditional (${_LICENSE_PERMS_GPLv3+:Mpkg-sell} == "")
"/usr/ports/Mk/bsd.licenses.mk", line 491: Malformed conditional (${_LICENSE_PERMS_GPLv3+:Mauto-accept} == "")
"/usr/ports/Mk/bsd.licenses.mk", line 493: if-less endif
"/usr/ports/Mk/bsd.licenses.mk", line 491: Malformed conditional (${_LICENSE_PERMS_GPLv3+:Mnone} == "")
etc

/usr/local/sbin/portupgrade:1575:in `get_pkgname': Makefile broken (MakefileBrokenError)
        from /usr/local/sbin/portupgrade:637:in `block (4 levels) in main'
        from /usr/local/sbin/portupgrade:621:in `each'
        from /usr/local/sbin/portupgrade:621:in `block (3 levels) in main'
        from /usr/local/sbin/portupgrade:594:in `catch'
        from /usr/local/sbin/portupgrade:594:in `block (2 levels) in main'
        from /usr/local/lib/ruby/2.3/optparse.rb:1591:in `block (2 levels) in parse_in_order'
        from /usr/local/lib/ruby/2.3/optparse.rb:1586:in `catch'
etc

Any idea how to salvage the situation? Replacing bsd.licenses.mk with 2 years old did not help.

Should I portdowngrade the ports that don't compile? Is there a way to portsnap to older version of ports, that still works with 9.3?

My goal is to do final update on this 9.3 machine and then freeze the setup for couple of years.
 
Hello, same FreeBSD version and same problems here. The 9.3 version became a nightmare to compile and maintain. I can't even compile the highly vulnerable ntpd. Did you find any solution yet?
 
Any idea how to salvage the situation? Replacing bsd.licenses.mk with 2 years old did not help.
Upgrade the system to a supported version, either 10.3 or 11.0, then try again. It's your best shot. There are no guarantees that the Ports tree will work on older (unsupported) FreeBSD versions.
 
So no way to portsnap to older ports version? Say like autumn 2016, when I updated my ports last time? I guess my mistake of not making backup of ports tree.
I am not really concerned of vulnerabilites, this is internal server in home network. Only limited number of services (WWW, FTP, SSH) are visible from outside network.

fulano: we have old FreeBSD 5.5 server at work, now there is pain to compile really anything! Have got exploited by ntp several times already (Finally moved the service to windows server).
 
So no way to portsnap to older ports version?
No, but assuming you're able to get Subversion installed you can checkout an older version of the ports tree with: svn co -r'{2016-12-31}' https://svn.freebsd.org/ports/head /usr/ports

this is internal server in home network. Only limited number of services (WWW, FTP, SSH) are visible from outside network.
I think we have different definitions of what internal means :)
 
I suggest using SVN to fetch the last quarterly ports tree of 2016. That's the last one that supported FreeBSD 9.x.

svnlite co https://svn.freebsd.org/ports/branches/2016Q4 /usr/ports

Note, this is unsupported (meaning no updates, security fixes, etc) and using it means you're pretty much on your own.
 
So no way to portsnap to older ports version? Say like autumn 2016, when I updated my ports last time? I guess my mistake of not making backup of ports tree.
I am not really concerned of vulnerabilites, this is internal server in home network. Only limited number of services (WWW, FTP, SSH) are visible from outside network.

fulano: we have old FreeBSD 5.5 server at work, now there is pain to compile really anything! Have got exploited by ntp several times already (Finally moved the service to windows server).
Unplug those things out of the Internet now. I don't understand why people don't just upgrade their systems.
 
Thanks SirDice, exactly what I needed. Got my home server in order again. I guess I will live with this setup for a year or 2, before I take up the painful road of upgrade. To some LTS release, I guess.

I don't understand why people don't just upgrade their systems.
Cause people are lazy, they have something else to do than update systems all the time. And this old server was put together by some old sysadmin years ago. It contains lot of custom scripts, that might break.

Besides 5.5 very stable. 10+ years already. Last time restarted only to add new hard disks:
Code:
up 1512 days
It just works, don't touch it!

(Although there is plan to move it behind commercial firewall. And also plan to move it to vmware, in case old hardware dies. But not to upgrade)
 
I guess I will live with this setup for a year or 2, before I take up the painful road of upgrade.
Why wait 2 years? Why not now?

Cause people are lazy, they have something else to do than update systems all the time.
If you can't be bothered to update the system when required you're in the wrong line of work.

Uptimes are overrated. The only thing a high uptime tells me is that you have a highly vulnerable server on your network and somebody hasn't been doing their job properly.
 
Back
Top