The verification passed for focal.

--------------------------- Test case 1 verification--------------------
ubuntu@focalvm:~$ apt-cache policy ghostscript
ghostscript:
  Installed: 9.50~dfsg-5ubuntu4.3
  Candidate: 9.50~dfsg-5ubuntu4.4
  Version table:
     9.50~dfsg-5ubuntu4.4 500
        500 http://us.archive.ubuntu.com/ubuntu focal-proposed/main amd64 
Packages
 *** 9.50~dfsg-5ubuntu4.3 500
        500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 
Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
        100 /var/lib/dpkg/status
     9.50~dfsg-5ubuntu4 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
ubuntu@focalvm:~$ gs -- waterfal.ps
GPL Ghostscript 9.50 (2019-10-15)
Copyright (C) 2019 Artifex Software, Inc.  All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Error: /undefinedfilename in (waterfal.ps)
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--   
--nostringval--   false   1   %stopped_push
Dictionary stack:
   --dict:724/1123(ro)(G)--   --dict:0/20(G)--   --dict:76/200(L)--
Current allocation mode is local
Last OS error: Permission denied
GPL Ghostscript 9.50: Unrecoverable error, exit code 1
ubuntu@focalvm:~$ sudo apt install ghostscript -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libgs9 libgs9-common
Suggested packages:
  ghostscript-x
The following packages will be upgraded:
  ghostscript libgs9 libgs9-common
3 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.
Need to get 2,906 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu focal-proposed/main amd64 ghostscript 
amd64 9.50~dfsg-5ubuntu4.4 [51.8 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu focal-proposed/main amd64 libgs9 
amd64 9.50~dfsg-5ubuntu4.4 [2,173 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu focal-proposed/main amd64 
libgs9-common all 9.50~dfsg-5ubuntu4.4 [682 kB]
Fetched 2,906 kB in 1s (4,127 kB/s)
(Reading database ... 214058 files and directories currently installed.)
Preparing to unpack .../ghostscript_9.50~dfsg-5ubuntu4.4_amd64.deb ...
Unpacking ghostscript (9.50~dfsg-5ubuntu4.4) over (9.50~dfsg-5ubuntu4.3) ...
Preparing to unpack .../libgs9_9.50~dfsg-5ubuntu4.4_amd64.deb ...
Unpacking libgs9:amd64 (9.50~dfsg-5ubuntu4.4) over (9.50~dfsg-5ubuntu4.3) ...
Preparing to unpack .../libgs9-common_9.50~dfsg-5ubuntu4.4_all.deb ...
Unpacking libgs9-common (9.50~dfsg-5ubuntu4.4) over (9.50~dfsg-5ubuntu4.3) ...
Setting up libgs9-common (9.50~dfsg-5ubuntu4.4) ...
Setting up libgs9:amd64 (9.50~dfsg-5ubuntu4.4) ...
Setting up ghostscript (9.50~dfsg-5ubuntu4.4) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for man-db (2.9.1-1) ...
ubuntu@focalvm:~$ gs -- waterfal.ps
GPL Ghostscript 9.50 (2019-10-15)
Copyright (C) 2019 Artifex Software, Inc.  All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Creating waterfall printout at 4000 DPI.
Loading NimbusMonoPS-Regular font from 
/usr/share/ghostscript/9.50/Resource/Font/NimbusMonoPS-Regular... 4308816 
2842275 2772400 1477640 2 done.
/Courier 6 7 8 9 10 11 12 14 16
/HelveticaLoading NimbusSans-Regular font from 
/usr/share/ghostscript/9.50/Resource/Font/NimbusSans-Regular... 4395128 3043690 
2792600 1499460 3 done.
 6 7 8 9 10 11 12 14 16
%%BoundingBox: 28 18 282 764
%%HiResBoundingBox: 28.547999 18.251999 281.375991 763.055977
>>showpage, press <return> to continue<<

ubuntu@focalvm:~$

** Description changed:

  [Impact]
   * The command line syntax `gs [options] -- <input_file>` fails
     to load in the input file with a "permission denied" error.
   * Per the ghostscript documentation, the `--` syntax is used as follows:
        "-- filename arg1 ...
         Takes the next argument as a file name as usual,
         but takes all remaining arguments (even if they
         have the syntactic form of switches) and defines
         the name ARGUMENTS in userdict (not systemdict)
         as an array of those strings, before running the
         file. When Ghostscript finishes executing the file,
         it exits back to the shell."
  
  [Test Plan]
  ---------- to be performed in a desktop environment ----------
   * Obtain a valid input file for ghostscript. The Source package
     contains an `examples/` directory with plenty to choose from.
   * `gs -- <input-file>`
   * Observe that the test failed with a "permission denied" error.
   * Install the version of ghostscript from focal-proposed.
   * `gs -- <input-file>`
   * Observe that the command succeeds and a ghostscript window.
     appears with the output of the `gs` command.
  
- In addition see comment 6 and comment 2 for two more items in the test
- plan. -- ~racb
+ ------------------------ Test Plan 2 --------------------------
+  * Run ocrfeeder from a terminal
+  * Click File -> Import PDF
+  * Select a PDF file
+  * Note that no pages are displayed, and ocrfeeder throws a
+    "Permission denied" error in the terminal from which it
+    was launched
+  * Install ghostscript from -proposed
+  * Run ocrfeeder from a terminal and attempt to import the PDF
+    file again
+  * Note that the pages of the PDF are displayed in ocrfeeder
+    and no error is reported in the terminal
+ 
+ ------------------------- Test Plan 3 ---------------------------
+  * Using the version of ghostscript in -proposed, run a variety
+    of different commands to ensure there has been no regression.
+       * gs <input file>
+       * gs -r300x300 -sPAPERSIZE=letter \
+            -sOUTPUTFILE=waterfal.jpg \
+            -dNOPAUSE -dBATCH <input file>
+       * gs -r300x300 -sPAPERSIZE=letter \
+            -sOUTPUTFILE=waterfal.jpg \
+            -dNOPAUSE -dBATCH -- <input file>
  
  [Regression Potential]
   * Since this patch affects command line processing, it is possible
     that other arguments or command line syntaxes could be affected.
  
  [Original Description]
  Ghostscript 9.50 exhibits https://bugs.ghostscript.com/show_bug.cgi?id=701894 
(fix the '--' and co options) which causes (eg) ocrfeeder to fail to load PDF 
files: an input file specified using the "... -- filename ..." command line 
syntax has no read permission in the GS interpreter.
  
  This commit fixes it:
  
  
http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=24ec06a27df63297796a379c95ee5d4b39040410
  
  GS 9.52 includes the commit.
  
  Either apply the fix from the linked commit in the Focal-Updates
  version, or upgrade it to 9.52.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to ghostscript in Ubuntu.
https://bugs.launchpad.net/bugs/1913656

Title:
  `gs [options] -- <input_file>` fails with "permission denied"

Status in ghostscript package in Ubuntu:
  Fix Released
Status in ghostscript source package in Focal:
  Fix Committed

Bug description:
  [Impact]
   * The command line syntax `gs [options] -- <input_file>` fails
     to load in the input file with a "permission denied" error.
   * Per the ghostscript documentation, the `--` syntax is used as follows:
        "-- filename arg1 ...
         Takes the next argument as a file name as usual,
         but takes all remaining arguments (even if they
         have the syntactic form of switches) and defines
         the name ARGUMENTS in userdict (not systemdict)
         as an array of those strings, before running the
         file. When Ghostscript finishes executing the file,
         it exits back to the shell."

  [Test Plan]
  ---------- to be performed in a desktop environment ----------
   * Obtain a valid input file for ghostscript. The Source package
     contains an `examples/` directory with plenty to choose from.
   * `gs -- <input-file>`
   * Observe that the test failed with a "permission denied" error.
   * Install the version of ghostscript from focal-proposed.
   * `gs -- <input-file>`
   * Observe that the command succeeds and a ghostscript window.
     appears with the output of the `gs` command.

  ------------------------ Test Plan 2 --------------------------
   * Run ocrfeeder from a terminal
   * Click File -> Import PDF
   * Select a PDF file
   * Note that no pages are displayed, and ocrfeeder throws a
     "Permission denied" error in the terminal from which it
     was launched
   * Install ghostscript from -proposed
   * Run ocrfeeder from a terminal and attempt to import the PDF
     file again
   * Note that the pages of the PDF are displayed in ocrfeeder
     and no error is reported in the terminal

  ------------------------- Test Plan 3 ---------------------------
   * Using the version of ghostscript in -proposed, run a variety
     of different commands to ensure there has been no regression.
        * gs <input file>
        * gs -r300x300 -sPAPERSIZE=letter \
             -sOUTPUTFILE=waterfal.jpg \
             -dNOPAUSE -dBATCH <input file>
        * gs -r300x300 -sPAPERSIZE=letter \
             -sOUTPUTFILE=waterfal.jpg \
             -dNOPAUSE -dBATCH -- <input file>

  [Regression Potential]
   * Since this patch affects command line processing, it is possible
     that other arguments or command line syntaxes could be affected.

  [Original Description]
  Ghostscript 9.50 exhibits https://bugs.ghostscript.com/show_bug.cgi?id=701894 
(fix the '--' and co options) which causes (eg) ocrfeeder to fail to load PDF 
files: an input file specified using the "... -- filename ..." command line 
syntax has no read permission in the GS interpreter.

  This commit fixes it:

  
http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=24ec06a27df63297796a379c95ee5d4b39040410

  GS 9.52 includes the commit.

  Either apply the fix from the linked commit in the Focal-Updates
  version, or upgrade it to 9.52.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ghostscript/+bug/1913656/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to