Crates.io | pkger |
lib.rs | pkger |
version | 0.0.4 |
source | src |
created_at | 2019-12-27 10:36:20.180776 |
updated_at | 2020-01-05 13:31:45.606723 |
description | Building tool inspired by fpm-builder |
homepage | https://github.com/wojciechkepka/pkger |
repository | https://github.com/wojciechkepka/pkger |
max_upload_size | |
id | 192616 |
size | 9,289,117 |
Package building tool utilizing Docker.
The main purpose of pkger is to automate building .rpm
or .deb
(perhaps more in the future) packages on multiple operating systems, versions and architectures.
Config file has a following structure:
images_dir = ""
recipes_dir = ""
output_dir = ""
images_dir
- directory with images
Dockerfile
and files to be imported with itrecipes_dir
- directory with recipes
recipe.toml
file and source files (if not remote)output_dir
- directory with built packages
pkger
finishes building the package it will create a directory $output_dir/$os/$ver/
where it will put built .rpm
or .deb
package.
$os
and $ver
are taken from container during buildThe recipe is divided into 3 parts:
pkger
will install all dependencies listed in depends
choosing the appropriate package manager for each supported distribution.centos
, fedora
, ubuntu_latest
.pkger
will look for the image directory in f.e. $images_dir/centos
.[info]
name = "curl"
description = "curl"
arch = "x86_64"
license = "null"
version = "7.67.0"
revision = "0"
source = "curl-7.67.0.tar.gz"
depends = ["gcc", "make", "patch", "binutils", "strace"]
exclude = ["share", "info"]
provides = ["curl"]
images = [
"centos",
"fedora",
"ubuntu_latest",
]
[build]
steps = [
"./curl-7.67.0/configure --prefix=/opt/curl/7.67.0",
"make"
]
destdir
which is the directory where the installed files are. All the steps from build
and install
must result in built files in destdir
which will then be archived and built into a package.[install]
steps = ["make install"]
destdir = "/opt/curl/7.67.0"
To install pkger
run cargo install pkger
or clone and build this repository with crago build --release
.
To use pkger
you need a docker daemon running on a tcp port.
After that run:
pkger -d $docker_address -c $config_file [RECIPES]
$docker_address
with address like http://0.0.0.0:2376
$config_file
with path to the config fileTo get some informative output run with RUST_LOG=pkger=trace
env variable set
Example configuration, recipe and file structure can be found in example
directory of master
branch