ogra1 / zoom-snap

75 stars 13 forks source link

Unable to install on Pop!_OS 21.04 #85

Open kstefanini opened 2 years ago

kstefanini commented 2 years ago

Hi! Sorry to bother you with that, but I'm unable to install Zoom snap on Pop!_OS 21.04. Script fails here:

Run configure hook of "zoom-client" snap if present

2021-07-19T11:21:42+02:00 ERROR run hook "configure": cp: cannot open '/var/lib/snapd/hostfs/etc/os-release' for reading: Permission denied

File /var/lib/snapd/hostfs/etc/os-release doesn't exist.

Thanks in advance for your help! (And sorry in advance if it's a dupe)

Expand full log ``` Done today at 11:21 CEST today at 11:21 CEST Ensure prerequisites for "zoom-client" are available Undone today at 11:21 CEST today at 11:21 CEST Download snap "zoom-client" (151) from channel "stable" Done today at 11:21 CEST today at 11:21 CEST Fetch and check assertions for snap "zoom-client" (151) Undone today at 11:21 CEST today at 11:21 CEST Mount snap "zoom-client" (151) Undone today at 11:21 CEST today at 11:21 CEST Copy snap "zoom-client" data Undone today at 11:21 CEST today at 11:21 CEST Setup snap "zoom-client" (151) security profiles Undone today at 11:21 CEST today at 11:21 CEST Make snap "zoom-client" (151) available to the system Undone today at 11:21 CEST today at 11:21 CEST Automatically connect eligible plugs and slots of snap "zoom-client" Undone today at 11:21 CEST today at 11:21 CEST Set automatic aliases for snap "zoom-client" Undone today at 11:21 CEST today at 11:21 CEST Setup snap "zoom-client" aliases Undone today at 11:21 CEST today at 11:21 CEST Run install hook of "zoom-client" snap if present Undone today at 11:21 CEST today at 11:21 CEST Start snap "zoom-client" (151) services Error today at 11:21 CEST today at 11:21 CEST Run configure hook of "zoom-client" snap if present Hold today at 11:21 CEST today at 11:21 CEST Run health check of "zoom-client" snap Undone today at 11:21 CEST today at 11:21 CEST Connect zoom-client:x11 to snapd:x11 Undone today at 11:21 CEST today at 11:21 CEST Connect zoom-client:audio-record to snapd:audio-record Undone today at 11:21 CEST today at 11:21 CEST Connect zoom-client:hardware-observe to snapd:hardware-observe Undone today at 11:21 CEST today at 11:21 CEST Connect zoom-client:opengl to snapd:opengl Undone today at 11:21 CEST today at 11:21 CEST Connect zoom-client:unity7 to snapd:unity7 Undone today at 11:21 CEST today at 11:21 CEST Connect zoom-client:wayland to snapd:wayland Undone today at 11:21 CEST today at 11:21 CEST Connect zoom-client:audio-playback to snapd:audio-playback Undone today at 11:21 CEST today at 11:21 CEST Connect zoom-client:desktop to snapd:desktop Undone today at 11:21 CEST today at 11:21 CEST Connect zoom-client:network-bind to snapd:network-bind Undone today at 11:21 CEST today at 11:21 CEST Connect zoom-client:camera to snapd:camera Undone today at 11:21 CEST today at 11:21 CEST Connect zoom-client:home to snapd:home Undone today at 11:21 CEST today at 11:21 CEST Connect zoom-client:network to snapd:network Undone today at 11:21 CEST today at 11:21 CEST Connect zoom-client:network-manager-observe to snapd:network-manager-observe Undone today at 11:21 CEST today at 11:21 CEST Connect zoom-client:system-observe to snapd:system-observe Undone today at 11:21 CEST today at 11:21 CEST Connect zoom-client:screen-inhibit-control to snapd:screen-inhibit-control Undone today at 11:21 CEST today at 11:21 CEST Setup snap "zoom-client" (151) security profiles for auto-connections ...................................................................... Run configure hook of "zoom-client" snap if present 2021-07-19T11:21:42+02:00 ERROR run hook "configure": cp: cannot open '/var/lib/snapd/hostfs/etc/os-release' for reading: Permission denied ```
HayashiEsme commented 2 years ago

I had a similar issue invoking snap install zoom-client (also using Pop!_OS, and 20.04) resulting in

error: cannot perform the following tasks:
- Run configure hook of "zoom-client" snap if present (run hook "configure": cp: cannot open '/var/lib/snapd/hostfs/etc/os-release' for reading: Permission denied)

@popey @diddledani were lovely in helping me fix this issue, the workaround at the moment is to run snap install zoom-client --devmode

Their suspicions are that an addition in zoom-snap/configure is causing the permission error (either in creating it or accessing it)

I've also been asked to poke @ogra1 for this, so 😂 Hello:)

ogra1 commented 2 years ago

Well, the problem here that the location and existence is a hard requirement for all systemd based OSes, seemingly PopOS breaks this standard by (re)moving this file and patches systemd to read it from somewhere else ... i'd be surprised if not also other software misbehaves (noticed or unnoticed) due to that ...

the handling of os-release as it is done in zoom-client right now is the only way to make screen sharing under wayland work with zoom under secure confinement, you should ask the PoPOS people to not break standards this way as it will break other third party software too ...

PS: i could probably work around this issue if there was any possibility for me to find out i am runnig on PoPOS and simply hard-disable screen sharing on that OS ... but to find out that i am actually running on PoPOS i'd need to be able to read /etc/os-release ... this is a catch22, so i guess popey's sugesstion to disable security and run zoom in --devmode is the only proper option here until PoPOS gets fixed for good

jacobgkau commented 2 years ago

you should ask the PoPOS people to not break standards this way as it will break other third party software too

The standard indicates that /etc/os-release can be a symlink to other files on the root file system, so Pop!_OS is following the standard.

The /etc/os-release and /usr/lib/os-release files might be symlinks to other files, but it is important that the file is available from earliest boot on, and hence must be located on the root file system.

This output is from a Pop!_OS system, if it helps to understand what the actual issue might be:

jacob@serw12:~$ cat /etc/os-release
NAME="Pop!_OS"
VERSION="21.04"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 21.04"
VERSION_ID="21.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=hirsute
UBUNTU_CODENAME=hirsute
LOGO=distributor-logo-pop-os
jacob@serw12:~$ ls -alh /etc/os-release
lrwxrwxrwx 1 root root 17 Jun 30 07:49 /etc/os-release -> pop-os/os-release
ogra1 commented 2 years ago

well, the issue isnt /etc/os-relase but the fact that it links to some weird place that can not be read by snaps ... on debian and ubuntu systems (and all flavours and properly integrated derivatives) /etc/os-release is a symlnk to /usr/lib/os-release which is put in place by the distro installer via the base-files package ... the popos developers decided to instead of forking base-files properly into their own archive to instead put a symlink to /etc/popos/os-release in place ...

neither apparmor nor snapd do know about the existence of that non-std location and will completely block all access to it ... there is nothing that could be done on a package level here ... either popos stops applying such a hack or you file a bug against snapd (or apparmor, not sure) to support said hack and to add that location to the set of readable dirs (which will be non-trivial since os-release already receives special treatment in the filesystem namespace in use), either might work ...

JonnesBezerra commented 2 years ago

I had a similar issue invoking snap install zoom-client (also using Pop!_OS, and 20.04) resulting in

error: cannot perform the following tasks:
- Run configure hook of "zoom-client" snap if present (run hook "configure": cp: cannot open '/var/lib/snapd/hostfs/etc/os-release' for reading: Permission denied)

@popey @diddledani were lovely in helping me fix this issue, the workaround at the moment is to run snap install zoom-client --devmode

Their suspicions are that an addition in zoom-snap/configure is causing the permission error (either in creating it or accessing it)

I've also been asked to poke @ogra1 for this, so Hello:)

Thank you @HayashiEsme, it works fine to me 👍🏽

personalizedrefrigerator commented 2 years ago

Linking to https://github.com/pop-os/pop/issues/2146 which suggests making /etc/os-release a hard link instead of a symlink (another workaround for installing zoom-client).