This site is a static archive of the Aegir community site. Documentation has moved to http://docs.aegirproject.org. Other community resources can be found on the Contacting the community page.
Skip navigation

Revision of Building and working with the debian packages from Sat, 07/20/2013 - 02:20

Help

Building and working with the debian packages

Tagged:

Debian is one of the main supported operating systems in Aegir. For other systems, see Operating System Support. See also the following instructions:

The following is aimed at developers wishing to maintain their own Debian packages or work within the packaging framework.

1. Basic requirements

You need the following packages to build the Aegir Debian packages:

apt-get install devscripts git-buildpackage

See also the section below on Adding a new uploader.

2. Building a package for a new release

Assuming we have just released 2.0-alpha2, those instructions will merge that code into the upstream branch (which is used to create the Debian diff) and then merged again in the debian branch (where the Debian code lives). We then use git-buildpackage to build the package and tag it, then push those changes back in the repository.

cd provision
git pull
(if you previously ran release.sh)
git reset --hard 6.x-2.0-rc1
(otherwise run this next line)
dch -v 2.0~alpha2 -D unstable new upstream release
git-buildpackage -kanarcat@koumbit.org
dput aegir ../build-area/aegir-provision_2.0~alpha2_i386.changes

Note: notice how the version number is slightly different in Debian - we use the "magic" ~ separator to indicate that 2.0~alpha2 is actually lower than 2.0...

The packages are initially uploaded to the "unstable" repository for initial test builds. The idea is that this final package can be moved to "testing" for broader testing, using the command:

sudo -i -u reprepro reprepro pull testing

When confirmed as ready, it is migrated to the stable repository, using the command:

sudo -i -u reprepro reprepro pull stable

3. Building a branch package

Sometimes you want to have a test package for a given branch without going through a full release. Here how it's done.

git checkout debian
git merge 6.x-1.x
git describe
dch -v 1.0~rc3+28-1
git-buildpackage --git-tag -kanarcat@koumbit.org

This is also available in the Debian package as:

./debian/rules jenkins-build-auto

4. Installing packages manually

dpkg -i aegir-provision_1.0~rc3+g6632e6e-1_all.deb

We also make sure our custom makefile fetches the right one from provision:

-includes[aegir] = "http://drupalcode.org/project/provision.git/blob_plain/6.x-1.0-rc3:/aegir.make"
+includes[aegir] = "http://drupalcode.org/project/provision.git/blob_plain/6.x-1.x:/aegir.make"

5. Developing on Debian

To develop third party extensions to Aegir on Debian, it is recommended to install the Debian packages. If you are working on Aegir core, this could be a bit trickier since the files are not where you expect them to be and are not deployed as git repositories however.

You can, however, copy in place a .git directory using the following:

git clone --branch=6.x-1.0-rc7 http://git.drupal.org/project/provision
cp
-Rp provision/.git /usr/share/drush/commands/provision/.git
cd /usr/share/drush/commands/provision
git stash

This will bring back a bunch of files that are removed from the Debian package, so it will yield warnings on uninstall of the Debian package but it should otherwise work.

You can do something similar with the frontend.

6. Package versioning

The stable repository should contain the latest release. The testing repository will also contain the latest release (unless we're in the process of building a release) but could have fixes to the Debian package that are being tested. The unstable repository is automatically built from the stable branch and may be broken.

To see what changes are done to the Debian package, see the debian/changelog which is maintained on the debian branch. To see which version of the package is currently available in the repository, you will unfortunately need to parse the Packages file for unstable, testing or stable.

7. Adding a new uploader

To enable a new maintainer to upload to the Debian repository at debian.aegirproject.org, something like the following steps will have to be followed:

Create a ~/.dput.cfg with the following entry:

# See /etc/dput.cf for examples
[aegir]
login     = *
# login     = another_username
fqdn      = debian.aegirproject.org
method      = scp
incoming    = ~reprepro/incoming

Next, GPG keys will have to be authorized to upload to the repository:

sudo -u reprepro -i
gpg --search-keys foo@bar.com
gpg --fingerprint foo@bar.com ; gpg --check-sigs foo@bar.com # check if this is the real key
echo allow * by key 1234ABCD >> /srv/reprepro/conf/uploaders

8. How the archive was built

The following documentation was used: https://wiki.koumbit.net/RepreproConfiguration

Need help?

Documentation

The notebook section provides a way for you to store and share information with your group members. With the book feature you can:

  • Add book pages and organize them hierarchically into different books.
  • Attach files to pages to share them with others.
  • Track changes that others have made and revert changes as necessary.
  • Archive books that are no longer of interest to the group. Archived books can be reactivated later if needed.

The revisions let you track differences between multiple versions of a post.