From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1551012-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 5FB2A15801B
	for <garchives@archives.gentoo.org>; Fri,  1 Sep 2023 07:19:19 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 7EB082BC019;
	Fri,  1 Sep 2023 07:19:18 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 6CB422BC019
	for <gentoo-commits@lists.gentoo.org>; Fri,  1 Sep 2023 07:19:17 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 53E8F33BF3C
	for <gentoo-commits@lists.gentoo.org>; Fri,  1 Sep 2023 07:19:16 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 8BBAC10DF
	for <gentoo-commits@lists.gentoo.org>; Fri,  1 Sep 2023 07:19:14 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1693552713.7089cafea400d1c7c55f5d2c8f9e558b3be2ddd6.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/wireshark/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-analyzer/wireshark/Manifest net-analyzer/wireshark/wireshark-4.1.0.ebuild net-analyzer/wireshark/wireshark-9999.ebuild
X-VCS-Directories: net-analyzer/wireshark/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 7089cafea400d1c7c55f5d2c8f9e558b3be2ddd6
X-VCS-Branch: master
Date: Fri,  1 Sep 2023 07:19:14 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 44c4ae6a-ef05-46ac-9f80-ee43a38b947b
X-Archives-Hash: 4cfd21c3772bab7eac4f97c9ea41281f

commit:     7089cafea400d1c7c55f5d2c8f9e558b3be2ddd6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 16 05:31:03 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Sep  1 07:18:33 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7089cafe

net-analyzer/wireshark: add support for verify-sig

Signed-off-by: Sam James <sam <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/20401
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-analyzer/wireshark/Manifest               |  1 +
 net-analyzer/wireshark/wireshark-4.1.0.ebuild | 23 +++++++++++++++++++++++
 net-analyzer/wireshark/wireshark-9999.ebuild  | 22 ++++++++++++++++++++++
 3 files changed, 46 insertions(+)

diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest
index 84b53db047b2..56bb06098da3 100644
--- a/net-analyzer/wireshark/Manifest
+++ b/net-analyzer/wireshark/Manifest
@@ -1,4 +1,5 @@
 DIST wireshark-4.0.6.tar.xz 41583088 BLAKE2B 5c4f3b6e16541afbeb9241d2c66c75da97df3164cbc841f1d5d5ba57fa102d85c8d22275180ce2e4fb72ed73c9fb8e64be1c9b4f337803d85146564bee43ce52 SHA512 651b760d05518a914ffbb2fe1ced84e877ebc40d7b03500586e009609064761bef7810654b1321e08aeea403867450be289227a9e43937e9f777693a8f4c901b
 DIST wireshark-4.0.7.tar.xz 43113752 BLAKE2B 06d4863fe796da8d3b97144a8b24430741ea8f58a8401a56327e0db37e5a7e81e63ab43325c87195a535565af7cb1265e25f8c62600ae69d549da479951bb9a1 SHA512 98f609405f20a3714e7c5e4f806cae5cc842daaf0219bd92d3130d2930758cce244edca4529db59300b5ca1e1e98d1aa632bc5c85c92f26aa2e0c124e691a5ab
 DIST wireshark-4.0.8.tar.xz 43123664 BLAKE2B bda31be809724a39e475489eb5653589310ae679933fac193cbc8bb3924b3ec48a93b5da6d39655fdb9f4a8d717b9cc84fcb357bea275cb457b45783a75ca778 SHA512 f6de0f86bb1eac82f7ed2d98d7f4fe3189107b1f0da441abd9077593f8e624989c33aaf8b4ef4b3c460fe787c64c4b8fdb3168de9f5661802fed6b06d71c5c65
+DIST wireshark-4.1.0-signatures.txt 2706 BLAKE2B bcc55c14a68aead0061041e39114a04531440d98b24e271d731ff6baa0047adac7871f0e089b326d29273bad71f8fa9fa482ebac21ba7635e9a251831d387a34 SHA512 ae0eb7a36f554d27fecd47cb471f3c85b8bd53030a6dc872f74b33a46eee004910a3c095c16d8eed56a7c2e6104084e632580b555f29e77a4b8c04c50b53019a
 DIST wireshark-4.1.0.tar.xz 44601140 BLAKE2B c20a0a917c94554d593986e9058cee7f10c68a0e73a3b8a69e87c40f5932d4f33da1d3ba8ed5177094058bd43ba9942b21a2f3fe6e04a751ffb75e9e9b524627 SHA512 d3253d26d53dbeaa14f7d7dd0956124de3f7fe1d683f2041c6d1420271ba9601248c904a0927160194ca54aa8752526bd5de643d553e55ded8478caa54cd9bb0

diff --git a/net-analyzer/wireshark/wireshark-4.1.0.ebuild b/net-analyzer/wireshark/wireshark-4.1.0.ebuild
index 084bda174c0f..6747da08152b 100644
--- a/net-analyzer/wireshark/wireshark-4.1.0.ebuild
+++ b/net-analyzer/wireshark/wireshark-4.1.0.ebuild
@@ -16,7 +16,11 @@ if [[ ${PV} == *9999* ]] ; then
 	EGIT_REPO_URI="https://gitlab.com/wireshark/wireshark"
 	inherit git-r3
 else
+	VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/wireshark.asc
+	inherit verify-sig
+
 	SRC_URI="https://www.wireshark.org/download/src/all-versions/${P/_/}.tar.xz"
+	SRC_URI+=" verify-sig? ( https://www.wireshark.org/download/SIGNATURES-${PV}.txt -> ${P}-signatures.txt )"
 	S="${WORKDIR}/${P/_/}"
 
 	# 4.1.x is an experimental release until 4.2
@@ -130,6 +134,10 @@ RDEPEND="
 	selinux? ( sec-policy/selinux-wireshark )
 "
 
+if [[ ${PV} != *9999* ]] ; then
+	BDEPEND+=" verify-sig? ( app-crypt/openpgp-keys-wireshark )"
+fi
+
 PATCHES=(
 	"${FILESDIR}"/${PN}-2.6.0-redhat.patch
 )
@@ -147,6 +155,21 @@ pkg_setup() {
 	python-any-r1_pkg_setup
 }
 
+src_unpack() {
+	if [[ ${PV} == *9999* ]] ; then
+		git-r3_src_unpack
+	else
+		if use verify-sig ; then
+			verify-sig_verify_signed_checksums \
+				"${DISTDIR}"/${P}-signatures.txt \
+				sha256 \
+				"${DISTDIR}"/${P}.tar.xz
+		fi
+
+		default
+	fi
+}
+
 src_configure() {
 	local mycmakeargs
 

diff --git a/net-analyzer/wireshark/wireshark-9999.ebuild b/net-analyzer/wireshark/wireshark-9999.ebuild
index 084bda174c0f..793a8e820343 100644
--- a/net-analyzer/wireshark/wireshark-9999.ebuild
+++ b/net-analyzer/wireshark/wireshark-9999.ebuild
@@ -16,7 +16,11 @@ if [[ ${PV} == *9999* ]] ; then
 	EGIT_REPO_URI="https://gitlab.com/wireshark/wireshark"
 	inherit git-r3
 else
+	VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/wireshark.asc
+	inherit verify-sig
+
 	SRC_URI="https://www.wireshark.org/download/src/all-versions/${P/_/}.tar.xz"
+	SRC_URI+=" verify-sig? ( https://www.wireshark.org/download/SIGNATURES-${PV}.txt -> ${P}-signatures.txt )"
 	S="${WORKDIR}/${P/_/}"
 
 	# 4.1.x is an experimental release until 4.2
@@ -129,6 +133,9 @@ RDEPEND="
 	gui? ( virtual/freedesktop-icon-theme )
 	selinux? ( sec-policy/selinux-wireshark )
 "
+if [[ ${PV} != *9999* ]] ; then
+	BDEPEND+=" verify-sig? ( app-crypt/openpgp-keys-wireshark )"
+fi
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-2.6.0-redhat.patch
@@ -147,6 +154,21 @@ pkg_setup() {
 	python-any-r1_pkg_setup
 }
 
+src_unpack() {
+	if [[ ${PV} == *9999* ]] ; then
+		git-r3_src_unpack
+	else
+		if use verify-sig ; then
+			verify-sig_verify_signed_checksums \
+				"${DISTDIR}"/${P}-signatures.txt \
+				sha256 \
+				"${DISTDIR}"/${P}.tar.xz
+		fi
+
+		default
+	fi
+}
+
 src_configure() {
 	local mycmakeargs