Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shims/super: add pod2man shim #19174

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

alebcay
Copy link
Member

@alebcay alebcay commented Jan 30, 2025

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

As noted in Homebrew/homebrew-core#191352 (comment), one factor which hinders :all bottles from being built is that Perl documentation generation via pod2man embeds some version information about the version of perl and tools used.

--- /a/strip-nondeterminism/1.14.0/libexec/man/man3/Getopt::Long::Parser.3pm
+++ /b/strip-nondeterminism/1.14.0/libexec/man/man3/Getopt::Long::Parser.3pm
@@ -1,8 +1,8 @@
-.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
+.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
@@ -67,15 +67,15 @@
 .        \}
 .    \}
 .\}
 .rr rF
 .\" ========================================================================
 .\"
 .IX Title "Getopt::Long::Parser 3"
-.TH Getopt::Long::Parser 3 "2024-05-24" "perl v5.34.1" "User Contributed Perl Documentation"
+.TH Getopt::Long::Parser 3 "2024-05-24" "perl v5.30.3" "User Contributed Perl Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
 .nh
 .SH "NAME"
 Getopt::Long::Parser \- Getopt::Long object\-oriented interface
 .SH "SYNOPSIS"

This change introduces a wrapper/shim for pod2man which should mitigate two areas where this happens which I have observed so far:

  • The perl version is inserted in the footer if an explicit value is not provided for --release. A constant value of a single space is passed in this wrapper/shim to prevent this (an empty value for --release is not accepted).
  • The version of Pod::Man and Pod::Simple are inserted in a comment in the resulting *roff output. There is no flag to disable this, so perform find/replace in the output (which may be via stdout or to output files) to remove those occurrences.

Alternatives

Introduce a new DSL that performs the same/similar transformations on a provided file (or all files in a formula's man directory), e.g. clean_pod2man_outputs! or something like that, which would need to be called explicitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant