Metadata-Version: 2.4
Name: simple-cdd-yaml
Version: 0.1.1
Summary: YAML recipe interpreter for Simple-CDD
Author-email: Sietze van Buuren <s.van.buuren@gmail.com>
License: Copyright 2024 Sietze van Buuren <s.van.buuren@gmail.com>
        
        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:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        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 PARTICULAR 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.
        
Project-URL: Homepage, https://github.com/swvanbuuren/simple-cdd-yaml
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyyaml
Requires-Dist: jinja2
Dynamic: license-file

# Simple-CDD-YAML

Preprocessor for [Simple-CDD](https://wiki.debian.org/Simple-CDD) using
YAML input files (so-called recipes), as inspired by
[debos](https://github.com/go-debos/debos).

Simple-CDD is a tool for creating customized debian-installer CDs.

## Introduction

Simple-CDD-YAML uses YAML recipes to generate the profile files required by
Simple-CDD. A recipe consists of actions, that generate or append files in the
Simple-CDD profile. Simple-CDD-YAML features the following actions (for an
exemplary profile called `<profile>`):

- `recipe` action: embed another recipe
- `conf` action: compose a `<profile>.conf` file by supplying (environment)
  variables
- `preseed` action: define a preseed file
- `apt` action: add packages
- `run` action: add a command or script (to `<profile>.postinst`)
- `overlay` action: add an overlay (an overlay is a file structure that is
  compressed into one single file and automatically added to the file
  `<profile>.extra`. A corresponding command to decompress the overlay is added
  to `<profile>.postinst`)
- `extra` action: add extra file
- `downloads` action: add extra packages
- `debos` action: [only in debos mode] add pre- and post-action to debos recipe
  output

Some of the actions support substitutions using
[jinja](https://palletsprojects.com/p/jinja/) notation, making it easier to
reuse scripts, preseeds and recipes. By defining variables with default values
at the top of a recipe it becomes easy to reuse and nest recipes.

A few actions also support different roles: by default scripts are executed and
overlays are deployed as root, but you can also specify to have this done by a
given user.

Please refer to the [documentation on
actions](https://swvanbuuren.github.io/simple-cdd-yaml/actions/) for detailed
documentation for each action.

## Installation

Simple-CDD-YAML can be directly installed from [PyPi](https://pypi.org) using
`pip`:

```bash
pip install simple-cdd-yaml
```

Detailed instructions are found in the documentation's [installation
section](https://swvanbuuren.github.io/simple-cdd-yaml/installation/).

## Usage

After installation use the command `simple-cdd-yaml` to create Simple-CDD
profiles from YAML files. Issue `simple-cdd-yaml --help` to get help.

Detailed usage instructions are found in the [getting
started](https://swvanbuuren.github.io/simple-cdd-yaml/getting_started/) guide.

## Examples

 Refer to the documentation's [examples
 page](https://swvanbuuren.github.io/simple-cdd-yaml/examples/) for a detailed
 recipe explanation. The repository
 [simple-cdd-yaml-recipes](https://github.com/swvanbuuren/simple-cdd-yaml-recipes)
 contains more example recipes.

## Documentation

Check out the [documentation](https://swvanbuuren.github.io/simple-cdd-yaml/) to
get started, find more background information and query the code reference.

## Pre-commit hooks

This repository comes with pre-commit hooks, which are stored in
[`.hooks`](.hooks). To enable the hooks issue:

```bash
git config --local core.hooksPath .hooks/
```

## License

An MIT style license applies for Simple-CDD-YAML, see the [LICENSE](LICENSE)
file for more details.
