[Pkg-voip-commits] r9753 - in /tools/builder: Makefile builder local_distributions

tzafrir at alioth.debian.org tzafrir at alioth.debian.org
Thu May 31 08:29:06 UTC 2012


Author: tzafrir
Date: Thu May 31 08:29:05 2012
New Revision: 9753

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=9753
Log:
builder: cowbuilder support

* Use cowbuilder.
  - Plain pbuilder still supported.
* Sign the local distribution.

Modified:
    tools/builder/Makefile
    tools/builder/builder
    tools/builder/local_distributions

Modified: tools/builder/Makefile
URL: http://svn.debian.org/wsvn/pkg-voip/tools/builder/Makefile?rev=9753&op=diff
==============================================================================
--- tools/builder/Makefile (original)
+++ tools/builder/Makefile Thu May 31 08:29:05 2012
@@ -48,10 +48,12 @@
 
 MIRROR_HTTP		= http://ftp.de.debian.org/debian
 PBUILDER_CMD		= sudo pbuilder
+COWBUILDER_CMD		= sudo cowbuilder
 BUILDER			= ./builder
 
 PBUILDER_DEBUG		=
 BUILDROOT_TGZ		= $(LOCAL_REPO)/buildroot.tgz
+BUILDROOT_IMG		= $(LOCAL_REPO)/buildroot.cow
 export PBUILDER_PARAMS	= --configfile $(PWD)/$(PBUILDERRC) $(PBUILDER_DEBUG)
 # /home is bind-mounted in our current pbuilder configuration
 # thus files from it are also availble inside the chroot builder.
@@ -66,6 +68,15 @@
 PACKAGE_DIR		= package
 DEST_PACKAGES_LISTS	= $(PACKAGE_LISTS:%=$(PACKAGE_DIR)/packages_%)
 PACKAGE_CONFIGS		= $(DEST_PACKAGES_LISTS) $(PACKAGE_DIR)/versions
+
+LOCAL_KEYRING		= $(PWD)/autobuild.pgp
+
+# Sign the local repository with this key:
+# Should be passwordless.
+# Takes effect when the local repository is generation time.
+# To change this later on, edit/remove SignWith in conf/distribution
+#SIGNKEY		= default
+export SIGNKEY			= 5F2DC060
 
 all: help
 
@@ -134,15 +145,23 @@
 	touch $@
 
 $(BUILDROOT_TGZ): $(PBUILDERRC) $(LOCAL_REPO)/stamp
-	$(PBUILDER_CMD) create --debootstrapopts --arch=$(ARCH) $(PBUILDER_PARAMS)
+	$(PBUILDER_CMD)   --create --architecture=$(ARCH) $(PBUILDER_PARAMS)
+$(BUILDROOT_IMG): $(PBUILDERRC) $(LOCAL_REPO)/stamp
+	$(COWBUILDER_CMD) --create --architecture=$(ARCH) $(PBUILDER_PARAMS)
 
 update_buildroot: $(BUILDROOT_TGZ)
-	$(PBUILDER_CMD) update $(PBUILDER_PARAMS)
+	$(PBUILDER_CMD) --update $(PBUILDER_PARAMS)
+
+update_buildimg: $(BUILDROOT_IMG)
+	$(COWBUILDER_CMD) --update $(PBUILDER_PARAMS)
 
 pbuilder_login: $(BUILDROOT_TGZ)
-	$(PBUILDER_CMD) login $(PBUILDER_PARAMS)
+	$(PBUILDER_CMD) --login $(PBUILDER_PARAMS)
 
 build_sources: $(BUILDROOT_TGZ) tarballs_dir
+	USE_PBUILDER=yes $(BUILDER) $(PACKS)
+
+build_cow: $(BUILDROOT_IMG) tarballs_dir
 	USE_PBUILDER=yes $(BUILDER) $(PACKS)
 
 build_repo: localrepo tarballs_dir
@@ -164,6 +183,8 @@
 	#TODO: make this a templated file
 	echo '# generated file.Do not edit. Edit Makefile instead' >$@
 	echo BASETGZ=$(BUILDROOT_TGZ)          >>$@
+	echo BASEPATH=$(BUILDROOT_IMG)         >>$@
+	echo PDEBUILD_PBUILDER=cowbuilder      >>$@
 	echo BINDMOUNTS=$(LOCAL_REPO)          >>$@
 	echo DISTRIBUTION=$(DISTRO)            >>$@
 	echo MIRRORSITE=$(MIRROR_HTTP)         >>$@
@@ -171,6 +192,7 @@
 	echo DEBBUILDOPTS=\"-sa -uc -us\"      >>$@
 	echo HOOKDIR=\"$(PWD)/hooks\"    >>$@
 	echo PKGNAME_LOGFILE_EXTENTION=_$(ARCH).build >>$@
+	echo APTKEYRINGS\=\($(LOCAL_KEYRING)\)
 
 list:
 	@reprepro -b $(LOCAL_REPO) listfilter $(LOCAL_DISTRO) 'Package'

Modified: tools/builder/builder
URL: http://svn.debian.org/wsvn/pkg-voip/tools/builder/builder?rev=9753&op=diff
==============================================================================
--- tools/builder/builder (original)
+++ tools/builder/builder Thu May 31 08:29:05 2012
@@ -2,12 +2,18 @@
 
 set -e
 
+# FIXME: Woraround for a bug in dh_auto_clean
+export MAKELEVEL=
+
 # For the 'local' repository:
-BASE_URL=http://server/svn/packs
+BASE_URL=http://boole/svn/debs/components
 
 # we keep a place (on shared NFS) where all the tarballs are saved.
 # may be a useful optimization
 BUILD_AREA=build-area
+
+SVN_TOP="svn://anonscm.debian.org/svn/pkg-voip"
+#SVN_TOP="svn+ssh://alioth/svn/pkg-voip"
 
 # Variables set in the Makefile:
 # PBUILDER_PARAMS
@@ -121,7 +127,7 @@
 
   case "$repo" in
   local)           repo_base=$BASE_URL;;
-  debian-pkg-voip) repo_base=svn://svn.debian.org/pkg-voip;;
+  debian-pkg-voip) repo_base=$SVN_TOP;;
   *) 
     say "Error: unknown repository $repo (package $package). Aborting"
     exit 1
@@ -213,6 +219,7 @@
     debs_base=$svn_checkout_base/debs
     rm -rf $debs_base
     dpkg -x $dummy_deb $debs_base
+    # FIXME: unsigned:
     for deb in $debs_base/usr/lib/dummy-debs/*.deb; do
       $REPREPRO --ignore=wrongdistribution includedeb $LOCAL_DISTRO $deb
     done
@@ -234,6 +241,6 @@
   
   # TODO: update the buildroot after every package built??
   if [ "$USE_PBUILDER" != '' ]; then
-    make update_buildroot
+    make update_buildimg
   fi
 done

Modified: tools/builder/local_distributions
URL: http://svn.debian.org/wsvn/pkg-voip/tools/builder/local_distributions?rev=9753&op=diff
==============================================================================
--- tools/builder/local_distributions (original)
+++ tools/builder/local_distributions Thu May 31 08:29:05 2012
@@ -5,6 +5,7 @@
 # Version: 1.0
 Architectures: @ARCH@ source
 Components: main
+SignWith: @SIGNKEY@
 UDebComponents: main
 Description: pkg-voip team test repository
 Tracking: all includechanges




More information about the Pkg-voip-commits mailing list