[PATCH 0/2] Add diffpdf.

  • Done
  • quality assurance status badge
Details
4 participants
  • Andreas Enge
  • Danny Milosavljevic
  • Marius Bakke
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Danny Milosavljevic
Severity
normal
D
D
Danny Milosavljevic wrote on 25 Jan 2019 17:43
(address . guix-patches@gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20190125164347.17780-1-dannym@scratchpost.org
Danny Milosavljevic (2):
gnu: poppler-qt4: Enable qt4 frontend.
gnu: Add diffpdf.

gnu/packages/pdf.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
D
D
Danny Milosavljevic wrote on 25 Jan 2019 17:48
[PATCH 1/2] gnu: poppler-qt4: Enable qt4 frontend.
(address . 34198@debbugs.gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20190125164802.17853-1-dannym@scratchpost.org
* gnu/packages/pdf.scm (poppler-qt4)[version]: Downgrade to 0.61.1.
[source]: Apply CVE patch.
---
gnu/packages/pdf.scm | 10 ++++++++++
1 file changed, 10 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 96c0f9e3a..956e25c6d 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -174,6 +174,16 @@ When present, Poppler is able to correctly render CJK and Cyrillic text.")
(define-public poppler-qt4
(package/inherit poppler
(name "poppler-qt4")
+ (version "0.61.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://poppler.freedesktop.org/poppler-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "1afdrxxkaivvviazxkg5blsf2x24sjkfj92ib0d3q5pm8dihjrhj"))
+ (patches
+ (append (search-patches "poppler-CVE-2018-19149.patch")))))
(inputs `(("qt-4" ,qt-4)
,@(package-inputs poppler)))
(synopsis "Qt4 frontend for the Poppler PDF rendering library")))
D
D
Danny Milosavljevic wrote on 25 Jan 2019 17:48
[PATCH 2/2] gnu: Add diffpdf.
(address . 34198@debbugs.gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20190125164802.17853-2-dannym@scratchpost.org
* gnu/packages/pdf.scm (diffpdf): New variable.
---
gnu/packages/pdf.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

Toggle diff (51 lines)
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 956e25c6d..3b695f3a6 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -1130,3 +1130,46 @@ presentation. The input files processed by pdfpc are PDF documents.")
rendering of the file. The rendering is done by creating outline curves
through the Pango @code{ft2} backend.")
(license license:lgpl2.0+))))
+
+(define-public diffpdf
+ (package
+ (name "diffpdf")
+ (version "2.1.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://www.qtrac.eu/diffpdf-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0cr468fi0d512jjj23r5flfzx957vibc9c25gwwhi0d773h2w566"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "diffpdf.pro"
+ (("-lpoppler-qt4")
+ (string-append "-L" (assoc-ref inputs "poppler-qt4")
+ "/lib -lpoppler-qt4"))
+ (("/usr/local/include/poppler")
+ (string-append (assoc-ref inputs "poppler-qt4")
+ "/include/poppler")))
+ #t))
+ (replace 'configure
+ (lambda _
+ (invoke "lrelease" "diffpdf.pro")
+ (invoke "qmake")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (out-bin (string-append out "/bin")))
+ (install-file "diffpdf" out-bin)
+ #t))))))
+ (inputs
+ `(("poppler-qt4" ,poppler-qt4) ; at least 0.20.1
+ ("qt-4" ,qt-4)))
+ (home-page "http://www.qtrac.eu/diffpdf-foss.html")
+ (synopsis "Compare two PDF files")
+ (description "This package provides a GUI tool to compare two PDF files.")
+ (license license:gpl2)))
R
R
Ricardo Wurmus wrote on 29 Jan 2019 18:08
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 34198@debbugs.gnu.org)
875zu7pf1e.fsf@elephly.net
Hi Danny,

Toggle quote (1 lines)
> * gnu/packages/pdf.scm (diffpdf): New variable.
[…]
Toggle quote (11 lines)
> + (build-system gnu-build-system)
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'patch-paths
> + (lambda* (#:key inputs #:allow-other-keys)
> + (substitute* "diffpdf.pro"
> + (("-lpoppler-qt4")
> + (string-append "-L" (assoc-ref inputs "poppler-qt4")
> + "/lib -lpoppler-qt4"))

Is this really necessary? Shouldn’t it be enough to have this directory
on LIBRARY_PATH at build time?

Toggle quote (4 lines)
> + (inputs
> + `(("poppler-qt4" ,poppler-qt4) ; at least 0.20.1
> + ("qt-4" ,qt-4)))

I was hoping we could get rid of Qt 4 in the near future, because it
doesn’t get security fixes. Is there no Qt 5 variant?

Toggle quote (5 lines)
> + (synopsis "Compare two PDF files")
> + (description "This package provides a GUI tool to compare two PDF files.")
> + (license license:gpl2)))

Looks like GPLv2 or later.

--
Ricardo
R
R
Ricardo Wurmus wrote on 29 Jan 2019 18:05
Re: [bug#34198] [PATCH 1/2] gnu: poppler-qt4: Enable qt4 frontend.
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 34198@debbugs.gnu.org)
877eenpf71.fsf@elephly.net
Danny Milosavljevic <dannym@scratchpost.org> writes:

Toggle quote (28 lines)
> * gnu/packages/pdf.scm (poppler-qt4)[version]: Downgrade to 0.61.1.
> [source]: Apply CVE patch.
> ---
> gnu/packages/pdf.scm | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
> index 96c0f9e3a..956e25c6d 100644
> --- a/gnu/packages/pdf.scm
> +++ b/gnu/packages/pdf.scm
> @@ -174,6 +174,16 @@ When present, Poppler is able to correctly render CJK and Cyrillic text.")
> (define-public poppler-qt4
> (package/inherit poppler
> (name "poppler-qt4")
> + (version "0.61.1")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append "https://poppler.freedesktop.org/poppler-"
> + version ".tar.xz"))
> + (sha256
> + (base32
> + "1afdrxxkaivvviazxkg5blsf2x24sjkfj92ib0d3q5pm8dihjrhj"))
> + (patches
> + (append (search-patches "poppler-CVE-2018-19149.patch")))))
> (inputs `(("qt-4" ,qt-4)
> ,@(package-inputs poppler)))
> (synopsis "Qt4 frontend for the Poppler PDF rendering library")))

Could the previous higher version of the package not be built?
Otherwise we’d have to deal with the downgrade somehow to make sure that
installed packages get downgraded to this version as well.

--
Ricardo
D
D
Danny Milosavljevic wrote on 29 Jan 2019 21:09
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 34198@debbugs.gnu.org)
20190129210959.7ab17a2e@scratchpost.org
Hi Ricardo,

On Tue, 29 Jan 2019 18:05:22 +0100
Ricardo Wurmus <rekado@elephly.net> wrote:

Toggle quote (4 lines)
> Could the previous higher version of the package not be built?
> Otherwise we’d have to deal with the downgrade somehow to make sure that
> installed packages get downgraded to this version as well.

It could technically be built, but it was missing the qt4 frontend because
newer poppler versions had removed it from its source entirely.

Nobody else uses poppler-qt4 in Guix - otherwise the client would have noticed
that it did not work at all.

I just needed a PDF differ which requires poppler-qt4, so I fixed poppler-qt4.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlxQsxcACgkQ5xo1VCww
uqW22ggAmkiDe2a4AsC7Y0yU+mUY/dFbBt1IzF3f6NZbyvsiI80CGsrrX+Yh7GBu
VYbhp2heX8zFlpBxAb/KJuINYrZzacTkFN9SFwbQZa7bcF7VoNGeIE66ReF9hyTW
nuB53BHiJIx4nWG48RMldt1afm9gy2f3vcUrClYzB/oyvGjTMhoGlAIbZNFXy/Ky
t4rg0yIO60p71cqBYr+kqJRKHjidB8xHh8wAlwd4vBIiBdqENo1ui1Y9Dt+PJKb3
Bn0g/aBXgEU1p4YkT7LitB5zwNkR3Ter1M9E+rAvQlD4FxHHwNlcnhCWJEgm2AmT
HVaOeFhYti6h7BCsaahvxbkFXPo43g==
=bi/g
-----END PGP SIGNATURE-----


D
D
Danny Milosavljevic wrote on 29 Jan 2019 21:12
Re: [bug#34198] [PATCH 2/2] gnu: Add diffpdf.
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 34198@debbugs.gnu.org)
20190129211209.2f05183a@scratchpost.org
Hi Ricardo,

On Tue, 29 Jan 2019 18:08:45 +0100
Ricardo Wurmus <rekado@elephly.net> wrote:

Toggle quote (3 lines)
> I was hoping we could get rid of Qt 4 in the near future, because it
> doesn’t get security fixes. Is there no Qt 5 variant?

No. The company seems to write proprietary Windows solutions now.

Kudos to them for keeping the FOSS version on their homepage anyway.

Toggle quote (2 lines)
> Looks like GPLv2 or later.

Thanks for the review!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlxQs5kACgkQ5xo1VCww
uqVM8gf9FLbyr6X12nTrMnFs089wW1xTSdGVgkfDIqNXawNpY4ckqdo5oYzfHEly
WNPWmdBbEyLZGcueKMBHN7DwrxZAUa3HHBvwTluq/1VL0P/16iHuG4KlvTV8drno
fTO4icslJfEKsOi7LqKQjNfq54ixUWxtJy5/Tk4KUpGiyhVShZvp1PuzDo9jt/DU
uYLA8mEVv/HQcJ0FO4FOYxoK6jeN7cscQwaLvrvFgOEuyOWGwXlnJYtiy1Gxmx9J
sEIlsgbqXKCH8W0fbpZgVVnKld/o5791iGxgSLBeK++q3WJt1tTBYSY6iddI82zQ
tlcDZBw8QzMxqQszSRQ8cRtS1Y50JA==
=Tl1i
-----END PGP SIGNATURE-----


M
M
Marius Bakke wrote on 31 Jan 2019 22:59
Re: [bug#34198] [PATCH 1/2] gnu: poppler-qt4: Enable qt4 frontend.
87tvho8p5l.fsf@fastmail.com
Danny Milosavljevic <dannym@scratchpost.org> writes:

Toggle quote (17 lines)
> * gnu/packages/pdf.scm (poppler-qt4)[version]: Downgrade to 0.61.1.
> [source]: Apply CVE patch.
> ---
> gnu/packages/pdf.scm | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
> index 96c0f9e3a..956e25c6d 100644
> --- a/gnu/packages/pdf.scm
> +++ b/gnu/packages/pdf.scm
> @@ -174,6 +174,16 @@ When present, Poppler is able to correctly render CJK and Cyrillic text.")
> (define-public poppler-qt4
> (package/inherit poppler
> (name "poppler-qt4")
> + (version "0.61.1")
> + (source (origin

Since this adds a completely different source I think package/inherit is
inappropriate, because we no longer want Poppler grafts applying here.

That said, I would rather we abandoned this package, since Qt4 is
unmaintained for a really long time now.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlxTb6YACgkQoqBt8qM6
VPrU0wgAlUjSRdbDI3RNSs18Kt0Y1gSv4jQ7Yi6NXIl7Tc8ppvuXaJrwpEn62gT7
wpFnXcM+L+XmzWRS1usB075In6z7HLxdN85yrjluJabX943zeX6GwH66YB22AaMl
PtVccBKdaABIelt+hNBdxbkxE1SK5qr/ZLNR8AOQLTyQIc3wFHE0vY7w01CqQ5mr
ndKjFDwy+jLr4rx6kVriwEdlDf4E9FuwgjyFjqQ+0ebcfRz2BUzeZxFxkMAiEXmx
HTXL9qHgbcmuBWgblHOAr8JXAWkKqhIeSHcEqyVGkQScSfbfKE3jz2g67obP6v85
uCsAJ4Ri0OYr2kcbIeIgx308WEP+OA==
=GHRb
-----END PGP SIGNATURE-----

A
A
Andreas Enge wrote on 5 Sep 2020 22:47
Closing
(address . 34198-done@debbugs.gnu.org)
20200905204723.GA24809@jurong
There seems to be consensus to not add this package, since Qt4 is being
phased out. Closing.

Andreas
Closed
?