diff mbox series

[bug#57347] packages: Add man-pages-posix.

Message ID 20220822204258.lbu3fc3ylqit6n57@pleiades
State Accepted
Headers show
Series [bug#57347] packages: Add man-pages-posix. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Lilah Tascheter Aug. 22, 2022, 8:42 p.m. UTC
* gnu/packages/man.scm (man-pages-posix): New variable.
---
 gnu/packages/man.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)


base-commit: ff3cecffafad0ddf5cc2af6cb676e73bcf58e431

Comments

M Aug. 22, 2022, 11:50 p.m. UTC | #1
On 22-08-2022 22:42, Lilah Tascheter via Guix-patches via wrote:

> +    (home-page"https://www.kernel.org/doc/man-pages/")
> +    (synopsis "Man pages from the POSIX.1-2013 standard")
> +    (description "This package contains excerpts from the POSIX.1-2008 and TC1
> +standards (collectively, POSIX.1-2013) in manual page form.")

This package can easily be confused with 'man-pages' -- at least, I 
initially confused this as a duplicate of man-pages. Could the 
relationship be clarified in the description?

> +    (arguments
> +     '(#:tests? #f
> +       #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")))
> +       #:license-file-regexp "POSIX-COPYRIGHT"
> +       #:phases (modify-phases %standard-phases
> +                  (delete 'configure)
> +                  (replace 'build
> +                    (lambda _
> +                      ;; make all is useless due to guix build semantics, so just gzip.
> +                      ;; Parallel builds are useless with how the Makefile's setup.
> +                      (invoke "make" "gz"))))))
Maybe (assoc-ref %outputs "out") -> #$output and '(#:tests? ...) -> 
(list #:tests? #f #:make-flags #~(list ...) #:phases #~(...)), now we 
have G-exps.

Also, IIRC there's a #:make-target and #:parallel-build? #false

As a bonus, you could update the 'man-pages' package to the new G-exps, 
though not required.

Greetings,
Maxime.
Lilah Tascheter Aug. 23, 2022, 3:33 a.m. UTC | #2
On Tue, Aug 23, 2022 at 01:50:34AM +0200, Maxime Devos wrote:
> This package can easily be confused with 'man-pages' -- at least, I
> initially confused this as a duplicate of man-pages. Could the relationship
> be clarified in the description?
That's fair. How does this revised description sound? "Excerpts from the
POSIX.1-2008 and TC1 standards (collectively, POSIX.1-2013) in manual
page form. While the Linux man-pages project documents the system as it
exists, this package documents the portable software API nominally
implemented by many unix-likes."

> Maybe (assoc-ref %outputs "out") -> #$output and '(#:tests? ...) -> (list
> #:tests? #f #:make-flags #~(list ...) #:phases #~(...)), now we have G-exps.
Sounds good!

> Also, IIRC there's a #:make-target and #:parallel-build? #false
There is a #:parallel-build? #f, but no #:make-target field, as far as I
could tell. Though, the build phase doesn't explicitly target all, so it
would be possible to provide the gz target through #:make-flags.

But, also, all the build phase does is compress the manpages, which
could entirely be done by the compress-documentation phase with some
edits done to it; at the moment, its regex for detecting manpages
doesn't take into account the [023]p format of this package's manpages.

Thoughts?

> As a bonus, you could update the 'man-pages' package to the new G-exps,
> though not required.
Sure! I'll submit that with v2 as a patchset.

Thanks!
Lilah
Lilah Tascheter Aug. 23, 2022, 1:08 p.m. UTC | #3
On Tue, Aug 23, 2022 at 01:50:34AM +0200, Maxime Devos wrote:
> This package can easily be confused with 'man-pages' -- at least, I
> initially confused this as a duplicate of man-pages. Could the relationship
> be clarified in the description?
That's fair. How does this revised description sound? "Excerpts from the
POSIX.1-2008 and TC1 standards (collectively, POSIX.1-2013) in manual
page form. While the Linux man-pages project documents the system as it
exists, this package documents the portable software API nominally
implemented by many unix-likes."

> Maybe (assoc-ref %outputs "out") -> #$output and '(#:tests? ...) -> (list
> #:tests? #f #:make-flags #~(list ...) #:phases #~(...)), now we have G-exps.
Sounds good!

> Also, IIRC there's a #:make-target and #:parallel-build? #false
There is a #:parallel-build? #f, but no #:make-target field, as far as I
could tell. Though, the build phase doesn't explicitly target all, so it
would be possible to provide the gz target through #:make-flags.

But, also, all the build phase does is compress the manpages, which
could entirely be done by the compress-documentation phase with some
edits done to it; at the moment, its regex for detecting manpages
doesn't take into account the [023]p format of this package's manpages.

Thoughts?

> As a bonus, you could update the 'man-pages' package to the new G-exps,
> though not required.
Sure! I'll submit that with v2 as a patchset.

Thanks!
Lilah
M Aug. 26, 2022, 1:41 p.m. UTC | #4
On 23-08-2022 05:33, Lilah Tascheter wrote:
> On Tue, Aug 23, 2022 at 01:50:34AM +0200, Maxime Devos wrote:
>> This package can easily be confused with 'man-pages' -- at least, I
>> initially confused this as a duplicate of man-pages. Could the relationship
>> be clarified in the description?
> That's fair. How does this revised description sound? "Excerpts from the
> POSIX.1-2008 and TC1 standards (collectively, POSIX.1-2013) in manual
> page form. While the Linux man-pages project documents the system as it
> exists, this package documents the portable software API nominally
> implemented by many unix-likes."
>
'as it exists' -> 'as it exists on Linux- and glibc-based systems', as 
we also support the Hurd.

Otherwise looks good to me.

>> Also, IIRC there's a #:make-target and #:parallel-build? #false
> There is a #:parallel-build? #f, but no #:make-target field, as far as I
> could tell. Though, the build phase doesn't explicitly target all, so it
> would be possible to provide the gz target through #:make-flags.
Right, there's a #:test-target but not #:make-target.
> But, also, all the build phase does is compress the manpages, which
> could entirely be done by the compress-documentation phase with some
> edits done to it; at the moment, its regex for detecting manpages
> doesn't take into account the [023]p format of this package's manpages.
>
> Thoughts?
I think we could do #:make-flags "gz" for now, extending the regex to 
[023]p is more of a long-term thing (while a simple change, it would 
cause many rebuilds and hence needs to be done on core-updates).

Greetings,
Maxime.
diff mbox series

Patch

diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm
index 1c1d82758b..e6f4a8bb5b 100644
--- a/gnu/packages/man.scm
+++ b/gnu/packages/man.scm
@@ -302,6 +302,39 @@  (define-public man-pages
     ;; Each man page has its own license; some are GPLv2+, some are MIT/X11.
     (license license:gpl2+)))
 
+(define-public man-pages-posix
+  (package
+    (name "man-pages-posix")
+    (version "2013-a")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "mirror://kernel.org/linux/docs/man-pages/"
+                            "man-pages-posix/man-pages-posix-" version
+                            ".tar.xz"))
+        (sha256
+         (base32 "0258j05zdrxpgdj8nndbyi7bvrs8fxdksb0xbfrylzgzfmf3lqqr"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f
+       #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")))
+       #:license-file-regexp "POSIX-COPYRIGHT"
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (replace 'build
+                    (lambda _
+                      ;; make all is useless due to guix build semantics, so just gzip.
+                      ;; Parallel builds are useless with how the Makefile's setup.
+                      (invoke "make" "gz"))))))
+    (home-page "https://www.kernel.org/doc/man-pages/")
+    (synopsis "Man pages from the POSIX.1-2013 standard")
+    (description "This package contains excerpts from the POSIX.1-2008 and TC1
+standards (collectively, POSIX.1-2013) in manual page form.")
+    (license (license:fsdg-compatible "file://POSIX-COPYRIGHT"
+              "Redistribution of this material is permitted so long as this
+notice and the corresponding notices within each POSIX manual page are retained
+on any distribution, and the nroff source is included."))))
+
 (define-public help2man
   ;; TODO: Manual pages for languages not available from the implicit
   ;; input "locales" contain the original (English) text.