release

Explain the release process

Tag

Tagging must be done before building. This is to have complete informations in /etc/freepto/
when tagging, you should use this schema: v${VERSION}${modifier}

where version contains exactly two dots. That is, 1.0.0 is good, while 1.0 is not good.

modifier can be one of:

  • beta, alpha, rc PLUS a mandatory number.
  • stable which which must not have a number following it.

Good Examples:

  • v1.0.0stable
  • v1.0.0alpha2
  • v0.1.3rc4

Bad examples:

  • v1.0stable
  • v1.0.0stable1
  • v1.0.0alpha

How to tag

  • ensure you are on the proper commit. This typically is the tip of the r-$release branch (such as r-berenjena r-chips etc)
  • git tag -s $tagname so sth like git tag -s v1.0.1rc1

Build

Build with gitbuild.sh, remembering to pass the RELEASE=1 environment variable.
If you are using sudo, it should be something like this:

RELEASE=1 sudo -E build-multi-version v1.0.1stable  /etc/freepto-confs/*.conf

where of course v1.0.1stable should be the tag you want to build

Sign

Signature is the sha512sum, gpg-clearsigned.

From a machine where you keep the gpg key you should do

$ VERSION=1.1.0stable; for localization in Asturiano Castellano Catalano English Euskera Gallego Greek Italiano; do VARIANT=$localization; scp friggipizza:/var/www/dev/freepto-v${VERSION}/freepto-v${VERSION}_${VARIANT}/freepto-v${VERSION}_${VARIANT}.img.sha512sum.txt .; done

$ VERSION=1.1.0stable; for localization in Asturiano Castellano Catalano English Euskera Gallego Greek Italiano; do VARIANT=$localization; gpg -b --clearsign freepto-v${VERSION}_${VARIANT}.img.sha512sum.txt; done

$ VERSION=1.1.0stable; for localization in Asturiano Castellano Catalano English Euskera Gallego Greek Italiano; do VARIANT=$localization; scp freepto-v${VERSION}_${VARIANT}.img.sha512sum.txt.asc friggipizza:/var/www/dev/freepto-v${VERSION}/freepto-v${VERSION}_${VARIANT}; done

Publish

On friggipizza.freepto.mx:

mv "/var/www/dev/freepto-v${VERSION}" "/var/releases"

Then, rsync should be run on mirrors (which is probably in cron)

Update the repository

During the building process, a new repository will be generated with the deb packages created from the configured submodules (see here and the script)
This should be then published:

1. gitbuildrepo

This is the command used to create a new repo, you should provide a commit reference as argument (you will need our gpg passphrase in order to sign the new repo)

$ sudo -u builder gitbuildrepo
/usr/local/bin/gitbuildrepo REF

2. test the new repo

In order to test the repo you can use the following command:

# sync_repository showall
freepto_113553
freepto_berenjena_113553
freepto_berenjena_de4650

# sync_repository testsync freepto_113553

This command will publish the repo freepto_113553 on dev.freepto.mx, so you will be able to test it.

3. sync_repository

After the repo has been tested, you should sync it on our public web server:

# sync_repository sync reponame
# sync_repository showall

  • the showall option show all available repository sorted by date.
  • the sync option sync the repo to our public web server (/var/www/freepto/deb.freepto.mx/htdocs/freeptorepo/)

Troubleshooting

one gitbuildrepo fails, the next won’t event start

gitbuildrepo assumes that the repo does not exist. If you run it and for some reason it fails, next run will immediately fails because the repo is still present.

Therefore you need to remove a repo from aptly: these are the command you need:

sudo -u builder aptly snapshot drop snap_berenjena_$COMMIT
sudo -u builder aptly repo drop berenjena_$COMMIT

where of course $COMMIT is the commit hash.

if the repo has been already published with aptly and synched to dev.freepto.mx for testing, you will need also:

$ sudo -u builder aptly publish list
Published repositories:
  * freepto_berenjena_113553/berenjena [i386, source] publishes {main: [snap_berenjena_113553]: Snapshot from local repo [berenjena_113553]}
  * freepto_berenjena_4d78a2/berenjena [i386, source] publishes {main: [snap_berenjena_4d78a2]: Snapshot from local repo [berenjena_4d78a2]}
  * freepto_berenjena_a2407f/berenjena [i386, source] publishes {main: [snap_berenjena_a2407f]: Snapshot from local repo [berenjena_a2407f]}
  * freepto_berenjena_d3aabd/berenjena [i386, source] publishes {main: [snap_berenjena_d3aabd]: Snapshot from local repo [berenjena_d3aabd]}
  * freepto_berenjena_de4650/berenjena [i386, source] publishes {main: [snap_berenjena_de4650]: Snapshot from local repo [berenjena_de4650]}

$ sudo -u builder aptly publish drop berenjena freepto_berenjena_d3aabd
Removing /home/builder/.aptly/public/freepto_berenjena_d3aabd/dists...
Removing /home/builder/.aptly/public/freepto_berenjena_d3aabd/pool...

Published repository has been removed successfully.