FreeBSD Port: bacula-1.32f5 updating destroys prior bacula conf files

Ben Bangert ben at
Thu May 13 18:25:04 PDT 2004

On May 13, 2004, at 6:15 PM, Michael Edenfield wrote:

> * Ben Bangert <ben at> [040513 20:28]:
>> Ummmmm
>> I ran portupgrade the other day on bacula. Christ was that a mistake. 
>> I
>> had the absurd idea that as portupgrade has always done with every 
>> port
>> thus upgraded, it would save a copy of the conf files for the port.
>> Prolly to .old or something.
> If upgrading the port removed your config files, then the port is most
> likely to blame, not portupgrade.  The only backups (AFAIK) that
> portupgrade keeps are old shared libraries, and if requested, a backup
> of the old packages.

Agreed, I didn't mean to imply this was the fault of portupgrade.

> The way most ports work (and SHOULD work), the port installs a "sample"
> copy of the config files as filename.conf.{sample,dist,default,etc}.  
> If
> there is no live copy of the config file present, and a config file is
> required, this sample is copied over.  Since the live config file is
> never part of the pkg-plist, it doesn't get removed during a pkg_delete
> or make deinstall.

Yes, this is the behavior I am used to. I was rather shocked to see the 
files deleted rather than saved.

> The bacula port looks like it does the exact opposite, for some reason.
> It includes the following in it's post-install target:
>         if [ -f ${PREFIX}/etc/ ]; then \
>                 ${ECHO_CMD} "etc/" >> ${TMPPLIST}; \
>         elif [ -f ${PREFIX}/etc/bconsole.conf ]; then \
>                 ${MV} ${PREFIX}/etc/bconsole.conf 
> ${PREFIX}/etc/bconsole.conf.sample; \
>                 ${ECHO_CMD} "etc/bconsole.conf.sample" >> ${TMPPLIST}; 
> \
>         fi
> If I'm reading that correctly, if there's an existing config file it
> will get moved out of the way on upgrade, and then (since it's now in
> the pkg-plist), REMOVED on uninstall.
> --Mike

Yep, and since portupgrade uninstalls, then installs the new one, the 
existing config files are wiped. I'm totally baffled why the bacula 
port does this. The biggest irony is that bacula is a BACKUP program. 

I'm restoring my backup catalog from the bacula backup volume, so I'll 
be able to restore my original config files. Hopefully the port can be 
fixed to avoid doing this. Or at the very least issue some kind of 
warning ala Postgresql indicating they should hit ctrl-C now to stop if 
they haven't backed up their config files.

Thanks for the input Mike,

- Ben

More information about the freebsd-ports mailing list