patches added and home stretch!

ci/stable
Walter Lapchynski 6 years ago
parent 18617670de
commit 0189539607

@ -0,0 +1,15 @@
Description: Fix GPG test.
Author: Amaury Pouly <amaury.pouly@gmail.com>
Origin: upstream https://cgit.kde.org/trojita.git/commit/?id=be8fd5831afa0a04f14cd6206e6576f03ee59558
Last-Update: 2018-09-26
--- a/tests/Cryptography/keygen.sh
+++ b/tests/Cryptography/keygen.sh
@@ -115,7 +115,7 @@ $TAIL" > crypto_test_data.h
echo -n "key *\nexpire\nseconds=1\nsave\n" | ${GPG} --no-tty --quiet --command-fd 0 --edit-key "expired@test.trojita.flaska.net"
# extract fingerprint of key to be deleted
-FINGERPRINT="$(${GPG} --quiet --no-tty --list-keys --with-colons --fingerprint unknown@test.trojita.flaska.net | grep fpr | cut -d : -f 10)"
+FINGERPRINT="$(${GPG} --quiet --no-tty --list-keys --with-colons --fingerprint unknown@test.trojita.flaska.net | grep fpr | head -n 1 | cut -d : -f 10)"
# delete key
yes | DISPLAY="" ${GPG} --quiet --batch --no-tty --delete-secret-and-public-key --yes --command-fd 0 --passphrase-fd 0 "${FINGERPRINT}"

@ -0,0 +1,2 @@
vanilla-gpgme-support.patch
fix-gpg-test.patch

@ -0,0 +1,76 @@
Description: Support both vanilla gpgme and KDE Frameworks gpgmepp.
Author: Jan Kundrát <jkt@kde.org>
Origin: upstream https://cgit.kde.org/trojita.git/commit/?id=e8393376969caf27b0c976d01645edd023c14df2
Last-Update: 2018-09-26
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -61,7 +61,8 @@ trojita_option(WITH_ZLIB "Build with zli
trojita_option(WITH_SHARED_PLUGINS "Enable shared dynamic plugins" ON)
trojita_option(WITH_TESTS "Build tests" ON)
trojita_option(WITH_MIMETIC "Build with client-side MIME parsing" AUTO)
-trojita_option(WITH_GPGMEPP "Build with the GpgME++ library for cryptography" AUTO)
+trojita_option(WITH_GPGMEPP "Use GpgME's native C++ bindings" AUTO)
+trojita_option(WITH_KF5_GPGMEPP "Use legacy discontinued GpgME++ library from KDE frameworks" AUTO)
if(WIN32)
trojita_option(WITH_NSIS "Build Windows NSIS installer" AUTO "WITH_DESKTOP")
@@ -94,8 +95,13 @@ trojita_plugin_option(WITH_QTKEYCHAIN_PL
trojita_find_package(Git "" "" "" "")
trojita_find_package(Mimetic "" "http://www.codesink.org/mimetic_mime_library.html" "C++ MIME Library" "Required for client-side MIME parsing" WITH_MIMETIC)
-trojita_find_package(KF5Gpgmepp "" "https://quickgit.kde.org/?p=gpgmepp.git" "C++ bindings for gpgme" "Needed for encrypted/signed e-mails" WITH_GPGMEPP)
-trojita_option(WITH_CRYPTO_MESSAGES "Enable support for encrypted messages" AUTO "WITH_MIMETIC;WITH_GPGMEPP")
+trojita_find_package(Gpgmepp "1.8.0" "https://gnupg.org/related_software/gpgme/index.html" "C++/Qt bindings for gpgme" "Needed for encrypted/signed e-mails" WITH_GPGMEPP)
+if(NOT WITH_GPGMEPP)
+ trojita_find_package(KF5Gpgmepp "" "https://commits.kde.org/gpgmepp?path=/" "C++ bindings for gpgme" "Needed for encrypted/signed e-mails" WITH_KF5_GPGMEPP)
+ trojita_option(WITH_CRYPTO_MESSAGES "Enable support for encrypted messages" AUTO "WITH_MIMETIC;WITH_KF5_GPGMEPP")
+else()
+ trojita_option(WITH_CRYPTO_MESSAGES "Enable support for encrypted messages" AUTO "WITH_MIMETIC;WITH_GPGMEPP")
+endif()
if(WIN32)
trojita_find_package(MakeNSIS "" "http://nsis.sourceforge.net" "Nullsoft Scriptable Install System" "Needed for building Windows installer" WITH_NSIS)
@@ -207,7 +213,7 @@ else()
set(TROJITA_HAVE_MIMETIC False)
endif()
-if(WITH_GPGMEPP)
+if(WITH_GPGMEPP OR WITH_KF5_GPGMEPP)
set(TROJITA_HAVE_GPGMEPP True)
else()
set(TROJITA_HAVE_GPGMEPP False)
@@ -321,12 +327,10 @@ if(WITH_MIMETIC)
)
endif()
if(WITH_CRYPTO_MESSAGES)
- if(WITH_GPGMEPP)
set(libCryptography_SOURCES
${libCryptography_SOURCES}
${path_Cryptography}/GpgMe++.cpp
)
- endif()
endif()
if(WITH_ZLIB)
@@ -625,13 +629,15 @@ if(WITH_MIMETIC)
set_property(TARGET Cryptography APPEND PROPERTY INCLUDE_DIRECTORIES ${MIMETIC_INCLUDE_DIRS})
endif()
if(WITH_CRYPTO_MESSAGES)
- if(WITH_GPGMEPP)
- if (WIN32)
- target_link_libraries(Cryptography KF5::Gpgmepp KF5::QGpgme)
- else()
- target_link_libraries(Cryptography KF5::Gpgmepp-pthread KF5::QGpgme)
+ if(WITH_GPGMEPP)
+ target_link_libraries(Cryptography Gpgmepp QGpgme)
+ elseif(WITH_KF5_GPGMEPP)
+ if(WIN32)
+ target_link_libraries(Cryptography KF5::Gpgmepp KF5::QGpgme)
+ else()
+ target_link_libraries(Cryptography KF5::Gpgmepp-pthread KF5::QGpgme)
+ endif()
endif()
- endif()
endif()
## ClearText password plugin

@ -7,14 +7,15 @@ TODO
- [X] Edit debian/control to deal with some of the required fields
- [X] Add Vcs from Phab
- [X] Get under `git`. Finally.
- [ ] Dependencies
- [X] Dependencies
- [X] Populate Build-Depends based on requirements from actual compilation
- [X] Run through CMakeLists.txt and add depends as needed.
- [ ] Add optional depends. We can always remove them if needed.
- [ ] This requires making a patch like [this section](https://cgit.kde.org/trojita.git/tree/CMakeLists.txt?id=feb264cda151a7dfbf39a2d7c774f4b7cc0b6dff#n92) of the upstream code to account for the fact that upstream GPGME rolled in various bindings, including the Qt ones. The initial release will then be 0.7-0ubuntu1.
- [X] Add optional depends. We can always remove them if needed.
- [X] This requires making a patch like [this section](https://cgit.kde.org/trojita.git/tree/CMakeLists.txt?id=feb264cda151a7dfbf39a2d7c774f4b7cc0b6dff#n92) of the upstream code to account for the fact that upstream GPGME rolled in various bindings, including the Qt ones. The initial release will then be 0.7-0ubuntu1.
- [X] Compare to [Kubuntu packaging](https://git.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/trojita/) and incorporate anything particularly relevant.
- [X] Fix rules (the [Kubuntu packaging](https://git.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/trojita/tree/debian/rules) seems overly complicated).
- [X] Check over copyright really well
- [ ] Extra double check compilation and what have you.
- [ ] Get in a PPA for initial testing first?
Notes

Loading…
Cancel
Save