Klemens Nanni <[email protected]> writes:
> 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?
Two minor things:
- I'd also adjust the paths in the README to mirror the directories
where ietf searches for its config.
- drop the first chunk in the patch-ietf: the shebang is already fixed
by MODPY_ADJ_FILES, and should reduce the churn next time python is
updated. This gets picked up every time one does make update-patches
after `make patch` though, so maybe we want to keep it?
otherwise ok for me :)
Index: Makefile
===================================================================
RCS file: /home/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 29 Nov 2021 08:15:17 -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: /home/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 29 Nov 2021 08:15:22 -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-README
===================================================================
RCS file: patches/patch-README
diff -N patches/patch-README
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-README 29 Nov 2021 08:23:28 -0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+
+Adjust ConfigPlaces.
+
+Index: README
+--- README.orig
++++ README
+@@ -15,9 +15,8 @@ and available to the default shell.
+
+ The program consists of two files: "ietf" (the executable) and "ietf.config"
+ (mandatory configuration settings). The latter file must be either in one of
+-the following directories: ~/bin/, /usr/local/bin/, or ~/.ietf/. The
+-executable can be anywhere, but is probably best kept with the configuration
+-file.
++the following directories: ~/.ietf/ or /etc/. The executable can be anywhere,
++but is probably best kept with the configuration file.
+
+ You can make aliases in your shell for the program if you normally run it from
+ the shell command line to save keystrokes. For example, if you use the bash
Index: patches/patch-ietf
===================================================================
RCS file: /home/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 29 Nov 2021 08:27:52 -0000
@@ -2,36 +2,15 @@ $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"
+@@ -92,7 +92,7 @@ __license__ = "https://en.wikipedia.org/wiki/WTFPL"
- KnownCmds = ("auth48", "author", "bcp", "charter", "conflict", "diff",
"draft", "draftstatus", "iesg", "mirror", \
- "rfc", "rfcextra", "rfcinfo", "rfcstatus", "rg", "std", "tools",
"tracker", "foo")
+ 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.")