diff --git a/ghostscript-10.01.0-fix-linkage.patch b/ghostscript-10.01.0-fix-linkage.patch deleted file mode 100644 index deac484839b5935101c6f533e4c9ac23daaf1287..0000000000000000000000000000000000000000 --- a/ghostscript-10.01.0-fix-linkage.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- ghostscript-10.01.0/devices/devs.mak.orig 2023-03-23 12:23:25.642893279 +0800 -+++ ghostscript-10.01.0/devices/devs.mak 2023-03-23 12:23:56.089893279 +0800 -@@ -396,8 +396,8 @@ - ### Shared library object supporting X11. - ### NON PORTABLE, ONLY UNIX WITH GCC SUPPORT - --$(DEVOBJ)X11.so : $(x11alt_) $(x11_) $(DEVS_MAK) $(MAKEDIRS) -- $(CCLD) $(LDFLAGS) -shared -o $(DEVOBJ)X11.so $(x11alt_) $(x11_) -L/usr/X11R6/lib -lXt -lSM -lICE -lXext -lX11 $(XLIBDIRS) -+$(DEVOBJ)X11.so : $(x11alt_) $(x11_) $(DEVS_MAK) $(MAKEDIRS) $(GS_XE) -+ $(CCLD) $(LDFLAGS) -shared -o $(DEVOBJ)X11.so $(x11alt_) $(x11_) -L/usr/X11R6/lib $(GS_XE) -lXt -lSM -lICE -lXext -lX11 $(XLIBDIRS) - - ###### --------------- Memory-buffered printer devices --------------- ###### - diff --git a/ghostscript-10.02.1-PostScript-Fix-selectdevice.patch b/ghostscript-10.02.1-PostScript-Fix-selectdevice.patch new file mode 100644 index 0000000000000000000000000000000000000000..3aefed84591b5da3139bd2c3c344f5229ab60ffa --- /dev/null +++ b/ghostscript-10.02.1-PostScript-Fix-selectdevice.patch @@ -0,0 +1,33 @@ +From 2febe352146a62c77d62a5b5dde9607f66575d14 Mon Sep 17 00:00:00 2001 +Message-ID: <2febe352146a62c77d62a5b5dde9607f66575d14.1699398720.git.mjg@fedoraproject.org> +From: Ken Sharp +Date: Mon, 6 Nov 2023 15:30:18 +0000 +Subject: [PATCH] PostScript - Fix selectdevice + +Bug 707310 "`selectdevice` no longer works" + +This was an oversight. Fixed here. + +In future I anticipate removing selectdevice as well, as it doesn't do +anything that can't be done using setpagedevice (and .defaultscreen). +However, it is currently documented, so this restores the behaviour. +--- + Resource/Init/gs_init.ps | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps +index 958e8247c..d6b55efb2 100644 +--- a/Resource/Init/gs_init.ps ++++ b/Resource/Init/gs_init.ps +@@ -871,7 +871,7 @@ currentdict /.makeinternaldict .undef + ifelse + } bind def + /selectdevice +- { finddevice setdevice .setdefaultscreen } bind def ++ { finddevice setdevice .setdefaultscreen } bind odef + /signalerror % signalerror - + { /errordict .systemvar exch get exec } bind def + /signaloperror { % signaloperror - +-- +2.43.0.rc0.447.g76a1efa614 + diff --git a/ghostscript-10.02.1-txtwrite-device-needs-to-countdown-the-device-on-tex.patch b/ghostscript-10.02.1-txtwrite-device-needs-to-countdown-the-device-on-tex.patch new file mode 100644 index 0000000000000000000000000000000000000000..2eddb0489246fd2657671ba5854412c25a2ca0ab --- /dev/null +++ b/ghostscript-10.02.1-txtwrite-device-needs-to-countdown-the-device-on-tex.patch @@ -0,0 +1,31 @@ +From ea661034db7eb667375981dae883d0c9e7d79799 Mon Sep 17 00:00:00 2001 +Message-ID: +From: Ken Sharp +Date: Mon, 18 Sep 2023 17:40:18 +0100 +Subject: [PATCH] txtwrite device - needs to countdown the device on + text_release + +Bug #707132 "Error: finalizing subclassing device while child refcount > 1" + +The txtwrite device calls gs_text_enum_init() which counts up the +device, but does not count it down again when the enumertor is +released. Fixed here. +--- + devices/vector/gdevtxtw.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/devices/vector/gdevtxtw.c b/devices/vector/gdevtxtw.c +index f64284f07..089d32f7e 100644 +--- a/devices/vector/gdevtxtw.c ++++ b/devices/vector/gdevtxtw.c +@@ -2059,6 +2059,7 @@ textw_text_release(gs_text_enum_t *pte, client_name_t cname) + gs_free(tdev->memory, penum->text_state, 1, sizeof(penum->text_state), "txtwrite free text state"); + penum->text_state = NULL; + } ++ rc_decrement_only(pte->dev, "textw_text_release"); + } + + /* This is the list of methods for the text enumerator */ +-- +2.43.0.rc0.447.g76a1efa614 + diff --git a/ghostscript.spec b/ghostscript.spec index 91edba6d398a590186737b2623400dcff3487c8a..6c67dc0d853dbb64712a228de839a766ece0f238 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %global _hardened_build 1 %global _docdir_fmt %{name} @@ -14,6 +14,8 @@ Release: %{anolis_release}%{?dist} License: AGPLv3+ URL: https://ghostscript.com/ Source0: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs%{version_short}/ghostscript-%{version}.tar.xz +Patch0: ghostscript-10.02.1-txtwrite-device-needs-to-countdown-the-device-on-tex.patch +Patch1: ghostscript-10.02.1-PostScript-Fix-selectdevice.patch BuildRequires: gcc gcc-c++ automake autoconf BuildRequires: adobe-mappings-cmap-devel adobe-mappings-pdf-devel @@ -31,7 +33,6 @@ Provides: ghostscript-core = %{version}-%{release} Obsoletes: ghostscript-core < 9.53.3-6 -Patch0: ghostscript-10.01.0-fix-linkage.patch %description Ghostscript is an interpreter for PostScript® and Portable Document Format (PDF) files. @@ -227,6 +228,11 @@ install -m 0755 -d %{buildroot}%{_datadir}/%{name}/conf.d/ %changelog +* Mon Jan 01 2024 Upstream Sync - %{version}-%{release} +- Sync upstream changes from commit e0ca07cfe1d0dceaa1ee4ac5715002218fc6ec89 +- Fix txtwrite device reference countdown and /selectdevice behavior (fixes #707132, #707310) +- Drop unused patches merged in ghostscript-10.02.1 + * Sun Nov 05 2023 Funda Wang - 10.02.1-1 - New version 10.02.1