Fixed paths in config migration %post script.

This commit is contained in:
Tim Waugh 2012-11-28 11:23:30 +00:00
parent 7800dede7e
commit 117b7ad17f

View File

@ -12,7 +12,7 @@
Summary: Common Unix Printing System Summary: Common Unix Printing System
Name: cups Name: cups
Version: 1.5.4 Version: 1.5.4
Release: 15%{?dist} Release: 16%{?dist}
License: GPLv2 License: GPLv2
Group: System Environment/Daemons Group: System Environment/Daemons
Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
@ -494,14 +494,14 @@ for keyword in AccessLog CacheDir ConfigFilePerm \
RequestRoot ServerBin ServerCertificate \ RequestRoot ServerBin ServerCertificate \
ServerKey ServerRoot SMBConfigFile StateDir \ ServerKey ServerRoot SMBConfigFile StateDir \
SystemGroup SystemGroupAuthKey TempDir User; do SystemGroup SystemGroupAuthKey TempDir User; do
if ! /usr/bin/grep -iq ^$keyword "$IN"; then continue; fi if ! /bin/grep -iq ^$keyword "$IN"; then continue; fi
copy=yes copy=yes
if /usr/bin/grep -iq ^$keyword "$OUT"; then if /bin/grep -iq ^$keyword "$OUT"; then
if [ "`/usr/bin/grep -i ^$keyword "$IN"`" == \ if [ "`/bin/grep -i ^$keyword "$IN"`" == \
"`/usr/bin/grep -i ^$keyword "$OUT"`" ]; then "`/bin/grep -i ^$keyword "$OUT"`" ]; then
copy=no copy=no
else else
/usr/bin/sed -i -e "s,^$keyword,#$keyword,i" "$OUT" /bin/sed -i -e "s,^$keyword,#$keyword,i" "$OUT"
fi fi
fi fi
if [ "$copy" == "yes" ]; then if [ "$copy" == "yes" ]; then
@ -512,11 +512,11 @@ for keyword in AccessLog CacheDir ConfigFilePerm \
EOF EOF
fi fi
/usr/bin/grep -i ^$keyword "$IN" >> "$OUT" /bin/grep -i ^$keyword "$IN" >> "$OUT"
copiedany=yes copiedany=yes
fi fi
/usr/bin/sed -i -e "s,^$keyword,#$keyword,i" "$IN" /bin/sed -i -e "s,^$keyword,#$keyword,i" "$IN"
done done
%systemd_post %{name}.path %{name}.socket %{name}.service %systemd_post %{name}.path %{name}.socket %{name}.service
@ -728,6 +728,9 @@ rm -f %{cups_serverbin}/backend/smb
%{_mandir}/man1/ipptool.1.gz %{_mandir}/man1/ipptool.1.gz
%changelog %changelog
* Wed Nov 28 2012 Tim Waugh <twaugh@redhat.com> 1:1.5.4-16
- Fixed paths in config migration %%post script.
* Mon Nov 26 2012 Tim Waugh <twaugh@redhat.com> 1:1.5.4-15 * Mon Nov 26 2012 Tim Waugh <twaugh@redhat.com> 1:1.5.4-15
- Apply upstream fix for CVE-2012-5519 (STR #4223, bug #875898). - Apply upstream fix for CVE-2012-5519 (STR #4223, bug #875898).
Migrate configuration keywords as needed. Migrate configuration keywords as needed.