Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Austcool-Walker/e3750fc49201316df76ab1c45e47c666 to your computer and use it in GitHub Desktop.
Save Austcool-Walker/e3750fc49201316df76ab1c45e47c666 to your computer and use it in GitHub Desktop.
Build zsh 5.5.1 on Ubuntu 18.04
# based on this post
# https://askubuntu.com/questions/770733/how-to-install-package-from-testing
# install build tools
sudo apt-get install moreutils build-essential fakeroot devscripts dpkg-dev equivs
# create some build directory
mkdir build
cd build
# this downloads the dsc file and all the files referenced in there
dget http://archive.ubuntu.com/ubuntu/pool/main/z/zsh/zsh_5.5.1-1ubuntu3.dsc
# if the command before complained about an missing gpg key, you should import the key
# and then run the command again.
key=E1C748CAF7C23CB13C2CAA86E8E84908F903AFB5
gpg --keyserver keyserver.ubuntu.com --recv-keys $key
gpg --no-default-keyring -a --export $key | gpg --no-default-keyring --keyring ~/.gnupg/trustedkeys.gpg --import -
dget http://archive.ubuntu.com/ubuntu/pool/main/z/zsh/zsh_5.5.1-1ubuntu3.dsc
# now we have a source directory already setup to build a .deb package
cd zsh-5.5.1/
# append a local version
debchange --local=~bundebs "Backport to bionic."
# install build dependencies
sudo mk-build-deps -i
# build the package
dpkg-buildpackage -rfakeroot -uc -b
# remove the build dependencies
sudo apt-get purge --auto-remove zsh-build-deps
# the resulting files are in the parent directory
ls -l ../*(.)
# 12K zsh_5.5.1-1ubuntu3~bundebs1_amd64.buildinfo
# 4.0K zsh_5.5.1-1ubuntu3~bundebs1_amd64.changes
# 724K zsh_5.5.1-1ubuntu3~bundebs1_amd64.deb
# 80K zsh_5.5.1-1ubuntu3~bundebs1.debian.tar.xz
# 4.0K zsh_5.5.1-1ubuntu3~bundebs1.dsc
# 3.4M zsh-common_5.5.1-1ubuntu3~bundebs1_all.deb
# 2.1M zsh-dbgsym_5.5.1-1ubuntu3~bundebs1_amd64.ddeb
# 136K zsh-dev_5.5.1-1ubuntu3~bundebs1_amd64.deb
# 2.6M zsh-doc_5.5.1-1ubuntu3~bundebs1_all.deb
#1008K zsh-static_5.5.1-1ubuntu3~bundebs1_amd64.deb
# 1.6M zsh-static-dbgsym_5.5.1-1ubuntu3~bundebs1_amd64.ddeb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment