Forge Home


Portupgrade package provider for FreeBSD compatible with pkgng


9,511 latest version

3.8 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

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

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'aduitsis-portupgrade_pkgng', '0.0.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add aduitsis-portupgrade_pkgng
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install aduitsis-portupgrade_pkgng --version 0.0.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



aduitsis/portupgrade_pkgng — version 0.0.2 Sep 19th 2014


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