The PR to fix Python's open() mode was closed after upstream's switch
to Python 3.
I can no longer reproduce the error without the patch and `ietf mirror'
works, i.e. it correctly creates the JSON file.
I'm actively using it, so take maintainer (then portroach-cli(1) will
tell me about updates).
README no longer needs CRLF fixing.
MODPY_BUILDDEP=No is set by NO_BUILD=Yes already.
OK?
Index: Makefile
===================================================================
RCS file: /cvs/ports/misc/ietf-cli/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile 2 Nov 2021 00:01:37 -0000 1.9
+++ Makefile 28 Nov 2021 18:30:41 -0000
@@ -4,19 +4,18 @@ COMMENT= command-line tools to work with
GH_ACCOUNT= paulehoffman
GH_PROJECT= ietf-cli
-GH_TAGNAME= 4b2b52dc333b6b59403b102349572f8af1b20a52
-DISTNAME= ${GH_PROJECT}-1.16
-REVISION= 2
+GH_TAGNAME= 1.18
CATEGORIES= misc net books
HOMEPAGE= https://trac.tools.ietf.org/tools/ietf-cli/
+MAINTAINER= Klemens Nanni <[email protected]>
+
# WTFPL
PERMIT_PACKAGE= Yes
MODULES= lang/python
-MODPY_BUILDDEP= No
NO_BUILD= Yes
NO_TEST= Yes
@@ -27,8 +26,6 @@ RUN_DEPENDS= devel/xdg-utils \
PKG_ARCH= *
MODPY_ADJ_FILES= ietf
-
-FIX_CRLF_FILES= README
do-configure:
${SUBST_CMD} ${WRKSRC}/ietf{,.config}
Index: distinfo
===================================================================
RCS file: /cvs/ports/misc/ietf-cli/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo 14 Mar 2020 15:59:46 -0000 1.2
+++ distinfo 28 Nov 2021 18:23:02 -0000
@@ -1,2 +1,2 @@
-SHA256 (ietf-cli-1.16.tar.gz) = p5e+Qob6zYGItFBjykFuAx93lAH3y3mNW+W6Jtot/AM=
-SIZE (ietf-cli-1.16.tar.gz) = 16619
+SHA256 (ietf-cli-1.18.tar.gz) = jrdsiETI3WvXBe37pDeqGg6Lykshf6tFI7K0zd5sPfI=
+SIZE (ietf-cli-1.18.tar.gz) = 18238
Index: patches/patch-ietf
===================================================================
RCS file: /cvs/ports/misc/ietf-cli/patches/patch-ietf,v
retrieving revision 1.3
diff -u -p -r1.3 patch-ietf
--- patches/patch-ietf 5 Feb 2021 14:16:17 -0000 1.3
+++ patches/patch-ietf 28 Nov 2021 18:24:53 -0000
@@ -2,36 +2,21 @@ $OpenBSD: patch-ietf,v 1.3 2021/02/05 14
Adjust ConfigPlaces.
-Remove binary flag when opening a text file to write to it
- - https://github.com/paulehoffman/ietf-cli/pull/4
-
Index: ietf
--- ietf.orig
+++ ietf
-@@ -78,7 +78,7 @@ __license__ = "https://en.wikipedia.org/wiki/WTFPL"
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python3
++#!/usr/local/bin/python3.9
+ import glob, json, subprocess, time, optparse, fnmatch, cmd, os, re
+ from xml.etree import ElementTree
- KnownCmds = ("auth48", "author", "bcp", "charter", "conflict", "diff",
"draft", "draftstatus", "iesg", "mirror", \
- "rfc", "rfcextra", "rfcinfo", "rfcstatus", "rg", "std", "tools",
"tracker", "foo")
+@@ -92,7 +92,7 @@ __license__ = "https://en.wikipedia.org/wiki/WTFPL"
+
+ KnownCmds = ("auth48", "author", "bcp", "bcponly", "charter", "conflict",
"diff", "draft", "draftreport", \
+ "iesg", "mirror", "rfc", "rfcextra", "rfcinfo", "rg", "std",
"stdonly", "tools", "tracker", "foo")
-ConfigPlaces = ("~/bin/ietf.config", "/usr/local/bin/ietf.config",
"~/.ietf/ietf.config")
+ConfigPlaces = ("~/.ietf/ietf.config", "${SYSCONFDIR}/ietf.config")
# Make a block of text that can be executed in the CLI
CLICmdCode = ""
-@@ -751,7 +751,7 @@ def Cmd_mirror(Args):
- for ThisFoundInnerAuthor in
ThisFoundOuterAuthor.findall(TagBase + "name"):
-
RFCStatus[ThisRFCNum]["authors"].append(ThisFoundInnerAuthor.text)
- try:
-- with open(RFCStatusFileLoc, mode="wb") as statusf:
-+ with open(RFCStatusFileLoc, mode="w") as statusf:
- json.dump(RFCStatus, statusf)
- except:
- exit("Could not dump status info to '" + RFCStatusFileLoc + "'.
Exiting.")
-@@ -783,7 +783,7 @@ def Cmd_mirror(Args):
- "title": TheFields[13], \
- "authors": TheFields[14].rstrip() }
- try:
-- with open(IDStatusFileLoc, mode="wb") as statusf:
-+ with open(IDStatusFileLoc, mode="w") as statusf:
- json.dump(IDStatus, statusf)
- except:
- exit("Could not dump status info to '" + IDStatusFileLoc + "'.
Exiting.")