[Bro-Dev] #405: Broccoli's `make install` may clobber existing user-modified broccoli.conf

Bro Tracker bro at tracker.icir.org
Thu Feb 24 09:21:53 PST 2011


#405: Broccoli's `make install` may clobber existing user-modified broccoli.conf
-----------------------+------------------------
  Reporter:  jsiwek    |      Owner:  jsiwek
      Type:  Problem   |     Status:  new
  Priority:  Normal    |  Milestone:  Bro1.6
 Component:  Broccoli  |    Version:  git/master
Resolution:            |   Keywords:
-----------------------+------------------------

Comment (by jsiwek):

 The pitfalls I ran into before was with how to check whether to install
 /usr/local/etc/broccoli.conf if it doesn't exist.  I could either:

 1) check at `make install` time whether it doesn't exist and then copy it
 in place.

 This was kind of a hack because it "goes behind CMake's back".  For one
 thing, the file doesn't get recorded in the install_manifest.  I think
 there was another issue, but I can't remember it right now.

 2) check at `configure` time whether it doesn't exist and then schedule it
 to be installed by `make install`

 This seems like it would do as Craig expects.  But one potential issue I
 can see is that one might be confused about why a
 `/usr/local/etc/broccoli.conf` doesn't get installed after they do
 something like:

 {{{
 $ ./configure --prefix=/usr/local
 $ make
 $ make install
 $ make distclean
 $ ./configure --prefix=/usr/local
 $ rm /usr/local/etc/broccoli.conf
 $ make
 $ make install
 }}}

 I think failure in this case to install that file (but still installing a
 sample file) is more reasonable than clobbering an existing one so I'm
 going to do the following:

 * Have Broccoli's configure logic check for an existing
 `$PREFIX/etc/broccoli.conf` at configure time and don't schedule it for
 installation if it does
 * Always schedule a `$PREFIX/etc/broccoli.conf-sample` for installation
 * Modify the RPM and Mac packaging scripts to make sure to remove the
 whole `/opt/bro/` (the default prefix) directory so we don't accidentally
 create packages with a missing `$PREFIX/etc/broccoli.conf` (the way the
 packages get installed themselves should take care of not clobbering
 `$PREFIX/etc/broccoli.conf`)

-- 
Ticket URL: <http://tracker.icir.org/bro/ticket/405#comment:1>
Bro Tracker <http://tracker.icir.org/bro>
Bro Issue Tracker



More information about the bro-dev mailing list