portupgrade_pkgng

Portupgrade package provider for FreeBSD compatible with pkgng

Athanasios Douitsis

aduitsis

8,777 downloads

8,478 latest version

3.8 quality score

Version information

  • 0.0.2 (latest)
  • 0.0.1
released Sep 19th 2014

Start using this module

Documentation

aduitsis/portupgrade_pkgng — version 0.0.2 Sep 19th 2014

portupgrade_pkgng

A package provider using portupgrade, compatible with pkgng

This module contains a modified version of the portupgrade.rb that comes with Puppet. The version that comes with Puppet uses the pkg_* tools, so it is really not that useful with FreeBSD 10 systems (and later) which are using pkgng. Using most of the original code of portupgrade.rb, I crafted portupgrade_pkgng which tries to use pkgng. It basically works the same as the original portupgrade.rb, but under the hood it uses different commands (pkg info, pkg query, pkg delete, etc) than the original.

WARNING: Since this module can invoke dangerous commands such as portinstall, pkg delete, etc, you are hereby warned to use extreme caution when using it. It may install ports, uninstall packages, cause your computer to go critical, etc. Please use very carefully and, if possible, read the code, make fixes and contribute back.

Lastly, unless you want to build a port with some special make options, you really don't need to use this module at all, since what it does is use portinstall to build and install a package. Likewise, it is assumed that you have a working portinstall in your system, an up-to-date ports tree and that you have configured your options to your liking. This module doesn't do any of the above, so please take whatever care you need to take before you use it.

This version works around the absence of /dev/console in FreeBSD Jails by allocating its own pty as input to portinstall/portupgrade commands.

Athanasios Douitsis, 2014