Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
5 tasks done
dch opened this issue Mar 14, 2017 · 1 comment
Open
5 tasks done

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

dch opened this issue Mar 14, 2017 · 1 comment

Comments

@dch
Copy link
Contributor

dch commented Mar 14, 2017

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.

@dch dch changed the title pkglist=... does not work for templates & stopped jails returned error from pkg(8) is not handled Mar 14, 2017
@lrosenman
Copy link

I'm seeing this as well.
on another note, is the pkglist file supposed to be category/port or package name?
(I.E. mail/exim, or exim-4.88 or exim?)

orichoni added a commit to orichoni/iocell that referenced this issue Jun 23, 2017
Always mount "${release}" in order to have "basedirs" at the time of jail creation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants