#1135280 a2ps 4.15 unable to print duplex/tumble when the input file is postscript

Package:
a2ps
Source:
a2ps
Description:
GNU a2ps - 'Anything to PostScript' converter and pretty-printer
Submitter:
g1
Date:
2026-04-30 13:57:02 UTC
Severity:
normal
Tags:
#1135280#5
Date:
2026-04-30 13:46:56 UTC
From:
To:
As a result of these facts

- the a2ps.cfg shipped by default has a delegation
    PsNup ps:ps fixps #?V||-q| '$f' | #{del.psselnup}
  that runs the input file through the fixps script

- since commit 93f94030c158b1563f5ee370c2e68ce9d5e8b33e, fixps always
  filters the input file through ghostscript, which outputs level2
  postscript that lacks the %%BeginSetup comment

- a2ps scans for %%BeginSetup in order to find the place where to
  inject the pagedevice specification (see src/lexps.l)

the command
    a2ps -s duplex -P myprinter file.ps
no longer prints duplex.

My own workaround: replace the delegation in my .a2ps/a2psrc with
    psps ps:ps cat '$f' | #{del.psselnup}

Probably ghostscript's ps2write driver can be configured to emit
%%BeginSetup at the end of prologue, but I'm not very comfortable with
its docs.

I reported the issue upstream at https://savannah.gnu.org/bugs/index.php?68298

This report is mainly to share the analysis and the workaround.

Best regards,
    g.