Name Last Update
src/debian Loading commit data...
README.md Loading commit data...
hack-danerepo Loading commit data...
make Loading commit data...

Install the environment to build the package

Warning: you can build the package only on Debian Jessie.

These commands should be launched only once:

apt-get update
apt-get install -y git ca-certificates openssl make
git clone "https://git.backbone.education/lafont/xia-packaging"
cd xia-packaging/
./make install_env

In the following, it is assumed that these commands have been already launched.

Build the package with the current version mentioned in the debian/changelog

To build the package with the current version mentioned in the debian/changelog file (ie in its first line), a tag with the same version must exist in the "watch" page of the upstream sources. In this case, you can build the package with :

cd xia-packaging/

# For each build.
./make build

And the package (ie the .deb file) will be in the current directory:

ls -lh

Specific case of the DANE repository

To build the package for the DANE repository, there are particular and historical differences with the official Debian repository (all differences are showed in the ./hack-danerepo script). To build the package for the DANE repository, the only difference is to not use the command ./make build but use instead :

./make build4danerepo

That's all.

Build the package with a version not yet mentioned in the debian/changelog

First, you have to create a new release entry in the debian/changelog file :

# You must set several environment variables.
export EDITOR="vim" # take "nano" if you prefer.
export DEBEMAIL="pascal.fautrero@ac-versailles.fr"
export EMAIL="pascal.fautrero@ac-versailles.fr"
export DEBFULLNAME="Pascal Fautrero"

# Go to the `src/` directory in the git repository.
cd xia-packaging/src/

# Create a new entry in the `debian/changelog` file.
# In this example, `1.0~beta5` is the upstream version
# and `3` is the package revision for this upstream version.
# Of course each version number must increase over time.
# You MUST respect this syntax `<upstream version>-<package revision>`.
dch --newversion '1.0~beta5-3'

When your editor is opened, you can notice the UNRELEASED string in the first line of the debian/changelog file.

After the command above, you can edit the file and append explanations about this new release. When it's finished, you must save and quit your editor. Then, run this command:

dch --release

Now, you can notice that the UNRELEASED string in the first line is replaced by the unstable string. It's OK, save and quit your editor. Now, the package source is ready for a new release. You can commit and push.

After the commit and push, you can build the package:

cd ..
./make build

Put the package in the "DANE" repository

To put the package in the "DANE" repository, you have to be able to make a scp to the private IP of repository@repository.crdp.ac-versailles.fr via a SSH key. Your SSH public key must be put in the file /home/repository/.ssh/authorized_keys of this server:

# To build the package.
cd xia-packaging/ && ./make build

# Of course, you have to use a VPN.
IP='<Private IP of repository.crdp.ac-versailles.fr>'

cat > /tmp/.dput.cf <<EOF
[xia]
fqdn = $IP
login = repository
method = scp
incoming = /var/www/debian/incoming/xia
allow_unsigned_uploads = 1

EOF

# "*" to match the version number.
dput -c /tmp/.dput.cf xia xia_*_amd64.changes

After this last command, you have to wait for 5 minutes approximatively before the package is updated in the APT repository.

Remark: you can upload the package in a different host than the one you built the package. You just need these files:

  • xia_<version>_all.deb
  • xia_<version>_amd64.changes

Put the package in the "mentors" repository

To do that, you must be a maintainer of the package (ie you must be present in the Maintainer field or in the Uploaders field of the src/debian/control file) and you must have a valid ~/.gnupg directory on this current host.

Furthermore, you have to build the package via the command:

# You have to sign the package during the build with your PGP key.
cd xia-packaging/ && ./make build_sign

If you want to upload the package to mentors.debian.net, you can launch these commands:

# You have to sign the package with your GPG key.
cd xia-packaging/ && ./make build_sign

cat > /tmp/.dput.cf <<EOF
[mentors]
fqdn = mentors.debian.net
incoming = /upload
method = http
allow_unsigned_uploads = 0
progress_indicator = 2
# Allow uploads for UNRELEASED packages
allowed_distributions = .*

EOF

dput -c /tmp/.dput.cf mentors xia_*_amd64.changes

Install and test the package quickly

You can install and test the package quickly on Debian Wheezy, Debian Jessie and Ubuntu Trusty Tahr. You just need to launch these commands as root:

wget -q "http://repository.crdp.ac-versailles.fr/crdp.gpg" -O - | apt-key add -
echo "deb http://repository.crdp.ac-versailles.fr/debian xia main" | tee /etc/apt/sources.list.d/xia.list
apt-get update

# If you just want to install Xia but not Inkscape and its Xia plugin:
apt-get install xia

# Or if you want to install Xia with Inkscape and its Xia plugin:
apt-get install --install-suggests xia