whew! docs finished. 3.00 beta is DONE!
This commit is contained in:
@@ -25,5 +25,5 @@ See <<chrootdir>>.
|
||||
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).
|
||||
A dictionary of <<code_build_code>>'s values (with some additional keys/values added). See <<parseconfig_em_confs_em,parseConfig()>>.
|
||||
|
||||
|
||||
@@ -36,3 +36,6 @@ See <<conf>>.
|
||||
|
||||
==== delTempKeys(_conf_)
|
||||
Delete automatically-generated keys (if we generated them) as well as the automatically imported verification key (<<code_gpgkey_code>>).
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
|
||||
64
docs/manual/dev/functions/BSSL.adoc
Normal file
64
docs/manual/dev/functions/BSSL.adoc
Normal file
@@ -0,0 +1,64 @@
|
||||
=== `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.
|
||||
|
||||
==== verifyCert(_cert_, _key_, _CA_ = None)
|
||||
This function will verify a certificate's validity/pairing with a key, optionally against a given CA certificate. Returns *True* on successful verification, or *False* and an exit (for sanity purposes).
|
||||
|
||||
===== cert
|
||||
The certificate to be validated. Must be a PyOpenSSL certificate object.
|
||||
|
||||
===== key
|
||||
The key to validate against <<cert>>. Must be a PyOpenSSL key object.
|
||||
|
||||
===== CA
|
||||
The CA, or certificate authority, certificate to verify against.
|
||||
|
||||
NOTE: This currently does not work, as PyOpenSSL does not currently support verifying against a specified CA certificate.
|
||||
|
||||
==== sslCAKey(_conf_)
|
||||
This function imports a CA key (<<code_ssl_cakey_code>>) into a PyOpenSSL object (or generates one if necessary). Returns a PyOpenSSL key object.
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
|
||||
==== sslCA(_conf_, _key_ = None)
|
||||
This function imports a CA certificate (<<code_ssl_ca_code>>) into a PyOpenSSL object (or generates one if necessary). Returns a PyOpenSSL certificate object.
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
|
||||
===== key
|
||||
A PyOpenSSL key object that should be used to generate the CA certificate (or is paired to the CA certificate if specified).
|
||||
|
||||
==== sslCKey(_conf_)
|
||||
This function imports a client key (<<code_ssl_key_code>>) into a PyOpenSSL object (or generates one if necessary). Returns a PyOpenSSL key object.
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
|
||||
==== ssslCSR(_conf_, _key_ = None)
|
||||
This function generates a CSR (certificate signing request).
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
|
||||
===== key
|
||||
A PyOpenSSL key object that should be used to generate the CSR. It should be a key that is paired to the client certificate.
|
||||
|
||||
==== sslSign(_conf_, _ca_, _key_, _csr_)
|
||||
This function signs a CSR using a specified CA.
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
|
||||
===== ca
|
||||
A PyOpenSSL certificate object for the CA certificate. This certificate (object) should have signing capabilities.
|
||||
|
||||
===== key
|
||||
A PyOpenSSL key object paired to <<ca_2>>.
|
||||
|
||||
===== csr
|
||||
A PyOpenSSL CSR object. See <<ssslcsr_em_conf_em_em_key_em_none,sslCSR()>>.
|
||||
|
||||
==== sslPKI(_conf_)
|
||||
Ties all the above together into one convenient function. Returns a PyOpenSSL certificate object of the signed client certificate.
|
||||
26
docs/manual/dev/functions/BSYNC.adoc
Normal file
26
docs/manual/dev/functions/BSYNC.adoc
Normal file
@@ -0,0 +1,26 @@
|
||||
=== `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.
|
||||
|
||||
==== http(_conf_)
|
||||
This function prepares a *local* HTTP directory, or webroot. See <<code_http_code_2>>.
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
|
||||
==== tftp(_conf_)
|
||||
This function prepares a *local* TFTP directory (for traditional PXE). See <<code_tftp_code_2>>.
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
|
||||
==== git(_conf_)
|
||||
This function commits (and pushes) any changes you might have made to your project (<<code_basedir_code>>) automatically.
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
|
||||
==== rsync(_conf_)
|
||||
This function syncs your builds, HTTP directory (if enabled), TFTP directory (if enabled), etc. to a remote host. See <<code_rsync_code_2>>.
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
43
docs/manual/dev/functions/BUILD.adoc
Normal file
43
docs/manual/dev/functions/BUILD.adoc
Normal file
@@ -0,0 +1,43 @@
|
||||
=== `build.py`
|
||||
This is responsible for building the "full" ISO, building UEFI support, etc.
|
||||
|
||||
==== genImg(_conf_)
|
||||
This function builds the http://tldp.org/HOWTO/SquashFS-HOWTO/creatingandusing.html[squashed filesystem^] images and, <<code_gpg_code,if requested>>, signs them.
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
|
||||
==== genUEFI(_build_, _bdisk_)
|
||||
This function builds UEFI support for the ISO files. Returns the path of an embedded EFI bootable binary/ESP image.
|
||||
|
||||
===== build
|
||||
The <<code_build_code,build section>> of the configuration.
|
||||
|
||||
===== bdisk
|
||||
The <<code_bdisk_code,bdisk section>> of the configuration.
|
||||
|
||||
==== genISO(_conf_)
|
||||
Builds the full ISO image(s). Returns a dictionary of information about the built ISO file (see <<iso>>).
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
|
||||
==== displayStats(_iso_)
|
||||
Parses the output of e.g. <<geniso_em_conf_em,genISO()>> and displays in a summary useful to the end-user.
|
||||
|
||||
===== iso
|
||||
A dictionary of information about the ISO file. This is typically:
|
||||
|
||||
{'iso':
|
||||
{'name':<'Main' for the full ISO, 'Mini' for the mini ISO, etc.>},
|
||||
{<name>:
|
||||
'sha':<SHA256 sum of ISO file>,
|
||||
'file':<full/absolute path to ISO file>,
|
||||
'size':<size, in "humanized" format (e.g. #GB, #MB, etc.)>,
|
||||
'type':<Full or Mini>,
|
||||
'fmt':<human readable ISO type. e.g. Hybrid for an image that can be burned directly to a disk via dd or burned to optical media>
|
||||
}
|
||||
}
|
||||
|
||||
==== cleanUp()
|
||||
Currently a no-op; this function is reserved for future usage to cleanup the build process automatically.
|
||||
42
docs/manual/dev/functions/HOST.adoc
Normal file
42
docs/manual/dev/functions/HOST.adoc
Normal file
@@ -0,0 +1,42 @@
|
||||
=== `host.py`
|
||||
These functions are used to perform "meta" tasks such as get information about the build host, find <<the_code_build_ini_code_file,the `build.ini` file>>, and parse your configuration options.
|
||||
|
||||
==== getOS()
|
||||
Returns the distribution of the build host.
|
||||
|
||||
==== getBits()
|
||||
Returns the "bitness" of the build host (e.g. `32bit` or `64bit`)
|
||||
|
||||
==== getHostname()
|
||||
Returns the hostname of the build host.
|
||||
|
||||
==== getConfig(_conf_file_ = '/etc/bdisk/build.ini')
|
||||
Returns a list of:
|
||||
|
||||
. the default configuration file
|
||||
. the user-specified configuration file
|
||||
|
||||
===== conf_file
|
||||
This is a full/absolute path that is searched first. If it exists and is a file, it is assumed to be the "canonical" <<the_code_build_ini_code_file,`build.ini` file>>.
|
||||
|
||||
==== parseConfig(_confs_)
|
||||
This function parses the configuration file(s) and returns a list of:
|
||||
|
||||
. A ConfigParser object
|
||||
. The configuration as a dictionary
|
||||
|
||||
It performs some additional things, such as:
|
||||
|
||||
* Converts "boolean" operations to true Python booleans
|
||||
* Tries to automatically detect the version if one isn't provided
|
||||
* Establishes the build number (this is a number that should be local to the build host)
|
||||
* Forms a list of the <<code_multiarch_code,architectures>> to build
|
||||
* Validates:
|
||||
** The bootstrap tarball mirror
|
||||
** The rsync destination (if <<code_rsync_code,enabled>>)
|
||||
** The iPXE remote URI (if <<code_ipxe_code,enabled>>)
|
||||
** That <<code_basedir_code>> is correctly set
|
||||
* Makes prerequisite directories
|
||||
|
||||
===== confs
|
||||
A list of configuration files. See <<getconfig_em_conf_file_em_etc_bdisk_build_ini,getConfig()>>.
|
||||
22
docs/manual/dev/functions/IPXE.adoc
Normal file
22
docs/manual/dev/functions/IPXE.adoc
Normal file
@@ -0,0 +1,22 @@
|
||||
=== `ipxe.py`
|
||||
This file handles building the "mini" ISO via iPXE.
|
||||
|
||||
==== buildIPXE(_conf_)
|
||||
This function builds the iPXE core files.
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
|
||||
==== genISO(_conf_)
|
||||
This function builds the mini ISO (if <<code_iso_code,enabled>>). Returns a dictionary of information about the built ISO file (see <<iso>>).
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
|
||||
==== tftpbootEnv(_conf_)
|
||||
This function configures a TFTP boot/root directory for traditional PXE setups.
|
||||
|
||||
NOTE: This function currently is a no-op; it will be implemented in future versions.
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
52
docs/manual/dev/functions/PREP.adoc
Normal file
52
docs/manual/dev/functions/PREP.adoc
Normal file
@@ -0,0 +1,52 @@
|
||||
=== `prep.py`
|
||||
This contains functions that download the base tarball releases, preps them for <<code_bchroot_py_code>>, builds necessary directory structures, and performs the overlay preparations.
|
||||
|
||||
==== dirChk(_conf_)
|
||||
This function creates extra directories if needed.
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
|
||||
==== downloadTarball(_conf_)
|
||||
This function downloads the tarball (<<code_mirrorfile_code>>) from the <<code_mirror_code>>, and performs verifications (SHA1 and GPG signature <<code_mirrorgpgsig_code,if enabled>>). Returns the full/absolute path to the downloaded tarball.
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
|
||||
==== unpackTarball(_tarball_path_, _build_, _keep_ = False)
|
||||
This function extracts the tarball downloaded via <<downloadtarball_em_conf_em,downloadTarball()>>.
|
||||
|
||||
===== tarball_path
|
||||
The full/absolute path to the downloaded tarball.
|
||||
|
||||
===== build
|
||||
See <<build>>.
|
||||
|
||||
===== keep
|
||||
`True` or `False`. Whether we should keep the downloaded tarball after unpacking/extracting. If your upstream tarball changes often enough, it's recommended to set this to `False`. However, setting it to `True` can speed up the build process if you're on a slower Internet connection.
|
||||
|
||||
==== buildChroot(_conf_, _keep_ = False)
|
||||
This incorporates <<downloadtarball_em_conf_em,donwloading>> and <<unpacktarball_em_tarball_path_em_em_build_em_em_keep_em_false,extracting>> into one function, as well as applying the <<pre_build_d>> directory (and the <<pre_build_d_2,pre-build.d templates>>).
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
|
||||
===== keep
|
||||
See <<keep>>.
|
||||
|
||||
==== prepChroot(_conf_)
|
||||
Returns a modified/updated <<build>>. This function:
|
||||
|
||||
. Prepares some variables that <<changing_the_build_process,pre-build.sh>> needs inside the chroot(s)
|
||||
. Builds <<version_info_txt_j2,the VERSION_INFO.txt file>>
|
||||
. Updates the build number
|
||||
. Imports the <<code_mygpgkey_code,signing GPG key>>
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
|
||||
==== postChroot(_conf_)
|
||||
This function applies the <<overlay_2>> directory (and the <<overlay,overlay templates>>).
|
||||
|
||||
===== conf
|
||||
See <<conf>>.
|
||||
Reference in New Issue
Block a user