unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 65924@debbugs.gnu.org
Cc: "Maxim Cournoyer" <maxim.cournoyer@gmail.com>,
	"Maxim Cournoyer" <maxim.cournoyer@gmail.com>,
	"Simon Tournier" <zimon.toutoune@gmail.com>,
	"Ludovic Courtès" <ludo@gnu.org>
Subject: bug#65924: [PATCH core-updates 2/3] gnu: git: Invert inheritance relationship.
Date: Sat,  7 Oct 2023 23:18:50 -0400	[thread overview]
Message-ID: <9f9ecf37a04d6a3d788d247d8fb46f7bd6fabad5.1696734901.git.maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <cover.1696734901.git.maxim.cournoyer@gmail.com>

It's simpler to add features on top of a minimal variant than to remove them,
and helps avoiding mistakenly changing git-minimal, which has many dependents.

* gnu/packages/version-control.scm (git-minimal): Move above git and severe
inheritance.  Remove input label.  Repatriate most fields from...
(git): ... here.  Define as package/inherit to inherit from git-minimal.
Extend minimal values instead of overriding them whole.
---
 gnu/packages/version-control.scm | 603 +++++++++++++++----------------
 1 file changed, 292 insertions(+), 311 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 7a3c17efd8..bc647d1538 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -224,13 +224,16 @@ (define-public bazaar
   (deprecated-package "bazaar" breezy))
 
 (define git-cross-configure-flags
-  '("ac_cv_fread_reads_directories=yes"
-    "ac_cv_snprintf_returns_bogus=no"
-    "ac_cv_iconv_omits_bom=no"))
+  #~(list "ac_cv_fread_reads_directories=yes"
+          "ac_cv_snprintf_returns_bogus=no"
+          "ac_cv_iconv_omits_bom=no"))
 
-(define-public git
+;; The size of the closure of 'git-minimal' is two thirds that of 'git'.
+;; Its test suite runs slightly faster and most importantly it doesn't
+;; depend on packages that are expensive to build such as Subversion.
+(define-public git-minimal
   (package
-    (name "git")
+    (name "git-minimal")
     (version "2.41.0")
     (source (origin
               (method url-fetch)
@@ -240,60 +243,19 @@ (define-public git
                (base32
                 "0h40arw08xbpi2cbf7pvc947v963rjxz3inb2ar81zjc8byvlj77"))))
     (build-system gnu-build-system)
-    (native-inputs
-     (list perl
-           ;; Add bash-minimal explicitly to ensure it comes before bash-for-tests,
-           ;; see <https://bugs.gnu.org/39513>.
-           bash-minimal
-           bash
-           gettext-minimal
-           ;; For subtree documentation.
-           asciidoc
-           docbook2x
-           docbook-xsl
-           libxslt
-           pkg-config
-           texinfo
-           xmlto))
-    (inputs
-     (list curl
-           expat
-           openssl
-           perl
-           python                       ;for git-p4
-           zlib
-
-           ;; For PCRE support in git grep (USE_LIBPCRE2).
-           pcre2
-
-           ;; For 'gitweb.cgi'.
-           perl-cgi
-
-           ;; For 'git-svn'.
-           subversion
-           perl-term-readkey
-
-           ;; For 'git-send-email'.
-           perl-authen-sasl
-           perl-net-smtp-ssl
-           perl-io-socket-ssl
-
-           ;; For 'git gui', 'gitk', and 'git citool'.
-           tcl
-           tk
-
-           ;; For 'git-credential-libsecret'
-           glib
-           libsecret))
-    (outputs '("out"                    ;the core
-               "send-email"             ;for git-send-email
-               "svn"                    ;git-svn
-               "credential-netrc"       ;git-credential-netrc
-               "credential-libsecret"   ;git-credential-libsecret
-               "subtree"                ;git-subtree
-               "gui"))                  ;gitk, git gui
     (arguments
      (list
+      #:modules `((srfi srfi-1)
+                  (srfi srfi-26)
+                  ((guix build gnu-build-system) #:prefix gnu:)
+                  ,@%gnu-build-system-modules)
+      ;; Make sure the full bash does not end up in the final closure.
+      #:disallowed-references (list bash perl)
+      #:test-target "test"
+      #:configure-flags
+      (if (%current-target-system)
+          git-cross-configure-flags
+          #~(list))
       #:make-flags
       #~(list "V=1"                     ;more verbose compilation
               (string-append "SHELL_PATH="
@@ -305,32 +267,10 @@ (define-public git
                              #$(this-package-native-input "bash")
                              "/bin/bash")
 
-              "USE_LIBPCRE2=yes"
-
               ;; By default 'make install' creates hard links for
               ;; things in 'libexec/git-core', which leads to huge
               ;; nars; see <https://bugs.gnu.org/21949>.
               "NO_INSTALL_HARDLINKS=indeed")
-
-      ;; Make sure the full bash does not end up in the final closure.
-      #:disallowed-references (list bash)
-
-      #:test-target "test"
-
-      ;; The explicit --with-tcltk forces the build system to hardcode the
-      ;; absolute file name to 'wish'.
-      #:configure-flags
-      #~(list (string-append "--with-tcltk="
-                             (search-input-file %build-inputs
-                                                "bin/wish8.6"))
-              #$@(if (%current-target-system)
-                     git-cross-configure-flags
-                     #~()))
-
-      #:modules `((srfi srfi-1)
-                  (srfi srfi-26)
-                  ((guix build gnu-build-system) #:prefix gnu:)
-                  ,@%gnu-build-system-modules)
       #:phases
       #~(modify-phases %standard-phases
           #$@(if (%current-target-system)
@@ -354,6 +294,13 @@ (define-public git
                                    (remove (cut string-prefix? bash-full <>)
                                            path)
                                    ":")))))))
+          #$@(if (system-hurd?)
+                 #~((add-after 'unpack 'delete-tests/hurd
+                      (lambda _
+                        (delete-file "t/t0052-simple-ipc.sh")
+                        (delete-file "t/t5562-http-backend-content-length.sh")
+                        (delete-file "t/t9902-completion.sh"))))
+                 #~())
           ;; Add cross curl-config script to PATH when cross-compiling.
           #$@(if (%current-target-system)
                  #~((add-before 'configure 'add-cross-curl-config
@@ -367,34 +314,11 @@ (define-public git
           (add-after 'configure 'patch-makefiles
             (lambda _
               (substitute* "Makefile"
-                (("/usr/bin/perl") (which "perl"))
-                (("/usr/bin/python") (which "python3")))))
+                (("/usr/bin/perl") (which "perl")))))
           (add-after 'configure 'add-PM.stamp
             (lambda _
               ;; Add the "PM.stamp" to avoid "no rule to make target".
               (call-with-output-file "perl/PM.stamp" (const #t))))
-          (add-after 'build 'build-subtree
-            (lambda* (#:key native-inputs inputs #:allow-other-keys)
-              (with-directory-excursion "contrib/subtree"
-                (substitute* "Makefile"
-                  ;; Apparently `xmlto' does not bother to looks up the
-                  ;; stylesheets specified in the XML, unlike the above
-                  ;; substitution.  Instead it uses a hard-coded URL.  Work
-                  ;; around it here, but if this is common perhaps we should
-                  ;; hardcode this path in xmlto itself.
-                  (("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\)")
-                   (string-append "$(XMLTO) -x "
-                                  (search-input-directory
-                                   (or native-inputs inputs)
-                                   (string-append
-                                    "xml/xsl/docbook-xsl-"
-                                    #$(package-version docbook-xsl)))
-                                  "/manpages/docbook.xsl -m $(MANPAGE_XSL)")))
-                (invoke "make")
-                (invoke "make" "install")
-                (invoke "make" "install-doc")
-                (substitute* "git-subtree"
-                  (("/bin/sh") (which "sh"))))))
           (add-before 'check 'patch-tests
             (lambda _
               (let ((store-directory (%store-directory)))
@@ -436,16 +360,6 @@ (define-public git
                           '("t/t9128-git-svn-cmd-branch.sh"
                             "t/t9167-git-svn-cmd-branch-subproject.sh"
                             "t/t9141-git-svn-multiple-branches.sh")))))
-          (add-after 'install 'install-info-manual
-            (lambda* (#:key parallel-build? #:allow-other-keys)
-              (define job-count (if parallel-build?
-                                    (number->string (parallel-job-count))
-                                    "1"))
-              (invoke "make" "-C" "Documentation" "install-info"
-                      "-j" job-count
-                      ;; The Makefile refer to 'docbook2x-texi', but our binary
-                      ;; is named 'docbook2texi'.
-                      "DOCBOOK2X_TEXI=docbook2texi" "PERL_PATH=perl")))
           (add-after 'install 'install-shell-completion
             (lambda _
               (let ((completions (string-append #$output
@@ -455,36 +369,34 @@ (define-public git
                 (mkdir-p completions)
                 (copy-file "contrib/completion/git-completion.bash"
                            (string-append completions "/git")))))
-          (add-after 'install 'install-credential-netrc
-            (lambda _
-              (install-file "contrib/credential/netrc/git-credential-netrc.perl"
-                            (string-append #$output:credential-netrc "/bin"))
-              (rename-file (string-append #$output:credential-netrc
-                                          "/bin/git-credential-netrc.perl")
-                           (string-append #$output:credential-netrc
-                                          "/bin/git-credential-netrc"))
-              ;; Previously, Git.pm was automatically found by netrc.
-              ;; Perl 5.26 changed how it locates modules so that @INC no
-              ;; longer includes the current working directory (the Perl
-              ;; community calls this "dotless @INC").
-              (wrap-program (string-append #$output:credential-netrc
-                                           "/bin/git-credential-netrc")
-                `("PERL5LIB" ":" prefix
-                  (,(string-append #$output "/share/perl5"))))))
-          (add-after 'install 'install-credential-libsecret
+          (add-after 'install 'remove-unusable-perl-commands
             (lambda _
-              (with-directory-excursion "contrib/credential/libsecret"
-                ((assoc-ref gnu:%standard-phases 'build))
-                (install-file "git-credential-libsecret"
-                              (string-append #$output:credential-libsecret
-                                             "/bin")))))
-          (add-after 'install 'install-subtree
-            (lambda _
-              (install-file "contrib/subtree/git-subtree"
-                            (string-append #$output:subtree "/bin"))
-              (install-file "contrib/subtree/git-subtree.1"
-                            (string-append #$output:subtree
-                                           "/share/man/man1"))))
+              (let ((bin     (string-append #$output "/bin"))
+                    (libexec (string-append #$output "/libexec")))
+                (for-each (lambda (file)
+                            (delete-file (string-append libexec
+                                                        "/git-core/" file)))
+                          '("git-svn" "git-cvsimport" "git-archimport"
+                            "git-cvsserver" "git-request-pull"
+
+                            ;; git-add--interactive was removed in Git 2.40 but
+                            ;; this phase is inherited by older versions.
+                            #$@(if (version>=? (package-version this-package)
+                                               "2.40.1")
+                                   #~()
+                                   #~("git-add--interactive"))
+
+                            "git-cvsexportcommit"
+                            "git-instaweb" "git-send-email"))
+                (delete-file (string-append bin "/git-cvsserver"))
+
+                ;; These templates typically depend on Perl.  Remove them.
+                (delete-file-recursively
+                 (string-append #$output "/share/git-core/templates/hooks"))
+
+                ;; Gitweb depends on Perl as well.
+                (delete-file-recursively
+                 (string-append #$output "/share/gitweb")))))
           (add-after 'install 'restore-sample-hooks-shebang
             (lambda _
               (let* ((dir (string-append #$output
@@ -493,111 +405,20 @@ (define-public git
                             (format #t "restoring shebang on `~a'~%" file)
                             (substitute* file
                               (("^#!.*/bin/sh") "#!/bin/sh")))
-                          (find-files dir ".*")))))
-          (add-after 'install 'split
-            (lambda* (#:key inputs #:allow-other-keys)
-              ;; Split the binaries to the various outputs.
-              (let* ((out      #$output)
-                     (se       #$output:send-email)
-                     (svn      #$output:svn)
-                     (gui      #$output:gui)
-                     (gitk     (string-append out "/bin/gitk"))
-                     (gitk*    (string-append gui "/bin/gitk"))
-                     (git-gui  (string-append
-                                out "/libexec/git-core/git-gui"))
-                     (git-gui* (string-append gui "/libexec/git-core/git-gui"))
-                     (git-cit  (string-append
-                                out "/libexec/git-core/git-citool"))
-                     (git-cit* (string-append
-                                gui "/libexec/git-core/git-citool"))
-                     (git-se   (string-append
-                                out "/libexec/git-core/git-send-email"))
-                     (git-se*  (string-append
-                                se  "/libexec/git-core/git-send-email"))
-                     (git-svn  (string-append out "/libexec/git-core/git-svn"))
-                     (git-svn* (string-append svn "/libexec/git-core/git-svn"))
-                     (git-sm   (string-append
-                                out "/libexec/git-core/git-submodule")))
-                (mkdir-p (string-append gui "/bin"))
-                (mkdir-p (string-append gui "/libexec/git-core"))
-                (mkdir-p (string-append se  "/libexec/git-core"))
-                (mkdir-p (string-append svn "/libexec/git-core"))
-
-                (for-each (lambda (old new)
-                            (copy-file old new)
-                            (delete-file old)
-                            (chmod new #o555))
-                          (list gitk git-gui git-cit git-se git-svn)
-                          (list gitk* git-gui* git-cit* git-se* git-svn*))
-
-                ;; Tell 'git-svn' where Subversion and perl-term-readkey are.
-
-                ;; FIXME: Old school 'assoc-ref' is used to retrieve
-                ;; subversion here, as #$(this-package-input "subversion")
-                ;; causes a dependency cycle for unknown reasons.
-                (wrap-program git-svn*
-                  `("PATH" ":" prefix
-                    (,(dirname (search-input-file inputs "bin/perl"))))
-                  `("PERL5LIB" ":" prefix
-                    ,(search-path-as-list
-                      '("lib/perl5/site_perl")
-                      (list (assoc-ref inputs "subversion")
-                            #$(this-package-input "perl-term-readkey"))))
-
-                  ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
-                  ;; help it find 'libsvn_client-1.so'.
-                  `("LD_LIBRARY_PATH" ":" prefix
-                    (,(string-append (assoc-ref inputs "subversion")
-                                     "/lib"))))
-
-                ;; Tell 'git-send-email' where perl modules are.
-                (wrap-program git-se*
-                  `("PERL5LIB" ":" prefix
-                    ,(search-path-as-list
-                      '("lib/perl5/site_perl")
-                      '#$(delete-duplicates
-                          (append-map
-                           (compose last package-transitive-propagated-inputs)
-                           (list (this-package-input "perl-authen-sasl")
-                                 (this-package-input "perl-net-smtp-ssl")
-                                 (this-package-input "perl-io-socket-ssl")))))))
-                ;; Tell 'gitweb.cgi' where perl modules are.
-                (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
-                  `("PERL5LIB" ":" prefix
-                    ,(search-path-as-list
-                      '("lib/perl5/site_perl")
-                      '#$(delete-duplicates
-                          (append-map
-                           (compose last package-transitive-propagated-inputs)
-                           (list (this-package-input "perl-cgi")))))))
-
-                ;; Tell 'git-submodule' where Perl is.
-                (wrap-program git-sm
-                  `("PATH" ":" prefix
-                    (,(dirname (search-input-file inputs "bin/perl"))))))))
-          (add-after 'split 'install-man-pages
-            (lambda _
-              (let ((man (string-append #$output "/share/man")))
-                (mkdir-p man)
-                (with-directory-excursion man
-                  (invoke
-                   "tar" "xvf"
-                   #$(origin
-                       (method url-fetch)
-                       (uri (string-append
-                             "mirror://kernel.org/software/scm/git/"
-                             "git-manpages-" version ".tar.xz"))
-                       (sha256
-                        (base32
-                         "0xsqakgy0s60zpa13ilj6zj420kdh8pf4v3nrp1nziwj8ja4qymw"))))))))
-          #$@(if (system-hurd?)
-                 #~((add-after 'unpack 'delete-tests/hurd
-                      (lambda _
-                        (delete-file "t/t0052-simple-ipc.sh")
-                        (delete-file "t/t5562-http-backend-content-length.sh")
-                        (delete-file "t/t9902-completion.sh"))))
-                 #~()))))
-
+                          (find-files dir ".*"))))))))
+    (native-inputs
+     ;; Add bash-minimal explicitly to ensure it comes before bash-for-tests,
+     ;; see <https://bugs.gnu.org/39513>.
+     (list bash-minimal
+           bash
+           gettext-minimal
+           perl))
+    (inputs
+     (list curl                         ;for HTTP(S) access
+           expat                        ;for 'git push' over HTTP(S)
+           openssl
+           perl
+           zlib))
     (native-search-paths
      ;; For HTTPS access, Git needs a single-file certificate bundle, specified
      ;; with $GIT_SSL_CAINFO.
@@ -610,7 +431,6 @@ (define-public git
             (variable "GIT_EXEC_PATH")
             (separator #f)              ;single entry
             (files '("libexec/git-core")))))
-
     (synopsis "Distributed version control system")
     (description
      "Git is a free distributed version control system designed to handle
@@ -632,76 +452,237 @@ (define-public git
     (license license:gpl2)
     (home-page "https://git-scm.com/")))
 
-(define-public git-minimal
-  ;; The size of the closure of 'git-minimal' is two thirds that of 'git'.
-  ;; Its test suite runs slightly faster and most importantly it doesn't
-  ;; depend on packages that are expensive to build such as Subversion.
-  (package
-    (inherit git)
-    (name "git-minimal")
+(define-public git
+  (package/inherit git-minimal
+    (name "git")
+    (outputs '("out"                    ;the core
+               "send-email"             ;for git-send-email
+               "svn"                    ;git-svn
+               "credential-netrc"       ;git-credential-netrc
+               "credential-libsecret"   ;git-credential-libsecret
+               "subtree"                ;git-subtree
+               "gui"))                  ;gitk, git gui
     (arguments
-     (substitute-keyword-arguments (package-arguments git)
-       ((#:phases phases)
+     (substitute-keyword-arguments (package-arguments git-minimal)
+       ((#:disallowed-references disallowed-refs ''())
+        (delete perl disallowed-refs))
+       ((#:make-flags flags #~'())
+        #~(cons "USE_LIBPCRE2=yes" #$flags))
+       ((#:configure-flags flags #~'())
+        ;; The explicit --with-tcltk forces the build system to hardcode the
+        ;; absolute file name to 'wish'.
+        #~(cons (string-append "--with-tcltk="
+                               (search-input-file %build-inputs
+                                                  "bin/wish8.6"))
+                #$flags))
+       ((#:phases phases '%standard-phases)
         #~(modify-phases #$phases
+            (delete 'remove-unusable-perl-commands)
             (replace 'patch-makefiles
               (lambda _
                 (substitute* "Makefile"
-                  (("/usr/bin/perl") (which "perl")))))
-            (delete 'build-subtree)
-            (delete 'split)
-            (delete 'install-man-pages)
-            (delete 'install-info-manual)
-            (delete 'install-subtree)
-            (delete 'install-credential-netrc)
-            (delete 'install-credential-libsecret)
-            (add-after 'install 'remove-unusable-perl-commands
-              (lambda* (#:key outputs #:allow-other-keys)
-                (let ((bin     (string-append #$output "/bin"))
-                      (libexec (string-append #$output "/libexec")))
-                  (for-each (lambda (file)
-                              (delete-file (string-append libexec
-                                                          "/git-core/" file)))
-                            '("git-svn" "git-cvsimport" "git-archimport"
-                              "git-cvsserver" "git-request-pull"
-
-                              ;; git-add--interactive was removed in Git 2.40 but
-                              ;; this phase is inherited by older versions.
-                              #$@(if (version>=? (package-version this-package)
-                                                 "2.40.1")
-                                     #~()
-                                     #~("git-add--interactive"))
-
-                              "git-cvsexportcommit"
-                              "git-instaweb" "git-send-email"))
-                  (delete-file (string-append bin "/git-cvsserver"))
-
-                  ;; These templates typically depend on Perl.  Remove them.
-                  (delete-file-recursively
-                   (string-append #$output "/share/git-core/templates/hooks"))
-
-                  ;; Gitweb depends on Perl as well.
-                  (delete-file-recursively
-                   (string-append #$output "/share/gitweb")))))))
-       ((#:make-flags flags)
-        #~(delete "USE_LIBPCRE2=yes" #$flags))
-       ((#:configure-flags flags)
-        #~(list #$@(if (%current-target-system)
-                       git-cross-configure-flags
-                       '())))
-       ((#:disallowed-references lst '())
-        `(,perl ,@lst))))
-    (outputs '("out"))
+                  (("/usr/bin/perl") (which "perl"))
+                  (("/usr/bin/python") (which "python3")))))
+            (add-after 'build 'build-subtree
+              (lambda* (#:key native-inputs inputs #:allow-other-keys)
+                (with-directory-excursion "contrib/subtree"
+                  (substitute* "Makefile"
+                    ;; Apparently `xmlto' does not bother to looks up the
+                    ;; stylesheets specified in the XML, unlike the above
+                    ;; substitution.  Instead it uses a hard-coded URL.  Work
+                    ;; around it here, but if this is common perhaps we should
+                    ;; hardcode this path in xmlto itself.
+                    (("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\)")
+                     (string-append "$(XMLTO) -x "
+                                    (search-input-directory
+                                     (or native-inputs inputs)
+                                     (string-append
+                                      "xml/xsl/docbook-xsl-"
+                                      #$(package-version docbook-xsl)))
+                                    "/manpages/docbook.xsl -m $(MANPAGE_XSL)")))
+                  (invoke "make")
+                  (invoke "make" "install")
+                  (invoke "make" "install-doc")
+                  (substitute* "git-subtree"
+                    (("/bin/sh") (which "sh"))))))
+            (add-after 'install 'install-info-manual
+              (lambda* (#:key parallel-build? #:allow-other-keys)
+                (define job-count (if parallel-build?
+                                      (number->string (parallel-job-count))
+                                      "1"))
+                (invoke "make" "-C" "Documentation" "install-info"
+                        "-j" job-count
+                        ;; The Makefile refer to 'docbook2x-texi', but our
+                        ;; binary is named 'docbook2texi'.
+                        "DOCBOOK2X_TEXI=docbook2texi" "PERL_PATH=perl")))
+            (add-after 'install 'install-credential-netrc
+              (lambda _
+                (install-file
+                 "contrib/credential/netrc/git-credential-netrc.perl"
+                 (string-append #$output:credential-netrc "/bin"))
+                (rename-file (string-append #$output:credential-netrc
+                                            "/bin/git-credential-netrc.perl")
+                             (string-append #$output:credential-netrc
+                                            "/bin/git-credential-netrc"))
+                ;; Previously, Git.pm was automatically found by netrc.
+                ;; Perl 5.26 changed how it locates modules so that @INC no
+                ;; longer includes the current working directory (the Perl
+                ;; community calls this "dotless @INC").
+                (wrap-program (string-append #$output:credential-netrc
+                                             "/bin/git-credential-netrc")
+                  `("PERL5LIB" ":" prefix
+                    (,(string-append #$output "/share/perl5"))))))
+            (add-after 'install 'install-credential-libsecret
+              (lambda _
+                (with-directory-excursion "contrib/credential/libsecret"
+                  ((assoc-ref gnu:%standard-phases 'build))
+                  (install-file "git-credential-libsecret"
+                                (string-append #$output:credential-libsecret
+                                               "/bin")))))
+            (add-after 'install 'install-subtree
+              (lambda _
+                (install-file "contrib/subtree/git-subtree"
+                              (string-append #$output:subtree "/bin"))
+                (install-file "contrib/subtree/git-subtree.1"
+                              (string-append #$output:subtree
+                                             "/share/man/man1"))))
+            (add-after 'install 'split
+              (lambda* (#:key inputs #:allow-other-keys)
+                ;; Split the binaries to the various outputs.
+                (let* ((out      #$output)
+                       (se       #$output:send-email)
+                       (svn      #$output:svn)
+                       (gui      #$output:gui)
+                       (gitk     (string-append out "/bin/gitk"))
+                       (gitk*    (string-append gui "/bin/gitk"))
+                       (git-gui  (string-append
+                                  out "/libexec/git-core/git-gui"))
+                       (git-gui* (string-append
+                                  gui "/libexec/git-core/git-gui"))
+                       (git-cit  (string-append
+                                  out "/libexec/git-core/git-citool"))
+                       (git-cit* (string-append
+                                  gui "/libexec/git-core/git-citool"))
+                       (git-se   (string-append
+                                  out "/libexec/git-core/git-send-email"))
+                       (git-se*  (string-append
+                                  se  "/libexec/git-core/git-send-email"))
+                       (git-svn  (string-append
+                                  out "/libexec/git-core/git-svn"))
+                       (git-svn* (string-append
+                                  svn "/libexec/git-core/git-svn"))
+                       (git-sm   (string-append
+                                  out "/libexec/git-core/git-submodule")))
+                  (mkdir-p (string-append gui "/bin"))
+                  (mkdir-p (string-append gui "/libexec/git-core"))
+                  (mkdir-p (string-append se  "/libexec/git-core"))
+                  (mkdir-p (string-append svn "/libexec/git-core"))
+
+                  (for-each (lambda (old new)
+                              (copy-file old new)
+                              (delete-file old)
+                              (chmod new #o555))
+                            (list gitk git-gui git-cit git-se git-svn)
+                            (list gitk* git-gui* git-cit* git-se* git-svn*))
+
+                  ;; Tell 'git-svn' where Subversion and perl-term-readkey are.
+
+                  ;; FIXME: Old school 'assoc-ref' is used to retrieve
+                  ;; subversion here, as #$(this-package-input "subversion")
+                  ;; causes a dependency cycle for unknown reasons.
+                  (wrap-program git-svn*
+                    `("PATH" ":" prefix
+                      (,(dirname (search-input-file inputs "bin/perl"))))
+                    `("PERL5LIB" ":" prefix
+                      ,(search-path-as-list
+                        '("lib/perl5/site_perl")
+                        (list (assoc-ref inputs "subversion")
+                              #$(this-package-input "perl-term-readkey"))))
+
+                    ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
+                    ;; help it find 'libsvn_client-1.so'.
+                    `("LD_LIBRARY_PATH" ":" prefix
+                      (,(string-append (assoc-ref inputs "subversion")
+                                       "/lib"))))
+
+                  ;; Tell 'git-send-email' where perl modules are.
+                  (wrap-program git-se*
+                    `("PERL5LIB" ":" prefix
+                      ,(search-path-as-list
+                        '("lib/perl5/site_perl")
+                        '#$(delete-duplicates
+                            (append-map
+                             (compose last package-transitive-propagated-inputs)
+                             (list (this-package-input "perl-authen-sasl")
+                                   (this-package-input "perl-net-smtp-ssl")
+                                   (this-package-input
+                                    "perl-io-socket-ssl")))))))
+                  ;; Tell 'gitweb.cgi' where perl modules are.
+                  (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
+                    `("PERL5LIB" ":" prefix
+                      ,(search-path-as-list
+                        '("lib/perl5/site_perl")
+                        '#$(delete-duplicates
+                            (append-map
+                             (compose last package-transitive-propagated-inputs)
+                             (list (this-package-input "perl-cgi")))))))
+
+                  ;; Tell 'git-submodule' where Perl is.
+                  (wrap-program git-sm
+                    `("PATH" ":" prefix
+                      (,(dirname (search-input-file inputs "bin/perl"))))))))
+            (add-after 'split 'install-man-pages
+              (lambda _
+                (let ((man (string-append #$output "/share/man")))
+                  (mkdir-p man)
+                  (with-directory-excursion man
+                    (invoke
+                     "tar" "xvf"
+                     #$(origin
+                         (method url-fetch)
+                         (uri (string-append
+                               "mirror://kernel.org/software/scm/git/"
+                               "git-manpages-" (package-version this-package)
+                               ".tar.xz"))
+                         (sha256
+                          (base32
+                           "0xsqakgy0s60zpa13ilj6zj420kdh8pf4v3nrp1nziwj8ja4qymw"))))))))))))
     (native-inputs
-     `(("bash" ,bash-minimal)
-       ("bash-for-tests" ,bash)
-       ("native-perl" ,perl)
-       ("gettext" ,gettext-minimal)))
+     (modify-inputs (package-native-inputs git-minimal)
+       ;; For subtree documentation.
+       (append asciidoc
+               docbook2x
+               docbook-xsl
+               libxslt
+               pkg-config
+               texinfo
+               xmlto)))
     (inputs
-     (list curl ;for HTTP(S) access
-           expat ;for 'git push' over HTTP(S)
-           openssl
-           perl
-           zlib))))
+     (modify-inputs (package-inputs git-minimal)
+       (append python                   ;for git-p4
+
+               ;; For PCRE support in git grep (USE_LIBPCRE2).
+               pcre2
+
+               ;; For 'gitweb.cgi'.
+               perl-cgi
+
+               ;; For 'git-svn'.
+               subversion
+               perl-term-readkey
+
+               ;; For 'git-send-email'.
+               perl-authen-sasl
+               perl-net-smtp-ssl
+               perl-io-socket-ssl
+
+               ;; For 'git gui', 'gitk', and 'git citool'.
+               tcl
+               tk
+
+               ;; For 'git-credential-libsecret'
+               glib
+               libsecret)))))
 
 ;;; The symbol git-minimal/fixed should be used when git-minimal needs fixes
 ;;; (security or else) and this deprecation could be removed.
-- 
2.41.0





  parent reply	other threads:[~2023-10-08  3:21 UTC|newest]

Thread overview: 98+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13 18:00 bug#65924: git searches coreutils and util-linux commands in PATH Maxim Cournoyer
2023-09-13 22:27 ` Simon Tournier
2023-09-14  3:14   ` Maxim Cournoyer
2023-09-14  6:12     ` Simon Tournier
2023-10-04 16:14 ` Ludovic Courtès
2023-10-04 16:52   ` Simon Tournier
2023-10-05  3:41   ` Maxim Cournoyer
2023-10-05 16:21     ` Simon Tournier
2023-10-08  3:18 ` bug#65924: [PATCH core-updates 0/3] Fix 'git submodule' in pure environments Maxim Cournoyer
2023-10-08  3:18   ` bug#65924: [PATCH core-updates 1/3] gnu: git: Remove labels and use gexps Maxim Cournoyer
2023-10-08  7:09     ` Liliana Marie Prikler
2023-10-14 16:51     ` Ludovic Courtès
2023-10-15 19:55       ` Maxim Cournoyer
2023-10-08  3:18   ` Maxim Cournoyer [this message]
2023-10-08  7:03     ` bug#65924: [PATCH core-updates 2/3] gnu: git: Invert inheritance relationship Liliana Marie Prikler
2023-10-09 14:21       ` bug#65924: git searches coreutils and util-linux commands in PATH Maxim Cournoyer
2023-10-09 16:49         ` Liliana Marie Prikler
2023-10-09 18:21           ` Maxim Cournoyer
2023-10-09 18:33             ` Liliana Marie Prikler
2023-10-09 19:25               ` Maxim Cournoyer
2023-10-09 19:28                 ` Liliana Marie Prikler
2023-10-09 19:44                   ` Maxim Cournoyer
2023-10-09 21:03               ` bokr
2023-10-10  4:28                 ` Liliana Marie Prikler
2023-10-09 19:17           ` Maxim Cournoyer
2023-10-14 16:54     ` bug#65924: [PATCH core-updates 2/3] gnu: git: Invert inheritance relationship Ludovic Courtès
2023-10-08  3:18   ` bug#65924: [PATCH core-updates 3/3] gnu: git-minimal: Add coreutils and sed to PATH Maxim Cournoyer
2023-10-14 17:01     ` Ludovic Courtès
2023-10-15 20:03       ` Maxim Cournoyer
2023-10-17 15:15       ` Maxim Cournoyer
2023-10-09 16:28 ` bug#65924: [PATCH 00/65] Export %default-gnu-imported-modules and %default-gnu-modules Maxim Cournoyer
2023-10-09 16:28   ` bug#65924: [PATCH core-updates 02/65] gnu: acl: Remove labels and trailing #t Maxim Cournoyer
2023-10-09 16:28   ` bug#65924: [PATCH core-updates 03/65] gnu: acl: Import the correct set of modules Maxim Cournoyer
2023-10-09 16:28   ` bug#65924: [PATCH core-updates 04/65] gnu: dirvish: " Maxim Cournoyer
2023-10-09 16:28   ` bug#65924: [PATCH core-updates 05/65] gnu: fio: " Maxim Cournoyer
2023-10-09 16:28   ` bug#65924: [PATCH core-updates 06/65] gnu: ccwl: " Maxim Cournoyer
2023-10-09 16:28   ` bug#65924: [PATCH core-updates 07/65] gnu: boost: " Maxim Cournoyer
2023-10-09 16:28   ` bug#65924: [PATCH core-updates 08/65] gnu: gcc-final: " Maxim Cournoyer
2023-10-09 16:28   ` bug#65924: [PATCH core-updates 09/65] gnu: epson-inkjet-printer-escpr: " Maxim Cournoyer
2023-10-09 16:28   ` bug#65924: [PATCH core-updates 10/65] gnu: splix: " Maxim Cournoyer
2023-10-09 16:37     ` Maxim Cournoyer
2023-10-09 16:36   ` bug#65924: git searches coreutils and util-linux commands in PATH Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 01/65] build-systems: gnu: Export %default-gnu-imported-modules and %default-gnu-modules Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 11/65] gnu: guile-curl: Import the correct set of modules Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 12/65] gnu: dpkg: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 13/65] gnu: dezyne: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 14/65] gnu: fastcap: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 15/65] gnu: fasthenry: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 16/65] gnu: seabios-qemu: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 17/65] gnu: font-amiri: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 18/65] gnu: xdg-utils: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 19/65] gnu: tsukundere: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 20/65] gnu: gcc-4.9: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 21/65] gnu: make-libstdc++: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 22/65] gnu: custom-gcc: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 23/65] gnu: gdb: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 24/65] gnu: genimage: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 25/65] gnu: gimp: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 26/65] gnu: pinentry-rofi: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 27/65] gnu: mozjs: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 28/65] gnu: icecat-minimal: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 29/65] gnu: icedove-minimal: " Maxim Cournoyer
2023-10-09 16:37   ` bug#65924: [PATCH core-updates 30/65] gnu: python-graph-tool: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 31/65] gnu: artanis: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 32/65] gnu: guilescript: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 33/65] gnu: guile-dsv: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 34/65] gnu: guile-di: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 35/65] gnu: guile-hall: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 36/65] gnu: haunt: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 37/65] gnu: guile-studio: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 38/65] gnu: guile-libyaml: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 39/65] gnu: guile-gitlab: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 40/65] gnu: guile-smc: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 41/65] gnu: rime-data: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 42/65] gnu: jbigkit: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 43/65] gnu: uftrace: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 44/65] gnu: mdadm-static: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 45/65] gnu: ecryptfs-utils: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 46/65] gnu: ghmm: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 47/65] gnu: %gcc-static: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 48/65] gnu: mumps: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 49/65] gnu: hypre: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 50/65] gnu: lingeling: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 51/65] gnu: guix-build-coordinator: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 52/65] gnu: nar-herder: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 53/65] gnu: python-sip-4: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 54/65] gnu: ratpoison: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 55/65] gnu: stklos: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 56/65] gnu: python-sepolgen: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 57/65] gnu: boxes: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 58/65] gnu: simh: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 59/65] gnu: stb: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 60/65] gnu: info-reader: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 61/65] gnu: git: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 62/65] gnu: ffmpeg-3.4: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 63/65] gnu: qemu: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 64/65] gnu: ganeti: " Maxim Cournoyer
2023-10-09 16:38   ` bug#65924: [PATCH core-updates 65/65] gnu: criu: " Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9f9ecf37a04d6a3d788d247d8fb46f7bd6fabad5.1696734901.git.maxim.cournoyer@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=65924@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).