debianizeKeyring: Package your OpenPGP keyring in Debian package format

View source: R/debianizeKeyring.R

debianizeKeyringR Documentation

Package your OpenPGP keyring in Debian package format

Description

Similar to debianize, this function generates a Debian package, but it specialises on packaging OpenPGP/GnuPG keyrings. The resulting package can be used to provide keys in a Debian package repository, hence enabling secure apt. They are probably easier to handle for users.

Usage

debianizeKeyring(
  gpg.key,
  repo.name,
  repo.root,
  maintainer,
  build.dir = tempdir(),
  keyname = paste0(repo.name, "-keyring"),
  pck.source.dir = file.path(tempdir(), keyname),
  version = "0.01",
  revision = 1,
  distribution = "unstable",
  component = "main",
  urgency = "low",
  URL = NULL,
  changelog = c("new upstream release"),
  description = paste0("OpenPGP keyring for the ", repo.name, " repository\n\n",
    "Provides the keyring for Debian packages hosted at the ", repo.name,
    " repository. It is necessary to be able to use secure apt."),
  actions = c("bin", "src"),
  overwrite = c("changelog", "control", "copyright", "install", "rules", "compat"),
  bin.opts = "-rfakeroot -b -uc",
  compat = 10,
  epoch = NULL,
  keyring = NULL,
  gpg.version = 2,
  sign.key = gpg.key,
  compression = "xz",
  keep.build = FALSE,
  deb.dir = "deb"
)

Arguments

gpg.key

Character string or vector, the OpenPGP key ID(s) for the key(s) that should be included in the package. All keys must be available in your keyring (or in the one specified by keyring).

repo.name

Character string, name of the repository this keyring will be used for. Must not include spaces or special characters!

repo.root

Character string, valid path to a directory where to build/update a local package repository.

maintainer

Character string, name an mail address of the maintainer of the keyring package, in the format of firstName lastName <your@mail.address>.

build.dir

Character string, valid path to a directory where to build the package. If this directory is not empty, a temporary directory will be created inside automatically.

keyname

Character string, a name for keyring. Will be used for both the exported keyring file and debian package name. Using something like "myrepo-keyring" is a good choice.

pck.source.dir

Character string, path pointing to the root directory of the keyring package sources. If this directory does not exist yet, it will be created and filled with the necessary files.

version

Numeric or a character string, the main Debian package version indicator for the keyring package.

revision

Numeric or a character string, the Debian package revision information.

distribution

Character string, the Debain (based) distribution your package is intended for.

component

Character string, the Debain component of the distribution.

urgency

Character string, urgency information for this release (refer to [1] if you want to change this).

URL

Character string, should point to the repository this keyring package is built for.

changelog

Character vector, log entries for the ./debian/changelog file if it is going to be changed.

description

Character string, some description of the keyring package.

actions

Character vector, naming the actions to perform:

"bin"

Build the Debian package.

"src"

Build a Debian source package.

overwrite

Character vector, naming the files which should be updated:

"changelog"

Update ./debian/changelog, but only if no entry for this package version and revision is there yet

"compat"

Re-write ./debian/compat

"control"

Re-write ./debian/control

"copyright"

Re-write ./debian/copyright

"postinst"

Re-write ./debian/postinst

"prerm"

Re-write ./debian/prerm

"rules"

Re-write ./debian/rules

"gpg.key"

Re-write the exported key in ./keyrings/

bin.opts

Character string, options to pass through to dpkg-buildpackage for the "bin" action.

compat

Integer value, specifying the debhelper compatibility level.

epoch

Integer value, the Debian package epoch information.

keyring

Character string, path to an additional keyring file to use.

gpg.version

Integer number, specifiying the GnuPG major version number. By default gpg2 is assumed.

sign.key

Character string, the OpenPGP key ID for the key that should be used for signing the Release file (secure apt). This key must be available in your keyring (or in the one specified by keyring). Skipped if NULL.

compression

Character string, compression format for Debian source packages. Currently "xz" and "gzip" are supported.

keep.build

Logical. If build.dir is not pck.source.dir, work is done in generated folder with a random name. Usually it is removed afterwards, unless you set this option to TRUE.

deb.dir

Character string, name to use for the root directory of the debian repository. See debianize for details.

See Also

debianize.

Examples

## Not run: 
debianizeKeyring(
  gpg.key="DDCDA632",
  repo.name="doelle",
  repo.root="/var/www/repo",
  maintainer="A. Sistent <sistent@eternalwondermaths.example.org>"
)

## End(Not run)

unDocUMeantIt/roxyPackage documentation built on July 26, 2024, 5:57 p.m.