From bcdc7d60c126b93bac9d1097f20b158c3538875c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 31 2019 12:44:16 +0000 Subject: import rubygem-bundler-1.7.8-3.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8d646bd --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/bundler-1.7.8.gem diff --git a/.rubygem-bundler.metadata b/.rubygem-bundler.metadata new file mode 100644 index 0000000..a042fdf --- /dev/null +++ b/.rubygem-bundler.metadata @@ -0,0 +1 @@ +dd798bf25cb9aa0a9948c2095b469ead34095fad SOURCES/bundler-1.7.8.gem diff --git a/SOURCES/bundler-add-support-for-binary-extensions-in-dedicated-folde.patch b/SOURCES/bundler-add-support-for-binary-extensions-in-dedicated-folde.patch new file mode 100644 index 0000000..c53ce72 --- /dev/null +++ b/SOURCES/bundler-add-support-for-binary-extensions-in-dedicated-folde.patch @@ -0,0 +1,34 @@ +From ce83a370930cde5ca2d6bc1c92f1d29603e44145 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Thu, 19 Jan 2012 10:31:15 +0100 +Subject: [PATCH] Add support for binary extensions in dedicated folder. + +--- + lib/bundler/rubygems_ext.rb | 5 ++++- + 1 files changed, 4 insertions(+), 1 deletions(-) + +diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb +index a68fb0a..89796d3 100644 +--- a/lib/bundler/rubygems_ext.rb ++++ b/lib/bundler/rubygems_ext.rb +@@ -36,13 +36,16 @@ module Gem + def load_paths + return full_require_paths if respond_to?(:full_require_paths) + +- require_paths.map do |require_path| ++ paths = require_paths.map do |require_path| + if require_path.include?(full_gem_path) + require_path + else + File.join(full_gem_path, require_path) + end + end ++ ++ paths << File.join(ext_dir, require_paths.first) unless extensions.empty? ++ paths + end + + if method_defined?(:extension_dir) +-- +1.7.7.5 + diff --git a/SPECS/rubygem-bundler.spec b/SPECS/rubygem-bundler.spec new file mode 100644 index 0000000..d983232 --- /dev/null +++ b/SPECS/rubygem-bundler.spec @@ -0,0 +1,238 @@ +%global gem_name bundler + +%{!?enable_test: %global enable_test 0} + +# Macro for symlinking system RubyGems as a replacement for removed vendored libs +%global symlink_vendored_libs \ +for dependency in \\\ + net-http-persistent \\\ + thor \ +do \ + for fileordir in \\\ + %{gem_dir}/gems/$dependency-*/lib/* \ + do \ + ln -s -f $fileordir -t %{gem_libdir}/bundler/vendor/ \ + done \ +done + +Summary: Library and utilities to manage a Ruby application's gem dependencies +Name: rubygem-%{gem_name} +Version: 1.7.8 +Release: 3%{?dist} +Group: Development/Languages +License: MIT +URL: http://gembundler.com +Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem +Patch1: bundler-add-support-for-binary-extensions-in-dedicated-folde.patch +Requires: ruby(release) +Requires: ruby(rubygems) +Requires: rubygem(thor) >= 0.19.0 +Requires: rubygem(net-http-persistent) +BuildRequires: ruby(release) +BuildRequires: rubygems-devel +BuildRequires: ruby +%if 0%{enable_test} > 0 +BuildRequires: ruby-devel +BuildRequires: rubygem(rspec) >= 3.0 +BuildRequires: rubygem(thor) +BuildRequires: rubygem(net-http-persistent) +#BuildRequires: rubygem(psych) +#BuildRequires: git snv sudo +BuildRequires: git sudo +%endif +BuildArch: noarch +Provides: rubygem(%{gem_name}) = %{version} + +%description +Bundler manages an application's dependencies through its entire life, across +many machines, systematically and repeatably + +%package doc +Summary: Documentation for %{name} +Group: Documentation +Requires:%{name} = %{version}-%{release} + +%description doc +Documentation for %{name} + + +%prep +%setup -q -c -T +%gem_install -n %{SOURCE0} + +pushd .%{gem_instdir} +%patch1 -p1 +popd + +%build + +%install +# Remove bundled libraries +rm -rf .%{gem_libdir}/bundler/vendor +mkdir .%{gem_libdir}/bundler/vendor + +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +mkdir -p %{buildroot}/%{_bindir} +cp -a .%{_bindir}/* \ + %{buildroot}%{_bindir}/ + +find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod 755 +find %{buildroot}%{gem_instdir}/lib/bundler/templates/newgem/bin -type f | xargs chmod 755 +chmod 755 %{buildroot}%{gem_instdir}/lib/bundler/templates/Executable* + +# Man pages are used by Bundler internally, do not remove them! +mkdir -p %{buildroot}%{_mandir}/man5 +cp -a %{buildroot}%{gem_libdir}/bundler/man/gemfile.5 %{buildroot}%{_mandir}/man5 +mkdir -p %{buildroot}%{_mandir}/man1 +for i in bundle bundle-config bundle-exec bundle-install bundle-package bundle-platform bundle-update +do + cp -a %{buildroot}%{gem_libdir}/bundler/man/$i %{buildroot}%{_mandir}/man1/`echo $i.1` +done + +# Test suite has to be disabled for official build, since it downloads various +# gems, which are not in Fedora or they have different version etc. +# Nevertheless, the test suite should run for local builds. +# TODO: investigate failures +%if 0%{enable_test} > 0 +%check +pushd .%{gem_instdir} + +# This test does not work, since ruby is configured with --with-ruby-version='' +# https://github.com/bundler/bundler/issues/2365 +sed -i '/"fetches gems again after changing the version of Ruby"/,/end$/{s/^/#/}' spec/install/gems/platform_spec.rb + +# Test suite needs to run in initialized git repository. +# https://github.com/carlhuda/bundler/issues/2022 +git init + +# Test with system net-http-persistent and thor. +for dependency in \ + net-http-persistent \ + thor +do + for fileordir in \ + %{gem_dir}/gems/$dependency-*/lib/* + do + ln -s -f $fileordir lib/bundler/vendor/$(basename "$fileordir") + done +done + +rspec spec + +%endif + +%post +# Create symlinks to system RubyGems as a replacement for vendored libs +# See rhbz#1163039 +%symlink_vendored_libs + +%triggerpostun -- rubygem-thor, rubygem-net-http-persistent +# We need to recreate the symlinks after the old package of vendored lib +# has been removed, not before +%symlink_vendored_libs + +%files +%dir %{gem_instdir} +%exclude %{gem_instdir}/.* +%exclude %{gem_instdir}/man +%{gem_libdir} +%ghost %attr(644, root, root) %{gem_libdir}/bundler/vendor/net +%ghost %attr(644, root, root) %{gem_libdir}/bundler/vendor/thor +%ghost %attr(644, root, root) %{gem_libdir}/bundler/vendor/thor.rb +%exclude %{gem_libdir}/bundler/ssl_certs/.document +%exclude %{gem_libdir}/bundler/ssl_certs/*.pem +%doc %{gem_instdir}/LICENSE.md +%{gem_instdir}/.travis.yml +%{_bindir}/bundle +%{_bindir}/bundler +%{gem_instdir}/bin +%exclude %{gem_cache} +%{gem_spec} +%doc %{_mandir}/man1/* +%doc %{_mandir}/man5/* + +%files doc +%doc %{gem_instdir}/CHANGELOG.md +%doc %{gem_instdir}/ISSUES.md +%doc %{gem_instdir}/README.md +%doc %{gem_instdir}/UPGRADING.md +%doc %{gem_instdir}/CONTRIBUTING.md +%doc %{gem_instdir}/DEVELOPMENT.md +%{gem_instdir}/Rakefile +%{gem_instdir}/spec +%{gem_instdir}/%{gem_name}.gemspec +%doc %{gem_docdir} + +%changelog +* Thu Apr 09 2015 Vít Ondruch - 1.7.8-3 +- Enforce higher Thor version, which is required by Bundler. + Related: rhbz#1194243 + +* Tue Apr 07 2015 - 1.7.8-2 +- Update to Bundler 1.7.8. + Resolves: rhbz#1194243 +- Use symlinks for vendored libraries. + Resolves: rhbz#1163076 + +* Fri Dec 27 2013 Daniel Mach - 1.3.1-3 +- Mass rebuild 2013-12-27 + +* Tue Jul 02 2013 Vít Ondruch - 1.3.1-2 +- Always include Patch100 in SRPM. + +* Mon Mar 04 2013 Josef Stribny - 1.3.1-1 +- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 +- Update to Bundler 1.3.1 + +* Thu Feb 14 2013 Fedora Release Engineering - 1.2.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Nov 02 2012 Bohuslav Kabrda - 1.2.1-1 +- Update to Bundler 1.2.1. +- Fix permissions on some executable files. + +* Sat Jul 21 2012 Fedora Release Engineering - 1.1.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jul 13 2012 Vít Ondruch - 1.1.4-1 +- Update to Bundler 1.1.4. + +* Wed Feb 01 2012 Vít Ondruch - 1.0.21-1 +- Rebuilt for Ruby 1.9.3. +- Update to Bundler 1.0.21. + +* Sat Jan 14 2012 Fedora Release Engineering - 1.0.15-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Thu Jul 07 2011 Vít Ondruch - 1.0.15-1 +- Updated to Bundler 1.0.15 + +* Wed Feb 09 2011 Fedora Release Engineering - 1.0.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Feb 04 2011 Vít Ondruch - 1.0.10-1 +- Upstream update + +* Thu Jan 27 2011 Vít Ondruch - 1.0.9-2 +- More concise summary +- Do not remove manpages, they are used internally +- Added buildroot cleanup in clean section + +* Mon Jan 24 2011 Vít Ondruch - 1.0.9-1 +- Bumped to Bundler 1.0.9 +- Installed manual pages +- Removed obsolete buildroot cleanup + +* Mon Nov 1 2010 Jozef Zigmund - 1.0.3-2 +- Add ruby(abi) dependency +- Add using macro %%{geminstdir} in files section +- Add subpackage doc for doc files +- Removed .gitignore file +- Removed rubygem-thor from vendor folder +- Add dependency rubygem(thor) + +* Mon Oct 18 2010 Jozef Zigmund - 1.0.3-1 +- Initial package