Sunday, September 23, 2018

Re: update net/py-snmp to 4.4.6 and add py3 flavor

On 2018/09/23 20:34, Adam Wolk wrote:
> On Sun, Sep 23, 2018 at 06:31:14PM +0100, Stuart Henderson wrote:
> > On 2018/09/22 23:00, Adam Wolk wrote:
> > > Hi ports@,
> > >
> > > I found out that our net/py-snmp library is broken, I wrongly
> > > assumed it was just how security/routersploit used the lib or
> > > the version it expected so waited for the 3.0 release.
> > >
> > > Long story short, I started updating routersploit to 3.0 which
> > > is python3 only so approached adding that flavor to py-snmp
> > > while doing that I confirmed it doesn't work with the quickstart
> > > examples from py-snmp homepage - see [1] for a transcript so
> > > moved forward with a full update to the latest upstream version.
> > >
> > > I'm attaching an update to the port with the following changes:
> > >
> > > 1. consistent whitespace
> > > 2. version update from 4.3.2 -> 4.4.6
> > > 3. new HOMEPAGE
> > > 4. project moved from sourceforge to github & pypi
> > > 5. grabbing MAINTAINER
> > > 6. adding py3 flavor
> > > 7. removing a trailing space
> > >
> > > I tested this against the quickstart examples both from python2.7
> > > and python3 - both work.
> >
> > The PLIST is a bit messed up (missing directories and missing ${MODPY_COMMENT}
> > for the python3-only directories), here is a diff to apply on top of yours.
> > If this fixes things with routersploit then OK with me (there are no other
> > users in tree).
> >
>
> Committed, thanks!
>
> I indeed had some issues with it and forcing portcheck to be happy. Thanks
> for the diff, I re-tested and it still works as expected unblocking work
> on updating routersploit.
>
> Regards,
> Adam
>

In general:

FLAVOR=python3 make plist
vi pkg/PLIST
/^.*MODPY_CACHE..$
i${MODPY_COMMENT}^[
and repeat until they're all done, and check over for things where there
will be a conflict between py2 and py3 versions.

(There is a sed one-liner floating around somewhere for the MODPY_COMMENT
thing but I usually do that in an editor so I can easily check the rest
as well).

No comments:

Post a Comment