Anatomy of a WarpIN repository

Wikis > Package Manager > Anatomy of a WarpIN repository

What is a WarpIN repository?

Simply put, a WarpIN repository is a directory on a server somewhere (localhost, another system on the LAN, remote server across the internet) containing one or more WarpIN packages, or .WPI files. In addition to the WarpIN packages themselves, the directory should also contain the catalog file, and the directory content should be readable (with or without authentication) by whatever systems are to have access to it.

Creating a repository catalog (.WIR) file

Support for creating WarpIN repositories was added to WarpIN’s wic utility in version 1.0.21. Essentially, a WarpIN repository consists of a tab-delimited catalog (or .WIR) file (with pointers to all WarpIN packages and their associated WarpIN archives (.WPI or self-extracting .EXE files), archive metadata, and optional MD5 checksum and package file size (created by xternal processes and appended to the catalog file).

Example line in a .WIR file:

"Arca Noae\Arca Noae Package Manager\Program\1\0\1\0" "ANPM.WPI" 2e83afb6117ff3316946d9c8f42168d9 1177806

In the above example, the vendor, archive name, package name, and version are listed in the first field, followed by the archive name in which that package may be found, the externally-processed MD5 checksum of the package and the size of the package, in bytes.

To create a .WIR file, wic’s -m (Make Repository) option is used against a given filemask in the current directory and the output is redirected to a file:

[c:\my-wpi-repository] runwic -m *.WPI > my-wpi-repository.wir

The above will catalog all .WPI files in the current directory to my-wpi-repository.wir. ANPM expects all files to exist in the directory referenced in the repository definition, e.g., http://host.domain.tld/wpi/my-wpi-repository/. The .WIR file should also exist in this location for ANPM to find it and compare with its last-downloaded version (ANPM will download a fresh copy when the local one becomes stale).

As added sanity checks, the MD5 checksum and the file size may be appended to each line of the .WIR file using whatever script is handy. The Perl script we use was written by Steven Levine (with our sincere thanks and appreciation), licensed under GPL, and is available here, though anything which can append the data to each record in the file will suffice. (ANPM will validate the checksum and size of the downloaded file to the record in the .WIR file automatically, if present).

Once you have your .WIR file in place, add your repository location to ANPM, using the stem of the file as the repository name. ANPM will then access the configured URI (appending “/<repository-name>.wir”) and store it locally as repo_1.wir, repo_2.wir (assuming a second WPI repository), and so forth.

Self-extracting WarpIN files may also be cataloged, i.e., my-file.exe. Simple specify *.EXE as the filemask.

Limitations

WarpIN archives which make heavy use of REXX to generate otherwise static strings (version numbers, etc.) cannot be automatically cataloged using the -m option. REXX is not processed for this operation, so the variables will never be converted to values. In these instances, it is necessary to create a manual entry for the package by carefully (did we say carefully?) editing the .WIR file to add the proper metadata. Post-prociessing scripts, such as the Perl script mentioned above, may still be used once the basic data has been added to the file.

Acknowledgements

Many thanks go to Paul Ratcliffe, the current WarpIN maintainer, for implementing this feature and for working patiently with us while we tested and refined the parameters of what we wanted ANPM to be able to accomplish.

This entry last updated: by Lewis Rosenthal