[packages/packer] up to 1.5.4; rel 1
mis
mis at pld-linux.org
Thu Mar 12 17:07:16 CET 2020
commit 19fd55a1364b105020b823a0d35646d1041103b3
Author: mis <mis at pld-linux.org>
Date: Thu Mar 12 17:06:54 2020 +0100
up to 1.5.4; rel 1
build.patch | 27 ---------------------
packer.spec | 81 ++++++++++++++++++-------------------------------------------
2 files changed, 24 insertions(+), 84 deletions(-)
---
diff --git a/packer.spec b/packer.spec
index 6c3cb82..50676d1 100644
--- a/packer.spec
+++ b/packer.spec
@@ -1,82 +1,49 @@
-# TODO
-# - solve hacks better:
-# - hack1: git rev-parse expects .git repo and aborts
-# - hack2: go get ./... spews errors about "no install location for directory ... outside GOPATH" and aborts
-# - hack3: scripts/build.sh does kill 0, which kills jobs and makes it abort with error, ignore errors
-# - hack4: the same kill 0 kills make as well, use setsid to "fix"
-# - building downloads go packages - not suitable for builders
-#
-# Conditional build:
-%bcond_without tests # build without tests
-
Summary: Tool for creating identical machine images for multiple platforms from a single source configuration
Name: packer
-Version: 0.3.8
-Release: 0.1
+Version: 1.5.4
+Release: 1
License: MPL 2.0
Group: Applications/Emulators
-Source0: https://github.com/mitchellh/packer/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 2e8fbcf12e4cd9416b7c1c2ea1d97c3a
-Patch0: build.patch
+Source0: https://github.com/hashicorp/packer/archive/v%{version}.tar.gz
+# Source0-md5: 8c11adb7aa529793675a075dc9db40b0
URL: http://www.packer.io/
-BuildRequires: golang >= 1.1
BuildRequires: bash
-BuildRequires: mercurial
+BuildRequires: golang >= 1.13
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%description
-Packer is lightweight, runs on every major operating system, and is
-highly performant, creating machine images for multiple platforms in
-parallel. Packer comes out of the box with support for creating AMIs
-(EC2), VMware images, and VirtualBox images. Support for more
-platforms can be added via plugins.
+%define _enable_debug_packages 0
+%define gobuild go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x
-The images that Packer creates can easily be turned into Vagrant
-boxes.
+%description
+Packer is an open source tool for creating identical machine images
+for multiple platforms from a single source configuration. Packer is
+lightweight, runs on every major operating system, and is highly
+performant, creating machine images for multiple platforms in
+parallel. Packer does not replace configuration management like Chef
+or Puppet. In fact, when building images, Packer is able to use tools
+like Chef or Puppet to install software onto the image.
+
+A machine image is a single static unit that contains a pre-configured
+operating system and installed software which is used to quickly
+create new running machines. Machine image formats change for each
+platform. Some examples include AMIs for EC2, VMDK/VMX files for
+VMware, OVF exports for VirtualBox, etc.
%prep
%setup -q
-%patch0 -p1
%build
-# avoid interfering with builder env
-unset GIT_WORK_TREE GIT_DIR
-
-export GOPATH=$(pwd)/GOPATH
-export GOBIN=$GOPATH/bin
-export PATH=$PATH:$GOBIN
-install -d $GOBIN
-
-setsid %{__make} || :
-
-%{?with_test:%{__make} test}
+%gobuild -mod=vendor -o %{name}-binary
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_bindir}
-cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
+cp -a %{name}-binary $RPM_BUILD_ROOT%{_bindir}/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc README.md CHANGELOG.md CONTRIBUTING.md LICENSE
+%doc README.md CHANGELOG.md LICENSE
%attr(755,root,root) %{_bindir}/packer
-%attr(755,root,root) %{_bindir}/packer-builder-amazon-chroot
-%attr(755,root,root) %{_bindir}/packer-builder-amazon-ebs
-%attr(755,root,root) %{_bindir}/packer-builder-amazon-instance
-%attr(755,root,root) %{_bindir}/packer-builder-digitalocean
-%attr(755,root,root) %{_bindir}/packer-builder-openstack
-%attr(755,root,root) %{_bindir}/packer-builder-virtualbox
-%attr(755,root,root) %{_bindir}/packer-builder-vmware
-%attr(755,root,root) %{_bindir}/packer-command-build
-%attr(755,root,root) %{_bindir}/packer-command-fix
-%attr(755,root,root) %{_bindir}/packer-command-inspect
-%attr(755,root,root) %{_bindir}/packer-command-validate
-%attr(755,root,root) %{_bindir}/packer-post-processor-vagrant
-%attr(755,root,root) %{_bindir}/packer-provisioner-chef-solo
-%attr(755,root,root) %{_bindir}/packer-provisioner-file
-%attr(755,root,root) %{_bindir}/packer-provisioner-puppet-masterless
-%attr(755,root,root) %{_bindir}/packer-provisioner-salt-masterless
-%attr(755,root,root) %{_bindir}/packer-provisioner-shell
diff --git a/build.patch b/build.patch
deleted file mode 100644
index 45cdc21..0000000
--- a/build.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- packer/scripts/build.sh 2013-09-26 00:24:44.414373468 +0300
-+++ /tmp/build.sh 2013-09-26 00:38:58.457386171 +0300
-@@ -1,4 +1,5 @@
- #!/bin/bash
-+set -x
- #
- # This script only builds the application from source.
- set -e
-@@ -17,7 +18,7 @@
- cd $DIR
-
- # Get the git commit
--GIT_COMMIT=$(git rev-parse HEAD)
-+GIT_COMMIT=$(git rev-parse HEAD || echo ca9426d6e73c2307e0f3d451adecccbe19241a8c)
- GIT_DIRTY=$(test -n "`git status --porcelain`" && echo "+CHANGES" || true)
-
- # If we're building on Windows, specify an extension
-@@ -36,7 +37,8 @@
- fi
-
- echo -e "${OK_COLOR}--> Installing dependencies to speed up builds...${NO_COLOR}"
--go get ./...
-+#pwd
-+go get ./... || :
-
- # This function waits for all background tasks to complete
- waitAll() {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/packer.git/commitdiff/19fd55a1364b105020b823a0d35646d1041103b3
More information about the pld-cvs-commit
mailing list