* bug#24105: git package misses man pages
@ 2016-07-29 12:46 Andreas Enge
2016-07-29 17:10 ` Leo Famulari
0 siblings, 1 reply; 6+ messages in thread
From: Andreas Enge @ 2016-07-29 12:46 UTC (permalink / raw)
To: 24105
Hello,
wondering why "git log --help" does not work, I thought that maybe there
was a different doc output. But the man pages are actually hidden in a
separate package called "git-manpages". This is surprising for the user.
Also, the resulting package is quite small with only 2.3 MB.
The reason for the separate package is given as this:
;; Granted, we could build the man pages from the 'git' package itself,
;; which contains the real source. However, it would add a dependency on a
;; full XML tool chain, and building it actually takes ages. So we use this
;; lazy approach.
Building will most of the time happen on the build farm, so the time it
takes should not be an issue. I suppose that the xml tool chain will only
be a native and not a normal input, so it should not be too much of a problem.
I suggest to include the man pages into the git package itself. If building
them is a real issue, adding a source and the build phase of git-manpages
to the git package itself could also be an option.
Thanks!
Andreas
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#24105: git package misses man pages
2016-07-29 12:46 bug#24105: git package misses man pages Andreas Enge
@ 2016-07-29 17:10 ` Leo Famulari
2016-07-30 13:46 ` Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: Leo Famulari @ 2016-07-29 17:10 UTC (permalink / raw)
To: Andreas Enge; +Cc: 24105
On Fri, Jul 29, 2016 at 02:46:23PM +0200, Andreas Enge wrote:
> Also, the resulting package is quite small with only 2.3 MB.
Not much, considering how often I consult these manpages.
> The reason for the separate package is given as this:
> ;; Granted, we could build the man pages from the 'git' package itself,
> ;; which contains the real source. However, it would add a dependency on a
> ;; full XML tool chain, and building it actually takes ages. So we use this
> ;; lazy approach.
> Building will most of the time happen on the build farm, so the time it
> takes should not be an issue. I suppose that the xml tool chain will only
> be a native and not a normal input, so it should not be too much of a problem.
Our git-manpages package doesn't build the manpages from source anyways.
It simply unpacks a tarball of pre-built manpages.
> I suggest to include the man pages into the git package itself. If building
> them is a real issue, adding a source and the build phase of git-manpages
> to the git package itself could also be an option.
I agree. If we continue to not build them from source, it won't make the
Git package any more "expensive". We could add the pre-built source
tarball as a native-input to the Git package, and re-use the unpack
phase from git-manpages.
I think the current arrangement offers a bad experience for new users
who can't find the manpages.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#24105: git package misses man pages
2016-07-29 17:10 ` Leo Famulari
@ 2016-07-30 13:46 ` Ludovic Courtès
2016-08-09 19:03 ` Leo Famulari
0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2016-07-30 13:46 UTC (permalink / raw)
To: Leo Famulari; +Cc: 24105
Leo Famulari <leo@famulari.name> skribis:
> On Fri, Jul 29, 2016 at 02:46:23PM +0200, Andreas Enge wrote:
[...]
>> I suggest to include the man pages into the git package itself. If building
>> them is a real issue, adding a source and the build phase of git-manpages
>> to the git package itself could also be an option.
>
> I agree. If we continue to not build them from source, it won't make the
> Git package any more "expensive". We could add the pre-built source
> tarball as a native-input to the Git package, and re-use the unpack
> phase from git-manpages.
I agree too, this sounds like a good idea.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#24105: git package misses man pages
2016-07-30 13:46 ` Ludovic Courtès
@ 2016-08-09 19:03 ` Leo Famulari
2016-08-17 9:33 ` Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: Leo Famulari @ 2016-08-09 19:03 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 24105
[-- Attachment #1: Type: text/plain, Size: 749 bytes --]
On Sat, Jul 30, 2016 at 03:46:29PM +0200, Ludovic Courtès wrote:
> Leo Famulari <leo@famulari.name> skribis:
>
> > On Fri, Jul 29, 2016 at 02:46:23PM +0200, Andreas Enge wrote:
>
> [...]
>
> >> I suggest to include the man pages into the git package itself. If building
> >> them is a real issue, adding a source and the build phase of git-manpages
> >> to the git package itself could also be an option.
> >
> > I agree. If we continue to not build them from source, it won't make the
> > Git package any more "expensive". We could add the pre-built source
> > tarball as a native-input to the Git package, and re-use the unpack
> > phase from git-manpages.
>
> I agree too, this sounds like a good idea.
I've attached a patch. Your thoughts?
[-- Attachment #2: 0001-gnu-git-Provide-man-pages-in-main-Git-package.patch --]
[-- Type: text/x-diff, Size: 4668 bytes --]
From 2407216eac19e5a7a3376efc497f7047dc0c8299 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Tue, 9 Aug 2016 14:55:37 -0400
Subject: [PATCH] gnu: git: Provide man-pages in main Git package.
* gnu/packages/version-control.scm (git-manpages): Remove variable.
(git)[native-inputs]: Add GIT-MANPAGES.
[arguments]: Add 'install-man-pages' phase.
---
gnu/packages/version-control.scm | 69 ++++++++++++----------------------------
1 file changed, 20 insertions(+), 49 deletions(-)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 767715d..dd0195d 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -110,7 +111,6 @@ as well as the classic centralized workflow.")
(license gpl2+)))
(define-public git
- ;; Keep in sync with 'git-manpages'!
(package
(name "git")
(version "2.9.2")
@@ -124,7 +124,16 @@ as well as the classic centralized workflow.")
(build-system gnu-build-system)
(native-inputs
`(("native-perl" ,perl)
- ("gettext" ,gnu-gettext)))
+ ("gettext" ,gnu-gettext)
+ ("git-manpages"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://kernel.org/software/scm/git/git-manpages-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "08y38w6yfvrpgj10dl3vghp05xjpl8jj37kkfna2nhf0wip52p2c"))))))
(inputs
`(("curl" ,curl)
("expat" ,expat)
@@ -260,7 +269,15 @@ as well as the classic centralized workflow.")
;; specify a single directory, not a search path.
(wrap-program (string-append out "/bin/git")
`("PATH" ":" prefix
- ("$HOME/.guix-profile/libexec/git-core")))))))))
+ ("$HOME/.guix-profile/libexec/git-core"))))))
+ (add-after 'split 'install-man-pages
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (man (string-append out "/share/man"))
+ (manpages (assoc-ref inputs "git-manpages")))
+ (mkdir-p man)
+ (with-directory-excursion man
+ (zero? (system* "tar" "xvf" manpages)))))))))
(native-search-paths
;; For HTTPS access, Git needs a single-file certificate bundle, specified
@@ -278,52 +295,6 @@ everything from small to very large projects with speed and efficiency.")
(license gpl2)
(home-page "http://git-scm.com/")))
-(define-public git-manpages
- ;; Keep in sync with 'git'!
-
- ;; Granted, we could build the man pages from the 'git' package itself,
- ;; which contains the real source. However, it would add a dependency on a
- ;; full XML tool chain, and building it actually takes ages. So we use this
- ;; lazy approach.
- (package
- (name "git-manpages")
- (version (package-version git))
- (source (origin
- (method url-fetch)
- (uri (string-append
- "mirror://kernel.org/software/scm/git/git-manpages-"
- version ".tar.xz"))
- (sha256
- (base32
- "08y38w6yfvrpgj10dl3vghp05xjpl8jj37kkfna2nhf0wip52p2c"))))
- (build-system trivial-build-system)
- (arguments
- '(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
-
- (let* ((xz (assoc-ref %build-inputs "xz"))
- (tar (assoc-ref %build-inputs "tar"))
- (out (assoc-ref %outputs "out"))
- (man (string-append out "/share/man")))
- (setenv "PATH" (string-append tar "/bin:" xz "/bin"))
-
- (mkdir-p man)
- (with-directory-excursion man
- (zero? (system* "tar" "xvf"
- (assoc-ref %build-inputs "source"))))))))
-
- (native-inputs `(("tar" ,tar)
- ("xz" ,xz)))
- (home-page (package-home-page git))
- (license (package-license git))
- (synopsis "Man pages of the Git version control system")
- (description
- "This package provides the man pages of the Git version control system.
-This is the documentation displayed when using the '--help' option of a 'git'
-command.")))
-
(define-public libgit2
(package
(name "libgit2")
--
2.9.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#24105: git package misses man pages
2016-08-09 19:03 ` Leo Famulari
@ 2016-08-17 9:33 ` Ludovic Courtès
2016-08-18 2:42 ` Leo Famulari
0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2016-08-17 9:33 UTC (permalink / raw)
To: Leo Famulari; +Cc: 24105
Leo Famulari <leo@famulari.name> skribis:
> On Sat, Jul 30, 2016 at 03:46:29PM +0200, Ludovic Courtès wrote:
>> Leo Famulari <leo@famulari.name> skribis:
>>
>> > On Fri, Jul 29, 2016 at 02:46:23PM +0200, Andreas Enge wrote:
>>
>> [...]
>>
>> >> I suggest to include the man pages into the git package itself. If building
>> >> them is a real issue, adding a source and the build phase of git-manpages
>> >> to the git package itself could also be an option.
>> >
>> > I agree. If we continue to not build them from source, it won't make the
>> > Git package any more "expensive". We could add the pre-built source
>> > tarball as a native-input to the Git package, and re-use the unpack
>> > phase from git-manpages.
>>
>> I agree too, this sounds like a good idea.
>
> I've attached a patch. Your thoughts?
>
> From 2407216eac19e5a7a3376efc497f7047dc0c8299 Mon Sep 17 00:00:00 2001
> From: Leo Famulari <leo@famulari.name>
> Date: Tue, 9 Aug 2016 14:55:37 -0400
> Subject: [PATCH] gnu: git: Provide man-pages in main Git package.
>
> * gnu/packages/version-control.scm (git-manpages): Remove variable.
> (git)[native-inputs]: Add GIT-MANPAGES.
> [arguments]: Add 'install-man-pages' phase.
LGTM! :-)
Thank you!
Ludo'.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#24105: git package misses man pages
2016-08-17 9:33 ` Ludovic Courtès
@ 2016-08-18 2:42 ` Leo Famulari
0 siblings, 0 replies; 6+ messages in thread
From: Leo Famulari @ 2016-08-18 2:42 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 24105-done
On Wed, Aug 17, 2016 at 11:33:54AM +0200, Ludovic Courtès wrote:
> Leo Famulari <leo@famulari.name> skribis:
> > * gnu/packages/version-control.scm (git-manpages): Remove variable.
> > (git)[native-inputs]: Add GIT-MANPAGES.
> > [arguments]: Add 'install-man-pages' phase.
>
> LGTM! :-)
Pushed as d1cada045.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-08-18 2:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-29 12:46 bug#24105: git package misses man pages Andreas Enge
2016-07-29 17:10 ` Leo Famulari
2016-07-30 13:46 ` Ludovic Courtès
2016-08-09 19:03 ` Leo Famulari
2016-08-17 9:33 ` Ludovic Courtès
2016-08-18 2:42 ` Leo Famulari
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.