The LinHES development is divided into two different git repositories. The first repository is linhes-pkgbuild, and it contains all the PKGBUILD files that make up LinHES. The second repository is called linhes-dev and is intended to create a chroot for all development to occur within (development enviroment). By using a chroot development work will not affect the existing LinHES installation and can also be done on non-LinHES machines. The reason for the linhes-pkgbuild and linhes-dev split is so that PKGBUILDs may be downloaded and modified without requiring the entire development environment be built. ------ linhes-pkgbuild ----------- The layout of the linhes-pkgbuild repository is: -- abs |-- core |-- core-testing |-- extra |-- extra-testing core is the set of packages that make up the "core" of LinHES. Iin other words all the packages needed to create a fully functioning system. extra contains all the packages used by LinHES, but not necessarily needed to create a fully functioning system. For example this would include mplayer, xine and Chrome. The core and extra repositories are intended for the current public release and are considered stable. The core-testing and extra-testing repositories are intended for developers and testers in preparing the next release. ------ linhes-dev ---------------- linhes-dev contains the tools and scripts for a working development environment. However, linhes-dev is not a working development by itself. A working development enviroment also needs linhes-pkbuild. The script setup_env.sh will do all the work in creating a working development environment. Get setup_env.sh at: http://cgit.linhes.org/linhes_dev/plain/setup_env.sh?h=testing The setup_env.sh script will download and install the required packages (by default, from the current stable release) into a directory called build_root and create a script that can be used to enter the chroot. Because LinHES can support multiple architectures, setup_env.sh requires arguments telling it which architecture to work with as well as which repository (stable or testing) you'd like to develop on. Beginning with R8.0 x86_64 is the only working architecture option. For example, running "setup_env.sh x86_64 testing" will create a working x86_64 LinHES development environment named build_root.x86_64 using the testing repos. setup_env.sh also creates an empty directory called pkg_repo, this is used by kmsync.sh (which will be discussed later). Likewise, running "setup_env.sh x86_64 release" will create a development enviroment using the core and extra repos. To enter the chroot development environment run: "sudo ./enter_build_root.x86_64" The enter_build_root.x86_64 script will take care of the following things: a) mounting proc,sys,dev/pts b) bind mounting linhes-dev/build_tools to build_root/build_tools c) bind mounting linhes-pkgbuild to build_root/data/linhes-pkgbuild d) bind mounting pkg_repo to build_root/data/pkg_repo. e) unmount the above directories when leaving the chroot The following is a list of tools available inside the chroot: - mpv2.py Script to build a package from the PKGBUILD and copy it to the pkg_repo. v2 of mp.py with many enhancements. Must be called from the same directory as the PKGBUILD. - mp.py (depreciated and replaced by mpv2.py) Python script to replace mp. Must be called from the same directory that contains the PKGBUILD. - update_db_repo Used to completely regenerate the the local package database. Takes two arguments the directory with packages, and the name of the repository. Example: update_db_repo /data/pkg_repo/i686/core-testing core-testing - kmsync.sh (testing|release|chroot-devel|source[testing|release|chroot-devel] This script is used to synchronize the contents of the compiled packages on linhes.org and the ones on your local machine. The script takes 1 or 2 arguments telling it which repository with which to sync up. The first time it's run with any given option the local directory (/data/pkg_repo/x86_64/core|extra|chroot-devel) MUST MUST MUST be empty. Please use this script with care, any changes that are made in the local mirror will be copied to the linhes.org server. This includes the possibility to completely erase all the packages. Normally the source packages are synced when the binary packages are synced. The source option is present to force an update, and isn't normally required to be run. Finally this script uses a shared user account on linhes.org that is a locked account. SSH keys must be setup for this script to work. - build_tools/go.sh (depreciated; replaced by build_tools/archiso-19/mythvantage/go.sh) Menu driven frontend to create an ISO with selected profile. The following profiles are available to create an iso. a ) x86_64-RELEASE-REMOTE Create an iso from the release repo using packages from linhes.org b ) x86_64-testing-REMOTE Create an ISO from the testing repo using packages from linhes.org c ) x86_64-testing-local Create an ISO from the testing repo using packages from the local mirror d ) x86_64-testing-local-httpdir-structure Create an ISO from the testing repo using packages from a local web server name "localmirror" After the process finishes it will let you know the final name and location of the resulting ISO. For any of the local profiles to work, it requires that kmsync.sh be run at least once to populate the local mirror. ------ Quick Start ------------------ Example process to create the chroot and build an ISO. ############ Create the chroot for x86_64 (see above). Make sure base-devel is installed: pacman -S base-devel Make sure you have the following entries in /etc/pacman.conf: [core-testing] Server = http://linhes.org/repo/x86_64/core-testing [extra-testing] Server = http://linhes.org/repo/x86_64/extra-testing Then run: pacman -Syu Checkout the repo. You will need to have been given a dev account on linhes.org. This involves creating a public ssh key and supplying it to one of the linhes.org admins. The key is created using ssh-keygen. The resulting public key will be stored in .ssh/id_rsa.pub. The recommended location for the checkout is /myth/dev. cd /myth/dev - Restricted dev accounts should use git clone $USER@linhes.org:linhes-pkgbuild git clone $USER@linhes.org:linhes-dev - Unresticted dev account should use git clone ssh://$USER@linhes.org/mount/repository/linhes-dev git clone ssh://$USER@linhes.org/mount/repository/linhes-pkgbuild - Edit linhes-dev/templates/pacman.conf.chroot. Comment out the core and extra lines and uncomment the core-testing and extra-testing. - Run these commands: cd linhes-dev/ sudo ./setup_env.sh x86_64 cd .. - Set up the ssh keys inside the build root. If the ssh public key you provided to the linhes.org admin was created by root on an r6 install: cp -R /root/.ssh build_root.x86_64/root/.ssh - Then to enter the chroot: sudo ./enter_dev_chroot.x86_64 -- To build an ISO from linhes.org: cdb <= alias to build_tools cd archiso-19/mythvantage/ ./go.sh (select x86_64-testing-REMOTE) -- To build an ISO locally: Before running kmsync.sh for the first time, for reasons explained above, ensure the local directories (/data/pkg_repo/x86_64/core|extra) are empty. Then run: kmsync.sh testing cd archiso-19/mythvantage/ ./go.sh (Select x86_64-testing-local) #--------- ############ Commands used to build a package (tar in this example), and update linhes.org Before building ANY packages you __MUST__ run "kmsync.sh testing" at least once while the local package directories are still empty. Doing this step now will avoid sync headaches down the road. cdl <= alias that takes you the the top level PKGBUILD directory cd core cd tar vi PKGBUILD <= edit and increment pkgrel by 1; remove md5sums mpv2.py --md5 <= builds the package and all dependencies and copies the pkg to pkg_repos; --md5 is optional but will remove the md5sums in PKGBUILD # At this point you should test the package, either by building # a new iso or installing the package. # In order to make your source change(s) available to others, you will have # to commit your change(s) to your local copy of the linhes-pkgbuild repo. # If this is your first time using the git command, set up your user name # and email address (You only need to do this once, not every time): git config --global user.name "Your Name" git config --global user.email "you@yourdomain.com" # Next, commit your changes to your local linhes-pkgbuild repo: git commit -a -m "commit message" # and then push the change(s) to the public repo: git push # In order to make your new package(s) available to others, you will need to # upload changed packages using kmsync.sh: kmsync.sh testing <= this will pull down all new packages from linhes.org and upload the new tar package. This will also sync up the src packages. ----------------------- Misc. Directory structure after a functioning chroot is created for x86_64 |-- linhes-pkgbuild |-- linhes-dev |-- build_root.x86_64 |-- enter_dev_chroot.x86_64.sh `-- pkg_repo ----------------------- # End