Repackaging and installing zoom on Linux without ibus dependency - lmmx/devnotes GitHub Wiki
As "e. hashman" notes in this explainer entitled "Repack Zoom .debs to
remove the ibus
dependency":
For whatever reason, Zoom distributes
.deb
s that have a dependency onibus
.ibus
is the "intelligent input bus" package and as far as I'm aware, might be used for emoji input in chat or something?? But is otherwise not actually a dependency of the Zoom package. I've tested this extensively... the client works fine without it.
The currently shipping build of Zoom for Linux Mint (zoom_amd64.deb
) failed to install,
after informing me that it needs to install 2 dependencies:
ibus
libxcb-xtest0
and upgrade 1:
gir1.2-ibus-1.0
Oddly, the installer was trying to pull a file from here, and when I went to the location there was a more recent package. I almost started to install the newer ibus manually, but then came across her guide which suggests repackaging without this dependency instead.
As e. hashman notes, we can unpack the control file (see man dpkg-deb
for more info as well as
the Debian policy manual here)
with:
scratch=$(mktemp -d)
This just makes a temporary ("scratch" [space]) directory,
which you can observe with ls $scratch
consists of 3 folders, this is all standard and documented
in the Debian policy manual chapter 3
DEBIAN
opt
usr
You can think of it as being like a little file system: it's a "binary package" which the extraction
command -x
/-X
extracts, and the standard "File System Structure" is documented
here. The important thing is that there
are 3 parts to it (in order):
- debian-binary - Contains a single line giving the package format version number. (2.0 for current versions of Debian)
- control archive - A tar archive named
control.tar
contains the maintainer scripts and the package meta-information (package name, version, dependencies and maintainer). Compressing the archive with gzip or xz is supported. The file extension changes to indicate the compression method - data archive - A tar archive named
data.tar
contains the actual installable files. Compressing the archive with gzip, bzip2, lzma or xz is supported. The file extension changes to indicate the compression method.
You can read more about it at Wikipedia.
- Not to be confused with the 3 "archive areas", which refers to the "Debian Archive" which is the hosting facility for the individual package archives.
Now back to the point...
She then proceeds to run a silent command (which you can make
verbose by capitalising the -x
flag to -X
instead)
# Extract package contents
dpkg -x zoom_amd64.deb $scratch
Now if you take a look at the first part of the now-unpacked .deb
, i.e. the debian-binary i.e. the
directory named DEBIAN/
, you find:
ls $scratch/DEBIAN/
⇣
control
md5sums
postinst
postrm
and it's the first of these files that's of interest. If we view
it we can :set syntax=yaml
(though note it's not actually YAML) to get a readable-enough coloured version of the file
Package: zoom
Version: 5.1.418436.0628
License: see https://www.zoom.us/
Vendor: Zoom Video Communications, Inc.
Architecture: amd64
Maintainer: Zoom Linux Team <[email protected]>
Installed-Size: 153094
Depends: libglib2.0-0, libxcb-shape0, libxcb-shm0, libxcb-xfixes0, libxcb-randr0, libxcb-image0, libfontconfig1, libgl1-mesa-glx, libegl1-mesa, libxi6, libsm6, libxrender1, libpulse0, libxcomposite1, libxslt1.1, libsqlite3-0, libxcb-keysyms1, libxcb-xtest0, libdbus-1-3, libxtst6, ibus
Section: default
Priority: optional
Homepage: https://www.zoom.us
Description: Zoom, #1 Video Conferencing and Web Conferencing Service
Zoom, the cloud meeting company, unifies cloud video conferencing, simple online meetings, and group messaging into one easy-to-use platform. Our solution offers the best video, audio, and screen-sharing experience across Zoom Rooms, Windows, Mac, Linux, iOS, Android, and H.323/SIP room systems.
The line of interest is the Depends
key:
Depends: libglib2.0-0, libxcb-shape0, libxcb-shm0, libxcb-xfixes0, libxcb-randr0, libxcb-image0, libfontconfig1, libgl1-mesa-glx, libegl1-mesa, libxi6, libsm6, libxrender1, libpulse0, libxcomposite1, libxslt1.1, libsqlite3-0, libxcb-keysyms1, libxcb-xtest0, libdbus-1-3, libxtst6, ibus
Now in the next step, e. hashman takes out the ibus dependency with an in-place sed -i
call, with
the extra flag -E
("extended regular expressions") which lacks a replacement at the end: //
(so it will delete
either of the matching options ibus,
or , ibus
) and also lacks a g
after the final slash, so
it will only replace once on the line.
sed -i -E 's/(ibus, |, ibus)//' $scratch/DEBIAN/control
view
ing it again we can see it's no longer the final dependency listed, and I can diff the two
just to check we didn't disturb anything else
oldcontrol="Package: zoom
Version: 5.1.418436.0628
License: see https://www.zoom.us/
Vendor: Zoom Video Communications, Inc.
Architecture: amd64
Maintainer: Zoom Linux Team <[email protected]>
Installed-Size: 153094
Depends: libglib2.0-0, libxcb-shape0, libxcb-shm0, libxcb-xfixes0, libxcb-randr0, libxcb-image0,
libfontconfig1, libgl1-mesa-glx, libegl1-mesa, libxi6, libsm6, libxrender1, libpulse0,
libxcomposite1, libxslt1.1, libsqlite3-0, libxcb-keysyms1, libxcb-xtest0, libdbus-1-3, libxtst6,
ibus
Section: default
Priority: optional
Homepage: https://www.zoom.us
Description: Zoom, #1 Video Conferencing and Web Conferencing Service
Zoom, the cloud meeting company, unifies cloud video conferencing, simple online meetings, and
group messaging into one easy-to-use platform. Our solution offers the best video, audio, and
screen-sharing experience across Zoom Rooms, Windows, Mac, Linux, iOS, Android, and H.323/SIP room
systems."
diff --old-line-format="" "$oldcontrol" $scratch/DEBIAN/control
⇣
8c8
< Depends: libglib2.0-0, libxcb-shape0, libxcb-shm0, libxcb-xfixes0, libxcb-randr0, libxcb-image0, libfontconfig1, libgl1-mesa-glx, libegl1-mesa, libxi6, libsm6, libxrender1, libpulse0, libxcomposite1, libxslt1.1, libsqlite3-0, libxcb-keysyms1, libxcb-xtest0, libdbus-1-3, libxtst6, ibus
---
> Depends: libglib2.0-0, libxcb-shape0, libxcb-shm0, libxcb-xfixes0, libxcb-randr0, libxcb-image0, libfontconfig1, libgl1-mesa-glx, libegl1-mesa, libxi6, libsm6, libxrender1, libpulse0, libxcomposite1, libxslt1.1, libsqlite3-0, libxcb-keysyms1, libxcb-xtest0, libdbus-1-3, libxtst6
12c12
In other words line 8 changed, and it's visually verifiable that only the last part has changed (I'm not sure if there's a simple tool for sub-line diffs). We can double check like this:
diff <(echo "$oldcontrol" | head -8 | tr ',' '\n') <(cat "$scratch/DEBIAN/control" | head -8 | tr
',' '\n')
⇣
29d28
< ibus
Ta-da!
Now that we're certain, the next instruction is:
# Rebuild the .deb
dpkg -b $scratch patched_zoom_amd64.deb
So that temporary directory gets archived back up again into patched_zoom_amd64.deb
.
You can open the GUI installer with gdebi-gtk
or use the command line version gdebi
.
It now reports that only 1 package installation is required, libxcb-xtest0
.
Wikipedia says XCB implements client-side of the X11 display server protocol (the X windowing system). This seems like something we can't remove, so I went ahead and installed and voila zoomons!