186 lines
5.7 KiB
RPMSpec
186 lines
5.7 KiB
RPMSpec
%global vagrant_plugin_name vagrant-libvirt
|
|
|
|
Name: %{vagrant_plugin_name}
|
|
Version: 0.0.24
|
|
Release: 5%{?dist}
|
|
Summary: libvirt provider for Vagrant
|
|
Group: Development/Languages
|
|
License: MIT
|
|
URL: https://github.com/pradels/vagrant-libvirt
|
|
Source0: https://rubygems.org/gems/%{vagrant_plugin_name}-%{version}.gem
|
|
Source1: 10-vagrant-libvirt.rules
|
|
# Adjust Vagrant's dependencies.
|
|
Patch0: vagrant-libvirt-fix-dependencies.patch
|
|
# Shebang in Rakefile doesn't make sense.
|
|
# https://github.com/pradels/vagrant-libvirt/pull/295
|
|
Patch1: vagrant-libvirt-Rakefile.patch
|
|
# Wait for libvirt to shutdown the domain
|
|
# https://github.com/pradels/vagrant-libvirt/pull/347
|
|
Patch2: vagrant-libvirt-fix-halting.patch
|
|
# Fix parsing leases when 'vagrant halt; vagrant up' is called
|
|
# https://github.com/pradels/vagrant-libvirt/pull/356
|
|
Patch3: vagrant-libvirt-fix-dhcp-lease-parsing.patch
|
|
# Pass MAC addresses up to vagrant to ensure interfaces are configured correctly
|
|
# https://github.com/pradels/vagrant-libvirt/pull/408
|
|
Patch4: vagrant-libvirt-match-interface-by-mac.patch
|
|
Requires(pre): shadow-utils
|
|
Requires(posttrans): vagrant
|
|
Requires(preun): vagrant
|
|
Requires: ruby(release)
|
|
Requires: ruby(rubygems)
|
|
Requires: rubygem(fog) => 1.22
|
|
Requires: rubygem(fog) < 2
|
|
Requires: rubygem(ruby-libvirt)
|
|
#Requires: rubygem(ruby-libvirt) => 0.5.0
|
|
#Requires: rubygem(ruby-libvirt) < 0.6
|
|
Requires: rubygem(nokogiri) => 1.6.0
|
|
Requires: rubygem(nokogiri) < 1.7
|
|
Requires: rubygem(multi_json)
|
|
Requires: libvirt
|
|
# vagrant-libvirt supports only kvm and qemu for now.
|
|
# https://github.com/pradels/vagrant-libvirt#provider-options
|
|
Requires: libvirt-daemon-kvm
|
|
Requires: polkit
|
|
Requires: vagrant
|
|
BuildRequires: vagrant
|
|
BuildRequires: rubygem(rspec) < 3
|
|
BuildRequires: rubygem(fog)
|
|
BuildRequires: rubygem(ruby-libvirt)
|
|
BuildArch: noarch
|
|
Provides: vagrant(%{vagrant_plugin_name}) = %{version}
|
|
|
|
%description
|
|
libvirt provider for Vagrant.
|
|
|
|
%package doc
|
|
Summary: Documentation for %{name}
|
|
Group: Documentation
|
|
Requires: %{name} = %{version}-%{release}
|
|
BuildArch: noarch
|
|
|
|
%description doc
|
|
Documentation for %{name}.
|
|
|
|
%prep
|
|
gem unpack %{SOURCE0}
|
|
|
|
%setup -q -D -T -n %{vagrant_plugin_name}-%{version}
|
|
|
|
gem spec %{SOURCE0} -l --ruby > %{vagrant_plugin_name}.gemspec
|
|
|
|
%patch0 -p1
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
%patch3 -p1
|
|
%patch4 -p1
|
|
|
|
%build
|
|
gem build %{vagrant_plugin_name}.gemspec
|
|
%vagrant_plugin_install
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{vagrant_plugin_dir}
|
|
cp -a .%{vagrant_plugin_dir}/* \
|
|
%{buildroot}%{vagrant_plugin_dir}/
|
|
|
|
# polkit rule for vagrant group.
|
|
#mkdir -p %{buildroot}%{_datadir}/polkit-1/rules.d
|
|
#install -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/polkit-1/rules.d/
|
|
mkdir -p %{buildroot}%{vagrant_plugin_docdir}/polkit
|
|
install -m 0644 %{SOURCE1} %{buildroot}%{vagrant_plugin_docdir}/polkit
|
|
|
|
%check
|
|
pushd .%{vagrant_plugin_instdir}
|
|
sed -i '/:git/ s|:git.*$|:path => "%{vagrant_dir}"|' Gemfile
|
|
sed -i '/rspec/ s|\[\".*\"]|["~> 2.0"]|' vagrant-libvirt.gemspec
|
|
|
|
bundle exec rspec spec
|
|
popd
|
|
|
|
%pre
|
|
getent group vagrant >/dev/null || groupadd -r vagrant
|
|
|
|
%posttrans
|
|
%vagrant_plugin_register %{vagrant_plugin_name}
|
|
|
|
%preun
|
|
%vagrant_plugin_unregister %{vagrant_plugin_name}
|
|
|
|
%files
|
|
%dir %{vagrant_plugin_instdir}
|
|
%license %{vagrant_plugin_instdir}/LICENSE
|
|
%doc %{vagrant_plugin_instdir}/README.md
|
|
%{vagrant_plugin_libdir}
|
|
%{vagrant_plugin_instdir}/locales
|
|
%{vagrant_plugin_instdir}/tools
|
|
%exclude %{vagrant_plugin_cache}
|
|
%exclude %{vagrant_plugin_instdir}/.gitignore
|
|
%{vagrant_plugin_spec}
|
|
# polkit
|
|
# TODO: Disabled for now, since this might have security implications.
|
|
#%exclude %{_datadir}/polkit-1/rules.d/10-vagrant-libvirt.rules
|
|
|
|
%files doc
|
|
%doc %{vagrant_plugin_docdir}
|
|
%doc %{vagrant_plugin_instdir}/example_box
|
|
%doc %{vagrant_plugin_instdir}/CHANGELOG.md
|
|
%{vagrant_plugin_instdir}/Rakefile
|
|
%{vagrant_plugin_instdir}/Gemfile
|
|
%{vagrant_plugin_instdir}/vagrant-libvirt.gemspec
|
|
%{vagrant_plugin_instdir}/spec
|
|
|
|
|
|
%changelog
|
|
* Fri Jul 10 2015 Dan Williams <dcbw@redhat.com> - 0.0.24-5
|
|
- Fix: parsing of DHCP leases when vagrant up/halt have been used
|
|
- Fix: pass MAC addresses to vagrant to configure interfaces correctly
|
|
|
|
* Tue Apr 21 2015 Josef Stribny <jstribny@redhat.com> - 0.0.24-4
|
|
- Fix: Wait for libvirt to shutdown the domain
|
|
|
|
* Wed Jan 28 2015 Michael Adam <madam@redhat.com> - 0.0.24-3
|
|
- Ship the polkit rules file as example in the docs package.
|
|
|
|
* Wed Jan 28 2015 Michael Adam <madam@redhat.com> - 0.0.24-2
|
|
- Adapt dependencies for fedora 21.
|
|
|
|
* Wed Jan 28 2015 Vít Ondruch <vondruch@redhat.com> - 0.0.24-2
|
|
- Do not ship polkit rules for now, since this might have security implications.
|
|
|
|
* Fri Jan 23 2015 Michael Adam <madam@redhat.com> - 0.0.24-2
|
|
- Move README.md to main package as doc.
|
|
- Rename 10-vagrant.rules to 10-vagrant-libvirt.rules.
|
|
- Move LICENSE to main package as license file.
|
|
- Remove shebang from non-executable Rakefile.
|
|
|
|
* Thu Jan 22 2015 Michael Adam <madam@redhat.com> - 0.0.24-1
|
|
- Update to version 0.0.24.
|
|
|
|
* Thu Jan 22 2015 Michael Adam <madam@redhat.com> - 0.0.23-4
|
|
- Fix rake dependency.
|
|
- Rename patch file.
|
|
- Improve description.
|
|
|
|
* Thu Nov 27 2014 Vít Ondruch <vondruch@redhat.com> - 0.0.23-4
|
|
- Add vagrant(vagrant-libvirt) virtual provide.
|
|
|
|
* Wed Nov 26 2014 Vít Ondruch <vondruch@redhat.com> - 0.0.23-3
|
|
- Enable test suite.
|
|
- Update polkit rules.
|
|
|
|
* Mon Nov 24 2014 Josef Stribny <jstribny@redhat.com> - 0.0.23-2
|
|
- Register and unregister the plugin using macros
|
|
|
|
* Tue Oct 14 2014 Josef Stribny <jstribny@redhat.com> - 0.0.23-1
|
|
- Update to 0.0.23
|
|
- Use ruby-libvirt 0.5.x
|
|
- Move the rest of the doc files to -doc
|
|
|
|
* Tue Sep 16 2014 Josef Stribny <jstribny@redhat.com> - 0.0.20-2
|
|
- Register and unregister automatically
|
|
|
|
* Wed Sep 10 2014 Josef Stribny <jstribny@redhat.com> - 0.0.20-1
|
|
- Update to 0.0.20
|
|
|
|
* Fri Jun 27 2014 Adam Miller <maxamillion@fedoraproject.org> - 0.0.16-1
|
|
- Initial package for Fedora
|