buildSPK
Build a Spotfire SPK package file.

Description

Creates a Spotfire SPK package file with Spotfire Enterprise Runtime for R packages suitable for distribution to Spotfire clients.

Usage

buildSPK(listFile = "TERRPackages.dcf", spkFile = "TERRPackages.spk", 
    certificate = "", password = "", timestampUrl = "", 
    repos = "", buildDir = NULL, force = FALSE, version = NULL,
    versioned.filename = FALSE, timestampRFC3161 = NULL, sha256 = NULL,
    spkName = NULL, storeMachine = FALSE, storeName = "", storeCN = "")

Arguments

listFile a character string specifying the path to a Debian Control File (.dcf) listing the packages to build in a Packages field.
spkFile a character string specifying the path to the Spotfire SPK package file to be built. If the file exists, it is overwritten.
certificate a character string specifying the path to a certificate in PFX or PKCS#12 format. The certificate is used to sign the SPK package file. If it is not specified, and the listFile does not contain a Certificate field, the SPK package file is not signed.
password a character string specifying the password that protects the certificate. The certificate and password are used to sign the SPK package file. If not specified, and the listFile does not contain a Password field, you are prompted for the password.
timestampUrl a character string specifying the URL to a timestamp service. Optional; if it is not specified, and the listFile does not contain a TimestampURL field, no timestamp is added.
repos a character vector specifying repository URLs. If it is not an empty string, all packages in the SPK package file are downloaded from the repository. Otherwise, the packages must have been previously installed.
buildDir a character vector specifying an existing directory. If specified, the buildDir is used to assemble the packages for the SPK package file. Otherwise, a temporary directory is created and consequently removed.
force a logical flag. If TRUE, errors about older versions are reduced to warnings. If FALSE (the default), these errors are thrown.
version a character string or numeric_version object that specifies the full version of the SPK package file to build. This version number must contain four components (for example, 1.0.0.0). If NULL (the default), the automatic version number increment rules are applied. See Details for more information.
versioned.filename a logical flag. If TRUE, spkFile is modified to contain the version number of the built package (either before the .spk extension if it is present, or at the end of the filename). If FALSE, spkFile is used verbatim.
timestampRFC3161 a logical flag. If TRUE, use the newer RFC 3161 timestamping protocol when contacting the timestamp service. If not specified, and the listFile does not contain a TimestampRFC3161 field, the older Microsoft Authenticode protocol is used.
sha256 a logical flag. If TRUE, use the SHA-256 hash algorithm when computing file digests. If not specified, and the listFile does not contain a UseSHA256 field, the SHA-1 hash algorithm is used. The use of the SHA-256 hash algorithm implies the use of the RFC 3161 timestamp protocol.
spkName a character string specifying the user-visible name of the generated SPK package. If it is not an empty string, this name is shown to the user in the Spotfire updater. Otherwise, a deafult name is automatically generated.
storeMachine a logical flag. If TRUE, use the Windows "Local Machine" certificate store location when using the storeName and storeCN to sign the SPK package file. Otherwise, use the Windows "Current User" store location.
storeName a character string specifying the name of the certificate store that contains the certificate to sign the SPK package with. If it is an empty string (the default), codesigning from certificate stores is not used. Available store names are dependent on your system; please see https://learn.microsoft.com/en-us/windows/win32/seccrypto/system-store-locations for more information on store names.
storeCN a character string specifying the subject common name (or a substring thereof) of the certificate within the certificate store indicated by storeName to sign the SPK package with. If it is an empty string (the default), codesigning from certificate stores is not used.

Details

The listFile is used to keep track of changes to the SPK package file and should be stored for safe keeping until the SPK package file needs to be updated with new packages. Then just edit the list file and run the function again.
Version number incrementing follows these rules (unless it is overriden by the version argument):
If the version number of the SPK package file is specified via the version argument, and if is the version specified is older than the version number incrementing rules would have created, this function throws an error. This error can be reduced to a warning via the force argument.
Signing the SPK package may be done with two different methods (and controlled by different sets of arguments):
Value
returns invisible NULL.
See Also
buildServerSPK, read.dcf, readLines, install.packages, numeric_version
Examples
# Install and ensure packages work
install.packages(c("plyr", "zoo"))

# Generate a minimal list file writeLines("Packages: plyr,zoo", "SpotfireSPK.dcf")

#pass the generated listFile to buildSPK and build the specified package library(SpotfireSPK) buildSPK("SpotfireSPK.dcf", "SpotfireSPK.spk")

# Print updated list file cat(readLines("SpotfireSPK.dcf"), sep="\n")

Package SpotfireSPK version 6.1.4-13
Package Index