[Bro-Dev] [JIRA] (BIT-1047) Delete old scripts before installing new ones

Jon Siwek (JIRA) jira at bro-tracker.atlassian.net
Tue Apr 1 09:47:07 PDT 2014

    [ https://bro-tracker.atlassian.net/browse/BIT-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16008#comment-16008 ] 

Jon Siwek commented on BIT-1047:

Do we still want to add this?
It would be kind of nice for 2.3. I just noticed again, that if you install the current master over an old 2.2 release you get errors. One of them is my fault - function definitions moved from the ssl bif file (which no longer exists) to the x509 bif file. If the ssl one continues hanging around, it leads to a "already defined" error when trying to start Bro.

I don't think deleting old scripts at install-time completely fixes this problem because {{base/bif/plugins/__load__.bro}} actually still has {{@load ./Bro_SSL.functions.bif.bro}} when that file is no longer supposed to be loaded (because technically it doesn't exist in the newer Bro version).  That is, we can remove stale scripts on install, but then it's still going to {{@load}} a file that doesn't exist and error out in a different way.  This is also not just an install-time problem, but you also get in this bad state if you try to run from the build dir, but have not done a {{make clean}} between the last time you build Bro and the time you built Bro w/ the SSL/X509 BIF changes in place.

So I think the actual bug is that {{base/bif/plugins/__load__.bro}} does not remove references to things that should no longer exist.  Whether or not to delete old scripts at install-time as suggested by this ticket should be unrelated.

> Delete old scripts before installing new ones
> ---------------------------------------------
>                 Key: BIT-1047
>                 URL: https://bro-tracker.atlassian.net/browse/BIT-1047
>             Project: Bro Issue Tracker
>          Issue Type: Improvement
>          Components: Bro
>            Reporter: Robin Sommer
>             Fix For: 2.4
> People keep having problems when they install a new Bro version 
> over the installation of an old one because scripts that have disappeared in the new version will keep sticking around from the previous installation. 
> We should simply remove the old scripts/base and scripts/policy before installing anything new. People aren't supposed to edit in there so that should be safe.

This message was sent by Atlassian JIRA

More information about the bro-dev mailing list