README.build 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. INDEX
  2. -----
  3. * Build requirements
  4. * Image types generated by mkparabolaiso.
  5. * File format for aitab.
  6. * Why the /isolinux and /parabola/boot/syslinux directories?
  7. * Git branches and build configurations.
  8. * Building Parabola GNU/Linux-libre live media.
  9. *** Build requirements
  10. ** For mkparabolaiso script needs these packages (build host):
  11. + squashfs-tools for mksquashfs
  12. + libisoburn for xorriso
  13. + btrfs-progs for mkfs.btrfs (optional)
  14. ** For configs/releng build.sh needs theses packages (build host):
  15. + dosfstools for mkfs.vfat
  16. + lynx for fetching the latest installation guide
  17. ** For these hooks needs these packages (on target root-image)
  18. * parabolaiso
  19. + (none)
  20. * parabolaiso_loop_mnt
  21. + (none)
  22. * parabolaiso_pxe_common
  23. + mkinitcpio-nfs-utils for ipconfig
  24. * parabolaiso_pxe_nbd
  25. + nbd for nbd-client
  26. * parabolaiso_pxe_http
  27. + curl for curl
  28. * parabolaiso_pxe_nfs
  29. + mkinitcpio-nfs-utils for nfsmount
  30. * parabolaiso_shutdown
  31. + (none)
  32. *** Temporary filesystems generated by mkparabolaiso.
  33. * work/x86_64/root-image/
  34. => # x86_64 chroot install target
  35. * work/i686/root-image/
  36. => # i686 chroot install target
  37. * work/root-image/
  38. => # transient per-arch hard copy of each work/<ARCH>/root-image/
  39. => # transient source for each per-arch ./work/root-image.fs
  40. * work/root-image.fs
  41. => # transient source for per-arch root-image.fs.sfs
  42. * work/mnt/root-image/
  43. => # mountpoint for packing work/root-image.fs
  44. * work/iso/parabola/x86_64/root-image.fs.sfs or
  45. work/iso/parabola/x86_64/root-image.sfs
  46. => # r/o loopback filesystem for live x86_64 environment (see "Image types " section)
  47. * work/iso/parabola/i686/root-image.fs.sfs or
  48. work/iso/parabola/i686/root-image.sfs
  49. => # r/o loopback filesystem for live i686 environment (see "Image types " section)
  50. *** Image types generated by mkparabolaiso.
  51. * image-name.sfs SquashFS image with all files directly on it.
  52. [read-only, no dm-snapshot is used]
  53. * image-name.fs.sfs SquashFS with only one file inside (image-name.fs),
  54. which is an image of some type of filesystem
  55. (ext4, ext3, ext2, xfs, btrfs), all files reside on it.
  56. [read-write, via COW image with dm-snapshot]
  57. *** File format for aitab.
  58. The aitab file holds information about the filesystems images that must be
  59. created by mkparabolaiso and mounted at initramfs stage from the parabolaiso hook.
  60. It consists of some fields which define the behaviour of images.
  61. # <img> <mnt> <arch> <sfs_comp> <fs_type> <fs_size>
  62. <img> Image name without extension (.fs .fs.sfs .sfs).
  63. <mnt> Mount point.
  64. <arch> Architecture { i686 | x86_64 | any }.
  65. <sfs_comp> SquashFS compression type { gzip | lzo | xz }.
  66. <fs_type> Set the filesystem type of the image
  67. { ext4 | ext3 | ext2 | xfs | btrfs }.
  68. A special value of "none" denotes no usage of a filesystem.
  69. In that case all files are pushed directly to SquashFS filesystem.
  70. <fs_size> An absolute value of file system image size in MiB.
  71. (example: 100, 1000, 4096, etc)
  72. A relative value of file system free space [in percent].
  73. {1%..99%} (example 50%, 10%, 7%).
  74. This is an estimation, and calculated in a simple way.
  75. Space used + 10% (estimated for metadata overhead) + desired %
  76. *** Why the /isolinux and /parabola/boot/syslinux directories?
  77. The /isolinux directory holds files needed for the ISOLINUX boot loader
  78. module of SYSLINUX. ISOLINUX can not find config files on
  79. /parabola/boot/syslinux, like other boot loaders modules (SYSLINUX, PXELINUX).
  80. *** Git branches and build configurations.
  81. The parabolaiso git repo consists of several branches; only some of which are useful for building ISOs. Others exist only for merging with upstream. The build configurations on the 'master' branch are used to build the official release ISOs.
  82. Note that the ISOs can built by an unprivileged user with sudo but all files under the configs/releng/root-image directory must be owned by root during the build process. The configs/releng/build.sh script manages this automatically; but it will cause problems when checking-out or switching branches if the git command is not also run as a superuser. To avoid a corrupted working tree, the entire contents of the configs/releng/root-image directory should be chown'ed to the unprivileged user before running any git command that would modify them.
  83. $ sudo chown -R user:group root-image/
  84. ** Branches not intended for building ISOs.
  85. * helper/rebrand - Branch to aid rebranding. Branch master of archiso.git plus Parabola rebranding of filenames and file contents. It is used as an intermediate step to merge Archiso, to aid git detecting file renames.
  86. * rebrand/releng - Rebranding branch. helper/rebrand leaving only the directory of releng inside configs/, renamed to profile/. It is possible to create equivalent branches for other ISO variants.
  87. * rebrand/baseline - Rebranding branch. Same concept as rebrand/releng.
  88. * release - Contains snapshots of releases, with commits showing updates of each profile. It should be updated only by make dist.
  89. * release-branches - Snapshots of last commits (HEAD) of each specified profile branch. Same concept as the branch release. It should be updated only by make dist-branches. Using it is not strictly necessary. It does not exist in the public Parabola repository parabolaiso.git.
  90. ** Branches for building ISOs.
  91. * baseline - Profile branch "baseline". master is separated from baseline to its own branch. This is now different from Archiso, and enables merging the releng profile in other profiles that use releng as a base.
  92. * master - Profile branch a.k.a "releng". Branch rebrand/releng with Parabola customizations. The files outside configs/ which are common to all variants are packaged from this branch.
  93. NOTE: This distinction is in the process of being deprecated or reverted. In the future, there will be only one 'releng' profile; which is capable of building any of the variant editions via command-line options to a single ./build.sh script on the master branch. See README.package_lists and the '-E' ./build.sh option below for more information.
  94. ** Package Lists
  95. See README.package_lists for information regarding the package lists files schema.
  96. *** Building Parabola GNU/Linux-libre Live ISOs.
  97. First decide if you want to build one of the standard releases,
  98. or if you plan to do development on parabolaiso itself.
  99. * To build the standard releases, install parabolaiso via pacman.
  100. # pacman -S parabolaiso
  101. # cd /usr/share/parabolaiso/configs/releng
  102. * Or, for parabolaiso development, clone parabolaiso from git.
  103. # pacman -R parabolaiso
  104. # pacman -S parabolaiso-data git
  105. # git clone git://git.parabola.nu/packages/parabolaiso.git
  106. # cd parabolaiso/configs/releng
  107. * For parabolaiso development, there are some extra dependencies.
  108. * For 'baseline' ISOs
  109. # pacman -S squashfs-tools libisoburn rsync --needed
  110. * For 'releng' derrived ISOs
  111. # pacman -S squashfs-tools libisoburn dosfstools --needed
  112. * In either case, if you are a Parabola dev, and are making a release ISO,
  113. you can install the following packages, in order to make a complete release,
  114. ready to publish, with all metadata files (torrent, checksums, etc)
  115. # pacman -S mktorrent rhash --needed
  116. * Build one or more ISOs.
  117. # ./build.sh # dual-architecture SystemD/CLI
  118. # ./build.sh -T i686 # 32-bit x86 target SystemD/CLI
  119. # ./build.sh -T x86_64 # 64-bit x86 target SystemD/CLI
  120. # ./build.sh -E OpenRC/CLI -O # OpenRC/CLI for offline install
  121. # ./build.sh -E OpenRC/LXDE -O # OpenRC/LXDE for offline install
  122. # ./build.sh -E SystemD/LXDE # SystemD/LXDE for net-install
  123. # ./build.sh -E SystemD/MATE -S # SystemD/MATE with speech and braille
  124. # ./build.sh -V "`date +%Y.%m.%d.%H.%M`-alpha" # development filename
  125. NOTE: The commands above are only some examples. Run `build.sh -h` for the complete options.
  126. NOTE: This script needs to be run on an x86_64 ArchLinux derrivative
  127. NOTE: Specifying a single architecture with the -T option builds in half of the time
  128. and results in the ISO being about half of the size as the dual-architecture ISO.
  129. If the -T option is omitted, the default value of 'dual' will be assumed.
  130. NOTE: Omitting the -O option results in the ISO being about half of the size yet again;
  131. but will require an internet connection to install the target system.
  132. NOTE: The argument to the -E option must consist of an init/wm pair separated by a '/' slash,
  133. and must correspond to one each of the 'VALID_INITS' and 'VALID_GUIS'
  134. as defined in the 'build.sh' script. If the -E option is omitted,
  135. the default value of 'SystemD/CLI' will be assumed.
  136. This will determine which package lists will be used. Although the package lists
  137. files are named in lowercase, this argument may contain captial letters.
  138. It will be printed verbatim in the titles of the boot menu and the MOTD.
  139. NOTE: The rebuild.sh script can be handly during development. Among other things,
  140. it can delete the work directory while retaining the chroot package caches
  141. (the 'wipe' option); which will speed up repeated clean re-builds.