Closed Bug 246349 Opened 20 years ago Closed 12 years ago

[ps] Printing broken on OpenVMS

Categories

(Core :: Printing: Output, defect)

DEC
OpenVMS
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: colin, Assigned: colin)

Details

Attachments

(2 obsolete files)

Printing isn't working on OpenVMS any more. Something got changed, probably the
work for bug 168614, and now we can't print.
Attached patch Patch (obsolete) — Splinter Review
This fixes the printing problem. I know its too late for checkin for 1.7, so
I'll try to get it checked in soon.
A little more detail about what the problem was.

First, we can't use the temp directory idea on OpenVMS, because the print file
can NOT be deleted as soon as its queued. The file has to exist AT THE TIME it
is physically printed. So on OpenVMS we use a PRINT /DELETE command to achive
this. Consequently, if we created a temp dir for each print operation, we'd end
up with a bunch of stranded temp dirs. So we don't want the temp dir code for
OpenVMS.

Second, the print file location is now honoring TMP (etc), so we end up with a
print file name of something like /tmp/12345678.tmp. While this UNIX format file
spec is fine for all the C code, the VMS print command can NOT accept a UNIX
style file name, so we have to convert it to VMS style. 

Third, since the print file name now ends in ".tmp" we don't need to append a
"." to the file name any more.
Status: NEW → ASSIGNED
Drivers: Requesting blocking for 1.7. Apparently, printing is broken on OpenVMS.
The patch is specific to VMS to it wouldn't impact other platforms.

Colin: The code for submitting print jobs has been reworked on the trunk, so a
completely different patch would be needed. See gfx/src/ps/nsPrintJobPS.h and
.cpp. However, we should try to fix this for 1.7, drivers willing. I don't know
much about openVMS so I'll have to take your word about the issues involved.

First of all, what is |GENERIC_EXTERNAL_NAME()|? Lxr says it doesn't appear in
the source tree right now; is it supplied by a VMS header?

Placing temporary files directly in TMPDIR instead of creating a subdirectory
has an impact on security. The subdirectories are there to prevent a
symbolic-link attack. Perhaps it'd be better to create a third file not using
the tempfile mechanism, and copy the contents of the temp files into that for
printing.
Flags: blocking1.7?
> First of all, what is |GENERIC_EXTERNAL_NAME()|? Lxr says it doesn't appear in
> the source tree right now; is it supplied by a VMS header?

Yes. Its part of the porting library that is used to build Mozilla.

> Placing temporary files directly in TMPDIR instead of creating a subdirectory
> has an impact on security. The subdirectories are there to prevent a
> symbolic-link attack. 

OpenVMS has perfectly adequate protection mechanisms to prevent one user from
accessing another users files, without having to play games pretending to hide
files. Also OpenVMS doesn't have symbolic links.

> Perhaps it'd be better to create a third file not using
> the tempfile mechanism, and copy the contents of the temp files into that for
> printing.

Using TMP or TMPDIR etc is fine. The "secret directory" hack isn't needed for
OpenVMS.

I'm not convinced that we need to hold 1.7 up for this (I think I'm the only one
doing OpenVMS builds and I know to include this patch in the build). Then I can
fix it for real in the new trunk code and check that in.
Well, since 1.7 is going to be maintained as a stable branch, we need to fix the
branch sooner or later. IMHO it would be nice to have the fix in the final
source release, but it's not really my decision.
Summary: Printing broken → [ps] Printing broken on OpenVMS
Flags: blocking1.7? → blocking1.7-
Attachment #150528 - Flags: review?(kherron+mozilla)
Attachment #150528 - Flags: approval1.7?
Comment on attachment 150528 [details] [diff] [review]
Patch

Colin can take this patch into his builds and if it gets reviewed and doesn't
cause any problems in his 1.7 release, we can look at taking it into the 1.7.1
branch.
Attachment #150528 - Flags: approval1.7? → approval1.7-
Can I get an approval for checkin to the trunk from someone? Kenneth??
Comment on attachment 150528 [details] [diff] [review]
Patch

Sorry this took so long; I meant to do this last saturday, but ended up sick in
bed all weekend.

Anyway, r=kherron provided you add some comments explaining why VMS needs to be
handled differently. Because this particular patch is going on a branch, I
suppose a reference back to this bug would be sufficient.
Attachment #150528 - Flags: review?(kherron+mozilla) → review+
Attached patch Revised patch for 1.7 branch (obsolete) — Splinter Review
Slightly revised patch with better comments. This is for the 1.7 branch since
the code on the trunk has been changed for 1.8.
Attachment #150528 - Attachment is obsolete: true
(In reply to comment #0)
> Printing isn't working on OpenVMS any more. Something got changed, probably the
> work for bug 168614, and now we can't print.
Colin: IMO it is *utterly* important to enable XPrint printing support in
OpenVMS.  Noone in my group is able to print with Postscript/default unless the
print command is changed use a script which includes ps2ps. What a pain, what a
nightmare.

:-(
Attachment #151525 - Flags: superreview?(roc)
Attachment #151525 - Flags: approval1.7.2?
Comment on attachment 151525 [details] [diff] [review]
Revised patch for 1.7 branch

a=mkaply for 1.72 when approved.
Attachment #151525 - Flags: approval1.7.2? → approval1.7.2+
Comment on attachment 151525 [details] [diff] [review]
Revised patch for 1.7 branch

check this in, timeless
Attachment #151525 - Flags: superreview?(roc) → superreview+
Comment on attachment 151525 [details] [diff] [review]
Revised patch for 1.7 branch

mozilla/gfx/src/ps/nsPostScriptObj.cpp	1.112.2.1
mozilla/gfx/src/ps/nsTempfilePS.cpp  1.1.2.1
Attachment #151525 - Attachment is obsolete: true
Can someone please verify where this was checked in?

[ ] aviary
[ ] trunk
[ ] 1.7
this is checked in everywhere - should we mark it fixed?
It was my impression this was only checked in on the 1.7 branch. The trunk will
need a different patch, because the code in question was completely rewritten.
The fix was only for 1.7 since the code in 1.8 and later is different.

I don't think I checked it in. I didn't get all the approvals I needed before HP
took me off of Mozilla work (again).
QA Contact: printing
OpenVMS is dead
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: