Trent W. Buck wrote:
> The error report for #1005230 only specifically mentioned GTK3.
> Are these other "portal" dependencies *really* needed now?

As at chromium 98.0.4758.102-1~deb11u1,
chromium works with xdg-desktop-portal, fuse, flatpak removed.

A minimal test script is attached.
it builds & boots a Debian 11 Live VM without chromium.
You can then launch chromium,
browse to https://example.com, Ctrl+S save and Ctrl+O open.

I'm not sure what other tests are needed.
Can I do anything else to help with this ticket?
#!/usr/bin/python3
import subprocess
import tempfile

__doc__ = """ test chrome w/o fuse

log in as "x", run chromium, browse to https://example.museum/, Ctrl+S Enter to save.
See that saving works even with xdg-desktop-portal/flatpak/fuse removed.

NOTE: kvm's default geometry is 800x600 or something.
      GTK3's default save dialog does not fit.
      Try resizing the KVM window before lightdm starts.
"""

with tempfile.TemporaryDirectory() as td:
    subprocess.check_call(
        ['mmdebstrap',
         '--include=linux-image-generic,live-boot,chromium,task-xfce-desktop,sudo',
         # f'--aptopt=Acquire::http::Proxy "http://localhost:3142";',
         '--customize-hook=chroot $1 adduser x --gecos x --disabled-password --quiet',
         '--customize-hook=chroot $1 adduser x sudo',
         '--customize-hook=echo x: | chroot $1 chpasswd --crypt-method=NONE',
         '--customize-hook=download vmlinuz vmlinuz',
         '--customize-hook=download initrd.img initrd.img',

         # Remove things that chromium claims it needs but does not actually need.
         '--customize-hook=chroot $1 dpkg --force-depends --purge xdg-desktop-portal xdg-desktop-portal-backend xdg-desktop-portal-gtk fuse libfuse2 fuse3 libfuse3-3 bubblewrap flatpak libgnome-desktop-3-19',

         # Report which version of chromium we are running.
         '--customize-hook=chroot $1 dpkg-query -W chromium',
         'bullseye',
         'filesystem.squashfs'],
        cwd=td)
    subprocess.check_call(
        ['kvm',
         '-m', '2G',
         '--device', 'virtio-vga',
         '--kernel', 'vmlinuz',
         '--initrd', 'initrd.img',
         '--append', 'boot=live plainroot root=/dev/vda quiet',
         '--drive', f'file=filesystem.squashfs,format=raw,media=disk,if=virtio,readonly=on'],
        cwd=td)
bash5$ python3 POC-chromium-without-fuse.py
I: automatically chosen mode: unshare
I: chroot architecture amd64 is equal to the host's architecture
I: automatically chosen format: squashfs
I: using /tmp/mmdebstrap.YvkchFlb0y as tempdir
W: tar2sqfs does not support extended attributes from the 'system' namespace
I: running apt-get update...
done
I: downloading packages with apt...
done
I: extracting archives...
done
I: installing essential packages...
done
I: downloading apt...
done
I: installing apt...
done
I: installing remaining packages inside the chroot...
done
done
done
done
done
I: running --customize-hook in shell: sh -c 'chroot $1 adduser x --gecos x 
--disabled-password --quiet' exec /tmp/mmdebstrap.YvkchFlb0y
I: running --customize-hook in shell: sh -c 'chroot $1 adduser x sudo' exec 
/tmp/mmdebstrap.YvkchFlb0y
Adding user `x' to group `sudo' ...
Adding user x to group sudo
Done.
I: running --customize-hook in shell: sh -c 'echo x: | chroot $1 chpasswd 
--crypt-method=NONE' exec /tmp/mmdebstrap.YvkchFlb0y
I: running special hook: download vmlinuz vmlinuz
I: running special hook: download initrd.img initrd.img
I: running --customize-hook in shell: sh -c 'chroot $1 dpkg --force-depends 
--purge xdg-desktop-portal xdg-desktop-portal-backend xdg-desktop-portal-gtk 
fuse libfuse2 fuse3 libfuse3-3 bubblewrap flatpak libgnome-desktop-3-19' exec 
/tmp/mmdebstrap.YvkchFlb0y
dpkg: warning: ignoring request to remove xdg-desktop-portal-backend which 
isn't installed
dpkg: warning: ignoring request to remove fuse3 which isn't installed
dpkg: warning: ignoring request to remove libfuse3-3 which isn't installed
dpkg: warning: ignoring request to remove flatpak which isn't installed
dpkg: libgnome-desktop-3-19:amd64: dependency problems, but removing anyway as 
you requested:
 xdg-desktop-portal-gtk depends on libgnome-desktop-3-19 (>= 3.17.92).

(Reading database ... 31385 files and directories currently installed.)
Removing libgnome-desktop-3-19:amd64 (3.38.5-3) ...
dpkg: xdg-desktop-portal: dependency problems, but removing anyway as you 
requested:
 xdg-desktop-portal-gtk depends on xdg-desktop-portal (>= 1.7.1).

Removing xdg-desktop-portal (1.8.1-1) ...
dpkg: xdg-desktop-portal-gtk: dependency problems, but removing anyway as you 
requested:
 chromium depends on xdg-desktop-portal-gtk | xdg-desktop-portal-backend; 
however:
  Package xdg-desktop-portal-gtk is to be removed.
  Package xdg-desktop-portal-backend is not installed.
  Package xdg-desktop-portal-gtk which provides xdg-desktop-portal-backend is 
to be removed.
 chromium depends on xdg-desktop-portal-gtk | xdg-desktop-portal-backend; 
however:
  Package xdg-desktop-portal-gtk is to be removed.
  Package xdg-desktop-portal-backend is not installed.
  Package xdg-desktop-portal-gtk which provides xdg-desktop-portal-backend is 
to be removed.

Removing xdg-desktop-portal-gtk (1.8.0-1) ...
Removing fuse (2.9.9-5) ...
update-initramfs: deferring update (trigger activated)
Purging configuration files for fuse (2.9.9-5) ...
Removing libfuse2:amd64 (2.9.9-5) ...
Removing bubblewrap (0.4.1-3) ...
Processing triggers for libc-bin (2.31-13+deb11u2) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for initramfs-tools (0.140) ...
update-initramfs: Generating /boot/initrd.img-5.10.0-11-amd64
W: Possible missing firmware /lib/firmware/i915/skl_huc_2.0.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/skl_guc_33.0.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/bxt_huc_2.0.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_33.0.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/kbl_huc_4.0.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_33.0.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/glk_huc_4.0.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/glk_guc_33.0.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/kbl_huc_4.0.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_33.0.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/cml_huc_4.0.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/cml_guc_33.0.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/icl_huc_9.0.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/icl_guc_33.0.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/ehl_huc_9.0.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/ehl_guc_33.0.4.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/tgl_huc_7.5.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/tgl_guc_35.2.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/tgl_huc_7.5.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/tgl_guc_35.2.0.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/bxt_dmc_ver1_07.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/skl_dmc_ver1_27.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1_04.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/glk_dmc_ver1_04.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/cnl_dmc_ver1_07.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/icl_dmc_ver1_09.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/tgl_dmc_ver2_08.bin for module 
i915
W: Possible missing firmware /lib/firmware/i915/rkl_dmc_ver2_02.bin for module 
i915
live-boot: core filesystems devices utils udev blockdev dns.
I: running --customize-hook in shell: sh -c 'chroot $1 dpkg-query -W chromium' 
exec /tmp/mmdebstrap.YvkchFlb0y
chromium        98.0.4758.102-1~deb11u1
I: cleaning package lists and apt cache...
done
done
I: creating tarball...
I: done
I: removing tempdir /tmp/mmdebstrap.YvkchFlb0y...
I: success in 82.8023 seconds

Reply via email to