├── .github
├── ISSUE_TEMPLATE
│ ├── blank_issue.md
│ ├── bug_report.md
│ └── feature_request.md
└── workflows
│ ├── build.yml
│ ├── docs.yml
│ └── release.yml
├── .gitignore
├── CHANGELOG.md
├── Cargo.lock
├── Cargo.toml
├── LICENSE
├── Makefile
├── README.md
├── assets
└── example_output.png
├── docs
├── book.toml
└── src
│ ├── SUMMARY.md
│ ├── apk.md
│ ├── completions.md
│ ├── configuration.md
│ ├── deb.md
│ ├── edit.md
│ ├── env.md
│ ├── images.md
│ ├── inheritance.md
│ ├── installation.md
│ ├── metadata.md
│ ├── new.md
│ ├── output.md
│ ├── pkg.md
│ ├── recipes.md
│ ├── rpm.md
│ ├── scripts.md
│ ├── signing.md
│ └── usage.md
├── example
├── conf.yml
├── images
│ ├── arch
│ │ └── Dockerfile
│ ├── debian
│ │ └── Dockerfile
│ └── rocky
│ │ └── Dockerfile
└── recipes
│ ├── base-package
│ └── recipe.yml
│ ├── child-package1
│ └── recipe.yml
│ ├── child-package2
│ └── recipe.yml
│ ├── pkger-custom-images
│ └── recipe.yml
│ ├── pkger-prebuilt
│ └── recipe.yml
│ ├── pkger-simple
│ └── recipe.yml
│ ├── test-common-dependencies
│ └── recipe.yml
│ ├── test-fail-non-existent-patch
│ └── recipe.yml
│ ├── test-package
│ └── recipe.yml
│ ├── test-patches
│ ├── recipe.yml
│ ├── root.patch
│ ├── src.patch
│ ├── src
│ │ └── testfile
│ └── testrootfile
│ └── test-suite
│ ├── recipe.yml
│ ├── some_dir
│ └── some_file2.txt
│ └── some_file.txt
├── libs
├── apkbuild
│ ├── Cargo.toml
│ ├── LICENSE
│ └── src
│ │ └── lib.rs
├── debbuild
│ ├── Cargo.toml
│ ├── LICENSE
│ ├── README.md
│ └── src
│ │ ├── binary.rs
│ │ ├── lib.rs
│ │ └── source.rs
├── pkgbuild
│ ├── Cargo.toml
│ ├── LICENSE
│ └── src
│ │ └── lib.rs
├── pkgspec-core
│ ├── Cargo.toml
│ └── src
│ │ └── lib.rs
├── pkgspec
│ ├── Cargo.toml
│ ├── LICENSE
│ └── src
│ │ ├── lib.rs
│ │ ├── parse.rs
│ │ └── spec_impl.rs
└── rpmspec
│ ├── Cargo.toml
│ ├── LICENSE
│ ├── README.md
│ └── src
│ └── lib.rs
├── pkger-cli
├── Cargo.toml
└── src
│ ├── app
│ ├── build.rs
│ └── mod.rs
│ ├── completions.rs
│ ├── config.rs
│ ├── gen.rs
│ ├── job.rs
│ ├── main.rs
│ ├── metadata.rs
│ ├── opts.rs
│ └── table.rs
└── pkger-core
├── Cargo.toml
└── src
├── archive.rs
├── build
├── container.rs
├── deps.rs
├── image.rs
├── mod.rs
├── package
│ ├── apk.rs
│ ├── deb.rs
│ ├── gzip.rs
│ ├── mod.rs
│ ├── pkg.rs
│ ├── rpm.rs
│ └── sign.rs
├── patches.rs
├── remote.rs
└── scripts.rs
├── gpg.rs
├── image
├── mod.rs
├── os.rs
└── state.rs
├── lib.rs
├── log.rs
├── oneshot.rs
├── proxy.rs
├── recipe
├── cmd.rs
├── envs.rs
├── loader.rs
├── metadata.rs
├── metadata
│ ├── arch.rs
│ ├── deps.rs
│ ├── git.rs
│ ├── image.rs
│ ├── os.rs
│ ├── patches.rs
│ └── target.rs
├── mod.rs
└── target.rs
├── runtime
├── container.rs
├── docker.rs
├── mod.rs
└── podman.rs
├── ssh.rs
└── template
├── lexer.rs
└── mod.rs
/.github/ISSUE_TEMPLATE/blank_issue.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Blank Issue
3 | about: Create a blank issue.
4 | ---
5 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: C-bug
6 | assignees: ''
7 |
8 | ---
9 |
10 |
12 |
13 | ### Reproduction steps
14 |
15 | ### Environment
16 |
17 | - Platform:
18 | - pkger version:
19 |
20 | output (if applies)
21 |
22 | ```
23 | Please provide a copy of the output when ran with this display options `--filter sf -t`
24 | ```
25 |
26 |
27 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest a new feature or improvement
4 | title: ''
5 | labels: C-enhancement
6 | assignees: ''
7 | ---
8 |
9 |
11 |
12 | #### Describe your feature request
13 |
14 |
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: pkger CI
2 |
3 | on:
4 | workflow_dispatch:
5 | push:
6 | paths-ignore:
7 | - "*.md"
8 | - "LICENSE"
9 | - "docs"
10 | branches:
11 | - master
12 | pull_request:
13 | paths-ignore:
14 | - "*.md"
15 | - "LICENSE"
16 | - "docs"
17 | branches:
18 | - master
19 |
20 | jobs:
21 | lint:
22 | strategy:
23 | matrix:
24 | os:
25 | - ubuntu-latest
26 | - macos-latest
27 | runs-on: ${{ matrix.os }}
28 | steps:
29 | - name: Set up Rust
30 | uses: hecrj/setup-rust-action@v1
31 | with:
32 | components: clippy,rustfmt
33 | - uses: actions/checkout@v3
34 | - run: make lint
35 |
36 | test:
37 | needs: [lint]
38 | runs-on: ubuntu-latest
39 |
40 | steps:
41 | - name: Setup Rust
42 | uses: hecrj/setup-rust-action@v1
43 | - name: Checkout
44 | uses: actions/checkout@v3
45 | - name: Test
46 | run: make test
47 | - name: Verify DEB package
48 | run: |
49 | sudo dpkg -i example/output/debian/test-package-0.1.0-0.amd64.deb
50 | cat /test/deb/test_file
51 | - name: Install alien
52 | run: sudo apt install -y alien rpm
53 | - name: Verify RPM package
54 | run: |
55 | sudo alien -i example/output/rocky/test-package-0.1.0-0.x86_64.rpm
56 | cat /test/rpm/test_file
57 | - name: Create a new image
58 | run: |
59 | cargo run -- -c example/conf.yml new image test-image
60 | cat example/images/test-image/Dockerfile
61 | - name: Create a new recipe
62 | run: |
63 | cargo run -- -c example/conf.yml new recipe test-recipe --version 0.1.0 --license MIT
64 | cat example/recipes/test-recipe/recipe.yml
65 | cat example/recipes/test-recipe/recipe.yml | grep name
66 | cat example/recipes/test-recipe/recipe.yml | grep license
67 | cat example/recipes/test-recipe/recipe.yml | grep version
68 |
--------------------------------------------------------------------------------
/.github/workflows/docs.yml:
--------------------------------------------------------------------------------
1 | name: docs
2 |
3 | on:
4 | workflow_dispatch:
5 | push:
6 | paths-ignore:
7 | - "src"
8 | - "example"
9 | - "tests"
10 | - "assets"
11 | - "Cargo.*"
12 | - "README.md"
13 | - "CHANGELOG.md"
14 | - "LICENSE"
15 | - ".github"
16 | - "pkger-cli"
17 | - "pkger-core"
18 | - "libs"
19 | - "MakeFile"
20 | branches:
21 | - master
22 |
23 | jobs:
24 | deploy:
25 | runs-on: ubuntu-latest
26 | steps:
27 | - uses: actions/checkout@v3
28 |
29 | - name: Setup mdBook
30 | uses: peaceiris/actions-mdbook@v1
31 | with:
32 | mdbook-version: 'latest'
33 |
34 | - name: Build the book
35 | run: mdbook build docs
36 |
37 | - name: Deploy it
38 | uses: peaceiris/actions-gh-pages@v3
39 | with:
40 | github_token: ${{ secrets.GITHUB_TOKEN }}
41 | publish_dir: ./docs/book
42 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: release
2 |
3 | on:
4 | push:
5 | branches:
6 | - "!*"
7 | tags:
8 | - "**"
9 | jobs:
10 | lint:
11 | strategy:
12 | matrix:
13 | os:
14 | - ubuntu-latest
15 | - macos-latest
16 | runs-on: ${{ matrix.os }}
17 | steps:
18 | - name: Set up Rust
19 | uses: hecrj/setup-rust-action@v1
20 | with:
21 | components: clippy,rustfmt
22 | - uses: actions/checkout@v3
23 | - run: make lint
24 |
25 | test:
26 | needs: [lint]
27 | strategy:
28 | matrix:
29 | os:
30 | - ubuntu-latest
31 | runs-on: ${{ matrix.os }}
32 | steps:
33 | - name: Setup Rust
34 | uses: hecrj/setup-rust-action@v1
35 | - name: Checkout
36 | uses: actions/checkout@v3
37 | - name: Install rpm
38 | if: matrix.os == 'ubuntu-latest'
39 | run: |
40 | sudo apt -y update
41 | sudo apt -y install rpm
42 | - name: Test
43 | run: make test
44 |
45 | build_and_upload_artifacts:
46 | name: Upload Artifacts
47 | needs: [test]
48 | runs-on: ${{ matrix.os }}
49 | strategy:
50 | matrix:
51 | build: [linux, macos]
52 | include:
53 | - build: linux
54 | os: ubuntu-latest
55 | target: x86_64-unknown-linux
56 | - build: macos
57 | os: macos-latest
58 | target: x86_64-apple-darwin
59 |
60 | steps:
61 | - name: Set up Rust
62 | uses: hecrj/setup-rust-action@v1
63 | - uses: actions/checkout@v3
64 | - name: Set version
65 | run: echo "PKGER_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
66 | - name: Set archive name
67 | run: echo "PKGER_ARCHIVE=pkger-${{env.PKGER_VERSION}}-${{ matrix.target}}" >> $GITHUB_ENV
68 | - run: cargo build --release
69 | name: Release build
70 | - name: Install help2man mac
71 | if: matrix.os == 'macos-latest'
72 | run: brew install help2man
73 | - name: Install help2man ubuntu
74 | if: matrix.os == 'ubuntu-latest'
75 | run: |
76 | sudo apt -y update
77 | sudo apt -y install help2man
78 | - name: Prepare archive directory
79 | run: mkdir pkger
80 | - name: Generate manual
81 | run: |
82 | help2man target/release/pkger > pkger/pkger.1
83 | - name: Move release files
84 | run: |
85 | mv target/release/pkger pkger/
86 | mv README.md pkger/
87 | mv LICENSE pkger/
88 | - name: Create archives
89 | run: |
90 | tar -zcvf ${{ env.PKGER_ARCHIVE }}.tar.gz pkger
91 | tar -Jcvf ${{ env.PKGER_ARCHIVE }}.tar.xz pkger
92 | - run: cp ${{ env.PKGER_ARCHIVE }}.tar.gz example/recipes/pkger-prebuilt/
93 | if: matrix.os == 'ubuntu-latest'
94 | name: Copy archive
95 | - run: ./pkger/pkger -c example/conf.yml build -s rpm -s deb -- pkger-prebuilt
96 | if: matrix.os == 'ubuntu-latest'
97 | name: Build deb and rpm packages
98 | - run: |
99 | cd example/output/pkger-deb && \
100 | mv pkger-prebuilt-${{env.PKGER_VERSION}}-0.amd64.deb pkger-${{env.PKGER_VERSION}}-0.amd64.deb
101 | cd ../pkger-rpm && \
102 | mv pkger-prebuilt-${{env.PKGER_VERSION}}-0.x86_64.rpm pkger-${{env.PKGER_VERSION}}-0.x86_64.rpm
103 | if: matrix.os == 'ubuntu-latest'
104 | name: Rename artifacts
105 | - name: Upload gz
106 | uses: svenstaro/upload-release-action@v2
107 | with:
108 | repo_name: wojciechkepka/pkger
109 | repo_token: ${{ secrets.GITHUB_TOKEN }}
110 | file: ${{ env.PKGER_ARCHIVE }}.tar.gz
111 | asset_name: ${{ env.PKGER_ARCHIVE }}.tar.gz
112 | tag: ${{ env.PKGER_VERSION }}
113 | overwrite: true
114 | - name: Upload xz
115 | uses: svenstaro/upload-release-action@v2
116 | with:
117 | repo_name: wojciechkepka/pkger
118 | repo_token: ${{ secrets.GITHUB_TOKEN }}
119 | file: ${{ env.PKGER_ARCHIVE }}.tar.xz
120 | asset_name: ${{ env.PKGER_ARCHIVE }}.tar.xz
121 | tag: ${{ env.PKGER_VERSION }}
122 | overwrite: true
123 | - name: Upload deb
124 | if: matrix.os == 'ubuntu-latest'
125 | uses: svenstaro/upload-release-action@v2
126 | with:
127 | repo_name: wojciechkepka/pkger
128 | repo_token: ${{ secrets.GITHUB_TOKEN }}
129 | file: example/output/pkger-deb/pkger-${{env.PKGER_VERSION}}-0.amd64.deb
130 | asset_name: pkger-${{env.PKGER_VERSION}}-0.amd64.deb
131 | tag: ${{ env.PKGER_VERSION }}
132 | overwrite: true
133 | - name: Upload rpm
134 | if: matrix.os == 'ubuntu-latest'
135 | uses: svenstaro/upload-release-action@v2
136 | with:
137 | repo_name: wojciechkepka/pkger
138 | repo_token: ${{ secrets.GITHUB_TOKEN }}
139 | file: example/output/pkger-rpm/pkger-${{env.PKGER_VERSION}}-0.x86_64.rpm
140 | asset_name: pkger-${{env.PKGER_VERSION}}-0.x86_64.rpm
141 | tag: ${{ env.PKGER_VERSION }}
142 | overwrite: true
143 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | .DS_Store
3 | .pkger.state
4 | example/output
5 | docs/book/
6 | **/Cargo.lock
7 | .idea
8 |
--------------------------------------------------------------------------------
/Cargo.toml:
--------------------------------------------------------------------------------
1 | [workspace]
2 |
3 | members = [
4 | "pkger-cli",
5 | "pkger-core",
6 | "libs/pkgspec",
7 | "libs/pkgspec-core",
8 | "libs/rpmspec",
9 | "libs/debbuild",
10 | "libs/pkgbuild",
11 | "libs/apkbuild"
12 | ]
13 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 | Copyright 2021-2022 Wojciech Kępka
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 |
6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 |
8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.T
9 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | PROJECT := pkger
2 |
3 |
4 | .PHONY: all
5 | all: clean test build
6 |
7 |
8 | .PHONY: all_debug
9 | all_debug: clean test build_debug
10 |
11 |
12 | .PHONY: run_debug
13 | run_debug: build_debug
14 | @./target/debug/$(PROJECT)
15 |
16 |
17 | .PHONY: run
18 | run: build
19 | @./target/release/$(PROJECT)
20 |
21 |
22 | .PHONY: build_debug
23 | build_debug: ./target/debug/$(PROJECT)
24 |
25 |
26 | .PHONY: build
27 | build: ./target/release/$(PROJECT)
28 |
29 |
30 | .PHONY: lint
31 | lint: fmt_check clippy
32 |
33 | .PHONY: check
34 | check:
35 | cargo check --all
36 |
37 | .PHONY: test
38 | test:
39 | cargo t --all-targets --all-features -- --test-threads=1
40 | cargo r -- -c example/conf.yml build test-package test-suite child-package1 child-package2
41 | cargo r -- -c example/conf.yml build -s apk -s pkg -- test-package
42 | # below should fail
43 | -cargo r -- -c example/conf.yml build -s rpm -- test-fail-non-existent-patch
44 | test $? 1
45 | cargo r -- -c example/conf.yml build -i rocky debian -- test-common-dependencies
46 | @rpm -qp --requires example/output/rocky/test-common-dependencies-0.1.0-0.x86_64.rpm | grep openssl-devel
47 | @rpm -qp --conflicts example/output/rocky/test-common-dependencies-0.1.0-0.x86_64.rpm | grep httpd
48 | @rpm -qp --obsoletes example/output/rocky/test-common-dependencies-0.1.0-0.x86_64.rpm | grep bison1
49 | @dpkg-deb -I example/output/debian/test-common-dependencies-0.1.0-0.amd64.deb | grep Depends | grep libssl-dev
50 | @dpkg-deb -I example/output/debian/test-common-dependencies-0.1.0-0.amd64.deb | grep Conflicts | grep apache2
51 | cargo r -- -c example/conf.yml build -s rpm -- test-patches
52 |
53 |
54 | .PHONY: fmt_check
55 | fmt_check:
56 | cargo fmt --all -- --check
57 |
58 |
59 | .PHONY: fmt
60 | fmt:
61 | cargo fmt --all
62 |
63 |
64 | .PHONY: clippy
65 | clippy:
66 | @rustup component add clippy
67 | cargo clippy --all-targets --all-features -- -D clippy::all
68 |
69 |
70 | .PHONY: clean
71 | clean:
72 | @rm -rf target/*
73 |
74 |
75 | ./target/debug/$(PROJECT):
76 | @cargo build
77 |
78 |
79 | ./target/release/$(PROJECT):
80 | @cargo build --release
81 |
82 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # pkger 📦
2 |
3 | [](https://vv9k.github.io/pkger/)
4 | [](https://github.com/vv9k/pkger/actions?query=workflow%3A%22pkger+CI%22)
5 |
6 | **pkger** is a tool that automates building *RPMs*, *DEBs*, *PKG*, *APK* and other packages on multiple *Linux* distributions, versions and architectures with the help of Docker or Podman.
7 |
8 | To learn more about **pkger** head over to the [user guide](https://vv9k.github.io/pkger/).
9 |
10 | 
11 |
12 |
13 | ## Example
14 |
15 | - Example configuration, recipes and images can be found in [`example` directory of `master` branch](https://github.com/vv9k/pkger/tree/master/example)
16 |
17 | ## License
18 | [MIT](https://github.com/vv9k/pkger/blob/master/LICENSE)
19 |
--------------------------------------------------------------------------------
/assets/example_output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vv9k/pkger/a5f1ea1384494b1fe63282fdf3483563bf495c6f/assets/example_output.png
--------------------------------------------------------------------------------
/docs/book.toml:
--------------------------------------------------------------------------------
1 | [book]
2 | authors = ["Wojciech Kępka"]
3 | language = "en"
4 | multilingual = false
5 | src = "src"
6 | title = "pkger"
7 |
--------------------------------------------------------------------------------
/docs/src/SUMMARY.md:
--------------------------------------------------------------------------------
1 | # Summary
2 |
3 | - [Installation](./installation.md)
4 | - [Configuration](./configuration.md)
5 | - [Recipes](./recipes.md)
6 | - [Metadata](./metadata.md)
7 | - [RPM](./rpm.md)
8 | - [DEB](./deb.md)
9 | - [PKG](./pkg.md)
10 | - [APK](./apk.md)
11 | - [Scripts](./scripts.md)
12 | - [Env](./env.md)
13 | - [Inheritance](./inheritance.md)
14 | - [Images](./images.md)
15 | - [Build a package](./usage.md)
16 | - [Signing packages](./signing.md)
17 | - [Formatting output](./output.md)
18 | - [Create new recipes and images](./new.md)
19 | - [Edit recipes, images and config](./edit.md)
20 | - [Shell completions](./completions.md)
21 |
22 |
--------------------------------------------------------------------------------
/docs/src/apk.md:
--------------------------------------------------------------------------------
1 | # APK fields
2 |
3 | Optional fields that will be used when building a APK package.
4 |
5 | ```yaml
6 | apk:
7 | install: "$pkgname.pre-install $pkgname.post-install"
8 |
9 | # A list of packages that this package replaces
10 | replaces: []
11 |
12 | # A list of dependencies for the check phase
13 | checkdepends: []
14 |
15 | # If not provided a new generated key will be used to
16 | # sign the package
17 | private_key: "/location/of/apk_signing_key"
18 | ```
19 |
--------------------------------------------------------------------------------
/docs/src/completions.md:
--------------------------------------------------------------------------------
1 | # Shell completions
2 |
3 | **pkger** provides a subcommand to print shell completions. Supported shells are: *bash*, *zsh*, *fish*, *powershell*, *elvish*.
4 |
5 | To print the completions run:
6 | ```shell
7 | pkger print-completions bash
8 | ```
9 |
10 | replacing `bash` with whatever shell you prefer.
11 |
12 |
13 | To have completions automatically add something along those lines to your `.bashrc`, `.zshrc`...:
14 | ```shell
15 | . <(pkger print-completions bash)
16 | ```
17 |
--------------------------------------------------------------------------------
/docs/src/configuration.md:
--------------------------------------------------------------------------------
1 | # Configuration
2 |
3 | By default **pkger** will look for the config file named `.pkger.yml` in the config directory appropriate for the OS
4 | that **pkger** is run on. If there is no global configuration, current directory will be scanned for the same file.
5 | To specify the location of the config file use `--config` or `-c` parameter.
6 |
7 | The configuration file has a following structure:
8 |
9 | ```yaml
10 | # required
11 | recipes_dir: ""
12 | output_dir: ""
13 |
14 | # optional
15 | log_dir: ""
16 | images_dir: ""
17 | runtime_uri: "unix:///var/run/docker.sock"
18 |
19 | # Disable colored output globally
20 | no_color: true
21 |
22 | ssh:
23 | # this will make the ssh auth socket available to the container so that it can use private keys from the host.
24 | forward_agent: true
25 |
26 | # This will allow tools that use SSH to connect to hosts that are not present in the `known_hosts` file
27 | disable_key_verification: true
28 |
29 |
30 | # override default images used by pkger
31 | custom_simple_images:
32 | deb: ubuntu:latest
33 | rpm: centos:latest
34 |
35 | # To define custom images add the following
36 | images:
37 | - name: rocky
38 | target: rpm
39 | - name: debian
40 | target: deb
41 | # if pkger fails to find out the operating system you can specify it by os parameter
42 | - name: arch
43 | target: pkg
44 | os: Arch Linux
45 | ```
46 |
47 | The required fields when running a build are `recipes_dir` and `output_dir`. First tells **pkger** where to look for
48 | [recipes](./recipes.md) to build, the second is the directory where the final packages will end up.
49 |
50 | When using [custom images](./images.md) their location can be specified with `images_dir`.
51 |
52 | If container runtime daemon that **pkger** should connect does not run on a default unix socket override the uri with `runtime_uri` parameter. **pkger** will automatically determine wether the provided runtime uri is a Podman or Docker daemon.
53 |
54 | If an option is available as both configuration parameter and cli argument **pkger** will favour the arguments passed
55 | during startup.
56 |
57 |
58 | ## Generate configuration file and directories
59 |
60 | To quickly start of with **pkger** use the `pkger init` subcommand that will create necessary directories and the
61 | configuration file. Default locations can be overridden by command line parameters.
62 |
--------------------------------------------------------------------------------
/docs/src/deb.md:
--------------------------------------------------------------------------------
1 | # DEB fields
2 |
3 | Optional fields that may be used when building a DEB package.
4 |
5 | ```yaml
6 | deb:
7 | priority: ""
8 | built_using: ""
9 | essential: true
10 |
11 | # specify the content of post install script
12 | postinst: ""
13 |
14 | # same as all other dependencies but deb specific
15 | pre_depends: []
16 | recommends: []
17 | suggests: []
18 | breaks: []
19 | replaces: []
20 | enhances: []
21 | ```
22 |
--------------------------------------------------------------------------------
/docs/src/edit.md:
--------------------------------------------------------------------------------
1 | # Edit recipes, images and config
2 |
3 | **pkger** provides utility subcommand `edit` that invokes the default editor defined by `$EDITOR` environment variable.
4 | To make this functionality work, export this variable in your shell's init script like `~/.bashrc`.
5 |
6 | Edit images and recipes by name:
7 |
8 | ```
9 | # This will open up the Dockerfile in the `rocky` image.
10 | $ pkger edit image rocky
11 |
12 | # This will open up the `recipe.yml` or `recipe.yaml` file in `pkger-simple` recipe directory
13 | $ pkger edit recipe pkger-simple
14 |
15 | ```
16 |
17 |
18 | To edit the configuration file run:
19 | ```
20 | $ pkger edit config
21 |
22 |
23 | # or shorhand 'e' for 'edit'
24 | $ pkger e