1 Summary: Tool for creating identical machine images for multiple platforms from a single source configuration
6 Group: Applications/Emulators
7 Source0: https://github.com/hashicorp/packer/archive/v%{version}.tar.gz
8 # Source0-md5: 8c11adb7aa529793675a075dc9db40b0
9 URL: http://www.packer.io/
11 BuildRequires: golang >= 1.13
12 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
14 %define _enable_debug_packages 0
15 %define gobuild go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x
18 Packer is an open source tool for creating identical machine images
19 for multiple platforms from a single source configuration. Packer is
20 lightweight, runs on every major operating system, and is highly
21 performant, creating machine images for multiple platforms in
22 parallel. Packer does not replace configuration management like Chef
23 or Puppet. In fact, when building images, Packer is able to use tools
24 like Chef or Puppet to install software onto the image.
26 A machine image is a single static unit that contains a pre-configured
27 operating system and installed software which is used to quickly
28 create new running machines. Machine image formats change for each
29 platform. Some examples include AMIs for EC2, VMDK/VMX files for
30 VMware, OVF exports for VirtualBox, etc.
36 %gobuild -mod=vendor -o %{name}-binary
39 rm -rf $RPM_BUILD_ROOT
40 install -d $RPM_BUILD_ROOT%{_bindir}
41 cp -a %{name}-binary $RPM_BUILD_ROOT%{_bindir}/%{name}
44 rm -rf $RPM_BUILD_ROOT
47 %defattr(644,root,root,755)
48 %doc README.md CHANGELOG.md LICENSE
49 %attr(755,root,root) %{_bindir}/packer