debian/0000775000000000000000000000000012316526163007175 5ustar debian/source/0000775000000000000000000000000012310040427010461 5ustar debian/source/format0000664000000000000000000000001412310040427011667 0ustar 3.0 (quilt) debian/control0000664000000000000000000000331512310034567010576 0ustar Source: uvtool Section: admin Priority: extra Standards-Version: 3.9.4 Maintainer: Ubuntu Developers Build-Depends: debhelper (>= 7), python-all, python-setuptools, python-mock, python-libvirt, python-lxml, python-pyinotify, python-simplestreams, python-yaml X-Python-Version: >= 2.7 Package: uvtool Architecture: all Depends: ${misc:Depends} Recommends: uvtool-libvirt Description: Library and tools for using Ubuntu Cloud images This package provides tools, utilities and wrappers to make it easy to consume Ubuntu Cloud images. It is intended to support different subsystems such as libvirt and lxc. Use this package to pull in all the separate packages for all supported subsystems. This will configure all supported subsystems with sensible defaults. If you do not want this, consider installing the subsystem packages individually, instead. Package: uvtool-libvirt Architecture: all Depends: libvirt-bin, python-libvirt, python-simplestreams, python-lxml, python-pyinotify, python-yaml, distro-info, cloud-image-utils (>= 0.27), qemu-utils, ubuntu-cloudimage-keyring, socat, ${misc:Depends}, ${python:Depends} Recommends: qemu-kvm, libnss-mdns, cpu-checker Description: Library and tools for using Ubuntu Cloud Images with libvirt This package provides libvirt-specific tools for consuming Ubuntu Cloud images. Since it depends on libvirt-bin, installing this package will also install libvirt which by defaults configures it with a bridge on your system. debian/uvtool-libvirt.install0000664000000000000000000000002612211631442013553 0ustar usr/bin/* usr/share/* debian/rules0000775000000000000000000000051512310034567010252 0ustar #!/usr/bin/make -f %: dh $@ --with python2 override_dh_auto_build: $(MAKE) -C uvtool/tests/streams dh_auto_build PYTHONPATH=$(CURDIR) python -m unittest uvtool.tests.test_kvm PYTHONPATH=$(CURDIR) python -m unittest uvtool.tests.test_simplestreams override_dh_auto_clean: $(MAKE) -C uvtool/tests/streams clean dh_auto_clean debian/uvtool-libvirt.pyinstall0000664000000000000000000000016312310035357014131 0ustar uvtool/__init__.py uvtool/wait.py uvtool/libvirt/__init__.py uvtool/libvirt/kvm.py uvtool/libvirt/simplestreams.py debian/uvtool-libvirt.manpages0000664000000000000000000000000612310037341013674 0ustar man/* debian/uvtool-libvirt.postinst0000664000000000000000000000337612270252175014012 0ustar #!/bin/sh set -e # libvirtd not running seems to be a common error condition during # configuration. Check for this and give the user a more helpful message than a # mysteriously failed uvtool-libvirt.postinst. configure_diagnostic() { if ! socat UNIX-CONNECT:/var/run/libvirt/libvirt-sock - < /dev/null 2>/dev/null; then echo "libvirtd does not appear to be listening on \"/var/run/libvirt/libvirt-sock\"." >&2 echo "On Ubuntu, libvirtd is managed with the \"libvirt-bin\" upstart job." >&2 echo "Repair libvirtd, then reconfigure uvtool-libvirt with:" echo " sudo apt-get -f install" >&2 fi } define_pool() { if ! virsh -q pool-list --all|grep -q '^\s*uvtool\s'; then # Idempotently create virsh pool tmpfile=`mktemp` echo "uvtool/var/lib/uvtool/libvirt/images0700" > "$tmpfile" if ! virsh -q pool-define "$tmpfile"; then rm -f "$tmpfile" echo "Failed to define libvirt pool 'uvtool'" >&2 exit 1 fi rm -f "$tmpfile" fi } start_pool() { # Idempotently start virsh pool if ! virsh -q pool-list|grep -q '^\s*uvtool\s'; then if ! virsh -q pool-start uvtool; then echo "Failed to start libvirt pool 'uvtool'" >&2 exit 1 fi fi } if [ "$1" = configure ]; then trap configure_diagnostic EXIT mkdir -p /var/lib/uvtool/libvirt/images if [ ! -e /var/lib/uvtool/libvirt/metadata ]; then mkdir -pm775 /var/lib/uvtool/libvirt/metadata chown root.libvirtd /var/lib/uvtool/libvirt/metadata fi # Make sure that libvirtd is ready. This is a workaround for LP: #1228210. socat UNIX-CONNECT:/var/run/libvirt/libvirt-sock,retry=15 - < /dev/null define_pool virsh -q pool-autostart uvtool # this is idempotent start_pool fi #DEBHELPER# debian/changelog0000664000000000000000000000706512316526163011057 0ustar uvtool (0~bzr92-0ubuntu1) trusty; urgency=low * New upstream snapshot (bugfixes only): - Fix manpage to reflect correct "create" default. - Correctly handle wait with custom ssh keys (LP: #1287140). -- Robie Basak Tue, 01 Apr 2014 13:07:55 +0100 uvtool (0~bzr90-0ubuntu1) trusty; urgency=low * New upstream snapshot (no new features): - Add missing copyright and licence notices. - Correctly print missing ssh key path when not found. - Add manpages. -- Robie Basak Wed, 12 Mar 2014 11:20:53 +0000 uvtool (0~bzr87-0ubuntu1) trusty; urgency=low * New upstream snapshot: - Suppress spurious terminal output from libvirt API (LP: #1228231). - Add --packages option, drop avahi-daemon default. - Fail wait if the libvirt domain is not running. - Remote wait support (LP: #1245733). - Skip some tests when backported to Ubuntu Precise. - Do not cause backtraces on some standard errors (LP: #1245641). - Add standard Intel architecture features (LP: #1256658). - Default to an ssh key from an agent if available. - Add support for --meta-data passing. - Default to 'ubuntu' login name for ssh (LP: #1280588). - Add yaml and pyinotify build dependencies. - Test for ssh parameter handling. - purge: explicitly specify flags for compatibility (LP: #1248389). - Drop "uvt-kvm import". - Drop experimental CLI warnings. -- Robie Basak Wed, 19 Feb 2014 22:26:29 +0000 uvtool (0~bzr68-0ubuntu1) trusty; urgency=low * New upstream snapshot: - Delete the created volume if the stream write fails. - Handle new "virsh -q pool-list" format. -- Robie Basak Thu, 23 Jan 2014 17:32:25 +0000 uvtool (0~bzr66-0ubuntu1) trusty; urgency=low * New upstream snapshot: - New subcommands: ip, ssh and wait. - Warn about unimplemented boot-finished wait. - Add required dependency python-yaml (LP: #1242383). - New uvt-kvm create options: --run-script-once and --ssh-public-key-file. - New dependency on python-pyinotify. - Diagnose libvirtd failure on postinst failure. - Don't drop model=virtio when specifying bridge. - Fix 'TypeError: not all arguments converted during string formatting' error. - New uvt-simplestreams-libvirt option: --no-authentication. - Do not remove old volumes immediately after sync (LP: #1251296). - Add simplestreams sync tests. - More human-readable "query" command output. -- Robie Basak Thu, 12 Dec 2013 12:08:47 +0000 uvtool (0~bzr42-0ubuntu1) saucy; urgency=low New upstream snapshot: - Add --disk option and default to 8G (LP: #1234830). - Use a constant for the volume pool name. - Add --backing-image-file option. - Add experimental CLI notice. - Depend on cloud-image-utils >= 0.27 (LP: #1236724). - Add purge subcommand to uvt-simplestreams-libvirt (LP: #1234824). -- Robie Basak Tue, 08 Oct 2013 16:53:09 +0100 uvtool (0~bzr36-0ubuntu1) saucy; urgency=low * New upstream snapshot: - Workaround to make sure that libvirtd is running and ready before attempting to create the volume pool (LP: #1228210). + d/uvtool-libvirt-postinst: wait logic. + d/control: add dependency on socat (used by the wait logic). -- Robie Basak Wed, 02 Oct 2013 11:35:06 +0100 uvtool (0~bzr35-0ubuntu1) saucy; urgency=low * Initial release (LP: #1218508). -- Robie Basak Fri, 20 Sep 2013 17:33:54 +0100 debian/compat0000664000000000000000000000000212217072054010366 0ustar 7 debian/uvtool-libvirt.postrm0000664000000000000000000000102112270252175013434 0ustar #!/bin/sh set -e stop_pool() { if virsh -q pool-list|grep -q '^\s*uvtool\s'; then # In the postrm virsh may be gone or deconfigured, so ignore # failures gracefully. virsh -q pool-destroy uvtool || true fi } undefine_pool() { if virsh -q pool-list --all|grep -q '^\s*uvtool\s'; then # In the postrm virsh may be gone or deconfigured, so ignore # failures gracefully. virsh -q pool-undefine uvtool || true fi } if [ "$1" = purge ]; then stop_pool undefine_pool rm -Rf /var/lib/uvtool/libvirt fi #DEBHELPER# debian/uvtool.postrm0000664000000000000000000000013312217072704011765 0ustar #!/bin/sh set -e if [ "$1" = purge ]; then rmdir /var/lib/uvtool || true fi #DEBHELPER# debian/copyright0000664000000000000000000000104612217072054011124 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Contact: Robie Basak Files: * Copyright: 2012-3 Canonical Ltd. License: AGPLv3 GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 . Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. . The complete text of the AGPL version 3 can be seen in http://www.gnu.org/licenses/agpl-3.0.html