bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #66333] [gropdf] PerlMagick sabotages the test suite


From: G. Branden Robinson
Subject: [bug #66333] [gropdf] PerlMagick sabotages the test suite
Date: Mon, 14 Oct 2024 21:30:37 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?66333>

                 Summary: [gropdf] PerlMagick sabotages the test suite
                   Group: GNU roff
               Submitter: gbranden
               Submitted: Tue 15 Oct 2024 01:30:32 AM UTC
                Category: Driver gropdf
                Severity: 3 - Normal
              Item Group: Build/Installation
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Tue 15 Oct 2024 01:30:32 AM UTC By: G. Branden Robinson <gbranden>
Today I started noticing a build failure and at first couldn't figure it out.


$ ./contrib/mom/examples/test-mom.sh 
Checking number of pages in
/home/branden/src/GIT/groff/build/contrib/mom/examples/letter.pdf
Checking number of pages in
/home/branden/src/GIT/groff/build/contrib/mom/examples/mom-pdf.pdf
Checking number of pages in
/home/branden/src/GIT/groff/build/contrib/mom/examples/mon_premier_doc.pdf
Checking number of pages in
/home/branden/src/GIT/groff/build/contrib/mom/examples/sample_docs.pdf
Checking number of pages in
/home/branden/src/GIT/groff/build/contrib/mom/examples/slide-demo.pdf
Checking number of pages in
/home/branden/src/GIT/groff/build/contrib/mom/examples/typesetting.pdf
Checking number of pages in
/home/branden/src/GIT/groff/build/contrib/mom/examples/copyright-chapter.pdf
Checking number of pages in
/home/branden/src/GIT/groff/build/contrib/mom/examples/copyright-default.pdf
Checking whether
/home/branden/src/GIT/groff/build/contrib/mom/examples/typesetting.pdf has
images
page   num  type   width height color comp bpc  enc interp  object ID x-ppi
y-ppi size ratio
--------------------------------------------------------------------------------------------
...FAILED: expected 2 images, found 0
Checking whether
/home/branden/src/GIT/groff/build/contrib/mom/examples/slide-demo.pdf has
images
page   num  type   width height color comp bpc  enc interp  object ID x-ppi
y-ppi size ratio
--------------------------------------------------------------------------------------------
...FAILED: expected 2 images, found 0


I bisected it this far:


commit ead74ff837d34347a54144179b4adbf28ab2f08b
Author: Deri James <deri@chuzzlewit.myzen.co.uk>
Date:   Sun Aug 25 16:37:09 2024 +0100

    Make gropdf compatible with IM 6(.9)
    
    Peter Schaffter discovered some problems with recent
    changes to gropdf and PDFPIC, they were not fully
    compatible with ImageMagick 6.9 which is what he was
    using. See here
<https://lists.gnu.org/archive/html/groff/2024-08/msg00044.html>
    
    * src/devices/gropdf/gropdf.pl: One difference in IM 6 is
    that an alpha channel of all zeroes meant the image was opaque,
    but in 7 it is reversed and means the image is wholly
    transparent.
    
    This change is documented here:-
    
    <http://www.imagemagick.org/script/porting.php#alpha>
    
    "Alpha
    
    We support alpha now, previously opacity. With alpha, a value
    of 0 means that the pixel does not have any coverage information
    and is transparent; i.e. there was no color contribution from any
    geometry because the geometry did not overlap this pixel. A value
    of QuantumRange means that the pixel is opaque because the geometry
    completely overlapped the pixel. As a consequence, in version 7,
    the PixelInfo structure member alpha has replaced the previous
    opacity member. Another consequence is the alpha part of an sRGB
    value in hexadecimal notation is now reversed (e.g. #0000 is fully
    transparent)."
    
    This is now handled by gropdf.
    
    There was an undocumented (I thought it came as part of perlmagick,
    it doesn't) dependency on the module Image::ExifTool this is no
    longer used by gropdf - so not required.
    
    * tmac/pdfpic.tmac: Another issue was that identify sometimes
    reports sizes for pdfs which do not match the page size, (it seems
    to be attempting to report the size of the image embedded in the
    pdf). For this reason pdfinfo is now used first on files, which
    consistently reports the page size. There is a slight time penalty
    since non-pdf files are subject to a (failed) pdfinfo run.


But it took some pondering to figure out why I'd never noticed it before.

Then I realized--I installed PerlMagick today.

And sure enough when building _mom_'s examples, I get this:


$ \rm build/contrib/mom/examples/*
$ make -C build
make: Entering directory '/home/branden/src/GIT/groff/build'
make  all-recursive
make[1]: Entering directory '/home/branden/src/GIT/groff/build'
make[2]: Entering directory '/home/branden/src/GIT/groff/build'
  GROFF    contrib/mom/examples/letter.pdf
  GROFF    contrib/mom/examples/mom-pdf.pdf
  GROFF    contrib/mom/examples/mon_premier_doc.pdf
  GROFF    contrib/mom/examples/sample_docs.pdf
  GROFF    contrib/mom/examples/slide-demo.pdf
gropdf: warning: Image './penguin.pdf': Exception 499: attempt to perform an
operation not allowed by the security policy `PDF' @
error/constitute.c/IsCoderAuthorized/426
  GROFF    contrib/mom/examples/copyright-default.pdf
  GROFF    contrib/mom/examples/copyright-chapter.pdf
  GROFF    contrib/mom/examples/typesetting.pdf
gropdf: warning: Image './penguin.pdf': Exception 499: attempt to perform an
operation not allowed by the security policy `PDF' @
error/constitute.c/IsCoderAuthorized/426
make[2]: Leaving directory '/home/branden/src/GIT/groff/build'
make[1]: Leaving directory '/home/branden/src/GIT/groff/build'
make: Leaving directory '/home/branden/src/GIT/groff/build'


What can be done about this "security policy"?







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66333>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]