Bug 192403 - sysutils/backuppc overwrites config files upon upgrade
Summary: sysutils/backuppc overwrites config files upon upgrade
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: William Grzybowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-05 15:23 UTC by viq
Modified: 2014-08-26 16:05 UTC (History)
4 users (show)

See Also:


Attachments
set NO_PACKAGE, bump portrevision (568 bytes, patch)
2014-08-12 07:45 UTC, Alexander Moisseev
moiseev: maintainer-approval+
Details | Diff
patch: add update script, change port options (15.89 KB, patch)
2014-08-26 06:38 UTC, Alexander Moisseev
moiseev: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description viq 2014-08-05 15:23:42 UTC
Every update of backuppc package results in the config files (at the very least config.pl and hosts) being overwritten.
Comment 1 John Marino freebsd_committer freebsd_triage 2014-08-05 16:23:07 UTC
hmm, it seems like it's trying to do the right thing (pkg-plist):
@unexec if cmp -s %D/%%ETCDIR%%/config.pl %D/%%ETCDIR%%/config.pl.sample; then rm -f %D/%%ETCDIR%%/config.pl; fi
3	@unexec if cmp -s %D/%%ETCDIR%%/hosts %D/%%ETCDIR%%/hosts.sample; then rm -f %D/%%ETCDIR%%/hosts; fi
4	@rmtry %%ETCDIR%%/config.pl.sample
5	@rmtry %%ETCDIR%%/hosts.sample


Notifying maintainer in CC
Comment 2 Alexander Moisseev 2014-08-05 17:32:12 UTC
Unfortunately it is by BackupPC's design. All-in-one configuration and installation script configure.pl should analyze the configuration files and change them as required for a new BackupPC version.

You can find explanation here:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=189799#c3

Do you have any real problem with configuration files?
Any feedback or suggestions is appreciated.
Comment 3 viq 2014-08-11 13:33:44 UTC
I did some testing, and upgrading/reinstalling via port overwrites config files but preserves old versions, while upgrading via package (which changes options, I enabled eg. RRD) just nukes the old config.
Comment 4 Alexander Moisseev 2014-08-11 14:24:21 UTC
I have reproduced the issue with package. I'll have to check this out further.
Comment 5 Alexander Moisseev 2014-08-12 07:45:45 UTC
Created attachment 145699 [details]
set NO_PACKAGE, bump portrevision

If the package built on another host, it overwrites configuration files with that host's configuration files (or with default configuration files if built on a clean system).

I propose to block package building temporarily until good solution will be found.
Comment 6 John Marino freebsd_committer freebsd_triage 2014-08-12 10:06:19 UTC
maintainer provided patch, move to patch-ready
Comment 7 commit-hook freebsd_committer freebsd_triage 2014-08-13 09:46:32 UTC
A commit references this bug:

Author: marino
Date: Wed Aug 13 09:46:01 UTC 2014
New revision: 364771
URL: http://svnweb.freebsd.org/changeset/ports/364771

Log:
  sysutils/backuppc: Don't build package until config file overwrite is solved

  This port will overwrite config files if the package is built on another
  host.  Disable package building to avoid configuration file overwrites
  until a better solution can be found.

  PR:		192403
  Submitted by:	viq
  Band-aid by:	maintainer (Alexander Moisseev)

Changes:
  head/sysutils/backuppc/Makefile
Comment 8 John Marino freebsd_committer freebsd_triage 2014-08-13 09:47:10 UTC
As this was only a temporary measure and the issue still exists, move status back to "open"
Comment 9 Alexander Moisseev 2014-08-26 06:38:31 UTC
Created attachment 146290 [details]
patch: add update script, change port options

The attached patch fixes the issue.

Changes:
- Remove config files manipulation stuff
- Add configuration create/update script
- Remove NO_PACKAGE
- Remove unnecessary patch patch-configure.pl
- Change port options
- Bump port revision

https://redports.org/buildarchive/20140821122613-28908/
Comment 10 John Marino freebsd_committer freebsd_triage 2014-08-26 06:47:32 UTC
moving back to patch-ready to complete the fix.
Comment 11 commit-hook freebsd_committer freebsd_triage 2014-08-26 14:11:53 UTC
A commit references this bug:

Author: wg
Date: Tue Aug 26 14:11:31 UTC 2014
New revision: 366216
URL: http://svnweb.freebsd.org/changeset/ports/366216

Log:
  sysutils/backuppc: do not overwrite config files

  PR:		192403
  Submitted by:	maintainer

Changes:
  head/sysutils/backuppc/Makefile
  head/sysutils/backuppc/files/patch-configure.pl
  head/sysutils/backuppc/files/pkg-message.in
  head/sysutils/backuppc/pkg-plist
Comment 12 commit-hook freebsd_committer freebsd_triage 2014-08-26 14:42:55 UTC
A commit references this bug:

Author: wg
Date: Tue Aug 26 14:42:38 UTC 2014
New revision: 366218
URL: http://svnweb.freebsd.org/changeset/ports/366218

Log:
  sysutils/backuppc: add missing patches in last update

  PR:		192403

Changes:
  head/sysutils/backuppc/files/patch-update.pl
  head/sysutils/backuppc/files/update.sh.in