Fix some X11-related packaging bugs (#1918947)

This commit is contained in:
Anna Khaitovich 2021-01-22 12:59:39 +01:00
parent 095c3dd448
commit d3aaf6247d

View File

@ -155,25 +155,17 @@
if [[ $1 -eq 0 ]]; then \
# mkfontscale %{_fontdir} &> /dev/null || : \
# mkfontdir %{_fontdir} &> /dev/null || : \
# xset fp rehash &> /dev/null || : \
true || : \
fi \
)
# The content of this scriptlet is only run once during install/update.
#
# NOTE: 'xset' is an utility requiring X server to be running. Because of it,
# the 'xset fp rehash' will fail to udpate its font database, when the
# X server is stopped. This has been already reported (and closed):
# https://bugzilla.redhat.com/show_bug.cgi?id=1466254
%global posttrans_scriptlet() \
( \
if [[ -x %{tmpfile} ]]; then \
# mkfontscale %{_fontdir} \
# mkfontdir %{_fontdir} \
# export DISPLAY=:0 \
# xset fp rehash &> /dev/null || : \
# \
true || : \
rm -rf %{tmpdir} \
@ -195,7 +187,7 @@ by (URW)++ company, and are mainly utilized by applications using Ghostscript.
Name: %{fontname}-fonts
Summary: Core Font Set containing 35 freely distributable fonts from (URW)++
Version: 20200910
Release: 1%{?dist}
Release: 2%{?dist}
# NOTE: (URW)++ holds the copyright, but Artifex Software has obtained rights to
# release these fonts under GNU Affero General Public License (version 3).
@ -256,12 +248,7 @@ Summary: %{*} font family [part of Level 2 Core Font Set] \
Requires: %{name}-common = %{version}-%{release} \
\
Requires(post): fontconfig \
Requires(post): xorg-x11-font-utils \
Requires(post): xorg-x11-server-utils \
\
Requires(postun): fontconfig \
Requires(postun): xorg-x11-font-utils \
Requires(postun): xorg-x11-server-utils \
\
# NOTE: Remove the -o section below once F27 is EOL. \
%{-o: \
@ -326,6 +313,8 @@ as well as all the fonts contained in this font set.
%package legacy
Summary: Legacy version of (URW)++ Level 2 Core Font Set
Requires(post): xorg-x11-font-utils
Requires(postun): xorg-x11-font-utils
%description legacy
%{common_desc}
@ -420,14 +409,10 @@ appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/*.metainfo
%post legacy
mkfontscale %{legacydir}
mkfontdir %{legacydir}
export DISPLAY=:0
xset fp rehash &> /dev/null || :
%postun legacy
mkfontscale %{legacydir}
mkfontdir %{legacydir}
export DISPLAY=:0
xset fp rehash &> /dev/null || :
# NOTE: There's no reason to run 'post' and 'postun' scriptlets for the main
# metapackage or the *-common subpackage. Everything necessary is handled
@ -470,6 +455,9 @@ xset fp rehash &> /dev/null || :
# =============================================================================
%changelog
* Fri Jan 22 2021 Anna Khaitovich <akhaitov@redhat.com> - 20200910-2
- Fix some X11-related packaging bugs (#1918947)
* Thu Oct 22 2020 Anna Khaitovich <akhaitov@redhat.com> - 20200910-1
- Rebase to 20200910 version (#1877974)