(PYVMS LOGO) Python on OpenVMS

(go to: table of contents, index)

Patches to OpenVMS

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

Patches are available from:

http://www.service.digital.com/

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.

Patches to Python

This section explains which patches to Python itself are available at the time of maintaining this page and which have been applied for PYVMS.

Patches are maintained at:

http://www.python.org/1.5/patches-1.5.1/

Here is a (slightly edited) copy of this page (as of 26-JUL-1998):


Patches for Python 1.5.1

If you find a new bug in Python 1.5.1, please get in touch with me (guido@python.org). Make sure to mention which platform you are using and what the problem is.

Here's a file containing the combined set of patches: patches.all.
Some caveats:

Some web browsers save this file with CRLF line endings on a Unix system; this will make the patch fail. Remove the CR characters with a plain text editor or other tool.
With patch version 2.4 or 2.5 (and maybe other versions), you must set the environment variable POSIXLY_CORRECT to TRUE.
Otherwise patch won't look at the "Index:" lines and it will ask for the filename for each patch.

Individual Patches and Descriptions

Last check/download: 26-JUL-1998 10:06 CET DST.


Patches commented:

ALL patch files that were available at the time of writing this have been downloaded and stored in [.VMS.PATCHES]. Note: the ODS-2 filesystem does not allow a file name with multiple dots (".") in it so names have been slightly altered:
E.g.: freeze.1.txt to freeze-1.txt.

Note: patch comments are listed in alphabetical order. CDT indicates the files' creation date and time that has been taken from the patch file (*.TXT) and applied to the patched file using the FILE_SET_DATE tool.

The process of how the patching was done on OpenVMS is described after this section. Click HERE to skip next section.

bltinmodule.1.txt

Applied. CDT=superceeded

bltinmodule.2.txt

Applied. CDT=superceeded

bltinmodule.3.txt

Applied. CDT="25-JUL-1998 23:28:53"

ceval.1.txt

Applied. CDT="12-MAY-1998 20:27:36"

classobject.1.txt

Applied. CDT="23-JUL-1998 20:49:29"

configure.1.txt

Not applied - configure is not used on OpenVMS.

configure.2.txt

Not applied - configure is not used on OpenVMS.

The patch to 'config.h.in' (which is stored as CONFIG.H_IN) is not necessary, either.

fileobject.1.txt

Applied. CDT="05-MAY-1998 21:48:45"

freeze.1.txt

Applied. CDT="20-APR-1998 17:53:19"

gzip.1.txt

Applied. CDT="13-MAY-1998 21:49:58"

imaplib.1.txt

Applied. CDT=superceeded

imaplib.2.txt

Applied. CDT="18-MAY-1998 14:39:42"

imaplib.3.txt

Applied. CDT="29-MAY-1998 13:34:03"

import.1.txt

Applied. CDT="19-MAY-1998 15:09:05"

Note: IMPORT.C has been enhanced for OpenVMS since the patch has been made. On OpenVMS VAX V6.1 with patch VAXACRT11_061 it was not possible to do '>>> import test.autotest', because the stat() function did not check if files with a blank type can represent a directory file.

Example: if the path is '/x/y/z/d', then stat() should check for a file '/x/y/z/d.DIR'.

longobject.1.txt

Applied. CDT="25-JUL-1998 12:42:02"

object.1.txt

Applied. CDT="21-APR-1998 22:25:01"

parsermodule.1.txt

Applied. CDT="21-APR-1998 22:31:45"

pcre.1.txt

Applied. 3 files. CDT="07-MAY-1998 15:22:5%"
pcre-int.h, pcre.h, pypcre.c

sgmllib.1.txt

Applied. CDT="16-APR-1998 21:04:26"

sgmllib.2.txt

Applied. CDT="26-MAY-1998 22:48:53"

socketserver.1.txt

Applied. CDT="25-JUL-1998 02:27:33"

string.1.txt

Applied. CDT="20-APR-1998 14:01:00"

stringobject.1.txt

Applied. CDT="09-JUN-1998 15:01:53"

stropmodule.1.txt

Applied. CDT="25-JUL-1998 04:23:01"

timemodule.1.txt

Applied, after edits for PYVMS done!
Comments from the patch utility:
Hunk #1 succeeded at 325 (offset 21 lines).
Hunk #2 succeeded at 344 (offset 21 lines).

urllib.1.txt

Applied. CDT=superceeded

urllib.2.txt

Applied. CDT="05-MAY-1998 13:58:13"

zlibmodule.1.txt

Applied. CDT="22-APR-1998 21:32:0"

_tkinter.1.txt

Applied. CDT="20-APR-1998 18:19:51"

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 DKA100:[PYTHON.PYTHON-1_5_1.VMS.PATCHES.WRK]
$ CREATE /DIRECTORY []
$!
$! -- now download the patches and store them in this directory.
$!
$ DIRECTORY

Directory DKA100:[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
$ @LINKD_PY
$ @LINKP_PY

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


(go to: table of contents, index)

19-AUG-1998 ZE.