Category Archives: FreeBSD

Anything related to FreeBSD

Joint Python ports in FreeBSD

I woke up this morning only to be greeted by:

# make -C /usr/ports fetchindex
/usr/ports/INDEX-11.bz2                       100% of 2150 kB  695 kBps 00m03s
# pkg version -ovIL=
devel/py27-setuptools              ?   orphaned: devel/py27-setuptools
devel/py36-setuptools              ?   orphaned: devel/py36-setuptools

As per /usr/ports/UPDATING, the solution is:

setenv FLAVOR py27
portupgrade -fpvo devel/py-setuptools devel/py27-setuptools
setenv FLAVOR py36
portupgrade -fpvo devel/py-setuptools devel/py36-setuptools
unsetenv FLAVOR

Take note of the North-American spelling.

Boot menu changes in base/head r325694

Update 2017-11-13
r325743 corrected the mistakes. The below no longer applies. Remove /boot/loader.rc.local if you created it.


/boot/loader.rc used to be copied from base/head/sys/boot/i386/loader/loader.rc on FreeBSD/amd64. With r325694 this changed to base/head/sys/boot/forth/loader.rc. Nothing was added to base/head/UPDATING, explaining this change.

As instructed in /boot/loader.rc, to regain our beloved boot menu, we must create and edit /boot/loader.rc.local, essentially redoing what was handled by the previous /boot/loader.rc.

start
check-password
include /boot/beastie.4th
beastie-start

Upgrading PHP from 7.0.22 to 7.1.9

I created a shell script which began its simple life as

#!/bin/sh

# Use on first run
FLAGS=-ncfpvo

# Use on subsequent runs
#FLAGS=-fpvo

portupgrade ${FLAGS} lang/php71 lang/php70 || exit

portupgrade ${FLAGS} textproc/php71-ctype      textproc/php70-ctype      || exit
portupgrade ${FLAGS} ftp/php71-curl            ftp/php70-curl            || exit
portupgrade ${FLAGS} textproc/php71-dom        textproc/php70-dom        || exit
portupgrade ${FLAGS} graphics/php71-gd         graphics/php70-gd         || exit
portupgrade ${FLAGS} devel/php71-gettext       devel/php70-gettext       || exit
portupgrade ${FLAGS} security/php71-hash       security/php70-hash       || exit
portupgrade ${FLAGS} converters/php71-iconv    converters/php70-iconv    || exit
portupgrade ${FLAGS} devel/php71-json          devel/php70-json          || exit
portupgrade ${FLAGS} net/php71-ldap            net/php70-ldap            || exit
portupgrade ${FLAGS} converters/php71-mbstring converters/php70-mbstring || exit
portupgrade ${FLAGS} security/php71-mcrypt     security/php70-mcrypt     || exit
portupgrade ${FLAGS} databases/php71-memcache  databases/php70-memcache  || exit
portupgrade ${FLAGS} www/php71-opcache         www/php70-opcache         || exit
portupgrade ${FLAGS} security/php71-openssl    security/php70-openssl    || exit
portupgrade ${FLAGS} databases/php71-pdo       databases/php70-pdo       || exit
portupgrade ${FLAGS} databases/php71-pdo_pgsql databases/php70-pdo_pgsql || exit
portupgrade ${FLAGS} databases/php71-pgsql     databases/php70-pgsql     || exit
portupgrade ${FLAGS} www/php71-session         www/php70-session         || exit
portupgrade ${FLAGS} textproc/php71-simplexml  textproc/php70-simplexml  || exit
portupgrade ${FLAGS} net/php71-soap            net/php70-soap            || exit
portupgrade ${FLAGS} net/php71-sockets         net/php70-sockets         || exit
portupgrade ${FLAGS} databases/php71-sqlite3   databases/php70-sqlite3   || exit
portupgrade ${FLAGS} textproc/php71-wddx       textproc/php70-wddx       || exit
portupgrade ${FLAGS} textproc/php71-xml        textproc/php70-xml        || exit
portupgrade ${FLAGS} archivers/php71-zlib      archivers/php70-zlib      || exit

portupgrade ${FLAGS} www/mod_php71 www/mod_php70 || exit

After running the script for a second time and a third time, etc, the script was successively changed to:

#!/bin/sh

# Use on first run
#FLAGS=-ncfpvo

# Use on subsequent runs
FLAGS=-fpvo

#portupgrade ${FLAGS} lang/php71 lang/php70 || exit

#portupgrade ${FLAGS} textproc/php71-ctype      textproc/php70-ctype      || exit
#portupgrade ${FLAGS} ftp/php71-curl            ftp/php70-curl            || exit
#portupgrade ${FLAGS} textproc/php71-dom        textproc/php70-dom        || exit
#portupgrade ${FLAGS} graphics/php71-gd         graphics/php70-gd         || exit
#portupgrade ${FLAGS} devel/php71-gettext       devel/php70-gettext       || exit
#portupgrade ${FLAGS} security/php71-hash       security/php70-hash       || exit
#portupgrade ${FLAGS} converters/php71-iconv    converters/php70-iconv    || exit
#portupgrade ${FLAGS} devel/php71-json          devel/php70-json          || exit
#portupgrade ${FLAGS} net/php71-ldap            net/php70-ldap            || exit
#portupgrade ${FLAGS} converters/php71-mbstring converters/php70-mbstring || exit
#portupgrade ${FLAGS} security/php71-mcrypt     security/php70-mcrypt     || exit

#portupgrade ${FLAGS} www/php71-session         www/php70-session         || exit
#portupgrade ${FLAGS} archivers/php71-zlib      archivers/php70-zlib      || exit
#portupgrade ${FLAGS} databases/php71-memcache  databases/php70-memcache  || exit

#portupgrade ${FLAGS} www/php71-opcache         www/php70-opcache         || exit
#portupgrade ${FLAGS} security/php71-openssl    security/php70-openssl    || exit
#portupgrade ${FLAGS} databases/php71-pdo       databases/php70-pdo       || exit
#portupgrade ${FLAGS} databases/php71-pdo_pgsql databases/php70-pdo_pgsql || exit
#portupgrade ${FLAGS} databases/php71-pgsql     databases/php70-pgsql     || exit
#portupgrade ${FLAGS} textproc/php71-simplexml  textproc/php70-simplexml  || exit
#portupgrade ${FLAGS} net/php71-soap            net/php70-soap            || exit
#portupgrade ${FLAGS} net/php71-sockets         net/php70-sockets         || exit
#portupgrade ${FLAGS} databases/php71-sqlite3   databases/php70-sqlite3   || exit

portupgrade ${FLAGS} textproc/php71-xml        textproc/php70-xml        || exit
portupgrade ${FLAGS} textproc/php71-wddx       textproc/php70-wddx       || exit

portupgrade ${FLAGS} www/mod_php71 www/mod_php70 || exit

Restart Apache using service apache24 restart.

In the end, PHP 7.0.22 got upgraded to PHP 7.1.9. All is well.

Patch for math/py-matplotlib

Without this patch, python2.7 will crash when the loop in setup.py reaches setupext.BackendGtk3Cairo().

--- setup.py.orig       2016-09-09 04:50:50.000000000 +0200
+++ setup.py    2017-08-03 17:50:19.742905000 +0200
@@ -98,7 +98,7 @@
     setupext.BackendQt5(),
     setupext.BackendQt4(),
     setupext.BackendGtk3Agg(),
-    setupext.BackendGtk3Cairo(),
+    #setupext.BackendGtk3Cairo(),
     setupext.BackendGtkAgg(),
     setupext.BackendTkAgg(),
     setupext.BackendWxAgg(),