gpak(1) | General Commands Manual | gpak(1) |
. ├── package1 │ └── PKGBUILD ├── package2 │ ├── PKGBUILD │ └── PKGBUILD.sid └── package3 ├── changelog.Debian ├── copyright ├── PKGBUILD.bullseye └── PKGBUILD.bookworm
By default gpak treats its current working directory as a root of package repository, Using --packages-dir option changes that and allows running gpak from a different directory than repository root. Gpak builds all packages found in the repository, unless the list of wanted packages is narrowed down by passing a packages list.
To build packages, gpak uses OSI containers. Gpak builds in a sandboxed environment and for different distributions. Once built, gpak copies packages to a directory which is available on a host and automatically accessible for the user who runs the gpak command. Output Output directories for packages are located inside a build directory (see: --build-dir).
Engine must support the classical docker interface for creating and running containers.
-b, --build-dir=DIRECTORY
-d, --distribution=NAME
When building a package for a specific distribution, gpak prefers distribution-specific PKGBUILD files, with extension the same as a distribution name, for example PKGBUILD.sid. If distribution-specific PKGBUILD file doesn't exist, then gpak will select ordinary PKGBUILD file for package source.
Name of currently built distribution is propagated to the environment in which gpak executes PKGBUILD. It is accessible as GPAK_DISTRO environment variable. As such, it doesn't rely on the output of lsb_release(1) command.
-r, --remote-path=PATH
--clean
-p, --packages-dir=DIRECTORY
--context
--build-image, --no-build-image
--build, --no-build
--lint, --no-lint
--send, --no-send
Gpak will refuse sending unsafe packages, i.e. the ones which aren't built inside a container (--build-local) or with cache enabled (--cache). To send them anyway, --force switch should be used.
By default sending packages is disabled.
-l, --build-local
This option is unsafe because local environment can have unpredicted side effects on build process. When it's enabled, gpak will refuse to send packages to remote hosts. Using --force switch sends packages anyway.
Using this option requires makedeb(8) program installed on the host system.
By default, packages are built inside the containers (this switch is disabled).
--cache
Normally containers used for package building are ephemeral: gpak creates a new one before build and removes it after. This option saves package containers for future builds of particular package. Note however that containers are never shared between packages.
This option is unsafe because old builds might leave artifacts inside cached containers which may cause side effects for any future builds. Because of that, gpak will refuse to send packages built in cached containers. Using --force switch sends packages anyway.
-f, --force
--ugly
--emoji, --no-emoji
--version
-h, --help
Options in configuration file have precedens over gpak's default values for options. Options passed directly to gpak during its invocation have precedence over options set inside configuration file.
PACKAGES_DIR="${HOME}/packages" SEND=1 LINT=0 DISTRIBUTIONS=( bullseye bookworm )
Users should be very careful when providing their own Docker Contexts. Preferably they should copy-paste default gpak's Docker Context, or inherit through a FROM: Dockerfile's clause. Some gpak's features are tightly coupled with how containers are run.
$ gpak --clean --no-send --lint -d sid mypackage $ dpkg-info build/gpak/sid/mypackage/*.deb $ dpkg-deb -c build/gpak/sid/mypackage/*.deb $ gpak --send --no-build-image --no-build -d sid mypackage
However, when developing new packages, using "unsafe" options should allow faster iterations:
$ gpak --build-local --lint mypackage $ gpak --cache --no-build-image mypackage
Source code: https://git.goral.net.pl/gpak.git
2024-05-06 |