Klemens Nanni <[email protected]> writes:
> On Mon, Nov 29, 2021 at 09:19:17AM +0100, Omar Polo wrote:
>> 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.
>
> Good catch, that was mssing before my diff already.
Yes, and it's indeed better to substitute ${SYSCONFDIR}.
>> - 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?
>
> I must've slipped in while I did the update (there were still problems
> with GitHub and I juggled tarballs/diffs/etc. due to bogus releases).
>
> Doing it again now doesn't make MODPY_ADJ_FILES's work slip into patches
> so that's good.
make update-patches still picks it up after `make build' for me, I guess
it can't be worked around since it's done in pre-configure.
>> otherwise ok for me :)
(forgot to mention that I successfully mirrored and opened a few RFCs.)
Of course still OK op@
> 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 29 Nov 2021 08:45:08 -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
> @@ -28,10 +27,8 @@ PKG_ARCH= *
>
> MODPY_ADJ_FILES= ietf
>
> -FIX_CRLF_FILES= README
> -
> do-configure:
> - ${SUBST_CMD} ${WRKSRC}/ietf{,.config}
> + ${SUBST_CMD} ${WRKSRC}/{ietf{,.config},README}
>
> do-install:
> ${INSTALL_DATA_DIR} ${PREFIX}/share/{doc,examples}/ietf
> 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-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:48:22 -0000
> @@ -0,0 +1,16 @@
> +$OpenBSD$
> +
> +Adjust ConfigPlaces.
> +
> +Index: README
> +--- README.orig
> ++++ README
> +@@ -15,7 +15,7 @@ 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
> ++the following directories: ~/.ietf/ or ${SYSCONFDIR}/. The
> + executable can be anywhere, but is probably best kept with the configuration
> + file.
> +
> 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 29 Nov 2021 08:44:06 -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.")