diff --git a/cups.spec b/cups.spec index 251d287..6ebff51 100644 --- a/cups.spec +++ b/cups.spec @@ -267,6 +267,16 @@ touch $RPM_BUILD_ROOT%{_sysconfdir}/cups/lpoptions 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 @@ if [ "$1" -ge "1" ]; then 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 @@ rm -rf $RPM_BUILD_ROOT %{cups_serverbin}/daemon/cups-lpd %changelog +* Mon Apr 27 2009 Tim Waugh 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 1:1.3.10-2 - Accept "Host: ::1" (bug #497393). - Accept Host: fields set to the ServerName value (bug #497301).