|
| 1 | +Teaiso technology |
| 2 | +================== |
| 3 | + |
| 4 | +**The ISO generation tool for GNU/Linux** |
| 5 | + |
| 6 | +## General information |
| 7 | + |
| 8 | +Our project is made with `c`, `bash` and `python`, the work of the teaiso is using chroot by the moment, |
| 9 | +in the future we will reimplement in `vala` and maybe use docker containers to avoid touch system process. |
| 10 | + |
| 11 | +The live system used the `squashfs-tools` to produce the rootfs of the live disk. |
| 12 | + |
| 13 | +The project uses the concept of "profiles" as linux distributions to build, |
| 14 | +each profile are few files that determines what customizations are made in live mode |
| 15 | +and what stuffs are included in the squasfs file; also each profile |
| 16 | + |
| 17 | +#### Terminology |
| 18 | + |
| 19 | +* `airootfs`: is the rootfs directory that willwork and from the squasfs will be created. |
| 20 | +* `profile`: are directories where customizations will be taken to apply over the `airootfs` check [creating-profile.rst](creating-profile.rst) for more information. |
| 21 | + * skeleton profiles: are template base from the teaiso profile directory, use it for creation of working profiles. |
| 22 | + * working profiles: are the real profiles created based on the skeleton ones. and will handle customizations to apply. |
| 23 | +* `distro`: each profile corresponds to a distro script for processing, to perform specific distro needs, check [porting-distribution.rst](porting-distribution.rst) for more information. |
| 24 | + * `funtion`: the distro format defined functions that will determine modifications and actions over the `airootfs`. |
| 25 | + * `variables`: are used in the performed funtions only for some distros, by example Debian based ones. |
| 26 | +* `shared`: this is a directory that will be common beetween the `airootfs` and the host real filesystem |
| 27 | +* `stage`: the runlevels controls to determine the creation progress of the iso generation, we have 10 stage runlevels where the profile customizations will be apply. |
| 28 | +* `mkteaiso`: is the main program to use, check the quick workflow at the [starting-use-case.md](starting-use-case.md) document. |
| 29 | + |
| 30 | +#### Artifacts |
| 31 | + |
| 32 | +| stuff | path | notes | |
| 33 | +| ---------- | ---------------------------- | ----- | |
| 34 | +| `mkteaiso` | `$(DESTDIR)/usr/bin` | Its the main program | |
| 35 | +| teaiso | `$(DESTDIR)/usr/lib/teaiso` | teaiso files artifacs | |
| 36 | +| outputs | `/var/lib/teaiso` | teaiso product outputs | |
| 37 | +| logs | `/var/log/teaiso.log` | teaiso trace outputs | |
| 38 | + |
| 39 | +#### Paths |
| 40 | + |
| 41 | +When you [install](Installation.md) the project, only two places are touch, |
| 42 | +the program binary named `mkteaiso` that will be in `$(DESTDIR)/usr/bin` |
| 43 | +and the program files that will be in `$(DESTDIR)/usr/lib/teaiso/` when installed. |
| 44 | +Please read about the [usage of `$DESTDIR` variable at FAQ-and-notes.md](FAQ-and-notes.md#usage-of-destdir-at-install). |
| 45 | + |
| 46 | +When you [used]() the program, extra path will be used, |
| 47 | +the program works and outputs the iso images at `/var/lib/teaiso/`. |
| 48 | +the working dirs will be at `/var/lib/teaiso/work`. and |
| 49 | +the output iso files will be at `/var/lib/teaiso/output`. |
| 50 | +The logs will be performed also into `/var/log`. |
| 51 | + |
| 52 | +The output and work paths are cutomizable, those are not auto cleaned by the program, |
| 53 | +neither managed by uninstal. |
| 54 | + |
| 55 | +#### Stage runlevels |
| 56 | + |
| 57 | +The stage runlevels controls to determine the creation progress of the iso generation, |
| 58 | +we have 10 stage runlevels where the profile customizations will be apply: |
| 59 | + |
| 60 | +* 0 This performs the cofnigurations and check |
| 61 | +* 1 This performs the init from the distro definition, special case are handle by example in alpine and debian. |
| 62 | +* 2 This performs the population of the `airootfs` and the mount of the shared directory parsed to the `mkteaiso` command |
| 63 | +* 3 This performs the customizations of the `airootfs` by running `customize_airootfs_pre` script of `profile` definition |
| 64 | +* 4 This performs the installation of base rootfs packages of `distro` using "packages" file of `profile` |
| 65 | +* 5 This performs the preparation of the customized `airootfs` in the working dir for post customizations |
| 66 | +* 6 This performs the customizations of the `airootfs` by running the `customize_airootfs` script of `profile` definition |
| 67 | +* 7 This performs the list of the packages installed for information, and later umount the shared directory |
| 68 | +* 8 This performs the file permission by lines defined in `file_permission` field of `profile` definition, after that creates the `squashfs` file |
| 69 | +* 9 This performs the creation of the iso image after customizations made by the `customize_isowork` scripts, will handle the `squashfs` file |
| 70 | + |
| 71 | +#### Variables |
| 72 | + |
| 73 | +TODO |
| 74 | + |
| 75 | +## Profiles definitions |
| 76 | + |
| 77 | +Those are directories where customizations will be taken to apply over the `airootfs` |
| 78 | +check [creating-profile.rst](creating-profile.rst) for more information. |
| 79 | + |
| 80 | +## Customizations scripts |
| 81 | + |
| 82 | +The contents of the iso are manage on two filesystems, the root OS and the ISO file. |
| 83 | +Those scripts are just **pure bash format but limited in context by the nature of the running `stage` environment**. |
| 84 | + |
| 85 | +* `customize_airootfs_pre` will perform all those command before put packages of `distro` using "packages" file of `profile` |
| 86 | +* `customize_airootfs` will perform all those command after put packages of `distro` using "packages" file of `profile` |
| 87 | +* `customize_isowork_pre` will perform all those command before creation of the ISO image |
| 88 | +* `customize_isowork` will perform all those command at the creation of the ISO image, but not before |
| 89 | + |
| 90 | +## See also |
| 91 | + |
| 92 | +* [starting-use-case.md](starting-use-case.md) |
| 93 | +* [creating-profile](creating-profile.rst) |
| 94 | +* [porting-distribution](porting-distribution.rst) |
0 commit comments