From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 9C00215802E for ; Sat, 29 Jun 2024 22:16:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C7008E2B02; Sat, 29 Jun 2024 22:16:43 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 A99BCE2B02 for ; Sat, 29 Jun 2024 22:16:43 +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 7ECDD335C7E for ; Sat, 29 Jun 2024 22:16:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B365D1BC0 for ; Sat, 29 Jun 2024 22:16:40 +0000 (UTC) From: "Ivan Lloro" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ivan Lloro" Message-ID: <1719699230.15a574302826f97722e7f7a5eca7bdb1edfca251.ivan.lloro.boada@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: app-crypt/autofirma/ X-VCS-Repository: repo/proj/guru X-VCS-Files: app-crypt/autofirma/autofirma-1.8.3.ebuild X-VCS-Directories: app-crypt/autofirma/ X-VCS-Committer: ivan.lloro.boada X-VCS-Committer-Name: Ivan Lloro X-VCS-Revision: 15a574302826f97722e7f7a5eca7bdb1edfca251 X-VCS-Branch: dev Date: Sat, 29 Jun 2024 22:16:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 41d2283d-608e-49f6-97a3-fdc5aba15af3 X-Archives-Hash: 668d2ab4a50fbc408ba573e89ec01f0b commit: 15a574302826f97722e7f7a5eca7bdb1edfca251 Author: Ivan Lloro gmail com> AuthorDate: Sat Jun 29 22:13:50 2024 +0000 Commit: Ivan Lloro gmail com> CommitDate: Sat Jun 29 22:13:50 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=15a57430 app-crypt/autofirma: Included fallback method for automatically downloading source file. Signed-off-by: Ivan Lloro gmail.com> app-crypt/autofirma/autofirma-1.8.3.ebuild | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app-crypt/autofirma/autofirma-1.8.3.ebuild b/app-crypt/autofirma/autofirma-1.8.3.ebuild index 3d2d98588..f9d8c773f 100644 --- a/app-crypt/autofirma/autofirma-1.8.3.ebuild +++ b/app-crypt/autofirma/autofirma-1.8.3.ebuild @@ -11,7 +11,8 @@ HOMEPAGE=" https://github.com/ctt-gob-es/clienteafirma " -# Upstream blocks wget with no User Agent. +# Upstream blocks wget with no User Agent. It can be addressed globally (see https://wiki.gentoo.org/wiki/FETCHCOMMAND). +# If Gentoo's default configuration is in place, pkg_pretend() and pkg_nofetch() provide fallback options. SRC_URI="https://estaticos.redsara.es/comunes/autofirma/$(ver_rs 1- /)/AutoFirma_Linux_Fedora.zip -> ${P}.zip" S=${WORKDIR} @@ -23,6 +24,12 @@ KEYWORDS="~amd64" RDEPEND="virtual/jre:1.8" BDEPEND="app-arch/unzip" +pkg_pretend() { + # Upstream blocks vanilla wget, so we set up a browser User-Agent as a fallback. + URI="https://estaticos.redsara.es/comunes/autofirma/$(ver_rs 1- /)/AutoFirma_Linux_Fedora.zip" + /usr/sbin/wget --user-agent="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0" "${URI}" -O "${PORTAGE_ACTUAL_DISTDIR}"/"${P}".zip +} + pkg_nofetch() { einfo "Please download:" einfo " https://estaticos.redsara.es/comunes/autofirma/$(ver_rs 1- /)/AutoFirma_Linux_Fedora.zip"