1 [[!meta title="Releasing for Centos"]]
3 Centos packages are built from [[master|branches]]. The procedures roughly works as follows:
5 1. A normal configure; make; make install on Painless Security machines
6 2. If this succeeds then a build is started on Janet machines
8 1. Another round of configure; make; make instal. This round include a make dist to produce distribution tar files.
9 1. Run "rpmbuild -ta" on the distribution tar files.
11 1. Copy the results back to moonshot.suchdamage.org
15 Centos packaging is controlled by a .spec file. In most packages the spec file is produced by a .spec.in file. This controls dependencies, installation procedures, etc.
17 It's important that once a Centos package is placed into the archive it is never changed. So, some component of the version number needs to be incremented whenever a new Centos package is desired.
19 The version number is spread across two fields in the spec file:
21 * Version: the upstream version number
22 * Release: a RPM-specific release number
24 If the spec file is a .spec.in the upstream version number is probably auto-generated from configure. Whenever the upstream version changes the release should be set back to 1.
28 * Update the spec file, either resetting the release for a new upstream version or incrementing it.
29 * Commit the spec file; make sure not to commit a .spec in a package with .spec.in
31 * Commit and push the master repository
32 * Monitor the [build](http://www.project-moonshot.org/buildbot/builders/) until the Centos packaging succeeds
34 # Installing packages in Archive
36 At this point the packages have been copied to a file "~buildbot/rpm-packages.tar" on moonshot.suchdamage.org
38 ssh buildbot@moonshot.suchdamage.org
41 tar xvf ../rpm-packages.tar
43 Confirm the packages look reasonable. Copy only new packages into place. It's quite important not to copy packages whose version number did not change.
45 rsync --ignore-existing -v -a . /srv/rpms/centos6
49 cd /srv/rpms/centos6/RPMS/x86_64
52 Now update repository metadata:
55 createrepo -u http://repository.project-moonshot.org/rpms/centos6 centos6
58 At this point the Centos packages are available for installation. Clearly more automation is desirable.