aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-07-10 04:58:56 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-07-10 04:59:40 +0000
commit06adb14f7c14ce3a6b1b79212ecb5e669a39425a (patch)
tree436e7f61fb545f23171d58f5dec3dcf99220e025
parent43becdd4f37427e5fdff7aa4e1bddec2a34d205a (diff)
downloadports-06adb14f7c14ce3a6b1b79212ecb5e669a39425a.tar.gz
ports-06adb14f7c14ce3a6b1b79212ecb5e669a39425a.zip
security/py-certbot-dns-cloudflare: Allow build with py-cloudflare 2.20
- Bump PORTREVISION for package change
-rw-r--r--security/py-certbot-dns-cloudflare/Makefile3
-rw-r--r--security/py-certbot-dns-cloudflare/files/patch-cloudflare28
2 files changed, 30 insertions, 1 deletions
diff --git a/security/py-certbot-dns-cloudflare/Makefile b/security/py-certbot-dns-cloudflare/Makefile
index 87772f23881d..e5ba275f7908 100644
--- a/security/py-certbot-dns-cloudflare/Makefile
+++ b/security/py-certbot-dns-cloudflare/Makefile
@@ -1,5 +1,6 @@
PORTNAME= certbot-dns-cloudflare
PORTVERSION= ${ACME_VERSION}
+PORTREVISION= 1
CATEGORIES= security python
MASTER_SITES= PYPI \
https://github.com/certbot/certbot/releases/download/v${PORTVERSION}/
@@ -19,7 +20,7 @@ BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLA
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}acme>=${ACME_VERSION},1:security/py-acme@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}certbot>=${ACME_VERSION},1:security/py-certbot@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}cloudflare>=1.5.1<2.20:dns/py-cloudflare@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}cloudflare>=1.5.1<2.20_99:dns/py-cloudflare@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}setuptools>=41.6.0:devel/py-setuptools@${PY_FLAVOR}
USES= python
diff --git a/security/py-certbot-dns-cloudflare/files/patch-cloudflare b/security/py-certbot-dns-cloudflare/files/patch-cloudflare
new file mode 100644
index 000000000000..c7e24299416b
--- /dev/null
+++ b/security/py-certbot-dns-cloudflare/files/patch-cloudflare
@@ -0,0 +1,28 @@
+--- certbot_dns_cloudflare/_internal/dns_cloudflare.py.orig 2024-06-05 21:34:02 UTC
++++ certbot_dns_cloudflare/_internal/dns_cloudflare.py
+@@ -99,12 +99,12 @@ class _CloudflareClient:
+ # We can't use named arguments in this case, as it would break compatibility with
+ # the Cloudflare library since version 2.10.1, as the `token` argument was used for
+ # tokens and keys alike and the `key` argument did not exist in earlier versions.
+- self.cf = CloudFlare.CloudFlare(email, api_key)
++ self.cf = CloudFlare.CloudFlare(email, api_key, warnings=False)
+ else:
+ # If no email was specified, we're using just a token. Let's use the named argument
+ # for simplicity, which is compatible with all (current) versions of the Cloudflare
+ # library.
+- self.cf = CloudFlare.CloudFlare(token=api_token)
++ self.cf = CloudFlare.CloudFlare(token=api_token, warnings=False)
+
+ def add_txt_record(self, domain: str, record_name: str, record_content: str,
+ record_ttl: int) -> None:
+--- setup.py.orig 2024-06-05 21:34:03 UTC
++++ setup.py
+@@ -9,7 +9,7 @@ install_requires = [
+ install_requires = [
+ # for now, do not upgrade to cloudflare>=2.20 to avoid deprecation warnings and the breaking
+ # changes in version 3.0. see https://github.com/certbot/certbot/issues/9938
+- 'cloudflare>=1.5.1, <2.20',
++ 'cloudflare>=1.5.1, <=2.20',
+ 'setuptools>=41.6.0',
+ ]
+