Bug fixing XiVO package generation

The version 2.0.11 of packaging-farm was published with bug fixes mostly related to the submission of XiVO packages. The bug fixed were kernel-module ignores SOURCE_MODULE, submit-xivo.sh must reuse tarbal and epoch always triggers submission. The submission script was enhanced to reduce the number of hg pull when examining multiple packages. The skaro build machine was upgraded with the latest version of packaging-farm. The versions of the XiVO packages that were using the old SVN convention were updated.

kernel-module ignores SOURCE_MODULE

When the ROLE=kernel-module is set, the binary packages are built from an existing package containing the sources of a kernel module in a fashion that is suitable for module-assistant to work on. The kernel module to be built is set in the MODULE= variable. If the name of the module and the name of the package containing the sources from which it must be built are the same, module-assistant will guess and retrieve the package from the repository. If the package name is different, it must be set in the SOURCE_MODULE= variable.
When MODULE is different from SOURCE_MODULE, the dependency graph generated by lib/kernel-module/depends.sh will fail to create the dependency to the SOURCE_MODULE package

The dependency was changed from depending on the rule that is used to build the package to the timestamp generated by the build of the package. Using the rule would always recompile the package. Using the timestamp only recompiles of one timestamp is more recent.
The regular expression looking for the MODULE in the Makefile is changed to also look for the SOURCE_MODULE variable. When both are found, their content is used to lookup a source package. If it turns out that both MODULE and SOURCE_MODULE are present and MODULE is the name of a source package, their will be one undesired dependency. However, this is harmless because the worst that can happen is that the kernel modules are rebuilt although they don’t need to.

changeset

submit-xivo.sh must reuse tarbal

When the Debian GNU/Linux package of a XiVO software is improved, the source tarbal must not be rebuilt. Rebuilding the .orig.tar.gz for the exact same directory tree will lead to a different md5sum signature, because of the compression. This is problematic when software building Debian GNU/Linux repositories such as reprepro refuse a submission because they already know of a previous tarbal of the same name but with a different version number.

XiVO formerly had native Debian GNU/Linux packages (i.e. packages where there is no separate source tarbal). It was later decided to not create native Debian GNU/Linux packages but the code that prevented the re-generation of the tarbal was not modified accordingly.
A native package, in the XiVO sense, has no third party code. There is a source tree separate from the debian tree, but both are dedicated to XiVO. In order to simplify the submission script, it was decided to avoid handling Debian GNU/Linux native packages. Even when the source tree is empty, the resulting package is treated as if there was a source tree.
The code is slightly different with regard to the generation of the tarbal because the XiVO native package has a source tree including the name of the software at the root. The third party source tree does not contain this additional hierarchy level.

changeset

reduce the number of hg pull

When running packaging-farm DIRECTORY=a submit ; packaging-farm DIRECTORY=b submit, it does a git fetch twice on the source and debian repositories although one would be enough. When this operations is repeated 30 times only to find that one package must be rebuild, it can take up to 2 minutes.

A timestamp is set after pulling the debian and source repositories. Before pulling, the modification time of the timestamp is checked and if it is found to be more recent than X minutes ago ( GIT_CACHE_MINUTES ), the pull is not done. By default the value of GIT_CACHE_MINUTES is set to zero to preserve the current behavior (i.e. the pull occurs every time).

changeset

epoch always triggers submission

The epoch ( number: prepended to package version as explained in deb-version ) does not show in the .dsc file created by dpkg-buildpackage -S
When submit/submit-xivo.sh looks for the .dsc file matching the package version extracted from the debian changelog, it does not remove the epoch. As a consequence, the package is never found to match and is always submitted.

The epoch is stripped from the version before checking it against an existing .dsc file.

changeset

wanpipe

The wanpipe directory is mentionned in the /var/cache/packaging-farm/skaro/Makefile line that checks for submissions. It is not listed as a package to be build. In order to avoid submitting it to the farm each time a rebuild is required, it was commented out.

epoch change

The migration from svn to git imposed a change in the version numbers. It must be taken into account by incrementing the epoch
in the package version, otherwise the versions will go back in time which is not good for upgrading. The safeguards introduced in
submit-xivo.sh issue an error for each package that has a version going back in time:

The first line of /var/cache/packaging-farm/VCS/debian/squeeze-xivo-skaro/pf-xivo-agid/trunk/debian/changelog is ‘pf-xivo-agid (6:1.2svn10175-2) that is greater or equal (according to dpkg –compare-versions) than the version computed by submit-xivo.sh (6:1.2~20110819.160331.530a224-1)

The first line of /var/cache/packaging-farm/VCS/debian/squeeze-xivo-skaro/libpri/trunk/debian/changelog is ‘libpri (28:1.4.12+pf.xivo.1.220110805.172915.12438dd-1) that is greater or equal (according to dpkg –compare-versions) than the version computed by submit-xivo.sh (28:1.4.12+pf.xivo.1.2~20110707.095210.a65f898-1)

The first line of /var/cache/packaging-farm/VCS/debian/squeeze-xivo-skaro/pf-xivo-base-config/trunk/debian/changelog is ‘pf-xivo-base-config (10:1.2svn10395-3) that is greater or equal (according to dpkg –compare-versions) than the version computed by submit-xivo.sh (10:1.2~20110817.155800.06ea074-1)

The first line of /var/cache/packaging-farm/VCS/debian/squeeze-xivo-skaro/pf-xivo-cti-server/trunk/debian/changelog is ‘pf-xivo-cti-server (26:1.2svn11342-3) that is greater or equal (according to dpkg –compare-versions) than the version computed by submit-xivo.sh (26:1.2~20110819.160331.530a224-1)

The first line of /var/cache/packaging-farm/VCS/debian/squeeze-xivo-skaro/freeswitch/trunk/debian/changelog is ‘freeswitch (1.0.6+pf.xivo.1.2.0svn9780-0) that is greater or equal (according to dpkg –compare-versions) than the version computed by submit-xivo.sh (1.0.6+pf.xivo.1.2~20110308.141044.93b0896-1)

The first line of /var/cache/packaging-farm/VCS/debian/squeeze-xivo-skaro/pf-xivo-lib-js/trunk/debian/changelog is ‘pf-xivo-lib-js (1:1.2svn10977) that is greater or equal (according to dpkg –compare-versions) than the version computed by submit-xivo.sh (1:1.2~20110729.174030.0a57146-1)

The first line of /var/cache/packaging-farm/VCS/debian/squeeze-xivo-skaro/pf-xivo-sysconfd/trunk/debian/changelog is ‘pf-xivo-sysconfd (1.2svn10913-0) that is greater or equal (according to dpkg –compare-versions) than the version computed by submit-xivo.sh (1.2~20110818.192128.9f3d578-1)

The first line of /var/cache/packaging-farm/VCS/debian/squeeze-xivo-skaro/pf-xivo-web-interface/trunk/debian/changelog is ‘pf-xivo-web-interface (7:1.2svn10978-0) that is greater or equal (according to dpkg –compare-versions) than the version computed by submit-xivo.sh (7:1.2~20110819.134415.57c6e08-1)

The first line of /var/cache/packaging-farm/VCS/debian/squeeze-xivo-skaro/pf-xivo-ha/trunk/debian/changelog is ‘pf-xivo-ha (1.2svn10449-2) that is greater or equal (according to dpkg –compare-versions) than the version computed by submit-xivo.sh (1.2~20110816.090747.baf278f-1)

The first line of /var/cache/packaging-farm/VCS/debian/squeeze-xivo-skaro/pf-xivo-fetchfw/trunk/debian/changelog is ‘pf-xivo-fetchfw (3:1.2svn11102-0) that is greater or equal (according to dpkg –compare-versions) than the version computed by submit-xivo.sh (3:1.2~20110704.194720.51b210e-1)

hexanol updated the changelog entry for each software above to reflect the change in the convention, adding to epoch as necessary.