Chakra Community Repository

Chakra Community Repository

From The Chakra Project

Jump to: navigation, search

Contents

Chakra Community Repository (CCR)
Community-driven (unsupported) repository for Chakra users. It contains build packages, files that allow users to compile a package from source with just one command. The Chakra Community Repository was created to organize and share build packages from the community for packages not in the official repositories and to help expedite popular packages' inclusion into either [platform] or [apps] repositories.

Users can search and download build packages from the CCR. These build packages contain different files (a PKGBUILD at least) that, once extracted from the build package, automate the process of creating installable packages from source code, using Makepkg. Those packages can later be installed using either pacman (command-line) or Cinstall (graphical).

In the Chakra Community Repository website you can get information about new and updated build packages.

History

The Chakra Community Repository is a modified version of the Arch Linux's AUR frontend made by the Arch developers. It was adapted to fit Chakra needs.

Searching

Currently package search in CCR works as it does in the original Arch Linux's AUR: searches package names and descriptions via a MySQL LIKE comparison. This reads white spaces as so, so if you look for "video editor", you won't find all descriptions and package names with those two words, but instead you will get descriptions containing those exact words, "video editor". You can avoid this behavior replacing white spaces with '%', but you should have in mind that words will be searched also in that order. So, looking for "video%editor" or "editor%video" will give you different results.

This will be improved in the near future, though.

There's also an interface suitable for accessing the CCR from scripts or similar. You can find it in http://www.chakra-project.org/ccr/rpc.php.

Installation

Installing packages from the CCR is a relatively simple process. Essentially:

  1. Acquire a build package.
  2. Extract the content and move into the extracted folder (containing a PKGBUILD file and maybe others).
  3. Run makepkg in that folder (makepkg -s will auto-resolve dependencies).
  4. Install the resulting package.

You can also use the ccr to retrieve packages from the Chakra Community Repository and auto-resolve their dependencies. It mostly works like pacman.

The steps to install a package from the Chakra Community Repository are explained below in detail:

Prerequisites

First ensure that the necessary tools are installed. You must first make sure you have the base-devel group of packages installed, since CCR build packages assume it to be installed and because of that it will not be listed in any PKGBUILD. Also, packages in that group should be sufficient to compile most PKGBUILD files; it includes make and other tools needed to compile from source.

sudo pacman -Sy base-devel

Acquiring Build Files

Locate the build package in the CCR. This is done using the search feature (text field at the top of the CCR website). Clicking on the build package's name in the search list brings up an information page on the build package. Read through the description to confirm that this is the desired one, note when the build package was last updated, and read any comments.

Download the build package by clicking the "Tarball" link on the left-hand side near the end of the package details. Download it somewhere in your system, and go there. Left-click on the archive and press "Extract Archive Here". A new folder should appear, and you can now delete the archive.

Building

Now get into the folder you've just extracted (which should be named after the build package), either through the terminal or through the file manager. If you used the file manager, open now Yakuake (F12 by default or any other terminal).

Warning: Carefully check all files. Carefully check the PKGBUILD and any .install file for malicious commands. If in doubt, do not build the package and seek advice on the forums or mailing list.

Now make the package. After manually confirming the integrity of the files, run makepkg as a normal user in the build directory.

$ makepkg -s

The -s switch will use sudo to install any needed dependencies. If the use of sudo is undesirable, manually install required dependencies beforehand and exclude the -s in the above command.

Now you should see the compilation process begin, and once it is all done, a .pkg.tar.xz file should appear in the build directory. If it didn't because there was a problem during the compilation process, you should check the comments in the build package information page in the CCR, and maybe post there your problem.

Installing Packages

If the build was successful, install the package using either pacman or Cinstall. Clicking on the package will run Cinstall, while you can do it with pacman this way:

$ sudo pacman -U <package file>

Removal

To remove a package that was installed from the CCR, you can use either Pacman or Cinstall. With pacman, you just need to run:

sudo pacman -R <package>

If you want a list of the packages you installed from the CCR (actually the packages which are not in the official repositories), you can run this script:

#! /bin/bash
installed=`pacman -Q | sed -e "s|\(.*[^ ]*\) .*|\1|g" `
repos=`pacman -Sl | sed -e "s|[^ ]* \(.*[^ ]*\) .*|\1|g"`
 
for pkg in $installed
do
    found=`echo $repos | grep $pkg`
    if [ "$found" == "" ]; then
        echo $pkg
    fi
done
# end

Save it in a file, give it execution permission (chmod +x file.sh) and run it:

./file.sh

It will print the packages you have installed which are not in the official repositories. You can also send the list to a text file:

./file.sh > ccrlist.txt

Then, you can edit the list (to remove from it the software you still want in your system), and once the list has only software packages you want to remove, you can run this command to remove those:

sudo pacman -R $(cat ccrlist.txt)

Contributing Build Packages

The user plays an essential role in the CCR, which cannot fulfill its potential without the support, involvement, and contribution of the wider user community. The life-cycle of a CCR package starts and ends with the user and requires the user to contribute in several ways.

Users can share build packages using the CCR. The repository does not contain any binary packages but allows users to upload build packages with a PKGBUILD file and other text files that can be downloaded by other users. These build packages are completely unofficial and have not been thoroughly vetted, so they should be used at your own risk.

Uploading Packages

After logging in to the CCR website, an user can submit a .tar.gz archive of a directory containing build files for a package. The directory inside the tarball should contain a PKGBUILD, and any .install files, patches, etc. (ABSOLUTELY no binaries).

From the folder containing the build files, the archive can be created with the following command:

$ makepkg --source

General Rules

When submitting a build package, observe the following rules:

  • Check the Chakra Repositories for the package first. If it is inside any of those repositories in any form, do not submit the build package (if the current package is broken or is lacking any included feature then please file a bug report).
  • Check the CCR for the build package. If it is currently maintained, changes can be submitted in a comment for the maintainer's attention. If it is unmaintained, the package can be adopted and updated as required.
  • Verify carefully that what you are uploading is correct. All contributors must read and adhere to the Chakra Packaging Standards when writing build packages. This is essential to the smooth running and general success of the CCR. Remember you are not going to earn any credit or respect from your peers by wasting their time with a bad build package.
  • Build packages that contain binaries or that are very poorly written may be deleted without warning.
  • If you are unsure about the package (or the build/submission process) in any way, submit the build package to the CCR Mailing List for public review before adding it to the CCR.
  • Gain some experience before submitting build packages. Build a few packages to learn the process and then submit.
  • If you submit a package.tar.gz with a file named 'package' in it you'll get a an error: 'Could not change to directory /home/aur/unsupported/package/package'. To resolve this, rename the file named 'package' to something else, for example, 'package.rc'. When it is installed in the pkg directory you may rename it back to 'package'.

Feedback

A comments facility allows users to provide suggestions and feedback on improvements to the build package maintainer. Avoid pasting patches, PKGBUILD or similar files into the comments section. They quickly become obsolete and just end up needlessly taking up lots of space. Instead, email those files to the maintainer, or even use a pastebin website.

One of the easiest activities for all Chakra users is to browse the CCR and vote for their favorite packages using the online interface. The vote count is one of the considerations the Chakra Apps team take into account when choosing a package to get into the official repositories. It is in everyone's interest to vote!

Maintaining Build Packages

  • If you maintain a build package and want to update any of its files just resubmit it.
  • You might want to be aware of new upstream releases to upgrade the build package. Look for a feed you can follow: SourceForge downloads, development blog entries, etc. If there's none, you can always get a feed of the page where new releases are published generated with http://page2rss.com or any similar service.
  • Check for feedback and comments from other users and try to incorporate any improvements they suggest; consider it a learning process!
  • Please do not just submit and forget about build packages! While in the CCR, it is the user's job to maintain the build package by checking for updates and improving it.
  • If you do not want to continue to maintain the build package for some reason, "disown" it through the CCR website and/or post a message to the CCR Mailing List.

From CCR to Chakra Repositories

Build packages uploaded to the CCR by the community might eventually be chosen by the Chakra Apps team, and then compiled and added to the official repositories[1]. The community has the ability to vote for build packages in the CCR. If a build package becomes popular enough and meets the official repositories' requirements, it may be entered in either the [platform] (dependencies) or the [apps] (applications) repositories.

Requirements to enter the Chakra Repositories

To enter the official repositories, a package must meet this requirements:

  • Have a compatible license.
  • Packages with a good technique.
  • Don't depend, either directly or indirectly, on GTK libraries.

Notes

  1. Posted by Manuel Tortosa in the Chakra Forums on September 16, 2010.

See Also


Applications-engineering.pngHow to create packages
Learn all you need to know to create build packages, and build them into final packages.

ccr
Tool to compile packages from the Chakra Community Repository.

Applications-education-university.pngTrusted User Guidelines
A Trusted User (TU) is a member of the community charged with keeping the CCR in working order.

Kmail.pngMailing List
This is the mailing list for the CCR. You can ask questions about packaging, guidelines, etc.