[arch-commits] Commit in terraform-provider-libvirt/repos/community-x86_64 (3 files)
David Runge
dvzrv at archlinux.org
Tue Nov 3 16:13:06 UTC 2020
Date: Tuesday, November 3, 2020 @ 16:13:06
Author: dvzrv
Revision: 741174
archrelease: copy trunk to community-x86_64
Added:
terraform-provider-libvirt/repos/community-x86_64/0001-Fix-channel-type-for-qemu-guest-agent.patch
(from rev 741173, terraform-provider-libvirt/trunk/0001-Fix-channel-type-for-qemu-guest-agent.patch)
terraform-provider-libvirt/repos/community-x86_64/PKGBUILD
(from rev 741173, terraform-provider-libvirt/trunk/PKGBUILD)
Deleted:
terraform-provider-libvirt/repos/community-x86_64/PKGBUILD
--------------------------------------------------+
0001-Fix-channel-type-for-qemu-guest-agent.patch | 48 +++++++++
PKGBUILD | 106 +++++++++++----------
2 files changed, 104 insertions(+), 50 deletions(-)
Copied: terraform-provider-libvirt/repos/community-x86_64/0001-Fix-channel-type-for-qemu-guest-agent.patch (from rev 741173, terraform-provider-libvirt/trunk/0001-Fix-channel-type-for-qemu-guest-agent.patch)
===================================================================
--- 0001-Fix-channel-type-for-qemu-guest-agent.patch (rev 0)
+++ 0001-Fix-channel-type-for-qemu-guest-agent.patch 2020-11-03 16:13:06 UTC (rev 741174)
@@ -0,0 +1,48 @@
+From 1aeecb038457c9859c58f1979a8162b1292d2bca Mon Sep 17 00:00:00 2001
+From: David Runge <dave at sleepmap.de>
+Date: Tue, 3 Nov 2020 15:46:57 +0100
+Subject: [PATCH] Fix channel type for qemu-guest-agent
+
+libvirt/domain_def.go:
+A previous refactoring
+(https://github.com/dmacvicar/terraform-provider-libvirt/commit/77982e7e171afb8354915ef286fa025f5ee77506#diff-f2a9373e453b366eb748c5f3ed0da608afbf1a97c876e8c044fea841c8e5aa78L46)
+for integrating a newer version of
+https://github.com/libvirt/libvirt-go-xml unset the explicit setting of
+the channel type (`"unix"`) for qemu-guest-agent integration.
+
+By default libvirt will use a type `"pty"` channel, if none is set,
+which is not supported for the qemu-guest-agent channel
+(https://wiki.libvirt.org/page/Qemu_guest_agent#Setting_QEMU_GA_up).
+This can be seen in the libvirtd logs:
+
+```
+error : qemuAgentOpen:706 : internal error: unable to handle agent type:
+pty
+```
+
+This pull request explicitely sets the correct Source of type `"unix"`
+again (based on the suggestion by @aaannz in
+https://github.com/dmacvicar/terraform-provider-libvirt/issues/710#issuecomment-663007825).
+
+Fixes #765
+---
+ libvirt/domain_def.go | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/libvirt/domain_def.go b/libvirt/domain_def.go
+index f68b7abd..04e55339 100644
+--- a/libvirt/domain_def.go
++++ b/libvirt/domain_def.go
+@@ -62,6 +62,9 @@ func newDomainDef() libvirtxml.Domain {
+ },
+ Channels: []libvirtxml.DomainChannel{
+ {
++ Source: &libvirtxml.DomainChardevSource{
++ UNIX: &libvirtxml.DomainChardevSourceUNIX{},
++ },
+ Target: &libvirtxml.DomainChannelTarget{
+ VirtIO: &libvirtxml.DomainChannelTargetVirtIO{
+ Name: "org.qemu.guest_agent.0",
+--
+2.29.2
+
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2020-11-03 16:12:59 UTC (rev 741173)
+++ PKGBUILD 2020-11-03 16:13:06 UTC (rev 741174)
@@ -1,50 +0,0 @@
-# Maintainer: David Runge <dvzrv at archlinux.org>
-
-pkgname=terraform-provider-libvirt
-pkgver=0.6.2
-pkgrel=2
-pkgdesc="Terraform provider to provision infrastructure with Linux's KVM using libvirt"
-arch=("x86_64")
-url="https://github.com/dmacvicar/terraform-provider-libvirt"
-license=('Apache')
-depends=('glibc' 'terraform')
-makedepends=('go' 'git' 'libvirt')
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/dmacvicar/${pkgname}/archive/v$pkgver.tar.gz")
-sha512sums=('9855fe2d0b7a827508dd41d779f1f160b1d230bf6ee1eeb7ae58418fffbd250899382e315a8ababdf0c89da21c011f874ead1d6f53a723290851e1bc47384c1d')
-b2sums=('ce150963be678dda1a4b11e3707140b7b819b8fe6e01799a769c2da737f6280d7eca64ac704c41426737a3a8432fd8c42f3c4d6c00a14cf291e123c4378842bd')
-
-prepare() {
- cd "${pkgname}-${pkgver}"
- mkdir -vp build
-}
-
-build() {
- cd "${pkgname}-${pkgver}"
- export CGO_CPPFLAGS="${CPPFLAGS}"
- export CGO_CFLAGS="${CFLAGS}"
- export CGO_CXXFLAGS="${CXXFLAGS}"
- export CGO_LDFLAGS="${LDFLAGS}"
- export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
- go build -o "build/${pkgname}"
-}
-
-package() {
- depends+=('libvirt.so' 'libvirt-lxc.so' 'libvirt-qemu.so')
- cd "${pkgname}-${pkgver}"
- # terraform unfortunately only accepts non-FHS compliant directories for plugins :(
- install -vDm 755 "build/$pkgname" \
- "$pkgdir/usr/share/terraform/plugins/registry.terraform.io/dmacvicar/libvirt/${pkgver}/linux_amd64/${pkgname}"
- install -vDm 644 {CHANGELOG,CONTRIBUTING,README}.md -t "${pkgdir}/usr/share/doc/${pkgname}/"
- # examples
- find examples/ -type f \( \
- -iname "*.cfg" -or \
- -iname "*.conf" -or \
- -iname "*.md" -or \
- -iname "*.mount" -or \
- -iname "*.service" -or \
- -iname "*.tf" -or \
- -iname "*.xsl" -or \
- -iname "*id_rsa*" \
- \) -exec install -vDm 644 {} "${pkgdir}/usr/share/doc/${pkgname}/"{} \;
- find website/ -type f -iname "*.markdown" -exec install -vDm 644 {} "${pkgdir}/usr/share/doc/${pkgname}/"{} \;
-}
Copied: terraform-provider-libvirt/repos/community-x86_64/PKGBUILD (from rev 741173, terraform-provider-libvirt/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2020-11-03 16:13:06 UTC (rev 741174)
@@ -0,0 +1,56 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+pkgname=terraform-provider-libvirt
+pkgver=0.6.2
+pkgrel=3
+pkgdesc="Terraform provider to provision infrastructure with Linux's KVM using libvirt"
+arch=("x86_64")
+url="https://github.com/dmacvicar/terraform-provider-libvirt"
+license=('Apache')
+depends=('glibc' 'terraform')
+makedepends=('go' 'git' 'libvirt')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/dmacvicar/${pkgname}/archive/v$pkgver.tar.gz"
+ 0001-Fix-channel-type-for-qemu-guest-agent.patch)
+sha512sums=('9855fe2d0b7a827508dd41d779f1f160b1d230bf6ee1eeb7ae58418fffbd250899382e315a8ababdf0c89da21c011f874ead1d6f53a723290851e1bc47384c1d'
+ '10ac1e8350f857d4b2a5b23fbfa4f8af48516a545300b57cb89c046bf0b4fb0889f4d7e21f8c93412aab08f68e3b94a7ffb623b1795a62d25d6a0b46e26671d9')
+b2sums=('ce150963be678dda1a4b11e3707140b7b819b8fe6e01799a769c2da737f6280d7eca64ac704c41426737a3a8432fd8c42f3c4d6c00a14cf291e123c4378842bd'
+ 'a9d6a4a79cea2a555e45a62687d00decd9d3a656af85a0108ff149b7be495d0b85075bc6ecc89113c9f843e4bc9e0fb29f195f4835b3519bac5cb587ea93f1e4')
+
+prepare() {
+ cd "${pkgname}-${pkgver}"
+ # let provider create the correct channel type for qemu-guest-agent:
+ # https://github.com/dmacvicar/terraform-provider-libvirt/pull/801
+ patch -Np1 -i ../0001-Fix-channel-type-for-qemu-guest-agent.patch
+ mkdir -vp build
+}
+
+build() {
+ cd "${pkgname}-${pkgver}"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+ go build -o "build/${pkgname}"
+}
+
+package() {
+ depends+=('libvirt.so' 'libvirt-lxc.so' 'libvirt-qemu.so')
+ cd "${pkgname}-${pkgver}"
+ # terraform unfortunately only accepts non-FHS compliant directories for plugins :(
+ install -vDm 755 "build/$pkgname" \
+ "$pkgdir/usr/share/terraform/plugins/registry.terraform.io/dmacvicar/libvirt/${pkgver}/linux_amd64/${pkgname}"
+ install -vDm 644 {CHANGELOG,CONTRIBUTING,README}.md -t "${pkgdir}/usr/share/doc/${pkgname}/"
+ # examples
+ find examples/ -type f \( \
+ -iname "*.cfg" -or \
+ -iname "*.conf" -or \
+ -iname "*.md" -or \
+ -iname "*.mount" -or \
+ -iname "*.service" -or \
+ -iname "*.tf" -or \
+ -iname "*.xsl" -or \
+ -iname "*id_rsa*" \
+ \) -exec install -vDm 644 {} "${pkgdir}/usr/share/doc/${pkgname}/"{} \;
+ find website/ -type f -iname "*.markdown" -exec install -vDm 644 {} "${pkgdir}/usr/share/doc/${pkgname}/"{} \;
+}
More information about the arch-commits
mailing list