# CBAN naming

**URL:** <https://community.zeek.org/t/cban-naming/4174>\
**Category:** Development\
**Tags:** development\
**Created:** [May 27, 2016, 5:00pm UTC](https://community.zeek.org/t/cban-naming/4174 "2016-05-27T17:00:45Z")\
**Posts on this page:** 19\
**Page:** 4

<div class="post-metadata">

**Author:** ![Azoff\_Justin\_S](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@Azoff\_Justin\_S](https://community.zeek.org/u/Azoff_Justin_S)\
**Post date:** [June 7, 2016, 2:32pm UTC](https://community.zeek.org/t/cban-naming/4174/61 "2016-06-07T14:32:19Z")

</div>

One thing to think about is a distinction between installed vs. enabled for scripts and plugins.

A good system that I have used is how debian sets things up for the apache configuration.

When you install the apache package they setup things like mods-available and mods-enabled directories:

root@b28027aa3d70:/# ls -l /etc/apache2/mods-available/|head  
total 524  
-rw-r--r-- 1 root root 100 Oct 24 2015 access\_compat.load  
-rw-r--r-- 1 root root 377 Oct 24 2015 actions.conf  
-rw-r--r-- 1 root root 66 Oct 24 2015 actions.load  
-rw-r--r-- 1 root root 843 Oct 24 2015 alias.conf  
-rw-r--r-- 1 root root 62 Oct 24 2015 alias.load

root@b28027aa3d70:/# ls -l /etc/apache2/mods-enabled/|head  
total 0  
lrwxrwxrwx 1 root root 36 Jun 7 13:46 access\_compat.load -\> ../mods-available/access\_compat.load  
lrwxrwxrwx 1 root root 28 Jun 7 13:46 alias.conf -\> ../mods-available/alias.conf  
lrwxrwxrwx 1 root root 28 Jun 7 13:46 alias.load -\> ../mods-available/alias.load  
lrwxrwxrwx 1 root root 33 Jun 7 13:46 auth\_basic.load -\> ../mods-available/auth\_basic.load

if I install the libapache2-mod-php5 package I end up with it enabled automatically:

root@b28027aa3d70:/# ls -l /etc/apache2/mods-\*/php\*  
-rw-r--r-- 1 root root 865 Apr 27 11:42 /etc/apache2/mods-available/php5.conf  
-rw-r--r-- 1 root root 59 Apr 27 11:42 /etc/apache2/mods-available/php5.load  
lrwxrwxrwx 1 root root 27 Jun 7 13:48 /etc/apache2/mods-enabled/php5.conf -\> ../mods-available/php5.conf  
lrwxrwxrwx 1 root root 27 Jun 7 13:48 /etc/apache2/mods-enabled/php5.load -\> ../mods-available/php5.load

but then can easily disable it without uninstalling it:

root@b28027aa3d70:/# a2dismod php5  
Module php5 disabled.  
To activate the new configuration, you need to run:  
&nbsp;&nbsp;service apache2 restart  
root@b28027aa3d70:/# ls -l /etc/apache2/mods-\*/php\*  
-rw-r--r-- 1 root root 865 Apr 27 11:42 /etc/apache2/mods-available/php5.conf  
-rw-r--r-- 1 root root 59 Apr 27 11:42 /etc/apache2/mods-available/php5.load

This is just hooked up in the apache config using

IncludeOptional mods-enabled/\*.load  
IncludeOptional mods-enabled/\*.conf

They also do this available/enabled setup for standalone conf files and sites(vhost configs)

The nice thing about this system is that the base installation can include standard modules that are present but not enabled by default:

root@b28027aa3d70:/# ls -l /etc/apache2/mods-\*/cgi.\*  
-rw-r--r-- 1 root root 58 Oct 24 2015 /etc/apache2/mods-available/cgi.load  
root@b28027aa3d70:/# a2enmod cgi  
root@b28027aa3d70:/# ls -l /etc/apache2/mods-\*/cgi.\*  
-rw-r--r-- 1 root root 58 Oct 24 2015 /etc/apache2/mods-available/cgi.load  
lrwxrwxrwx 1 root root 26 Jun 7 13:56 /etc/apache2/mods-enabled/cgi.load -\> ../mods-available/cgi.load

The directory/symlink thing is just one implementation, automatically editing a special .bro file and adding/removing lines would work too.

So, the way this could work is that '$TOOL install foo' could both 'install' and 'enable' 'foo' and '$TOOL disable foo' could disable it without removing it.

---

<div class="post-metadata">

**Author:** ![robin](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/robin/32/599_2.png) [@robin](https://community.zeek.org/u/robin)\
**Post date:** [June 7, 2016, 4:14pm UTC](https://community.zeek.org/t/cban-naming/4174/62 "2016-06-07T16:14:26Z")

</div>

Yep, I meant bro-pkg, the plural was just a typo.

Robin

---

<div class="post-metadata">

**Author:** ![Siwek\_Jon](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Siwek\_Jon](https://community.zeek.org/u/Siwek_Jon)\
**Post date:** [June 7, 2016, 5:55pm UTC](https://community.zeek.org/t/cban-naming/4174/63 "2016-06-07T17:55:14Z")

</div>

> So sounds like this proposal is something you can agree with?

Yes.

> > So scripts do not autoload, but plugins do?
> 
> Thinking more about that I would answer: yes.

Ack.

> > And if the process isn’t the same in both cases, is that also in  
> > conflict w/ the goal of a developer being able to promote a  
> > script-only thing into a binary plugin without users noticing?
> 
> Isn't that more about moving some functionality, like bifs? I don't  
> think a plugin would replace the scripts completely.

Yeah, I’m not seeing specific problems thinking about it more now.

> Ok, then let's rename "package" in the current docs. I propose  
> "module" as the replacement: it's not quite right regarding the  
> language's module concept but close enough I would say.

I’d appreciate if anyone would think a bit about whether “package” still actually makes sense to use in the current context and doesn’t actually need a rename.

My point about a package being something that can both require metadata and not require metadata might be clear enough to explain based on context? E.g. From Bro/BroControl’s point of a view packages don’t require metadata. From the package manager tool’s perspective, packages require metadata.

Seems like obvious/expected behavior from user’s view and not ambiguous?

- Jon

---

<div class="post-metadata">

**Author:** ![Siwek\_Jon](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Siwek\_Jon](https://community.zeek.org/u/Siwek_Jon)\
**Post date:** [June 7, 2016, 6:29pm UTC](https://community.zeek.org/t/cban-naming/4174/64 "2016-06-07T18:29:59Z")

</div>

> So, the way this could work is that '$TOOL install foo' could both 'install' and 'enable' 'foo' and '$TOOL disable foo' could disable it without removing it.

Yeah, that’s what I was thinking people would want/expect.

> The directory/symlink thing is just one implementation, automatically editing a special .bro file and adding/removing lines would work too.

Part of the process of installing the tool could be

&nbsp;&nbsp;echo @load bro-pkgs.bro \>\> $BRO\_INSTALL\_DIR/site/local.bro

Then the bro-pkgs.bro script just needs to be in BROPATH and the tool would automatically add/remove entries from it. That special script can be maintained in the same place where the tool is maintaining all its installed packages.

- Jon

---

<div class="post-metadata">

**Author:** ![robin](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/robin/32/599_2.png) [@robin](https://community.zeek.org/u/robin)\
**Post date:** [June 7, 2016, 6:34pm UTC](https://community.zeek.org/t/cban-naming/4174/65 "2016-06-07T18:34:32Z")

</div>

Yeah, ok, I can see that. Tieing it to local.bro takes care of my  
primary concern, that way it takes effect only when running through  
BroControl (or loading local.bro expliclty).

Robin

---

<div class="post-metadata">

**Author:** ![Siwek\_Jon](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Siwek\_Jon](https://community.zeek.org/u/Siwek_Jon)\
**Post date:** [June 8, 2016, 7:13pm UTC](https://community.zeek.org/t/cban-naming/4174/66 "2016-06-08T19:13:45Z")

</div>

I can always repose this later if I’m struggling w/ using it in the docs, but I have my head wrapped around the various contexts it can be used in now that the design is changed, so I’m not blocked on it.

I’d like to move forward w/ the following unless there’s still objections, open questions, or I misunderstood general consensus:

project name: Bro Package Manager  
client name: bro-pkg  
git repo name: bro-pkg  
design spec/proposal: use Robin's/Johanna’s  
top-level container name: packages  
changes to existing naming conventions: none

- Jon

---

<div class="post-metadata">

**Author:** ![Matthias\_Vallentin1](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/matthias_vallentin1/32/596_2.png) [@Matthias\_Vallentin1](https://community.zeek.org/u/Matthias_Vallentin1)\
**Post date:** [June 8, 2016, 10:32pm UTC](https://community.zeek.org/t/cban-naming/4174/67 "2016-06-08T22:32:47Z")

</div>

> project name: Bro Package Manager  
> client name: bro-pkg  
> git repo name: bro-pkg  
> design spec/proposal: use Robin's/Johanna’s  
> top-level container name: packages  
> changes to existing naming conventions: none

Looks good to me.

One question though: what is the top-level container name? Do you equate  
one package with one container, or does the plural "packages" signify  
something more collection-ish?

&nbsp;&nbsp;&nbsp;&nbsp;Matthias

---

<div class="post-metadata">

**Author:** ![robin](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/robin/32/599_2.png) [@robin](https://community.zeek.org/u/robin)\
**Post date:** [June 9, 2016, 3:01am UTC](https://community.zeek.org/t/cban-naming/4174/68 "2016-06-09T03:01:56Z")

</div>

Sounds good.

---

<div class="post-metadata">

**Author:** ![Siwek\_Jon](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Siwek\_Jon](https://community.zeek.org/u/Siwek_Jon)\
**Post date:** [June 9, 2016, 3:27pm UTC](https://community.zeek.org/t/cban-naming/4174/69 "2016-06-09T15:27:33Z")

</div>

> One question though: what is the top-level container name?

package

> Do you equate  
> one package with one container, or does the plural "packages" signify  
> something more collection-ish?

I see them as one to one. e.g. a person submits their “package” (singular container) to the community repo which will have many such “packages” in it that users will browse through and interact w/ on an individual basis.

- Jon

---

<div class="post-metadata">

**Author:** ![Siwek\_Jon](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Siwek\_Jon](https://community.zeek.org/u/Siwek_Jon)\
**Post date:** [June 9, 2016, 4:44pm UTC](https://community.zeek.org/t/cban-naming/4174/70 "2016-06-09T16:44:46Z")

</div>

I see benefits in two separate repos:

1) pull requests easier to verify — there won’t be client bug fixes mixed in w/ package submission requests.

2) easier to avoid accidental recursive submodule updates that go out and "fetch the world" — the client can add package repositories “git clone” instead of as submodules located directly in client’s git repo.

3) cleaner way for client to interface w/ multiple package collections if there ever comes to exist ones not maintained by the Bro project.

So repos can be:

&nbsp;&nbsp;client: bro-pkg  
&nbsp;&nbsp;community packages: bro-pkg-community

bro-pkg then would have a default URL that points to bro-pkg-community as it’s hosted on [bro.org](http://bro.org). It could also point to the bro-pkg-community github mirror, but I don’t see a reason for that. Just mentioning in case someone does.

- Jon

---

<div class="post-metadata">

**Author:** ![Matthias\_Vallentin1](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/matthias_vallentin1/32/596_2.png) [@Matthias\_Vallentin1](https://community.zeek.org/u/Matthias_Vallentin1)\
**Post date:** [June 9, 2016, 8:20pm UTC](https://community.zeek.org/t/cban-naming/4174/71 "2016-06-09T20:20:52Z")

</div>

> \> Do you equate one package with one container, or does the plural  
> \> "packages" signify something more collection-ish?
> 
> I see them as one to one.

Okay, that's what I was thinking as well.

&nbsp;&nbsp;&nbsp;&nbsp;Matthias

---

<div class="post-metadata">

**Author:** ![Matthias\_Vallentin1](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/matthias_vallentin1/32/596_2.png) [@Matthias\_Vallentin1](https://community.zeek.org/u/Matthias_Vallentin1)\
**Post date:** [June 9, 2016, 8:29pm UTC](https://community.zeek.org/t/cban-naming/4174/72 "2016-06-09T20:29:23Z")

</div>

> I see benefits in two separate repos:

Yep.

> &nbsp;&nbsp;client: bro-pkg  
> &nbsp;&nbsp;community packages: bro-pkg-community

I'm not sure if I understand the -community suffix. The client bro-pkg  
makes sense to me. But the first association I have with  
bro-pkg-community is a community-version of bro-pkg (i.e., the client).  
How about just "packages?" Forking github.com/bro/packages feels like a  
natural and understandable descriptor.

&nbsp;&nbsp;&nbsp;&nbsp;Matthias

---

<div class="post-metadata">

**Author:** ![johanna](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@johanna](https://community.zeek.org/u/johanna)\
**Post date:** [June 9, 2016, 8:34pm UTC](https://community.zeek.org/t/cban-naming/4174/73 "2016-06-09T20:34:12Z")

</div>

And to throw another idea in that is in line with this - what about calling the community package repository "packages" like matthias said and the client repository "package-manager"?

[github.com/bro/package-manager](http://github.com/bro/package-manager) also seems quite clear 🙂

Johanna

---

<div class="post-metadata">

**Author:** ![Siwek\_Jon](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Siwek\_Jon](https://community.zeek.org/u/Siwek_Jon)\
**Post date:** [June 9, 2016, 9:32pm UTC](https://community.zeek.org/t/cban-naming/4174/74 "2016-06-09T21:32:19Z")

</div>

> I'm not sure if I understand the -community suffix. The client bro-pkg  
> makes sense to me. But the first association I have with  
> bro-pkg-community is a community-version of bro-pkg (i.e., the client).

Was mostly thinking it’s nice to indicate some way in the name that the contents of the repo aren’t authored by the bro team. Doesn’t have to be a suffix, could be “bro-community-packages” or “community-packages”.

> How about just "packages?" Forking github.com/bro/packages feels like a  
> natural and understandable descriptor.

To me, a URL like that has a subtle implication that the packages are authored by the “bro” account, but that could be easy to clarify in the repo description: “These are packages contributed by the community”.

I like the “packages” + “package-manager” combo that Johanna suggests.

- Jon

---

<div class="post-metadata">

**Author:** ![Matthias\_Vallentin1](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/matthias_vallentin1/32/596_2.png) [@Matthias\_Vallentin1](https://community.zeek.org/u/Matthias_Vallentin1)\
**Post date:** [June 9, 2016, 11:26pm UTC](https://community.zeek.org/t/cban-naming/4174/75 "2016-06-09T23:26:07Z")

</div>

> I like the “packages” + “package-manager” combo that Johanna suggests.

+1

&nbsp;&nbsp;&nbsp;&nbsp;Matthias

---

<div class="post-metadata">

**Author:** ![Seth\_Hall3](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@Seth\_Hall3](https://community.zeek.org/u/Seth_Hall3)\
**Post date:** [June 15, 2016, 5:11am UTC](https://community.zeek.org/t/cban-naming/4174/76 "2016-06-15T05:11:07Z")

</div>

I like that too. It feels nice and clean.

&nbsp;&nbsp;.Seth

---

<div class="post-metadata">

**Author:** ![Seth\_Hall3](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@Seth\_Hall3](https://community.zeek.org/u/Seth_Hall3)\
**Post date:** [June 15, 2016, 5:23am UTC](https://community.zeek.org/t/cban-naming/4174/77 "2016-06-15T05:23:40Z")

</div>

I like the positioning of this because suddenly it suddenly feels very natural to explain the contents of a package (or whatever it ends up getting called).

&nbsp;&nbsp;.Seth

---

<div class="post-metadata">

**Author:** ![anthony\_kasza1](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@anthony\_kasza1](https://community.zeek.org/u/anthony_kasza1)\
**Post date:** [July 3, 2016, 2:11pm UTC](https://community.zeek.org/t/cban-naming/4174/78 "2016-07-03T14:11:50Z")

</div>

Just a heads up. It seems bpkg is no longer a unique name.  
[http://www.bpkg.io](http://www.bpkg.io)

-AK

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:43pm UTC](https://community.zeek.org/t/cban-naming/4174/79 "2022-05-06T15:43:43Z")

</div>

Closed on May 6, 2022, 3:43pm UTC



[Previous page](https://community.zeek.org/t/cban-naming/4174.md?page=3)
