Join the chatroom to ask for an account or meet the community!


Cherimoya is dependent on a set of precompiled packages. Because the security of all Cherimoya users depend on up-to-date packages, a package maintainer is needed to look out for new versions and security patches.

What you need

There is no registration needed to be a package maintainer for Cherimoya. All you need to do is check versions in the PKGBUILDs against the corresponding AUR/CCR package (or in the case of Firefox Addons, Mozilla's addon site), make changes to the PKGBUILD, and then send a merge request. Just do it whenever you feel like it.

Installing the Cherimoya Buildsystem

The Cherimoya Buildsystem is a special chroot environment specially designed for building our packages for any architecture, on any system using GNU utils (Mac OS X, Linux, BSD, etc). It builds any package, signs it, all in a nice clean environment.

First, get the installation script. Then, make it executable with this command:

chmod +x ch-setup.sh

Make sure you've installed Git, and run this command:

./ch-setup.sh repositorybrancharchitecture

Where:

  • repository is one of the available repositories: , , , and ,.
  • branch can be: master (stable), testing or unstable.
  • architecture can be either i686 or x86_64.
  • If you have commit rights, you should add a fourth parameter: . To get those rights, read . Basically, run this:

The script will ask for your user password. Remember your user must have sudo-rights. Here is an example:

Check the paths are correct and enter and to continue.

If you ran the script with as fourth parameter, you will be then asked for your SSH password for Git.

Once all packages are downloaded and installed, you'll be asked for your password. It is your user password, not root.

And later, you will be asked for a new password for the chroot user. You can (and probably should) enter your user password, so your user has the same password in and out of the chroot. Then, enter it again to confirm.

After that, the script installs all needed scripts, sets up your makepkg-config and fetches all needed PKGBUILDs. You will be asked for your full name and your email (This is for Git, you can use a pseudonym and a fake email).

And that's it! You have a chroot created and prepared to manage a repository. You can (and should) repeat the process for a different combination of repository and architecture or, in another folder, for a different branch.

Adding another chroot

The steps to create a new chroot into a current build system is pretty much the same. You just need to skip the steps to install the buildsystem and download the scripts (since you already downloaded it).

Choose a different repository (available ones are , ,, and .)

You should type here.

Entering the Chroot

To enter the chroot, use this command (as the normal user):

cd buildroot

./enter-chroot.sh <html><repository></html>

Replacing <html><repository></html> with any installed chroot, such as "cherimoya-i686".

You will then be asked for your chroot user's password. Then, you'll be into the chroot. You will see the chroot content, and the prompt will be in red, so you know when you are into the chroot.

To ensure your chroot is clean and synced before starting to build and add packages, a good practice is to always use these commands after entering your chroot:

git status # This tells you about the local changes you haven't committed yet. 

git pull # Updates your Git copy. 

pacman -Sc 

pacman -Syu 

Exiting the chroot

Just use this command:

exit

Your prompt should no longer be red.

Using the Buildsystem

After entering the chroot, you will see a list of packages in that repository. Enter any of them and edit the PKGBUILDs inside.

Create a Build Package

To create a new package, read the Arch Wiki, and make sure your follow Chakra standards.

If you are porting a build package from the CCR or AUR, check the standards too, since there are some differences between packages in the CCR and packages in the official repositories.

Once you have the and other needed files ready, put them in a folder with package's name, and put that folder into the right folder.

Build a package

Go into any package folder and use these commands:

cd <html><package_name></html> 

../makepkg -rs

The buildsystem's special script allows package signing, along with other useful extras. The option tells makepkg to get all the dependencies and remove them after building, which is important.

You don't have to worry about package signing unless you have commit support.

Clean the Package Directory

Once compiled, clean package_name folder, and just leave the file and any file, or patches. That is, the files that was already in the folder before running . Then check what additional files are there or what have you changed:

  • git status

There should be no additions, since you have already deleted those files created during the build process. If there is any unexpected untracked file, remove it and run git status again.

Note that when a package successfully compiles, it is moved to , and the file in package's folder is just a symlink that Git will ignore. That means, you don't need to delete it (but you can).

Test your package

If you are working on a package for the same branch and architecture as yours, you should test it in your own system before submitting it to the Git repositories.

Exit your chroot, go to , and install it with:

cd buildroot/<html><repository-branch-architecture></html>/packages/local/ 

pacman -U <html><packagefile></html>.pkg.tar.xz 

Then run it in your system, and once you have checked it works as expected, jump to the next step.

Upload the PKGBUILD to a fork

If you do not have direct commit privileges (which means most people), you should fork our repository, upload your changes to that fork, and send a merge request to contribute your changes to Cherimoya.

First, go to the Cherimoya Packages page on Gitorious. Create an account, make an ssh key, and then go back to our page. Click Clone Repository on the repo you want to submit a change to.

Gitorious1.png Gitorious1.png

You will end up with a link in the middle of the box, as shown in the image to the right. Copy that link, and put it in place of below:

git remote add fork <html><link></html>

After that, you can commit and add files like any git repo, with the exception of the "push" command:

<HTML><ul></HTML>
<HTML><li></HTML>
<HTML><p></HTML>Just to make sure the changes are correct.<HTML></p></HTML><HTML></li></HTML>
<HTML><li></HTML>
<HTML><p></HTML>Where package_name is the name of the folder containing the package. You can add more than one folder, or repeat this step for other packages, in case you added more than one. If you are updating an existing build package and didn't add any new file, skip this step.<HTML></p></HTML><HTML></li></HTML>
<HTML><li></HTML>
<HTML><p></HTML>Here, write a description of the changes you made. Example: ..<HTML></p></HTML><HTML></li></HTML>
<HTML><li></HTML>
<HTML><p></HTML>This is what actually send the changes to the Git repository. The third argument to Git, the branch, is usually .<HTML></p></HTML><HTML></li></HTML><HTML></ul></HTML>

Gitorious2.png Gitorious2.png

Once you've pushed your commits, go to your forked repository and click "Request Merge" to send your changes for approval. You're done!

Upload the PKGBUILD

If you have direct commit privileges, you can upload the PKGBUILD to Git. Enter the chroot again, and run:

<HTML><ul></HTML>
<HTML><li></HTML>
<HTML><p></HTML>Just to make sure the changes are correct.<HTML></p></HTML><HTML></li></HTML>
<HTML><li></HTML>
<HTML><p></HTML>Where package_name is the name of the folder containing the package. You can add more than one folder, or repeat this step for other packages, in case you added more than one. If you are updating an existing build package and didn't add any new file, skip this step.<HTML></p></HTML><HTML></li></HTML>
<HTML><li></HTML>
<HTML><p></HTML>Here, write a description of the changes you made. Example: ..<HTML></p></HTML><HTML></li></HTML>
<HTML><li></HTML>
<HTML><p></HTML>This is what actually send the changes to the Git repository. The branch is the one your chroot was made for, usually .<HTML></p></HTML><HTML></li></HTML><HTML></ul></HTML>

Updating an existing package

First thing you need to do is to update the PKGBUILD of the application you are updating. Usually this is as simple as checking the CCR or AUR for a newer version of that package. Once you've found an update, just port it over and test it.

In the case of Firefox Addons, it's not difficult either; Check for a newer version at Firefox's addon site.

When working with PKGBUILDS:

  • Change the variable to its new version, or increase the variable if you are rebuilding the same version of the package (i.e. with an additional patch).
  • Update the (if sources changed). You need to run to do that, and should then move the new md5sum to its right position, after the source variable.

Then you can follow the steps to add a new package, just skipping the first one (build package creation).

Delete a package

To delete a package or group of packages from a repository, run:

remove.sh package_name

Move a package

To move a package or group of packages from a repository to another, run:

move.sh package_name target_repo

Maintenance

Update

Don't forget to run the update script from time to time:

cd buildroot

./update-buildsystem.sh

Category:Cherimoya

Print/export