debseed


Namedebseed JSON
Version 0.1.3 PyPI version JSON
download
home_page
SummaryCreate ISO images to automate Debian installations, by appending a preseed file to Debian official images.
upload_time2022-12-06 12:47:13
maintainer
docs_urlNone
author
requires_python>=3.7.3
license
keywords adaptation iso installation debian netinst preseed
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Debseed
=======

Create ISO images to automate Debian installations, by appending a [preseed file](https://wiki.debian.org/DebianInstaller/Preseed) to Debian official images.


## Prerequisites

This application must be run on Linux and requires _python3_, _xorriso_ and _isolinux_. Example on Debian:

    sudo apt install python3-pip xorriso isolinux

## Installation

Install the application using _pip_:

    pip3 install debseed

Or, if you wish to automatically publish the generated ISO files to a VMWare datastore, install the application with additional dependencies:

    pip3 install debseed[vmware]

## Usage examples

Download latest Debian ISO file and generate a custom ISO file from it, using the generic edition:

    debseed update

Generate a custom ISO file from a specific image and preseed file:

    debseed generate debian-11.5.0-amd64-netinst.iso path/to/preseed.cfg

To print full usage instructions, run:

    debseed --help


## Configuration

Configuration of Debseed is defined in the following files (by decreasing priority):

- `local.conf` in current working directory
- `~/.config/debseed/debseed.conf` in home directory
- `C:/ProgramData/debseed/debseed.conf` (Windows) or `/etc/debseed/debseed.conf` (Linux)

Configuration section `[debseed]` contains general-purpose application settings.

Specific sets of generation parameters, called _editions_, are configured in their own configuration section. For example, section named `default` is configured using configuration section `[debseed:default]`.

See [example](https://gitlab.com/ipamo/debseed/-/blob/main/example.conf).


## Development

Create Python virtual environment (example on a Debian workstation):

    python3 -m venv .venv
    source .venv/bin/activate
    python -m pip install --upgrade pip wheel
    pip install -r requirements_all.txt

Run commands:

    python -m debseed --help

Clean repository:

```sh
find . \( -name __pycache__ -o -name build -o -name dist -o -name "*.egg-info" \) -not -path "./.venv/*" -exec rm -rf {} \;
```

Create Python redistribuable package:

    pip wheel --no-deps -w dist .

Prepare Twine for package upload (if necessary):

```ps1
pip install twine
$env:REQUESTS_CA_BUNDLE="...ca-certificates.crt"
```

Check package (in particular, verify version in file name):

    twine check dist/...

Upload le paquet:

    twine upload --repository ...  dist/...


## Troubleshooting

## Display information about an ISO file

Using command `isoinfo` from Debian package `genisoimage`:

    isoinfo -d -i path.iso

### Extract initial ramdisk

    cd debseed.tmp/...
    mkdir extracted-initrd
    cd  extracted-initrd
    cpio -idm < ../initrd

### Update Debian signing GPG key

    gpg --keyserver hkp://keyring.debian.org:80 --keyserver-options http-proxy=http://... --recv-keys DF9B9C49EAA9298432589D76DA87E80D6294BE9B
    gpg --output debseed/assets/debian-cd-signing.gpg --export DF9B9C49EAA9298432589D76DA87E80D6294BE9B

### Create local NAT network 10.0.2.2/24 for Hyper-V VMs

To reproduces VirtualBox default networking, where `10.0.2.2` is the address of the host as seen from the VMs, configure an internal virtual switch in Hyper-V, using the following Powershell commands (with elevated privileges):

```ps1
New-VMSwitch -Name "10.0.2 Switch" -SwitchType Internal -Notes "For VMs in network 10.0.2.2/24"
New-NetIPAddress -IPAddress 10.0.2.2 -PrefixLength 24 -InterfaceAlias "vEthernet (10.0.2 Switch)"
Get-NetNat | ? Name -Eq "10.0.2 Nat" | Remove-NetNat -Confirm:$False
New-NetNat -Name "10.0.2 Nat" -InternalIPInterfaceAddressPrefix 10.0.2.0/24
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "debseed",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7.3",
    "maintainer_email": "",
    "keywords": "adaptation,iso,installation,debian,netinst,preseed",
    "author": "",
    "author_email": "Ipamo <dev@ipamo.net>",
    "download_url": "",
    "platform": null,
    "description": "Debseed\n=======\n\nCreate ISO images to automate Debian installations, by appending a [preseed file](https://wiki.debian.org/DebianInstaller/Preseed) to Debian official images.\n\n\n## Prerequisites\n\nThis application must be run on Linux and requires _python3_, _xorriso_ and _isolinux_. Example on Debian:\n\n    sudo apt install python3-pip xorriso isolinux\n\n## Installation\n\nInstall the application using _pip_:\n\n    pip3 install debseed\n\nOr, if you wish to automatically publish the generated ISO files to a VMWare datastore, install the application with additional dependencies:\n\n    pip3 install debseed[vmware]\n\n## Usage examples\n\nDownload latest Debian ISO file and generate a custom ISO file from it, using the generic edition:\n\n    debseed update\n\nGenerate a custom ISO file from a specific image and preseed file:\n\n    debseed generate debian-11.5.0-amd64-netinst.iso path/to/preseed.cfg\n\nTo print full usage instructions, run:\n\n    debseed --help\n\n\n## Configuration\n\nConfiguration of Debseed is defined in the following files (by decreasing priority):\n\n- `local.conf` in current working directory\n- `~/.config/debseed/debseed.conf` in home directory\n- `C:/ProgramData/debseed/debseed.conf` (Windows) or `/etc/debseed/debseed.conf` (Linux)\n\nConfiguration section `[debseed]` contains general-purpose application settings.\n\nSpecific sets of generation parameters, called _editions_, are configured in their own configuration section. For example, section named `default` is configured using configuration section `[debseed:default]`.\n\nSee [example](https://gitlab.com/ipamo/debseed/-/blob/main/example.conf).\n\n\n## Development\n\nCreate Python virtual environment (example on a Debian workstation):\n\n    python3 -m venv .venv\n    source .venv/bin/activate\n    python -m pip install --upgrade pip wheel\n    pip install -r requirements_all.txt\n\nRun commands:\n\n    python -m debseed --help\n\nClean repository:\n\n```sh\nfind . \\( -name __pycache__ -o -name build -o -name dist -o -name \"*.egg-info\" \\) -not -path \"./.venv/*\" -exec rm -rf {} \\;\n```\n\nCreate Python redistribuable package:\n\n    pip wheel --no-deps -w dist .\n\nPrepare Twine for package upload (if necessary):\n\n```ps1\npip install twine\n$env:REQUESTS_CA_BUNDLE=\"...ca-certificates.crt\"\n```\n\nCheck package (in particular, verify version in file name):\n\n    twine check dist/...\n\nUpload le paquet:\n\n    twine upload --repository ...  dist/...\n\n\n## Troubleshooting\n\n## Display information about an ISO file\n\nUsing command `isoinfo` from Debian package `genisoimage`:\n\n    isoinfo -d -i path.iso\n\n### Extract initial ramdisk\n\n    cd debseed.tmp/...\n    mkdir extracted-initrd\n    cd  extracted-initrd\n    cpio -idm < ../initrd\n\n### Update Debian signing GPG key\n\n    gpg --keyserver hkp://keyring.debian.org:80 --keyserver-options http-proxy=http://... --recv-keys DF9B9C49EAA9298432589D76DA87E80D6294BE9B\n    gpg --output debseed/assets/debian-cd-signing.gpg --export DF9B9C49EAA9298432589D76DA87E80D6294BE9B\n\n### Create local NAT network 10.0.2.2/24 for Hyper-V VMs\n\nTo reproduces VirtualBox default networking, where `10.0.2.2` is the address of the host as seen from the VMs, configure an internal virtual switch in Hyper-V, using the following Powershell commands (with elevated privileges):\n\n```ps1\nNew-VMSwitch -Name \"10.0.2 Switch\" -SwitchType Internal -Notes \"For VMs in network 10.0.2.2/24\"\nNew-NetIPAddress -IPAddress 10.0.2.2 -PrefixLength 24 -InterfaceAlias \"vEthernet (10.0.2 Switch)\"\nGet-NetNat | ? Name -Eq \"10.0.2 Nat\" | Remove-NetNat -Confirm:$False\nNew-NetNat -Name \"10.0.2 Nat\" -InternalIPInterfaceAddressPrefix 10.0.2.0/24\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Create ISO images to automate Debian installations, by appending a preseed file to Debian official images.",
    "version": "0.1.3",
    "split_keywords": [
        "adaptation",
        "iso",
        "installation",
        "debian",
        "netinst",
        "preseed"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "421a5c670e796ca700f9bac60a30989f",
                "sha256": "598864e80000170d3abad52b60c0265148e038b3877a07cd03fcb31458d8a751"
            },
            "downloads": -1,
            "filename": "debseed-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "421a5c670e796ca700f9bac60a30989f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7.3",
            "size": 39783,
            "upload_time": "2022-12-06T12:47:13",
            "upload_time_iso_8601": "2022-12-06T12:47:13.007020Z",
            "url": "https://files.pythonhosted.org/packages/ed/49/f2392077cf7f58cf8d16d3fda7f4976013271105f4b73a5de052110dadc7/debseed-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-06 12:47:13",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "debseed"
}
        
Elapsed time: 0.02300s