[vagrant] %files section cleanup.
Vít Ondruch
vondruch at fedoraproject.org
Wed Jan 21 13:38:19 UTC 2015
commit 420d9e28588bded07eae0510cab9872df6d947bd
Author: Vít Ondruch <vondruch at redhat.com>
Date: Mon Nov 24 13:35:40 2014 +0100
%files section cleanup.
vagrant-1.6.5-fix-dependencies.patch | 32 +++++++++++++++++++++++++++++++-
vagrant.spec | 28 +++++++++++++++++++++++++---
2 files changed, 56 insertions(+), 4 deletions(-)
---
diff --git a/vagrant-1.6.5-fix-dependencies.patch b/vagrant-1.6.5-fix-dependencies.patch
index 85046ed..6ab8b3f 100644
--- a/vagrant-1.6.5-fix-dependencies.patch
+++ b/vagrant-1.6.5-fix-dependencies.patch
@@ -55,7 +55,7 @@ index 3020c7b..c7b11b9 100644
if Vagrant::Util::Platform.windows?
diff --git a/vagrant.gemspec b/vagrant.gemspec
-index c4131b2..0d7f8d6 100644
+index c4131b2..638aeb4 100644
--- a/vagrant.gemspec
+++ b/vagrant.gemspec
@@ -15,27 +15,38 @@ Gem::Specification.new do |s|
@@ -109,3 +109,33 @@ index c4131b2..0d7f8d6 100644
# The following block of code determines the files that should be included
# in the gem. It does this by reading all the files in the directory where
+@@ -46,10 +57,10 @@ Gem::Specification.new do |s|
+ all_files = Dir.chdir(root_path) { Dir.glob("**/{*,.*}") }
+ all_files.reject! { |file| [".", ".."].include?(File.basename(file)) }
+ all_files.reject! { |file| file.start_with?("website/") }
+- gitignore_path = File.join(root_path, ".gitignore")
+- gitignore = File.readlines(gitignore_path)
+- gitignore.map! { |line| line.chomp.strip }
+- gitignore.reject! { |line| line.empty? || line =~ /^(#|!)/ }
++ #gitignore_path = File.join(root_path, ".gitignore")
++ #gitignore = File.readlines(gitignore_path)
++ #gitignore.map! { |line| line.chomp.strip }
++ #gitignore.reject! { |line| line.empty? || line =~ /^(#|!)/ }
+
+ unignored_files = all_files.reject do |file|
+ # Ignore any directories, the gemspec only cares about files
+@@ -63,10 +74,10 @@ Gem::Specification.new do |s|
+ # like '.DS_Store' will match sub-directories too (same behavior
+ # as git).
+ #
+- gitignore.any? do |ignore|
+- File.fnmatch(ignore, file, File::FNM_PATHNAME) ||
+- File.fnmatch(ignore, File.basename(file), File::FNM_PATHNAME)
+- end
++ #gitignore.any? do |ignore|
++ # File.fnmatch(ignore, file, File::FNM_PATHNAME) ||
++ # File.fnmatch(ignore, File.basename(file), File::FNM_PATHNAME)
++ #end
+ end
+
+ s.files = unignored_files
diff --git a/vagrant.spec b/vagrant.spec
index b7a4ca2..1fe509c 100644
--- a/vagrant.spec
+++ b/vagrant.spec
@@ -92,8 +92,8 @@ cp -pa ./* \
find %{buildroot}%{vagrant_dir}/bin -type f | xargs chmod a+x
-# TODO: The .gemspec search for .gitignore. May be the .gemspec should be adjusted.
-touch %{buildroot}%{vagrant_dir}/.gitignore
+rm %{buildroot}%{vagrant_dir}/{CHANGELOG,CONTRIBUTING,README}.md
+rm %{buildroot}%{vagrant_dir}/LICENSE
# Provide executable similar to upstream:
# https://github.com/mitchellh/vagrant-installers/blob/master/substrate/modules/vagrant_installer/templates/vagrant.erb
@@ -130,13 +130,35 @@ ruby -rbundler/setup -I.:lib -e 'Dir.glob("test/unit/**/*_test.rb").sort.each &m
getent group vagrant >/dev/null || groupadd -r vagrant
%files
-%{_datadir}/%{name}
+%license LICENSE
%{_bindir}/%{name}
+%dir %{vagrant_dir}
+%exclude %{vagrant_dir}/.*
+%exclude %{vagrant_dir}/Vagrantfile
+%{vagrant_dir}/bin
+# TODO: Make more use of contribs.
+%{vagrant_dir}/contrib
+%exclude %{vagrant_dir}/contrib/bash
+%{vagrant_dir}/vagrant.gemspec
+%{vagrant_dir}/keys
+%{vagrant_dir}/lib
+%{vagrant_dir}/plugins
+%exclude %{vagrant_dir}/scripts
+%{vagrant_dir}/templates
+%{vagrant_dir}/version.txt
+%exclude %{vagrant_dir}/website
%{bashcompletion_dir}/%{name}
%dir %{_sharedstatedir}/%{name}
%ghost %{_sharedstatedir}/%{name}/plugins.json
%files doc
+%doc CONTRIBUTING.md CHANGELOG.md README.md
+%{vagrant_dir}/Gemfile
+%{vagrant_dir}/Rakefile
+%{vagrant_dir}/tasks
+%{vagrant_dir}/test
+%{vagrant_dir}/vagrant-spec.config.example.rb
+
%changelog
* Wed Oct 22 2014 Vít Ondruch <vondruch at redhat.com> - 1.6.5-11
More information about the scm-commits
mailing list