summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVít Ondruch <vondruch@redhat.com>2014-10-16 13:18:53 +0200
committerVít Ondruch <vondruch@redhat.com>2015-01-21 12:53:02 +0100
commitda831a8de6eacafac44a91339564cc05be940862 (patch)
treed77fc1bfb817e93423aba07df41ff99c4f76de7d
parentdd809e0ae8b40f3eab6c77aeb80af66970fdab9a (diff)
downloadfedora-vagrant-da831a8de6eacafac44a91339564cc05be940862.tar.gz
fedora-vagrant-da831a8de6eacafac44a91339564cc05be940862.tar.xz
fedora-vagrant-da831a8de6eacafac44a91339564cc05be940862.zip
Initial commit.
-rw-r--r--vagrant.spec269
1 files changed, 269 insertions, 0 deletions
diff --git a/vagrant.spec b/vagrant.spec
new file mode 100644
index 0000000..e6016b9
--- /dev/null
+++ b/vagrant.spec
@@ -0,0 +1,269 @@
+%global gem_name vagrant
+
+# Do not use auto-requires
+%global __requires_exclude_from %{gem_spec}
+
+Name: %{gem_name}
+Version: 1.6.5
+Release: 10%{?dist}
+Summary: Build and distribute virtualized development environments
+Group: Development/Languages
+License: MIT
+URL: http://vagrantup.com
+
+# Get the upstream sources:
+# git clone https://github.com/mitchellh/vagrant.git
+# git checkout v1.6.5
+# gem build vagrant.gemspec
+Source0: https://github.com/mitchellh/%{gem_name}/archive/v%{version}/%{gem_name}-%{version}.tar.gz
+
+# Upstream binstub with adjusted paths, the offical way how to run vagrant
+Source1: binstub
+
+# Upstream bash completion
+# https://raw.githubusercontent.com/mitchellh/vagrant/v1.6.5/contrib/bash/completion.sh
+Source3: completion.sh
+
+# Registration/unregistration of RPM-packaged or RubyGems-installed Vagrant plugins
+Source4: register.rb
+Source5: unregister.rb
+Source6: register_plugin.rb
+Source7: unregister_plugin.rb
+
+# Enable to (un)register RPM/RubyGems-installed plugins
+Patch0: 0001-Introduce-global-state.patch
+
+# Match dependencies we need
+#Patch1: 0001-Relax-dependencies.patch
+Patch1: vagrant-1.6.5-fix-dependencies.patch
+
+# English locales for registration of system-installed plugins
+Patch2: vagrant-1.6.5-locales.patch
+
+Requires: ruby(release)
+Requires: ruby(rubygems) >= 1.3.6
+Requires: rubygem(bundler) >= 1.5.2
+Requires: rubygem(json_pure)
+Requires: rubygem(hashicorp-checkpoint) >= 0.1.1
+Requires: rubygem(childprocess) >= 0.5.0
+Requires: rubygem(erubis) >= 2.7.0
+Requires: rubygem(i18n) >= 0.6.0
+Requires: rubygem(listen) >= 2.7.1
+Requires: rubygem(log4r)
+Requires: rubygem(net-ssh) >= 2.6.6
+Requires: rubygem(net-scp) >= 1.1.0
+Requires: bsdtar
+Requires: curl
+Requires: libffi
+Requires: libxml2
+Requires: libxslt
+Requires: libyaml
+Requires: openssl
+Requires: zlib
+Requires: ca-certificates
+# libvirt as a default provider
+#Requires: rubygem(vagrant-libvirt)
+
+# Vagrant libvirt requires (just for the time beeing so that plugin
+# installation from upstream gem is seemless)
+#Requires: rubygem(fog) >= 1.15
+#Requires: rubygem(fog) < 2
+#Requires: rubygem(nokogiri) >= 1.6
+#Requires: rubygem(nokogiri) < 1.7
+#Requires: rubygem(ruby-libvirt) >= 0.4.0
+#Requires: rubygem(ruby-libvirt) < 0.5.0
+#Requires: rubygem(json) = 1.8.1
+#Requires: rubygem(ffi) = 1.9.3
+#Requires: polkit-pkla-compat
+#Requires(pre): shadow-utils
+BuildRequires: rubygems-devel >= 1.3.6
+
+# For tests
+#BuildRequires: rubygem(listen) >= 2.7.1
+#BuildRequires: rubygem(childprocess) >= 0.5.0
+#BuildRequires: rubygem(net-ssh) >= 2.6.6
+#BuildRequires: rubygem(net-ssh) < 2.10
+#BuildRequires: rubygem(net-scp) >= 1.1.0
+#BuildRequires: rubygem(net-scp) < 1.2
+#BuildRequires: rubygem(i18n) >= 0.6.0
+#BuildRequires: rubygem(erubis) >= 2.7.0
+
+#BuildRequires: rubygem(minitest)
+#BuildRequires: rubygem(rspec)
+#BuildRequires: rubygem(mocha)
+#BuildRequires: rubygem(bundler)
+#BuildRequires: ruby-devel
+#BuildRequires: git
+BuildArch: noarch
+Provides: rubygem(%{gem_name}) = %{version}
+
+%description
+Vagrant is a tool for building and distributing virtualized development
+environments.
+
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
+
+%description doc
+Documentation for %{name}.
+
+
+%prep
+%setup -q
+#gem unpack %{SOURCE0}
+#
+#%setup -q -D -T -n %{gem_name}-%{version}
+#
+#gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
+
+#%patch0 -p1
+#%patch1 -p1
+#%patch2 -p1
+#
+#sed -i '/dependency/ d' %{gem_name}.gemspec
+
+# Add missing dependencies
+# These needs to be part of .gemspec so Bundler works as expected
+#sed -i -e "72i s\.add_dependency(\%q<json>)" %{gem_name}.gemspec
+#sed -i -e "72i s\.add_dependency(\%q<json_pure>)" %{gem_name}.gemspec
+
+#%%patch0 -p1
+#%%patch1 -p1
+#%%patch2 -p1
+#%%patch3 -p1
+
+%build
+gem build %{gem_name}.gemspec
+
+%gem_install
+
+%install
+mkdir -p %{buildroot}%{_datadir}/%{gem_name}
+cp -pa ./* \
+ %{buildroot}%{_datadir}/%{gem_name}/
+
+
+find %{buildroot}%{_datadir}/%{gem_name}/bin -type f | xargs chmod a+x
+
+
+ # gemfile.puts(%Q[gemspec :path => "#{File.expand_path '../../..', __FILE__}"])
+ # gemfile.puts(%Q[gem "vagrant", "= #{VERSION}"])
+
+
+# We need to change the bin stub generated by RubyGems to
+# something upstream uses for their package
+mkdir -p %{buildroot}%{_bindir}
+cat %{SOURCE1} > %{buildroot}%{_bindir}/vagrant
+#mkdir -p %{buildroot}/etc/pki/tls
+#cat %{SOURCE2} > %{buildroot}/etc/pki/tls/vagrant-cacert.pem
+
+# Add missing dependencies
+# These needs to be part of .gemspec so Bundler works as expected
+#sed -i -e "72i s\.add_dependency(\%q<json>)" %{buildroot}%{gem_spec}
+#sed -i -e "72i s\.add_dependency(\%q<json_pure>)" %{buildroot}%{gem_spec}
+#sed -i -e "72i s\.add_dependency(\%q<net-http-persistent>)" %{buildroot}%{gem_spec}
+
+
+# auto-completion
+install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/profile.d/vagrant.sh
+
+# create the global home dir
+install -d -m 755 %{buildroot}/etc/vagrant
+echo "{}" > %{buildroot}/etc/vagrant/plugins.json
+
+# hot fix: BundlerUI is Bundler::UI
+#sed -i -e "s|BundlerUI|Bundler::UI|" %{buildroot}%{gem_instdir}/lib/vagrant/bundler.rb
+#sed -i -e "237s|Bundler::UI|::Bundler::UI|" %{buildroot}%{gem_instdir}/lib/vagrant/bundler.rb
+#sed -i -e "243,245d" %{buildroot}%{gem_instdir}/lib/vagrant/bundler.rb
+#
+## add global plugin registering commands
+#install -m 644 %{SOURCE4} %{buildroot}%{gem_instdir}/plugins/commands/plugin/command/
+#install -m 644 %{SOURCE5} %{buildroot}%{gem_instdir}/plugins/commands/plugin/command/
+#install -m 644 %{SOURCE6} %{buildroot}%{gem_instdir}/plugins/commands/plugin/action/
+#install -m 644 %{SOURCE7} %{buildroot}%{gem_instdir}/plugins/commands/plugin/action/
+#
+## Fix getting the SSL cert path for the downloader
+#sed -i -e "s/downloader_options\[:ca_cert\] = env\[:box_download_ca_cert\]/downloader_options\[:ca_cert\] = (env\[:box_download_ca_cert\] || ENV\['SSL_CERT_FILE'\])/" %{buildroot}%{gem_instdir}/lib/vagrant/action/builtin/box_add.rb
+
+
+# libvirt as a default
+#sed -i -e "s|If all else fails, return VirtualBox|If all else fails, return libvirt|" %{buildroot}%{gem_instdir}/lib/vagrant/environment.rb
+#sed -i -e "s|return :virtualbox|return :libvirt|" %{buildroot}%{gem_instdir}/lib/vagrant/environment.rb
+
+# Temporal fix for Vagrant not seeing the extensions
+# Let's require them sooner
+#sed -i -e "2irequire 'nokogiri'" %{buildroot}%{gem_instdir}/bin/vagrant
+#sed -i -e "3irequire 'libvirt'" %{buildroot}%{gem_instdir}/bin/vagrant
+
+#%%check
+#pushd .%{gem_instdir}
+#gem install log4r --version 1.1.10 -N
+#gem install wdm -N
+#gem install winrm -N
+#gem install rb-kqueue -N
+#gem install listen --version 2.7.1 -N
+#gem install childprocess --version 0.5.0 -N
+#bundle install
+#rm -rf ./test/unit/vagrant/plugin/
+#ruby -rbundler -I.:test:lib -e 'Dir.glob "test/unit/vagrant/*_test.rb", &method(:require)'
+#popd
+
+%pre
+getent group vagrant >/dev/null || groupadd -r vagrant
+
+%post
+vagrant plugin register vagrant-libvirt >/dev/null || :
+
+%files
+%{_datadir}/%{gem_name}
+%dir %{_sysconfdir}/vagrant
+%{_bindir}/vagrant
+%config %{_sysconfdir}/profile.d/vagrant.sh
+# RPM/RubyGems-installed plugin registry
+%{_sysconfdir}/vagrant/plugins.json
+
+%files doc
+
+%changelog
+* Tue Oct 14 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-10
+- rebuilt
+
+* Tue Oct 07 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-9
+- Register vagrant-libvirt automatically
+
+* Tue Sep 30 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-8
+- Set libvirt as a default provider
+
+* Tue Sep 23 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-7
+- Require core dependencies for vagrant-libvirt beforehand
+
+* Mon Sep 22 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-6
+- Fix SSL cert path for the downloader
+
+* Tue Sep 16 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-5
+- rebuilt
+
+* Tue Sep 16 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-4
+- rebuilt
+
+* Sat Sep 13 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-3
+- Include libvirt requires for now
+
+* Wed Sep 10 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-2
+- Add missing deps on Bundler and hashicorp-checkpoint
+
+* Mon Sep 08 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-1
+* Update to 1.6.5
+
+* Mon Sep 08 2014 Josef Stribny <jstribny@redhat.com> - 1.6.3-2
+- Clean up
+- Update to 1.6.3
+
+* Fri Oct 18 2013 <adrahon@redhat.com> - 1.3.3-1.1
+- Misc bug fixes, no separate package for docs, /etc/vagrant management
+
+* Tue Sep 24 2013 <adrahon@redhat.com> - 1.3.3-1
+- Initial package