Skip to content

returned error from pkg(8) is not handled #19

Description

@dch

Make sure to follow and check these boxes before submitting an issue! Thank you.

  • Supply iocell (2017-01-24)
  • Supply the commands used, along with any steps to recreate it.
  • Provide the output from iocell
  • Supply what you expected the result or output to be
  • Checked that the problem has not already been fixed on develop if using the stable release or master branch.

When a new jail is created, is is possible to supply pkglist to be installed, however the packages are not installed as the jail is not started prior.

# cat /iocell/templates/template.pkg
ftp/curl
security/ca_root_nss
ports-mgmt/pkg
# iocell create tag=template release=11.0-RELEASE pkglist=/iocell/templates/template.pkg

When -x is used, one sees clearly that iocell create ... pkglist=.... doesn't work if jail is stopped as there is no /bin/sh available to extract the ABI from, for pkg(8) to do its chrooted work. Its not clear if this fails due to changes over time in pkg(8) or in fact it never worked at all.

+ echo '* Installing extra packages..'
* Installing extra packages..
+ cat /iocell/templates/template.pkg
+ __info 'installing: ftp/curl'
+ echo '  INFO: installing: ftp/curl'
  INFO: installing: ftp/curl
+ pkg -c /iocell/jails/78c5509a-085e-11e7-83c8-00bdad1ef709/root install -qy ftp/curl
pkg: open(/bin/sh): No such file or directory
pkg: open(/bin/sh): No such file or directory
pkg: Unable to determine ABI
pkg: Cannot parse configuration file!
+ __info 'installing: security/ca_root_nss'
+ echo '  INFO: installing: security/ca_root_nss'
  INFO: installing: security/ca_root_nss
+ pkg -c /iocell/jails/78c5509a-085e-11e7-83c8-00bdad1ef709/root install -qy security/ca_root_nss
pkg: open(/bin/sh): No such file or directory
pkg: open(/bin/sh): No such file or directory
pkg: Unable to determine ABI
pkg: Cannot parse configuration file!
+ __info 'installing: ports-mgmt/pkg'
+ echo '  INFO: installing: ports-mgmt/pkg'
  INFO: installing: ports-mgmt/pkg
+ pkg -c /iocell/jails/78c5509a-085e-11e7-83c8-00bdad1ef709/root install -qy ports-mgmt/pkg
pkg: open(/bin/sh): No such file or directory
pkg: open(/bin/sh): No such file or directory
pkg: Unable to determine ABI
pkg: Cannot parse configuration file!
+ echo '  Successfully created: 78c5509a-085e-11e7-83c8-00bdad1ef709 (template)'
  Successfully created: 78c5509a-085e-11e7-83c8-00bdad1ef709 (template)
+ [ ! -z '' ]
+ exit
# 

If the jail is first started, then packages are able to be installed as expected, but then this renders the template jail useless. Fix is likely to use same pkg changes as #17.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions