Skip to content

Installing packages in a plugin jail

Troy Prelog edited this page Nov 6, 2021 · 4 revisions

So how iocage handles Plugin UPDATES is that it completely removes all packages from the jail on update and then installs them new. This means if you manually install any packages in your jail they will be removed during the Plugin UPDATE and will not be reinstalled.

For this plugin I've added a function so users can install extra packages not included in the manifest and reinstall them during a Plugin UPDATE. Here’s an example to create the file /root/pkglist and add Python 3.10 requirements for Home Assistant.

Create a pkglist

For additional packages you want to have installed in your jail, you can create a pkglist. The pgklist is simply a text file containing on package per line.

  • create a pgklist inside your jail
iocage console $JAIL_NAME
# press 0 to exit menu
ee "/root/pkglist"
  • add Python 3.10 packages required for Home Assistant
python310
py310-sqlite3

To save and exit, press ESC then press ENTER twice

Enable the reinstall function during a Plugin UPDATE

  • set a path to your pgklist
sysrc plugin_pkglist="/root/pkglist"
  • enable to reinstall packages from pkglist
sysrc plugin_enable_pkglist=YES

You can also install your pkglist manually

cat "/root/pkglist" | xargs pkg install -y

To see a list of all the primary packages

pkg prime-list