Accepting request 213436 from home:jsmeix:branches:Printing

fided the fixe for bnc#856731

OBS-URL: https://build.opensuse.org/request/show/213436
OBS-URL: https://build.opensuse.org/package/show/Printing/cups?expand=0&rev=273
This commit is contained in:
Johannes Meixner 2014-01-10 11:35:07 +00:00 committed by Git OBS Bridge
parent 53b9657b27
commit 2252af0198
2 changed files with 45 additions and 1 deletions

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Fri Jan 10 11:51:41 CET 2014 - jsmeix@suse.de
- Fix how to use CUPS' own fonts (bnc#856731). In ancient times
(see the below entry dated "Thu Aug 16 17:05:19 CEST 2001")
there was the idea to deviate from CUPS upstream and save
some disk space and do not install CUPS' own fonts.
CUPS' own fonts were removed and the CUPS font
directory was replaced by a symbolic link
/usr/share/cups/fonts -> ../ghostscript/fonts
because at that times the Ghostscript fonts had been the same
as CUPS' own fonts. In any case such a link is a fragile
non-future-proof interference because when either the Ghostscript
fonts or CUPS' own fonts change, linking them as same is wrong.
Since a long time the Ghostscript fonts do no longer work
for CUPS' particular needs but nobody noticed it until now.
But it is not possible with RPM to replace a directory by a
symbolic link or vice versa. This means /usr/share/cups/fonts
must stay forever as a symbolic link and the only way out is
to move CUPS' own fonts to an artificial surrogate directory
/usr/share/cups/CUPSfonts and have the symbolic link now
/usr/share/cups/fonts -> /usr/share/cups/CUPSfonts
-------------------------------------------------------------------
Wed Jan 8 16:07:44 CET 2014 - jsmeix@suse.de

View File

@ -15,7 +15,6 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cups
BuildRequires: dbus-1-devel
BuildRequires: fdupes
@ -384,6 +383,28 @@ make %{?_smp_mflags} CXX=g++
%install
make BUILDROOT=$RPM_BUILD_ROOT install
install -d -m755 $RPM_BUILD_ROOT/etc/init.d
# Use CUPS' own fonts (i.e. make CUPS work again in compliance with upstream).
# In ancient times (see the RPM changelog entry dated "Thu Aug 16 17:05:19 CEST 2001")
# there was the general opinion it would be a great idea to deviate from CUPS upstream
# and save some disk space and do not install CUPS' own fonts in CUPS' own font directory.
# Therefore CUPS' own fonts were removed and the CUPS font directory was replaced
# by a symbolic link /usr/share/cups/fonts -> ../ghostscript/fonts
# because at that times the Ghostscript fonts had been the same as CUPS' own fonts.
# In any case such a link is a fragile non-future-proof interference because when either
# the Ghostscript fonts or CUPS' own fonts change, linking them as same is wrong.
# Meanwhile (I don't know exactly since when but since a long time) the Ghostscript fonts
# do no longer work for CUPS' particular needs (CUPS has its own fonts because it needs them).
# Nobody noticed it until 2014 via https://bugzilla.novell.com/show_bug.cgi?id=856731
# But it is not possible with RPM to replace a directory by a symbolic link or vice versa
# see https://bugzilla.novell.com/show_bug.cgi?id=856731#c7
# and https://bugzilla.novell.com/show_bug.cgi?id=856731#c8
# This means /usr/share/cups/fonts must stay forever as a symbolic link
# and the only way out is to move CUPS' own fonts to an artificial
# surrogate directory /usr/share/cups/CUPSfonts and have the
# symbolic link /usr/share/cups/fonts -> /usr/share/cups/CUPSfonts:
pushd $RPM_BUILD_ROOT/usr/share/cups/
mv fonts CUPSfonts && ln -s CUPSfonts fonts
popd
# Source101: cups.init
install -m755 %{SOURCE101} $RPM_BUILD_ROOT/etc/init.d/cups
ln -sf ../../etc/init.d/cups $RPM_BUILD_ROOT/usr/sbin/rccups