# Consider switching to a more recent version of Perl



## Aknot (Jan 22, 2014)

Dear Forum!

When running `portmaster -L` we see this message about perl:


```
===>>> perl-5.12.4_4
        ===>>> New version available: perl5.12-5.12.5_3
        ===>>> This port is marked DEPRECATED
        ===>>> Consider switching to a more recent version of Perl
```

UPDATING states that threads is enabled by default in perl from now on.

1. How can we check if this thread-thing concerns our installation?

2. How can we switch to a newer version of perl? Do we need to uninstall this old version, then install the new version from ports, or is it possible to do that with the `portmaster` utility?

`uname -a`


```
FreeBSD srv01.domain.com 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Wed Mar 30 15:26:23 UTC 2011
root@freebsd82.tst:/usr/obj/usr/src/sys/XENHVM  amd64
```

*This is what we have on our FreeBSD-server (FAMP):*


```
===>>> Root ports (No dependencies, not depended on)
===>>> dialog4ports-0.1.5_2
===>>> libtool-2.4.2
        ===>>> New version available: libtool-2.4.2_2
===>>> portmaster-3.17.3
===>>> unzip-6.0_1
===>>> 4 root ports
===>>> Trunk ports (No dependencies, are depended on)
===>>> autoconf-wrapper-20101119
        ===>>> New version available: autoconf-wrapper-20131203
===>>> automake-wrapper-20101119
        ===>>> New version available: automake-wrapper-20131203
===>>> ca_root_nss-3.13.6
        ===>>> New version available: ca_root_nss-3.15.3.1
===>>> cmake-modules-2.8.9
        ===>>> New version available: cmake-modules-2.8.12.1_1
===>>> db42-4.2.52_5
        ===>>> This port is marked DEPRECATED
        ===>>> Please use databases/db5 or db6 for new installs.
===>>> expat-2.0.1_2
        ===>>> New version available: expat-2.1.0
===>>> gdbm-1.9.1
        ===>>> New version available: gdbm-1.11
===>>> jpeg-8_3
        ===>>> New version available: jpeg-8_4
===>>> libevent-1.4.14b_2
===>>> libiconv-1.14_1
===>>> libltdl-2.4.2
        ===>>> New version available: libltdl-2.4.2_2
===>>> libmcrypt-2.5.8
===>>> m4-1.4.16_1,1
        ===>>> New version available: m4-1.4.17,1
===>>> mysql-client-5.5.27
        ===>>> New version available: mysql55-client-5.5.35
===>>> oniguruma-4.7.1
===>>> pcre-8.33
===>>> pdflib-7.0.5_2
===>>> perl-5.12.4_4
        ===>>> New version available: perl5.12-5.12.5_3
        ===>>> This port is marked DEPRECATED
        ===>>> Consider switching to a more recent version of Perl
===>>> pkgconf-0.8.9
        ===>>> New version available: pkgconf-0.9.4
===>>> png-1.5.12
        ===>>> New version available: png-1.5.17
===>>> t1lib-5.1.2_1,1
        ===>>> New version available: t1lib-5.1.2_2,1
===>>> tcl-modules-8.5.12_2
        ===>>> The lang/tcl-modules port has been deleted: Modules are now part of the base Tcl distributions
===>>> 22 trunk ports
===>>> Branch ports (Have dependencies, are depended on)
===>>> apache22-2.2.22_8
        ===>>> New version available: apache22-2.2.26
===>>> apr-1.4.6.1.4.1_1
        ===>>> New version available: apr-1.4.8.1.5.3
===>>> autoconf-2.69
===>>> bash-4.2.37
        ===>>> New version available: bash-4.2.45_1
===>>> curl-7.24.0
        ===>>> New version available: curl-7.33.0_2
===>>> freetype2-2.4.9_1
        ===>>> New version available: freetype2-2.5.2
===>>> gamin-0.1.10_4
        ===>>> New version available: gamin-0.1.10_6
===>>> gettext-0.18.3.1
===>>> gio-fam-backend-2.28.8_1
        ===>>> New version available: gio-fam-backend-2.34.3
===>>> glib-2.28.8_4
        ===>>> New version available: glib-2.36.3_1
===>>> libslang2-2.2.4_3
        ===>>> New version available: libslang2-2.2.4_5
===>>> libxml2-2.7.8_3
        ===>>> New version available: libxml2-2.8.0_3
===>>> p5-Locale-gettext-1.05_3
===>>> pecl-pdflib-2.1.9
        ===>>> New version available: pecl-pdflib-2.1.10
===>>> php5-5.4.6
        ===>>> New version available: php5-5.4.23
===>>> php5-bz2-5.4.6
        ===>>> New version available: php5-bz2-5.4.23
===>>> php5-ctype-5.4.6
        ===>>> New version available: php5-ctype-5.4.23
===>>> php5-curl-5.4.6
        ===>>> New version available: php5-curl-5.4.23_1
===>>> php5-dom-5.4.6
        ===>>> New version available: php5-dom-5.4.23
===>>> php5-exif-5.4.6
        ===>>> New version available: php5-exif-5.4.23
===>>> php5-fileinfo-5.4.6
        ===>>> New version available: php5-fileinfo-5.4.23
===>>> php5-filter-5.4.6
        ===>>> New version available: php5-filter-5.4.23
===>>> php5-ftp-5.4.6
        ===>>> New version available: php5-ftp-5.4.23
===>>> php5-gd-5.4.6
        ===>>> New version available: php5-gd-5.4.23
===>>> php5-gettext-5.4.6
        ===>>> New version available: php5-gettext-5.4.23
===>>> php5-hash-5.4.6
        ===>>> New version available: php5-hash-5.4.23
===>>> php5-iconv-5.4.6
        ===>>> New version available: php5-iconv-5.4.23
===>>> php5-json-5.4.6
        ===>>> New version available: php5-json-5.4.23
===>>> php5-mbstring-5.4.6
        ===>>> New version available: php5-mbstring-5.4.23
===>>> php5-mcrypt-5.4.6
        ===>>> New version available: php5-mcrypt-5.4.23
===>>> php5-mysql-5.4.6
        ===>>> New version available: php5-mysql-5.4.23
===>>> php5-mysqli-5.4.6
        ===>>> New version available: php5-mysqli-5.4.23
===>>> php5-openssl-5.4.6
        ===>>> New version available: php5-openssl-5.4.23
===>>> php5-pdo-5.4.6
        ===>>> New version available: php5-pdo-5.4.23
===>>> php5-phar-5.4.6
        ===>>> New version available: php5-phar-5.4.23
===>>> php5-posix-5.4.6
        ===>>> New version available: php5-posix-5.4.23
===>>> php5-session-5.4.6
        ===>>> New version available: php5-session-5.4.23
===>>> php5-simplexml-5.4.6
        ===>>> New version available: php5-simplexml-5.4.23
===>>> php5-sockets-5.4.6
        ===>>> New version available: php5-sockets-5.4.23
===>>> php5-tokenizer-5.4.6
        ===>>> New version available: php5-tokenizer-5.4.23
===>>> php5-xml-5.4.6
        ===>>> New version available: php5-xml-5.4.23
===>>> php5-xmlreader-5.4.6
        ===>>> New version available: php5-xmlreader-5.4.23
===>>> php5-xmlwriter-5.4.6
        ===>>> New version available: php5-xmlwriter-5.4.23
===>>> php5-zip-5.4.6
        ===>>> New version available: php5-zip-5.4.23
===>>> php5-zlib-5.4.6
        ===>>> New version available: php5-zlib-5.4.23
===>>> python27-2.7.3_3
        ===>>> New version available: python27-2.7.6_1
===>>> sqlite3-3.7.13
        ===>>> New version available: sqlite3-3.8.2
===>>> 47 branch ports
===>>> Leaf ports (Have dependencies, not depended on)
===>>> automake-1.12.3
        ===>>> New version available: automake-1.14
===>>> bash-completion-1.3_4,1
        ===>>> New version available: bash-completion-2.1_1,1
===>>> bison-2.5.1,1
        ===>>> New version available: bison-2.7.1,1
===>>> cmake-2.8.9
        ===>>> New version available: cmake-2.8.12.1
===>>> gmake-3.82_1
===>>> help2man-1.40.12
        ===>>> New version available: help2man-1.43.3_1
===>>> mc-4.8.1.4_1
        ===>>> New version available: mc-4.8.11
===>>> memcached-1.4.14
        ===>>> New version available: memcached-1.4.15
===>>> mysql-server-5.5.27
        ===>>> New version available: mysql55-server-5.5.35
===>>> pecl-memcache-3.0.6
        ===>>> New version available: pecl-memcache-3.0.8
===>>> php5-extensions-1.7
===>>> php5-pdo_mysql-5.4.6
        ===>>> New version available: php5-pdo_mysql-5.4.23
===>>> php5-pdo_sqlite-5.4.6
        ===>>> New version available: php5-pdo_sqlite-5.4.23
===>>> postfix-current-2.10.20120801,4
        ===>>> New version available: postfix-current-2.11.20131001,4
===>>> proftpd-1.3.4d
===>>> tcl-8.5.12_2
        ===>>> New version available: tcl85-8.5.15_2
===>>> 16 leaf ports
===>>> 89 total installed ports
        ===>>> 72 have new versions available
```

Thanks in advance,


----------



## serverhamster (Jan 22, 2014)

> 1. How can we check if this thread-thing concerns our installation?


You'll probably notice  §e 
The fact that Perl is threaded by default now, is probably because the developers are convinced that it should not pose any trouble. There are ports that require Perl to be threaded, like misc/amanda-server. I don't know any ports that can't handle threaded Perl.


> 2. How can we switch to a newer version of perl? Do we need to uninstall this old version, then install the new version from ports, or is it possible to do that with the portmaster utility?


See /usr/ports/UPDATING 20131023


```
20131023:
  AFFECTS: users of lang/perl5.12 lang/perl5.14
  AUTHOR: mat@FreeBSD.org

  The default Perl has been switched to lang/perl5.16.  These examples
  are for switching from lang/perl5.14, if you are running another
  version, replace lang/perl5.14 with the origin of the Perl you have
  installed.

  Pkgng users:

    # pkg set -o lang/perl5.14:lang/perl5.16
    # pkg install -Rf lang/perl5.16

  Portupgrade users:
    0) Fix pkgdb.db (for safety):
        pkgdb -Ff

    1) Reinstall new version of Perl (5.16):
        portupgrade -o lang/perl5.16 -f lang/perl5.14

    2) Reinstall everything that depends on Perl:
        portupgrade -fr lang/perl5.16

  Portmaster users:
        portmaster -o lang/perl5.16 lang/perl5.14

        Conservative:
        portmaster p5-

        Comprehensive (but perhaps overkill):
        portmaster -r perl-

  Note: If the "perl-" glob matches more than one port you will need to specify
        the name of the Perl directory in /var/db/pkg explicitly.
```

You can now choose to use the default lang/perl5.16, or lang/perl5.18.


----------



## SirDice (Jan 22, 2014)

Alldo said:
			
		

> `uname -a`
> 
> 
> ```
> ...


A few things, your FreeBSD 8.2 has never seen any security patches. Somebody hasn't been doing his/her job. Besides that 8.2 has been end-of-life since July 2012 and is not supported any more. I suggest updating to 8.4-RELEASE (supported until June 2015).

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


----------



## Aknot (Jan 22, 2014)

SirDice said:
			
		

> A few things, your FreeBSD 8.2 has never seen any security patches. Somebody hasn't been doing his/her job. Besides that 8.2 has been end-of-life since July 2012 and is not supported any more. I suggest updating to 8.4-RELEASE (supported until June 2015).



Yes I know, and that one is me  I am so afraid to break things. Where going to move, to a new VPS with a newer version soon and I was hoping this version should last. Maybe we should try to upgrade anyway until then. Haven't done that before

Thanks for your input SirDice!



			
				serverhamster said:
			
		

> The fact that Perl is threaded by default now, is probably because the developers are convinced that it should not pose any trouble. There are ports that require Perl to be threaded, like misc/amanda-server. I don't know any ports that can't handle threaded Perl.
> 
> 2. How can we switch to a newer version of perl? Do we need to uninstall this old version, then install the new version from ports, or is it possible to do that with the portmaster utility?





			
				serverhamster said:
			
		

> See /usr/ports/UPDATING 20131023
> 
> 
> ```
> ...



Thanks serverhamster, worked flawless, to stressed to read properly, thanks alot


----------



## SirDice (Jan 22, 2014)

Alldo said:
			
		

> Yes I know, and that one is me  I am so afraid to break things.


It's the wrong thing to be afraid of, you should be more afraid of vandals breaking into your server because you didn't install the security patches. Security updates do not break anything. If anything they usually 'unbreak' things by patching bugs that can be exploited. And as long as you stay with the same major version doing the minor upgrades shouldn't break anything either. Most of us usually _test_ things before trying it on production systems.


----------



## Aknot (Jan 23, 2014)

SirDice said:
			
		

> It's the wrong thing to be afraid of, you should be more afraid of vandals breaking into your server because you didn't install the security patches. Security updates do not break anything. If anything they usually 'unbreak' things by patching bugs that can be exploited. And as long as you stay with the same major version doing the minor upgrades shouldn't break anything either. Most of us usually _test_ things before trying it on production systems.



Your'e right of course. All the ports are upgraded now, and we actually tried ro run `freebsd-update -r 8.4-RELEASE` but got this message on the screen:


```
WARNING: This system is running a "xenhvm" kernel, which is not a
kernel configuration distributed as part of FreeBSD 8.2-RELEASE.
This kernel will not be updated: you MUST update the kernel manually
before running "/usr/sbin/freebsd-update install".
```

The server is running on a VPS and we don't have physical access to it.
Need to ask the provider what the "xenhvm" kernel need to have, to be able to boot.

Thanks again for your input and information about the importance of having and running a secure FreeBSD installation.


----------



## SirDice (Jan 23, 2014)

Alldo said:
			
		

> The server is running on a VPS and we don't have physical access to it.
> Need to ask the provider what the xenhvm kernel need to have, to be able to boot.


Have a look at /usr/src/sys/i386/conf/XEN. Compiling a custom kernel is explained in the handbook.

If you're lucky the kernel config is stored in the kernel. Try `sysctl kern.conftxt`.


----------



## Aknot (Jan 23, 2014)

The command `sysctl kern.conftxt` didn't give us anything on the screen. Trying to ask our ISP if they have a conf for this xenhvm kernel    Thanks!


----------



## SirDice (Jan 23, 2014)

Yes, the kernel would need to be compiled with this option set:

```
options         INCLUDE_CONFIG_FILE     # Include this file in kernel
```
It's in GENERIC and I tend to include it in all my custom configs. Makes it easier to recover in case I lose the original file


----------



## xtaz (Jan 24, 2014)

serverhamster said:
			
		

> The fact that Perl is threaded by default now, is probably because the developers are convinced that it should not pose any trouble. There are ports that require Perl to be threaded, like misc/amanda-server. I don't know any ports that can't handle threaded Perl.



irc/irssi in combination with www/libwww definitely doesn't work too well with threading on. I have a perl script which takes any URLs mentioned in IRC, fetches the page title, and stores them in a database. After changing to threaded this caused irssi to crash with signal 11 every time someone pasted a URL. Some googling suggested to me that threaded perl doesn't play nice with embedded perl interpreters such as what irssi uses.


----------

