bro-pkg 1.0 available

bro-pkg 1.0 is now out and supports

* package unit testing [1]
* package dependencies [2]

I have no remaining major features planned, hence the 1.0. Hope it works well for everyone.

- Jon

[1] http://bro-package-manager.readthedocs.io/en/stable/package.html#test-command
[2] http://bro-package-manager.readthedocs.io/en/stable/package.html#depends

Great job, Jon!

One of the next steps now is moving our bro-plugins into packages,
I'll talk to the maintainers to get that started.

Robin

Hi Jon,

bro-pkg 1.0 is now out and supports

* package unit testing [1]

thanks for this. Are there any extra steps that one has to do for this to
work? I tried to activate it for my repository at
GitHub - 0xxon/zeek-sumstats-counttable: COUNTTABLE type for Zeek (Bro) sumstats that sums independently for string buckets, where the bro-pkg.meta
specifies

test_command = cd testing && btest -d

However, bro-pkg (version 1.0) seems to just ignore this:

$ bro-pkg install bro-sumstats-counttable
The following packages will be INSTALLED:
  bro/0xxon/bro-sumstats-counttable (0.0.2)

  Proceed? [Y/n] y
  Running unit tests for "bro/0xxon/bro-sumstats-counttable"
  error: failed to run tests for bro/0xxon/bro-sumstats-counttable:
  Package does not specify a test_command
  Proceed to install anyway? [Y/n] n

Am I doing something wrong here? Or is there a problem with the way that I
specify test_command? (The error message seems to indicate that it is just
not being identified though).

Johanna

Ah, and if you remember to specify --version master, things suddenly look
much better - ignore this :slight_smile:

Johanna

And - second followup - this time I think I am doing things right this
time.

On os-x, when trying to install using bro-pkg, I get the following output:

$ bro-pkg install bro-sumstats-counttable --version master
The following packages will be INSTALLED:
  bro/0xxon/bro-sumstats-counttable (master)

Proceed? [Y/n] y
Running unit tests for "bro/0xxon/bro-sumstats-counttable"
Traceback (most recent call last):
  File "/Users/johanna/venv/bin/bro-pkg", line 1635, in <module>
    main()
  File "/Users/johanna/venv/bin/bro-pkg", line 1631, in main
    args.run_cmd(manager, args, config)
  File "/Users/johanna/venv/bin/bro-pkg", line 314, in cmd_install
    error, passed, test_dir = manager.test(name, version)
  File "/Users/johanna/venv/lib/python2.7/site-packages/bropkg/manager.py", line 1622, in test
    bropath = os.path.dirname(stage_script_dir) + ':' + bropath
TypeError: coercing to Unicode: need string or buffer, NoneType found

The same happens with your bro-test-package.

Is there anything obvious that I am doing wrong?

Johanna

And as a followup - this happens because Bro was not in the path.

This really should give a nicer error message though (or abort before even trying to install).

Johanna

And another small thing: As build_command and test_command may contain
anything, another warning would be good in case the package metadata
specifies a command.

Jan