readme.vms 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. *These are the porting notes to OpenVMS, as of 7 April 2010
  2. by Jose Baars. This file will be installed as
  3. libssh2*.release_notes by the product install kit.
  4. LIBSSH2
  5. -------
  6. LIBSSH2 is a client-side library written in C that aims to
  7. implement the SSH2 protocol. It is an open source project,
  8. to be found at https://libssh2.org.
  9. GNV
  10. ---
  11. The library uses the GNV prefix, on advise of the kind supporter
  12. of the GNV project, John Malmberg.
  13. Installing the PCSI kit
  14. =======================
  15. Prerequisites
  16. -------------
  17. - VMS version 8.3 minimal.
  18. See the remarks at prerequisites for building the kit
  19. - TCP/IP stack, both TCP/IP services and Multinet should work.
  20. See the remarks at prerequisites for building the kit
  21. - HP OPENSSL V1.3 minimal.
  22. See the remarks at prerequisites for building the kit
  23. - JEM ZLIB V1.2-3E1 minimal.
  24. See the remarks at prerequisites for building the kit
  25. The first three dependencies are tested at installation time, and
  26. installation will fail if any these products are not installed.
  27. The ZLIB dependency is not tested by the product installation
  28. procedure, as libssh2 will probably be installed as part of
  29. multiple libraries including zlib.
  30. Install
  31. -------
  32. The kit will install gnv$libssh2.exe in a directory tree that might
  33. already be available on your system if you have installed other gnv*
  34. libraries or utilities.
  35. The directory tree for gnv$libssh2.exe will be like this:
  36. [gnv] -- [usr] -- [include] -- [libssh2] include files for libssh2
  37. [lib] gnv$libssh2_x_y_z.exe
  38. [share] -- [doc] -- [libssh2] libssh2.hlb,
  39. release notes (this file),
  40. libssh2 release notes
  41. optional:
  42. [example] libssh2_examples-x_y_z.bck
  43. [common_src] libssh2-x_y_z_src.bck
  44. By default, it will install the shared image and include files to
  45. SYS$COMMON:[GNV...].
  46. You can override this destination by specifying the destination
  47. directory after /DESTINATION= on the product install command line.
  48. This is particularly of use when installing the library on a cluster
  49. without a common system disk.
  50. Please ignore the following warnings, as the kit is not signed :
  51. %PCSI-I-CANNOTVAL, cannot validate dev:[dir]JCB-AXPVMS-LIBSSH2-V0102-05D20100402-1.PCSI
  52. -PCSI-I-NOTSIGNED, product kit is not signed and therefore has no manifest file
  53. Optionally, you can install a backup saveset with some programming examples,
  54. or a backupo saveset with the complete libssh2 source tree.
  55. you will need to answer 'NO' to the question
  56. 'Do you want the default for all options'.
  57. and 'YES' to either or both the following questions:
  58. Do you want the libssh2 C programming examples ? [NO]
  59. Do you want the complete libssh2 source tree ? [NO]
  60. Post installation tasks
  61. -----------------------
  62. Although we will try to maintain upward compatibility of libssh2,
  63. this can not be guaranteed by the libssh2 project itself for OpenVMS,
  64. nor eternally by us.
  65. To use libssh2 effectively, you will have to define a system logical
  66. to point to the shared image. If you are willing to take the gamble,
  67. define this logical in your systartup like so:
  68. $ define/system/executive gnv$libssh2 dev:[dir..]gnv$libssh2_x_y_z.exe
  69. Optionally, you can install the executbale like so:
  70. $ mc sysgen install dev:[dir..]gnv$libssh2_x_y_z.exe/open/share/header
  71. Link your programs against gnv$libssh2, and when upgrading libssh2
  72. test thoroughly.
  73. If you want to be extra cautious define a system logical like this:
  74. $ define/system/executive gnv$libssh2_x_y_z dev:[dir..]gnv$libssh2_x_y_z.exe
  75. Link programs against gnv$libssh2_x_y_z, and when upgrading libssh2
  76. link against new versions.
  77. It is probably more convenient in the last case to link against the object
  78. library provided in the source backup saveset. Both an uppercase and a
  79. mixed case object library, called libssh2.olb and libssh2_asis.olb
  80. are provided.
  81. Compiling and linking against libssh2
  82. -------------------------------------
  83. The shared image library has a vector table with both uppercase and
  84. mixed case entry points, allowing to link directly against the shared
  85. image wether you need the /NAMES=AS_IS or not.
  86. To link successfully, you MUST use /NAMES=shortened, as some function
  87. names in libssh2 are longer than the VMS maximum of 32 characters.
  88. If you chose to install the examples, you can unpack the backup
  89. saveset by
  90. backup/sel=*.c device:[gnv.usr.share.doc.libssh2.examples]libssh2_examples-x_y_z.bck -
  91. []
  92. They can by compiled and linked by these commands ( provided you have defined
  93. the gnv$libssh2 logical) :
  94. $ cc/include=dev:[gnv.usr.include.libssh2] xxx.c/names=shortened
  95. $ link/opt=sys$input: xxx.obj
  96. gnv$libssh2/share
  97. Building gnv$libssh2
  98. ====================
  99. You can build gnv$libssh2 yourself, which may have advantages, as the library is
  100. in full development, very regularly new features are added.
  101. For production use, it is probably advisable to use a stable version, and
  102. link against that. To check out new features, statically linking against
  103. the object library is probably more practical, to avoid compatibility
  104. issues.
  105. Prerequisites
  106. -------------
  107. You will need to have the following available:
  108. - An Alpha or Itanium VMS system. Due to dependencies on zlib, ssl and ODS-5,
  109. support on VAXen would be cumbersome at least.
  110. - VMS version 8.3 minimal. This is a requirement of gnv$zlibshr.exe against
  111. which shared image library libssh2 is linked. If you use another zlib
  112. to link against, you can make it work under lower versions of VMS.
  113. I have made it work on VMS 7.3-2 with not a lot of difficulty.
  114. Also, if you are not interested in compression, you can choose not
  115. to link against zlib at all; in that case comment out the
  116. #define LIBSSH2_HAVE_ZLIB in libssh2_config.h.
  117. - TCP/IP services or Multinet for OpenVMS.
  118. TCPWare has not been tested.
  119. - The HP OpenSSL product. Of course, with tweaking, you can probably link
  120. it against the OpenSSL library, but that is not what I have used.
  121. - A C compiler. I don't know any other working C compilers than
  122. the DEC/Compac/HP-C compiler on VMS.
  123. - An ODS-5 disk. With tweaking you'll get it to work on an ODS-2
  124. disk, but it is unpractical to do so.
  125. - A version of VMSTAR that understands ODS-5 disks and extended
  126. filenames. Look here:
  127. http://ftp.process.com/ftp/vms-freeware/fileserv/vmstar.zip
  128. - gunzip, available for instance at Steven M Schweda's website:
  129. http://antinode.info/ftp/gzip/gzip-1_3_12b_vms/gzip-1_3_12b_vms.zip
  130. Optional:
  131. - curl, to be found at https://curl.haxx.se
  132. You might want to use curl to download the libssh2 kit directly
  133. to you VMS machine. Interestingly, sftp in curl is implemented using
  134. libssh2, soon to be expected on VMS as well, hopefully.
  135. Downloading libssh2
  136. -------------------
  137. At the website of libssh2, you can find stable and daily gzipped
  138. tarballs. if you have a computer connected to internet you can
  139. download a daily build yourself by a procedure that looks a lot like
  140. this ( fill out your own proxy user/password, set up right symbols to
  141. gunzip, vmstar and curl and set up the libssh2 build version):
  142. $ libssh2_version = "1.2.6"
  143. $!
  144. $ proxy_line = " ""-U"" ""''proxy_userpass'"" ""-x"" ""''proxy_hostport'"" "
  145. $!
  146. $ currentday = f$cvtime(,,"date") - "-" - "-"
  147. $!
  148. $ set def mydev:[mydir.libssh2]
  149. $!
  150. $ if f$search("libssh2-''libssh2_version'-''currentday'.tar.gz") .nes. ""
  151. $ then
  152. $ delete libssh2-'libssh2_version'-'currentday'.tar.gz;*
  153. $ endif
  154. $!
  155. $ curl 'proxy_line' "https://libssh2.org/snapshots/libssh2-''libssh2_version'-''currentday'.tar.gz" -
  156. -o libssh2-'libssh2_version'-'currentday'.tar.gz
  157. $!
  158. $!
  159. $ if f$search("libssh2-''libssh2_version'-''currentday'.tar.;") .nes. ""
  160. $ then
  161. $ delete libssh2-'libssh2_version'-'currentday'.tar.;*
  162. $ endif
  163. $!
  164. $ gunzip libssh2-'libssh2_version'-'currentday'.tar.gz
  165. $!
  166. $ tarfile = f$search("libssh2-''libssh2_version'-''currentday'.tar.;")
  167. $ vmstar xf 'tarfile'
  168. Downloading a stable build will need you to get rid of the currentday.
  169. After the download, you should have a directory tree with a toplevel
  170. directory called [libssh2-x.y.z-yyyymmdd].
  171. One of the subdirectories is called vms.
  172. Getting the libssh2 sources from the source backup in the binary kit
  173. --------------------------------------------------------------------
  174. During installation of the binary kit, you are given the option
  175. of installing the sources. If chosen, a backup saveset with
  176. the complete libssh2 directory is made available in
  177. [gnv.common_src].
  178. By restoring this backup saveset, you end up with the same
  179. set of files as by the direct download from libssh2.org.
  180. Building the library
  181. --------------------
  182. To avoid all kinds of misunderstandings caused by firewalls thinking that
  183. a .com file must be an MS-DOS executable, all command procedures are called
  184. .dcl.
  185. Go to the vms subdirectory in the download tree, and issue the following
  186. command:
  187. @libssh2_make_lib.dcl
  188. This should produce libssh2_x_y_z.exe in this same vms directory.
  189. Building the examples
  190. ---------------------
  191. A number of examples are also part of the full libssh2 delivery.
  192. You can compile and link them either against the object library
  193. produced when building the shared image, or against the shared image
  194. produced in the step before.
  195. You can compile only one of the examples by giving only the
  196. name part of the filename of the example as p1 to the
  197. build procedure:
  198. @libssh2_make_example.dcl
  199. or for instance
  200. @libssh2_make_example.dcl sftp
  201. By default, libssh2_make_example.dcl links to the object libraries
  202. produced by the libssh2_make_lib.dcl procedure. If you want to link
  203. against the shared image library made in the same procedure, invoke
  204. the procedure like so:
  205. @libssh2_make_example.dcl sftp "SHARED"
  206. The procdure defines a process logical gnv$libssh2 pointing to the shared
  207. image library in the directory, which obviously will not survive a logout.
  208. Building the help library
  209. -------------------------
  210. The man pages can be converted to a VMS help library by issuing
  211. this command :
  212. @libssh2_make_help.dcl
  213. It uses a simple but fairly effective c program man2help.c
  214. to achieve this.
  215. Building a PCSI kit
  216. -------------------
  217. When you have built the shared library and the help library,
  218. you can build a PCSI kit by issueing this command:
  219. @libssh2_make_kit.dcl