#5 flatpak-module local-build doesn't ran in toolbox
Opened 2 years ago by zlopez. Modified 7 months ago

I tried to run flatpak-module local-build in fedora toolbox and it failed on building artifact module-build-macros with following error:

ERROR: Command failed: 
 # /usr/bin/systemd-nspawn -q -M 2192488108d043929b70e3766e9d3d97 -D /var/lib/mock/module-keepassxc-master-3120200130085821-PoolThread-twisted.internet.reactor-0/root -a --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007" --setenv=PS1=<mock-chroot> \s-\v\$  --setenv=LANG=en_US.UTF-8 /usr/sbin/groupadd -g 135 mock

It will be nice if the fedora flatpak could be build (and run) inside fedora toolbox, because the main users of the flatpaks and probably the main contributors will be from the users of Fedora Silverblue.

I was able to solve the above by setting config_opts['use_nspawn'] to False in /etc/mock/site-defaults.cfg.

It will be nice to have this mentioned at least somewhere in packaging tutorial.

I've not been able to get this to work on Fedora Silverblue 35 in a fresh toolbox. I get this error:

⬢[tor@toolbox chatty]$ flatpak-module local-build --install
Traceback (most recent call last):
  File "/usr/bin/mbs-manager", line 33, in <module>
    sys.exit(load_entry_point('module-build-service==3.6.1', 'console_scripts', 'mbs-manager')())
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/flask/cli.py", line 596, in main
    return super().main(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python3.10/site-packages/flask/cli.py", line 440, in decorator
    return __ctx.invoke(f, *args, **kwargs)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/module_build_service/manage.py", line 133, in build_module_locally
  File "/usr/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 1094, in create_all
    self._execute_for_all_tables(app, bind, 'create_all')
  File "/usr/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 1086, in _execute_for_all_tables
    op(bind=self.get_engine(app, bind), **extra)
  File "/usr/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 1017, in get_engine
    return connector.get_engine()
  File "/usr/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 593, in get_engine
    sa_url, options = self.get_options(sa_url, echo)
  File "/usr/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 608, in get_options
    sa_url, options = self._sa.apply_driver_hacks(self._app, sa_url, options)
TypeError: cannot unpack non-iterable NoneType object

error: mbs-manager build_module_locally failed
error: log: None

Login to comment on this ticket.