From 447c05181374253d5795ef34a74f4d68d6818aebd641340b85e4210606e0388d Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Fri, 16 Mar 2018 10:25:55 +0000 Subject: [PATCH] Accepting request 587695 from home:StefanBruens:branches:X11:XOrg - Cleanup packaging, see boo#1085143 for details: * Remove special handling for openSUSE 12.2 and earlier. * Mark fonts.{dir,scale} and encodings.dir as %ghost files instead of %config. These files are created by the %posttrans scriptlets so no need to ship these, also avoids creation of .rpmsave files. Also track these files consistently for all subdirs. * add .fonts-config-timestamp as %ghost, ignore if it is missing. * remove encodings.dir from encodings directories. OBS-URL: https://build.opensuse.org/request/show/587695 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-fonts?expand=0&rev=92 --- xorg-x11-fonts.changes | 12 +++++++++ xorg-x11-fonts.spec | 60 +++++++++++++++++++++--------------------- 2 files changed, 42 insertions(+), 30 deletions(-) diff --git a/xorg-x11-fonts.changes b/xorg-x11-fonts.changes index b1c857b..686cc2d 100644 --- a/xorg-x11-fonts.changes +++ b/xorg-x11-fonts.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Mon Mar 12 22:08:13 UTC 2018 - stefan.bruens@rwth-aachen.de + +- Cleanup packaging, see boo#1085143 for details: + * Remove special handling for openSUSE 12.2 and earlier. + * Mark fonts.{dir,scale} and encodings.dir as %ghost files instead + of %config. These files are created by the %posttrans scriptlets + so no need to ship these, also avoids creation of .rpmsave files. + Also track these files consistently for all subdirs. + * add .fonts-config-timestamp as %ghost, ignore if it is missing. + * remove encodings.dir from encodings directories. + ------------------------------------------------------------------- Fri Mar 9 15:05:41 UTC 2018 - stefan.bruens@rwth-aachen.de diff --git a/xorg-x11-fonts.spec b/xorg-x11-fonts.spec index 756b8e6..f2b0c7d 100644 --- a/xorg-x11-fonts.spec +++ b/xorg-x11-fonts.spec @@ -1,7 +1,7 @@ # # spec file for package xorg-x11-fonts # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,9 +18,7 @@ Name: xorg-x11-fonts BuildRequires: bdftopcf -%if 0%{?suse_version} > 01220 BuildRequires: fontpackages-devel -%endif BuildRequires: mkfontdir BuildRequires: mkfontscale # ucs2any @@ -138,33 +136,22 @@ for dir in encodings-* $(ls | grep -v -e encodings -e alias) font-alias-* ; do make -C $dir install DESTDIR=$RPM_BUILD_ROOT "${option}" done rm -f $RPM_BUILD_ROOT/usr/share/fonts/*/fonts.cache* -rm -f $RPM_BUILD_ROOT/usr/share/fonts/75dpi/fonts.{dir,scale} pushd $RPM_BUILD_ROOT -find usr/share/fonts/75dpi -type f | sed 's+^usr+/usr+g' | \ - grep -v -e ISO8859 -e fonts.alias >> $RPM_BUILD_DIR/files.%{name}-core +find usr/share/fonts/75dpi -type f -iname \*.pcf.gz | sed 's+^usr+/usr+g' | \ + grep -v -e ISO8859 >> $RPM_BUILD_DIR/files.%{name}-core popd rm -rf $RPM_BUILD_ROOT/usr/etc +rm -f $RPM_BUILD_ROOT/fonts.{dir,scale} +rm -f $RPM_BUILD_ROOT/usr/share/fonts/encodings/{,large}/encodings.dir %clean rm -rf "$RPM_BUILD_ROOT" -%if 0%{?suse_version} > 01220 +# %%post scriptlets %reconfigure_fonts_scriptlets %reconfigure_fonts_scriptlets -n xorg-x11-fonts-core -%else -%post -%run_suseconfig_fonts -%postun -%run_suseconfig_fonts - -%post core -%run_suseconfig_fonts - -%postun core -%run_suseconfig_fonts -%endif %files %defattr(-,root,root) @@ -172,21 +159,31 @@ rm -rf "$RPM_BUILD_ROOT" %dir /usr/share/fonts/Type1 %dir /usr/share/fonts/cyrillic %dir /usr/share/fonts/truetype -%config %verify(not md5 size mtime) /usr/share/fonts/100dpi/fonts.dir +%ghost /usr/share/fonts/100dpi/encodings.dir +%ghost /usr/share/fonts/100dpi/fonts.dir +%ghost /usr/share/fonts/100dpi/fonts.scale +%ghost %verify(not mode) /usr/share/fonts/100dpi/.fonts-config-timestamp /usr/share/fonts/100dpi/fonts.alias /usr/share/fonts/100dpi/*.pcf.gz /usr/share/fonts/75dpi/fonts.alias /usr/share/fonts/75dpi/*-ISO8859-*.pcf.gz -%config %verify(not md5 size mtime) /usr/share/fonts/Type1/fonts.dir -%config %verify(not md5 size mtime) /usr/share/fonts/Type1/fonts.scale +%ghost /usr/share/fonts/Type1/encodings.dir +%ghost /usr/share/fonts/Type1/fonts.dir +%ghost /usr/share/fonts/Type1/fonts.scale +%ghost %verify(not mode) /usr/share/fonts/Type1/.fonts-config-timestamp /usr/share/fonts/Type1/*.afm /usr/share/fonts/Type1/*.pfa /usr/share/fonts/Type1/*.pfb -%config %verify(not md5 size mtime) /usr/share/fonts/cyrillic/fonts.dir +%ghost /usr/share/fonts/cyrillic/encodings.dir +%ghost /usr/share/fonts/cyrillic/fonts.dir +%ghost /usr/share/fonts/cyrillic/fonts.scale +%ghost %verify(not mode) /usr/share/fonts/cyrillic/.fonts-config-timestamp /usr/share/fonts/cyrillic/fonts.alias /usr/share/fonts/cyrillic/*.pcf.gz -%config %verify(not md5 size mtime) /usr/share/fonts/truetype/fonts.dir -%config %verify(not md5 size mtime) /usr/share/fonts/truetype/fonts.scale +%ghost /usr/share/fonts/truetype/encodings.dir +%ghost /usr/share/fonts/truetype/fonts.dir +%ghost /usr/share/fonts/truetype/fonts.scale +%ghost %verify(not mode) /usr/share/fonts/truetype/.fonts-config-timestamp /usr/share/fonts/truetype/*.otf /usr/share/fonts/truetype/*.ttf @@ -194,16 +191,19 @@ rm -rf "$RPM_BUILD_ROOT" %defattr(-,root,root) %dir /usr/share/fonts/misc %dir /usr/share/fonts/75dpi +%ghost /usr/share/fonts/75dpi/encodings.dir +%ghost /usr/share/fonts/75dpi/fonts.dir +%ghost /usr/share/fonts/75dpi/fonts.scale +%ghost %verify(not mode) /usr/share/fonts/75dpi/.fonts-config-timestamp %dir /usr/share/fonts/encodings %dir /usr/share/fonts/encodings/large -%config %verify(not md5 size mtime) /usr/share/fonts/encodings/encodings.dir /usr/share/fonts/encodings/*.enc.gz -%config %verify(not md5 size mtime) /usr/share/fonts/encodings/large/encodings.dir /usr/share/fonts/encodings/large/*.enc.gz -%config %verify(not md5 size mtime) /usr/share/fonts/misc/fonts.dir +%ghost /usr/share/fonts/misc/encodings.dir +%ghost /usr/share/fonts/misc/fonts.dir +%ghost /usr/share/fonts/misc/fonts.scale +%ghost %verify(not mode) /usr/share/fonts/misc/.fonts-config-timestamp /usr/share/fonts/misc/fonts.alias /usr/share/fonts/misc/*.pcf.gz -%exclude /fonts.dir -%exclude /fonts.scale %changelog