====== The Concept ====== Starting in voyage-0.2, customization framework will be in place. It allows system integrator or interest parties to customize voyage linux to roll out their own version. In general, here is the basic concept for how customization works, the customization script (called voyage-build.sh) would perform the following: - chroot to voyage distro directory - add your favourite package repository to sources.list as specified in your distro profile - install and/or remove packages of your favourite - run post installation scripts, if any - clean up - package the custom distro in tarball (Until the framework is ready, here are some suggestions of [[temp_customization|manual customization]].) ====== The Process and Structure ====== At first, to generate a custom distribution, it is required to create a customization profile structure like below. The voyage-custom.sh script understands this profile structure to build the customization distro. Use this command to make the empty structure: mkdir myproj cd myproj mkdir -p conf etc overlay_fs/etc overlay_fs/usr scripts/chroot.d scripts/pre.d scripts/post.d myproj/ |-- conf/ | |-- apt.conf # defines multiple apt repository locations and packages to add | |-- dpkg-i.lst # defines a list of deb packages to be downloaded and installed using "wget" and "dpkg -i" | |-- dpkg-r.lst # defines a list of deb packages to be removed using "apt-get remove" | |-- kernel.conf # defines the kernel deb, kernel module debs and additional modules. | |-- rm.lst # defines a list of files or directories to be removed in the target distro. | `-- tmpfs.lst # defines a list of files to be symbolic linked to ramdisk (i.e. defines /ro and /rw files) |-- etc/ # directory contains files that may be useful to scripts/pre.d or scripts/post.d |-- overlay_fs/ # defines the file systems that to be overlayed to the existing voyage file systems, | | # you should put any binaries and other custom configuration files here | |-- etc/ | `-- usr/ `-- scripts/ |--chroot.d/ # a set of scripts executed by under chroot'ed environment |--pre.d/ # a set of scripts executed by run-parts before customization process begins `--post.d/ # a set of scripts executed by run-parts before customization process ends Processing Sequence: (as of voyage-0.2) pre.d # NOT IMPLEMENTED apt.conf dpkg-r.lst dpkg-i.lst # by wget, no local deb support rm.lst tmpfs.lst # not implemented kernel.conf # download kernel debs not implemented overlay_fs # copy overlay files into new distro chroot.d post.d voyage-custom.sh syntax: voyage-custom.sh For example, voyage-custom.sh /voyage-0.2pre1 /myproj This will generate the customization distro called ''voyage-myproj'' in the current directory. To use it, you must cd into it and run the normal "usr/local/sbin/voyage.update" script. ====== Config files ====== Config files in conf can have #-style comments, like shell scripts. ===== dpkg-i.lst ===== One package per line. Currently only supports URLs. (jra@nella.org: will be sending in a patch to get the dpkgs out of a file instead) ===== dpkg-r.lst ===== One package name per line. Here is the command used to remove the package: apt-get -f -y -q=2 --purge remove $pkg ====== Script Environment ====== The scripts in post.d are started in the temp directory where the new target is ($PWD/.tmp). These variables are set: * $TARGET_DIR is the top of the new Voyage distro that is being assembled * $RUN_DIR is set to the directory where voyage-custom.sh was run from * $CUSTOM_DIR is the profile directory chroot.d scripts are copied into the root of the new distro, then run inside the chroot environment from /chroot.d/$script_name. Finally, the temporary /chroot.d directory is cleaned up. The following variables are passed through from the original environment: * DEBIAN_FRONTEND="noninteractive" (to make install tools not ask questions and hang) * ftp_proxy="${LIVE_FTPPROXY}" * http_proxy="${LIVE_HTTPPROXY}"