It is important to keep your clone up to date, update it regularly by running git pull.
$ cd chakrabuildsystem$ git pull
Create a container
cd to your local clone of chakrabuildsystem.git, and create a container using make_chroot.sh and one of the provided configuration files in conf/.
$ ./make_chroot.sh conf/stable.conf
Browse conf/ to find the configuration files can be used. For now, we use stable.conf for [desktop] and [gtk], and testing.conf for [core]. For [lib32], use lib32-testing.conf because we use the testing branch instead of master.
If you don't have write access to our repositories, use the -n option. Access can be requested here. Read ./make_chroot.sh -h for more information.
A number of default configuration files are provided - but you can write your own too. They are simply pacman.conf files, for more information read $ man pacman.conf.
The script will ask for your user password. Remember that your user must have sudo privileges.
$ ./make_chroot.sh conf/stable.conf :: Running as user: jsmith :: Running on Chakra: 2015.03 :: Using pacman :: Root : chroots :: Chroot Installation : chroots/stable :: Do you want to continue? [Y/n]
Verify that the paths are correct, then type y and press Enter to continue. The script will install all the required packages. If you didn't run the script with the -n option, you will be asked for your ssh key passphrase.
:: Enter your git crendentials :: Full name (e.g. 'John Smith'):John Smith :: E-mail (e.g. 'email@example.com'):firstname.lastname@example.org :: Enter your ssh username:jsmith
You now have a container created and prepared to manage a repository. You can repeat the process for a different configuration. If there were errors during the process, e.g. no Internet connection, or a wrong password, the script will continue until the end. You may need to remove the container and try again.
If you are building C packages for the [lib32] repo, you need to install lib32-glibc and lib32-gcc-libs, or gcc will not work in 32-bits mode (should be done automatically by the script):
$ sudo pacman -S lib32-glibc lib32-gcc-libs
Enter a container
To enter the desktop container:
$ ./enter_chroot.sh desktop
Or, for the testing git branch of desktop:
$ ./enter_chroot.sh desktop testing
See ./enter_chroot.sh -h for more information.
You will be asked for your password (if it isn't cached). Upon entering the container, git will fetch the newest changes from our git repositories and display whether your local clone is ahead of or behind upstream (or both). If either is true, synchronize the git repository before doing any kind of work. To ensure that your container is clean and synchronized before packaging, a good practice is to always do this first after entering your container:
Once you have the PKGBUILD and other needed files ready, put them in a directory with the name of the package, and put that directory into the /chakra/$REPOSITORY/ directory. cd to the directory of the package and run makepkg:
cd <package_name>makepkg -sr
:cp is an alias for rm pkg src dbg hdr -r. Once compiled, clean the directory of the package - but leave the PKGBUILD file and any .install file, ChangeLog, or patches. That is, the files that were already in the directory before running makepkg. Then check what new files there are and what you have changed:
$ git status
There should be no new files, since you already deleted them during the build process. If there is any unexpected, untracked file, remove it, and run git status again. Note that when a package is successfully built, it is moved to /chakra/_repo/<container>, and the .pkg.tar.xz file in package directory is just a symlink that git will ignore, i.e. you don't need to delete it. You can and should test the package in your own system before submitting it to the git and package repositories. Exit your container, cd to chakra/_repo/<container>/, and install it:
First thing you need to do is to update the PKGBUILD of the software you are updating. Change the pkgver variable to its new version, or increase the pkgrel variable if you are rebuilding the same version of the package (i.e. with an additional patch). Update the md5sum (if sources changed). You need to run makepkg -g >> PKGBUILD from inside the directory that contains the PKGBUILD to do that, and should then move the new md5sum to its right position, after the source variable. You can then follow the steps of Add a new package - skipping the first one.
Package chains are lists of packages you may need to build at the same time, and in a specific order. These are defined in configuration files (.conf, .order) in the git repository, together with all the package directories that contain the PKGBUILDs. You can create your own, custom .order and .conf files for use with build.sh.
.conf files include parameters that are common for all the packages
.order files include a list of the packages, ordered according to their dependencies (if package A depends on package B, B needs to be above A in the list)
Some frequently used .order files include frameworks.order, plasma.order, and applications.order. See Building Frameworks, Plasma, and Applications by KDE for more information.
$ git status # Verify that the changes are correct.$ git add <package_name> # Replace <package_name> with the name of the folder containing the package.$ git commit -m "package_name: short description of the changes you performed" # Commit the changes.
Example of updating a single package to a new version:
vlc: Update to 2.0.2
Example of updating a group of packages to new versions:
blender: Rebuild against Python 3
Example of adding a patch:
firefox: Add patch for KDE integration
Only add a single package or directory per commit - multiple packages or directories in a commit is only allowed during package chain upgrades.
$ git push # This is what actually send the changes to the git repository.
gp is an alias for git push. Despite the one-package-per-commit limit, you can push multiple commits at once.
Managing the official package repositories
Upload a package to rsync.chakralinux.org
You can upload your new package(s) with upload.sh. Use the -r switch to define a specific repository to which to upload the package:
$ upload.sh -r repository_name package_name
The -r switch is agnostic of the order and the command can include more than one package. As a result one can also use: