tailhook / vagga

Vagga is a containerization tool without daemons
http://vagga.readthedocs.org
MIT License
1.86k stars 96 forks source link

flatpak in ubuntu disco fails with Glib assert GLib-GIO-CRITICAL #513

Closed bootchk closed 5 years ago

bootchk commented 5 years ago

(flatpak remote-list:1403): GLib-GIO-CRITICAL **: 17:58:27.155: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

** (flatpak remote-list:1403): CRITICAL **: 17:58:27.155: polkit_authority_register_authentication_agent_with_options_sync: assertion 'POLKIT_IS_AUTHORITY (authority)' failed
Segmentation fault (core dumped)
Setting up gnupg (2.2.12-1ubuntu3) ...
Processing triggers for systemd (240-6ubuntu5) ...
Processing triggers for libc-bin (2.29-0ubuntu2) ...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
 WARN 2019-05-12T17:58:29Z: vagga::wrapper::build: Container wFlatpak (63d3c4cc) built in 31 seconds.
ERROR 2019-05-12T17:58:29Z: vagga::wrapper: Error executing flatpakVersion: Error mounting "/etc/resolv.conf": recursive bind mount "/etc/resolv.conf" -> "/vagga/root/etc/resolv.conf": No such file or directory (os error 2) (source: exists, target: missing, mapped-root)

This from vagga.yml:


   ### basic OS with dev (compiling)
  baseOS:
    setup:
    # base OS is ubuntu 18.10
    # - !Ubuntu cosmic
    - !Ubuntu disco
    # enable universe repository (where gimp lives)
    - !UbuntuUniverse
    # tools for dev (C compiler)
    - !Install [build-essential]

   ### with flatpak
  wFlatpak:
    setup:
    - !Container baseOS

    # flatpak is NOT part of build-essential
    - !Install [flatpak]

I am just playing with flatpak, I wanted to use it inside vagga as a sandbox. I haven't tried this outside of vagga. I know flatpak is newish and Ubuntu might be a few versions behind so the problem is probably in flatpak. I did try this in vagga with cosmic, and I only got the latter errors about resolv.conf. For what its worth, I am reporting it.

tailhook commented 5 years ago

It looks like the issue is not in flatpack at all. Maybe we have some issues with ubuntu disco. First, try to add - !Sh 'touch /etc/resolv.conf to the container build. If it works we'll probably consider it a bug in vagga. (I.e. I'm not sure anybody has tested ubuntu disco, I can check later)

bootchk commented 5 years ago

I tried your suggestion, it did not help. It is not just disco, same problem in cosmic. When I follow the links to resolv.conf, they seem broken. /etc/resolv.conf is a link to ../run/systemd/resolve/stub-resolv.conf but ../run is empty.

Since I am not sure how that all evolves, I think I will try a newer host machine (mine is 16.04) and an older OS in the container.

tailhook commented 5 years ago

Oh, then just remove a link - !Sh "rm /etc/resolv.conf, vagga will create a valid file after the build process.

FYI, I'm not sure I've tested anything newer than bionic.

bootchk commented 5 years ago

Yes, that helps, to rm resolv.conf at the end of any container setup.

NeerajUsadadiya commented 1 year ago

This works for a container with ubuntu 22.04 (jammy) also.