Build Foreman packages for Wheezy

These guys have their packaging effort for Debian online through Git as well. That's definitely cool! and it makes pacakging for Wheezy a breeze.

  1. Clone the foreman-rpms git repo

    apprentice@buildhost:~$ git clone git://github.com/theforeman/foreman-rpms

  2. Build the Foreman-proxy

    apprentice@buildhost:~$ git clone git://github.com/theforeman/smart-proxy.git
    apprentice@buildhost:~$ cd smart-proxy
    apprentice@buildhost:~$ git checkout 9ea6076283d744ba55163ad45e3bacd96a1add72
    apprentice@buildhost:~$ cp -r ../foreman-rpms/debian/squeeze/stable/foreman-proxy ./debian
    apprentice@buildhost:~$ DIST=wheezy pdebuild --debsign-k BCB62767

    [Note]Note

    Creating the package building infrastructure this step needs is beyond the scope of this document. It's easier to use debuild, particularly debuild -us-uc if you don't have such infrastructure. But only do that on an expendable system.

  3. Build Foreman itself

    apprentice@buildhost:~$ git clone git://github.com/theforeman/foreman
    apprentice@buildhost:~$ cd foreman
    apprentice@buildhost:~$ cp -r ../foreman-rpms/debian/squeeze/stable/foreman ./debian
    # ruby-bundler is only in the Foreman repo. Bundler is in Wheezy.
    apprentice@buildhost:~$ sed -i 's/ruby-bundler/bundler/g' debian/control
    apprentice@buildhost:~$ git checkout 1.0-stable
    apprentice@buildhost:~$ DIST=wheezy pdebuild --debsign-k BCB62767
    # This fixes a file-not-found
    apprentice@buildhost:~$ rm debian/docs
    apprentice@buildhost:~$ DIST=wheezy pdebuild --debsign-k BCB62767

  4. Upload the packages

    apprentice@buildhost:~$ dupload --nomail -t foreman-stable-incoming ../lastbuild/wheezy/foreman_1.0.1+debian1_amd64.changes
    apprentice@buildhost:~$ dupload --nomail -t foreman-stable-incoming ../lastbuild/wheezy/foreman-proxy_1.0+debian1_amd64.changes

[Note]Note

The astute reader will have noticed that above it the stable version of Foreman packaged for Wheezy. I did try to install these packages, and the installation broke: uninitialized constant ApplicationHelper::HomeHelper <snip>

So I built packages of the nightly build on Wheezy. That's where we continue below.