public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: mail-mta/proton-mail-bridge/, mail-mta/proton-mail-bridge/files/
@ 2023-04-10 16:32 Marek Szuba
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Szuba @ 2023-04-10 16:32 UTC (permalink / raw
  To: gentoo-commits

commit:     3cb992df77ba586bdb4f545610bf0c21827d46fc
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 10 16:31:58 2023 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Mon Apr 10 16:32:21 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3cb992df

mail-mta/proton-mail-bridge: update systemd unit for 3.0.0+

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../files/proton-mail-bridge.service-r1                 | 17 +++++++++++++++++
 ....0.21.ebuild => proton-mail-bridge-3.0.21-r1.ebuild} |  2 +-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/mail-mta/proton-mail-bridge/files/proton-mail-bridge.service-r1 b/mail-mta/proton-mail-bridge/files/proton-mail-bridge.service-r1
new file mode 100644
index 000000000000..8dd8980214af
--- /dev/null
+++ b/mail-mta/proton-mail-bridge/files/proton-mail-bridge.service-r1
@@ -0,0 +1,17 @@
+[Unit]
+Description=Proton Mail IMAP/SMTP bridge
+Documentation=https://proton.me/mail/bridge/
+
+[Service]
+ExecStart=/usr/bin/proton-mail-bridge --noninteractive
+Restart=on-failure
+
+# Hardening
+ProtectSystem=full
+PrivateTmp=true
+SystemCallArchitectures=native
+MemoryDenyWriteExecute=true
+NoNewPrivileges=true
+
+[Install]
+WantedBy=default.target

diff --git a/mail-mta/proton-mail-bridge/proton-mail-bridge-3.0.21.ebuild b/mail-mta/proton-mail-bridge/proton-mail-bridge-3.0.21-r1.ebuild
similarity index 94%
rename from mail-mta/proton-mail-bridge/proton-mail-bridge-3.0.21.ebuild
rename to mail-mta/proton-mail-bridge/proton-mail-bridge-3.0.21-r1.ebuild
index a9020b672022..f05292d8f63e 100644
--- a/mail-mta/proton-mail-bridge/proton-mail-bridge-3.0.21.ebuild
+++ b/mail-mta/proton-mail-bridge/proton-mail-bridge-3.0.21-r1.ebuild
@@ -49,7 +49,7 @@ src_install() {
 	exeinto /usr/bin
 	newexe bridge ${PN}
 
-	systemd_douserunit "${FILESDIR}"/${PN}.service
+	systemd_newuserunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
 
 	einstalldocs
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-mta/proton-mail-bridge/, mail-mta/proton-mail-bridge/files/
@ 2023-05-23 19:39 Marek Szuba
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Szuba @ 2023-05-23 19:39 UTC (permalink / raw
  To: gentoo-commits

commit:     4123a3e1260de40ab33fc9038c0e036b9fd90942
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue May 23 19:30:01 2023 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue May 23 19:39:36 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4123a3e1

mail-mta/proton-mail-bridge: add 3.1.3, drop 2.3.0

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 mail-mta/proton-mail-bridge/Manifest                    |  4 ++--
 .../proton-mail-bridge/files/proton-mail-bridge.service | 17 -----------------
 ...dge-2.3.0.ebuild => proton-mail-bridge-3.1.3.ebuild} | 14 +++++---------
 3 files changed, 7 insertions(+), 28 deletions(-)

diff --git a/mail-mta/proton-mail-bridge/Manifest b/mail-mta/proton-mail-bridge/Manifest
index 02d0b96025d3..3becaa8e0a54 100644
--- a/mail-mta/proton-mail-bridge/Manifest
+++ b/mail-mta/proton-mail-bridge/Manifest
@@ -1,4 +1,4 @@
-DIST proton-mail-bridge-2.3.0-deps.tar.xz 237367120 BLAKE2B 819ffc216017db8a02a189fdb1b4c78e26d38f1cde94bbc556e8603047e396ce0de3caa2b3cf18392a30fbaab525c305f6f0193fb1210baeb48f6a346ae2ba94 SHA512 63076459bf1e8c17775439a5ef1e22482684e0f37a45a4b6f9469c851e66b984f1bce5c19c1d4bfa8cbf5f9ae4fe21a5a20d8304254cdc4f215120dfe5b254e7
-DIST proton-mail-bridge-2.3.0.tar.gz 5059969 BLAKE2B 3871ec75e69ce2976a3b588c9cb32dc61d5c6eaf28a8a7941fb91babbe74cf73f101a3fa9d87c999c659847a42b0a3d93298d6c692a06cfe2716a31fcbb0d469 SHA512 3e3a64d945577a4efc1cb1e9a3b029465f64fab37e80fa7d58e7ea94ba316281596e91a6b49fc37168a0275921f3f79567f58eb926a1d77fcc0b8b39a3cf8f5c
 DIST proton-mail-bridge-3.0.21-deps.tar.xz 169294240 BLAKE2B ee463d96d01e702180f86765a36bc59c72454f13caed22183e68a6875c1dad4b7614966dabdd43915b2762d3de69b8fb3cac1011a48bf50d8f3cc1dbf3a96420 SHA512 6bce4cfcdf1704a6599f925ff59fd367c6750f92f75bee886f656f609a5368eb75f865f642ae63e87bafe3609e7620b0c27dfbec40e281cc8a92221af24f9661
 DIST proton-mail-bridge-3.0.21.tar.gz 4416496 BLAKE2B 6199338b6265c8d3e7108cd7b149fa4e32e56e3ecb7f299e66f4d072d78d8b21a919e52c510c509613958adbacf32d8a4dccb2891a77efa4dec83d483e560266 SHA512 30adc2e4947309fb274a5f86ff450a41685d30b27854b9a00f033adc65d33bcbff19ee830c50ae5bea0c2ac178bc5a4960912486edd4954f928ff075b7441d82
+DIST proton-mail-bridge-3.1.3-deps.tar.xz 206716212 BLAKE2B 4f79e4428ef37452d0abd288e074ecdce8886393582352117b6df5275e1b2f0f8018145c20b8fa889f6473899fd0fde6b621e52cf2faaa218fdac8238134a19b SHA512 fd948e39afaab15d7318c8b46cffd97823857cd8e1c5ba2b2ed3673fcbf186627b190bd876973fbb71854355f4dfba62663e902651716301685dca5f14f26e81
+DIST proton-mail-bridge-3.1.3.tar.gz 4443963 BLAKE2B 2c8fc571612c11c0e281e8f268774e886ba3742b696bdd1180d7cf45525d21d9c062cd3d33acb57a6ceed8dad6b864490c89c090ebfd4bceb4e8c41b19015ae8 SHA512 4f4ca3a2b95c7eed34a13d7f8f296d95717b9c1f95bd157e08c3f21cc752ea3dac5eaefac27662f57f875d9690a5d77a9e15f71406280dcaad6f9054b2ef54b9

diff --git a/mail-mta/proton-mail-bridge/files/proton-mail-bridge.service b/mail-mta/proton-mail-bridge/files/proton-mail-bridge.service
deleted file mode 100644
index 21f0ad1650dd..000000000000
--- a/mail-mta/proton-mail-bridge/files/proton-mail-bridge.service
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=Proton Mail IMAP/SMTP bridge
-Documentation=https://proton.me/mail/bridge/
-
-[Service]
-ExecStart=/usr/bin/proton-mail-bridge --no-window
-Restart=on-failure
-
-# Hardening
-ProtectSystem=full
-PrivateTmp=true
-SystemCallArchitectures=native
-MemoryDenyWriteExecute=true
-NoNewPrivileges=true
-
-[Install]
-WantedBy=default.target

diff --git a/mail-mta/proton-mail-bridge/proton-mail-bridge-2.3.0.ebuild b/mail-mta/proton-mail-bridge/proton-mail-bridge-3.1.3.ebuild
similarity index 80%
rename from mail-mta/proton-mail-bridge/proton-mail-bridge-2.3.0.ebuild
rename to mail-mta/proton-mail-bridge/proton-mail-bridge-3.1.3.ebuild
index 79f180fa1513..3b00a1442737 100644
--- a/mail-mta/proton-mail-bridge/proton-mail-bridge-2.3.0.ebuild
+++ b/mail-mta/proton-mail-bridge/proton-mail-bridge-3.1.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -34,10 +34,8 @@ src_prepare() {
 
 src_compile() {
 	if use gui; then
-		emake \
-			QT_DOC_DIR="/usr/share/qt5-doc" \
-			QT_PKG_CONFIG=true \
-			build
+		eerror "Since version 3.0.0, GUI support in ${PN} requires Qt6 and is therefore currently not available"
+		die "USE=gui requires Qt6"
 	else
 		emake build-nogui
 	fi
@@ -49,11 +47,9 @@ src_test() {
 
 src_install() {
 	exeinto /usr/bin
-	newexe ${MY_PN} ${PN}
+	newexe bridge ${PN}
 
-	systemd_douserunit "${FILESDIR}"/${PN}.service
-
-	# FIXME: USE=gui will probably need more files
+	systemd_newuserunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
 
 	einstalldocs
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-mta/proton-mail-bridge/, mail-mta/proton-mail-bridge/files/
@ 2023-08-22 18:12 Marek Szuba
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Szuba @ 2023-08-22 18:12 UTC (permalink / raw
  To: gentoo-commits

commit:     81cd2d1eea86b73703fda5bd4b19dde5e7d250aa
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 22 18:10:00 2023 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue Aug 22 18:12:37 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81cd2d1e

mail-mta/proton-mail-bridge: implement GUI building

Fun fact, while the bridge proper is still written in Go the current
version of the bridge GUI has been rewritten to C++. I am sure there is
a lesson in here somewhere.

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../proton-mail-bridge-3.3.2-gui_gentoo.patch      | 68 ++++++++++++++++++++++
 ...roton-mail-bridge-3.3.2-telemetry_default.patch | 14 -----
 .../proton-mail-bridge-3.3.2.ebuild                | 66 ++++++++++++++++-----
 3 files changed, 119 insertions(+), 29 deletions(-)

diff --git a/mail-mta/proton-mail-bridge/files/proton-mail-bridge-3.3.2-gui_gentoo.patch b/mail-mta/proton-mail-bridge/files/proton-mail-bridge-3.3.2-gui_gentoo.patch
new file mode 100644
index 000000000000..6bf34627039f
--- /dev/null
+++ b/mail-mta/proton-mail-bridge/files/proton-mail-bridge-3.3.2-gui_gentoo.patch
@@ -0,0 +1,68 @@
+--- a/internal/frontend/bridge-gui/bridge-gui/CMakeLists.txt
++++ b/internal/frontend/bridge-gui/bridge-gui/CMakeLists.txt
+@@ -165,12 +165,9 @@
+         WIN32_EXECUTABLE TRUE
+         MACOSX_BUNDLE TRUE)
+ 
+-install(TARGETS bridge-gui
+-        RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
+-        BUNDLE DESTINATION  "${CMAKE_INSTALL_PREFIX}"
+-        LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}"
+-        )
++install(TARGETS bridge-gui)
+ 
++if(0)
+ qt_generate_deploy_app_script(
+         TARGET bridge-gui
+         FILENAME_VARIABLE deploy_script
+@@ -185,3 +182,4 @@
+ endif()
+ 
+ include(Deploy${DEPLOY_OS}.cmake)
++endif()
+--- a/internal/frontend/bridge-gui/bridge-gui/main.cpp
++++ b/internal/frontend/bridge-gui/bridge-gui/main.cpp
+@@ -53,7 +53,7 @@
+ 
+ QString const bridgeLock = "bridge-v3.lock"; ///< The file name used for the bridge-gui lock file.
+ QString const bridgeGUILock = "bridge-v3-gui.lock"; ///< The file name used for the bridge-gui lock file.
+-QString const exeName = "bridge" + exeSuffix; ///< The bridge executable file name.*
++QString const exeName = "proton-mail-bridge" + exeSuffix; ///< The bridge executable file name.*
+ qint64 const grpcServiceConfigWaitDelayMs = 180000; ///< The wait delay for the gRPC config file in milliseconds.
+ QString const waitFlag = "--wait"; ///< The wait command-line flag.
+ 
+--- a/internal/frontend/bridge-gui/bridgepp/CMakeLists.txt
++++ b/internal/frontend/bridge-gui/bridgepp/CMakeLists.txt
+@@ -161,6 +161,9 @@
+ 
+ target_precompile_headers(bridgepp PRIVATE Pch.h)
+ 
++install(TARGETS bridgepp)
++
++if(0)
+ #*****************************************************************************************************************************************************
+ # GoogleTest
+ #*****************************************************************************************************************************************************
+@@ -198,3 +201,4 @@
+ 
+ include(GoogleTest)
+ gtest_discover_tests(bridgepp-test)
++endif()
+--- a/internal/frontend/bridge-gui/BridgeSetup.cmake
++++ b/internal/frontend/bridge-gui/BridgeSetup.cmake
+@@ -45,6 +45,7 @@
+ endif()
+ 
+ 
++if(0)
+ #****************************************************************************************************************************************************
+ # vcpkg, toolchain, and architecture
+ #****************************************************************************************************************************************************
+@@ -87,4 +88,5 @@
+     set(VCPKG_TARGET_TRIPLET x64-windows)
+ endif()
+ 
+-set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "toolchain")
+\ No newline at end of file
++set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "toolchain")
++endif()

diff --git a/mail-mta/proton-mail-bridge/files/proton-mail-bridge-3.3.2-telemetry_default.patch b/mail-mta/proton-mail-bridge/files/proton-mail-bridge-3.3.2-telemetry_default.patch
deleted file mode 100644
index 3c8df6c2ef9d..000000000000
--- a/mail-mta/proton-mail-bridge/files/proton-mail-bridge-3.3.2-telemetry_default.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Such things really should be opt-in rather than opt-out, and doubly so given
-Gentoo does not package the bridge GUI yet.
-
---- a/internal/vault/types_settings.go
-+++ b/internal/vault/types_settings.go
-@@ -96,7 +96,7 @@
- 		ShowAllMail:       true,
- 		Autostart:         true,
- 		AutoUpdate:        true,
--		TelemetryDisabled: false,
-+		TelemetryDisabled: true,
- 
- 		LastVersion: "0.0.0",
- 		FirstStart:  true,

diff --git a/mail-mta/proton-mail-bridge/proton-mail-bridge-3.3.2.ebuild b/mail-mta/proton-mail-bridge/proton-mail-bridge-3.3.2.ebuild
index 7d85059d6295..013049b4d5c9 100644
--- a/mail-mta/proton-mail-bridge/proton-mail-bridge-3.3.2.ebuild
+++ b/mail-mta/proton-mail-bridge/proton-mail-bridge-3.3.2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit go-module systemd xdg-utils
+inherit cmake go-module systemd xdg-utils
 
 MY_PN="${PN/-mail/}"
 MY_P="${MY_PN}-${PV}"
@@ -22,11 +22,21 @@ IUSE="gui"
 PROPERTIES="test_network"
 RESTRICT="test"
 
-RDEPEND="app-crypt/libsecret"
+RDEPEND="app-crypt/libsecret
+	gui? (
+		>=dev-libs/protobuf-21.12:=
+		dev-libs/sentry-native
+		dev-qt/qtbase:6=[gui,icu,widgets]
+		dev-qt/qtdeclarative:6=[widgets]
+		dev-qt/qtsvg:6=
+		media-libs/mesa
+		net-libs/grpc:=
+	)
+"
 DEPEND="${RDEPEND}"
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-3.3.2-telemetry_default.patch
+	"${FILESDIR}"/${PN}-3.3.2-gui_gentoo.patch
 )
 
 S="${WORKDIR}"/${MY_P}
@@ -34,14 +44,39 @@ S="${WORKDIR}"/${MY_P}
 src_prepare() {
 	xdg_environment_reset
 	default
+	if use gui; then
+		local PATCHES=()
+		BUILD_DIR="${WORKDIR}"/gui_build \
+			CMAKE_USE_DIR="${S}"/internal/frontend/bridge-gui/bridge-gui \
+			cmake_src_prepare
+	fi
+}
+
+src_configure() {
+	if use gui; then
+		# TODO:
+		#  - auto-sync version number between the two executables
+		#  - can we leave BRIDGE_TAG unset? Seems it gets displayed in some info box
+		local mycmakeargs=(
+			-DBRIDGE_APP_FULL_NAME="Proton Mail Bridge"
+			-DBRIDGE_APP_VERSION="${PV}+git"
+			-DBRIDGE_REPO_ROOT="${S}"
+			-DBRIDGE_TAG="NOTAG"
+			-DBRIDGE_VENDOR="Gentoo Linux"
+		)
+		BUILD_DIR="${WORKDIR}"/gui_build \
+			CMAKE_USE_DIR="${S}"/internal/frontend/bridge-gui/bridge-gui \
+			cmake_src_configure
+	fi
 }
 
 src_compile() {
+	emake build-nogui
+
 	if use gui; then
-		eerror "Since version 3.0.0, GUI support in ${PN} requires Qt6 and is therefore currently not available"
-		die "USE=gui requires Qt6"
-	else
-		emake build-nogui
+		BUILD_DIR="${WORKDIR}"/gui_build \
+			CMAKE_USE_DIR="${S}"/internal/frontend/bridge-gui/bridge-gui \
+			cmake_src_compile
 	fi
 }
 
@@ -53,31 +88,32 @@ src_install() {
 	exeinto /usr/bin
 	newexe bridge ${PN}
 
+	if use gui; then
+		BUILD_DIR="${WORKDIR}"/gui_build \
+			CMAKE_USE_DIR="${S}"/internal/frontend/bridge-gui/bridge-gui \
+			cmake_src_install
+		mv "${ED}"/usr/bin/bridge-gui "${ED}"/usr/bin/${PN}-gui || die
+	fi
+
 	systemd_newuserunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
 
 	einstalldocs
 }
 
 pkg_postinst() {
-	use gui && xdg_icon_cache_update
-
 	if [[ -n "${REPLACING_VERSIONS}" ]]; then
 		local oldver
 		for oldver in ${REPLACING_VERSIONS}; do
 			if ver_test "${oldver}" -lt 3.2.0; then
-				ewarn "Please note that since version 3.2.0, ${PN} can share usage statistics with upstream."
+				ewarn "Please note that since version 3.2.0, ${PN} by default shares usage statistics with upstream."
 				ewarn "For details, please see"
 				ewarn
 				ewarn "	https://proton.me/support/share-usage-statistics"
 				ewarn
-				ewarn "Gentoo ebuilds change the default value of the 'send telemetry' setting to disabled."
+				ewarn "This behaviour can be disabled through ${PN}-gui, under Advanced Settings."
 				ewarn
 				break
 			fi
 		done
 	fi
 }
-
-pkg_postrm() {
-	use gui && xdg_icon_cache_update
-}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-22 18:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-10 16:32 [gentoo-commits] repo/gentoo:master commit in: mail-mta/proton-mail-bridge/, mail-mta/proton-mail-bridge/files/ Marek Szuba
  -- strict thread matches above, loose matches on Subject: below --
2023-05-23 19:39 Marek Szuba
2023-08-22 18:12 Marek Szuba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox