<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to PcsiKitBuilding</title><link>https://sourceforge.net/p/vms-ports/wiki/PcsiKitBuilding/</link><description>Recent changes to PcsiKitBuilding</description><atom:link href="https://sourceforge.net/p/vms-ports/wiki/PcsiKitBuilding/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 03 May 2013 04:03:59 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/vms-ports/wiki/PcsiKitBuilding/feed" rel="self" type="application/rss+xml"/><item><title>PcsiKitBuilding modified by John Malmberg</title><link>https://sourceforge.net/p/vms-ports/wiki/PcsiKitBuilding/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -109,7 +109,7 @@

 ### Building the source save sets ###

-The **backup_xxx_src.com*( file is used to create typically two backup savesets.  This procedure is typically only run by me on a VMS 8.3 or later system as that has the **/interchange/noconvert** qualifier to make a backup save set of ODS-5 files that is stripped of the original security information.
+The **backup_xxx_src.com** file is used to create typically two backup savesets.  This procedure is typically only run by me on a VMS 8.3 or later system as that has the **/interchange/noconvert** qualifier to make a backup save set of ODS-5 files that is stripped of the original security information.

 An ODS-5 save set is usually needed to preserve the extended filenames.  Before VMS 8.3, an ODS-5 saveset could not be made /interchange.

@@ -120,6 +120,9 @@
 Note that you can use the logical disk program to create an ODS-5 volume on an NFS served volume if you are short of disk space on the VMS system.

 I typically make the backup save sets on only one system and then replicate them to be included in the building of other PCSI kits.
+
+I supply the unmodified source as one save set, and another save set with the VMS specific modifications only.  This is so that if someone wants to verify what was changed it is easy to do so.  I have had problems in debugging some ports like bash 1.4.8 because it is hard to figure out what changes were made for VMS.  In the case of Bash 1.4.8, I can not go back to the GNU bash archives to see what is different because GNU Bash 1.4.x ends at 1.4.7.  So we do not know for sure what the original changes were.
+

 ### Building the PCSI$DESC file ###

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">John Malmberg</dc:creator><pubDate>Fri, 03 May 2013 04:03:59 -0000</pubDate><guid>https://sourceforge.net4d22ca1514799ff9c227838498b4317e58f11f8a</guid></item><item><title>PcsiKitBuilding modified by Bill Pedersen</title><link>https://sourceforge.net/p/vms-ports/wiki/PcsiKitBuilding/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -2,7 +2,7 @@

 ### Overview ###

-Hp has documentation on building PCSI kits which describe the contents of the files and how to build the kits.
+HP has [documentation on building PCSI kits](http://h71000.www7.hp.com/doc/82final/5952/5952pro.html "POLYCENTER Software Installation Utility Developer's Guide") which describe the contents of the files and how to build the kits.

 There is a bunch of information that the documentation leaves out.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bill Pedersen</dc:creator><pubDate>Tue, 30 Apr 2013 03:36:33 -0000</pubDate><guid>https://sourceforge.nete150b2a87c50e30a8520810275f792c13a9ca879</guid></item><item><title>PcsiKitBuilding modified by John Malmberg</title><link>https://sourceforge.net/p/vms-ports/wiki/PcsiKitBuilding/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="pcsi-kit-building"&gt;PCSI Kit Building&lt;/h1&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Hp has documentation on building PCSI kits which describe the contents of the files and how to build the kits.&lt;/p&gt;
&lt;p&gt;There is a bunch of information that the documentation leaves out.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;The PCSI kits basically only understand the ODS-2 character set, even the versions that should support ODS-5 extended character sets.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Case of the file matters when restoring files to an ODS-5 volume.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The PCSI kitting algorithm considers all files with the same filename to be the same file regardless of what directory it is in.&lt;br /&gt;
So if you have two different files named &lt;strong&gt;Readme.&lt;/strong&gt; in two directories, the kitting procedure will only put one version of them in the kit and mark it to be used for both places.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The PCSI version naming convention has a prefix character of &lt;strong&gt;V&lt;/strong&gt; for a release version, and other letters like "T" or "D" which can indicate test or development versions.  The problem is that the the ECO level is not tied to the prefix level for newer kits.  So that if you release an ECO for a test kit, you have to keep that ECO number with the release kit until you increment the major.minor-patch version of the kit.  In practice, this is not a problem as a test version is usually wanted to be installed at the same time as a release version, but in a different directory, so the product name should be different.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open source projects may have multiple files with the same name, and different contents, and may have files in them that use characters that are not legal for ODS-2.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I have noticed that staging some open source projects install staging step creates or updates a file that is also updated or created by other projects.  The PCSI$DESC file used by the kitting procedure allows specifying a versioning system so that older generations do not replace a newer one.  This is something I have tried to use in the past.  I no longer think that is the correct approach, but instead a script to make sure that the file has the correct information for that installation of the product should be supplied and it should be run either at the product install or possibly as part of the startup script run when the system is booted.  This makes it easy to recreate the file if it somehow gets corrupted or deleted.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="kit-and-file-naming"&gt;Kit and File Naming&lt;/h3&gt;
&lt;p&gt;The kitting procedure needs the files it uses for configuration to have the version number of the package encoded in them, and also present in their contents.&lt;/p&gt;
&lt;p&gt;The release notes file that will be installed in the [.syshlp] directory also should also have the version encoded in its name.&lt;/p&gt;
&lt;p&gt;While you can manually create the files with the names, this becomes tedious when making an updates to the version name, as you have to get all the renames and edits correct for the kit to get built and then install properly.&lt;/p&gt;
&lt;p&gt;I recommend instead to have command procedures generate the files based on more generically named input files.&lt;/p&gt;
&lt;p&gt;I have not yet come up with a generic procedure to create PCSI kits.&lt;/p&gt;
&lt;p&gt;I have been creating set of procedures that can be easily customized for a specific package, and then need a minimum of changes for new updates.&lt;/p&gt;
&lt;p&gt;This consists of a master procedure like &lt;strong&gt;pcsi_product_zlib.com&lt;/strong&gt; for ZLIB or &lt;strong&gt;pcsi_product_gnv_bash.com&lt;/strong&gt; for bash.&lt;/p&gt;
&lt;p&gt;This outer procedure then calls 5 other procedures to build each of the files needed for the PCSI kit before actually making the kit.  Replace the &lt;strong&gt;xxx&lt;/strong&gt; with the name of the project as these are not yet generic.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;make_pcsi_xxx_name.com&lt;/strong&gt; This calculates the kit name used for the files and inside the files.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;build_xxx_release_notes.com&lt;/strong&gt; This builds the release notes from a combination of input files.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;backup_xxx_src.com&lt;/strong&gt; This creates a pair of backup save sets for inclusion in the kit.  I build the savesets only once and copy them to where the other VMS versions and architectures can include the save sets.  This can result in a newer backup save set than the target of the kit.  Backup seems to be flexible enough to handle this.  Otherwise I would not be able to preserve the ODS-5 file names and exact case.&lt;br /&gt;
It may require setting up a OpenVMS/Alpha 8.3 or later system to assist in the development.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;build_xxx_pcsi_desc.com&lt;/strong&gt; This reads an input file that contains a manifest of files and directories that will be included in the kit.  It generates the &lt;strong&gt;.pcsi$desc&lt;/strong&gt; file, and also the post processing commands that will add or remove alias links for ODS-5 files, and rename the files to the proper case for the kit.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;build_xxx_pcsi_text.com&lt;/strong&gt; This reads an input file that is used for the building the &lt;strong&gt;.pcsi$text&lt;/strong&gt; file.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once these are done for a package, usually only one of the files that is used to build the release notes needs to be edited when a new PCSI kit version is needed.&lt;/p&gt;
&lt;p&gt;One factor that also affects creating a generic kit building procedure is that for the projects that will accept VMS specific files, they may put them into a directory such as &lt;strong&gt;packages/vms&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id="branding-or-identifying-the-source-of-the-kit"&gt;Branding or Identifying The Source Of The Kit&lt;/h3&gt;
&lt;p&gt;One thing that I deliberately leave out of the kitting command procedures is setting the PCSI Producer information.  This is so that the person packaging the kit identifies the kit as one they built and helps to tell the difference.&lt;/p&gt;
&lt;p&gt;This has a bit to do with branding that kit with the name of the company or individual that created it.&lt;/p&gt;
&lt;p&gt;Related to this, if a product version display allows it, I like to add custom information to it to record the compile time of the version module and even the VMS specific ECO level.&lt;/p&gt;
&lt;p&gt;This is useful when someone reports an issue and when they print the version, you can tell if it is a binary that you built or someone else built.&lt;/p&gt;
&lt;p&gt;The kitting procedures get the producer information from a pair of logical names &lt;strong&gt;GNV_PCSI_PRODUCER&lt;/strong&gt; and &lt;strong&gt;GNV_PCSI_PRODUCER_FULL_NAME&lt;/strong&gt;. The first is used to set the prefix for the kit name.  The second currently is written out to one or more of the input files to the kitting procedure.  It should actually be a reference to a file with a paragraph, but this was not clear to me in the PCSI manual, and I have not had a chance to revise the procedures that I am using.&lt;/p&gt;
&lt;p&gt;The build instructions cover this in the release notes that are added to the product so that if someone takes the trouble to build a PCSI kit, it will be a uniquely prefixed kit for a specific entity.&lt;/p&gt;
&lt;h3 id="handling-duplicate-filenames-and-extended-characters"&gt;Handling Duplicate Filenames and Extended Characters&lt;/h3&gt;
&lt;p&gt;As mentioned before, the PCSI kitbuilding procedure assumes that all files with the same name are the same file, and that it really only supports the ODS-2 character set.&lt;/p&gt;
&lt;p&gt;So you may need a procedure that goes over a staging directory of files to include in the kit.  This procedure would have to have a list of files that need to be renamed before kitting.&lt;/p&gt;
&lt;p&gt;What the procedure can do is use the DCL &lt;strong&gt;SET FILE/ENTER&lt;/strong&gt; command to create ODS-2 unique files for the ones that are in conflict, such as &lt;strong&gt;readme_1.txt&lt;/strong&gt; for the second &lt;strong&gt;readme.txt&lt;/strong&gt; that may be in the distribution kit.&lt;/p&gt;
&lt;p&gt;The procedure should also take a parameter to do a &lt;strong&gt;SET FILE/REMOVE&lt;/strong&gt; on the files that it created.&lt;/p&gt;
&lt;p&gt;The same procedure for handling files like &lt;strong&gt;foo++&lt;/strong&gt; which can be kitted as &lt;strong&gt;foo_pl_pl&lt;/strong&gt; if that hack is needed.&lt;/p&gt;
&lt;p&gt;Most products will not need that hack.&lt;/p&gt;
&lt;p&gt;The kit will be built with post install and pre-uninstall procedures that will take care of creating and removing the entries for the ODS-5 files when the kit is installed on an ODS-5 volume.  The post install procedure will also fix up the case of the files installed to be as the original program expects.&lt;/p&gt;
&lt;h3 id="source-kits"&gt;Source Kits&lt;/h3&gt;
&lt;p&gt;The source should be provided with an open source project in the same kit as the binary.  This satisfies many open source requirements that you make the source available, with out you having to actually maintain a download site or distribution site for years in the future.  While only some licenses require this, it is a good idea in general practice.&lt;/p&gt;
&lt;h3 id="generating-the-pcsi-kit-name"&gt;Generating the PCSI kit name&lt;/h3&gt;
&lt;p&gt;The PCSI kit name is generated from the prefix stored in the &lt;strong&gt;GNV_PCSI_PRODUCER&lt;/strong&gt;, the &lt;strong&gt;GNV_PCSI_PRODUCER_FULL_NAME&lt;/strong&gt; logical name, and then a header file like version.h. for the version information, and also a file name &lt;strong&gt;vms_eco_level.h&lt;/strong&gt; for the VMS ECO level.  If possible it is desirable to also patch the version report of the program to report the VMS ECO level.&lt;/p&gt;
&lt;p&gt;At this time, this is a project specific configuration file because the name of the file with the version information in it may be different, and also the way to parse it.&lt;/p&gt;
&lt;p&gt;So a more generic implementation would require a data file that described both what file(s) to read and how to parse them.&lt;/p&gt;
&lt;h3 id="generating-the-release-notes"&gt;Generating the release notes&lt;/h3&gt;
&lt;p&gt;The release notes are usually generated from three input files.&lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;xxx_release_note_start.txt&lt;/strong&gt; this file contains information to put at the beginning of the release notes.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;readme.&lt;/strong&gt; file from the original source, if the source provides one.&lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;xxx_vms_build_steps.txt&lt;/strong&gt; file that describes how to build and kit the project.  This file should not change much with releases.&lt;/p&gt;
&lt;p&gt;A command procedure is used to combine these as the VMS generate files may be in a different file format than the readme file.&lt;/p&gt;
&lt;h3 id="building-the-source-save-sets"&gt;Building the source save sets&lt;/h3&gt;
&lt;p&gt;The &lt;strong&gt;backup_xxx_src.com*( file is used to create typically two backup savesets.  This procedure is typically only run by me on a VMS 8.3 or later system as that has the &lt;/strong&gt;/interchange/noconvert** qualifier to make a backup save set of ODS-5 files that is stripped of the original security information.&lt;/p&gt;
&lt;p&gt;An ODS-5 save set is usually needed to preserve the extended filenames.  Before VMS 8.3, an ODS-5 saveset could not be made /interchange.&lt;/p&gt;
&lt;p&gt;In my specific build environment, my build environment is on NFS served disks.  This complicates things as VMS backup will not read files from an NFS served disk.&lt;/p&gt;
&lt;p&gt;This means I need an additional command procedure to make sure that a copy of the source files on a real ODS-5 volume is present.&lt;/p&gt;
&lt;p&gt;Note that you can use the logical disk program to create an ODS-5 volume on an NFS served volume if you are short of disk space on the VMS system.&lt;/p&gt;
&lt;p&gt;I typically make the backup save sets on only one system and then replicate them to be included in the building of other PCSI kits.&lt;/p&gt;
&lt;h3 id="building-the-pcsidesc-file"&gt;Building the PCSI$DESC file&lt;/h3&gt;
&lt;p&gt;The PCSI$DESC file contains the post install and pre-install procedures, and also a list of files to install.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;build_xxx_pcsi_desc.com&lt;/strong&gt; procedure reads in a text file named &lt;strong&gt;pcsi_xxx_file_list.txt&lt;/strong&gt; to generate the PCSI$DESC file.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;pcsi_xxx_file_list.txt&lt;/strong&gt; has a format to give simple instructions for building the file.  This format is described in comments to the file.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="sx"&gt;! File list for building a PCSI kit.&lt;/span&gt;
&lt;span class="sx"&gt;! Very simple format so that the parsing logic can be simple.&lt;/span&gt;
&lt;span class="sx"&gt;! links first, directory second, and files third.&lt;/span&gt;
&lt;span class="sx"&gt;!&lt;/span&gt;
&lt;span class="sx"&gt;! link -&amp;gt; file tells procedure to create/remove a link on&lt;/span&gt;
&lt;span class="sx"&gt;!         install/uninstall&lt;/span&gt;
&lt;span class="sx"&gt;! If more than one link, consider using an alias file.&lt;/span&gt;
&lt;span class="sx"&gt;!&lt;/span&gt;
&lt;span class="sx"&gt;! [xxx.yyy]foo.dir is a directory file for the rename phase.&lt;/span&gt;
&lt;span class="sx"&gt;! [xxx.yyy.foo] is a directory file for the create phase.&lt;/span&gt;
&lt;span class="sx"&gt;! Each subdirectory needs to be on its own pair of lines.&lt;/span&gt;
&lt;span class="sx"&gt;!&lt;/span&gt;
&lt;span class="sx"&gt;! [xxx.yyy]file.ext is a file for the rename and add phases.&lt;/span&gt;

&lt;span class="n"&gt;This&lt;/span&gt; &lt;span class="n"&gt;is&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;simpler&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;maintain&lt;/span&gt; &lt;span class="n"&gt;than&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;actual&lt;/span&gt; &lt;span class="n"&gt;PCSI&lt;/span&gt;$&lt;span class="n"&gt;DESC&lt;/span&gt; &lt;span class="n"&gt;format&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;h3 id="building-the-pcsitext-file"&gt;Building the PCSI$TEXT file&lt;/h3&gt;
&lt;p&gt;The &lt;strong&gt;build_xxx_file_list.txt&lt;/strong&gt; is generated from four components.&lt;/p&gt;
&lt;p&gt;The generated product header section.&lt;/p&gt;
&lt;p&gt;The readme file from the distribution if it has one.  It needs to be modified to fit a pcsi$text file format.&lt;/p&gt;
&lt;p&gt;The copying or other licensing file from the distribution if it has one.  It needs to be modified to fit a pcsi$text file format.&lt;/p&gt;
&lt;p&gt;A generated producer section.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;build_xxx_pcsi_desc.com&lt;/strong&gt; puts these together for the proper architecture.  It needs to also set the dependencies on the VMS version and any other PCSI kits that need to also be installed.  Currently I modify the procedure for this.&lt;/p&gt;
&lt;p&gt;A more generic procedure would use a data file to drive the sections.&lt;/p&gt;
&lt;h3 id="putting-it-all-together"&gt;Putting it all together&lt;/h3&gt;
&lt;p&gt;The &lt;strong&gt;pcsi_product_xxx.com&lt;/strong&gt; is used to run all of these procedures as needed to build the kit with one command.&lt;/p&gt;
&lt;p&gt;On VAX/VMS, the product command always prompts to the terminal for confirmation, which is preventing just running a command file.&lt;/p&gt;
&lt;p&gt;I have not determined if I can use the product command on Alpha to build a VAX PCSI kit, especially when it is targeting an older version of VMS to do the install than was was used to build the kit.&lt;/p&gt;
&lt;p&gt;The VAX product command can not make a compressed kit.&lt;/p&gt;
&lt;p&gt;The procedure currently does not ZIP the file, but a future enhancement could be to create self extracting ZIP exe files, or normal ZIP files.&lt;/p&gt;
&lt;h3 id="signing-a-kit"&gt;Signing a kit&lt;/h3&gt;
&lt;p&gt;I have not learned the procedures for signing a kit well enough to try signing a kit.&lt;/p&gt;
&lt;p&gt;For signing to authenticate a kit, the certificate used to sign the kit needs to be signed by a certificate authority that is trusted by the operating system, and unique to the entity building the kit.&lt;/p&gt;
&lt;p&gt;Otherwise a kit being signed or a md5sum for a kit is not really securing the kit from tampering unless the person doing the tampering does not think to either resign the kit or post an a new md5sum at the site of the tampered kit.&lt;/p&gt;
&lt;p&gt;This is something that needs to be looked into further, as HP is sometimes warning if a kit is not signed.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">John Malmberg</dc:creator><pubDate>Mon, 29 Apr 2013 22:43:37 -0000</pubDate><guid>https://sourceforge.net359745e82914ee8121b202ac5093ba378ee62cf1</guid></item></channel></rss>