Download raw body.
switch tacacs+ to python3
On 2024/02/19 10:46, Daniel Dickman wrote:
>
>
> On Mon, 19 Feb 2024, Stuart Henderson wrote:
>
> > On 2024/02/19 10:21, Daniel Dickman wrote:
> > >
> > >
> > > On Mon, 19 Feb 2024, Jeremie Courreges-Anglas wrote:
> > >
> > > > On Sat, Feb 17 2024, Daniel Dickman <didickman@gmail.com> wrote:
> > > > > Hello Jan, ports@,
> > > > >
> > > > > Please see below for a small update so tacacs+ doesn't need python2.
> > > > >
> > > > > It also looks like python2 is not needed at build time, but only at run
> > > > > time.
> > > > >
> > > > > ok to commit the diff below?
> > > >
> > > > do_auth.py isn't ready for python3, if you really want to move this to
> > > > python3 I would suggest using 2to3 -w in eg post-extract (and thus keep
> > > > current MODPY_BUILDDEP).
> > > >
> > >
> > > Indeed I botched the diff I sent out. I had run do_auth.py through 2to3
> > > and made a patch that should have been part of the original diff.
> > >
> > > The reason I made a patch instead of running 2to3 dynamically is because
> > > it is only 1 file and more changes might be needed in do_auth.py to adapt
> > > to future python updates in the future.
> >
> > However, the diff for any future patches needed will be shorter if it's
> > made on top of 2to3's output (as would be the case with 2to3 run in
> > post-extract).
> >
> > > ok on this revised version?
> >
> > I'd slightly prefer 2to3 in do-extract (plus drop MODPY_BUILDDEP=No),
> > but I'm ok with either.
> >
>
> okay, here is that version instead.
thanks, OK sthen.
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/net/tacacs+/Makefile,v
> diff -u -p -u -r1.25 Makefile
> --- Makefile 27 Sep 2023 14:18:34 -0000 1.25
> +++ Makefile 19 Feb 2024 15:44:35 -0000
> @@ -4,7 +4,7 @@ V = 4.0.4.28
> DISTNAME = tacacs-F${V}
> PKGNAME = tacacs+-${V}
> EPOCH = 0
> -REVISION = 1
> +REVISION = 2
>
> SHARED_LIBS += tacacs 1.0
>
> @@ -20,7 +20,7 @@ WANTLIB += c pthread
> SITES = ftp://ftp.shrubbery.net/pub/tac_plus/
>
> MODULES = lang/python
> -MODPY_VERSION = ${MODPY_DEFAULT_VERSION_2}
> +
> MODPY_ADJ_FILES = do_auth.py
>
> BUILD_DEPENDS = devel/bison
> @@ -35,6 +35,9 @@ CONFIGURE_ARGS = --with-libwrap=no \
> CONFIGURE_ENV = ac_cv_lib_pam_pam_start=false \
> MAKE=/usr/bin/make \
> YACC=bison
> +
> +post-extract:
> + cd ${WRKSRC} && 2to3 -w do_auth.py
>
> post-install:
> ${INSTALL_DATA} ${FILESDIR}/tac_plus.conf.sample ${PREFIX}/share/tacacs
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/net/tacacs+/pkg/PLIST,v
> diff -u -p -u -r1.12 PLIST
> --- pkg/PLIST 8 Nov 2022 11:17:02 -0000 1.12
> +++ pkg/PLIST 19 Feb 2024 15:44:35 -0000
> @@ -3,7 +3,7 @@
> @extraunexec rm -f /var/log/tac_plus/*
> @rcscript ${RCDIR}/tac_plus
> include/tacacs.h
> -lib/libtacacs.a
> +@static-lib lib/libtacacs.a
> lib/libtacacs.la
> @lib lib/libtacacs.so.${LIBtacacs_VERSION}
> @man man/man5/tac_plus.conf.5
>
switch tacacs+ to python3