bugGNU roff - Bugs: bug #64183, [PATCH] allow test⁠-⁠groff to...

 
 

bug #64183: [PATCH] allow test⁠-⁠groff to run a command besides "groff"

Submitter:  Keith Marshall <keithmarshall>
Submitted:  Thu 11 May 2023 09:14:45 PM UTC
   
 
Category:  Macro package - others/general Severity:  3 - Normal
Item Group:  Warning/Suspicious behaviour Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 29 Jun 2025 04:58:09 AM UTC, comment #3: 

comment #2:

> Well, it does allow any command, other than groff itself, to be run
> in the test⁠-⁠groff environment, (e.g. CMD=pdfroff test⁠-groff ...).
> It was necessary to let me run my example, but is by no means
> specific to it; thus it may have more general utility.


Makes sense.

I suspect, based on discussion in bug #55941 and bug #57630, that groff developers would consider this modification unwarranted mission creep for test-groff.  On the other hand, it might be the general nroff testing solution Branden was pining for in comment 4 of the former of those two tickets.  So I'm leaving this open for someone more official to make that call.

I retitled the bug to reflect the now-reduced scope.

Dave <barx>
Group Member
Sat 28 Jun 2025 08:11:56 PM UTC, comment #2: 

Hi Dave,

comment #1:

> Of the two patches attached here, the contrib/pdfmark/sanitize.tmac patch
> is now obsolete, as that directory was removed from the groff tree (per
> bug #63827) in November.

I believe that to be the case.  As I noted originally, I've already made the change upstream, in groff-pdfmark, (which is now hosted on Savannah, and not on OSDN, which appears to be defunct).

> It appears to me that the test-groff patch is merely to facilitate running
> your example; it doesn't seem to be a modification you are proposing for
> groff.  Is my reading correct?

Well, it does allow any command, other than groff itself, to be run in the test⁠-⁠groff environment, (e.g. CMD=pdfroff test⁠-groff ...).  It was necessary to let me run my example, but is by no means specific to it; thus it may have more general utility.

Keith Marshall <keithmarshall>
Group Member
Sat 28 Jun 2025 01:25:45 AM UTC, comment #1: 

Hi Keith,

Of the two patches attached here, the contrib/pdfmark/sanitize.tmac patch is now obsolete, as that directory was removed from the groff tree (per bug #63827) in November.

It appears to me that the test-groff patch is merely to facilitate running your example; it doesn't seem to be a modification you are proposing for groff.  Is my reading correct?

Dave <barx>
Group Member
Thu 11 May 2023 09:14:45 PM UTC, original submission:  

After patching test-groff, per attached, to allow me to run pdfroff within the groff build tree, and formatting pdfroff.1 as PDF, using my own as yet unpublished anpdf.tmac, I see:

$ CMD=pdfroff ./test-groff -ww -manpdf -dpaper=a4 -P-pa4 -rFT='(-0.75i)' ../groff-pdfmark/build/pdfroff.1 > pdfroff.1.pdf
troff:../groff-pdfmark/build/pdfroff.1:2: warning: end index of substring out of range, set to string length
...

(the same warning is repeated a further eight times, originating from differing line numbers within pdfroff.1).

The warning originates from contrib/pdfmark/sanitize.tmac, after inspection of the last character in the pdfhref address string, when attempting to discard this character from the residual string.

I've already fixed this in groff-pdfmark, at OSDN; a patch, relative to your contrib/pdfmark version, (which also adds some additional filters from my version of sanitize.tmac, which are not in yours), is attached.

Keith Marshall <keithmarshall>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Updated the item)
  • -email is unavailable- added by barx (Updated the item)
  • -email is unavailable- added by keithmarshall (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-06-29 barx StatusNeed Info None
        Summary[PATCH] [pdfroff] sanitize.tmac throws warning when -ww specified [PATCH] allow test⁠-⁠groff to run a command besides "groff"
    2025-06-28 barx StatusNone Need Info
    2024-10-23 gbranden Summary[PATCH] [pdfroff]: sanitize.tmac throws warning when -ww specified [PATCH] [pdfroff] sanitize.tmac throws warning when -ww specified
    2023-05-14 gbranden CategoryGeneral Macro package - others/general
    2023-05-12 barx Summary[pdfroff]: sanitize.tmac throws warning when -ww specified [PATCH] [pdfroff]: sanitize.tmac throws warning when -ww specified
    2023-05-11 keithmarshall Attached File- Added test-groff-command.patch, #54728
        Attached File- Added reference-sanitizer.patch, #54729

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code