source: pst/printing/gs.xml@ f429481

11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since f429481 was f429481, checked in by Ken Moffat <ken@…>, 3 years ago

ghostscript - patch it to fix CVE-2021-3781.

  • Property mode set to 100644
File size: 13.2 KB
RevLine 
[ed30f09]1<?xml version="1.0" encoding="ISO-8859-1"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[73ddd1a0]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
[00b6675]6
[a5653eb]7 <!-- When updating, ensure gs9xx is updated in url -->
8
[6b58d592]9 <!ENTITY gs-download-http
[b5af71a]10 "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs&gs-packver;/ghostscript-&gs-version;.tar.xz">
[de109d93]11 <!ENTITY gs-download-ftp " ">
[f863a1b0]12 <!ENTITY gs-md5sum "72535d31018129a1a8ff636a47ba1f92">
13 <!ENTITY gs-size "53 MB">
14 <!ENTITY gs-buildsize "342 MB (with fonts and libgs.so)">
15 <!ENTITY gs-time "1.8 SBU (Using parallelism=4; with libgs.so)">
[100786d]16
[95b8c6d]17 <!ENTITY gs-standard-fonts-download
[8dfc5c3]18 "&sourceforge-dl;/gs-fonts/ghostscript-fonts-std-8.11.tar.gz">
[00b6675]19 <!ENTITY gs-standard-fonts-md5sum "6865682b095f8c4500c54b285ff05ef6">
[100786d]20 <!ENTITY gs-standard-fonts-size "3.7 MB">
[00b6675]21
[95b8c6d]22 <!ENTITY gs-other-fonts-download
[8dfc5c3]23 "&sourceforge-dl;/gs-fonts/gnu-gs-fonts-other-6.0.tar.gz">
[100786d]24 <!ENTITY gs-other-fonts-md5sum "33457d3f37de7ef03d2eea05a9e6aa4f">
25 <!ENTITY gs-other-fonts-size "796 KB">
[73ddd1a0]26]>
27
[a027d7d3]28<sect1 id="gs" xreflabel="ghostscript-&gs-version;">
[ed30f09]29 <?dbhtml filename="gs.html"?>
30
31 <sect1info>
32 <date>$Date$</date>
33 </sect1info>
34
[a027d7d3]35 <title>ghostscript-&gs-version;</title>
[ed30f09]36
37 <indexterm zone="gs">
[0c32749]38 <primary sortas="a-Ghostscript">Ghostscript</primary>
[ed30f09]39 </indexterm>
40
41 <sect2 role="package">
42 <title>Introduction to Ghostscript</title>
43
[fa3edfef]44 <para>
45 <application>Ghostscript</application> is a versatile processor
46 for PostScript data with the ability to render PostScript to different
47 targets. It is a mandatory part of the cups printing stack.
48 </para>
[ed30f09]49
[da54a62]50 &lfs110a_checked;
[aa8ef3bc]51
[ed30f09]52 <bridgehead renderas="sect3">Package Information</bridgehead>
53 <itemizedlist spacing="compact">
54 <listitem>
[fa3edfef]55 <para>
56 Download (HTTP): <ulink url="&gs-download-http;"/>
57 </para>
[ed30f09]58 </listitem>
59 <listitem>
[fa3edfef]60 <para>
61 Download (FTP): <ulink url="&gs-download-ftp;"/>
62 </para>
[ed30f09]63 </listitem>
64 <listitem>
[fa3edfef]65 <para>
66 Download MD5 sum: &gs-md5sum;
67 </para>
[ed30f09]68 </listitem>
69 <listitem>
[fa3edfef]70 <para>
71 Download size: &gs-size;
72 </para>
[ed30f09]73 </listitem>
74 <listitem>
[fa3edfef]75 <para>
76 Estimated disk space required: &gs-buildsize;
77 </para>
[ed30f09]78 </listitem>
79 <listitem>
[fa3edfef]80 <para>
81 Estimated build time: &gs-time;
82 </para>
[ed30f09]83 </listitem>
84 </itemizedlist>
[1bff7a9]85
[ed30f09]86 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
[8df3cdc8]87<!-- Commenting this out since it's no longer needed, but keeping it for the
[c92a844]88 inevitable next time that we need a patch for this package. -->
[c8585068]89 <itemizedlist spacing="compact">
90 <listitem>
91 <para>
92 Required patch:
[f429481]93 <ulink url="&patch-root;/ghostscript-&gs-version;-upstream_fix-2.patch"/>
[c8585068]94 </para>
95 </listitem>
96 </itemizedlist>
97
[fa3edfef]98 <para>
99 If you wish, you can download additional fonts.
100 </para>
[933ceec]101
[6b58d592]102 <itemizedlist spacing="compact">
[ed30f09]103 <title>Standard Fonts</title>
104 <listitem>
[fa3edfef]105 <para>
106 Download (HTTP): <ulink url="&gs-standard-fonts-download;"/>
107 </para>
[ed30f09]108 </listitem>
109 <listitem>
[fa3edfef]110 <para>
111 Download MD5 sum: &gs-standard-fonts-md5sum;
112 </para>
[ed30f09]113 </listitem>
114 <listitem>
[fa3edfef]115 <para>
116 Download size: &gs-standard-fonts-size;
117 </para>
[ed30f09]118 </listitem>
119 </itemizedlist>
120
[6b58d592]121 <itemizedlist spacing="compact">
[ed30f09]122 <title>Other Fonts</title>
123 <listitem>
[fa3edfef]124 <para>
125 Download (HTTP): <ulink url="&gs-other-fonts-download;"/>
126 </para>
[ed30f09]127 </listitem>
128 <listitem>
[fa3edfef]129 <para>
130 Download MD5 sum: &gs-other-fonts-md5sum;
131 </para>
[ed30f09]132 </listitem>
133 <listitem>
[fa3edfef]134 <para>
135 Download size: &gs-other-fonts-size;
136 </para>
[ed30f09]137 </listitem>
138 </itemizedlist>
139
[b29ed97c]140 <bridgehead renderas="sect3">Ghostscript Dependencies</bridgehead>
[ed30f09]141
[de109d93]142 <bridgehead renderas="sect4">Recommended</bridgehead>
[2d37d32]143 <para role="recommended">
[7524e07]144 <xref linkend="cups"/> (required for building the <quote>cups</quote>
145 device backend, which is needed by
146 <application>cups-filters</application>),
147 <xref linkend="fontconfig"/> (required, if you are installing any
148 suggested font),
[2d37d32]149 <xref linkend="freetype2"/>,
150 <xref linkend="libjpeg"/>,
[933ceec]151 <xref linkend="libpng"/>,
[bb65a3c]152 <xref linkend="libtiff"/>, and
[12341a8]153 <xref linkend="openjpeg2"/>
[2d37d32]154 </para>
[de109d93]155
156 <bridgehead renderas="sect4">Optional</bridgehead>
[2d37d32]157 <para role="optional">
158 <xref linkend="cairo"/>,
[f7153b6]159 <xref linkend="gtk3"/>,
[2d37d32]160 <xref linkend="libidn"/>,
[bb65a3c]161 <xref linkend="libpaper"/>, and
[1ecdb18]162 <xref linkend="x-window-system"/>
[2d37d32]163 </para>
164
165 <para condition="html" role="usernotes">
166 User Notes: <ulink url="&blfs-wiki;/gs"/>
167 </para>
[ed30f09]168 </sect2>
169
170 <sect2 role="installation">
171 <title>Installation of Ghostscript</title>
172
[2d37d32]173 <note>
174 <para>
175 The <application>Ghostscript</application> build system is not
176 user-friendly. In order to use system copies of various graphics
177 libraries, you must do it using unconventional methods.
178 </para>
179 </note>
[100786d]180
[2d37d32]181 <para>
[0c32749]182 <application>Ghostscript</application> includes (old) copies of
[de109d93]183 several libraries. Some of these seem to have been patched to fix known
184 vulnerabilities, but others of these copies are less-well maintained.
185 To ensure that any future fixes are applied throughout the whole system,
[2d37d32]186 it is recommended that you first install the released versions of these
[0c32749]187 libraries and then configure <application>Ghostscript</application>
[2d37d32]188 to link to them.
189 </para>
[d453af5]190
[2d37d32]191 <para>
[8558044]192 If you have installed the recommended dependencies on your system,
[4886a74]193 remove the copies of
[1df1b16]194 <application>freetype</application>, <application>lcms2</application>,
[12341a8]195 <application>libjpeg</application>, <application>libpng</application>,
196 and <application>openjpeg</application>:
[2d37d32]197 </para>
[ed30f09]198
[12341a8]199<screen><userinput>rm -rf freetype lcms2mt jpeg libpng openjpeg</userinput></screen>
[2d37d32]200
[c8585068]201 <para>
[f429481]202 Apply a patch to prevent a segfault when processing some PDF files and
203 to fix a public 0-day in libgs which can be exploited via ImageMagick:
[c8585068]204 </para>
205
[f429481]206<screen><userinput remap="pre">patch -Np1 -i ../ghostscript-&gs-version;-upstream_fix-2.patch</userinput></screen>
[c8585068]207
[fa3edfef]208 <para>
209 Compile <application>Ghostscript</application>:
210 </para>
[de109d93]211
[595e58e]212<screen><userinput>rm -rf zlib &amp;&amp;
[60d53ec3]213
214./configure --prefix=/usr \
215 --disable-compile-inits \
216 --enable-dynamic \
217 --with-system-libtiff &amp;&amp;
[038ea6ba]218make</userinput></screen>
219
[d453af5]220 <note>
[2d37d32]221 <para>
[9bfd70c]222 The shared library depends on <xref linkend="gtk3"/>. It is only used by
[7ab0957e]223 external programs like <xref linkend="asymptote"/>, <xref
[47d5a9e5]224 linkend="dvisvgm"/>, <xref linkend="imagemagick"/>, and <xref
225 linkend="texlive"/>.
[2d37d32]226 </para>
[d453af5]227 </note>
[038ea6ba]228
[2d37d32]229 <para>
230 To compile the shared library
231 <filename class="libraryfile">libgs.so</filename>, run the following
232 additional command as an unprivileged user:
233 </para>
[038ea6ba]234
235<screen><userinput>make so</userinput></screen>
[73ddd1a0]236
[2d37d32]237 <para>
[a2a37c7]238 This package does not come with a test suite. A set of example files
239 may be used for testing, but it is only possible after installation
240 of the package.
[2d37d32]241 </para>
[d453af5]242
[2d37d32]243 <para>
244 Now, as the <systemitem class="username">root</systemitem> user:
245 </para>
[038ea6ba]246
[d453af5]247<screen role="root"><userinput>make install</userinput></screen>
248
[fa3edfef]249 <para>
250 If you want the shared library too:
251 </para>
[d453af5]252
253<screen role="root"><userinput>make soinstall &amp;&amp;
[aa8ef3bc]254install -v -m644 base/*.h /usr/include/ghostscript &amp;&amp;
[eff6c3a8]255ln -sfvn ghostscript /usr/include/ps</userinput></screen>
[73ddd1a0]256
[fa3edfef]257 <para>
[f863a1b0]258 Now make the documentation accessible from a standard place:
[fa3edfef]259 </para>
[a0968dcc]260<!-- Starting with 9.23, the install does not seem to copy the examples any more -->
[d453af5]261
[12341a8]262<screen role="root"><userinput>mv -v /usr/share/doc/ghostscript/&gs-version; /usr/share/doc/ghostscript-&gs-version; &amp;&amp;
263rm -rfv /usr/share/doc/ghostscript &amp;&amp;
[654fe2b]264cp -r examples/ /usr/share/ghostscript/&gs-version;/</userinput></screen>
[73ddd1a0]265
[2d37d32]266 <para>
[798c542]267 If you have downloaded the fonts, unpack them to
[2d37d32]268 <filename class="directory">/usr/share/ghostscript</filename> and ensure
[f863a1b0]269 the ownership of the files are
[2d37d32]270 <systemitem class="username">root</systemitem>:
[798c542]271 <systemitem class="groupname">root</systemitem>.
[2d37d32]272 </para>
[038ea6ba]273
[798c542]274<screen role="root"><userinput>tar -xvf ../ghostscript-fonts-std-8.11.tar.gz -C /usr/share/ghostscript --no-same-owner &amp;&amp;
275tar -xvf ../gnu-gs-fonts-other-6.0.tar.gz -C /usr/share/ghostscript --no-same-owner &amp;&amp;
[142f958b]276fc-cache -v /usr/share/ghostscript/fonts/</userinput></screen>
[a2a37c7]277
278 <para>
[f863a1b0]279 You can now test the rendering of various postscript and pdf files from the
[a2a37c7]280 <filename class="directory">/usr/share/ghostscript/&gs-version;/examples
[f863a1b0]281 </filename>. To do this, run the following command (in a X Windows display):
[a2a37c7]282 </para>
283
[c77fb71f]284<screen remap="test"><userinput>gs -q -dBATCH /usr/share/ghostscript/&gs-version;/examples/tiger.eps</userinput></screen>
[a2a37c7]285
[ed30f09]286 </sect2>
[73ddd1a0]287
[2ddf71a5]288 <sect2 role="commands">
289 <title>Command Explanations</title>
290
[2d37d32]291 <para>
[f19b432b]292 <command>rm -rf zlib </command>: <application>zlib</application>
293 was installed as part of LFS.
[2d37d32]294 </para>
295
296 <para>
[2bb5c32]297 <parameter>--disable-compile-inits</parameter>: This option makes
[933ceec]298 <command>gs</command> and <filename>libgs.so</filename> slightly smaller.
[2d37d32]299 </para>
300
301 <para>
[142f958b]302 <parameter>--with-system-libtiff</parameter>: Remove this option if
303 you've not installed <xref linkend="libtiff"/>.
[2d37d32]304 </para>
305
306 <para>
[81f0120]307 <command>install -v -m644 base/*.h... </command>: Some packages
[2d37d32]308 (<application>ImageMagick</application> is one) need the
309 <application>Ghostscript</application> interface headers in place to link
310 to the shared library. These commands install the headers.
311 </para>
312
313 <para>
[eff6c3a8]314 <command>ln -sfvn ghostscript /usr/include/ps</command>: Some packages
[2d37d32]315 expect to find the interface headers in an alternate location.
316 </para>
317
318 <para>
[12341a8]319 <command>mv -v /usr/share/doc/ghostscript/&gs-version;
320 /usr/share/doc/ghostscript-&gs-version;</command>: This moves the
321 documentation where it is expected to be found.
[2d37d32]322 </para>
[933ceec]323
324 <para>
325 <option>--disable-cups</option>: this option will save a tiny amount of
326 space by not linking <command>gs</command> and <filename>libgs.so</filename>
327 to the <xref linkend="cups"/> libraries if you have installed those.
328 </para>
[2ddf71a5]329 </sect2>
330
[ed30f09]331 <sect2 role="content">
332 <title>Contents</title>
[038ea6ba]333 <segmentedlist>
334 <segtitle>Installed Programs</segtitle>
335 <segtitle>Installed Library</segtitle>
336 <segtitle>Installed Directories</segtitle>
337
338 <seglistitem>
[2d37d32]339 <seg>
[0e390db]340 dvipdf, eps2eps, gs, gsbj, gsc (from soinstall), gsdj,
[81f0120]341 gsdj500, gslj, gslp, gsnd, gsx (from soinstall), lprsetup.sh,
342 pdf2dsc, pdf2ps, pf2afm, pfbtopfa, pphs, printafm, ps2ascii,
343 ps2epsi, ps2pdf, ps2pdf12, ps2pdf13, ps2pdf14, ps2pdfwr,
[0e390db]344 ps2ps, ps2ps2, and unix-lpr.sh
[933ceec]345 <!-- I don't see bdftops,fixmswrd.pl or pv.sh on my builds [ I don't
346 have any bdf tools from xorg ] but they are still referenced in
347 base/unixinst.mak -->
[2d37d32]348 </seg>
[81f0120]349 <seg>libgs.so and
350 /usr/lib/ghostscript/&gs-version;/X11.so</seg>
[2d37d32]351 <seg>
352 /usr/include/ghostscript,
353 /usr/lib/ghostscript,
[019052a1]354 /usr/share/ghostscript, and
[2d37d32]355 /usr/share/doc/ghostscript-&gs-version;
356 </seg>
[038ea6ba]357 </seglistitem>
358 </segmentedlist>
359
360 <variablelist>
361 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
362 <?dbfo list-presentation="list"?>
363 <?dbhtml list-presentation="table"?>
364
[d891148c]365 <varlistentry id="gplgs-prog">
[038ea6ba]366 <term><command>gs</command></term>
367 <listitem>
[2d37d32]368 <para>
369 is an interpreter for Adobe Systems' PostScript(tm) and Portable
[4c24eb0a]370 Document Format (PDF)
[2d37d32]371 </para>
[d891148c]372 <indexterm zone="gs gplgs-prog">
[038ea6ba]373 <primary sortas="b-gs">gs</primary>
374 </indexterm>
375 </listitem>
376 </varlistentry>
377
[d891148c]378 <varlistentry id="libgs.so">
379 <term><filename class="libraryfile">libgs.so</filename></term>
380 <listitem>
[2d37d32]381 <para>
382 provides <application>Ghostscript</application> functionality to
383 other programs, such as <application>GSView</application>,
384 <application>ImageMagick</application>, and
[4c24eb0a]385 <application>libspectre</application>
[2d37d32]386 </para>
[d891148c]387 <indexterm zone="gs libgs.so">
388 <primary sortas="c-libgs.so">libgs.so</primary>
389 </indexterm>
390 </listitem>
391 </varlistentry>
[038ea6ba]392 </variablelist>
393
[2d37d32]394 <para>
[0c32749]395 <application>Ghostscript</application> provides many different
[2d37d32]396 scripts used to convert PostScript, PDF, and other formats. Please refer to
397 the HTML documentation or the man pages for information about the
398 capabilities provided.
399 </para>
[ed30f09]400 </sect2>
[4c24eb0a]401
[cabb2de]402</sect1>
Note: See TracBrowser for help on using the repository browser.