From 32dc6b2dc5b894ec975ec618db75355ee7b2a979 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Tue, 4 Dec 2018 19:50:56 -0500 Subject: [PATCH] Remove the misc directory from the gemspec It does not need to be built into deployed packages --- debian/patches/gemspec_no_git | 21 ++----------- debian/patches/remove_misc_from_gemspec | 41 +++++++++++++++++++++++++ debian/patches/series | 1 + puppet-strings.gemspec | 2 +- 4 files changed, 46 insertions(+), 19 deletions(-) create mode 100644 debian/patches/remove_misc_from_gemspec diff --git a/debian/patches/gemspec_no_git b/debian/patches/gemspec_no_git index b0e3f07..67a5225 100644 --- a/debian/patches/gemspec_no_git +++ b/debian/patches/gemspec_no_git @@ -1,27 +1,12 @@ -Description: - TODO: Put a short summary on the line above and replace this paragraph - with a longer explanation of this change. Complete the meta-information - with other relevant fields (see below for details). To make it easier, the - information below has been extracted from the changelog. Adjust it or drop - it. +Description: Use file globbing instead of git to list gemspec files + The original gemspec uses git to list all the files to be included. This causes + builds to fail if the source is from a tarball instead of a git checkout. . puppet-strings (2.1.0-1) unstable; urgency=medium . * Initial release. (Closes: #915359) Author: Kienan Stewart Bug-Debian: https://bugs.debian.org/915359 - ---- -The information above should follow the Patch Tagging Guidelines, please -checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here -are templates for supplementary fields that you might want to add: - -Origin: , -Bug: -Bug-Debian: https://bugs.debian.org/ -Bug-Ubuntu: https://launchpad.net/bugs/ -Forwarded: -Reviewed-By: Last-Update: 2018-12-04 --- puppet-strings-2.1.0.orig/puppet-strings.gemspec diff --git a/debian/patches/remove_misc_from_gemspec b/debian/patches/remove_misc_from_gemspec new file mode 100644 index 0000000..ad6da40 --- /dev/null +++ b/debian/patches/remove_misc_from_gemspec @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + +Description: Remove misc folder from gemspec + The misc folder contains project specific files that aren't needed in built + packages. + . + puppet-strings (2.1.0-1) unstable; urgency=medium + . + * Initial release. (Closes: #915359) +Author: Kienan Stewart +Bug-Debian: https://bugs.debian.org/915359 +Last-Update: 2018-12-05 + +--- puppet-strings-2.1.0.orig/puppet-strings.gemspec ++++ puppet-strings-2.1.0/puppet-strings.gemspec +@@ -21,7 +21,7 @@ Gem::Specification.new do |s| + 'README.md', + ] + #s.files = `git ls-files`.split("\n") - Dir['.*', '*.gemspec'] +- s.files = Dir.glob("{lib,misc,spec}/**/*") + ++ s.files = Dir.glob("{lib,spec}/**/*") + + ['CHANGELOG.md', 'LICENSE', 'README.md', 'Rakefile', __FILE__] + + s.add_runtime_dependency 'yard', '~> 0.9.5' diff --git a/debian/patches/series b/debian/patches/series index 391c607..2e01e2e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ gemspec_no_git +remove_misc_from_gemspec diff --git a/puppet-strings.gemspec b/puppet-strings.gemspec index c911eae..2380622 100644 --- a/puppet-strings.gemspec +++ b/puppet-strings.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |s| 'README.md', ] #s.files = `git ls-files`.split("\n") - Dir['.*', '*.gemspec'] - s.files = Dir.glob("{lib,misc,spec}/**/*") + + s.files = Dir.glob("{lib,spec}/**/*") + ['CHANGELOG.md', 'LICENSE', 'README.md', 'Rakefile', __FILE__] s.add_runtime_dependency 'yard', '~> 0.9.5'