documentation check-in...

This commit is contained in:
2016-12-30 00:09:24 -05:00
parent 0c9dcfd833
commit 17078f3d1d
7 changed files with 114 additions and 40 deletions

View File

@@ -1,8 +1,32 @@
== Layout of BDisk functions
TODO.
These functions exist in <<_bdisk_,`bdisk/`>>
== Moar Functions
TODO.
include::functions/BCHROOT.adoc[]
=== `bdisk.py`
This file is a sort of "wrapper" -- it pulls all the other files in this directory together into a single usable Python script. In other words, to build a BDisk distribution, you would simply run `bdisk/bdisk.py` -- that's it! See <<building_a_bdisk_iso>>.
It contains no functions, it just contains minimal logic to tie all the other functions together.
include::functions/BGPG.adoc[]
=== `bSSL.py`
Functions having to do with OpenSSL are stored here. This is used primarily for "mini" builds (via iPXE), they let you boot your BDisk distribution over the Internet. If an SSL key, CA certificate, etc. weren't defined and you want to build a mini image, this file contains functions that will build an SSL PKI (public key infrastructure) for you automatically.
=== `bsync.py`
This file has functions relating to copying your BDisk build to various resources. For instance, if you want your ISO available to download then this file would be used to copy your finished build to an HTTP server/root you specify.
=== `build.py`
This is responsible for building the "full" ISO, building UEFI support, etc.
=== `host.py`
These functions are used to perform "meta" tasks such as get information about the build host, find the `build.ini` file, and parse your configuration options.
=== `ipxe.py`
This file handles building the "mini" ISO via iPXE.
=== `prep.py`
This contains functions that download the base tarball releases, preps them for `bchroot.py`, builds necessary directory structures, and performs the overlay preparations.

View File

@@ -0,0 +1,29 @@
=== `bchroot.py`
This file controls creation of the chroots--the directories in which BDisk builds the actual system that is booted into.
==== chroot(_chrootdir_, _chroot_hostname_, _cmd_ = '`/root/pre-build.sh`')
This function manages mounting the mountpoints for the chroot(s) in preparation for the images of the live media. It also runs <<changing_the_build_process,the inner chroot preparation script>>. Returns `chrootdir` (same as the paramater provided).
===== chrootdir
The directory where the filesystem tree for the chroot lies. Absolute path only.
===== chroot_hostname
The hostname to use for the guest.
NOTE: This paramater may be removed in future versions.
===== cmd
The command to run inside the chroot once all the mountpoints are set up.
==== chrootUnmount(_chrootdir_)
Unmount the mounts set up in <<chroot_em_chrootdir_em_em_chroot_hostname_em_em_cmd_em_root_pre_build_sh,chroot()>>.
===== chrootdir
See <<chrootdir>>.
==== chrootTrim(_build_)
This function performs some cleanup and optimizations to the chroot(s).
===== build
A dictionary of <<code_build_code>>'s values (with some additional keys/values added). See (TODO: link to host.py's config parser).

View File

@@ -0,0 +1,38 @@
=== `bGPG.py`
This contains functions having to do with GPG -- signing files, verifying other signatures, generating a key (if one wasn't specified), using a key (if one was specified), etc.
==== genGPG(_conf_)
This function controls generating (or "importing" an existing) GnuPG key for use with other operations. Returns `gpg`, a <<optional,PyGPGME>> object.
===== conf
A dictionary of the <<the_code_build_ini_code_file,configuration>> (with some additional keys/values added). See (TODO: link to host.py's config parser).
==== killStaleAgent(_conf_)
This function kills off any stale GnuPG agents running. Not doing so can cause some strange behaviour both during the build process and on the host.
===== conf
See <<conf>>.
==== signIMG(_path_, _conf_)
This function signs a given file with the keys BDisk was either configured to use or automatically generated.
===== path
The full, absolute path to the file to be signed. An https://www.gnupg.org/gph/en/manual/r1290.html[ASCII-armored^] https://www.gnupg.org/gph/en/manual/x135.html[detached^] signature (plaintext) will be generated at `_path_.asc`, and a binary detached signature will be generated at `_path_.sig`.
===== conf
See <<conf>>.
==== gpgVerify(_sigfile_, _datafile_, _conf_)
This function verifies a detatched signature against a file containing data. Returns *True* if the file verifies, or *False* if not.
===== sigfile
The detached signature file. Can be ASCII-armored or binary format. Full/absolute path only.
===== datafile
The file containing the data to be verified. Full/absolute path only.
===== conf
See <<conf>>.
==== delTempKeys(_conf_)
Delete automatically-generated keys (if we generated them) as well as the automatically imported verification key (<<code_gpgkey_code>>).