Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package bundler

This update fixes a bug that affects other packages that use bundler.
Changelog:

bundler (1.17.3-3) unstable; urgency=medium

  * Add test for locating bundler binaries
  * Switch to Rubygems installation layout (Closes: #914771)
    * 0003-Do-not-add-system-path-to-RUBYLIB.patch: dropped, not necessary
      anymore
  * 0001-replace-call-to-git-ls-files-with-Dir.glob.patch: fix file listing
  * debian/install: removed, not necessary anymore

 -- Antonio Terceiro <terce...@debian.org>  Sat, 09 Mar 2019 08:41:37 -0300

A diff against the version in testing is attached.

unblock bundler/1.17.3-3

-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 
'unstable'), (500, 'testing'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-3-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_WARN, TAINT_CRAP
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8), 
LANGUAGE=pt_BR:pt:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff --git a/debian/changelog b/debian/changelog
index 63563bc..1cc4472 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+bundler (1.17.3-3) unstable; urgency=medium
+
+  * Add test for locating bundler binaries
+  * Switch to Rubygems installation layout (Closes: #914771)
+    * 0003-Do-not-add-system-path-to-RUBYLIB.patch: dropped, not necessary
+      anymore
+  * 0001-replace-call-to-git-ls-files-with-Dir.glob.patch: fix file listing
+  * debian/install: removed, not necessary anymore
+
+ -- Antonio Terceiro <terce...@debian.org>  Sat, 09 Mar 2019 08:41:37 -0300
+
 bundler (1.17.3-2) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/install b/debian/install
deleted file mode 100644
index be41aee..0000000
--- a/debian/install
+++ /dev/null
@@ -1 +0,0 @@
-lib/bundler/templates/newgem/travis.yml.tt /usr/lib/ruby/vendor_ruby/bundler/templates/newgem
diff --git a/debian/patches/0001-replace-call-to-git-ls-files-with-Dir.glob.patch b/debian/patches/0001-replace-call-to-git-ls-files-with-Dir.glob.patch
index 6d52c06..c470fd5 100644
--- a/debian/patches/0001-replace-call-to-git-ls-files-with-Dir.glob.patch
+++ b/debian/patches/0001-replace-call-to-git-ls-files-with-Dir.glob.patch
@@ -24,7 +24,7 @@ index 26fc322..b68627f 100644
 -  # we don't check in man pages, but we need to ship them because
 -  # we use them to generate the long-form help for each command.
 -  s.files += Dir.glob("man/**/*")
-+  s.files = Dir.glob("lib/**") + Dir.glob("exe/*") + Dir.glob("*.md") + Dir.glob("man/*")
++  s.files = Dir.glob('**/*') - Dir.glob('debian/**/*')
    # Include the CHANGELOG.md, LICENSE.md, README.md manually
    s.files += %w[CHANGELOG.md LICENSE.md README.md]
    # include the gemspec itself because warbler breaks w/o it
diff --git a/debian/patches/0003-Do-not-add-system-path-to-RUBYLIB.patch b/debian/patches/0003-Do-not-add-system-path-to-RUBYLIB.patch
deleted file mode 100644
index 7735a6f..0000000
--- a/debian/patches/0003-Do-not-add-system-path-to-RUBYLIB.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From: Christian Hofstaedtler <z...@debian.org>
-Date: Wed, 13 Jul 2016 15:51:52 +0000
-Subject: Do not add system path to RUBYLIB
-
-Bundler adds it's own installation path in front of RUBYLIB, but when
-this is the system ruby path, this causes system-wide installed gems
-to be used before bundler-installed gems.
-
-Closes: #830958
-Forwarded: not-needed
-Origin: vendor
----
- lib/bundler.rb                | 6 ------
- lib/bundler/shared_helpers.rb | 3 ---
- 2 files changed, 9 deletions(-)
-
-diff --git a/lib/bundler.rb b/lib/bundler.rb
-index 1cb3b4f..942f862 100644
---- a/lib/bundler.rb
-+++ b/lib/bundler.rb
-@@ -296,12 +296,6 @@ EOF
-         env["RUBYOPT"] = env["RUBYOPT"].sub "-rbundler/setup", ""
-       end
- 
--      if env.key?("RUBYLIB")
--        rubylib = env["RUBYLIB"].split(File::PATH_SEPARATOR)
--        rubylib.delete(File.expand_path("..", __FILE__))
--        env["RUBYLIB"] = rubylib.join(File::PATH_SEPARATOR)
--      end
--
-       env
-     end
- 
-diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
-index 3e2fe24..06c1c78 100644
---- a/lib/bundler/shared_helpers.rb
-+++ b/lib/bundler/shared_helpers.rb
-@@ -339,9 +339,6 @@ module Bundler
-     end
- 
-     def set_rubylib
--      rubylib = (ENV["RUBYLIB"] || "").split(File::PATH_SEPARATOR)
--      rubylib.unshift bundler_ruby_lib
--      Bundler::SharedHelpers.set_env "RUBYLIB", rubylib.uniq.join(File::PATH_SEPARATOR)
-     end
- 
-     def bundler_ruby_lib
diff --git a/debian/patches/series b/debian/patches/series
index 6a2a92f..743d5b1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,5 @@
 0001-replace-call-to-git-ls-files-with-Dir.glob.patch
 0002-Replace-bundled-libraries-with-system-versions.patch
-0003-Do-not-add-system-path-to-RUBYLIB.patch
 0004-block-phone-call-to-check-if-latest-release-closes-8.patch
 0005-Don-t-use-insecure-temporary-directory-as-home-direc.patch
 0006-Remove-temporary-home-directories.patch
diff --git a/debian/rules b/debian/rules
index 69fcd03..5661549 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,7 @@
 #!/usr/bin/make -f
 
 export GEM2DEB_TEST_RUNNER = --check-dependencies
+export DH_RUBY = --gem-install
 
 %:
 	dh $@ --buildsystem=ruby --with ruby
diff --git a/debian/tests/bundle-bin-path b/debian/tests/bundle-bin-path
new file mode 100755
index 0000000..1ad683d
--- /dev/null
+++ b/debian/tests/bundle-bin-path
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -euf
+
+if [ -z "${AUTOPKGTEST_TMP:-}" ]; then
+  AUTOPKGTEST_TMP=$(mktemp -d)
+  cleanup() {
+    rm -rf "$AUTOPKGTEST_TMP"
+  }
+  trap cleanup INT TERM EXIT
+fi
+
+check() {
+  exp="$1"
+  exe="$2"
+  echo "${exp} = ${exe}:"
+  if [ -x "$exe" ]; then
+    echo "OK"
+  else
+    echo "FAIL: ${exe} is not a valid executable"
+    return 1
+  fi
+}
+
+cd $AUTOPKGTEST_TMP
+mkdir test
+cd test
+echo 'gem "rake"' > Gemfile
+
+rc=0
+check 'BUNDLE_BIN_PATH' "$(bundle exec sh -c 'echo $BUNDLE_BIN_PATH')" || rc=$((rc + $?))
+check 'Gem.bin_path("bundler", "bundle")' "$(ruby -e 'puts Gem.bin_path("bundler", "bundle")')" || rc=$((rc + $?))
+exit "$rc"
diff --git a/debian/tests/control b/debian/tests/control
index 6826f66..c80a84f 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,3 +1,3 @@
-Tests: testsuite bundle-gem smoke-test
+Tests: testsuite bundle-gem smoke-test bundle-bin-path
 Depends: build-essential, git, less, libxml2-dev, libz-dev, ruby-dev, sudo, @
 Restrictions: rw-build-tree allow-stderr

Attachment: signature.asc
Description: PGP signature

Reply via email to