From unknown Wed Jun 18 00:22:16 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#30806 <30806@debbugs.gnu.org> To: bug#30806 <30806@debbugs.gnu.org> Subject: Status: [PATCH] Add terraform and terraform-provider-libvirt Reply-To: bug#30806 <30806@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:22:16 +0000 retitle 30806 [PATCH] Add terraform and terraform-provider-libvirt reassign 30806 guix-patches submitter 30806 Christopher Baines severity 30806 normal tag 30806 moreinfo patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 13 16:25:55 2018 Received: (at submit) by debbugs.gnu.org; 13 Mar 2018 20:25:55 +0000 Received: from localhost ([127.0.0.1]:59934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1evqUc-0004GN-VG for submit@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 ) id 1evqUY-0004G6-QX for submit@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 ) id 1evqUS-0008Ck-M0 for submit@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 ) id 1evqUS-0008Cg-IM for submit@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 ) id 1evqUR-0003Gs-Gk for guix-patches@gnu.org; Tue, 13 Mar 2018 16:25:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evqUM-000853-I6 for guix-patches@gnu.org; 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 ) id 1evqUM-00084X-BR for guix-patches@gnu.org; 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 ; 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 ; Tue, 13 Mar 2018 20:25:36 +0000 (UTC) User-agent: mu4e 1.0; emacs 25.3.1 From: Christopher Baines To: guix-patches@gnu.org Subject: [PATCH] Add terraform and terraform-provider-libvirt Date: Tue, 13 Mar 2018 20:25:34 +0000 Message-ID: <87y3ivzps1.fsf@cbaines.net> 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@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 13 16:30:11 2018 Received: (at 30806) by debbugs.gnu.org; 13 Mar 2018 20:30:11 +0000 Received: from localhost ([127.0.0.1]:59944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1evqYl-0004P6-FE for submit@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 ) id 1evqYj-0004Ov-Ei for 30806@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@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@debbugs.gnu.org>; Tue, 13 Mar 2018 20:30:08 +0000 (UTC) From: Christopher Baines To: 30806@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@cbaines.net> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313203008.3487-1-mail@cbaines.net> References: <20180313203008.3487-1-mail@cbaines.net> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30806 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 13 16:30:17 2018 Received: (at 30806) by debbugs.gnu.org; 13 Mar 2018 20:30:17 +0000 Received: from localhost ([127.0.0.1]:59946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1evqYq-0004PO-QJ for submit@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 ) id 1evqYj-0004Ow-SU for 30806@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@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@debbugs.gnu.org>; Tue, 13 Mar 2018 20:30:08 +0000 (UTC) From: Christopher Baines To: 30806@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@cbaines.net> 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@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 +;;; +;;; 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 . + +(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 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 20 04:32:02 2018 Received: (at 30806) by debbugs.gnu.org; 20 Dec 2018 09:32:02 +0000 Received: from localhost ([127.0.0.1]:55464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZugT-0008G5-Ig for submit@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 ) id 1gZugR-0008Fg-7S for 30806@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@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 To: Christopher Baines , Pierre Neidhardt Subject: Re: Packaging Terraform, a Golang package References: <875zvqjjnl.fsf@gmail.com> <875zvpm6d3.fsf@cbaines.net> Date: Thu, 20 Dec 2018 01:31:48 -0800 In-Reply-To: <875zvpm6d3.fsf@cbaines.net> (Christopher Baines's message of "Wed, 19 Dec 2018 23:42:00 +0000") Message-ID: <87bm5g4k8r.fsf@gmail.com> 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@gnu.org, 30806@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 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----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 20 04:47:26 2018 Received: (at 30806) by debbugs.gnu.org; 20 Dec 2018 09:47:26 +0000 Received: from localhost ([127.0.0.1]:55469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZuvO-0000CP-Ca for submit@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 ) id 1gZuvM-0000CG-L9 for 30806@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@ambrevar.xyz) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id A0688240004; Thu, 20 Dec 2018 09:47:20 +0000 (UTC) References: <875zvqjjnl.fsf@gmail.com> <875zvpm6d3.fsf@cbaines.net> <87bm5g4k8r.fsf@gmail.com> User-agent: mu4e 1.0; emacs 26.1 From: Pierre Neidhardt To: Chris Marusich Subject: Re: Packaging Terraform, a Golang package In-reply-to: <87bm5g4k8r.fsf@gmail.com> Date: Thu, 20 Dec 2018 10:47:18 +0100 Message-ID: <87woo4zg0p.fsf@ambrevar.xyz> 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@gnu.org, 30806@debbugs.gnu.org, Christopher Baines X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 12 21:18:22 2021 Received: (at control) by debbugs.gnu.org; 13 Sep 2021 01:18:22 +0000 Received: from localhost ([127.0.0.1]:43736 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPac2-0003HB-B8 for submit@debbugs.gnu.org; Sun, 12 Sep 2021 21:18:22 -0400 Received: from out0.migadu.com ([94.23.1.103]:58305) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPac0-0003H1-BO for control@debbugs.gnu.org; Sun, 12 Sep 2021 21:18:21 -0400 Date: Sun, 12 Sep 2021 18:18:16 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1631495898; h=from:from:reply-to:subject:subject:date:date:to:to:cc; bh=IYUSoSuZhDIPORh5uCYuuzxU61+ZKNaMoGwAvJNLyDA=; b=VmxD4cUlNFOFx9em+mW4UnJycxP/QYXxMtXXcGFC6u8SMRimTE/gnszpRTduMzs1E1U5CF 5o/blgMje158vTjb6ZaDK63IL+++Xvmd44q8slmbrRK+Q69jJy5A2kE6llLUey/uwaKRdt FlWSQTBIcjDIm/A9FMM/KT2dVvLpUSU= To: control@debbugs.gnu.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sarah Morgensen Subject: control message for bug #30806 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" Message-Id: X-Spam-Score: -1.7 (-) merge 30806 44721 quit From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 28 15:57:18 2021 Received: (at 30806) by debbugs.gnu.org; 28 Sep 2021 19:57:18 +0000 Received: from localhost ([127.0.0.1]:47101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVJE5-0006ui-UM for submit@debbugs.gnu.org; Tue, 28 Sep 2021 15:57:18 -0400 Received: from mail-wr1-f48.google.com ([209.85.221.48]:42548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVJE4-0006uV-T3 for 30806@debbugs.gnu.org; Tue, 28 Sep 2021 15:57:17 -0400 Received: by mail-wr1-f48.google.com with SMTP id v17so323053wrv.9 for <30806@debbugs.gnu.org>; Tue, 28 Sep 2021 12:57:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=AW7FPt1cM7L8vNPUbnATffyPzpy8hjZvV9cLd6WNAp4=; b=IoCQXoaRyM1dyOstVBDe4+b0Y6LL8zE5SP81DvMH1mKaZOUapENOgX121P0JNLP0Fj kVDjsjOV4a6z/u4wmfqLF3afYOKQkVO+tD3vxWQbNBDgBX0MDHKwFdCBjajWdbgkVEnE S11/zBssu45sgGS+qiW2iwt4JOHssMSrNIBdgw+ltT9TuSkDxdpLlrylOb6YETDktIR+ GC39ZvbqzhgXwU9tMXxwFo6r6HdcdIEM1zMdWSZOX6923TuzDzkCc/dnb6O4hnZw9ECX 1MEgFdqNOjjLoslEM2uPyyXm2tg9DhvZi/ovYMWnuuz4/pFDSwqY8ao/TwAN/0Oiu5+E CywA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=AW7FPt1cM7L8vNPUbnATffyPzpy8hjZvV9cLd6WNAp4=; b=eGWMEXAH9zJEwvXHJ5ZFArDjifk6mf6yIL8Fplm/22++Nn5Jid3X1pm7lPZsmtmLlq 3/qydM+3hxW0K9vCCE1nfxkstqOoBHDdI6cefQv5DuOLG7wMRM8f+1Wyew72iZeOYJcd MDrnpykVfD7r4F+qwrjcbSkbqI/Yo07BNUIlDDSHq8b9eUQtsPJzvm3fCk3p91hfvwLl ujGG3GHsgrWqpbl6othAoMuQk6aEXT5TWE4l/Dwsa2oDUQvMXiCQ07MQnEOduCHi3VAe tyTS9gXWECek6rXHLoh4r+FlselWbcMWmoCK++rfZP/EQt/oREB4NqXooCNJfRYzrsA/ 4aww== X-Gm-Message-State: AOAM5302ZMHa42Cl82PqOFLqusR6GqZzpEfRCsBpa+ZFPceVyHXJe7dE scxZbFKhuaOz8XzKGV9PJ6cHueTb4awj+keKbBgjuD2J X-Google-Smtp-Source: ABdhPJz5VdAm0KhJ+xFh1l7z1onXOfp7yzDED0oTOrUsd7G+Snlr5yXTd94a9cxnQeQMn6Da6WG27hsxKuZjfEtlHcQ= X-Received: by 2002:a5d:49ce:: with SMTP id t14mr2292751wrs.127.1632859030803; Tue, 28 Sep 2021 12:57:10 -0700 (PDT) MIME-Version: 1.0 From: Sharlatan Hellseher Date: Tue, 28 Sep 2021 20:57:00 +0100 Message-ID: Subject: To: 30806@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi all, Terraform is reached stable version 1.0.0+ is it still in review to have it in Guix or it will be regected due to any licensing reason? -- … наш разум - превосходная объяснительная машина которая способна найти смысл почти в чем угодно, истолков [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.48 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.48 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (sharlatanus[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 2.0 BLANK_SUBJECT Subject is present but empty X-Debbugs-Envelope-To: 30806 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) SGkgYWxsLA0KDQpUZXJyYWZvcm0gaXMgcmVhY2hlZCBzdGFibGUgdmVyc2lvbiAxLjAuMCsgaXMg aXQgc3RpbGwgaW4gcmV2aWV3IHRvDQpoYXZlIGl0IGluIEd1aXggb3IgaXQgd2lsbCBiZSByZWdl Y3RlZCBkdWUgdG8gYW55IGxpY2Vuc2luZyByZWFzb24/DQoNCi0tDQrigKYg0L3QsNGIINGA0LDQ t9GD0LwgLSDQv9GA0LXQstC+0YHRhdC+0LTQvdCw0Y8g0L7QsdGK0Y/RgdC90LjRgtC10LvRjNC9 0LDRjyDQvNCw0YjQuNC90LAg0LrQvtGC0L7RgNCw0Y8g0YHQv9C+0YHQvtCx0L3QsA0K0L3QsNC5 0YLQuCDRgdC80YvRgdC7INC/0L7Rh9GC0Lgg0LIg0YfQtdC8INGD0LPQvtC00L3Qviwg0LjRgdGC 0L7Qu9C60L7QstCw0YLRjCDQu9GO0LHQvtC5INGE0LXQvdC+0LzQtdC9LCDQvdC+DQrRgdC+0LLQ tdGA0YjQtdC90L3QviDQvdC1INCyINGB0L7RgdGC0L7Rj9C90LjQuCDQv9GA0LjQvdGP0YLRjCDQ vNGL0YHQu9GMINC+INC90LXQv9GA0LXQtNGB0LrQsNC30YPQtdC80L7RgdGC0LguDQo= From unknown Wed Jun 18 00:22:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 17 Mar 2025 11:24:14 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator