ryo_iso package

Submodules

ryo_iso.cli module

ryo_iso.cli.cli(argv=None)[source]

ryo_iso.config module

class ryo_iso.config.Config(config=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/ryo-iso/checkouts/latest/doc/iso.yml'))[source]

Bases: object

Configuration State

This class stores configuration information and provides methods for validation and network updates

__init__(config='~/.config/ryo-iso/config.yml')[source]

Loads config file and perform initialization

*distro*_init()

Performs distribution specific initialization

build_dir = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/ryo-iso/checkouts/latest/doc')
data = {'app': PosixPath('/home/docs/.config/ryo-iso/config.yml'), 'base': PosixPath('/home/docs/.config/ryo-iso/iso_base.yml'), 'iso': PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/ryo-iso/checkouts/latest/doc/iso.yml')}
static deep_merge(overlay, base)[source]

Deep merge dictionaries

This method recursivly merges dictionaries, where base provides defaults for the dictionary overlay. Sub-lists and dictionaries inside lists are replaced and not merged.

Parameters:
  • overlay (dict) – This dictionary is modified in place to contain the merged results.
  • base (dict) – Provides default values not found in the overlay.
classmethod install(force=False)[source]

Install user config files.

This function installs the application and project config files.

Parameters:force (bool) – Overwrite existing config files
ubuntu_base_image_check()[source]

Ubuntu - Verify the SHA256SUM of the upstream ISO image

This function runs sha256sum -c on self.build_dir/'base_image.iso'

ubuntu_hash_cache()[source]

Ubuntu - SHA256 checksum download

This function downloads the hashes and the associated gpg signature file. ['SHA256SUMS', 'SHA256SUMS.gpg']

ubuntu_hash_check()[source]

Ubuntu - Verify GPG signature of SHA256 checksum download

This function verifies the GPG signature of SHA256SUMS from the local keyring.

ubuntu_hash_version()[source]

Ubuntu - Parse and extract version information from hash file

Parses version information from configuration and extracts the full version yy.mm.patch from SHA256SUMS from the local keyring.

The function can extend the configured version from yy.mm into yy.mm.patch for easier upstream tracking. It can also convert from codenames (ex. xenial) to yy.mm.patch (ex. 16.04.6).

Finally this function constructs the url of the Ubuntu release from the version and variant configuration.

ubuntu_init(version)[source]

Ubuntu - distro specific initialization

This function normalizes versions and codenames to compose the URLs for the distribution and associated hash file

Parameters:version (str) – Version of the distribution
ubuntu_update()[source]

ryo_iso.utils module

ryo_iso.utils.cleanup_data()[source]

Clean up build artifacts

Removes [‘./squashfs-root’,’./image’,’./build’]

Warning

Do not manually rm -rf squashfs-root if the chrooted devices are mounted

ryo_iso.utils.profile_start()[source]

Start pydoit profiler

This python-action returns a dictionary with the profiler start time, which is made available to other actions in the same Task instance

Returns:‘start’: start time of the profiler
Return type:dict
ryo_iso.utils.profile_stop(task, **kwargs)[source]

Stop pydoit profiler

This python-action accesses the start time from the profile_start() action

Parameters:
  • task (dict) – Access to start time via pydoit Task instance
  • **kwargs (dict) – Keyword argument access to start time
Returns:

‘duration’: profiler duration

Return type:

dict

ryo_iso.utils.umount_dev()[source]

Unmount chrooted pseudo-filesystems

umount [‘proc/sys/fs/binfmt_misc’, ‘proc’, ‘run/dbus’, ‘sys’, ‘dev/pts’, ‘dev’] in the chroot

Module contents