2016-04-12 19:31:48 +02:00
|
|
|
#
|
|
|
|
# spec file for package vagrant
|
|
|
|
#
|
2019-03-23 20:34:56 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2016-04-12 19:31:48 +02:00
|
|
|
# Copyright (c) 2012 Laurent Bigonville <bigon@debian.org>, License GPL-2.0+
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-11-26 13:08:37 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-04-12 19:31:48 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2019-04-11 20:03:08 +02:00
|
|
|
%global mod_name vagrant
|
|
|
|
%global mod_full_name %{mod_name}-%{version}
|
2018-07-06 10:42:03 +02:00
|
|
|
#
|
|
|
|
# Use
|
|
|
|
#
|
|
|
|
%global vim_data_dir %{_datadir}/vim/site/plugin/
|
2016-04-12 19:31:48 +02:00
|
|
|
|
2019-04-11 20:03:08 +02:00
|
|
|
|
2016-04-12 19:31:48 +02:00
|
|
|
Name: vagrant
|
2019-03-23 20:34:56 +01:00
|
|
|
Version: 2.2.4
|
2016-04-12 19:31:48 +02:00
|
|
|
Release: 0
|
2018-07-06 10:42:03 +02:00
|
|
|
Summary: Tool for building and distributing virtualized development environments
|
2016-04-12 19:31:48 +02:00
|
|
|
License: MIT
|
|
|
|
Group: Development/Languages/Ruby
|
2018-07-06 10:42:03 +02:00
|
|
|
Url: https://github.com/hashicorp/vagrant
|
2019-04-11 20:03:08 +02:00
|
|
|
Source0: %{URL}/archive/v%{version}/%{name}-%{version}.tar.gz
|
2018-07-06 10:42:03 +02:00
|
|
|
Source11: vagrant.1
|
2019-04-11 20:03:08 +02:00
|
|
|
Source93: vagrant_transfiletriggerin.rb
|
|
|
|
Source94: vagrant_transfiletriggerun.rb
|
|
|
|
Source95: vagrant_post.rb
|
|
|
|
Source96: binstub
|
|
|
|
Source97: macros.vagrant
|
2018-07-06 10:42:03 +02:00
|
|
|
Source98: README.SUSE
|
2016-04-12 19:31:48 +02:00
|
|
|
Provides: rubygem-vagrant = %{version}
|
|
|
|
Obsoletes: rubygem-vagrant < %{version}
|
|
|
|
Recommends: vagrant-libvirt
|
|
|
|
#
|
2017-03-12 20:03:16 +01:00
|
|
|
Patch2: 0002-bin-vagrant-silence-warning-about-installer.patch
|
|
|
|
Patch3: 0003-Use-a-private-temporary-dir.patch
|
|
|
|
Patch4: 0004-linux-cap-halt-don-t-wait-for-shutdown-h-now-to-fini.patch
|
|
|
|
Patch9: 0009-plugins-don-t-abuse-require_relative.patch
|
2017-08-31 21:03:29 +02:00
|
|
|
#
|
|
|
|
#
|
|
|
|
# try building with ruby2.4
|
|
|
|
Patch23: 0023-vbox-fix-package.patch
|
|
|
|
Patch24: 0024-do-not-depend-on-wdm.patch
|
2017-11-07 09:59:57 +01:00
|
|
|
Patch25: 0025-do-not-abuse-relative-paths-in-docker-plugin.patch
|
2019-01-15 09:10:08 +01:00
|
|
|
Patch26: 0026-do-not-abuse-relative-paths-in-plugins.patch
|
2019-04-11 20:03:08 +02:00
|
|
|
Patch27: 0027-Fix-unit-tests-for-GuestLinux-Cap-Halt.patch
|
|
|
|
Patch28: 0028-Skip-failing-tests.patch
|
2016-04-12 19:31:48 +02:00
|
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2019-04-11 20:03:08 +02:00
|
|
|
|
|
|
|
# we use the rpm macros in this spec
|
|
|
|
%{?load:%{SOURCE97}}
|
|
|
|
|
2018-07-06 10:42:03 +02:00
|
|
|
# force only one ruby version
|
2019-04-11 20:03:08 +02:00
|
|
|
# CAUTION: if you change this, then you *must* also change the sed calls which
|
|
|
|
# fix these values in macros.vagrant
|
|
|
|
%global rb_build_versions %rb_default_ruby
|
|
|
|
%global rb_build_abi %rb_default_ruby_abi
|
|
|
|
|
|
|
|
%global vagrant_plugin_name vagrant
|
|
|
|
|
|
|
|
|
|
|
|
#===============================================================================
|
|
|
|
# Build dependencies
|
|
|
|
#===============================================================================
|
|
|
|
|
|
|
|
# s.required_ruby_version = "~> 2.2", "< 2.7"
|
2019-02-03 18:58:38 +01:00
|
|
|
BuildRequires: %{ruby < 2.7}
|
2019-04-11 20:03:08 +02:00
|
|
|
BuildRequires: %{ruby:2 >= 2.2}
|
2018-07-06 10:42:03 +02:00
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
2016-04-12 19:31:48 +02:00
|
|
|
BuildRequires: %{rubygem bundler}
|
2019-02-03 18:58:38 +01:00
|
|
|
# s.add_dependency "bcrypt_pbkdf", "~> 1.0.0"
|
2019-03-10 17:28:57 +01:00
|
|
|
BuildRequires: %{rubygem bcrypt_pbkdf:1.0 }
|
2018-07-06 10:42:03 +02:00
|
|
|
# s.add_dependency "childprocess", "~> 0.6.0"
|
|
|
|
BuildRequires: %{rubygem childprocess:0.6 }
|
2019-02-03 18:58:38 +01:00
|
|
|
# s.add_dependency "ed25519", "~> 1.2.4"
|
2019-03-10 17:28:57 +01:00
|
|
|
BuildRequires: %{rubygem ed25519:1.2 >= 1.2.4 }
|
2018-07-06 10:42:03 +02:00
|
|
|
# s.add_dependency "erubis", "~> 2.7.0"
|
|
|
|
BuildRequires: %{rubygem erubis:2.7 }
|
2019-02-03 18:58:38 +01:00
|
|
|
# s.add_dependency "i18n", "~> 1.1.1"
|
2019-03-10 17:28:57 +01:00
|
|
|
BuildRequires: %{rubygem i18n:1.1 >= 1.1.1 }
|
2018-07-06 10:42:03 +02:00
|
|
|
# s.add_dependency "listen", "~> 3.1.5"
|
2019-03-10 17:28:57 +01:00
|
|
|
BuildRequires: %{rubygem listen:3.1 >= 3.1.5 }
|
2019-02-03 18:58:38 +01:00
|
|
|
# s.add_dependency "hashicorp-checkpoint", "~> 0.1.5"
|
2019-03-10 17:28:57 +01:00
|
|
|
BuildRequires: %{rubygem hashicorp-checkpoint:0.1 >= 0.1.5 }
|
2018-07-06 10:42:03 +02:00
|
|
|
# s.add_dependency "log4r", "~> 1.1.9", "< 1.1.11"
|
2019-03-10 17:28:57 +01:00
|
|
|
BuildRequires: %{rubygem log4r:1.1 >= 1.1.9 }
|
|
|
|
BuildConflicts: %{rubygem log4r:1.1 >= 1.1.11 }
|
2019-04-11 19:30:21 +02:00
|
|
|
# s.add_dependency "net-ssh", "~> 5.1.0"
|
|
|
|
BuildRequires: %{rubygem net-ssh:5.1}
|
2018-07-06 10:42:03 +02:00
|
|
|
# s.add_dependency "net-sftp", "~> 2.1"
|
2019-03-10 17:28:57 +01:00
|
|
|
BuildRequires: %{rubygem net-sftp:2 >= 2.1 }
|
2019-02-03 18:58:38 +01:00
|
|
|
# s.add_dependency "net-scp", "~> 1.2.0"
|
|
|
|
BuildRequires: %{rubygem net-scp:1.2 }
|
2018-07-06 10:42:03 +02:00
|
|
|
# s.add_dependency "rb-kqueue", "~> 0.2.0"
|
|
|
|
BuildRequires: %{rubygem rb-kqueue:0.2 }
|
|
|
|
# s.add_dependency "rest-client", ">= 1.6.0", "< 3.0"
|
|
|
|
BuildRequires: %{rubygem rest-client >= 1.6}
|
2019-03-10 17:28:57 +01:00
|
|
|
BuildConflicts: %{rubygem rest-client >= 3.0}
|
2019-02-03 18:58:38 +01:00
|
|
|
# s.add_dependency "rubyzip", "~> 1.2.2"
|
2019-03-10 17:28:57 +01:00
|
|
|
BuildRequires: %{rubygem rubyzip:1.2 >= 1.2.2}
|
2017-08-31 21:03:29 +02:00
|
|
|
# Intentionally removed, wdm only works on Windows
|
2019-04-11 20:03:08 +02:00
|
|
|
# BuildRequires: %%{rubygem wdm }
|
2018-07-06 10:42:03 +02:00
|
|
|
# s.add_dependency "winrm", "~> 2.1"
|
2019-03-10 17:28:57 +01:00
|
|
|
BuildRequires: %{rubygem winrm:2 >= 2.1 }
|
2018-07-06 10:42:03 +02:00
|
|
|
# s.add_dependency "winrm-fs", "~> 1.0"
|
|
|
|
BuildRequires: %{rubygem winrm-fs:1 }
|
2019-02-03 18:58:38 +01:00
|
|
|
# s.add_dependency "winrm-elevated", "~> 1.1"
|
2019-04-11 20:03:08 +02:00
|
|
|
BuildRequires: %{rubygem winrm-elevated:1 >= 1.1 }
|
|
|
|
# s.add_dependency "vagrant_cloud", "~> 2.0.2"
|
|
|
|
BuildRequires: %{rubygem vagrant_cloud:2.0 >= 2.0.2 }
|
2019-02-03 18:58:38 +01:00
|
|
|
|
|
|
|
# devel dependencies:
|
|
|
|
# s.add_development_dependency "rake", "~> 12.0.0"
|
|
|
|
BuildRequires: %{rubygem rake:12.0 }
|
|
|
|
# s.add_development_dependency "rspec", "~> 3.5.0"
|
|
|
|
BuildRequires: %{rubygem rspec:3.5 }
|
|
|
|
# s.add_development_dependency "rspec-its", "~> 1.2.0"
|
|
|
|
BuildRequires: %{rubygem rspec-its:1.2 }
|
|
|
|
# s.add_dependency "ruby_dep", "<= 1.3.1"
|
|
|
|
BuildRequires: %{rubygem ruby_dep <= 1.3.1 }
|
|
|
|
# s.add_development_dependency "webmock", "~> 2.3.1"
|
2019-03-10 17:28:57 +01:00
|
|
|
BuildRequires: %{rubygem webmock:2.3 >= 2.3.1 }
|
2019-02-03 18:58:38 +01:00
|
|
|
# s.add_development_dependency "fake_ftp", "~> 0.1.1"
|
2019-03-10 17:28:57 +01:00
|
|
|
BuildRequires: %{rubygem fake_ftp:0.1 >= 0.1.1 }
|
2019-02-03 18:58:38 +01:00
|
|
|
|
2019-04-11 20:03:08 +02:00
|
|
|
# Prevent have choice for rubygem(ruby:2.6.0:mime-types) >= 2
|
|
|
|
BuildRequires: %{rubygem mime-types:3 }
|
|
|
|
# Prevent have choice for rubygem(ruby:2.6.0:builder) >= 2.1.2
|
|
|
|
BuildRequires: %{rubygem builder:3.1 }
|
|
|
|
# Prevent have choice for rubygem(ruby:2.6.0:ffi) >= 0.5.0
|
|
|
|
BuildRequires: %{rubygem ffi:1.2 }
|
|
|
|
# Prevent have choice for rubygem(ruby:2.5.0:thor:0) >= 0.18
|
|
|
|
BuildRequires: %{rubygem thor:0.19}
|
|
|
|
# have choice for rubygem(ruby:2.5.0:addressable) >= 2.3.6
|
|
|
|
BuildRequires: %{rubygem addressable:2.4}
|
2019-02-03 18:58:38 +01:00
|
|
|
|
|
|
|
BuildRequires: ruby-macros >= 5
|
|
|
|
|
2019-04-11 20:03:08 +02:00
|
|
|
# for the test
|
|
|
|
BuildRequires: openssh
|
|
|
|
BuildRequires: curl
|
|
|
|
BuildRequires: bsdtar
|
|
|
|
BuildRequires: %{rubygem vagrant-spec}
|
|
|
|
|
|
|
|
|
|
|
|
#===============================================================================
|
|
|
|
# Runtime dependencies
|
|
|
|
#===============================================================================
|
|
|
|
|
2018-07-06 10:42:03 +02:00
|
|
|
#
|
|
|
|
#
|
2019-02-03 18:58:38 +01:00
|
|
|
# s.add_dependency "bcrypt_pbkdf", "~> 1.0.0"
|
2019-03-10 17:28:57 +01:00
|
|
|
Requires: %{rubygem bcrypt_pbkdf:1.0 }
|
2019-02-03 18:58:38 +01:00
|
|
|
# s.add_dependency "childprocess", "~> 0.6.0"
|
|
|
|
Requires: %{rubygem childprocess:0.6}
|
|
|
|
# s.add_dependency "ed25519", "~> 1.2.4"
|
2019-03-10 17:28:57 +01:00
|
|
|
Requires: %{rubygem ed25519:1.2 >= 1.2.4}
|
2019-02-03 18:58:38 +01:00
|
|
|
# s.add_dependency "erubis", "~> 2.7.0"
|
|
|
|
Requires: %{rubygem erubis:2.7}
|
2019-04-11 20:03:08 +02:00
|
|
|
# s.add_dependency "i18n", "~> 1.1.1"
|
|
|
|
Requires: %{rubygem i18n:1.1 >= 1.1.1}
|
|
|
|
# s.add_dependency "listen", "~> 3.1.5"
|
|
|
|
Requires: %{rubygem listen >= 3.1.5}
|
|
|
|
# s.add_dependency "hashicorp-checkpoint", "~> 0.1.5"
|
|
|
|
Requires: %{rubygem hashicorp-checkpoint:0.1 >= 0.1.5}
|
|
|
|
# s.add_dependency "log4r", "~> 1.1.9", "< 1.1.11"
|
|
|
|
Requires: %{rubygem log4r:1.1 >= 1.1.9 }
|
|
|
|
Requires: %{rubygem log4r:1.1 < 1.1.11 }
|
|
|
|
# s.add_dependency "net-ssh", "~> 5.1.0"
|
|
|
|
Requires: %{rubygem net-ssh:5.1}
|
|
|
|
# s.add_dependency "net-sftp", "~> 2.1"
|
|
|
|
Requires: %{rubygem net-sftp:2 >= 2.1}
|
|
|
|
# s.add_dependency "net-scp", "~> 1.2.0"
|
|
|
|
Requires: %{rubygem net-scp:1.2 >= 1.2.0}
|
|
|
|
# s.add_dependency "rb-kqueue", "~> 0.2.0"
|
|
|
|
Requires: %{rubygem rb-kqueue:0.2}
|
|
|
|
# s.add_dependency "rest-client", ">= 1.6.0", "< 3.0"
|
|
|
|
Requires: %{rubygem rest-client >= 1.6}
|
|
|
|
Requires: %{rubygem rest-client < 3.0}
|
|
|
|
# s.add_dependency "wdm", "~> 0.1.0"
|
|
|
|
# skip wdm, Windows only
|
|
|
|
# s.add_dependency "winrm", "~> 2.1"
|
|
|
|
Requires: %{rubygem winrm:2 >= 2.1}
|
|
|
|
# s.add_dependency "winrm-fs", "~> 1.0"
|
|
|
|
Requires: %{rubygem winrm-fs:1}
|
|
|
|
# s.add_dependency "winrm-elevated", "~> 1.1"
|
|
|
|
Requires: %{rubygem winrm-elevated:1 >= 1.1}
|
|
|
|
# s.add_dependency "vagrant_cloud", "~> 2.0.2"
|
|
|
|
Requires: %{rubygem vagrant_cloud:2.0 >= 2.0.2}
|
|
|
|
# s.add_dependency "ruby_dep", "<= 1.3.1"
|
|
|
|
Requires: %{rubygem ruby_dep <= 1.3.1 }
|
|
|
|
|
|
|
|
|
2017-03-12 20:03:16 +01:00
|
|
|
# We don't require rubygem mime-types since it's pulled in transitively
|
2016-04-12 19:31:48 +02:00
|
|
|
#
|
|
|
|
Requires: bsdtar
|
|
|
|
Requires: curl
|
|
|
|
Requires: openssh
|
2019-04-11 20:03:08 +02:00
|
|
|
|
2016-04-12 19:31:48 +02:00
|
|
|
%description
|
|
|
|
Vagrant is a tool for building and distributing virtualized development
|
|
|
|
environments.
|
|
|
|
|
2019-04-11 20:03:08 +02:00
|
|
|
%package doc
|
|
|
|
Summary: Documentation for Vagrant
|
|
|
|
Group: Documentation/HTML
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
This package contains the documentation for vagrant.
|
|
|
|
|
|
|
|
%package vim
|
2016-04-12 19:31:48 +02:00
|
|
|
Summary: Vagrantfile syntax files for the vim editor
|
|
|
|
Group: Development/Languages/Ruby
|
|
|
|
Supplements: packageand(vagrant:vim)
|
|
|
|
BuildRequires: vim
|
2018-07-08 21:39:15 +02:00
|
|
|
Requires: vagrant = %{version}
|
2016-04-12 19:31:48 +02:00
|
|
|
Requires: vim
|
|
|
|
BuildArch: noarch
|
|
|
|
|
2019-04-11 20:03:08 +02:00
|
|
|
%description vim
|
2016-04-12 19:31:48 +02:00
|
|
|
Optional dependency offering vim syntax files for Vagrantfile
|
|
|
|
|
2019-04-11 20:03:08 +02:00
|
|
|
%package emacs
|
2016-04-12 19:31:48 +02:00
|
|
|
Summary: Vagrantfile syntax files for the emacs editor
|
|
|
|
Group: Development/Languages/Ruby
|
|
|
|
Supplements: packageand(vagrant:emacs_program)
|
|
|
|
BuildRequires: emacs-nox
|
|
|
|
Requires: emacs_program
|
2018-11-26 13:08:37 +01:00
|
|
|
Requires: vagrant = %{version}
|
2016-04-12 19:31:48 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
2019-04-11 20:03:08 +02:00
|
|
|
%description emacs
|
2016-04-12 19:31:48 +02:00
|
|
|
Optional dependency offering emacs syntax files for Vagrantfile
|
|
|
|
|
|
|
|
%package bash-completion
|
|
|
|
Summary: Vagrant bash autocompletion
|
|
|
|
Group: Development/Languages/Ruby
|
|
|
|
Supplements: packageand(vagrant:bash)
|
2018-07-06 10:42:03 +02:00
|
|
|
BuildRequires: bash
|
2018-11-17 20:28:51 +01:00
|
|
|
BuildRequires: bash-completion
|
2016-04-12 19:31:48 +02:00
|
|
|
Requires: bash
|
2018-11-17 20:28:51 +01:00
|
|
|
Requires: bash-completion
|
2018-11-26 13:08:37 +01:00
|
|
|
Requires: vagrant = %{version}
|
2016-04-12 19:31:48 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description bash-completion
|
|
|
|
Optional dependency offering bash completion for vagrant
|
|
|
|
|
|
|
|
%prep
|
2019-04-11 20:03:08 +02:00
|
|
|
%autosetup -p 1 -n %{mod_full_name}
|
2016-04-12 19:31:48 +02:00
|
|
|
|
2018-07-06 10:42:03 +02:00
|
|
|
cp %{SOURCE98} .
|
2016-04-12 19:31:48 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
mv %{mod_name}.gemspec %{mod_full_name}.gemspec
|
|
|
|
%gem_build
|
|
|
|
mv %{mod_full_name}.gem %{_sourcedir}
|
|
|
|
|
|
|
|
%install
|
2019-04-11 20:03:08 +02:00
|
|
|
|
|
|
|
CONFIGURE_ARGS="--with-cflags='%{optflags}' $CONFIGURE_ARGS"
|
|
|
|
gem install -V -f --local --no-user-install \
|
|
|
|
--ignore-dependencies --no-document --backtrace \
|
|
|
|
--document=rdoc,ri \
|
|
|
|
--install-dir %{buildroot}%{vagrant_plugin_dir} \
|
|
|
|
--bindir %{buildroot}%{vagrant_plugin_dir}/bin %{_sourcedir}/%{mod_full_name}.gem
|
|
|
|
|
|
|
|
# the actual vagrant binary generated from the binstub
|
|
|
|
install -D -m 755 %{SOURCE96} %{buildroot}%{_bindir}/vagrant
|
|
|
|
sed -i 's|@vagrant_embedded_dir@|%{vagrant_embedded_dir}|' %{buildroot}%{_bindir}/vagrant
|
|
|
|
gem_path=$(ruby.%{rb_default_ruby_suffix} -e "print Gem.path.reject{|path| path.include? 'home'}.join(':')")
|
|
|
|
sed -i "s|@ruby_vagrant_gem_path@|$gem_path:%{vagrant_plugin_dir}|" %{buildroot}%{_bindir}/vagrant
|
|
|
|
|
|
|
|
# install the rpm macros & expand the name, name-version and vagrant_rb_* macros
|
|
|
|
%global macros_vagrant %{_rpmconfigdir}/macros.d/macros.%{name}
|
|
|
|
install -D -m 0644 %{SOURCE97} %{buildroot}%{macros_vagrant}
|
|
|
|
sed -i "s|%%{name}|%{name}|" %{buildroot}%{macros_vagrant}
|
|
|
|
sed -i "s|%{name}-%%{version}|%{name}-%{version}|" %{buildroot}%{macros_vagrant}
|
|
|
|
sed -i "s|%%{rb_build_versions}|%{rb_build_versions}|" %{buildroot}%{macros_vagrant}
|
|
|
|
sed -i "s|%%{rb_build_abi}|%{rb_build_abi}|" %{buildroot}%{macros_vagrant}
|
|
|
|
sed -i "s|%%{rb_default_ruby_suffix}|%{rb_default_ruby_suffix}|" %{buildroot}%{macros_vagrant}
|
|
|
|
|
|
|
|
# install post, transfiletrigerin & transfiletriggerun scriptlets
|
|
|
|
%global post_rb %{vagrant_embedded_dir}/bin/vagrant_post.rb
|
|
|
|
%global transfiletriggerin_rb %{vagrant_embedded_dir}/bin/vagrant_transfiletriggerin.rb
|
|
|
|
%global transfiletriggerun_rb %{vagrant_embedded_dir}/bin/vagrant_transfiletriggerun.rb
|
|
|
|
install -D -m 0755 %{SOURCE93} %{buildroot}%{transfiletriggerin_rb}
|
|
|
|
install -D -m 0755 %{SOURCE94} %{buildroot}%{transfiletriggerun_rb}
|
|
|
|
install -D -m 0755 %{SOURCE95} %{buildroot}%{post_rb}
|
|
|
|
|
|
|
|
# expand macros in scriptlets
|
|
|
|
for file in %{post_rb} %{transfiletriggerin_rb} %{transfiletriggerun_rb}; do
|
|
|
|
sed -i "s|%%{vagrant_dir}|%{vagrant_dir}|" %{buildroot}$file
|
|
|
|
sed -i "s|%%{vagrant_plugin_conf}|%{vagrant_plugin_conf}|" %{buildroot}$file
|
|
|
|
sed -i "s|%%{name}|%{name}|" %{buildroot}$file
|
|
|
|
sed -i "s|%%{version}|%{version}|" %{buildroot}$file
|
|
|
|
done
|
|
|
|
|
|
|
|
# man page
|
|
|
|
install -D -m 644 %{SOURCE11} %{buildroot}%{_mandir}/man1/vagrant.1
|
|
|
|
|
|
|
|
# Bash completion: install it without the .sh ending, otherwise completion is broken
|
|
|
|
# and remove the shebang line in it
|
|
|
|
install -D -m 0644 %{buildroot}%{vagrant_dir}/contrib/bash/completion.sh \
|
|
|
|
%{buildroot}%{_datadir}/bash-completion/completions/%{mod_name}
|
|
|
|
sed -i '1d' %{buildroot}%{_datadir}/bash-completion/completions/%{mod_name}
|
|
|
|
|
|
|
|
# Vim & Emacs syntax highlighting
|
|
|
|
install -D -m 0644 %{buildroot}%{vagrant_dir}/contrib/vim/vagrantfile.vim \
|
|
|
|
%{buildroot}%{vim_data_dir}/%{mod_name}.vim
|
|
|
|
install -D -m 0644 %{buildroot}%{vagrant_dir}/contrib/emacs/vagrant.el \
|
|
|
|
%{buildroot}%{_datadir}/emacs/site-lisp/%{mod_name}.el
|
|
|
|
|
|
|
|
chmod -x %{buildroot}%{vagrant_dir}/templates/locales/en.yml
|
|
|
|
|
|
|
|
# directories for vagrant plugins
|
|
|
|
mkdir -p %{buildroot}%{dirname:%{vagrant_plugin_cache}}
|
|
|
|
mkdir -p %{buildroot}%{dirname:%{vagrant_plugin_spec}}
|
|
|
|
mkdir -p %{buildroot}%{dirname:%{vagrant_plugin_docdir}}
|
|
|
|
|
|
|
|
|
|
|
|
# fix shebang in %%{vagrant_dir}/bin/%%{name}
|
|
|
|
sed -i 's|^\#\!/usr/bin/env.*|\#\!/usr/bin/ruby\.%{rb_default_ruby_suffix}|' \
|
|
|
|
%{buildroot}%{vagrant_dir}/bin/%{name}
|
|
|
|
|
|
|
|
# remove versioned name from %%{vagrant_plugin_dir}/bin/%%{name}
|
|
|
|
# (aka /usr/share/vagrant/gems/bin/vagrant)
|
|
|
|
mv %{buildroot}%{vagrant_plugin_dir}/bin/%{name}.%{rb_default_ruby_suffix} \
|
|
|
|
%{buildroot}%{vagrant_plugin_dir}/bin/%{name}
|
|
|
|
|
|
|
|
|
|
|
|
# Garbage collection
|
|
|
|
rm -f %{buildroot}%{vagrant_dir}/test/vagrant-spec/boxes/.keep
|
|
|
|
rm -f %{buildroot}%{vagrant_dir}/bin/vagrant.orig
|
2018-07-06 10:42:03 +02:00
|
|
|
rm -f %{buildroot}%{_bindir}/vagrant.orig.%{rb_default_ruby_suffix}
|
2019-04-11 20:03:08 +02:00
|
|
|
rm -f %{buildroot}%{vagrant_plugin_dir}/bin/vagrant.orig.%{rb_default_ruby_suffix}
|
|
|
|
rm -f %{buildroot}%{vagrant_dir}/lib/vagrant/util.rb.orig
|
|
|
|
|
|
|
|
# remove build script from vagrant
|
|
|
|
rm -f %{buildroot}%{vagrant_dir}/.runner.sh
|
2018-07-06 10:42:03 +02:00
|
|
|
|
2019-01-15 09:10:08 +01:00
|
|
|
|
2019-04-11 20:03:08 +02:00
|
|
|
%check
|
|
|
|
# remove the git reference to vagrant-spec
|
|
|
|
# -> don't have to cleanup, the Gemfile is excluded anyway
|
|
|
|
sed -i "s|gem 'vagrant-spec', git.*$|gem 'vagrant-spec'|" Gemfile
|
2018-07-06 10:42:03 +02:00
|
|
|
|
2019-04-11 20:03:08 +02:00
|
|
|
export GEM_PATH=%{buildroot}%{vagrant_plugin_dir}:$(ruby.%{rb_default_ruby_suffix} -e "print Gem.path.reject{|path| path.include? 'home'}.join(':')")
|
|
|
|
bundle exec rake test:unit
|
|
|
|
|
|
|
|
%pre
|
|
|
|
getent group vagrant >/dev/null || groupadd -r vagrant
|
2018-11-17 20:28:51 +01:00
|
|
|
|
|
|
|
%post
|
2019-04-11 20:03:08 +02:00
|
|
|
%{post_rb}
|
|
|
|
|
|
|
|
%transfiletriggerin -- %{dirname:%{vagrant_plugin_spec}}/
|
|
|
|
%{transfiletriggerin_rb}
|
2018-11-17 20:28:51 +01:00
|
|
|
|
2019-04-11 20:03:08 +02:00
|
|
|
%transfiletriggerun -- %{dirname:%{vagrant_plugin_spec}}/
|
|
|
|
%{transfiletriggerun_rb}
|
2016-04-12 19:31:48 +02:00
|
|
|
|
|
|
|
%files
|
2019-04-11 20:03:08 +02:00
|
|
|
%doc %{vagrant_dir}/CHANGELOG.md
|
|
|
|
%doc %{vagrant_dir}/README.md
|
|
|
|
%doc %{vagrant_dir}/README.SUSE
|
|
|
|
%license %{vagrant_dir}/LICENSE
|
|
|
|
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
%{_mandir}/man1/%{name}.*
|
|
|
|
|
|
|
|
%{macros_vagrant}
|
|
|
|
|
|
|
|
# scriptlets
|
|
|
|
%dir %{dirname: %{post_rb}}
|
|
|
|
%{post_rb}
|
|
|
|
%{transfiletriggerin_rb}
|
|
|
|
%{transfiletriggerun_rb}
|
|
|
|
|
|
|
|
%dir %{vagrant_embedded_dir}
|
|
|
|
%ghost %{vagrant_plugin_conf}
|
|
|
|
|
|
|
|
# plugin directories
|
|
|
|
%dir %{vagrant_plugin_dir}
|
|
|
|
%dir %{vagrant_plugin_dir}/gems
|
|
|
|
%dir %{vagrant_plugin_dir}/bin
|
|
|
|
%dir %{dirname:%{vagrant_plugin_cache}}
|
|
|
|
%dir %{dirname:%{vagrant_plugin_spec}}
|
|
|
|
%dir %{dirname:%{vagrant_plugin_docdir}}
|
|
|
|
|
|
|
|
# vagrant's own files & directories
|
|
|
|
%{vagrant_plugin_cache}
|
|
|
|
%{vagrant_plugin_spec}
|
|
|
|
%{vagrant_plugin_dir}/bin/%{name}
|
|
|
|
|
|
|
|
%dir %{vagrant_dir}
|
|
|
|
%dir %{vagrant_dir}/bin
|
|
|
|
%dir %{vagrant_dir}/keys
|
|
|
|
%dir %{vagrant_dir}/lib
|
|
|
|
%dir %{vagrant_dir}/plugins
|
|
|
|
%dir %{vagrant_dir}/templates
|
|
|
|
%{vagrant_dir}/version.txt
|
|
|
|
%{vagrant_dir}/%{mod_full_name}.gemspec
|
|
|
|
%{vagrant_dir}/bin/%{name}
|
|
|
|
%{vagrant_dir}/keys/*
|
|
|
|
%{vagrant_dir}/lib/*
|
|
|
|
%{vagrant_dir}/plugins/*
|
|
|
|
%{vagrant_dir}/templates/*
|
|
|
|
|
|
|
|
# these are scripts for Hashicorp
|
|
|
|
%exclude %{vagrant_dir}/scripts/*
|
|
|
|
# either packaged in -vim -emacs subpackages or not relevant
|
|
|
|
%exclude %{vagrant_dir}/contrib
|
|
|
|
# various dotfiles we don't care about (.travis.yml et.al.)
|
|
|
|
%exclude %{vagrant_dir}/.*
|
|
|
|
# Development files
|
|
|
|
%exclude %{vagrant_dir}/Vagrantfile
|
|
|
|
%exclude %{vagrant_dir}/Rakefile
|
|
|
|
%exclude %{vagrant_dir}/Gemfile
|
|
|
|
%exclude %{vagrant_dir}/RELEASE.md
|
|
|
|
%exclude %{vagrant_dir}/tasks/*
|
|
|
|
# ruby configuration for acceptance tests
|
|
|
|
%exclude %{vagrant_dir}/vagrant-spec.config.example.rb
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
%dir %{vagrant_plugin_docdir}
|
|
|
|
%doc %{vagrant_plugin_docdir}/rdoc
|
|
|
|
%doc %{vagrant_plugin_docdir}/ri
|
2016-04-12 19:31:48 +02:00
|
|
|
|
|
|
|
%files vim
|
2018-07-06 10:42:03 +02:00
|
|
|
%{vim_data_dir}/%{mod_name}.vim
|
2016-04-12 19:31:48 +02:00
|
|
|
|
|
|
|
%files emacs
|
|
|
|
%{_datadir}/emacs/site-lisp/%{mod_name}.el
|
|
|
|
|
|
|
|
%files bash-completion
|
2019-04-11 20:03:08 +02:00
|
|
|
%{_datadir}/bash-completion/completions/%{mod_name}
|
2016-04-12 19:31:48 +02:00
|
|
|
|
|
|
|
%changelog
|