(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, prev: documentation, next: Python in the OpenVMS environment)

Patches to OpenVMS

This section describes which Patches to OpenVMS might have to be applied.

Patches are available from:

A search machine is available at:

Patches commented:

VAXACRT11_061

There is a bug in some versions of the C RTL. The value of the environment name "TERM", obtained by calling the getenv function, can return a wrong value like this:
>>> import posix
>>> print posix.environ['USER']
ZESSIN
>>> print posix.environ['TERM']
USER=ZESSIN
>>>
This is supposed to be fixed in the VAXACRT01_061 (and later) kits. I had installed VAXACRT11_061 which applies to OpenVMS VAX Versions: V5.5-2, V5.5-2H4, V5.5-2HF, V6.0, V6.1 and the bug has disappeared.
>>> import posix
>>> print posix.environ['TERM']
vt300-80
>>>
Relinking of Python was _not_ necessary. Please check your environment.

It looks OK on OpenVMS Alpha V6.2-1H3 + V7.1, but there are patches (named ALPACRTxx_xxx) for these DEC C RTL versions available, too.

VMS72_SYS/VMS721_SYS

Python interface routines to OpenVMS services do only ensure that a string is small enough to fit in a string descriptor. The actual string length that the service accepts is usually much shorter.

There is a length check problem on OpenVMS Alpha V7.2 and V7.2-1 where a non-privileged user can crash the operating system. You should install the appropriate patch.

JUN-2000: it looks like this patch has been folded into an UPDATE patch - please check with the support center to ensure you have the latest fix and be aware of any dependencies between patches.

Patches to Python

No patches to the Python interpreter are available.

Changes to adapt Python to OpenVMS are documented in 'changes to Python modules' and 'changes to Python source'.

how patching is/was done on OpenVMS

I used the NETSCAPE browser on OpenVMS to download the patches from the URL mentioned above.

Here is an example:

$! -- create a temporary 'work' directory
$ set DEFAULT PYTHON_VMS:
$ set DEFAULT [.PATCHES.WRK]
$ create /DIRECTORY []
$!
$! -- now download the patches and store them in this directory.
$!
$ directory

Directory PYTHON_DISK:[PYTHON.PYTHON-1_5_1.VMS.PATCHES.WRK]

STROPMODULE-1.TXT;1

Total of 1 file.

$! -- find out where the file(s) to be patched are located:
$ search STROPMODULE-1.TXT;1 "RCS file:"
RCS file: /projects/cvsroot/python/dist/src/Modules/stropmodule.c,v
$! -> it's in the [.MODULES] directory -----!!!!!!!
$!
$! -- make a backup copy of the file (optional)
$ backup [---.MODULES]STROPMODULE.C [---.MODULES]*.C$P -
  /BY_OWNER=ORIGINAL
$!
$! -- copy the file into the 'working' directory
$ copy [---.MODULES]STROPMODULE.C []
$!
$! -- OpenVMS POSIX provides the PATCH utility
$ POSIX
$# posix prompt
$patch < stropmodule-1.txt
Hmm...  Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|Index: Modules/stropmodule.c
|===================================================================
|RCS file: /projects/cvsroot/python/dist/src/Modules/stropmodule.c,v
|retrieving revision 2.48
|diff -c -r2.48 stropmodule.c
|*** stropmodule.c      1998/05/22 00:53:47     2.48
|--- stropmodule.c      1998/07/25 04:23:01
--------------------------
Patching file stropmodule.c using Plan A...
Hunk #1 succeeded at 694 (offset -2 lines).
done
$exit
$! -- back at DCL-prompt
$!
$! -- define foreign command for the FILE_SET_DATE utility
$ FSD == "$DKA100:[PYTHON.PYTHON-1_5_1.VMS.TOOLS]FILE_SET_DATE_VAX.EXE"
$!
$! -- find out 'correct' date and time from the patch-file
$ search STROPMODULE-1.TXT "stropmodule.c"
Index: Modules/stropmodule.c
RCS file: /projects/cvsroot/python/dist/src/Modules/stropmodule.c,v
diff -c -r2.48 stropmodule.c
*** stropmodule.c       1998/05/22 00:53:47     2.48
--- stropmodule.c       1998/07/25 04:23:01
$! -------------------> !!!!!!!!!!!!!!!!!!!
$!
$! -- set date and time of the patched file to that in the patch
$ FSD STROPMODULE.C "25-JUL-1998 04:23:01.00"
$! -> don't forget these --------------> !!!
$!
$! -- move the patched file back into the Python-area
$ rename STROPMODULE.C [---.MODULES]*.*;0
$!
$! -- move the patch file to the [.VMS.PATCHES] directory
$ rename STROPMODULE-1.TXT [-]
$!
$! -- move to [.VMS]
$ set DEFAULT [--]
$!
$! -- compile the patched module
$ @DCC_MODULES STROPMODULE
$ @PCC_MODULES STROPMODULE
$!
$! -- create new executables
$ @LINK_PY

The following tasks are necessary to keep the documentation in sync:


(go to: table of contents, index, prev: documentation, next: Python in the OpenVMS environment)

11-JUN-2000 ZE.