[DRE-commits] [SCM] bundler.git branch, master, updated. debian/1.1.4-1-1-g42199b7

Christian Hofstaedtler christian at hofstaedtler.name
Mon Jun 4 22:28:35 UTC 2012


The following commit has been merged in the master branch:
commit 42199b7b2a66e577e266040d4eae3e7905fc5341
Author: Christian Hofstaedtler <christian at hofstaedtler.name>
Date:   Tue Jun 5 00:22:37 2012 +0200

    Pre-create gem install directories to avoid permission denied error

diff --git a/debian/README.Debian b/debian/README.Debian
index 79a6814..69d72b8 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -9,3 +9,13 @@ location as "gem install", which is not writable by normal users on Debian
 systems (and therefore sudo is called).
 
  -- Christian Hofstaedtler <christian at hofstaedtler.name>  Tue, 13 Mar 2012 00:17:56 +0100
+
+
+About /var/lib/gems
+-------------------
+
+Bundler needs /var/lib/gems/$RUBY_VERSION (really: Gem.path) to exist, even if
+it runs as non-root. To avoid this bootstrapping issue, this package creates
+empty directories for the current Ruby interpreter versions.
+
+ -- Christian Hofstaedtler <christian at hofstaedtler.name>  Tue, 05 Jun 2012 00:13:35 +0200
diff --git a/debian/bundler.postinst b/debian/bundler.postinst
new file mode 100755
index 0000000..591c5fd
--- /dev/null
+++ b/debian/bundler.postinst
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = "configure" ]; then
+  mkdir -p /var/lib/gems/1.8
+  mkdir -p /var/lib/gems/1.9.1
+fi
+
+#DEBHELPER#
+
diff --git a/debian/bundler.prerm b/debian/bundler.prerm
new file mode 100755
index 0000000..5eb499a
--- /dev/null
+++ b/debian/bundler.prerm
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = "remove" ]; then
+  rmdir --ignore-fail-on-non-empty /var/lib/gems/1.8 || true
+  rmdir --ignore-fail-on-non-empty /var/lib/gems/1.9.1 || true
+fi
+
+#DEBHELPER#
+
diff --git a/debian/changelog b/debian/changelog
index 0b4973c..25e198e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,9 @@
 bundler (1.1.4-1) unstable; urgency=low
 
   * New upstream release.
+  * Create Gem.path directories for the current Ruby interpreter versions
+    (1.8, 1.9.1) during postinst time, so `bundle install` works as non-root
+    without further actions from the user.
 
  -- Christian Hofstaedtler <christian at hofstaedtler.name>  Mon, 04 Jun 2012 23:24:57 +0200
 

-- 
bundler.git



More information about the Pkg-ruby-extras-commits mailing list