commit: b9eae783f541910dfa96d5b177c01d86ba2a0f11 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Fri Apr 16 05:10:37 2021 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Apr 16 05:33:15 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9eae783
net-libs/libpcap: add verify-sig support Signed-off-by: Sam James <sam <AT> gentoo.org> net-libs/libpcap/Manifest | 3 ++- net-libs/libpcap/libpcap-1.10.0.ebuild | 13 +++++++++++-- net-libs/libpcap/libpcap-9999.ebuild | 12 +++++++++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/net-libs/libpcap/Manifest b/net-libs/libpcap/Manifest index fd26acd7371..6e946903385 100644 --- a/net-libs/libpcap/Manifest +++ b/net-libs/libpcap/Manifest @@ -1 +1,2 @@ -DIST libpcap-1.10.0.tar.gz 920263 BLAKE2B 40b9f3562161dbdd30065757ae045bc3b6447a954dd3019e932cdc9c794e0f47e8eb0480144bfd7765122a3efa750caa0c77abbb98ce29ad79a84ceaedcb9e3f SHA512 d77f05aff76aefbd280e5e24eb4a23b6f3b31c9aacff77d556259325273083f185c451b7ad40b57ac63c9114510e8f768fb99907b1ee54fa95b80f21d7d6500f +DIST libpcap-1.10.0-upstream.tar.gz 934559 BLAKE2B 54e809af242b18d600b88f29bbe31b01784b5160366242f313908b58dfb1e6ee2ceae8d359f730881e15c1b26ed90c553869dffb25a74eb3cea9f597dd490b1d SHA512 007710386ff3435ef97fc99293076eae3c39b424e986141184c712b0285f8589357a1b25085f7eba28730de04312042c724d193934a399797e95a56f5301da7f +DIST libpcap-1.10.0-upstream.tar.gz.sig 442 BLAKE2B f19ca45bbeee39ef1b3f8a8e8d8d9f24ad43e503430a3fa969a8ce668cb7926e1d19adb7e7cf11fff9dafa09b04507052ccc98f7b2a81f053ff01ec6c7ec8f87 SHA512 8a13aef00120080793da800f038d13124d412dfcfae6c0a952bcab544b50c8b69f6a672438bbe5bcdbfeda2e0d541bccefefbfc69f94e1635c0e9eaf77f19902 diff --git a/net-libs/libpcap/libpcap-1.10.0.ebuild b/net-libs/libpcap/libpcap-1.10.0.ebuild index eb782dc7c1a..e17ca925326 100644 --- a/net-libs/libpcap/libpcap-1.10.0.ebuild +++ b/net-libs/libpcap/libpcap-1.10.0.ebuild @@ -12,8 +12,13 @@ if [[ ${PV} == *9999* ]] ; then EGIT_REPO_URI="https://github.com/the-tcpdump-group/libpcap" inherit git-r3 else - SRC_URI="https://github.com/the-tcpdump-group/${PN}/archive/${P/_pre/-bp}.tar.gz" - S="${WORKDIR}/${PN}-${P/_pre/-bp}" + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/tcpdump.asc + inherit verify-sig + + # Note: drop -upstream on bump, this is just because we switched to the official + # distfiles for verify-sig + SRC_URI="https://www.tcpdump.org/release/${P}.tar.gz -> ${P}-upstream.tar.gz" + SRC_URI+=" verify-sig? ( https://www.tcpdump.org/release/${P}.tar.gz.sig -> ${P}-upstream.tar.gz.sig )" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris" fi @@ -36,6 +41,10 @@ BDEPEND=" dbus? ( virtual/pkgconfig ) " +if [[ ${PV} != *9999* ]] ; then + BDEPEND+=" verify-sig? ( app-crypt/openpgp-keys-tcpdump )" +fi + PATCHES=( "${FILESDIR}"/${PN}-1.9.1-pcap-config.patch "${FILESDIR}"/${PN}-1.10.0-usbmon.patch diff --git a/net-libs/libpcap/libpcap-9999.ebuild b/net-libs/libpcap/libpcap-9999.ebuild index 2f01831d36e..9bb09002139 100644 --- a/net-libs/libpcap/libpcap-9999.ebuild +++ b/net-libs/libpcap/libpcap-9999.ebuild @@ -12,8 +12,11 @@ if [[ ${PV} == *9999* ]] ; then EGIT_REPO_URI="https://github.com/the-tcpdump-group/libpcap" inherit git-r3 else - SRC_URI="https://github.com/the-tcpdump-group/${PN}/archive/${P/_pre/-bp}.tar.gz" - S="${WORKDIR}/${PN}-${P/_pre/-bp}" + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/tcpdump.asc + inherit verify-sig + + SRC_URI="https://www.tcpdump.org/release/${P}.tar.gz" + SRC_URI+=" verify-sig? ( https://www.tcpdump.org/release/${P}.tar.gz.sig )" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris" fi @@ -36,10 +39,13 @@ BDEPEND=" dbus? ( virtual/pkgconfig ) " +if [[ ${PV} != *9999* ]] ; then + BDEPEND+=" verify-sig? ( app-crypt/openpgp-keys-tcpdump )" +fi + PATCHES=( "${FILESDIR}"/${PN}-1.9.1-pcap-config.patch "${FILESDIR}"/${PN}-1.10.0-usbmon.patch - "${FILESDIR}"/${PN}-9999-prefix-darwin.patch ) src_prepare() {