From johnmary@adelphia.net  Mon Aug  9 04:09:05 2004
Return-Path: <johnmary@adelphia.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id BC2F816A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  9 Aug 2004 04:09:05 +0000 (GMT)
Received: from mta10.adelphia.net (mta10.adelphia.net [68.168.78.202])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6E68443D31
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  9 Aug 2004 04:09:05 +0000 (GMT)
	(envelope-from johnmary@adelphia.net)
Received: from 68-234-62-219.losaca.adelphia.net ([68.234.62.219])
          by mta10.adelphia.net
          (InterMail vM.6.01.03.02 201-2131-111-104-20040324) with ESMTP
          id <20040809040905.VPV6319.mta10.adelphia.net@68-234-62-219.losaca.adelphia.net>
          for <FreeBSD-gnats-submit@freebsd.org>;
          Mon, 9 Aug 2004 00:09:05 -0400
Message-Id: <1092024541.0@68-234-62-219.losaca.adelphia.net>
Date: Sun, 8 Aug 2004 21:09:01 -0700
From: "John Merryweather Cooper" <johnmary@adelphia.net>
To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@freebsd.org>
Subject: [SW-BUG] Every update of print/cups-base overwrites the configuration files
X-Send-Pr-Version: gtk-send-pr 0.3.3 
X-GNATS-Notify:

>Number:         70195
>Category:       ports
>Synopsis:       [SW-BUG] Every update of print/cups-base overwrites the configuration files
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 09 04:10:21 GMT 2004
>Closed-Date:    Thu Aug 12 14:07:23 GMT 2004
>Last-Modified:  Thu Aug 12 14:07:23 GMT 2004
>Originator:     John Merryweather Cooper
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:


System: FreeBSD 5.2-CURRENT #17: Thu Aug  5 01:32:19 PDT 2004
    root@68-234-62-219.losaca.adelphia.net:/usr/obj/usr/src/sys/ATHLON-TBIRD



>Description:


To print graphics (i.e., from Gimp), or for best performance serving Windows clients, raw printing should be enabled.  The default for /usr/local/etc/cups/mime.convs and /usr/local/etc/cups/mime.types is to disable raw printing.  That's fine, only one line changes to each file are necessary to enable raw printing.  However, each recompile or update of print/cups-base overwrites these two files--disabling printing on my network.


>How-To-Repeat:


Convigure mime.convs and mime.types for raw printing.  Re-install print/cups-base and watch as it overwrites your configuration file--breaking your configuration--100% of the time.


>Fix:


Workaround:  I maintain backup copies of mime.convs and mime.types.  When print/cups-base overwrites these files, I overwrite the overwrites.  :)

A better solution would be to teach print/cups-base not to modify these files if they already exist.  These two files are crucial to a properly working CUPS server.



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: vs 
State-Changed-When: Tue Aug 10 12:37:39 GMT 2004 
State-Changed-Why:  
Forwarded PR to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=70195 

From: "Volker Stolz" <vs@freebsd.org>
To: freebsd-gnats-submit@freebsd.org, johnmary@adelphia.net,
	asa@gascom.ru
Cc:  
Subject: Re: ports/70195: [SW-BUG] Every update of print/cups-base overwrites the configuration files
Date: Tue, 10 Aug 2004 14:37:18 +0200

 John, it looks like there's some magic for this in the  
 post-install-target, although as you observe it isn't applied to mime*.
 
 Volker

From: Sergey Akifyev <asa@gascom.ru>
To: Volker Stolz <vs@freebsd.org>
Cc: freebsd-gnats-submit@freebsd.org, johnmary@adelphia.net
Subject: Re: ports/70195: [SW-BUG] Every update of print/cups-base
	overwrites the configuration files
Date: Thu, 12 Aug 2004 15:06:43 +0400

 --=-3TFlert6d0q0P1PVi/Of
 Content-Type: text/plain
 Content-Transfer-Encoding: quoted-printable
 
 On Tue, 2004-08-10 at 16:37, Volker Stolz wrote:
 I've applied this magick to mime.types and mime.convs .
 Look like previous maintainer thought it isn't necessary for theese
 files, because all users would use defaults. I don't see anything bad in
 checking theese files before overwriting, so here's the patch:
 
 =3D=3D=3D=3D[ cups-base.diff start
 diff -ruN cups-base.orig/Makefile cups-base/Makefile
 --- cups-base.orig/Makefile	Tue Aug  3 13:28:52 2004
 +++ cups-base/Makefile	Thu Aug 12 14:53:57 2004
 @@ -40,13 +40,10 @@
 =20
  post-install:
  	${MKDIR} ${CUPS_ETCDIR}
 -.for f in classes.conf client.conf cupsd.conf printers.conf
 +.for f in classes.conf client.conf cupsd.conf printers.conf mime.convs
 mime.types
  	${INSTALL_DATA} ${WRKSRC}/conf/${f} ${CUPS_ETCDIR}/${f}.N
  	cd ${CUPS_ETCDIR}; if test ! -f ${f}; then ${CP} -p ${f}.N ${f}; fi
  .endfor # classes.conf client.conf cupsd.conf printers.conf
 -.for f in mime.convs mime.types
 -	${INSTALL_DATA} ${WRKSRC}/conf/${f} ${CUPS_ETCDIR}/${f}
 -.endfor # mime.convs mime.types
  	cd ${CUPS_RCDIR}; ${MV} cups cups.sh.sample
  	${FIND} ${PREFIX}/man/cat* -type l -name '*.0' -delete
  	${MKDIR} ${CUPS_SPOOLDIR} ${CUPS_SPOOLDIR}/tmp
 diff -ruN cups-base.orig/pkg-plist cups-base/pkg-plist
 --- cups-base.orig/pkg-plist	Thu Mar 18 10:13:47 2004
 +++ cups-base/pkg-plist	Thu Aug 12 14:58:46 2004
 @@ -11,8 +11,12 @@
  @unexec if cmp -s %D/etc/cups/cupsd.conf.N %D/etc/cups/cupsd.conf; then
 rm -f %D/etc/cups/cupsd.conf; fi
  etc/cups/cupsd.conf.N
  @exec if test ! -f %D/etc/cups/cupsd.conf; then cp -p
 %D/etc/cups/cupsd.conf.N %D/etc/cups/cupsd.conf; fi
 -etc/cups/mime.convs
 -etc/cups/mime.types
 +@unexec if cmp -s %D/etc/cups/mime.convs.N %D/etc/cups/mime.convs; then
 rm -f %D/etc/cups/mime.convs; fi
 +etc/cups/mime.convs.N
 +@exec if test ! -f %D/etc/cups/mime.convs; then cp -p
 %D/etc/cups/mime.convs.N %D/etc/cups/mime.convs; fi
 +@unexec if cmp -s %D/etc/cups/mime.types.N %D/etc/cups/mime.types; then
 rm -f %D/etc/cups/mime.types; fi
 +etc/cups/mime.types.N
 +@exec if test ! -f %D/etc/cups/mime.types; then cp -p
 %D/etc/cups/mime.types.N %D/etc/cups/mime.types; fi
  @unexec if cmp -s %D/etc/cups/printers.conf.N
 %D/etc/cups/printers.conf; then rm -f %D/etc/cups/printers.conf; fi
  etc/cups/printers.conf.N
  @exec if test ! -f %D/etc/cups/printers.conf; then cp -p
 %D/etc/cups/printers.conf.N %D/etc/cups/printers.conf; fi
 =3D=3D=3D=3D[ cups-base.diff end
 
 --=20
 regards,
 Sergey Akifyev <asa@gascom.ru>
 JSC Gascom <http://www.gascom.ru>
 PGP key available from:
 ftp://ftp.gascom.ru/pub/PGP-keys/asa.txt
 
 --=-3TFlert6d0q0P1PVi/Of
 Content-Type: application/pgp-signature; name=signature.asc
 Content-Description: This is a digitally signed message part
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.5 (FreeBSD)
 
 iD8DBQBBG09Cbu06QwmNwNsRAitDAKCCNcLdlih9B3C45zm7YgeiamdYlwCeMkRG
 Qcb5nsSgQwztLAS1xj7lqdA=
 =Wixw
 -----END PGP SIGNATURE-----
 
 --=-3TFlert6d0q0P1PVi/Of--
 

From: Volker Stolz <stolz@i2.informatik.rwth-aachen.de>
To: Sergey Akifyev <asa@gascom.ru>
Cc: freebsd-gnats-submit@freebsd.org, johnmary@adelphia.net
Subject: Re: ports/70195: [SW-BUG] Every update of print/cups-base	overwrites the configuration files
Date: Thu, 12 Aug 2004 14:22:49 +0200

 On Thu, Aug 12, 2004 at 03:06:43PM +0400, Sergey Akifyev wrote:
 > checking theese files before overwriting, so here's the patch:
 
 The patch got munged (additional linebreaks), can you please resubmit
 it, preferably as an attchment?
 
 Volker
 -- 
 http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME
 L-Attriwutgrammatik
State-Changed-From-To: feedback->closed 
State-Changed-By: vs 
State-Changed-When: Thu Aug 12 14:07:10 GMT 2004 
State-Changed-Why:  
Fixed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=70195 
>Unformatted:
