Bug 112863 - www/lynx-ssl overwrites configuration files
Summary: www/lynx-ssl overwrites configuration files
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Matuska
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-22 16:20 UTC by Ron Marnet
Modified: 2007-08-13 12:23 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ron Marnet 2007-05-22 16:20:04 UTC
lynx-ssl-2.8.6_4,1 overwrites the existing configuration files in /usr/local/etc:
Lynx.xfg and lynx.lss.  Should check whether $files are identical with $files.default and, if there are differences, only overwrite .default.

How-To-Repeat: (portpupgrade,make) ls /usr/local/etc/lynx*
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-05-22 22:44:58 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 2 Martin Matuska freebsd_committer freebsd_triage 2007-06-14 07:51:50 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mm

I'll take it.
Comment 3 Martin Matuska freebsd_committer freebsd_triage 2007-07-31 09:49:58 UTC
Here is a patch that solves this problem.
Changes:
- renamed lynx.cfg.default to lynx.cfg.sample (this naming is better,
it gets instaled from samples/)
- added lynx.lss.sample

Maintainer please approve.

Index: ports/www/lynx/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/lynx/Makefile,v
retrieving revision 1.125
diff -u -r1.125 Makefile
--- ports/www/lynx/Makefile    26 Jul 2007 17:09:40 -0000    1.125
+++ ports/www/lynx/Makefile    31 Jul 2007 08:40:10 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=    lynx
 PORTVERSION=    2.8.6.5
+PORTREVISION=    1
 PORTEPOCH=    1
 CATEGORIES=    www ipv6
 MASTER_SITES=    http://lynx.isc.org/current/ \
Index: ports/www/lynx/pkg-plist
===================================================================
RCS file: /home/pcvs/ports/www/lynx/pkg-plist,v
retrieving revision 1.20
diff -u -r1.20 pkg-plist
--- ports/www/lynx/pkg-plist    8 Jul 2007 17:19:33 -0000    1.20
+++ ports/www/lynx/pkg-plist    31 Jul 2007 08:40:10 -0000
@@ -1,8 +1,10 @@
 bin/lynx
-@unexec if [ -f %D/etc/lynx.cfg ] && cmp -s %D/etc/lynx.cfg
%D/etc/lynx.cfg.default; then rm -f %D/etc/lynx.cfg; fi
-etc/lynx.cfg.default
+@unexec if [ -f %D/etc/lynx.cfg ] && cmp -s %D/etc/lynx.cfg
%D/etc/lynx.cfg.sample; then rm -f %D/etc/lynx.cfg; fi
+etc/lynx.cfg.sample
 @exec if [ ! -f %D/etc/lynx.cfg ] ; then cp -p %D/%F %B/lynx.cfg; fi
-etc/lynx.lss
+@unexec if [ -f %D/etc/lynx.lss ] && cmp -s %D/etc/lynx.lss
%D/etc/lynx.lss.sample; then rm -f %D/etc/lynx.lss; fi
+etc/lynx.lss.sample
+@exec if [ ! -f %D/etc/lynx.lss ] ; then cp -p %D/%F %B/lynx.lss; fi
 @exec mkdir -p %D/share/lynx_help
 %%DOCSDIR%%/CHANGES
 %%DOCSDIR%%/COPYHEADER
Index: ports/www/lynx/files/patch-aa
===================================================================
RCS file: /home/pcvs/ports/www/lynx/files/patch-aa,v
retrieving revision 1.32
diff -u -r1.32 patch-aa
--- ports/www/lynx/files/patch-aa    15 Apr 2007 13:38:42 -0000    1.32
+++ ports/www/lynx/files/patch-aa    31 Jul 2007 08:40:10 -0000
@@ -1,35 +1,50 @@
---- makefile.in.orig    Mon Sep  4 07:25:39 2006
-+++ makefile.in    Fri Apr 13 16:35:28 2007
+--- makefile.in.orig    Mon Sep  4 01:25:39 2006
++++ makefile.in    Tue Jul 31 10:37:26 2007
 @@ -366,7 +366,9 @@
      else \
          cp $(srcdir)/lynx.cfg $(SYSCONFDIR)/lynx.tmp ; \
      fi'
 -    @echo Updating $(sysconfdir)/lynx.cfg to point to installed help-files
-+    @echo Updating $(srcdir)/lynx.cfg.default
++    @echo Updating $(srcdir)/lynx.cfg.sample
 +    @cp $(srcdir)/lynx.cfg $(srcdir)/lynx.tmp
-+    @echo Updating $(srcdir)/lynx.cfg.default to point to installed
help-files
++    @echo Updating $(srcdir)/lynx.cfg.sample to point to installed
help-files
      @ECHO_CC@sed    -e '/^HELPFILE:http/s!^!#!' \
          -e '/^#HELPFILE:file/s!#!!' \
          $(SYSCONFDIR)/lynx.tmp | \
-@@ -374,9 +376,10 @@
+@@ -374,9 +376,11 @@
      $(SHELL) $(scripts_dir)/cfg_path.sh lynx_doc  $(helpdir) | \
      sed    -e '/^HELPFILE:file/s!$$!$(COMPRESS_EXT)!' \
          -e
'/^HELPFILE:file/s!$(COMPRESS_EXT)$(COMPRESS_EXT)$$!$(COMPRESS_EXT)!' \
 -        >$(SYSCONFDIR)/lynx.cfg
 -    chmod 644 $(SYSCONFDIR)/lynx.cfg
-+        >$(SYSCONFDIR)/lynx.cfg.default
-+    chmod 644 $(SYSCONFDIR)/lynx.cfg.default
++        >$(SYSCONFDIR)/lynx.cfg.sample
++    chmod 644 $(SYSCONFDIR)/lynx.cfg.sample
      -rm -f $(SYSCONFDIR)/lynx.tmp
-+    -[ ! -f $(SYSCONFDIR)/lynx.cfg ] && $(INSTALL_DATA)
$(SYSCONFDIR)/lynx.cfg.default $(SYSCONFDIR)/lynx.cfg
++    -[ ! -f $(SYSCONFDIR)/lynx.cfg ] && $(INSTALL_DATA)
$(SYSCONFDIR)/lynx.cfg.sample $(SYSCONFDIR)/lynx.cfg
++    -[ ! -f $(SYSCONFDIR)/lynx.lss ] && $(INSTALL_DATA)
$(SYSCONFDIR)/lynx.lss.sample $(SYSCONFDIR)/lynx.lss
 
  LYHelp.h : help_files.sed LYHelp.hin
      @echo Creating $@
-@@ -398,7 +401,7 @@
+@@ -398,18 +402,17 @@
      $(SHELL) -c 'SHELL=$(SHELL) $(SHELL) $(scripts_dir)/cfg_defs.sh
$(srcdir)'
 
  install-cfg : $(SYSCONFDIR)
 -    @$(SHELL) $(scripts_dir)/install-cfg.sh "$(INSTALL_DATA)"
$(srcdir)/lynx.cfg $(SYSCONFDIR)/lynx.cfg
-+    @$(SHELL) $(scripts_dir)/install-cfg.sh "$(INSTALL_DATA)"
$(srcdir)/lynx.cfg $(SYSCONFDIR)/lynx.cfg.default
++    @$(SHELL) $(scripts_dir)/install-cfg.sh "$(INSTALL_DATA)"
$(srcdir)/lynx.cfg $(SYSCONFDIR)/lynx.cfg.sample
 
  install-lss : $(SYSCONFDIR)
-     -mv -f $(SYSCONFDIR)/lynx.lss $(SYSCONFDIR)/lynx.oldlss
+-    -mv -f $(SYSCONFDIR)/lynx.lss $(SYSCONFDIR)/lynx.oldlss
+-    $(INSTALL_DATA) $(srcdir)/samples/lynx.lss $(SYSCONFDIR)/lynx.lss
++    @$(INSTALL_DATA) $(srcdir)/samples/lynx.lss
$(SYSCONFDIR)/lynx.lss.sample
+
+ uninstall ::
+ @MSG_DIR_MAKE@    cd po && $(MAKE) CC="$(CC)" uninstall
+     -rm -f $(BINDIR)/lynx$x
+     -rm -f $(MANDIR)/lynx.1
+-    -rm -f $(SYSCONFDIR)/lynx.cfg
+-    -rm -f $(SYSCONFDIR)/lynx.lss
++    -rm -f $(SYSCONFDIR)/lynx.cfg.sample
++    -rm -f $(SYSCONFDIR)/lynx.lss.sample
+
+ uninstall \
+ uninstall-help ::
Comment 4 Martin Matuska freebsd_committer freebsd_triage 2007-07-31 10:01:19 UTC
State Changed
From-To: feedback->patched

Awaiting maintainer approval.
Comment 5 dfilter service freebsd_committer freebsd_triage 2007-08-13 12:16:30 UTC
mm          2007-08-13 11:16:24 UTC

  FreeBSD ports repository

  Modified files:
    www/lynx             Makefile pkg-plist 
    www/lynx/files       patch-aa 
  Log:
  - Introduce lynx.cfg.sample and lynx.lss.sample
  - Do not delete/overwrite lynx.lss if changed
  
  PR:             ports/112863
  Patch by:       mm
  Approved by:    maintainer (timeout), garga (mentor, implicit)
  
  Revision  Changes    Path
  1.126     +1 -0      ports/www/lynx/Makefile
  1.33      +26 -11    ports/www/lynx/files/patch-aa
  1.21      +5 -3      ports/www/lynx/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"
Comment 6 Martin Matuska freebsd_committer freebsd_triage 2007-08-13 12:22:34 UTC
State Changed
From-To: patched->closed

Commited on maintainer timeout, thanks!