From 0285777670977025bdbc981870de4d8b6ed3d0319e66f3f7063bfdbd0d2757e7 Mon Sep 17 00:00:00 2001 From: Johannes Meixner Date: Tue, 25 Sep 2012 13:58:30 +0000 Subject: [PATCH 1/6] Accepting request 135891 from home:jsmeix:branches:Printing fixed that it builds again everywhere and not only in openSUSE_Factory since the last careless change OBS-URL: https://build.opensuse.org/request/show/135891 OBS-URL: https://build.opensuse.org/package/show/Printing/ghostscript-fonts?expand=0&rev=5 --- ghostscript-fonts.changes | 10 ++++++++ ghostscript-fonts.spec | 49 +++++++++++++++++++++++++++++++++++---- 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/ghostscript-fonts.changes b/ghostscript-fonts.changes index 4b4d14f..24ec04e 100644 --- a/ghostscript-fonts.changes +++ b/ghostscript-fonts.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Sep 25 14:58:06 CEST 2012 - jsmeix@suse.de + +- Fix the negligent changes done by the below "prepare spec file + for dropping SuSEconfig.fonts" so that it builds again for + all released openSUSE versions (up to 12.2) because only + if suse_version > 1220 one can BuildRequire fontpackages-devel + which provides the RPM macros like reconfigure_fonts_post, + reconfigure_fonts_postun, and reconfigure_fonts_posttrans. + ------------------------------------------------------------------- Mon Aug 6 16:40:38 UTC 2012 - pgajdos@suse.com diff --git a/ghostscript-fonts.spec b/ghostscript-fonts.spec index 87cce04..b66463a 100644 --- a/ghostscript-fonts.spec +++ b/ghostscript-fonts.spec @@ -15,10 +15,13 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - Name: ghostscript-fonts BuildArch: noarch +# Prepare spec file for dropping SuSEconfig.fonts +# see https://features.opensuse.org/313536 +%if 0%{?suse_version} > 1220 BuildRequires: fontpackages-devel +%endif # t1utils is needed to convert PostScript Type 1 font program data (*.pfb) # to PostScript (*.pfa) so that ghostscript-fonts-std-8.11.patch can be applied # and afterwards back to PostScript Type 1 font program data: @@ -82,13 +85,13 @@ in the package ghostscript-fonts-std. Optional Fonts for Ghostscript in the package ghostscript-fonts-other. + %package std Summary: Basic Fonts for Ghostscript Group: Productivity/Publishing/PS PreReq: coreutils %suseconfig_fonts_prereq %description std - Several Type 1 basic PostScript fonts. Times, Helvetica, Courier, Symbol, etc. Contributed by URW++ Design and Development @@ -106,7 +109,6 @@ Group: Productivity/Publishing/PS Requires: ghostscript-fonts-std %description other - A miscellaneous set including Cyrillic, kana, and fonts derived from the free Hershey fonts, with improvements (such as @@ -116,10 +118,11 @@ from traditional printer or display fonts; you can read about them in more detail in the documentation on Hershey fonts. + %prep # Be quiet when unpacking and # create directory (and change to it) before unpacking Source0 and -# additionally unpack Source1 after changing directory +# additionally unpack Source1 after changing directory: %setup -q -c %{name}-%{version} -a 1 %build @@ -150,8 +153,15 @@ popd # Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe # see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets +# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_post: %post std +%if 0%{?suse_version} > 1220 %reconfigure_fonts_post +%else +if test -x sbin/conf.d/SuSEconfig.fonts +then %run_suseconfig -m fonts +fi +%endif if test -x sbin/conf.d/SuSEconfig.pango then %run_suseconfig -m pango fi @@ -159,21 +169,40 @@ exit 0 # Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe # see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets +# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_postun: %postun std +%if 0%{?suse_version} > 1220 %reconfigure_fonts_postun +%else +if test -x sbin/conf.d/SuSEconfig.fonts +then %run_suseconfig -m fonts +fi +%endif if test -x sbin/conf.d/SuSEconfig.pango then %run_suseconfig -m pango fi exit 0 +%if 0%{?suse_version} > 1220 +# Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe +# see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets +# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_posttrans: %posttrans std %reconfigure_fonts_posttrans exit 0 +%endif # Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe # see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets +# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_post: %post other +%if 0%{?suse_version} > 1220 %reconfigure_fonts_post +%else +if test -x sbin/conf.d/SuSEconfig.fonts +then %run_suseconfig -m fonts +fi +%endif if test -x sbin/conf.d/SuSEconfig.pango then %run_suseconfig -m pango fi @@ -181,16 +210,28 @@ exit 0 # Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe # see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets +# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_postun: %postun other +%if 0%{?suse_version} > 1220 %reconfigure_fonts_postun +%else +if test -x sbin/conf.d/SuSEconfig.fonts +then %run_suseconfig -m fonts +fi +%endif if test -x sbin/conf.d/SuSEconfig.pango then %run_suseconfig -m pango fi exit 0 +%if 0%{?suse_version} > 1220 +# Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe +# see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets +# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_posttrans: %posttrans other %reconfigure_fonts_posttrans exit 0 +%endif %files %defattr(-, root, root) From 6581548bdc1937bcc380333473d28b345de996a87682b69ea9ed614f4bddb1b9 Mon Sep 17 00:00:00 2001 From: Johannes Meixner Date: Wed, 26 Sep 2012 13:43:08 +0000 Subject: [PATCH 2/6] Accepting request 136090 from home:jsmeix:branches:Printing fixed bnc#778879 OBS-URL: https://build.opensuse.org/request/show/136090 OBS-URL: https://build.opensuse.org/package/show/Printing/ghostscript-fonts?expand=0&rev=6 --- ghostscript-fonts.changes | 9 +++++++++ ghostscript-fonts.spec | 10 +++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ghostscript-fonts.changes b/ghostscript-fonts.changes index 24ec04e..3bf52d9 100644 --- a/ghostscript-fonts.changes +++ b/ghostscript-fonts.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Sep 26 10:09:22 CEST 2012 - jsmeix@suse.de + +- Provide a link /usr/share/fonts/ghostscript which points to + /usr/share/ghostscript/fonts (the directory where Ghostscript + expects its fonts) to make the Ghostscript fonts also appear + in the directory /usr/share/fonts/ where applications + search for fonts (bnc#778879). + ------------------------------------------------------------------- Tue Sep 25 14:58:06 CEST 2012 - jsmeix@suse.de diff --git a/ghostscript-fonts.spec b/ghostscript-fonts.spec index b66463a..872f8a3 100644 --- a/ghostscript-fonts.spec +++ b/ghostscript-fonts.spec @@ -129,7 +129,9 @@ the documentation on Hershey fonts. # There is nothing to "make" as the sources contain plain font files. %install -# Install the fonts into the /usr/share/ghostscript/fonts/ directory, +# Install the fonts into the /usr/share/ghostscript/fonts/ directory +# which is the Ghostscript upstream standard directory where +# Ghostscript looks first and foremost for its fonts # see section "3.1 Fonts" in doc/Install.htm in the Ghostscript sources: FONT_INSTALL_DIR=%{buildroot}%{_datadir}/ghostscript/fonts install -d -m755 $FONT_INSTALL_DIR @@ -150,6 +152,11 @@ do t1binary $PFA > ${PFA%%.*}.pfb rm -vf $PFA done popd +# Provide a link to make the Ghostscript fonts also appear in the directory +# /usr/share/fonts/ where applications (including X11) search for fonts. +# A usr/share/fonts/ sub-directory does not exist in the buildroot: +install -d -m 755 %{buildroot}%{_datadir}/fonts +ln -s ../ghostscript/fonts %{buildroot}%{_datadir}/fonts/ghostscript # Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe # see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets @@ -240,6 +247,7 @@ exit 0 %files std %defattr(0644,root,root,0755) %verify(not md5 size mtime) %{_datadir}/ghostscript/fonts/fonts.* +%{_datadir}/fonts/ghostscript %dir %{_datadir}/ghostscript %dir %{_datadir}/ghostscript/fonts %{_datadir}/ghostscript/fonts/fonts.dir From 04881674079d5b76f7f4dbc33d210ea5f2d84264b62774a6ed9a43fc83860f3b Mon Sep 17 00:00:00 2001 From: Johannes Meixner Date: Thu, 27 Sep 2012 12:53:40 +0000 Subject: [PATCH 3/6] Accepting request 136231 from home:jsmeix:branches:Printing avoid an issue with /usr/sbin/Check in SLE11 SLE_11_SP1 SLE_11_SP2 to make it build again there OBS-URL: https://build.opensuse.org/request/show/136231 OBS-URL: https://build.opensuse.org/package/show/Printing/ghostscript-fonts?expand=0&rev=7 --- ghostscript-fonts.changes | 12 ++++++++++++ ghostscript-fonts.spec | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ghostscript-fonts.changes b/ghostscript-fonts.changes index 3bf52d9..809460e 100644 --- a/ghostscript-fonts.changes +++ b/ghostscript-fonts.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Thu Sep 27 13:22:44 CEST 2012 - jsmeix@suse.de + +- Using an absolute path as source in symbolic link in spec file + to avoid an issue with /usr/sbin/Check in SLE11, SLE_11_SP1, + and SLE_11_SP2 that would wrongly convert a relative path + ../ghostscript/fonts into a ../ghostscript/fonts.gz file. + Afterwards /usr/lib/rpm/brp-symlink converts it to a relative + path so that the binary RPM gets the intended symbolic link + /usr/share/fonts/ghostscript -> ../ghostscript/fonts + as intended (bnc#778879). + ------------------------------------------------------------------- Wed Sep 26 10:09:22 CEST 2012 - jsmeix@suse.de diff --git a/ghostscript-fonts.spec b/ghostscript-fonts.spec index 872f8a3..3f3cd4c 100644 --- a/ghostscript-fonts.spec +++ b/ghostscript-fonts.spec @@ -156,7 +156,7 @@ popd # /usr/share/fonts/ where applications (including X11) search for fonts. # A usr/share/fonts/ sub-directory does not exist in the buildroot: install -d -m 755 %{buildroot}%{_datadir}/fonts -ln -s ../ghostscript/fonts %{buildroot}%{_datadir}/fonts/ghostscript +ln -s %{_datadir}/ghostscript/fonts %{buildroot}%{_datadir}/fonts/ghostscript # Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe # see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets From 3b572b39d21cadb04486f653e7c59964dcfa65966ebf32b12175d276ae53ace3 Mon Sep 17 00:00:00 2001 From: Johannes Meixner Date: Fri, 28 Sep 2012 08:28:26 +0000 Subject: [PATCH 4/6] Add explanatory comment regarding absolute path as source in symbolic link to avoid an issue with /usr/sbin/Check in SLE11, SLE_11_SP1, and SLE_11_SP2 to spec file and fixed spelling in the matching entry in changes file. OBS-URL: https://build.opensuse.org/package/show/Printing/ghostscript-fonts?expand=0&rev=8 --- ghostscript-fonts.changes | 2 +- ghostscript-fonts.spec | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ghostscript-fonts.changes b/ghostscript-fonts.changes index 809460e..fde850b 100644 --- a/ghostscript-fonts.changes +++ b/ghostscript-fonts.changes @@ -8,7 +8,7 @@ Thu Sep 27 13:22:44 CEST 2012 - jsmeix@suse.de Afterwards /usr/lib/rpm/brp-symlink converts it to a relative path so that the binary RPM gets the intended symbolic link /usr/share/fonts/ghostscript -> ../ghostscript/fonts - as intended (bnc#778879). + (bnc#778879). ------------------------------------------------------------------- Wed Sep 26 10:09:22 CEST 2012 - jsmeix@suse.de diff --git a/ghostscript-fonts.spec b/ghostscript-fonts.spec index 3f3cd4c..7dbf921 100644 --- a/ghostscript-fonts.spec +++ b/ghostscript-fonts.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: ghostscript-fonts BuildArch: noarch # Prepare spec file for dropping SuSEconfig.fonts @@ -156,6 +157,12 @@ popd # /usr/share/fonts/ where applications (including X11) search for fonts. # A usr/share/fonts/ sub-directory does not exist in the buildroot: install -d -m 755 %{buildroot}%{_datadir}/fonts +# Using an absolute path as source in symbolic link to avoid an issue with /usr/sbin/Check +# in SLE11, SLE_11_SP1, and SLE_11_SP2 that would wrongly convert a relative +# path ../ghostscript/fonts into a ../ghostscript/fonts.gz file, +# see http://lists.opensuse.org/opensuse-packaging/2012-09/msg00239.html +# Afterwards /usr/lib/rpm/brp-symlink converts it to a relative path so that the binary RPM +# gets the intended symbolic link /usr/share/fonts/ghostscript -> ../ghostscript/fonts ln -s %{_datadir}/ghostscript/fonts %{buildroot}%{_datadir}/fonts/ghostscript # Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe From c1acd3b1c7cb3e0fd3261f25456d9f2a2b093ddf50172770c50e71563a87d6cf Mon Sep 17 00:00:00 2001 From: Johannes Meixner Date: Fri, 28 Sep 2012 09:26:57 +0000 Subject: [PATCH 5/6] - Have SuSEconfig.pango stuff in RPM scriptlets only if suse_version < 1220 because since openSUSE 12.2 there is no longer SuSEconfig.pango (see the "declined" comment of OBS submitrequest 136232). OBS-URL: https://build.opensuse.org/package/show/Printing/ghostscript-fonts?expand=0&rev=9 --- ghostscript-fonts.changes | 8 ++++++++ ghostscript-fonts.spec | 21 ++++++++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/ghostscript-fonts.changes b/ghostscript-fonts.changes index fde850b..9ab8593 100644 --- a/ghostscript-fonts.changes +++ b/ghostscript-fonts.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Sep 28 10:46:03 CEST 2012 - jsmeix@suse.de + +- Have SuSEconfig.pango stuff in RPM scriptlets only + if suse_version < 1220 because since openSUSE 12.2 + there is no longer SuSEconfig.pango (see the "declined" + comment of OBS submitrequest 136232). + ------------------------------------------------------------------- Thu Sep 27 13:22:44 CEST 2012 - jsmeix@suse.de diff --git a/ghostscript-fonts.spec b/ghostscript-fonts.spec index 7dbf921..a669e94 100644 --- a/ghostscript-fonts.spec +++ b/ghostscript-fonts.spec @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - Name: ghostscript-fonts BuildArch: noarch # Prepare spec file for dropping SuSEconfig.fonts @@ -167,7 +166,8 @@ ln -s %{_datadir}/ghostscript/fonts %{buildroot}%{_datadir}/fonts/ghostscript # Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe # see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets -# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_post: +# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_post. +# Since openSUSE 12.2 there is no SuSEconfig.pango (have it only in the scriptlet if suse_version < 1220): %post std %if 0%{?suse_version} > 1220 %reconfigure_fonts_post @@ -176,14 +176,17 @@ if test -x sbin/conf.d/SuSEconfig.fonts then %run_suseconfig -m fonts fi %endif +%if 0%{?suse_version} < 1220 if test -x sbin/conf.d/SuSEconfig.pango then %run_suseconfig -m pango fi +%endif exit 0 # Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe # see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets -# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_postun: +# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_postun. +# Since openSUSE 12.2 there is no SuSEconfig.pango (have it only in the scriptlet if suse_version < 1220): %postun std %if 0%{?suse_version} > 1220 %reconfigure_fonts_postun @@ -192,9 +195,11 @@ if test -x sbin/conf.d/SuSEconfig.fonts then %run_suseconfig -m fonts fi %endif +%if 0%{?suse_version} < 1220 if test -x sbin/conf.d/SuSEconfig.pango then %run_suseconfig -m pango fi +%endif exit 0 %if 0%{?suse_version} > 1220 @@ -208,7 +213,8 @@ exit 0 # Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe # see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets -# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_post: +# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_post. +# Since openSUSE 12.2 there is no SuSEconfig.pango (have it only in the scriptlet if suse_version < 1220): %post other %if 0%{?suse_version} > 1220 %reconfigure_fonts_post @@ -217,14 +223,17 @@ if test -x sbin/conf.d/SuSEconfig.fonts then %run_suseconfig -m fonts fi %endif +%if 0%{?suse_version} < 1220 if test -x sbin/conf.d/SuSEconfig.pango then %run_suseconfig -m pango fi +%endif exit 0 # Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe # see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets -# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_postun: +# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_postun. +# Since openSUSE 12.2 there is no SuSEconfig.pango (have it only in the scriptlet if suse_version < 1220): %postun other %if 0%{?suse_version} > 1220 %reconfigure_fonts_postun @@ -233,9 +242,11 @@ if test -x sbin/conf.d/SuSEconfig.fonts then %run_suseconfig -m fonts fi %endif +%if 0%{?suse_version} < 1220 if test -x sbin/conf.d/SuSEconfig.pango then %run_suseconfig -m pango fi +%endif exit 0 %if 0%{?suse_version} > 1220 From 4a4385b361bd95c8b343a74ce051039d2eae9fcd0ad6f458d0a52dfb25a44e90 Mon Sep 17 00:00:00 2001 From: Johannes Meixner Date: Fri, 28 Sep 2012 14:37:21 +0000 Subject: [PATCH 6/6] - Set the version is the same version as the current ghostscript package i.e. 9.06 because this ghostscript-fonts-* packages are the right ones for this Ghostscript version. OBS-URL: https://build.opensuse.org/package/show/Printing/ghostscript-fonts?expand=0&rev=10 --- ghostscript-fonts.changes | 7 +++++++ ghostscript-fonts.spec | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ghostscript-fonts.changes b/ghostscript-fonts.changes index 9ab8593..095ef80 100644 --- a/ghostscript-fonts.changes +++ b/ghostscript-fonts.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Sep 28 16:35:29 CEST 2012 - jsmeix@suse.de + +- Set the version is the same version as the current ghostscript + package i.e. 9.06 because this ghostscript-fonts-* packages + are the right ones for this Ghostscript version. + ------------------------------------------------------------------- Fri Sep 28 10:46:03 CEST 2012 - jsmeix@suse.de diff --git a/ghostscript-fonts.spec b/ghostscript-fonts.spec index a669e94..ddabde3 100644 --- a/ghostscript-fonts.spec +++ b/ghostscript-fonts.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: ghostscript-fonts BuildArch: noarch # Prepare spec file for dropping SuSEconfig.fonts @@ -40,7 +41,7 @@ Group: Productivity/Publishing/PS # than the old ghostscript-fonts-* sub-packages, the existing versioning scheme # is still used here. This versioning scheme makes sense because this # ghostscript-fonts-* packages are the right ones for this Ghostscript version: -Version: 9.05 +Version: 9.06 Release: 0 # Source0...Source9 is for sources from upstream: # URL for Source0: http://mirror.cs.wisc.edu/pub/mirrors/ghost/fonts/ghostscript-fonts-std-8.11.tar.gz