Bug 234126 - misc/freebsd-doc-en: blank page!! from .ps.eps suffix rule (later leads to pnmtopng: bad magic number 0x2d67)
Summary: misc/freebsd-doc-en: blank page!! from .ps.eps suffix rule (later leads to pn...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: doceng
URL:
Keywords:
Depends on:
Blocks: 234127
  Show dependency treegraph
 
Reported: 2018-12-18 09:53 UTC by O. Hartmann
Modified: 2019-04-19 11:27 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (doceng)


Attachments
poudriere build log of r498480 (96.30 KB, application/x-xz-compressed)
2019-04-13 16:52 UTC, Matthias Andree
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2018-12-18 09:53:18 UTC
Port misc/freebsd-doc-en fails to build, see error below.

Settings in /etc/make.conf (if matters):
DOC_LANG=en_US.ISO8859-1 de_DE.ISO8859-1
FORMATS=html-split pdf
WEB_LANG=de_DE.ISO8859-1 en_US.ISO8859-1
WITH_HTML=YES
WITH_PDF=YES


[...]
/usr/local/bin/perl /usr/ports/misc/freebsd-doc-en/work/doc/share/misc/epsgeom -offset 100 100 /usr/ports/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.eps  | /usr/local/bin/gs -q -dBATCH -dGraphicsAlphaBits=4 -dTextAlphaBits=4  -dEPSCrop -r100x100  -dNOPAUSE -dSAFER -sDEVICE=pnm -sOutputFile=-  -g`/usr/local/bin/perl /usr/ports/misc/freebsd-doc-en/work/doc/share/misc/epsgeom -geom 100 100 /usr/ports/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.eps` -  | /usr/local/bin/pnmtopng > /usr/ports/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.png
Error: no BoundingBox found: /usr/ports/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.eps
Error: no BoundingBox found: /usr/ports/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.eps
pnmtopng: bad magic number 0x2d67 - not a PPM, PGM, PBM, or PAM file
*** Error code 1
Comment 1 Matthias Andree freebsd_committer 2019-04-13 16:52:45 UTC
Created attachment 203647 [details]
poudriere build log of r498480

up-to-date poudriere build log showing the same problem as of 52910 aka ports r498480.
Comment 2 Matthias Andree freebsd_committer 2019-04-13 17:18:10 UTC
It would seem that the ..../net-routing.eps file is incomplete, it starts like this:

save countdictstack mark newpath /showpage {} def /setpagedevice {pop} def
%%EndProlog
%%Page: 1 1
%%BeginDocument: /usr/ports.svn/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.ps
/setpacking where{
...

Debugging this further, I find that the .ps file has 

%%DocumentMedia: Default 595 842 0 () ()
...
<< /PageSize [ 595 842 ] /ImagingBBox null >> setpagedevice

which corresponds to A4, where the doc.images.mk HARDCODES -sPAPERSIZE=letter from somewhere, and then ps2epsi complains "blank page!!". Omitting -sPAPERSIZE=letter appears to fix the complaints, but I couldn't check output.
Comment 3 Matthias Andree freebsd_committer 2019-04-13 17:19:48 UTC
this is the relevant snipped from the build:
[mandree@freeryzen /usr/ports.svn/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook]$ make
tmpfile=$(mktemp /usr/ports.svn/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.ps.XXXXXXXX);  groff -p -S -Wall -mtty-char -man /usr/ports.svn/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.pic > $tmpfile && /bin/mv -f $tmpfile /usr/ports.svn/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.ps
tmpfile=$(mktemp /usr/ports.svn/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.eps.XXXXXXXX);  /usr/local/bin/gs -q -dNOPAUSE -dBATCH -dSAFER -dDELAYSAFER  -sPAPERSIZE=letter -r72 -sDEVICE=bbox  -sOutputFile=/dev/null  /usr/ports.svn/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.ps > $tmpfile 2>&1;  /usr/bin/env outfile=$tmpfile /usr/local/bin/gs -q -dNOPAUSE -dSAFER -dDELAYSAFER  -sPAPERSIZE=letter -r72 -sDEVICE=bit  -sOutputFile=/dev/null  ps2epsi.ps < /usr/ports.svn/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.ps 1>&2;  (echo "save countdictstack mark newpath /showpage {} def /setpagedevice {pop} def"; echo "%%EndProlog"; echo "%%Page: 1 1"; echo "%%BeginDocument: /usr/ports.svn/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.ps"; ) >> $tmpfile;  /usr/bin/sed	-e '/^%%BeginPreview:/,/^%%EndPreview[^!-~]*$/d'  -e '/^%!PS-Adobe/d'  -e '/^%%[A-Za-z][A-Za-z]*[^!-~]*$/d' -e '/^%%[A-Za-z][A-Za-z]*: /d' < /usr/ports.svn/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.ps >> $tmpfile;  (echo "%%EndDocument"; echo "%%Trailer"; echo "cleartomark countdictstack exch sub { end } repeat restore"; echo "%%EOF"; ) >> $tmpfile;  /bin/mv -f $tmpfile /usr/ports.svn/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.eps
blank page!!
/usr/local/bin/perl /usr/ports.svn/misc/freebsd-doc-en/work/doc/share/misc/epsgeom -offset 100 100 /usr/ports.svn/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.eps  | /usr/local/bin/gs -q -dBATCH -dGraphicsAlphaBits=4 -dTextAlphaBits=4  -dEPSCrop -r100x100  -dNOPAUSE -dSAFER -sDEVICE=pnm -sOutputFile=-  -g`/usr/local/bin/perl /usr/ports.svn/misc/freebsd-doc-en/work/doc/share/misc/epsgeom -geom 100 100 /usr/ports.svn/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.eps` -  | /usr/local/bin/pnmtopng > /usr/ports.svn/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.png
Error: no BoundingBox found: /usr/ports.svn/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.eps
Error: no BoundingBox found: /usr/ports.svn/misc/freebsd-doc-en/work/doc/en_US.ISO8859-1/books/handbook/../../../share/images/books/handbook/advanced-networking/net-routing.eps
pnmtopng: bad magic number 0x2d67 - not a PPM, PGM, PBM, or PAM file
*** Error code 1