Re: update: education/anki-2.1.16

2020-07-04 Thread marfabastewart
Thank you for the continuing work on anki. However, I
am getting an error on -current now. After installing
with pkg_add -D snap,
I get

marfaba$ anki
Traceback (most recent call last):
  File "/usr/local/bin/anki", line 3, in 
import aqt
  File "/usr/local/lib/python3.7/site-packages/aqt/__init__.py", line 57, in 

from aqt import addcards, browser, editcurrent, stats, about, \
  File "/usr/local/lib/python3.7/site-packages/aqt/addcards.py", line 13, in 

import aqt.editor, aqt.modelchooser, aqt.deckchooser
  File "/usr/local/lib/python3.7/site-packages/aqt/editor.py", line 25, in 

import requests
ModuleNotFoundError: No module named 'requests'

I haven't tried to install the module separately.
This error occurs on several machines, including one
that started with no other packages, running

kern.version=OpenBSD 6.7-current (GENERIC) #313: Fri Jul  3 08:45:24 MDT 2020
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC

My python knowledge is very limited, but please let me know
if I can help in any way.






Re: net/flow-tools man pages, seg fault on improper command line input

2020-06-30 Thread marfabastewart
> Thanks, I've just fixed /etc/flow-tools/flow-tools and
> /usr/usr/local/bin/python2.7 in -current.

Thank you very much for your quick assistance!

I did find a few new problems:

Category:net/flow-tools
Environment:
Details : OpenBSD 6.7-current (GENERIC.MP) #306: Fri Jun 26 22:13:55 
MDT 2020
 
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
Architecture: OpenBSD.amd64
Description:

1. These man pages show formatting codes instead of man pages andrunning 
make shows errors with docbook-to-man:
flow-capture
flow-export
flow-header
flow-import
flow-nfilter
flow-report
flow-stat
flow-tools-examples
flow-xlate

2. Improper command line input can generate a segmentation fault.

How-To-Repeat:
1. man flow-capture, flow-export, ...
   To generate the make error: cd /usr/ports/net/flow-tools && make

snipped output:

Making all in docs
gmake[1]: Entering directory 
'/usr/ports/pobj/flow-tools-0.68.6/flow-tools-0.68.6/docs'
docbook-to-man flow-capture.sgml > flow-capture.1
nsgmls:/usr/local/share/sgml//docbook/dsssl/modular/catalog:28:0:W: DTDDECL 
catalog entries are not supported
Abort trap (core dumped)
docbook-to-man flow-cat.sgml > flow-cat.1
nsgmls:/usr/local/share/sgml//docbook/dsssl/modular/catalog:28:0:W: DTDDECL 
catalog entries are not supported

2. flow-cat ft-v05.xxx | flow-print -f -6
generates segmentation fault. The above extra hyphen for the 6 is a 
deliberate error.
flow-print -f 6 gives IP Accounting format.

Fix:
1. not sure. man pages are okay in previous versions

2. Instead of using atoi, perhaps use strtonum and errx in the getopt 
cases. There are
many calls to atoi, but I just tried to fix one in flow-print. I was unable 
to test
it though. I tried just removing doc from the Makefile MAKE_FLAGS SUBDIRS 
and apply
the patch below, but when I ran make install, it always seemed to install 
the code
without my patch. I'm sure that part is my fault, I just don't know how to 
correct it.
I tried:
cd /usr/ports/net/flow-tools
make patch
cd /usr/ports/pobj/flow-tools-0.68.6/flow-tools-0.68.6/src/flow-print.c
cp flow-print.c flow-print.c.orig
# edit file, then
cd /usr/ports/net/flow-tools
make update-patches
cd patches
cvs add patch-src-_flow-print_c
cd /usr/ports/net/flow-tools
cvs diff -uNp
make
make install

There may be other examples of input that would generate a segmentation 
fault.

My patch for what it's worth:

$OpenBSD$

Index: src/flow-print.c
--- src/flow-print.c.orig
+++ src/flow-print.c
@@ -28,6 +28,7 @@

 #include "ftconfig.h"
 #include 
+#include 

 #include 
 #include 
@@ -98,6 +99,7 @@ char **argv;
   int i, format_index, set_format, ret;
   int print_header, options, debug;
   char cc; /* comment character */
+  const char *errstr;

   /* init fterr */
   fterr_setid(argv[0]);
@@ -124,7 +126,9 @@ char **argv;
   break;

 case 'f': /* format */
-  format_index = atoi(optarg);
+  format_index = strtonum(optarg, 0, NFORMATS, &errstr);
+  if (errstr != NULL)
+   errx(1,"invalid report format number. %s : %s", errstr, optarg);
   set_format = 1;
   break;




net/flow-tools duplicate parts of path

2020-06-29 Thread marfabastewart
Synopsis:  duplicate parts of path for config files, flow-rptfmt
Category:  net/flow-tools
Environment:
  OpenBSD 6.7-current (GENERIC) #298: Sun Jun 28 13:05:49 MDT 2020
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
  Architecture: OpenBSD.amd64
  Machine   : amd64
Description:
  1. /usr/local/bin/flow-rptfmt starts with
  !/usr/usr/local/bin/python2.7 (two "/usr"s instead of one)

  2. There are also duplicate paths when calling flow-nfilter and maybe
  other programs. "/etc/flow-tools/flow-tools" instead of
  "/etc/flow-tools"

  3. (question) -- is splintered.net still up? I couldn't
  access it and email to get on the flow-tools mailing list at that
  domain also bounced). It's in flow-tools-0.68.6/README

How-To-Repeat:
  1. flow-cat ft-v05.2020-06-27.201501-0500 |flow-report

  2. $flow-cat ft-v05.2020-06-27.201501-0500 |flow-nfilter
  flow-nfilter: open(/etc/flow-tools/flow-tools/ip-prot.sym):
No such file or directory
  flow-nfilter: open(/etc/flow-tools/flow-tools/tcp-port.sym):
No such file or directory
  flow-nfilter: open(/etc/flow-tools/flow-tools/asn.sym):
No such file or directory
  flow-nfilter: open(/etc/flow-tools/flow-tools/tag.sym):
No such file or directory
  flow-nfilter: open(/etc/flow-tools/flow-tools/filter.cfg):
No such file or directory
  flow-nfilter: ftfil_load(): failed

Fix:
  1. work around: removing the extra /usr in flow-rptfmt shebang
  2. work around: create extra flow-tools dir under /etc/flow-tools.

  Maybe the github changes to lib/ftpathc.s on Mar 21, 2019 and to
  flow-rptfmt on Mar 20, 2019 have something to do with this.

  My 6.7 stable box doesn't have these problems. I first installed
  the package while running 6.5 stable or 6.6 stable though.

  Please let me know if I can help with testing.



Sent with ProtonMail Secure Email.