[bug#77289] gnu: Remove ruby-2.6.

Message ID 40a4fe0fa113712712556099938dc3c2b4136d9d.1743008552.git.andreas@enge.fr
State New
Headers
Series [bug#77289] gnu: Remove ruby-2.6. |

Commit Message

Andreas Enge March 26, 2025, 5:08 p.m. UTC
  * gnu/packages/ruby.scm (ruby-2.6): Delete variable.
(ruby-2.7): Copy fields previously inherited from ruby-2.6.

Change-Id: I14065e045ede6224cb30b05dcb7fcbdf03df8dbd
---
This commit removes ruby@2.6, which was EOL on 2022-04-12 and has no
dependent packages any more. Unfortunately it appears that since @2.7
inherited from @2.6, it is rebuilt with all its 14000 dependent packages
although I have only copy-pasted the previously inherited fields.

According to the removal policy, this commit could be pushed on April 26;
but we should make sure that everything is built on CI.

 gnu/packages/ruby.scm | 82 +++++++++----------------------------------
 1 file changed, 17 insertions(+), 65 deletions(-)


base-commit: 80651b889926a304a671092ad2fc223440845a70
  

Comments

Nicolas Graves March 26, 2025, 9:34 p.m. UTC | #1
On 2025-03-26 18:08, Andreas Enge wrote:

> * gnu/packages/ruby.scm (ruby-2.6): Delete variable.
> (ruby-2.7): Copy fields previously inherited from ruby-2.6.

Hi Andreas, I think a similar patch is already applied on ruby-team.
This branch is close to be ready (not that much ruby packages anyway), I
think we can create a request to merge it.
  
Andreas Enge March 26, 2025, 9:46 p.m. UTC | #2
Am Wed, Mar 26, 2025 at 10:34:32PM +0100 schrieb Nicolas Graves:
> Hi Andreas, I think a similar patch is already applied on ruby-team.
> This branch is close to be ready (not that much ruby packages anyway), I
> think we can create a request to merge it. 

Ah, sorry for not having checked the ruby-team branch! But it is good
news to see progress. If you do not mind, I would suggest to keep this
bug open until the ruby-team branch has been merged.

Did you also experience that disinheriting ruby-2.7 causes it to be
rebuilt, or did I make a mistake in my patch?

Andreas
  

Patch

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 24407fbd58..c7be9fb2ce 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -114,81 +114,20 @@  (define %prawn-project-licenses
         license:gpl2+
         license:gpl3+))
 
-(define-public ruby-2.6
-  (package
-    (name "ruby")
-    (version "2.6.10")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
-                           (version-major+minor version)
-                           "/ruby-" version ".tar.xz"))
-       (sha256
-        (base32
-         "1wn12klc44hn2nh5v1lkqbdyvljip6qhwjqvkkf8zf112gaxxn2z"))
-       (modules '((guix build utils)))
-       (snippet `(begin
-                   ;; Remove bundled libffi
-                   (delete-file-recursively "ext/fiddle/libffi-3.2.1")
-                   #t))))
-    (build-system gnu-build-system)
-    (arguments
-     `(#:test-target "test"
-       #:configure-flags
-       ,(if (%current-target-system)
-            '(list (string-append
-                    "LDFLAGS=-Wl,-rpath="
-                    (assoc-ref %outputs "out") "/lib")
-                   "--enable-shared")
-            ''("--enable-shared")) ; dynamic linking
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'replace-bin-sh-and-remove-libffi
-           (lambda _
-             (substitute* '("Makefile.in"
-                            "ext/pty/pty.c"
-                            "io.c"
-                            "lib/mkmf.rb"
-                            "process.c"
-                            "test/rubygems/test_gem_ext_configure_builder.rb"
-                            "test/rdoc/test_rdoc_parser.rb"
-                            "test/ruby/test_rubyoptions.rb"
-                            "test/ruby/test_process.rb"
-                            "test/ruby/test_system.rb"
-                            "tool/rbinstall.rb")
-               (("/bin/sh") (which "sh")))
-             #t)))))
-    (native-inputs (if (%current-target-system)
-                       (list this-package)
-                       '()))
-    (inputs
-     (list readline openssl-1.1 libffi gdbm))
-    (propagated-inputs
-     (list zlib))
-    (native-search-paths
-     (list (search-path-specification
-            (variable "GEM_PATH")
-            (files (list (string-append "lib/ruby/vendor_ruby"))))))
-    (synopsis "Programming language interpreter")
-    (description "Ruby is a dynamic object-oriented programming language with
-a focus on simplicity and productivity.")
-    (home-page "https://www.ruby-lang.org")
-    (license license:ruby)))
-
 (define-public ruby-2.7
   (package
-    (inherit ruby-2.6)
+    (name "ruby")
     (version "2.7.8")
     (source
      (origin
-       (inherit (package-source ruby-2.6))
+       (method url-fetch)
        (uri (string-append "https://cache.ruby-lang.org/pub/ruby/"
                            (version-major+minor version)
                            "/ruby-" version ".tar.gz"))
        (sha256
         (base32
          "182vni66djmiqagwzfsd0za7x9k3zag43b88c590aalgphybdnn2"))))
+    (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
        #:configure-flags
@@ -227,7 +166,20 @@  (define-public ruby-2.7
      (append (if (%current-target-system)
                  (list this-package)
                  '())
-             (list autoconf)))))
+             (list autoconf)))
+    (inputs
+     (list readline openssl-1.1 libffi gdbm))
+    (propagated-inputs
+     (list zlib))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "GEM_PATH")
+            (files (list (string-append "lib/ruby/vendor_ruby"))))))
+    (synopsis "Programming language interpreter")
+    (description "Ruby is a dynamic object-oriented programming language with
+a focus on simplicity and productivity.")
+    (home-page "https://www.ruby-lang.org")
+    (license license:ruby)))
 
 (define-public ruby-3.0
   (package