Skip to content

Instantly share code, notes, and snippets.

@oliverkurth
Last active March 22, 2021 23:25
Show Gist options
  • Save oliverkurth/1f646d08475d3235916e6471533e2e98 to your computer and use it in GitHub Desktop.
Save oliverkurth/1f646d08475d3235916e6471533e2e98 to your computer and use it in GitHub Desktop.
Building open-vm-tools if package does not exist for arch (eg. ARM)

Install docker:

sudo apt install docker.io

Create a working directory:

mkdir ovt-build
cd ovt-build

Create a Dockerfile:

# Pull base image.
FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive

# Install packages required to build open-vm-tools
# (plus curl and vim for debugging)
RUN \
  apt-get update && \
  apt-get install -y \
     build-essential \
     curl \
     vim \
     autotools-dev \
     debhelper \
     dh-autoreconf \
     dh-systemd \
     doxygen \
     libcunit1-dev \
     libdumbnet-dev \
     libfuse-dev \
     libgtk-3-dev \
     libgtkmm-3.0-dev \
     libicu-dev \
     libnotify-dev \
     libpam0g-dev \
     libprocps-dev \
     libx11-dev \
     libxinerama-dev \
     libxss-dev \
     libxtst-dev \
     libmspack-dev \
     libssl-dev \
     libxmlsec1-dev \
     libudev-dev \
     libprocps-dev \
     libdrm-dev \
     liblzma-dev \
     && \
  apt-get clean

Build the container: sudo docker build -t ubuntu-ovt-build .

Run it: sudo docker run --rm -it -v $(pwd):/build ubuntu-ovt-build

Inside the container, do:

  • edit /etc/apt/sources.list, enable source pacakges (lines beginning with deb-src, for focal and focal-updates)
apt update
cd /build
apt source open-vm-tools
cd open-vm-tools-11.1.5/
vi debian/control # %s/amd64 i386/amd64 i386 arm64/g
dpkg-buildpackage -us -uc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment