Date: Mon, 27 Mar 2017 14:32:23 +0000 (UTC) From: Michael Gmelin <grembo@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r437048 - in head/converters/wkhtmltopdf: . files Message-ID: <201703271432.v2REWNoe021860@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: grembo Date: Mon Mar 27 14:32:23 2017 New Revision: 437048 URL: https://svnweb.freebsd.org/changeset/ports/437048 Log: Update to 0.12.4 Also: - strips binaries - changes plist to alphabetical order - adds a patch from 0.12.5-dev to support the use of client certificates and private CAs (-ssl-key-password,--ssl-crt-path,--ssl-key-path), see also https://github.com/wkhtmltopdf/wkhtmltopdf/pull/3206 PR: 217922 Approved by: mm (maintainer) Added: head/converters/wkhtmltopdf/files/patch-clientcert (contents, props changed) Modified: head/converters/wkhtmltopdf/Makefile head/converters/wkhtmltopdf/distinfo head/converters/wkhtmltopdf/pkg-plist Modified: head/converters/wkhtmltopdf/Makefile ============================================================================== --- head/converters/wkhtmltopdf/Makefile Mon Mar 27 14:30:01 2017 (r437047) +++ head/converters/wkhtmltopdf/Makefile Mon Mar 27 14:32:23 2017 (r437048) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= wkhtmltopdf -PORTVERSION= 0.12.3.2 +PORTVERSION= 0.12.4 CATEGORIES= converters MAINTAINER= mm@FreeBSD.org @@ -20,7 +20,7 @@ USE_XORG= x11 xext xrender USE_PERL5= build USE_LDCONFIG= yes USE_GITHUB= yes -WKQT_TAGNAME= fe194f9 +WKQT_TAGNAME= c0cfa03 GH_TUPLE= ${PORTNAME}:qt:${WKQT_TAGNAME}:qt HAS_CONFIGURE= yes @@ -78,4 +78,9 @@ post-build: ${_MAKE_JOBS} ${MAKE_ARGS:C,^${DESTDIRNAME}=.*,,g} \ ${ALL_TARGET} +post-install: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/wkhtmltoimage \ + ${STAGEDIR}${PREFIX}/bin/wkhtmltopdf \ + ${STAGEDIR}${PREFIX}/lib/libwkhtmltox.so.0.12.4 + .include <bsd.port.mk> Modified: head/converters/wkhtmltopdf/distinfo ============================================================================== --- head/converters/wkhtmltopdf/distinfo Mon Mar 27 14:30:01 2017 (r437047) +++ head/converters/wkhtmltopdf/distinfo Mon Mar 27 14:32:23 2017 (r437048) @@ -1,5 +1,5 @@ -TIMESTAMP = 1467664988 -SHA256 (wkhtmltopdf-wkhtmltopdf-0.12.3.2_GH0.tar.gz) = 721523ef87ccb937bf3714ade19b112f4cb8a2cd840e34b30f26ee262c41fe16 -SIZE (wkhtmltopdf-wkhtmltopdf-0.12.3.2_GH0.tar.gz) = 128050 -SHA256 (wkhtmltopdf-qt-fe194f9_GH0.tar.gz) = fa3f9dfc3fe3ee68280226bd1f4b8500883dd2549b985373e71aeff4e958b95a -SIZE (wkhtmltopdf-qt-fe194f9_GH0.tar.gz) = 173008155 +TIMESTAMP = 1489939659 +SHA256 (wkhtmltopdf-wkhtmltopdf-0.12.4_GH0.tar.gz) = dd466f5c2504670459f3b8265de5697b9054f077e2f3e392e5172b5133080edf +SIZE (wkhtmltopdf-wkhtmltopdf-0.12.4_GH0.tar.gz) = 128695 +SHA256 (wkhtmltopdf-qt-c0cfa03_GH0.tar.gz) = f313fdf8e0b7630f47a6bfba749bea128234379b311a8c609b1da450027eb4ee +SIZE (wkhtmltopdf-qt-c0cfa03_GH0.tar.gz) = 172992697 Added: head/converters/wkhtmltopdf/files/patch-clientcert ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/converters/wkhtmltopdf/files/patch-clientcert Mon Mar 27 14:32:23 2017 (r437048) @@ -0,0 +1,129 @@ +diff --git a/AUTHORS ../wkhtmltopdf-0.12.4/AUTHORS +index 62f43f4..1067b9b 100644 +--- a/AUTHORS ++++ ../wkhtmltopdf-0.12.4/AUTHORS +@@ -38,3 +38,4 @@ Mehdi Abbad + Lyes Amazouz + Pascal Bach + Mário Silva ++Jason Smith <JasonParallel@gmail.com> +diff --git a/include/wkhtmltox/loadsettings.hh ../wkhtmltopdf-0.12.4/include/wkhtmltox/loadsettings.hh +index 5b9565f..3b9c765 100644 +--- a/include/wkhtmltox/loadsettings.hh ++++ ../wkhtmltopdf-0.12.4/include/wkhtmltox/loadsettings.hh +@@ -67,6 +67,15 @@ struct DLL_PUBLIC LoadPage { + //! Password used for http auth login + QString password; + ++ //! Path to the ssl client cert private key in OpenSSL PEM format ++ QString clientSslKeyPath; ++ ++ //! Password to ssl client cert private key ++ QString clientSslKeyPassword; ++ ++ //! Path to the ssl client cert public key in OpenSSL PEM format, optionally followed by intermediate ca and trusted certs ++ QString clientSslCrtPath; ++ + //! How many milliseconds should we wait for a Javascript redirect + int jsdelay; + +diff --git a/src/lib/loadsettings.hh ../wkhtmltopdf-0.12.4/src/lib/loadsettings.hh +index 20a5da2..bdd2739 100644 +--- a/src/lib/loadsettings.hh ++++ ../wkhtmltopdf-0.12.4/src/lib/loadsettings.hh +@@ -70,6 +70,15 @@ struct DLL_PUBLIC LoadPage { + //! Password used for http auth login + QString password; + ++ //! Path to the ssl client cert private key in OpenSSL PEM format ++ QString clientSslKeyPath; ++ ++ //! Password to ssl client cert private key ++ QString clientSslKeyPassword; ++ ++ //! Path to the ssl client cert public key in OpenSSL PEM format, optionally followed by intermediate ca and trusted certs ++ QString clientSslCrtPath; ++ + //! How many milliseconds should we wait for a Javascript redirect + int jsdelay; + +diff --git a/src/lib/multipageloader.cc ../wkhtmltopdf-0.12.4/src/lib/multipageloader.cc +index 7e61485..841dd6e 100644 +--- a/src/lib/multipageloader.cc ++++ ../wkhtmltopdf-0.12.4/src/lib/multipageloader.cc +@@ -26,6 +26,13 @@ + #include <QNetworkDiskCache> + #include <QTimer> + #include <QUuid> ++#include <QList> ++#include <QByteArray> ++#if (QT_VERSION >= 0x050000 && !defined QT_NO_SSL) || !defined QT_NO_OPENSSL ++#include <QSslCertificate> ++#include <QSslKey> ++#include <QSslConfiguration> ++#endif + #if QT_VERSION >= 0x050000 + #include <QUrlQuery> + #endif +@@ -104,6 +111,33 @@ QNetworkReply * MyNetworkAccessManager::createRequest(Operation op, const QNetwo + foreach (const HT & j, settings.customHeaders) + r3.setRawHeader(j.first.toLatin1(), j.second.toLatin1()); + } ++ ++ #if (QT_VERSION >= 0x050000 && !defined QT_NO_SSL) || !defined QT_NO_OPENSSL ++ if(!settings.clientSslKeyPath.isEmpty() && !settings.clientSslKeyPassword.isEmpty() ++ && !settings.clientSslCrtPath.isEmpty()){ ++ bool success = true; ++ QSslConfiguration sslConfig = QSslConfiguration::defaultConfiguration(); ++ ++ QFile keyFile(settings.clientSslKeyPath); ++ if(keyFile.open(QFile::ReadOnly)){ ++ QSslKey key(&keyFile, QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey, settings.clientSslKeyPassword.toUtf8()); ++ sslConfig.setPrivateKey(key); ++ keyFile.close(); ++ ++ QList<QSslCertificate> chainCerts = ++ QSslCertificate::fromPath(settings.clientSslCrtPath.toLatin1(), QSsl::Pem, QRegExp::FixedString); ++ QList<QSslCertificate> cas = sslConfig.caCertificates(); ++ cas.append(chainCerts); ++ if(!chainCerts.isEmpty()){ ++ sslConfig.setLocalCertificate(chainCerts.first()); ++ sslConfig.setCaCertificates(cas); ++ ++ r3.setSslConfiguration(sslConfig); ++ } ++ } ++ } ++ #endif ++ + return QNetworkAccessManager::createRequest(op, r3, outgoingData); + } + +diff --git a/src/lib/reflect.cc ../wkhtmltopdf-0.12.4/src/lib/reflect.cc +index 32fc819..46e884c 100644 +--- a/src/lib/reflect.cc ++++ ../wkhtmltopdf-0.12.4/src/lib/reflect.cc +@@ -57,6 +57,9 @@ ReflectImpl<LoadGlobal>::ReflectImpl(LoadGlobal & c) { + ReflectImpl<LoadPage>::ReflectImpl(LoadPage & c) { + WKHTMLTOPDF_REFLECT(username); + WKHTMLTOPDF_REFLECT(password); ++ WKHTMLTOPDF_REFLECT(clientSslKeyPath); ++ WKHTMLTOPDF_REFLECT(clientSslKeyPassword); ++ WKHTMLTOPDF_REFLECT(clientSslCrtPath); + WKHTMLTOPDF_REFLECT(jsdelay); + WKHTMLTOPDF_REFLECT(windowStatus); + WKHTMLTOPDF_REFLECT(zoomFactor); +diff --git a/src/shared/commonarguments.cc ../wkhtmltopdf-0.12.4/src/shared/commonarguments.cc +index 3d45aaf..812f7b8 100644 +--- a/src/shared/commonarguments.cc ++++ ../wkhtmltopdf-0.12.4/src/shared/commonarguments.cc +@@ -206,6 +206,9 @@ void CommandLineParserBase::addPageLoadArgs(LoadPage & s) { + addarg("bypass-proxy-for", 0, "Bypass proxy for host (repeatable)", new StringListSetter(s.bypassProxyForHosts, "value")); + addarg("username",0,"HTTP Authentication username", new QStrSetter(s.username, "username")); + addarg("password",0,"HTTP Authentication password", new QStrSetter(s.password, "password")); ++ addarg("ssl-key-path",0,"Path to ssl client cert private key in OpenSSL PEM format", new QStrSetter(s.clientSslKeyPath, "path")); ++ addarg("ssl-key-password",0,"Password to ssl client cert private key", new QStrSetter(s.clientSslKeyPassword, "password")); ++ addarg("ssl-crt-path",0,"Path to the ssl client cert public key in OpenSSL PEM format, optionally followed by intermediate ca and trusted certs", new QStrSetter(s.clientSslCrtPath, "path")); + addarg("load-error-handling", 0, "Specify how to handle pages that fail to load: abort, ignore or skip", new LoadErrorHandlingSetting(s.loadErrorHandling, "handler")); + addarg("load-media-error-handling", 0, "Specify how to handle media files that fail to load: abort, ignore or skip", new LoadErrorHandlingSetting(s.mediaLoadErrorHandling, "handler")); + addarg("custom-header",0,"Set an additional HTTP header (repeatable)", new MapSetter<>(s.customHeaders, "name", "value")); Modified: head/converters/wkhtmltopdf/pkg-plist ============================================================================== --- head/converters/wkhtmltopdf/pkg-plist Mon Mar 27 14:30:01 2017 (r437047) +++ head/converters/wkhtmltopdf/pkg-plist Mon Mar 27 14:32:23 2017 (r437048) @@ -1,5 +1,5 @@ -bin/wkhtmltopdf bin/wkhtmltoimage +bin/wkhtmltopdf include/wkhtmltox/dllbegin.inc include/wkhtmltox/dllend.inc include/wkhtmltox/image.h @@ -7,6 +7,6 @@ include/wkhtmltox/pdf.h lib/libwkhtmltox.so lib/libwkhtmltox.so.0 lib/libwkhtmltox.so.0.12 -lib/libwkhtmltox.so.0.12.3 +lib/libwkhtmltox.so.0.12.4 man/man1/wkhtmltoimage.1.gz man/man1/wkhtmltopdf.1.gz
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703271432.v2REWNoe021860>