zpkg
Use programs from other Linux distributions
Install
$ curl -Lf https://github.com/ihucos/zpkg/releases/download/0.2.5/zpkg.zpkg | tar -xJf - -C ~/.local
What does zpkg do?
With zpkg you can install programs from other distributions into your system
|
$ zpkg add gimp --from alpine --apk gimp
|
zpkg will install programs to your home directory.
|
$ readlink ~/.local/bin/gimp
../lib/zpkg/gimp/gimp
|
You can upgrade zpkg packages. Upgrades are atomic for each package.
|
$ zpkg upgrade
|
It is possible to repackage added programs into standalone zpkg packages. These packages can be easily installed into other machines. The only system requirement is tar. Standalone zpkg packages may be managed (removed, upgraded) with zpkg.
|
$ zpkg package gimp /tmp/gimp.zpkg
Install package locally:
$ tar -xf /tmp/gimp.zpkg -C ~/.local
Install package globally:
$ tar -xf /tmp/gimp.zpkg -C /usr/local
|
What else should I know?
-
For package managers that need multi user support - like apt - you need newuidmap installed and /etc/subuid configured when running zpkg unprivileged (Done in Ubuntu).
-
Packages should never change files of it's base system.
More examples
$ zpkg ls
gimp
zpkg
$ zpkg freeze
zpkg add gimp --from alpine --apk gimp
zpkg add zpkg --from-github ihucos/zpkg
$ zpkg rm gimp
$ zpkg add --from ubuntu --apt gimp
$ zpkg --help
Usage
USAGE
zpkg [-g|-l] {add,flush,freeze,ls,package,rebuild,rm,upgrade} ...
SUBCOMMANDS
add [PKG] BUILD-ARGS builds and adds a package
flush flushes the build cache
freeze print package with build instruction
ls lists all installed packages
package PKG FILE creates a standalone package
rebuild PKG rebuild given package
rm PKG uninstalls the given package
unfreeze FREEZED-FILE apply frozen file
upgrade upgrades each package atomically
ARGUMENTS
--global, -g
affects the system globally
--local, -l
saves packages in cwd under ./zpkg
BUILD ARGUMENTS
--from, -f
choose a base image
--run, -x
run any shell (/bin/sh) command
--layer, -l
adds a layer for build caching
--from-github
build according to instructions at GitHub project
--add-apt-repository, --apt, --apk, --apt, --dnf, --emerge, --npm,
--pacman, --pip, --pip3, --yum
Invokes the given tool with it's primary action
-A same as `--from alpine:edge --apk`
-C same as `--from centos:8 --yum`
-D same as `--from debian:sid --apt`
-F same as `--from fedora:32 --dnf`
-G same as `--from gentoo:current --emerge`
-R same as `--from archlinux:current --pacman`
-U same as `--from ubuntu:focal --apt`
EXAMPLE
zpkg add xeyes -U x11-apps
zpkg add -A gimp
zpkg add -A py3-pip --pip3 yapf
zpkg rm yapf
FAQ
How stable is zpkg?
Alpha.
How is zpkg licensed?
zpkg and
plash are under the MIT licence.
What else can I do with zpkg?
-
Quickly use applications from other Linux distributions.
-
Install applications without root.
-
Distribute applications with zpkg package. This is by the way how zpkg is distributed.
-
Deploy web applications or services with zpkg package.
-
Have distribution independent applications in your home folder or a usb stick.
Does zpkg run on Windows/MacOS/BSD?
zpkg requires a Linux kernel. Running on another host operating system is only possible with it's eventual Linux compability mechanisms.
What applications work with zpkg?
Everything except System Programs. As an example: Bash, synaptic, apt, and gnome-tweak-tool may not work as desired. LibreOffice, Firefox, Gimp and pylint are fully supported.
Which build commands are supported?
All of
plash's build commands are supported when adding packages.
What happens if a package changes files of its base image?
This would also affect other packages with the same base image. If that ever happens you need to remove the bad package (zpkg rm badpkg) and upgrade (zpkg upgrade).
How do I keep zpkg updated?
Since zpkg is packaged with zpkg, running zpkg upgrade will upgrade it.
Can I contribute?
Thank you
If you like zpkg,
star it on GitHub. Help others by
reporting any issue. Feel free to
contact me directly for anything.