rpms/cups/F-9 cups.spec,1.440,1.441

Tim Waugh twaugh at fedoraproject.org
Mon Apr 27 15:46:37 UTC 2009


Author: twaugh

Update of /cvs/pkgs/rpms/cups/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2761

Modified Files:
	cups.spec 
Log Message:
* Mon Apr 27 2009 Tim Waugh <twaugh at redhat.com> 1:1.3.10-3
- Adjust cupsd.conf by adding "ServerAlias *" automatically on upgrade
  (part of bug #497301).  The default cupsd.conf now includes this
  line as well.



Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-9/cups.spec,v
retrieving revision 1.440
retrieving revision 1.441
diff -u -r1.440 -r1.441
--- cups.spec	26 Apr 2009 12:24:27 -0000	1.440
+++ cups.spec	27 Apr 2009 15:46:06 -0000	1.441
@@ -267,6 +267,16 @@
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/ppd
 ln -s ../../ppd $RPM_BUILD_ROOT%{_datadir}/cups/model/3-distribution
 
+# Disable Host: checking by default for compatibility.  The
+# ServerAlias directive was added in 1.3.10.
+cat <<"EOF" >> $RPM_BUILD_ROOT%{_sysconfdir}/cups/cupsd.conf
+
+# You should list each hostname alias used for this server so that it
+# can verify the correct name is used for it.  Using "ServerAlias *"
+# disables checking.
+ServerAlias *
+EOF
+
 # Remove unshipped files.
 rm -rf $RPM_BUILD_ROOT%{_mandir}/cat? $RPM_BUILD_ROOT%{_mandir}/*/cat?
 rm -f $RPM_BUILD_ROOT%{_datadir}/applications/cups.desktop
@@ -328,6 +338,21 @@
 fi
 exit 0
 
+%triggerpostun -- %{name} < 1:1.3.10-3
+if [ "$1" -gt 0 ]; then
+    CONF=%{_sysconfdir}/cups/cupsd.conf
+    if ! grep -q ServerAlias "$CONF"; then
+        cp -a "$CONF" "$CONF".rpmorig
+        cat <<"EOF" >> "$CONF"
+
+# You should list each hostname alias used for this server so that it
+# can verify the correct name is used for it.  Using "ServerAlias *"
+# disables checking.
+ServerAlias *
+EOF
+    fi
+fi
+
 %triggerin -- samba-client
 ln -sf ../../../bin/smbspool %{cups_serverbin}/backend/smb || :
 exit 0
@@ -451,6 +476,11 @@
 %{cups_serverbin}/daemon/cups-lpd
 
 %changelog
+* Mon Apr 27 2009 Tim Waugh <twaugh at redhat.com> 1:1.3.10-3
+- Adjust cupsd.conf by adding "ServerAlias *" automatically on upgrade
+  (part of bug #497301).  The default cupsd.conf now includes this
+  line as well.
+
 * Sun Apr 26 2009 Tim Waugh <twaugh at redhat.com> 1:1.3.10-2
 - Accept "Host: ::1" (bug #497393).
 - Accept Host: fields set to the ServerName value (bug #497301).




More information about the fedora-extras-commits mailing list