forked from zeek/package-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGES
1976 lines (1119 loc) · 60 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2.13.0-26 | 2023-02-03 09:23:59 +0100
* Fix zkg bundled usage (Arne Welzel, Corelight)
This reverts commit 2b11486b09d76df40aafd411aae88cb5cf902850 which
naively moved imports above a sys.path.insert()...
Adapt flake8 to ignore those import warnings and add a test so hopefully
this won't happen again.
2.13.0-24 | 2023-01-17 14:29:45 -0800
* setup.cfg/pre-commit-config: Add flake8 hook and config (Arne Welzel, Corelight)
* zkg: Fix comparison with True (Arne Welzel, Corelight)
* zkg: Fix unused variables (Arne Welzel, Corelight)
* zkg: Imports at top of file (Arne Welzel, Corelight)
* manager: Bad logging invocatoins (Arne Welzel, Corelight)
* Remove CodeQL (Christian Kreibich, Corelight)
2.13.0-17 | 2023-01-10 12:54:54 -0800
* Replace manual nested loops with set operation. (Benjamin Bannier, Corelight)
* Make sure files are properly closed in `setup.py`. (Benjamin Bannier, Corelight)
* Automatically update Python sources to use python-3.7 syntax. (Benjamin Bannier, Corelight)
* Add `.git-blame-ignore-revs` file. (Benjamin Bannier, Corelight)
* Reformat Python code with Black. (Benjamin Bannier, Corelight)
* Add GH action to run pre-commit. (Benjamin Bannier, Corelight)
* Add pre-commit config. (Benjamin Bannier, Corelight)
2.13.0-9 | 2023-01-05 13:17:20 -0800
* Tweaks to appease CodeQL (Christian Kreibich, Corelight)
* Add CodeQL workflow for GitHub code scanning (LGTM Migrator)
2.13.0-5 | 2022-11-03 19:56:59 -0700
* Fix git complaint about unsafe use of file protocol in submodule test (Christian Kreibich, Corelight)
2.13.0-3 | 2022-10-27 16:05:46 -0700
* Add safe wrapper around tarfile.extractall() (Christian Kreibich, Corelight; Charles McFarland, Trellix)
* Newline whitespace tweaks for consistency, no actual change (Christian Kreibich, Corelight)
2.13.0 | 2022-06-01 01:18:25 -0700
* Release 2.13.0.
2.12.0-22 | 2022-06-01 01:18:08 -0700
* Add argcomplete support (Christian Kreibich, Corelight)
2.12.0-20 | 2022-04-28 14:12:23 -0700
* Adjust requirements.txt to use Sphinx 3+, and drop Napoleon (Christian Kreibich, Corelight)
* Switch to the sphinx-bundled version of the Napoleon add-on (Christian Kreibich, Corelight)
2.12.0-17 | 2022-04-25 10:36:42 -0700
* Add test to verify progress indicator behavior on TTYs (Christian Kreibich, Corelight)
* Remove diff-remove-install-ticks canonifier (Christian Kreibich, Corelight)
* Add InstallWorker.wait() method and switch progress-dot writers to it (Christian Kreibich, Corelight)
2.12.0-13 | 2021-11-04 16:39:58 -0700
* Request at least Sphinx 2.0 to avoid a dependency problem in RTD (Christian Kreibich, Corelight)
2.12.0-11 | 2021-11-01 11:20:36 -0700
* Expand initializer to set up repos also for our test templates (Christian Kreibich, Corelight)
* Improve template source info in fresh zkg.meta (Christian Kreibich, Corelight)
The zkg.meta of freshly created packages so far just said "source = <name>",
where <name> derived from the template's storage location (e.g. just
"package-template" for the standard template). We now report the origin URL if
the template comes with a git repo.
* Show precise commit info in template commit when instantiating from branch (Christian Kreibich, Corelight)
We previously just showed something like "version = master", which won't be
helpful over time. We now incude the exact commit when not installing from a
specific commit or tag.
* Remove "zeek-config --zeek_dist" requirement from two tests (Christian Kreibich, Corelight)
* Modernize cmake requirements in the rot13 plugin-package (Christian Kreibich, Corelight)
* Re-enable CI for the feature releases and use new Dockerfile (Christian Kreibich, Corelight)
* Rework Dockerfiles to using our binary packages (Christian Kreibich, Corelight)
* Add TEST-REQUIRES for zeek-config to three tests that require it (Christian Kreibich, Corelight)
2.12.0 | 2021-10-12 13:58:09 -0700
* Release 2.12.0.
2.11.0-18 | 2021-10-12 13:57:17 -0700
* Support testing package dependencies in Manager.test() (Christian Kreibich, Corelight)
* Interpolate test_command (Christian Kreibich, Corelight)
* Strengthen the installation-staging concept (Christian Kreibich, Corelight)
* Update baseline of test affected by new package install order (Christian Kreibich, Corelight)
* Consistently modify the environment during staging and testing (Christian Kreibich, Corelight)
* Install/upgrade packages in reverse dependency order (Christian Kreibich, Corelight)
* Ensure breadth-first reporting of new nodes in Manager.validate_dependencies() (Christian Kreibich, Corelight)
* Install executables during staging (Christian Kreibich, Corelight)
2.11.0-4 | 2021-08-16 14:04:35 -0700
* Accept `uninstall` as an alias for `remove`. (Benjamin Bannier, Corelight)
* Incorporate sphinx-argparse upstream fix for aliased commands (Christian Kreibich, Corelight)
2.11.0 | 2021-07-05 20:58:29 -0700
* Release 2.11.0.
2.10.0-10 | 2021-07-05 20:53:39 -0700
* Require zeek-config for two additional tests that will fail without it (Christian Kreibich, Corelight)
* Add --fail-on-aggregate-problems to the refresh command (Christian Kreibich, Corelight)
When provided (in addition to --aggregate), any package metadata processing
problems cause zkg to exit with error. Without the flag, such problems only
trigger a warning.
* Added resilience when specifying local paths as package git repos (Christian Kreibich, Corelight)
In addition to failing when a given path doesn't exist, the git.Repo()
constructor also fails when a given path exists but is not a git
repository. That scenario caused backtraces with package installs,
testing, and bundling when providing such invalid local paths.
We now check for this case and provide according output. This adds
guards for the install, test, and bundling commands, which are the
entry points for providing local URLs.
This also expands the test case for invalid repos.
* Fix crash in case the user enters just "zkg template" (Christian Kreibich, Corelight)
The output of "zkg template" (which will gain various commands over
time) now mirrors that when just saying "zkg". Also, the help output
in `zkg template --help` no longer double-mentions "template".
2.10.0 | 2021-06-21 19:51:19 -0700
* Release 2.10.0.
2.9.0-10 | 2021-06-21 19:08:22 -0700
* When zkg is bundled with Zeek, prepend Zeek's Python module path (Christian Kreibich, Corelight)
Prepending instead of appending ensures that the bundled zkg picks the
zeekpkg module shipped with Zeek, not any others available elsewhere
in Python's search path.
* Improve the package source refresh test (Christian Kreibich, Corelight)
This test now also verifies the "refresh --push" behavior. To do this
it makes the "remote" package source bare and verifies the log zkg
generates at the debug level, with a bit of additional canonification.
For better output filtering, the diff-remove-abspath canonifier now
recognizes whitespace (it's the same as used by Zeek), and
diff-remove-zkg-version now actually filters the current zkg version,
not just a related token that appeared in one test.
* Add logging to package source refreshes (Christian Kreibich, Corelight)
At log level INFO zkg now reports whether the local aggregate.meta was
dirty during a "refresh --push" and thus led to a commit; at log level
DEBUG it also reports the package additions/changes/drops that end up
in such a commit.
* Harden "@" interpretation in package source URLs (Christian Kreibich and Arne Welzel, Corelight)
urlparse parses scp-style git URLs ("[email protected]:foo/bar") crudely
as path-only URLs, exposing us to a risk of confusing user@ prefixes
with @version suffixes. We now look for scp-style URLs and transform
those explicitly to the "ssh://" schema to disambiguate.
2.9.0-1 | 2021-05-27 13:46:33 -0700
* Update Python requirement to 3.6+ (Jon Siwek, Corelight)
Some new code that came in with zkg 2.9.0 does indeed use Python
3.6 features (f-strings), but also early Python versions are generally
end-of-life already.
2.9.0 | 2021-05-18 15:07:05 -0700
* Release 2.9.0.
2.8.0-24 | 2021-05-18 15:06:32 -0700
* Add an baseline canonifier to user-mode btest (Jon Siwek, Corelight)
* Change templating API_VERSION to 1.0.0 (Jon Siwek, Corelight)
2.8.0-22 | 2021-05-18 13:13:17 -0700
* Minor docstring formatting improvements (Jon Siwek, Corelight)
* Add 'uservar' and 'template' modules to API docs (Jon Siwek, Corelight)
* Fix sphinxarg extension's use of old Sphinx logging API (Jon Siwek, Corelight)
2.8.0-19 | 2021-05-18 12:03:36 -0700
* Minor developer guide tweaks (Jon Siwek, Corelight)
2.8.0-18 | 2021-04-28 12:21:12 -0700
* Add "template info" command (Christian Kreibich, Corelight)
"template info" shows information about the provided template (or
the default), in either JSON or plaintext. This verifies whether
a given template is loadable and reports supported features,
user vars, and tagged versions.
* Provide default branch name in our git wrapper (Christian Kreibich, Corelight)
Newer git versions trigger a warning when the default branch name is
not set, which cluttered up the logs. This adds the default name,
preserving "master" since that branch name is currently visible in
test baselines.
* Add templating functionality to zkg toplevel script (Christian Kreibich, Corelight)
- Provide "zkg create" to instantiate a template, with optional
features and user vars for parameterization.
- ZKG_DEFAULT_TEMPLATE points at the default template repo,
https://github.com/zeek/package-template.
* Add a "slug" helper for user vars (Christian Kreibich, Corelight)
For templates it'll often be handy to render a variable value into a
file-system-safe identifier ("slug"). This provides uservar.slugify()
for this purpose.
* Add Zeek package templating module (Christian Kreibich, Corelight)
This provides infrastructure for structuring and instantiating Zeek
package templates. Templates are standalone git repos, managed as
follows:
- Template objects define package templates, including an output
directory, a specific package template, any additional features, and
parameters substituted when instantiating. Parameters derive from user
variables in a way defined by the template.
- The Package and Feature classes model template content and allow
validation of input parameters and instantiation of content. The
package class has additional functionality for initializing new
packages as git repos and adding template metadata to its zkg.meta.
- A hierarchy of exceptions accommodates template-specific problems.
These aren't currently imported into the zeekpkg namespace -- you need
to use zeekpkg.template.* when accessing those components.
* Add _util.load_source() for sourcing a Python script as a module (Christian Kreibich, Corelight)
Templates are driven by a toplevel __init__.py script, which we source
via this function.
* Prefill the prompt for user vars with current value (Christian Kreibich, Corelight)
This preserves the current model of allowing a quick hit of enter to
confirm the existing value, but also lets you empty out the value to
provide an empty string as the new value.
* Refactor user vars into their own class and module (Christian Kreibich, Corelight)
- Moves user-var functionality to a new uservar module and adds
UserVar, a class representing an individual user variable. These can
be created explicitly, parsed from a dict, or parsed from a NAME=VAL
string.
- Adds support for --user-arg NAME=VAL for the install, unbundle, and
upgrade commands. This can be provided repeatedly and lets you provide
user variables via the command line.
- Slightly tweaks the user prompt to accommodate situations other than
package installation.
* Migrate some git helpers to _util for broader access (Christian Kreibich, Corelight)
2.8.0 | 2021-03-26 16:50:59 -0700
* Release 2.8.0.
2.7.1-13 | 2021-03-26 16:50:20 -0700
* Check existence of executables only after the build process. (Robin Sommer, Corelight)
2.7.1-11 | 2021-03-24 18:05:00 -0700
* GH-101: include exception output in dependency import error messages (Jon Siwek, Corelight)
2.7.1-9 | 2021-03-24 15:38:03 -0700
* Add support for packages shipping executables. (Robin Sommer, Corelight)
This introduces a new "executables" metadata field that a package can
set to scripts or binaries that it wants to make available to users. On
package installation, zkg will link these executables into a new,
central "bin_dir" that users can put into their PATH. By default, that's
"<state>/bin", but it can be relocated through a corresponding "bin_dir"
entry in the configuration file. On package removal, these symlinks get
removed from "bin_dir". Users can automatically update their path
through something like PATH=$(zkg config bin_dir):$PATH.
2.7.1-7 | 2021-03-05 16:39:22 -0800
* Update plugin used in test suite for Zeek 4.1 compatibility (Jon Siwek, Corelight)
* Update test baselines to include btest header info (Jon Siwek, Corelight)
2.7.1-5 | 2021-03-05 15:56:09 -0800
* Prevent local githooks from interfering with zkg's commands (Christian Kreibich, Corelight)
This adds --no-verify during git commits and pushes to prevent githook
interference.
* Prevent local githooks from interfering with the testsuite (Christian Kreibich, Corelight)
This adds a git wrapper script that skips any git configuration done in
the user's home, including typical local git hooks.
* Update CI to test Zeek 4.0 and not test 3.2 anymore (Jon Siwek, Corelight)
2.7.1 | 2021-02-05 15:29:59 -0800
* Release 2.7.1.
2.7.0-2 | 2021-02-05 15:29:41 -0800
* Teach autoconfig command the --force option (Jon Siwek, Corelight)
Allows for skipping confirmation prompts
2.7.0 | 2021-01-25 12:05:08 -0800
* Release 2.7.0.
2.6.1-7 | 2021-01-25 11:54:28 -0800
* Documentation updates for user mode (Christian Kreibich, Corelight)
* Expand use of environment variables to override internal settings (Christian Kreibich, Corelight)
- ZKG_DEFAULT_SOURCE allows setting an alternative default package
source when https://github.com/zeek/packages isn't desirable. An
empty value causes no source to be defined.
- ZEEK_ZKG_CONFIG_DIR and ZEEK_ZKG_STATE_DIR allow overriding internal
storage locations configured during a Zeek-bundled install. This is
mainly to aid testing, so the help output does not include these.
* Suggest use of --user when zkg detects write-permission problems (Christian Kreibich, Corelight)
* Add user mode to zkg (Christian Kreibich, Corelight)
The --user flag forces zkg to manage state, including scripts and
plugin directories, in ~/.zkg. --user is mutually exclusive to
--configfile, and also overrides any ZKG_CONFIG_FILE environment
variable.
The flag exists for all commands, so you can also use e.g. autoconfig
to write out a config file with those settings. As before, "zkg env"
reports the environment variables required for operating Zeek with
these settings.
* Avoid reporting repeated paths in "zkg env" (Christian Kreibich, Corelight)
2.6.1 | 2021-01-06 21:35:39 -0800
* Release 2.6.1.
2.6.0-8 | 2021-01-06 21:33:22 -0800
* Remove unneeded Python module imports (Jon Siwek, Corelight)
* Remove excess argument to a string format() (Jon Siwek, Corelight)
* Remove an unreachable return statement (Jon Siwek, Corelight)
2.6.0-5 | 2021-01-06 21:02:09 -0800
* Fix missing argument to a function in dependency analysis logic (Jon Siwek, Corelight)
2.6.0-4 | 2021-01-06 20:52:13 -0800
* When installed as a subproject of Zeek, automatically add its bin/ to PATH (Christian Kreibich, Corelight)
This helps package installations succeed that require executables from
that directory, such as zeek-config.
2.6.0 | 2020-12-12 21:20:21 -0800
* Release 2.6.0.
2.5.0-12 | 2020-12-12 21:18:34 -0800
* Update quickstart docs to note zkg comes installed with Zeek 4.0.0+ (Jon Siwek, Corelight)
* Install zkg.1 man page as part of CMake builds (Jon Siwek, Corelight)
2.5.0-10 | 2020-12-12 20:21:32 -0800
* Support cmake-driven installation of zkg when bundled with Zeek (Christian Kreibich, Corelight)
This adds cmake-level templating of the toplevel zkg script to substitute
paths that let zkg find its own module. When installing independently,
this mechanism has no effect, since the zeekpkg module continues to be
found via usual PYTHONPATH mechanisms.
The templating also lets us adjust the default location of the config
and state directories, since in Zeek-bundled installs they are
separate.
2.5.0-8 | 2020-12-10 15:25:50 -0800
* Add explanatory error message to zkg for failed imports of dependencies (Jon Siwek, Corelight)
If the external gitpython or semantic-version dependencies aren't
available when running `zkg`, it now shows an error messages to explain
what's required and an example of how to install them.
2.5.0-7 | 2020-12-07 17:19:11 -0800
* Replace remaining use of Thread.isAlive with Thread.is_alive (Christian Kreibich, Corelight)
isAlive() has been deprecated for a while. Python 3.9 (Fedora 33's
default) no longer includes it, which broke the metadata-depends and
metadata-suggests tests.
2.5.0-4 | 2020-12-04 12:43:42 -0800
* Remove deprecated bro-pkg script and bropkg module (Jon Siwek, Corelight)
The PyPI bro-pkg package will also no longer be kept in sync with zkg.
* Simplify configparser imports/usages (Jon Siwek, Corelight)
* Remove future print_function imports (Jon Siwek, Corelight)
* Remove configparser from requirements.txt (Jon Siwek, Corelight)
2.5.0 | 2020-12-04 10:30:29 -0800
* Release 2.5.0.
2.4.2-9 | 2020-12-04 10:28:22 -0800
* Extend test suite to cover a package with a "main" default branch (Jon Siwek, Corelight)
As opposed to historical default of "master" being the convention.
* GH-76: Detect default branch name of packages automatically (Jon Siwek, Corelight)
Rather than use the hardcoded 'master' branch as the conventional
default, zkg will now attempt to select a package's default branch as
follows:
If there is a remote named 'origin' and it has a HEAD reference,
whatever branch that points to is taken to be the default branch.
If there is not a remote named 'origin' or it does not have a HEAD,
then the default branch is selected in this order: 'main' if it exists,
'master' if it exists, the currently active branch (HEAD) if there is
one, else the commit hash of the current detached head.
Note that zkg still prioritized release version tags, like 'v1.0.0',
over branches and the default branch selection logic only applies
when no such release version tag exists.
* Make test cases resilient to non-master default git branch names (Jon Siwek, Corelight)
2.4.2-5 | 2020-11-26 17:38:59 +0000
* Update pip invocations to use explicit `pip3` (Jon Siwek, Corelight)
* Remove Python compatibility logic for versions less than 3.5 (Jon Siwek, Corelight)
* Update Python invocations to use explicit `python3` (Jon Siwek, Corelight)
* Update documentation to reflect new minimum Python 3.5 requirement (Jon Siwek, Corelight)
2.4.2 | 2020-11-10 15:18:54 -0800
* Release 2.4.2.
2.4.1-5 | 2020-11-10 15:17:45 -0800
* Fix/improve dependency resolution failure messages (Jon Siwek, Corelight)
The no_best_version_string() function was incorrectly returning a tuple
instead of a string.
* GH-83: Fix branch-based dependency analysis for packages with no tags (Jon Siwek, Corelight)
Branch-based dependency analysis was incorrectly skipped for packages
that had no release version tags.
* GH-82: Enforce dependency requirements of already-installed packages (Jon Siwek, Corelight)
Treat as an error the installing a package that would break dependency
requirements of an already-installed package.
2.4.1 | 2020-11-03 14:55:16 -0800
* Release 2.4.1.
2.4.0-13 | 2020-11-03 14:52:09 -0800
* Improve "remove" operation to not unload already-unloaded dependencies (Jon Siwek, Corelight)
* Improve how "unload" operation manages dependencies (Jon Siwek, Corelight)
* Added a confirmation prompt for the "unload" operation
and a `--force` option to bypass it
* The confirmation prompt now lists all dependent packages that
will also be unloaded as part of the request
* Rename the "runtime dependency management" btest (Jon Siwek, Corelight)
* GH-78: Improve structure/output of "remove" operations (Jon Siwek, Corelight)
* Previously, the remove operation would indicate that all other
installed packages besides the one being removed were dependent
and needed to be unloaded. No such action would ever happen, it
was just incorrect/extraneous output.
* Previously, a second "Proceed?" prompt would appear (as part of the
logic to ask if it's alright to unload dependers) even if there's
only a single, independent package being removed.
* With this change, the entire set of depender-packages is gathered
up front to display both packages-to-remove and packages-to-unload
within the a single "Proceed?" prompt. This makes it clear what the
overall results of the remove operation will be right away rather than
prompt per package-to-remove asking just-in-time if it's ok to unload
dependers. That is, easier for user to make a single decision at the
start rather than find out midway that something isn't to their liking
and abort then, possibly leaving things in an undesirable state that
still needs sorting out.
This is also helps streamline the final output of the resulting
unload/remove operations which was previously hard to parse since it
included redundant information about which were unloaded and also
unimportant errors like saying a package couldn't be unloaded at a
certain point because it was still in use by another package except
that other package was later scheduled to also be unloaded, making
that error moot.
* Fix various docstring typos/mistakes (Jon Siwek, Corelight)
* GH-79: fix dependency-aware (un)loading logic to ignore "reserved" names (Jon Siwek, Corelight)
Both `Manager.load_with_dependencies()` and
`Manger.unload_with_unused_dependers()` previously could find a package
depending on "zeek" (or "zkg") and consider that as the name of a
package to (un)load as part of the operation and fail since they're not
real packages that are installed. Those operations now simply skip over
such reserved names when walking the dependency graph since there's
nothing to do for them.
2.4.0-2 | 2020-11-02 13:38:01 -0800
* Remove superfluous "fetch" during git cloning (Jon Siwek, Corelight)
Fetching tags used to be necessary for shallow clones, but that now
happens implicitly since changing to use `git clone --no-single-branch`
(which is also needed for zkg's branch-based version tracking).
A secondary `git fetch` after doing a shallow clone also has negative
effect of causing errors on older git versions (e.g. v1.8.3.1, currently
found in CentOS 7) since they prohibit fetching from a shallow clone.
2.4.0 | 2020-10-20 15:45:32 -0700
* Release 2.4.0.
2.3.1-2 | 2020-10-20 14:26:32 -0700
* GH-74: handle `git checkout` failures during `zkg refresh --aggregate` (Jon Siwek, Corelight)
Previously, a checkout failure caused the entire aggregation process
to fail, now it will just skip the offending package and later emit
a warning that it could not collect its associated metadata.
2.3.1-1 | 2020-10-20 13:37:16 -0700
* GH-75: show more warnings from `zkg refresh --aggregate` (Jon Siwek, Corelight)
Package metadata collection issues (e.g. missing metadata file) were not
previously surfaced (except when using `zkg -v` verbosity), but these
might always be interesting to know about for those performing the
aggregation themselves.
2.3.1 | 2020-09-25 12:24:47 -0700
* Release 2.3.1.
2.3.0-5 | 2020-09-25 12:22:22 -0700
* GH-70: When running tests, use any already installed dependencies (Robin Sommer, Corelight)
Rather than rebuilding them.
* Small tweak to -v to turn any count >= 3 into debug. (Robin Sommer, Corelight)
* Simplify installation thread "progress ticks" logic (Jon Siwek, Corelight)
And canonify the "runtime" test baseline to not depend on any particular
duration required to join() the installing-thread.
2.3.0 | 2020-09-21 16:50:10 -0700
* Release 2.3.0.
* Add `package_base` as a pre-defined configuration key for value interpolation.
This enables a package to gain access to files from another package in
a well-defined manner. For example, if package `foo` wants to access
file `xyz.cfg` from package "bar", it can now declate `bar` as a
dependency and then use `%(package_base)s/bar/xyz.cfg` from its
`build_command`. (Robin Sommer, Corelight)
2.2.1-2 | 2020-08-10 15:41:16 -0700
* Bump CI to use Zeek 3.2.0 (Jon Siwek, Corelight)
2.2.1 | 2020-08-04 18:20:09 -0700
* Release 2.2.1.
2.2.0-2 | 2020-08-04 17:56:08 -0700
* Improve zkg prompt for unloading of dependent packages (Jon Siwek, Corelight)
* Prevent a package that has no scripts from autoloading (Jon Siwek, Corelight)
If a package has no scripts, explicitly prevent it from being added to
the packages.zeek "autoloader" script since that won't ever work.
2.2.0 | 2020-07-07 14:45:41 -0700
* Release 2.2.0.
2.1.2-22 | 2020-07-07 14:44:57 -0700
* Fix Sphinx add_stylesheet deprecation (Jon Siwek, Corelight)
* Fix docstring for Manager.list_depender_pkgs() (Jon Siwek, Corelight)
2.1.2-20 | 2020-07-07 14:30:45 -0700
* Add runtime dependency checks for zkg (Mohan Dhawan, Corelight)
The "load", "unload" and "remove" operations now all analyze package
dependencies and prompt to any load/unload additional packages as needed
to satisfy dependencies.
2.1.2-2 | 2020-06-26 12:01:08 -0700
* Fix '"is" with a literal' warning in Python 3.8+ (Jon Siwek, Corelight)
2.1.2-1 | 2020-06-04 11:53:04 -0700
* Update docs for name change of Zeek's aux/ dir (Jon Siwek, Corelight)
2.1.2 | 2020-04-07 17:29:47 -0700
* Release 2.1.2.
2.1.1-3 | 2020-04-07 17:28:27 -0700
* Introduce basic package name validation (Arne Welzel, Corelight)
Installing a package called 'packages' doesn't work because of
implementation details (and its not sensible anyway).
This patch adds some light validation of package names. Besides the
reserved names "packages" and "package", it also rejects package names
with fronting and trailing whitespace.
2.1.1-1 | 2020-03-20 09:51:50 -0700
* GH-59: add note to quickstart doc about default pip user script dir (Jon Siwek, Corelight)
2.1.1 | 2020-03-20 09:28:39 -0700
* Release 2.1.1.
2.1.0-2 | 2020-03-20 09:26:02 -0700
* GH-60: Fixup urlparse() usage for Python 2 (Arne Welzel, Corelight)
(Support for end-of-life Python 2 is still planned to be removed shortly)
2.1.0 | 2020-03-18 15:39:50 -0700
* Release 2.1.0.
2.0.7-12 | 2020-03-18 15:37:52 -0700
* Add --extra-source command line parameter (Arne Welzel, Corelight)
Allow to specify sources without changing the config file. The current
approach allows overriding sources specified in the configuration file.
The option is added to the top-level parser, as a number of commands are
using the sources.
* Support `@` in source paths to denote branch/revision to use (Arne Welzel, Corelight)
Allow an `@` character in the path part of an URL to be used as a specifier
which branch/tag/commit to checkout. Shamelessly copied from `pip` where it
can be used to specify the revision of a dependency.
* Move git_checkout from manager to util (Arne Welzel, Corelight)
* Replace remove_trailing_slashes with rstrip('/') (Arne Welzel, Corelight)
2.0.7-5 | 2020-03-16 15:53:08 -0700
* Add Cirrus CI config (Jon Siwek, Corelight)
2.0.7-3 | 2020-02-24 10:12:39 -0800
* Add missing include header to plugin used for tests (Jon Siwek, Corelight)
* Do not expect SHELL in environment when running `zkg env` (Arne Welzel)
2.0.7 | 2019-10-14 11:56:18 -0700
* Release 2.0.7.
2.0.6-3 | 2019-10-14 11:53:46 -0700
* GH-55: Add fallback option to getting user_vars. (Vlad Grigorescu)
This generally fixes errors when installing packages that use "user_vars",
but the user's zkg config file doesn't have a corresponding key. And that
can happen simply by (separately) installing multiple packages that each
use "user_vars".
2.0.6 | 2019-09-20 13:06:48 -0700
* Release 2.0.6.
2.0.5-2 | 2019-09-20 13:03:11 -0700
* GH-54: improve error message for package test failures (Jon Siwek, Corelight)
* Improve debug logging for test_command (Jon Siwek, Corelight)
2.0.5 | 2019-09-18 16:16:21 -0700
* Release 2.0.5.
2.0.4-1 | 2019-09-18 16:09:19 -0700
* Improve dependency handling (Jon Siwek, Corelight)
It now won't report unsatisfiable dependencies between two nodes in the
dependency graph that are already installed. E.g. previously, if one
used the --nodeps flag to install package "foo" that had a failed
dependency on Zeek, then installing unrelated package "bar" without
--nodeps would emit an error about "foo" dependencies being
unsatisfiable even though that has no relation to the current operation.
2.0.4 | 2019-08-28 15:50:13 -0700
* Release 2.0.4.
2.0.3-2 | 2019-08-28 15:49:54 -0700
* Bugfix: incorrect arguments to Manager.has_plugin() (Christian Kreibich, Corelight)
2.0.3 | 2019-08-26 14:18:12 -0700
* Release 2.0.3.
2.0.2-2 | 2019-08-26 14:16:36 -0700
* When loading/unloading a Zeek package, also enable/disable any plugin (Christian Kreibich, Corelight)
This patch does this via renaming of the __bro_plugin__ magic file
that Zeek looks for when scanning ZEEK_PLUGIN_PATH. To disable a
plugin, zkg renames the file to __bro_plugin__.disabled, and renames
that file back to __bro_plugin__ when enabling.
2.0.2 | 2019-07-17 10:46:14 -0700
* Release 2.0.2.
2.0.1-2 | 2019-07-17 10:44:50 -0700
* Simplify how "current_hash" is determined for installed packages (Jon Siwek, Corelight)
For packages installed via version tag, this will also change the
meaning of "current_hash" from being the hexsha of the tag object itself
to the hexsha of the commit object pointed to by the tag.
2.0.1 | 2019-07-09 10:37:20 -0700
* Release 2.0.1.
2.0.0-1 | 2019-07-09 10:36:27 -0700
* Fix a broken link in docs (Jon Siwek, Corelight)
2.0.0 | 2019-06-11 19:33:36 -0700
* Release 2.0.0.
1.7.0-30 | 2019-06-11 19:33:13 -0700
* Fix version string replacement via update-changes (Jon Siwek, Corelight)
1.7.0-29 | 2019-06-11 19:26:22 -0700
* Update packaging scripts (Jon Siwek, Corelight)
The new name on PyPi will be "zkg", but a duplicate package (with
the same version number) under the old "bro-pkg" name is still
built and uploaded along with it.
* Change name of "bro_dist" Manager ctor arg to "zeek_dist" (Jon Siwek, Corelight)
Note this is a breaking API change for those that were creating
Manager objects using "bro_dist" as a named parameter.
* Add manager.zeekpath and manager.zeek_plugin_path methods (Jon Siwek, Corelight)
Same as manager.bropath and manager.bro_plugin_path.
* Rename internal util functions that had "bro" in them (Jon Siwek, Corelight)
* Replace "Bro" with "Zeek" in all documentation (Jon Siwek, Corelight)
* Replace "bro" usages in unit tests (Jon Siwek, Corelight)
* Support zkg.index files within package sources (Jon Siwek, Corelight)
bro-pkg.index files, if they exist within a package source, are also
still accepted and treated in the same way as before.
* Allow "zeek" and "zkg" in the "depends" metadata field (Jon Siwek, Corelight)
These are equivalent to the "bro" and "bro-pkg" dependencies that
already existed.
* Add preference for zkg.meta over bro-pkg.meta files (Jon Siwek, Corelight)
The new, preferred package metadata file name is zkg.meta, but we'll
still accept a bro-pkg.meta if that's all that exists.
* Add zeek_dist config option (Jon Siwek, Corelight)
This is treated the same way "bro_dist" worked, which is also still
used as a fallback if no "zeek_dist" value is set.
Package metadata files also now allow either "%(bro_dist)s" or
"%(zeek_dist)s" substitutions.
* Rename example config file to zkg.config (Jon Siwek, Corelight)
* Change default package source name/url from bro to zeek (Jon Siwek, Corelight)
* Change default config and state dirs to ~/.zkg (Jon Siwek, Corelight)
The old, default ~/.bro-pkg will still be used if it already exists
so users will be able to keep their current configurations without
having to start over from scratch.
* Add support for using zeek-config script (Jon Siwek, Corelight)
With fallback to using bro-config if it exists.
* Support new Zeek environment variables (Jon Siwek, Corelight)
- ZEEKPATH (BROPATH still used as fallback)
- ZEEK_PLUGIN_PATH (BRO_PLUGIN_PATH still used as fallback)
* Rename bro-pkg man page to zkg (Jon Siwek, Corelight)
* Allow ZKG_CONFIG_FILE environment variable (Jon Siwek, Corelight)
Same functionality as the old BRO_PKG_CONFIG_FILE (which is still
used as a fallback).
* Rename internal env. var. used by setup.py (Jon Siwek, Corelight)
* Remove gh-pages Makefile target (Jon Siwek, Corelight)
* Add zeekpkg module (Jon Siwek, Corelight)
The old bropkg module now emits deprecation warnings.
* Add zkg executable file (Jon Siwek, Corelight)
The bro-pkg script still exists as a wrapper that prints a deprecation
warning by default.
1.7.0-7 | 2019-05-03 19:59:57 -0700
* Improve test_command failure output (Jon Siwek, Corelight)
1.7.0-6 | 2019-04-26 10:22:58 -0700
* Fix error when upgrading from older bro-pkg (Jon Siwek, Corelight)
1.7.0-5 | 2019-04-25 18:20:58 -0700
* Fix unbundling packages that contain submodules (Jon Siwek, Corelight)
* Add more logging to unbundle process (Jon Siwek, Corelight)
1.7.0-3 | 2019-04-16 11:42:43 -0700
* Support .zeek file extension for upcoming Zeek 3.0 release (Daniel Thayer)
1.7.0 | 2019-04-12 09:27:36 -0700
* Release 1.7.0.
1.6.0-1 | 2019-04-12 09:24:54 -0700
* Add support for packages containing git submodules (Jon Siwek, Corelight)
1.6.0 | 2019-04-03 15:10:00 -0700
* Release 1.6.0.
1.5.6-3 | 2019-04-03 15:09:23 -0700
* Include bro-pkg.meta file info in the "bro-pkg info" output. (Christian Kreibich, Corelight)
* Track the full bro-pkg.meta filename in package.PackageInfo. (Christian Kreibich, Corelight)
1.5.6 | 2019-03-27 14:18:39 -0700
* Release 1.5.6.
1.5.5-1 | 2019-03-27 14:16:40 -0700
* GH-47: give more bro-pkg commands a non-zero exit code on fail (Jon Siwek, Corelight)
1.5.5 | 2019-03-27 13:53:59 -0700
* Release 1.5.5.
1.5.4-2 | 2019-03-27 13:52:12 -0700
* GH-47: give `bro-pkg install` non-zero exit code on failure (Jon Siwek, Corelight)
* Update documentation regarding --bro-dist (Jon Siwek, Corelight)
1.5.4 | 2019-03-21 20:17:31 -0700
* Release 1.5.4.
1.5.3-1 | 2019-03-21 20:12:41 -0700
* GH-46: fix --version to be able to use commit hash (Jon Siwek, Corelight)
1.5.3 | 2019-03-05 18:46:32 -0800