Bug 106426

Summary: Privoxy port upgrade clobbers existing config file
Product: Ports & Packages Reporter: Pete Slagle <freebsd-stable>
Component: Individual Port(s)Assignee: Martin Wilke <miwi>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
privoxy-3.0.6-1.diff none

Description Pete Slagle 2006-12-06 22:00:32 UTC
Privoxy port clobbers existing config file

Upgrade of the www/privoxy port causes /usr/local/etc/privoxy/config to be lost when the upgrade process overwrites the existing version with a default version. Configuration information is lost.

Fix: 

When privoxy is upgraded, if /usr/local/etc/privoxy/config already exists, then install the default config file with a different name, e.g. "config.default", instead of overwriting the existing file.
How-To-Repeat: Install privoxy:
   su
   cd /usr/ports/www/privoxy
   make install clean

Customize privoxy with local settings:
   vi /usr/local/etc/privoxy/config

Upgrade privoxy:
   portupgrade -f privoxy

Note that local configuration settings have been clobbered:
   cat /usr/local/etc/privoxy/config
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-12-06 22:35:46 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 2 Fabian Keil 2006-12-09 21:19:16 UTC
The "clobbering" was documented in pkg-message.in.

Anyway, the attached update:

- Copies the config file as example file and
  leaves old versions unmodified. The rc script later
  copies the example if the config file is missing.
  (Requested by Pete Slagle)

- Makes the make output less noisy.

- Compiles with TOGGLE option disabled.
  (Thanks to Peter Thoenen for reporting)
Comment 3 Martin Wilke freebsd_committer freebsd_triage 2006-12-09 21:50:18 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

I'll take it.
Comment 4 Martin Wilke freebsd_committer freebsd_triage 2006-12-10 22:47:59 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!
Comment 5 dfilter service freebsd_committer freebsd_triage 2006-12-10 22:51:08 UTC
miwi        2006-12-10 22:47:05 UTC

  FreeBSD ports repository

  Modified files:
    www/privoxy          Makefile pkg-plist 
    www/privoxy/files    pkg-message.in privoxy.in 
  Added files:
    www/privoxy/files    patch-cgi.c patch-cgiedit.c 
  Log:
  - Copies the config file as example file and
    leaves old versions unmodified. The rc script later
    copies the example if the config file is missing.
  - Makes the make output less noisy.
  - Compiles with TOGGLE option disabled.
  - Bump PORTREVISION
  
  PR:             ports/106426
  Submitted by:   Pete Slagle<freebsd-stable@box559.com>
                  Fabian Keil <fk@fabiankeil.de> (maintainer)
  Approved by:    maintainer
  
  Revision  Changes    Path
  1.19      +19 -12    ports/www/privoxy/Makefile
  1.1       +15 -0     ports/www/privoxy/files/patch-cgi.c (new)
  1.1       +32 -0     ports/www/privoxy/files/patch-cgiedit.c (new)
  1.3       +13 -11    ports/www/privoxy/files/pkg-message.in
  1.2       +6 -1      ports/www/privoxy/files/privoxy.in
  1.7       +5 -3      ports/www/privoxy/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"