Debian-team

From PostgreSQL_wiki
Revision as of 22:15, 8 October 2013 by Martin (talk | contribs) (Git repositories)
Jump to: navigation, search

Provisional page for the CFEngine Debian-team

Eventually we would like it to all be on github, but a start is a start. We will copy the content to github any suitable moment.

Mission Statement

To produce a high quality, current, Debian native CFEngine package suitable for inclusion directly in Debian stable release.

Git repositories

Both repositories contain the same release.

git://git.debian.org/git/collab-maint/cfengine3.git
git://anonscm.debian.org/collab-maint/cfengine3.git

We are in the process of merging the existing Debian code with the code of CFengine 3.5.2. We have to determine whether it is still useful to do the merge because of the extent of the changes to the code, in fact we skipped CFengine versions 3.1 thru 3.4. It might be beyond the point where it adds to the process if we add CFengine 3.5 to this repository.

We aim at building a current CFengine release for Debian stable, but it would be helpful to the process if we decide to have a testing branch, or daily build branch, as well. We would add newer versions to the Debian repository each time CFengine releases a version we want to Debianize. Having this approach would prevent us to be in the lagging position like we are now.

Debian-team repository

The Debian-team agree on using a github repository to support our development process. We will develop the github way thus developers create branches themselves and the Debian-team decide on the merge process.

https://github.com/Webhuis/Cfengine-debian/

A clone is obtained with:

user@host:~$ git clone https://github.com/Webhuis/Cfengine-debian.git

The Debian-team decided to follow the Debian maintainers'wish that we separate the debian directory from the Cfengine source code and to merge the two branches in a tar ball when a build is required, like this:

  debian      Split debian orig and create NMU branch                                      September 24, 2013 
  masterfiles  Moved content masterfiles branch into masterfiles directory in that branch  October 1st, 2013 
  orig        imported 3.5.2 code                                                          September 22, 2013 

We are tracking our issues here: https://github.com/Webhuis/Cfengine-debian/issues?state=open

Decissions made

Starting point

The starting point seems so have been moving. At the start (20130728) of the Debian-team initiative the offical Cfengine Debian stable release was related to CFengine 3.0.5. Recently a new version was introduced, Cfengine3 3.2.4-2+nmu1, this is a Non Maintainer Upload.
The official Debian point of view with regards to NMU is:
A non-maintainer upload (NMU) is an upload of a package to the debian archive by a developer who is not the maintainer of the package. This should usually not be the case, but in special cases (such as for RC bugs, when the maintainer does not respond to the bug report) it is allowed. See Non Maitainer Upload.

Integrating 3.5.2

CFengine is at 3.5.2 these days and has major changes and improvements with regards to stability and functionailty. We the Debian-team decided to build the native CFengine 3.5.2 Debian stable Wheezy package and are still looking for ways with the Debian maintainer.
The Cfengine project have been working very hard and a lot has changed in the code. There is a huge delta between the two lines of code, 3.2.4-2+nmu1 and 3.5.2.
One of our first goals is the integration of the new code line into the main line.

Process

This is the break down of the integration process:

  • Create a 3.2.4-2-NMU1 branch
  • Update changelog and copyright files, leave debian/source/local-options
  • Relocate the source files
  • Copy 3.5.2 sources file over the relocated 3.2.4-2+NMU1 source files

3.2.4-2+NMU1

The script carries out the following tasks

  • Separate orig and debian branches
  • Move orig code to the orig branch
#!/bin/bash
#
# First step to integrated Cfengine 3.5.2 in debian
#
# To be carried out in the top level git directory
#
#       Create the NMU branch

git branch 3.2.4-2+nmu1

#       Make NMU current

git checkout 3.2.4-2+nmu1

#       First apply the NMU fix
#       Whereas ${1} is the debian directory in the cfengine3_3.2.4-2+nmu1 source,
#       and ${2} is the debian directory in de git repository

cp -p ${1}copyright ${2}/debian/
cp -p ${1}changelog ${2}/debian/

mkdir orig

git mv aclocal.m4 orig
git mv AUTHORS orig
git mv autogen.sh orig
git mv ChangeLog orig
git mv config.guess orig
git mv config.sub orig
git mv configure.ac orig
git mv configure orig
git mv depcomp orig
git mv docs orig
git mv examples orig
git mv INSTALL orig
git mv install-sh orig
git mv LICENSE orig
git mv ltmain.sh orig
git mv m4 orig
git mv Makefile.am orig
git mv Makefile.in orig
git mv masterfiles orig
git mv missing orig
git mv pub orig
git mv README orig
git mv src orig
git mv tests orig
git mv ylwrap orig

Proposed update of changelog in debian:

cfengine3 (3.2.4-2+NMU1 git) unstable; urgency=low

  * Branch 3.2.4-2+NMU1
  * Put NMU updates in debian directory, left debian/source/local-options
  * Separated debian from orig
  * Upload to central repository

Merging NMU
#!/bin/bash

#       Back to master branch

git checkout master

#       Merge NMU into master

git merge 3.2.4-2+nmu1

#       Commit the NMU branch

git commit -am "Merge 3.2.4-2+NMU1 into master"

#       Push the NMU branch

# git push origin master

The push is commented out, it will not pass unless a trick is played. Checkout a branch on the master and then push the master from the client. Switch back to master after the push.

Intermediate repository

The Debian-team are looking for a way to set up a code review process pre-pushing. The best option is to have a Debian process for this, if not we will work out a flow using github.
In the mean time we need an intermediate solution in order to get to a 3.5.2 starting point. The Debian-team have access by LDAP authentication for http.

Useful links

Patching

The Cfengine 3.2.4-2+nmu1 release contains the following patches in this sequence defined by the series file:

  • remove-man-errors.patch
  • fhs-compliance.patch
  • fix-examples-paths.patch
  • 626647-kfreebsd-support.patch

The package needs to be patched predominantly for reasons of compliancy with Debian policies and standards.

Building the package

The cfengie source package comes in a tar ball, cfengine-3.5.2.tar.gz. Issue the following commands to start the build proces:

martin@wbhs-pkg:/usr/local/src$ tar xzf cfengine-3.5.2.tar.gz
martin@wbhs-pkg:/usr/local/src$ cd $ cfengine-3.5.2
martin@wbhs-pkg:/usr/local/src/cfengine-3.5.2$ dh_make -f ../cfengine-3.5.2.tar.gz -r -c gpl2 -e "Martin Simons martin@webhuis.nl"
martin@wbhs-pkg:/usr/local/src/cfengine-3.5.2$ cp -p /home/martin/development/cfengine3/debian/patches debian/
martin@wbhs-pkg:/usr/local/src/cfengine-3.5.2$ dpkg-buildpackage -rfakeroot -uc -us

Cfengine planning

Cfengine is developing quite rapidly these days. The Masterfiles now are an integral part of the installation, as of version 3.6 we will see a split of the Masterfiles with regards to the core system. Cfengine 3.6 is due end of 2013.

Plan

  • preconditions
  • scope
  • risks
  • gouvernance
  • relationships to the commercial edtion and third party solutions
  • Planning and milestones to be obeserved

tenants

  • As much as possible cfengine-core should support Debian natively
    • Prefer patching cfengine rather than Debian
    • Use IFDEF where necessary
  • Strictly adhere to Debian packaging policies
    • Debian FHS layout

Creating a buildable debian package should be as easy as obtaining the cfengine source and dropping in the debian directory.

      • Notable directory relocations:
        • /var/log/cfagent.NODENAME.log and /var/log/cf3.HOSTNAME.runlog
        • /var/run/COMPONENT for PID files
        • all the examples should point to $(sys.inputdir) and $(sys.masterdir) and so on
        • executables under /usr/sbin (need to adjust sys.bindir)
        • sys.masterdir = /var/lib/cfengine3/masterfiles
        • sys.inputdir = /etc/cfengine3
        • links: etc/cfengine3 var/lib/cfengine3/inputs and usr/sbin var/lib/cfengine3/bin
        • configure line:
                             ./configure --enable-shared=no \
                               --without-nova \
                               --without-constellation \
                               --prefix=/usr \
                               --with-sql=yes \
                               --with-workdir=/var/lib/cfengine3 \
                               --mandir=\$${prefix}/share/man \
                               --infodir=\$${prefix}/share/info \
                               --htmldir=\$${prefix}/share/doc/cfengine3/html \
                               CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
      • daemons not started on install, need to edit /etc/default/cfengine3



Terug naar: Cfengine