Control: tags -1 + patch
On Saturday, 25 November 2017 09:52:17 AEDT Stuart Prescott wrote:
> In the absence of either a new upstream appearing or a new maintainer for
> Qt4 appearing, it is perhaps sadly time to remove these packages from
> Debian.
Inspired by Sune's demonstration of how easy this might be I took a tilt at
migrating comparepdf from qt4 to qt5 -- patch series that does that (plus some
other tidying to get hardened builts etc) attached.
I'm happy to push to git and upload if you want.
regards
Stuart
--
Stuart Prescott http://www.nanonanonano.net/ stu...@nanonanonano.net
Debian Developer http://www.debian.org/ stu...@debian.org
GPG fingerprint 90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
>From 06fb2aef9c5040c9a0929392a98517f69dcd86c0 Mon Sep 17 00:00:00 2001
From: Stuart Prescott <stu...@debian.org>
Date: Sun, 26 Nov 2017 14:27:38 +1100
Subject: [PATCH 1/8] Port from Qt4 to Qt5
- edit upstream code
- edit upstream build-system
- update debian packaging
---
debian/control | 4 +--
debian/patches/comparepdf-qt5.patch | 64 +++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 2 ++
4 files changed, 69 insertions(+), 2 deletions(-)
create mode 100644 debian/patches/comparepdf-qt5.patch
diff --git a/debian/control b/debian/control
index 59d178f..6409506 100644
--- a/debian/control
+++ b/debian/control
@@ -4,9 +4,9 @@ Priority: optional
Maintainer: David Paleino <da...@debian.org>
Build-Depends:
debhelper (>= 8~)
- , qt4-qmake
+ , qt5-qmake
, libpoppler-cpp-dev
- , libpoppler-qt4-dev
+ , libpoppler-qt5-dev
Standards-Version: 3.9.3
Homepage: http://www.qtrac.eu/comparepdf.html
Vcs-Git: git://git.debian.org/collab-maint/comparepdf.git
diff --git a/debian/patches/comparepdf-qt5.patch b/debian/patches/comparepdf-qt5.patch
new file mode 100644
index 0000000..5b51779
--- /dev/null
+++ b/debian/patches/comparepdf-qt5.patch
@@ -0,0 +1,64 @@
+Description: Port code from Qt4 to Qt5
+Author: Stuart Prescott <stu...@debian.org>
+diff --git a/comparepdf.pro b/comparepdf.pro
+index cc7e465..bb79d2c 100644
+--- a/comparepdf.pro
++++ b/comparepdf.pro
+@@ -1,18 +1,18 @@
+ SOURCES += main.cpp
+ HEADERS += option_parser.hpp
+ SOURCES += option_parser.cpp
+-LIBS += -lpoppler-qt4
++LIBS += -lpoppler-qt5
+ exists($(HOME)/opt/poppler018/) {
+ message(Using locally built Poppler library)
+ INCLUDEPATH += $(HOME)/opt/poppler018/include/poppler/cpp
+- INCLUDEPATH += $(HOME)/opt/poppler018/include/poppler/qt4
++ INCLUDEPATH += $(HOME)/opt/poppler018/include/poppler/qt5
+ LIBS += -Wl,-rpath -Wl,$(HOME)/opt/poppler018/lib -Wl,-L$(HOME)/opt/poppler018/lib
+ } else {
+- exists(/usr/include/poppler/qt4) {
++ exists(/usr/include/poppler/qt5) {
+ INCLUDEPATH += /usr/include/poppler/cpp
+- INCLUDEPATH += /usr/include/poppler/qt4
++ INCLUDEPATH += /usr/include/poppler/qt5
+ } else {
+ INCLUDEPATH += /usr/local/include/poppler/cpp
+- INCLUDEPATH += /usr/local/include/poppler/qt4
++ INCLUDEPATH += /usr/local/include/poppler/qt5
+ }
+ }
+diff --git a/main.cpp b/main.cpp
+index a55a03f..17d60b5 100644
+--- a/main.cpp
++++ b/main.cpp
+@@ -16,9 +16,8 @@
+ #else
+ #include <tr1/memory>
+ #endif
+-#include <poppler-version.h>
+-#include <poppler-qt4.h>
+-#include <QApplication>
++#include <poppler-qt5.h>
++#include <QCoreApplication>
+ #include <QImage>
+ #include <QTextStream>
+ #include "option_parser.hpp"
+@@ -49,7 +48,7 @@ const QString Version("1.0.1");
+
+ int main(int argc, char *argv[])
+ {
+- QApplication app(argc, argv);
++ QCoreApplication app(argc, argv);
+ AQP::OptionParser parser(app.arguments(),
+ QObject::tr("usage: {program} [options] <pdf1> <pdf2>\n"
+ "\nA program to compare two PDF files.\n"),
+@@ -83,7 +82,7 @@ int main(int argc, char *argv[])
+ QTextStream out(stdout);
+ if (versionOpt->boolean()) {
+ out << QObject::tr("comparepdf ") << Version << "\n"
+- << QObject::tr("poppler ") << POPPLER_VERSION << "\n";
++ << QObject::tr("poppler") << "\n";
+ return 0;
+ }
+ QStringList files = parser.remainder();
diff --git a/debian/patches/series b/debian/patches/series
index 3bff8a4..90de8d0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
00-fix_manpage.patch
+comparepdf-qt5.patch
diff --git a/debian/rules b/debian/rules
index 218df65..1196116 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,5 +4,7 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+export QT_SELECT=5
+
%:
dh $@
--
2.11.0
>From 4880daf3b5df8944f28a7711ae92aa29fcd69cd4 Mon Sep 17 00:00:00 2001
From: Stuart Prescott <stu...@debian.org>
Date: Sun, 26 Nov 2017 21:55:16 +1100
Subject: [PATCH 2/8] Bump to debhelper compat 10
---
debian/compat | 2 +-
debian/control | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/debian/compat b/debian/compat
index 45a4fb7..f599e28 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-8
+10
diff --git a/debian/control b/debian/control
index 6409506..c882dbc 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: utils
Priority: optional
Maintainer: David Paleino <da...@debian.org>
Build-Depends:
- debhelper (>= 8~)
+ debhelper (>= 10~)
, qt5-qmake
, libpoppler-cpp-dev
, libpoppler-qt5-dev
--
2.11.0
>From be56449746d8905e9878b1ea70749456e062e740 Mon Sep 17 00:00:00 2001
From: Stuart Prescott <stu...@debian.org>
Date: Sun, 26 Nov 2017 21:55:40 +1100
Subject: [PATCH 3/8] Update Standards-Version to 4.1.1
---
debian/control | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/debian/control b/debian/control
index c882dbc..1c1b5ec 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Build-Depends:
, qt5-qmake
, libpoppler-cpp-dev
, libpoppler-qt5-dev
-Standards-Version: 3.9.3
+Standards-Version: 4.1.1
Homepage: http://www.qtrac.eu/comparepdf.html
Vcs-Git: git://git.debian.org/collab-maint/comparepdf.git
Vcs-Browser: http://git.debian.org/?p=collab-maint/comparepdf.git
--
2.11.0
From d2e9e05049807b740a98ba8e388c818863dcee8e Mon Sep 17 00:00:00 2001
From: Stuart Prescott <stu...@debian.org>
Date: Sun, 26 Nov 2017 21:58:17 +1100
Subject: [PATCH 4/8] Fix copyright format
---
debian/copyright | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/debian/copyright b/debian/copyright
index bc4707e..fca6021 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,4 +1,5 @@
-Format: http://dep.debian.net/deps/dep5
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-name: comparepdf
Files: *
Copyright: © 2011-2012, Qtrac Ltd.
--
2.11.0
>From 3743f54c2869410175c51f9c452f76073a858043 Mon Sep 17 00:00:00 2001
From: Stuart Prescott <stu...@debian.org>
Date: Sun, 26 Nov 2017 22:04:25 +1100
Subject: [PATCH 5/8] Update Vcs headers to standard https values
---
debian/control | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/debian/control b/debian/control
index 1c1b5ec..f70080c 100644
--- a/debian/control
+++ b/debian/control
@@ -9,8 +9,8 @@ Build-Depends:
, libpoppler-qt5-dev
Standards-Version: 4.1.1
Homepage: http://www.qtrac.eu/comparepdf.html
-Vcs-Git: git://git.debian.org/collab-maint/comparepdf.git
-Vcs-Browser: http://git.debian.org/?p=collab-maint/comparepdf.git
+Vcs-Git: https://anonscm.debian.org/git/collab-maint/comparepdf.git
+Vcs-Browser: https://anonscm.debian.org/git/collab-maint/comparepdf.git
Package: comparepdf
Architecture: any
--
2.11.0
>From f1b2ae72f47a93530b56852e5faebb5a51e96090 Mon Sep 17 00:00:00 2001
From: Stuart Prescott <stu...@debian.org>
Date: Sun, 26 Nov 2017 22:08:51 +1100
Subject: [PATCH 6/8] Have qmake pass through buildflags for hardening
---
debian/patches/buildflags.patch | 11 +++++++++++
debian/patches/series | 1 +
2 files changed, 12 insertions(+)
create mode 100644 debian/patches/buildflags.patch
diff --git a/debian/patches/buildflags.patch b/debian/patches/buildflags.patch
new file mode 100644
index 0000000..98b2843
--- /dev/null
+++ b/debian/patches/buildflags.patch
@@ -0,0 +1,11 @@
+Description: make qmake pass compiler flags
+Author: Stuart Prescott <stu...@debian.org>
+--- a/comparepdf.pro
++++ b/comparepdf.pro
+@@ -16,3 +16,6 @@
+ INCLUDEPATH += /usr/local/include/poppler/qt5
+ }
+ }
++QMAKE_CFLAGS += $$(CPPFLAGS) $$(CFLAGS)
++QMAKE_CXXFLAGS += $$(CPPFLAGS) $$(CXXFLAGS)
++QMAKE_LFLAGS += $$(LDFLAGS)
diff --git a/debian/patches/series b/debian/patches/series
index 90de8d0..f933480 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
00-fix_manpage.patch
comparepdf-qt5.patch
+buildflags.patch
--
2.11.0
>From 4e6d839b97e9ded3158d9f6354bd0755bc5a6c86 Mon Sep 17 00:00:00 2001
From: Stuart Prescott <stu...@debian.org>
Date: Sun, 26 Nov 2017 22:12:43 +1100
Subject: [PATCH 7/8] Enable hardening options in build
---
debian/rules | 1 +
1 file changed, 1 insertion(+)
diff --git a/debian/rules b/debian/rules
index 1196116..0adc6cf 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,7 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export QT_SELECT=5
%:
--
2.11.0
>From fac781a4c30715972633d45f98b35d04486ae88b Mon Sep 17 00:00:00 2001
From: Stuart Prescott <stu...@debian.org>
Date: Sun, 26 Nov 2017 14:28:13 +1100
Subject: [PATCH 8/8] Add WIP changelog
---
debian/changelog | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 1bd39cd..9bc9212 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+comparepdf (1.0.1-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Update package to Qt5.
+ * Bump to debhelper compat 10.
+ * Update Standards-Version to 4.1.1 (no changes required).
+ * Fix copyright format declaration.
+ * Update Vcs headers to standard https values.
+ * Pass build flags through to compiler to harden build.
+
+ -- Stuart Prescott <stu...@debian.org> Sun, 26 Nov 2017 14:27:45 +1100
+
comparepdf (1.0.1-1) unstable; urgency=low
* Initial release (Closes: #640776)
--
2.11.0