GNU bug report logs - #30806
[PATCH] Add terraform and terraform-provider-libvirt

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Christopher Baines <mail@HIDDEN>; Keywords: moreinfo; dated Tue, 13 Mar 2018 20:26:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 30806 <at> debbugs.gnu.org:


Received: (at 30806) by debbugs.gnu.org; 20 Dec 2018 09:47:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 20 04:47:26 2018
Received: from localhost ([127.0.0.1]:55469 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gZuvO-0000CP-Ca
	for submit <at> debbugs.gnu.org; Thu, 20 Dec 2018 04:47:26 -0500
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:52709)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1gZuvM-0000CG-L9
 for 30806 <at> debbugs.gnu.org; Thu, 20 Dec 2018 04:47:25 -0500
X-Originating-IP: 86.246.35.59
Received: from mimimi (lfbn-1-799-59.w86-246.abo.wanadoo.fr [86.246.35.59])
 (Authenticated sender: mail@HIDDEN)
 by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id A0688240004;
 Thu, 20 Dec 2018 09:47:20 +0000 (UTC)
References: <875zvqjjnl.fsf@HIDDEN> <875zvpm6d3.fsf@HIDDEN>
 <87bm5g4k8r.fsf@HIDDEN>
User-agent: mu4e 1.0; emacs 26.1
From: Pierre Neidhardt <mail@HIDDEN>
To: Chris Marusich <cmmarusich@HIDDEN>
Subject: Re: Packaging Terraform, a Golang package
In-reply-to: <87bm5g4k8r.fsf@HIDDEN>
Date: Thu, 20 Dec 2018 10:47:18 +0100
Message-ID: <87woo4zg0p.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 30806
Cc: guix-devel@HIDDEN, 30806 <at> debbugs.gnu.org,
 Christopher Baines <mail@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable


> 1) Is it bad that our package definition isn't running "go generate" or
> "go fmt"?  Do you know if "go install" does this for us somehow?  I
> don't think "stringer" or "mockgen" are present in the build

"go generate" is used to generate code, it's like a preprocessor.  Most Go
programs don't use it, but if they do, then it's needed.

"go fmt" should not be part of the build process in my opinion.  A code
formatter fits better into a Git hook or something.

> 2) After I ran "make" ad-hoc, I couldn't find a built "terraform"
> executable anywhere.  Where is it?  Am missing something obvious, or
> could it be that the official documentation incomplete and I need to ask
> upstream for advice?

I haven't looked into it, but it should be either in ~/go/bin or in the pac=
kage
source folder, something like ~/go/src/.../terraform/.

> 3) The official instructions seem to arbitrarily choose to run the build
> in parallel, using 4 threads, which means this package won't play nice
> with build arguments like --cores.  I suppose I might need to work with
> upstream to fix that.

I think Go decides this on its own.  Off the top of my head, there is an
environment variable to control the number of CPU threads used globally,
GO_xxx_CORES or something like that.

=2D-=20
Pierre Neidhardt
https://ambrevar.xyz/

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlwbZSYACgkQm9z0l6S7
zH+4+wgAqodcAcZ28ZHf8W9KaeUXwsffaoqr19e1Gixwc8enb2X61YyG/TZYUp/j
ICfXe7xzjm8n4uKmSjYa8Te17bVR+tfEEDEq8wJoBBlCFS60kIXSFfGPw4qFPmm4
+0q4BB/CKmh75nmL6K2UYPwOViHHuSezd5mXk1CYbvA00KqFNw/+hz7DcNhK4XsB
LkSxYSux5CwGaZdWYi8lRStBChkeIW52N4BurAj5CpGzG9KxJ70plF00bhq4paKM
t8db2G+YR0cvE3STdf4GbZ+TYVBgat9BfnY7iOBh7Ju7nyjdJ+rvcaOj2LBLHccz
7IyAvZizAscQCJ2w6oWyksKSs2YUfQ==
=ddux
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#30806; Package guix-patches. Full text available.

Message received at 30806 <at> debbugs.gnu.org:


Received: (at 30806) by debbugs.gnu.org; 20 Dec 2018 09:32:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 20 04:32:02 2018
Received: from localhost ([127.0.0.1]:55464 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gZugT-0008G5-Ig
	for submit <at> debbugs.gnu.org; Thu, 20 Dec 2018 04:32:02 -0500
Received: from mail-pf1-f180.google.com ([209.85.210.180]:35110)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cmmarusich@HIDDEN>) id 1gZugR-0008Fg-7S
 for 30806 <at> debbugs.gnu.org; Thu, 20 Dec 2018 04:32:00 -0500
Received: by mail-pf1-f180.google.com with SMTP id z9so644060pfi.2
 for <30806 <at> debbugs.gnu.org>; Thu, 20 Dec 2018 01:31:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=t3c07t/sIwzBa9XE4QJzBAx9p9jiwZtgTRX7ZTkT7X4=;
 b=qgbYytLoL1eHf59w8cu/Sl9w/JXEtUQweUZrDRUMhXHHNE/sdYeVQ6NMFW3vUipQQk
 y6Aemq/UHdl8J/lDUk2BF5blzL7lo4B1OGZmBdXUnnjnFFKzO6mTObvUeNvzFcncTZbz
 Ap/QvvDJLvUXcUuF5/q6g+9e6NrceZVByzMqBqQ0BP2vnVjVpkhjInIfPx+p7nB8mhCA
 +2jyFMiAeH++B4eswEl6Xl25VuqSl7YAW7kVttc7Uh70LJYag/dk2+pCD9Q3vfP0RV5D
 SJtRjHOmtPd1X0acvCkAbejbZV2vVHRY14zXZKaPheqNrY9rCe5qWhSPcBTkjDUktf9G
 jDjQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=t3c07t/sIwzBa9XE4QJzBAx9p9jiwZtgTRX7ZTkT7X4=;
 b=bqoK396Zb1B8qL5ZDOj4PVHb6wlRqmOvECdmA1fhBvGE2TFPgJNGJdikatqe9DN/hY
 Ao/VDW1JqNTlqaCw2V3LdHMFIdpPnDYN4jxl6oZ8WjiHITYbiERPwJWlO/kcl5YigYxf
 sVCUXowEOIrScUJDvbTkKNbXHX5cUok9pjqSrseO43O55Yde7Wi2UxFfK4hF07ctVEJC
 AuqqueXu/3vNy9N9GPbQyN/fmnjJwviQ1SfhSxklceQmvj1ltY3XPT8vll5iiXn30U76
 xhCEJqeJ0xa0IOgJKkHl5Mx1+E8R3qBaVb8bhDEcCk6v5DD0Jdgd0opIZ8jVrRlIFcZN
 QoXQ==
X-Gm-Message-State: AA+aEWZfi8XpOMiO3JY8A3IqEvai+2kuqtH716OVv33XqZkmC6I+3Qgg
 9MXfzda8qQ5KDTEiKWaHdwmXiMtL
X-Google-Smtp-Source: AFSGD/UI4bqBJm7btQqkzqHTDO2H8IpDacTzKUf4YmE1OhkFp/EKVVFp9nV8+g28mWr5p2Xv8nIXxg==
X-Received: by 2002:a63:ab08:: with SMTP id p8mr22010259pgf.87.1545298311875; 
 Thu, 20 Dec 2018 01:31:51 -0800 (PST)
Received: from garuda.local (c-73-53-106-26.hsd1.wa.comcast.net.
 [73.53.106.26])
 by smtp.gmail.com with ESMTPSA id c72sm17879331pfb.107.2018.12.20.01.31.49
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Thu, 20 Dec 2018 01:31:50 -0800 (PST)
From: Chris Marusich <cmmarusich@HIDDEN>
To: Christopher Baines <mail@HIDDEN>, Pierre Neidhardt <mail@HIDDEN>
Subject: Re: Packaging Terraform, a Golang package
References: <875zvqjjnl.fsf@HIDDEN> <875zvpm6d3.fsf@HIDDEN>
Date: Thu, 20 Dec 2018 01:31:48 -0800
In-Reply-To: <875zvpm6d3.fsf@HIDDEN> (Christopher Baines's message of
 "Wed, 19 Dec 2018 23:42:00 +0000")
Message-ID: <87bm5g4k8r.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="==-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 30806
Cc: guix-devel@HIDDEN, 30806 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--==-=-=
Content-Type: multipart/mixed; boundary="=-=-="

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hello Chris and Pierre!

Thank you for your tips regarding Golang and Terraform.  I've built it -
both ad-hoc and using a slightly modified version of Chris' original
package definition.  I'm still getting used to Golang's build system and
our own golang-build-system, so please bear with me!

I was able to run the official Terraform build steps on the latest
Terraform release by issuing the following commands - but I'm not sure
if this actually produced the terraform program:

mkdir terraform
cd terraform/
wget https://github.com/hashicorp/terraform/archive/v0.11.11.tar.gz
tar -xf v0.11.11.tar.gz
mkdir -p src/github.com/hashicorp
cp -r terraform-0.11.11 src/github.com/hashicorp/terraform
guix package -i go make git bash grep findutils which coreutils diffutils -=
p .guix-profile
mkdir gobin
eval "$(guix package --search-paths=3Dexact --profile=3D$(realpath --no-sym=
links .guix-profile))"
export GOPATH=3D"$(pwd)"
export GOBIN=3D"$GOPATH/bin"
export PATH=3D"$PATH:$GOBIN"
cd src/github.com/hashicorp/terraform/
make tools
make

Those last two commands are the ones listed in Terraform's README.md.
It looks like the final command, "make" will execute the "fmtcheck",
"generate", and "test" recipes in that order.  Here are the relevant
parts of the Makefile:

=2D-8<---------------cut here---------------start------------->8---
default: test

[...]

# test runs the unit tests
# we run this one package at a time here because running the entire suite in
# one command creates memory usage issues when running in Travis-CI.
test: fmtcheck generate
	go list $(TEST) | xargs -t -n4 go test $(TESTARGS) -timeout=3D2m -parallel=
=3D4

[...]

# generate runs `go generate` to build the dynamically generated
# source files.
generate:
	@which stringer > /dev/null; if [ $$? -ne 0 ]; then \
	  go get -u golang.org/x/tools/cmd/stringer; \
	fi
	go generate ./...
	@go fmt command/internal_plugin_list.go > /dev/null

[...]

fmtcheck:
	@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"
=2D-8<---------------cut here---------------end--------------->8---

So, in essence this runs "go generate", "go fmt", and "go test".  The
script gofmtcheck.sh seems to be a read-only linter to assist the
Terraform maintainers in finding badly formatted Golang files.

This is slightly different from the installation procedure that our
go-build-system runs.  When you build the attached package (which
packages an older version of terraform for now), our go-build-system
runs steps like the following (in order from top to bottom):

* Phase: unpack: Make a "src/github.com/hashicorp/terraform" directory.
* Phase: setup-environment: set GOPATH to (getcwd) and GOBIN to $out/bin.
* Phase: build: go install -v -x '-ldflags=3D-s -w' github.com/hashicorp/te=
rraform
* Phase: check: go test github.com/hashicorp/terraform

All in all, this has raised some questions in my mind:

1) Is it bad that our package definition isn't running "go generate" or
"go fmt"?  Do you know if "go install" does this for us somehow?  I
don't think "stringer" or "mockgen" are present in the build
environment, but our "go install" invocation seems to build terraform
even without them.  I wonder if the built terraform is broken in some
ways because we didn't run the code generation/formatting steps.

2) After I ran "make" ad-hoc, I couldn't find a built "terraform"
executable anywhere.  Where is it?  Am missing something obvious, or
could it be that the official documentation incomplete and I need to ask
upstream for advice?

3) The official instructions seem to arbitrarily choose to run the build
in parallel, using 4 threads, which means this package won't play nice
with build arguments like --cores.  I suppose I might need to work with
upstream to fix that.

This feels so close, and yet so far.  Hopefully we only have a little
more to do to get Terraform packaged well!  Thank you again for your
help.

=2D-=20
Chris

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=0001-gnu-Add-terraform.patch
Content-Transfer-Encoding: quoted-printable

From=2071d654e2738c6ef870441d4234632bd30e93c74a Mon Sep 17 00:00:00 2001
From: Chris Marusich <cmmarusich@HIDDEN>
Date: Thu, 20 Dec 2018 01:24:59 -0800
Subject: [PATCH] gnu: Add terraform.

This patch is slightly modified from Christopher Baines' original patch to
accommodate some changes that have taken place recently in the Guix source
tree.  But it's essentially the same.  It is still probably not suitable for
inclusion in Guix just yet.

* gnu/packages/terraform.scm (terraform): New variable.
=2D--
 gnu/packages/terraform.scm | 40 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/terraform.scm b/gnu/packages/terraform.scm
index f14b152fd..de2288dda 100644
=2D-- a/gnu/packages/terraform.scm
+++ b/gnu/packages/terraform.scm
@@ -47,3 +47,43 @@ the inputs and outputs for modules of the Terraform infr=
astructure management
 tool.  These can be shown, or written to a file in JSON or Markdown format=
s.")
     (home-page "https://github.com/segmentio/terraform-docs")
     (license license:expat)))
+
+(define-public terraform
+  (package
+    (name "terraform")
+    (version "0.11.3")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/hashicorp/terraform")
+                    (commit (string-append "v" version))))
+              (sha256
+               (base32
+                "0637x7jcm62pdnivmh4rggly6dmlvdh3jpsd1z4vba15gbm203nz"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/hashicorp/terraform"
+       #:phases
+       (modify-phases %standard-phases
+         ;; I'm not sure what purpose they serve, but they are readonly, so
+         ;; they break the reset-gzip-timestamps phase.
+         (add-after 'install 'delete-test-fixtures
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; If delete-file-recursively fails, it won't throw an except=
ion.
+             ;; However, if it doesn't do its job, the build will fail, so
+             ;; we'll know one way or another.
+             (delete-file-recursively
+              (string-append
+               (assoc-ref outputs "out")
+               "/src/github.com/hashicorp/terraform/config/module/test-fix=
tures"))
+             #t)))))
+    (synopsis "Tool for building and changing computing infrastructure")
+    (description
+     "Terraform uses descriptions of infrastructure written in @acronym{HC=
L,
+Hashicorp Configuration Language} which describe graphs of resources,
+including information about dependencies. From this, Terraform can plan and
+apply changes to the described resources.
+
+Terraform uses plugins that provide intergrations to different providers.")
+    (home-page "https://www.terraform.io/")
+    (license license:mpl2.0)))
=2D-=20
2.20.0


--=-=-=--

--==-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlwbYYQACgkQ3UCaFdgi
Rp2pVRAAldIZ7HMppNLV19sT0R8pJuFL9MdlTAXrfus1PORIpXXsDyCSbJdkkCgU
0YBSCXMma91dPcABegKNbsN5WdztwMNd1/LailLSTnAQa7NFxAZTKOlrATtq+hY1
aqnUiaTkFSMQ+OKnCPrDJ8DLFqic1HOr72qeHlSu/dMYg5e14bDZQTlm2Z1MV28h
OhwevOozyVu7L3mJL/I839U8ysIyEnq3AB+q/+XHn7mwfY727uxM4GNVUzETvJAl
OiJTiqxES2Lyit14JHmKIol+lJGD4G2+659n3prodq4g1m0M9Ec0BV4urX1xEaHt
e9Aafe0Rx9D7nnRze8L/HNwI8IKS/XmUqBvPWHAAq5IIePAagq3Zvo2BDVYfZFe8
nDcdgB0ViM/mNUa0n7eU7zRAnwcun+Z5DFJCllpkiMNTDr4l57LNnJXuzCuCcSGT
3OHvnUvY7Rgrordhdgv/tSaEM+4L+8GCSptIImW2WNq9aWjURKlOemjitSQCF2kg
U8OVM1NoLY4xCFsCyXSA4TXKgKsUuo8bgbTclP7ofYBMKQuEm+aaI4XT2tOhGBAg
u4EjBxCR8vreJJob//+CxCr2YzlYvBWvkJPBGNlFgEQj+NOPRRR1ScKDUTxhwbar
xPFXrSfIjLUTKGOwEpecKV12WjQI1UL9XKe7J1hwJ4C8rC7ZRJY=
=qchI
-----END PGP SIGNATURE-----
--==-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#30806; Package guix-patches. Full text available.

Message received at 30806 <at> debbugs.gnu.org:


Received: (at 30806) by debbugs.gnu.org; 13 Mar 2018 20:30:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 13 16:30:17 2018
Received: from localhost ([127.0.0.1]:59946 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1evqYq-0004PO-QJ
	for submit <at> debbugs.gnu.org; Tue, 13 Mar 2018 16:30:17 -0400
Received: from li622-129.members.linode.com ([212.71.249.129]:35702
 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1evqYj-0004Ow-SU
 for 30806 <at> debbugs.gnu.org; Tue, 13 Mar 2018 16:30:13 -0400
Received: by mira.cbaines.net (Postfix, from userid 113)
 id 779D513D067; Tue, 13 Mar 2018 20:30:09 +0000 (GMT)
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,UNPARSEABLE_RELAY,
 URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0
Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net
 [86.27.34.15])
 by mira.cbaines.net (Postfix) with ESMTPSA id 6D68013D064
 for <30806 <at> debbugs.gnu.org>; Tue, 13 Mar 2018 20:30:08 +0000 (GMT)
Received: from localhost (localhost [local])
 by localhost (OpenSMTPD) with ESMTPA id 3b928c5d
 for <30806 <at> debbugs.gnu.org>; Tue, 13 Mar 2018 20:30:08 +0000 (UTC)
From: Christopher Baines <mail@HIDDEN>
To: 30806 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: Add terraform.
Date: Tue, 13 Mar 2018 20:30:07 +0000
Message-Id: <20180313203008.3487-1-mail@HIDDEN>
X-Mailer: git-send-email 2.16.2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 30806
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

* gnu/packages/terraform.scm (New file).
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk               |  1 +
 gnu/packages/terraform.scm | 60 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 gnu/packages/terraform.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 5a3ae502f..2b5502e8e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -410,6 +410,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/tcl.scm				\
   %D%/packages/telephony.scm			\
   %D%/packages/terminals.scm			\
+  %D%/packages/terraform.scm			\
   %D%/packages/texinfo.scm			\
   %D%/packages/tex.scm				\
   %D%/packages/textutils.scm			\
diff --git a/gnu/packages/terraform.scm b/gnu/packages/terraform.scm
new file mode 100644
index 000000000..277d19aed
--- /dev/null
+++ b/gnu/packages/terraform.scm
@@ -0,0 +1,60 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2018 Christopher Baines <mail@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages terraform)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system go))
+
+(define-public terraform
+  (package
+    (name "terraform")
+    (version "0.11.3")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/hashicorp/terraform")
+                    (commit (string-append "v" version))))
+              (sha256
+               (base32
+                "0637x7jcm62pdnivmh4rggly6dmlvdh3jpsd1z4vba15gbm203nz"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/hashicorp/terraform"
+       #:phases
+       (modify-phases %standard-phases
+         ;; I'm not sure what purpose they serve, but they are readonly, so
+         ;; they break the reset-gzip-timestamps phase.
+         (add-after 'install 'delete-test-fixtures
+           (lambda* (#:key outputs #:allow-other-keys)
+             (delete-file-recursively
+              (string-append
+               (assoc-ref outputs "out")
+               "/src/github.com/hashicorp/terraform/config/module/test-fixtures")))))))
+    (synopsis "Tool for building and changing computing infrastructure")
+    (description
+     "Terraform uses descriptions of infrastructure written in @acronym{HCL,
+Hashicorp Configuration Language} which describe graphs of resources,
+including information about dependencies. From this, Terraform can plan and
+apply changes to the described resources.
+
+Terraform uses plugins that provide intergrations to different providers.")
+    (home-page "https://www.terraform.io/")
+    (license license:mpl2.0)))
-- 
2.16.2





Information forwarded to guix-patches@HIDDEN:
bug#30806; Package guix-patches. Full text available.

Message received at 30806 <at> debbugs.gnu.org:


Received: (at 30806) by debbugs.gnu.org; 13 Mar 2018 20:30:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 13 16:30:11 2018
Received: from localhost ([127.0.0.1]:59944 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1evqYl-0004P6-FE
	for submit <at> debbugs.gnu.org; Tue, 13 Mar 2018 16:30:11 -0400
Received: from li622-129.members.linode.com ([212.71.249.129]:35700
 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1evqYj-0004Ov-Ei
 for 30806 <at> debbugs.gnu.org; Tue, 13 Mar 2018 16:30:09 -0400
Received: by mira.cbaines.net (Postfix, from userid 113)
 id DF26F13D069; Tue, 13 Mar 2018 20:30:08 +0000 (GMT)
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,UNPARSEABLE_RELAY,
 URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0
Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net
 [86.27.34.15])
 by mira.cbaines.net (Postfix) with ESMTPSA id 8761613D067
 for <30806 <at> debbugs.gnu.org>; Tue, 13 Mar 2018 20:30:08 +0000 (GMT)
Received: from localhost (localhost [local])
 by localhost (OpenSMTPD) with ESMTPA id b31b3196
 for <30806 <at> debbugs.gnu.org>; Tue, 13 Mar 2018 20:30:08 +0000 (UTC)
From: Christopher Baines <mail@HIDDEN>
To: 30806 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: Add terraform-provider-libvirt.
Date: Tue, 13 Mar 2018 20:30:08 +0000
Message-Id: <20180313203008.3487-2-mail@HIDDEN>
X-Mailer: git-send-email 2.16.2
In-Reply-To: <20180313203008.3487-1-mail@HIDDEN>
References: <20180313203008.3487-1-mail@HIDDEN>
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 30806
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

* gnu/packages/terraform.scm (terraform-provider-libvirt): New variable.
---
 gnu/packages/terraform.scm | 48 +++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/terraform.scm b/gnu/packages/terraform.scm
index 277d19aed..e81ada45d 100644
--- a/gnu/packages/terraform.scm
+++ b/gnu/packages/terraform.scm
@@ -21,7 +21,11 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
-  #:use-module (guix build-system go))
+  #:use-module (guix build-system go)
+  #:use-module (gnu packages golang)
+  #:use-module (gnu packages cdrom)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages virtualization))
 
 (define-public terraform
   (package
@@ -58,3 +62,45 @@ apply changes to the described resources.
 Terraform uses plugins that provide intergrations to different providers.")
     (home-page "https://www.terraform.io/")
     (license license:mpl2.0)))
+
+(define-public terraform-provider-libvirt
+  (package
+    (name "terraform-provider-libvirt")
+    (version "0.3")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/dmacvicar/terraform-provider-libvirt")
+                    (commit (string-append "v" version))))
+              (sha256
+               (base32
+                "004gxy55p5cf39f2zpah0i2zhvs4x6ixnxy8z9v7314604ggpkna"))))
+    (build-system go-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libvirt" ,libvirt)
+       ("cdrtools" ,cdrtools)))
+    (arguments
+     '(#:import-path "github.com/dmacvicar/terraform-provider-libvirt"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-mkisofs
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute*
+                 "src/github.com/dmacvicar/terraform-provider-libvirt/libvirt/cloudinit_def.go"
+               (("mkisofs")
+                (string-append (assoc-ref inputs "cdrtools")
+                               "/bin/mkisofs")))))
+         ;; This should be redundant once the vendor directory is removed from
+         ;; this package
+         (add-before 'reset-gzip-timestamps 'remove-readonly-gzip-files
+           (lambda* (#:key outputs #:allow-other-keys)
+             (for-each delete-file
+                       (find-files
+                        (assoc-ref outputs "out")
+                        ".*\\.gz")))))))
+    (synopsis "")
+    (description "")
+    (home-page "")
+    (license "")))
-- 
2.16.2





Information forwarded to guix-patches@HIDDEN:
bug#30806; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Mar 2018 20:25:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 13 16:25:55 2018
Received: from localhost ([127.0.0.1]:59934 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1evqUc-0004GN-VG
	for submit <at> debbugs.gnu.org; Tue, 13 Mar 2018 16:25:55 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33063)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1evqUY-0004G6-QX
 for submit <at> debbugs.gnu.org; Tue, 13 Mar 2018 16:25:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mail@HIDDEN>) id 1evqUS-0008Ck-M0
 for submit <at> debbugs.gnu.org; Tue, 13 Mar 2018 16:25:45 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:55151)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <mail@HIDDEN>) id 1evqUS-0008Cg-IM
 for submit <at> debbugs.gnu.org; Tue, 13 Mar 2018 16:25:44 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52258)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <mail@HIDDEN>) id 1evqUR-0003Gs-Gk
 for guix-patches@HIDDEN; Tue, 13 Mar 2018 16:25:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mail@HIDDEN>) id 1evqUM-000853-I6
 for guix-patches@HIDDEN; Tue, 13 Mar 2018 16:25:43 -0400
Received: from li622-129.members.linode.com ([212.71.249.129]:58258
 helo=mira.cbaines.net) by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <mail@HIDDEN>) id 1evqUM-00084X-BR
 for guix-patches@HIDDEN; Tue, 13 Mar 2018 16:25:38 -0400
Received: by mira.cbaines.net (Postfix, from userid 113)
 id 9F27B13D069; Tue, 13 Mar 2018 20:25:37 +0000 (GMT)
Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net
 [86.27.34.15])
 by mira.cbaines.net (Postfix) with ESMTPSA id 01CE313D064
 for <guix-patches@HIDDEN>; Tue, 13 Mar 2018 20:25:36 +0000 (GMT)
Received: from giedi (localhost [127.0.0.1])
 by localhost (OpenSMTPD) with ESMTP id 8c03ee82
 for <guix-patches@HIDDEN>; Tue, 13 Mar 2018 20:25:36 +0000 (UTC)
User-agent: mu4e 1.0; emacs 25.3.1
From: Christopher Baines <mail@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] Add terraform and terraform-provider-libvirt
Date: Tue, 13 Mar 2018 20:25:34 +0000
Message-ID: <87y3ivzps1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

--=-=-=
Content-Type: text/plain

Tags: moreinfo

I'll send some patches for adding a Terraform package and the Terraform
libvirt provider. Both of these work, at least in the way I've been
using them, but the packages need more work before they can be
included. I think both packages include quite a few copies of other
libraries which need packaging for Guix.


Christopher Baines (2):
  gnu: Add terraform.
  gnu: Add terraform-provider-libvirt.

 gnu/local.mk               |   1 +
 gnu/packages/terraform.scm | 106 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 107 insertions(+)
 create mode 100644 gnu/packages/terraform.scm

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlqoM75fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9Xd30w//WWKK9xQ6TbalXF6UBsPPgQ1iRfGBFaObwfnAhtxviHxehGE2vXAQpLmK
oc0mcdwVe7A+Ln0TnhPv7hq+KZRJCqcRGRkoVspJB2kb+vUCGVsbPqU5bCoQP3WB
k4lVqf7TeMlseFY4lR66x3Jx5SxjeS5A9jJSBOsPXpmKI/5oVb3ZreRrpGtzrm8c
gKC84jN8xUYYsU9PZGSjmDcnOutf/YJzwD+rdgV4BCruFQg5WbzYdJw7gyBUqx3A
5gQek6l0AztPGXSy/+ytKC1kiD+V6DjDJkEhe0pkiH9EJnYeAR0f1AZ8pmq78Wnz
xPHKdvmFA6xULEE8TRyX5xppk6KFHZaC7mv4jIil5MSPZ3NIZtMUvoCoBi3hu6IW
VLalKWay5EvcKcJr3m/c7mdADLzsYrvrGK4mOFmR07ur3iQrchJ8IeVV3je7oNFl
vTN8JlHUjCdrN4HdBmQfLehDHU17erwSO7ZlT0DMsE0p1b9Nx4aCWn0CpaeY43Mc
xFuyt5jrdET41gageO39rHAybf9SKhTLmcGkdZzTQbi76lp2OT2FIB1bxnrrm7vm
e/8NrRhUKXsdDl4B2I/7Cop+RCtiqKRuFEblDsQbcxUwcEwnr4ekFoR0wTLIA4O8
iw5kw3D+zAw3FEvpD4vBDncaqsJlBG2MCCufqYyXH/KmYPG+6CU=
=4qAe
-----END PGP SIGNATURE-----
--=-=-=--




Acknowledgement sent to Christopher Baines <mail@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#30806; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.