Bug 248959 - dns/py-cloudflare: Update to 2.3.1
Summary: dns/py-cloudflare: Update to 2.3.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Danilo G. Baio
Depends on:
Reported: 2020-08-28 10:29 UTC by player701
Modified: 2020-09-13 18:03 UTC (History)
4 users (show)

See Also:
dbaio: maintainer-feedback+


Note You need to log in before you can comment on or make changes to this bug.
Description player701 2020-08-28 10:29:27 UTC
To use Cloudflare API tokens, Cerbot Cloudflare API plugin https://www.freshports.org/security/py-certbot-dns-cloudflare/ requires python package cloudflare>=2.3.1. However, the latest version available here is currently 2.1.0, which appears to be severely outdated (released more than 2 years ago). Without API tokens, it is only possible to use the global API key, which gives access to the whole API at once (could be insecure).

If possible, please update this port to version 2.3.1 or newer (preferably the latest one available) to allow usage of API tokens. Thank you very much.
Comment 1 Li-Wen Hsu freebsd_committer 2020-09-03 05:17:01 UTC
Do you want to submit a patch to update it and even take the maintainership of this port?
Comment 2 player701 2020-09-03 15:30:53 UTC
I wish I could submit a new version myself, but I don't have a suitable environment for that nor the expertise necessary to set it up. I'm truly sorry if my original request was inappropriate. I only wanted to point out that the current version of this port lacks a crucial security-oriented feature, and it would be nice to have it updated, especially since that the global API keys are now considered "legacy" by Cloudflare and are not recommended to be used anymore.
Comment 3 Li-Wen Hsu freebsd_committer 2020-09-03 16:38:48 UTC
(In reply to player701 from comment #2)
This is definitely not an inappropriate request, and your notification of new version is available is much appreciated.  I asked so because this updating looks not very hard and could be a good practice before others creating a patch.  Please try to update the PORTVERSION in Makefile (and remove PORTREVISION), and distinfo, then see if it works. You can check the porter's handbook https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/ and ask question on freebsd-ports@ mailing list: https://lists.freebsd.org/mailman/listinfo/freebsd-ports
Comment 4 player701 2020-09-06 08:51:32 UTC
(In reply to Li-Wen Hsu from comment #3)

OK, I've edited the makefile and changed the version to latest (2.8.13 as of now) and regenerated the checksum file (distinfo). Now when I try to install the port, I get the following error:

pkg-static: Unable to access file /usr/ports/dns/py-cloudflare/work-py37/stage/usr/local/man/man1/cli4.man:No such file or directory
*** Error code 74

make: stopped in /usr/ports/dns/py-cloudflare

Not quite sure what to do about it. Sorry...
Comment 5 Conall O'Brien 2020-09-12 20:33:12 UTC
I've found a solution for this problem and will generate a patch for this soon
Comment 6 Danilo G. Baio freebsd_committer 2020-09-12 23:05:03 UTC
Version 2.3.1 supports Python 2 and 3 and has api token support as pointed out.

For the latest version we will need to handle the Python 2 support removal on certbot-dns-cloudflare, and it will be the only certbot-dns port without Python 2.

I suggest updating it to 2.3.1 for now, is that ok for you?
Comment 7 player701 2020-09-13 15:53:28 UTC
(In reply to Danilo G. Baio from comment #6)
Yes of course. There could have been other important feature updates in newer versions, but as far as I'm aware, certbot seems to be asking only for this particular feature (API tokens). There may be other use cases to warrant further updates, but I have no idea what they could be.
Comment 8 commit-hook freebsd_committer 2020-09-13 18:00:27 UTC
A commit references this bug:

Author: dbaio
Date: Sun Sep 13 18:00:04 UTC 2020
New revision: 548496
URL: https://svnweb.freebsd.org/changeset/ports/548496

  dns/py-cloudflare: Update to 2.3.1

  Latest release that supports Python 2 and 3.
  This version brings api token support.

  PR:		248959
  Reported by:	player701@player701.ru
  Approved by:	python (with hat)

Comment 9 Danilo G. Baio freebsd_committer 2020-09-13 18:03:44 UTC
We can track dns/py-cloudflare to latest release in another PR.
In the next days we will update certbot to 1.8.0, just waiting Python 3.5 removal.