From 8f29026d37a66d8bcbddc6f32a6354d93d40f50d Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 29 Aug 2015 21:55:12 -0400 Subject: [PATCH 1/2] build: ruby: Avoid long build directory names. Having the hash of the source gem in the source directory file name proved to be problematic when running the test suite for the 'pg' gem that creates UNIX-domain sockets in the source directory and exceeded the 108 character limit on GNU/Linux systems. * guix/build/ruby-build-system.scm (unpack): Rename unpacked gem directory to "gem". --- guix/build/ruby-build-system.scm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm index 90fab92..4184ccc 100644 --- a/guix/build/ruby-build-system.scm +++ b/guix/build/ruby-build-system.scm @@ -44,12 +44,16 @@ directory." (define* (unpack #:key source #:allow-other-keys) "Unpack the gem SOURCE and enter the resulting directory." (and (zero? (system* "gem" "unpack" source)) - (begin - ;; The unpacked gem directory is named the same as the archive, sans - ;; the ".gem" extension. - (chdir (match:substring (string-match "^(.*)\\.gem$" - (basename source)) - 1)) + ;; The unpacked gem directory is named the same as the archive, sans + ;; the ".gem" extension. It is renamed to simply "gem" in an effort to + ;; keep file names shorter to avoid UNIX-domain socket file names and + ;; shebangs that exceed the system's fixed maximum length when running + ;; test suites. + (let ((dir (match:substring (string-match "^(.*)\\.gem$" + (basename source)) + 1))) + (rename-file dir "gem") + (chdir "gem") #t))) (define* (build #:key source #:allow-other-keys) -- 2.5.0