X-Git-Url: http://www.project-moonshot.org/gitweb/?p=devwiki.git;a=blobdiff_plain;f=release%2Fcentos.mdwn;fp=release%2Fcentos.mdwn;h=741295313e37f01475e5e9f357a791f661fff25a;hp=0000000000000000000000000000000000000000;hb=1e937a9e401f00d06519d9b33748b35058b1a459;hpb=bafe6badb972f1fc4dd860e8bab5248de6d2257f diff --git a/release/centos.mdwn b/release/centos.mdwn new file mode 100644 index 0000000..7412953 --- /dev/null +++ b/release/centos.mdwn @@ -0,0 +1,59 @@ +[[!meta title="Releasing for Centos"]] + +Centos packages are built from [[master|branches]]. The procedures roughly works as follows: + +1. A normal configure; make; make install on Painless Security machines +2. If this succeeds then a build is started on Janet machines + +1. Another round of configure; make; make instal. This round include a make dist to produce distribution tar files. +1. Run "rpmbuild -ta" on the distribution tar files. + +1. Copy the results back to moonshot.suchdamage.org + +# Spec file + +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. + +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. + +The version number is spread across two fields in the spec file: + +* Version: the upstream version number +* Release: a RPM-specific release number + +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. + +# Steps + +* Update the spec file, either resetting the release for a new upstream version or incrementing it. +* Commit the spec file; make sure not to commit a .spec in a package with .spec.in +* Push the submodule +* Commit and push the master repository +* Monitor the [build](http://www.project-moonshot.org/buildbot/builders/) until the Centos packaging succeeds + +# Installing packages in Archive + +At this point the packages have been copied to a file "~buildbot/rpm-packages.tar" on moonshot.suchdamage.org + + ssh buildbot@moonshot.suchdamage.org + mkdir rpm-unpack + cd rpm-unpack + tar xvf ../rpm-packages.tar + +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. + + rsync --ignore-existing -v -a . /srv/rpms/centos6 + +Sign the packages + + cd /srv/rpms/centos6/RPMS/x86_64 + rpmsign--addsign *rpm + +Now update repository metadata: + + cd /srv/rpms + createrepo -u http://repository.project-moonshot.org/rpms/centos6 centos6 + + +At this point the Centos packages are available for installation. Clearly more automation is desirable. +