]> git.pld-linux.org Git - packages/packer.git/commitdiff
up to 1.5.4; rel 1 master
authormis <mis@pld-linux.org>
Thu, 12 Mar 2020 16:06:54 +0000 (17:06 +0100)
committermis <mis@pld-linux.org>
Thu, 12 Mar 2020 16:06:54 +0000 (17:06 +0100)
build.patch [deleted file]
packer.spec

diff --git a/build.patch b/build.patch
deleted file mode 100644 (file)
index 45cdc21..0000000
+++ /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() {
index 6c3cb820428182021413d4cc7ab453d70d3e72bc..50676d1ed5522275569486996178e53af55935ce 100644 (file)
@@ -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
This page took 0.060908 seconds and 4 git commands to generate.