On Wed, Sep 21, 2016 at 04:33:07PM +0200, Petter Reinholdtsen wrote:
> [Antonio Terceiro 2016-07-07]
> > debci needs code changes to make the automatically generated testbeds
> > actually include contrib in sources.list. I have the beginnings of
> > that stashed locally, but it's not ready yet. If you want to work on
> > it I can send you the current patch.
> 
> Did you get any further?  As I mentioned earlier, I would love to see
> the current draft.

no; the last state of what I had is attached. it is not tested, and
probably does not work yet.

> We have recently had problems with the zfs packages in Debian (kernel
> version build issues) which I suspect would have been discovered earlier
> if ci.debian.org was running the zfs test. :)

sure, however testing anything other than main is not high on my
priority list, so if you can come up with a tested and working patch it
will make things faster.
diff --git a/backends/lxc/create-testbed b/backends/lxc/create-testbed
index ce307c8..243a2a1 100755
--- a/backends/lxc/create-testbed
+++ b/backends/lxc/create-testbed
@@ -87,9 +87,12 @@ if [ "$distro" = debian ]; then
   else
     buildd_suite="buildd-$debci_suite-proposed-updates"
   fi
+  if ! grep -q contrib "${rootfs}/etc/apt/sources.list"; then
+    sed -i -e 's/main/main contrib/' "${rootfs}/etc/apt/sources.list"
+  fi
   cat > "${rootfs}/etc/apt/sources.list.d/buildd.list" <<EOF
-deb http://incoming.debian.org/debian-buildd $buildd_suite main
-deb-src http://incoming.debian.org/debian-buildd $buildd_suite main
+deb http://incoming.debian.org/debian-buildd $buildd_suite main contrib
+deb-src http://incoming.debian.org/debian-buildd $buildd_suite main contrib
 EOF
   while ! chroot "$rootfs" apt-get update; do
     echo "I: apt-get update failed, let's wait some time and try again "
diff --git a/backends/schroot/create-testbed b/backends/schroot/create-testbed
index fda596e..b26731a 100755
--- a/backends/schroot/create-testbed
+++ b/backends/schroot/create-testbed
@@ -48,6 +48,11 @@ create_chroot() {
   # add APT Source URIs
   sed -e 's/^deb\s/deb-src /' "${debci_chroot_path}/etc/apt/sources.list" > "${debci_chroot_path}/etc/apt/sources.list.d/sources.list"
 
+  # add contrib
+  if ! grep -q contrib "${debci_chroot_path}/etc/apt/sources.list"; then
+    sed -i -e 's/main/main contrib/' "${debci_chroot_path}/etc/apt/sources.list"
+  fi
+
   # FIXME duplicates logic in bin/debci-setup-chdist
   if grep -q debian "${debci_chroot_path}/etc/apt/sources.list"; then
     if [ "$debci_suite" = unstable ]; then
@@ -56,8 +61,8 @@ create_chroot() {
       buildd_suite="buildd-$debci_suite-proposed-updates"
     fi
     cat > "${debci_chroot_path}/etc/apt/sources.list.d/buildd.list" <<EOF
-deb http://incoming.debian.org/debian-buildd $buildd_suite main
-deb-src http://incoming.debian.org/debian-buildd $buildd_suite main
+deb http://incoming.debian.org/debian-buildd $buildd_suite main contrib
+deb-src http://incoming.debian.org/debian-buildd $buildd_suite main contrib
 EOF
   fi
 
diff --git a/bin/debci-setup-chdist b/bin/debci-setup-chdist
index 966d925..80c0383 100755
--- a/bin/debci-setup-chdist
+++ b/bin/debci-setup-chdist
@@ -49,7 +49,7 @@ if [ ! -e "$root/$name" ]; then
 
   # enable all components
   if [ "${DEF_MIRROR%ubuntu*}" = "$DEF_MIRROR" ]; then
-    COMPONENTS="main"  # Debian
+    COMPONENTS="main contrib"  # Debian
   else
     COMPONENTS="main restricted universe multiverse"  # Ubuntu
   fi
@@ -70,8 +70,8 @@ deb-src $mirror $SUITE $COMPONENTS" > "$TARGET/etc/apt/sources.list"
       buildd_suite=buildd-$SUITE-proposed-updates
     fi
     cat >> "$TARGET/etc/apt/sources.list" <<EOF
-deb [arch=${debci_arch}] http://incoming.debian.org/debian-buildd $buildd_suite main
-deb-src http://incoming.debian.org/debian-buildd $buildd_suite main
+deb [arch=${debci_arch}] http://incoming.debian.org/debian-buildd $buildd_suite $COMPONENTS
+deb-src http://incoming.debian.org/debian-buildd $buildd_suite $COMPONENTS
 EOF
   fi
 

Attachment: signature.asc
Description: PGP signature

Reply via email to