[DRE-commits] [pkg-ruby-extras] 01/01: Configure autopkgtest (and lxc networking if needed)

Antonio Terceiro terceiro at moszumanska.debian.org
Fri Mar 4 21:19:28 UTC 2016


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch setup-autopkgtest-lxc
in repository pkg-ruby-extras.

commit f92db6435a55045162dec0a9de8d501326a442b0
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Fri Mar 4 18:15:56 2016 -0300

    Configure autopkgtest (and lxc networking if needed)
---
 setup | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/setup b/setup
index 3e82187..c6c6e49 100755
--- a/setup
+++ b/setup
@@ -11,6 +11,8 @@ sudo apt-get install -qy \
   myrepos \
   quilt \
   sbuild \
+  lxc \
+  debci \
   ""
 
 sudo mkdir -p /root/.gnupg # To work around #792100
@@ -33,3 +35,24 @@ done
 if ! grep -q /var/cache/apt/archives /etc/schroot/sbuild/fstab; then
   sudo sh -c 'echo /var/cache/apt/archives /var/cache/apt/archives none rw,bind 0 0 >>/etc/schroot/sbuild/fstab'
 fi
+
+# configure lxc networking if needed
+if grep -q '^lxc.network.type\s*=\s*empty' /etc/lxc/default.conf; then
+  sudo apt-get install -qy libvirt-clients libvirt-daemon-system
+  if ! (sudo virsh net-list | grep -q default); then
+    sudo virsh net-start default
+    sudo virsh net-autostart default
+  fi
+  sudo sed -i -e '/lxc.network.type/d' /etc/lxc/default.conf
+  sudo tee --append /etc/lxc/default.conf <<EOF
+lxc.network.type = veth
+lxc.network.link = virbr0
+lxc.network.flags = up
+EOF
+  sudo tee /etc/sudoers.d/lxc <<EOF
+%sudo       ALL = NOPASSWD:SETENV: /usr/bin/lxc-*, /usr/bin/timeout
+EOF
+
+fi
+
+sudo debci setup

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/pkg-ruby-extras.git



More information about the Pkg-ruby-extras-commits mailing list