rpm 5.2.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Typedefs | Functions | Variables
rpmrepo.c File Reference
`#include "system.h"`
`#include <rpmio_internal.h>`
`#include <fts.h>`
`#include <argv.h>`
`#include <mire.h>`
`#include <poptIO.h>`
`#include <rpmtypes.h>`
`#include <rpmtag.h>`
`#include <pkgio.h>`
`#include <rpmts.h>`
`#include "debug.h"`
`#include "yum_primary_xml"`
`#include "yum_filelists_xml"`
`#include "yum_other_xml"`
`#include "wnh_primary_yaml"`
`#include "wnh_filelists_yaml"`
`#include "wnh_other_yaml"`
`#include "deb_Packages"`
`#include "deb_Sources"`
`#include "yum_primary_sqlite"`
`#include "yum_filelists_sqlite"`
`#include "yum_other_sqlite"`
Include dependency graph for rpmrepo.c:

Go to the source code of this file.

## Data Structures
struct | rpmrfile_s
| Repository metadata file. More...
struct | rpmrepo_s
| Repository. More...

## Typedefs
typedef struct rpmrepo_s * | rpmrepo
typedef struct rpmrfile_s * | rpmrfile

## Functions
static void | repo_error (int lvl, const char *fmt,...)
| Print an error message and exit (if requested). More...
static void | repoProgress (rpmrepo repo, const char *item, int current, int total)
| Display progress. More...
static int | rpmioExists (const char *fn, struct stat *st)
| Return stat(2) for a file. More...
static time_t | rpmioCtime (const char *fn)
| Return stat(2) creation time of a file. More...
static const char * | repoRealpath (const char *lpath)
| Return realpath(3) canonicalized absolute path. More...
static int | repoMkdir (rpmrepo repo, const char *dn)
| Create directory path. More...
static const char * | repoGetPath (rpmrepo repo, const char *dir, const char *type, int compress)
| Return /repository/directory/component.markup.compression path. More...
static int | repoTestSetupDirs (rpmrepo repo)
| Test for repository sanity. More...
static int | chkSuffix (const char *fn, const char *suffix)
| Check file name for a suffix. More...
static const char ** | repoGetFileList (rpmrepo repo, const char *roots[], const char *ext)
| Walk file/directory trees, looking for files with an extension. More...
static int | repoCheckTimeStamps (rpmrepo repo)
| Check that repository time stamp is newer than any contained package. More...
static int | rfileXMLWrite (rpmrfile rfile, const char *spew)
| Write to a repository metadata file. More...
static int | repoFclose (rpmrepo repo, FD_t fd)
| Close an I/O stream, accumulating uncompress/digest statistics. More...
static int | repoOpenMDFile (const rpmrepo repo, rpmrfile rfile)
| Open a repository metadata file. More...
static Header | repoReadHeader (rpmrepo repo, const char *path)
| Read a header from a repository package file, computing package file digest. More...
static const char * | rfileHeaderSprintf (Header h, const char *qfmt)
| Return header query. More...
static int | repoWriteMDFile (rpmrepo repo, rpmrfile rfile, Header h)
| Export a single package's metadata to repository metadata file(s). More...
static int | repoWriteMetadataDocs (rpmrepo repo, const char **pkglist)
| Export all package metadata to repository metadata file(s). More...
static int | repoRfileDigest (const rpmrepo repo, rpmrfile rfile, const char **digestp)
| Compute digest of a file. More...
static int | repoCloseMDFile (const rpmrepo repo, rpmrfile rfile)
| Close a repository metadata file. More...
static int | repoDoPkgMetadata (rpmrepo repo)
| Write repository metadata files. More...
static const char * | algo2tagname (uint32_t algo)
static const char * | repoMDExpand (rpmrepo repo, rpmrfile rfile)
| Return a repository metadata file item. More...
static int | repoDoRepoMetadata (rpmrepo repo)
| Write repository manifest. More...
static int | repoDoFinalMove (rpmrepo repo)
| Rename temporary repository to final paths. More...
static void | repoArgCallback (poptContext con, enum poptCallbackReason reason, const struct poptOption *opt, const char *arg, void *data)
int | main (int argc, char *argv[])

## Variables
static int | _repo_debug
static const char | primary_xml_init []
static const char | primary_xml_fini [] = "</metadata>\n"
static const char | filelists_xml_init []
static const char | filelists_xml_fini [] = "</filelists>\n"
static const char | other_xml_init []
static const char | other_xml_fini [] = "</otherdata>\n"
static const char | repomd_xml_init []
static const char | repomd_xml_fini [] = "</repomd>\n"
static const char | primary_xml_qfmt [] =
static const char | filelists_xml_qfmt [] =
static const char | other_xml_qfmt [] =
static const char | primary_yaml_qfmt [] =
static const char | filelists_yaml_qfmt [] =
static const char | other_yaml_qfmt [] =
static const char | Packages_qfmt [] =
static const char | Sources_qfmt [] =
static const char * | primary_sql_init []
static const char * | filelists_sql_init []
static const char * | other_sql_init []
static const char | primary_sql_qfmt [] =
static const char | filelists_sql_qfmt [] =
static const char | other_sql_qfmt [] =
static struct rpmrepo_s | __rpmrepo
static rpmrepo | _rpmrepo = &__rpmrepo
static int | compression = -1
static struct poptOption | repoCompressionPoptTable []
static struct poptOption | optionsTable []

## Typedef Documentation

typedef struct rpmrepo_s* rpmrepo

Definition at line 67 of file rpmrepo.c.

typedef struct rpmrfile_s* rpmrfile

Definition at line 68 of file rpmrepo.c.

## Function Documentation

static const char* algo2tagname | ( | uint32_t | algo | ) |
| static

Definition at line 1471 of file rpmrepo.c.

References PGPHASHALGO_ADLER32, PGPHASHALGO_CRC32, PGPHASHALGO_CRC64, PGPHASHALGO_HAVAL_5_160, PGPHASHALGO_JLU32, PGPHASHALGO_MD2, PGPHASHALGO_MD4, PGPHASHALGO_MD5, PGPHASHALGO_NONE, PGPHASHALGO_RIPEMD128, PGPHASHALGO_RIPEMD160, PGPHASHALGO_RIPEMD256, PGPHASHALGO_RIPEMD320, PGPHASHALGO_SALSA10, PGPHASHALGO_SALSA20, PGPHASHALGO_SHA1, PGPHASHALGO_SHA224, PGPHASHALGO_SHA256, PGPHASHALGO_SHA384, PGPHASHALGO_SHA512, and PGPHASHALGO_TIGER192.

Referenced by repoDoRepoMetadata(), and repoMDExpand().

static int chkSuffix | ( | const char * | fn,
|  | const char * | suffix
| ) |  |
| static

Check file name for a suffix.

Parameters

  fn | file name
  suffix | suffix

Returns
  1 if file name ends with suffix

Definition at line 758 of file rpmrepo.c.

Referenced by repoGetFileList().

int main | ( | int | argc,
|  | char * | argv[]
| ) |  |

Definition at line 1945 of file rpmrepo.c.

References _, __progname, _free(), _rpmrepo, _rpmsw_stats, _rpmts_stats, _RPMVSF_NOSIGNATURES, rpmrepo_s::algo, argvAdd(), argvAppend(), argvCount(), argvFree(), argvPrint(), argvSort(), rpmrepo_s::basedir, rpmrepo_s::checkts, rpmrepo_s::compression, rpmrfile_s::digest, rpmrepo_s::directories, rpmrepo_s::dryrun, errno, rpmrepo_s::exclude_patterns, rpmrepo_s::excludeMire, rpmrepo_s::filelists, FTS_LOGICAL, FTS_PHYSICAL, rpmrepo_s::ftsoptions, rpmrepo_s::include_patterns, rpmrepo_s::includeMire, rpmrepo_s::manifests, MAXPATHLEN, mireFreeAll(), mireLoadPatterns(), rpmrepo_s::nexcludes, rpmrepo_s::nincludes, rpmrepo_s::other, rpmrepo_s::outputdir, PGPHASHALGO_SHA1, rpmrepo_s::pkgcount, rpmrepo_s::pkglist, rpmrepo_s::primary, repo_error(), repoCheckTimeStamps(), repoDoFinalMove(), repoDoPkgMetadata(), repoDoRepoMetadata(), repoGetFileList(), rpmrepo_s::repomd, repoRealpath(), repoTestSetupDirs(), rpmExpand(), rpmGenPath(), rpmGetPath(), rpmioDigestHashAlgo, rpmioFini(), rpmioFtsOpts, rpmioInit(), RPMMIRE_GLOB, rpmtsCreate(), rpmtsFree(), rpmtsSetVSFlags(), rpmrepo_s::split, Stat(), rpmrepo_s::suffix, tagClean(), rpmrepo_s::ts, URL_IS_DASH, URL_IS_UNKNOWN, urlPath(), rpmrepo_s::wmode, xstrdup(), and rpmrfile_s::Zdigest.

static void repo_error | ( | int | lvl,
|  | const char * | fmt,
|  |  | ...
| ) |  |
| static

Print an error message and exit (if requested).

Parameters

  lvl | error level (non-zero exits)
  fmt | msg format

Definition at line 526 of file rpmrepo.c.

References __progname, and EXIT_FAILURE.

Referenced by main(), repoCheckTimeStamps(), repoCloseMDFile(), repoDoFinalMove(), repoDoRepoMetadata(), repoGetFileList(), repoMkdir(), repoOpenMDFile(), repoTestSetupDirs(), repoWriteMetadataDocs(), rfileHeaderSprintf(), and rfileXMLWrite().

static void repoArgCallback | ( | poptContext | con,
|  | enum poptCallbackReason | reason,
|  | const struct poptOption * | opt,
|  | const char * | arg,
|  | void * | data
| ) |  |
| static

Definition at line 1830 of file rpmrepo.c.

References _, __progname, _rpmrepo, EXIT_FAILURE, and rpmrepo_s::verbose.

static int repoCheckTimeStamps | ( | rpmrepo | repo | ) |
| static

Check that repository time stamp is newer than any contained package.

Parameters

  repo | repository

Returns
  0 on success

Definition at line 840 of file rpmrepo.c.

References _, rpmrepo_s::checkts, rpmrepo_s::mdtimestamp, rpmrepo_s::pkglist, repo_error(), and rpmioExists().

Referenced by main().

static int repoCloseMDFile | ( | const rpmrepo | repo,
|  | rpmrfile | rfile
| ) |  |
| static

Close a repository metadata file.

Parameters

  repo | repository
  rfile | repository metadata file

Returns
  0 on success

Definition at line 1342 of file rpmrepo.c.

References _, _free(), rpmrepo_s::algo, rpmrfile_s::ctime, rpmrfile_s::digest, rpmrfile_s::fd, fdFiniDigest(), fdGetOPath(), rpmrepo_s::outputdir, rpmrepo_s::quiet, repo_error(), repoFclose(), repoRfileDigest(), rfileXMLWrite(), rpmGetPath(), rpmioCtime(), rpmrepo_s::tempdir, rpmrfile_s::type, rpmrfile_s::xml_fini, xstrdup(), and rpmrfile_s::Zdigest.

Referenced by repoDoPkgMetadata().

static int repoDoFinalMove | ( | rpmrepo | repo | ) |
| static

Rename temporary repository to final paths.

Parameters

  repo | repository

Returns
  0 always

Definition at line 1724 of file rpmrepo.c.

References _, _free(), Closedir(), dirent, errno, rpmrepo_s::finaldir, rpmrepo_s::markup, rpmrepo_s::olddir, Opendir(), rpmrepo_s::outputdir, Readdir(), Rename(), repo_error(), Rmdir(), rpmGetPath(), rpmioExists(), rpmrepo_s::suffix, rpmrepo_s::tempdir, and Unlink().

Referenced by main().

static int repoDoPkgMetadata | ( | rpmrepo | repo | ) |
| static

Write repository metadata files.

Parameters

  repo | repository

Returns
  0 on success

Definition at line 1391 of file rpmrepo.c.

References _free(), argvAdd(), argvCount(), argvFree(), rpmrepo_s::basedir, rpmrepo_s::baseurl, rpmrepo_s::current, rpmrepo_s::directories, rpmrepo_s::filelists, rpmrepo_s::other, rpmrepo_s::pkgcount, rpmrepo_s::pkglist, rpmrepo_s::primary, rpmrepo_s::quiet, Realpath(), repoCloseMDFile(), repoGetFileList(), repoOpenMDFile(), repoWriteMetadataDocs(), rpmGetPath(), and xstrdup().

Referenced by main().

static int repoDoRepoMetadata | ( | rpmrepo | repo | ) |
| static

Write repository manifest.

Parameters

  repo | repository

Returns
  0 on success.

Definition at line 1531 of file rpmrepo.c.

References _, _free(), rpmrepo_s::algo, algo2tagname(), rpmrepo_s::baseurl, rpmrfile_s::fd, rpmrepo_s::filelists, rpmrepo_s::finaldir, Fopen(), rpmrepo_s::markup, rpmrepo_s::other, rpmrepo_s::outputdir, rpmrepo_s::primary, rpmrepo_s::quiet, Rename(), repo_error(), repoFclose(), repoGetPath(), rpmrepo_s::repomd, repoMDExpand(), rfileXMLWrite(), rpmExpand(), rpmGetPath(), rpmioExists(), rpmrepo_s::suffix, rpmrepo_s::tempdir, rpmrfile_s::type, rpmrepo_s::uniquemdfilenames, Unlink(), rpmrepo_s::verbose, rpmrfile_s::xml_fini, rpmrfile_s::xml_init, and xstrdup().

Referenced by main().

static int repoFclose | ( | rpmrepo | repo,
|  | FD_t | fd
| ) |  |
| static

Close an I/O stream, accumulating uncompress/digest statistics.

Parameters

  repo | repository
  fd | I/O stream

Returns
  0 on success

Definition at line 894 of file rpmrepo.c.

References Fclose(), FDSTAT_DIGEST, fdstat_op(), FDSTAT_READ, rpmswAdd(), RPMTS_OP_DIGEST, RPMTS_OP_UNCOMPRESS, rpmtsOp(), and rpmrepo_s::ts.

Referenced by repoCloseMDFile(), repoDoRepoMetadata(), and repoRfileDigest().

static const char** repoGetFileList | ( | rpmrepo | repo,
|  | const char * | roots[],
|  | const char * | ext
| ) |  |
| static

Walk file/directory trees, looking for files with an extension.

Parameters

  repo | repository
  roots | file/directory trees to search
  ext | file extension to match (usually ".rpm")

Returns
  list of files with the extension

Definition at line 774 of file rpmrepo.c.

References _, argvAdd(), argvPrint(), chkSuffix(), errno, rpmrepo_s::excludeMire, Fts_close(), FTS_D, FTS_DP, FTS_F, _ftsent::fts_info, _ftsent::fts_level, _ftsent::fts_name, _ftsent::fts_namelen, Fts_open(), _ftsent::fts_path, Fts_read(), FTS_SL, rpmrepo_s::ftsoptions, rpmrepo_s::includeMire, mireApply(), rpmrepo_s::nexcludes, rpmrepo_s::nincludes, rpmrepo_s::nofollow, and repo_error().

Referenced by main(), and repoDoPkgMetadata().

static const char* repoGetPath | ( | rpmrepo | repo,
|  | const char * | dir,
|  | const char * | type,
|  | int | compress
| ) |  |
| static

Return /repository/directory/component.markup.compression path.

Parameters

  repo | repository
  dir | directory
  type | file

Returns
  repository file path

Definition at line 657 of file rpmrepo.c.

References rpmrepo_s::markup, rpmrepo_s::outputdir, rpmGetPath(), and rpmrepo_s::suffix.

Referenced by repoDoRepoMetadata(), repoOpenMDFile(), repoRfileDigest(), and repoTestSetupDirs().

static const char* repoMDExpand | ( | rpmrepo | repo,
|  | rpmrfile | rfile
| ) |  |
| static

Return a repository metadata file item.

Parameters

  repo | repository

Returns
  repository metadata file item

Definition at line 1509 of file rpmrepo.c.

References rpmrepo_s::algo, algo2tagname(), rpmrfile_s::ctime, rpmrfile_s::digest, rpmrepo_s::finaldir, rpmrepo_s::markup, rpmExpand(), snprintf(), rpmrepo_s::suffix, rpmrfile_s::type, and rpmrfile_s::Zdigest.

Referenced by repoDoRepoMetadata().

static int repoMkdir | ( | rpmrepo | repo,
|  | const char * | dn
| ) |  |
| static

Create directory path.

Parameters

  repo | repository
  dn | directory path

Returns
  0 on success

Definition at line 629 of file rpmrepo.c.

References _, _free(), errno, Mkdir(), rpmrepo_s::outputdir, repo_error(), rpmGetPath(), rpmioMkpath(), URL_IS_UNKNOWN, and urlPath().

Referenced by repoTestSetupDirs().

static int repoOpenMDFile | ( | const rpmrepo | repo,
|  | rpmrfile | rfile
| ) |  |
| static

Open a repository metadata file.

Parameters

  repo | repository
  rfile | repository metadata file

Returns
  0 on success

Definition at line 917 of file rpmrepo.c.

References _, _free(), rpmrepo_s::algo, rpmrfile_s::fd, fdInitDigest(), Fopen(), Fstrerror(), Fwrite(), rpmrepo_s::outputdir, PGPHASHALGO_NONE, rpmrepo_s::pkgcount, repo_error(), repoGetPath(), rpmGetPath(), snprintf(), rpmrfile_s::sql_init, rpmrepo_s::tempdir, rpmrfile_s::type, rpmrepo_s::wmode, and rpmrfile_s::xml_init.

Referenced by repoDoPkgMetadata().

static void repoProgress | ( | rpmrepo | repo,
|  | const char * | item,
|  | int | current,
|  | int | total
| ) |  |
| static

Display progress.

Parameters

  repo | repository
  item | repository item (usually a file path)
  current | current iteration index
  total | maximum iteration index

Definition at line 549 of file rpmrepo.c.

References __progname.

Referenced by repoWriteMetadataDocs().

static Header repoReadHeader | ( | rpmrepo | repo,
|  | const char * | path
| ) |  |
| static

Read a header from a repository package file, computing package file digest.

Parameters

  repo | repository
  path | package file path

Returns
  header (NULL on error)

Definition at line 982 of file rpmrepo.c.

References _, __progname, _free(), rpmrepo_s::baseurl, Fclose(), fdFiniDigest(), fdInitDigest(), Ferror(), Fopen(), Fread(), Fstrerror(), headerFree(), headerSetBaseURL(), headerSetDigest(), PGPHASHALGO_NONE, rpmrepo_s::pkgalgo, RPMRC_FAIL, RPMRC_NOKEY, RPMRC_NOTFOUND, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadPackageFile(), and rpmrepo_s::ts.

Referenced by repoWriteMetadataDocs().

static const char* repoRealpath | ( | const char * | lpath | ) |
| static

Return realpath(3) canonicalized absolute path.

Parameters

  lpath | file path canonicalized absolute path

Definition at line 607 of file rpmrepo.c.

References MAXPATHLEN, Realpath(), and xstrdup().

Referenced by main().

static int repoRfileDigest | ( | const rpmrepo | repo,
|  | rpmrfile | rfile,
|  | const char ** | digestp
| ) |  |
| static

Compute digest of a file.

Returns
  0 on success

Definition at line 1273 of file rpmrepo.c.

References _free(), rpmrepo_s::algo, fdFiniDigest(), fdInitDigest(), Ferror(), Fileno(), Fopen(), Fread(), repoFclose(), repoGetPath(), RPMDIGEST_NONE, rpmDigestFinal(), rpmDigestInit(), rpmDigestUpdate(), rpmioExists(), rpmswEnter(), rpmswExit(), RPMTS_OP_DIGEST, rpmtsOp(), rpmrepo_s::tempdir, rpmrepo_s::ts, rpmrfile_s::type, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by repoCloseMDFile().

static int repoTestSetupDirs | ( | rpmrepo | repo | ) |
| static

Test for repository sanity.

Parameters

  repo | repository

Returns
  0 on success

Definition at line 672 of file rpmrepo.c.

References _, _free(), Access(), rpmrepo_s::checkts, rpmrepo_s::directories, rpmrepo_s::finaldir, rpmrepo_s::mdtimestamp, rpmrepo_s::olddir, rpmrepo_s::outputdir, repo_error(), repoGetPath(), repoMkdir(), rpmGetPath(), rpmioExists(), rpmrepo_s::split, rpmrepo_s::tempdir, and W_OK.

Referenced by main().

static int repoWriteMDFile | ( | rpmrepo | repo,
|  | rpmrfile | rfile,
|  | Header | h
| ) |  |
| static

Export a single package's metadata to repository metadata file(s).

Parameters

  repo | repository
  rfile | repository metadata file
  h | header

Returns
  0 on success

Definition at line 1194 of file rpmrepo.c.

References rfileHeaderSprintf(), rfileXMLWrite(), rpmrfile_s::sql_qfmt, and rpmrfile_s::xml_qfmt.

Referenced by repoWriteMetadataDocs().

static int repoWriteMetadataDocs | ( | rpmrepo | repo,
|  | const char ** | pkglist
| ) |  |
| static

Export all package metadata to repository metadata file(s).

Parameters

  repo | repository
  pkglist | repository packages

Returns
  0 on success

Definition at line 1221 of file rpmrepo.c.

References _, rpmrepo_s::basedir, rpmrepo_s::baseurl, rpmrepo_s::current, rpmrepo_s::directories, errno, rpmrepo_s::filelists, headerFree(), headerSetInstance(), rpmrepo_s::other, rpmrepo_s::pkgcount, rpmrepo_s::primary, rpmrepo_s::quiet, repo_error(), repoProgress(), repoReadHeader(), repoWriteMDFile(), rpmGetPath(), and rpmrepo_s::verbose.

Referenced by repoDoPkgMetadata().

static const char* rfileHeaderSprintf | ( | Header | h,
|  | const char * | qfmt
| ) |  |
| static

Return header query.

Parameters

  h | header
  qfmt | query format

Returns
  query format result

Definition at line 1044 of file rpmrepo.c.

References _, headerSprintf(), and repo_error().

Referenced by repoWriteMDFile().

static int rfileXMLWrite | ( | rpmrfile | rfile,
|  | const char * | spew
| ) |  |
| static

Write to a repository metadata file.

Parameters

  rfile | repository metadata file
  spew | contents

Returns
  0 on success

Definition at line 870 of file rpmrepo.c.

References _, _free(), rpmrfile_s::fd, Fstrerror(), Fwrite(), and repo_error().

Referenced by repoCloseMDFile(), repoDoRepoMetadata(), and repoWriteMDFile().

static time_t rpmioCtime | ( | const char * | fn | ) |
| static

Return stat(2) creation time of a file.

Parameters

  fn | file path

Returns
  st_ctime

Definition at line 589 of file rpmrepo.c.

References rpmioExists().

Referenced by repoCloseMDFile().

static int rpmioExists | ( | const char * | fn,
|  | struct stat * | st
| ) |  |
| static

Return stat(2) for a file.

Return values

  st | stat(2) buffer

Returns
  0 on success

Definition at line 577 of file rpmrepo.c.

References Stat().

Referenced by repoCheckTimeStamps(), repoDoFinalMove(), repoDoRepoMetadata(), repoRfileDigest(), repoTestSetupDirs(), and rpmioCtime().

## Variable Documentation

struct rpmrepo_s __rpmrepo
| static

Definition at line 421 of file rpmrepo.c.

int _repo_debug
| static

Definition at line 65 of file rpmrepo.c.

rpmrepo _rpmrepo = &__rpmrepo
| static

Definition at line 516 of file rpmrepo.c.

Referenced by main(), and repoArgCallback().

int compression = -1
| static

Definition at line 1856 of file rpmrepo.c.

const char* filelists_sql_init[]
| static

Initial value:
= {
"PRAGMA synchronous = \"OFF\";",
"pragma locking_mode = \"EXCLUSIVE\";",
"CREATE TABLE db_info (dbversion INTEGER, checksum TEXT);",
"CREATE TABLE filelist ( pkgKey INTEGER, name TEXT, type TEXT );",
"CREATE TABLE packages ( pkgKey INTEGER PRIMARY KEY, pkgId TEXT);",
"CREATE INDEX filelistnames ON filelist (name);",
"CREATE INDEX keyfile ON filelist (pkgKey);",
"CREATE INDEX pkgId ON packages (pkgId);",
"CREATE TRIGGER remove_filelist AFTER DELETE ON packages\
\n BEGIN\
\n DELETE FROM filelist WHERE pkgKey = old.pkgKey;\
\n END;",
"INSERT into db_info values (9, 'direct_create');",
NULL
}

Definition at line 300 of file rpmrepo.c.

const char filelists_sql_qfmt[] =
| static

Definition at line 403 of file rpmrepo.c.

const char filelists_xml_fini[] = "</filelists>\n"
| static

Definition at line 208 of file rpmrepo.c.

const char filelists_xml_init[]
| static

Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<filelists xmlns=\"http://linux.duke.edu/metadata/filelists\" packages=\"0\">\n"

Definition at line 204 of file rpmrepo.c.

const char filelists_xml_qfmt[] =
| static

Definition at line 231 of file rpmrepo.c.

const char filelists_yaml_qfmt[] =
| static

Definition at line 246 of file rpmrepo.c.

struct poptOption optionsTable[]
| static

Definition at line 1874 of file rpmrepo.c.

const char* other_sql_init[]
| static

Initial value:
= {
"PRAGMA synchronous = \"OFF\";",
"pragma locking_mode = \"EXCLUSIVE\";",
"CREATE TABLE changelog ( pkgKey INTEGER, author TEXT, date INTEGER, changelog TEXT);",
"CREATE TABLE db_info (dbversion INTEGER, checksum TEXT);",
"CREATE TABLE packages ( pkgKey INTEGER PRIMARY KEY, pkgId TEXT);",
"CREATE INDEX keychange ON changelog (pkgKey);",
"CREATE INDEX pkgId ON packages (pkgId);",
"CREATE TRIGGER remove_changelogs AFTER DELETE ON packages\
\n BEGIN\
\n DELETE FROM changelog WHERE pkgKey = old.pkgKey;\
\n END;",
"INSERT into db_info values (9, 'direct_create');",
NULL
}

Definition at line 319 of file rpmrepo.c.

const char other_sql_qfmt[] =
| static

Definition at line 415 of file rpmrepo.c.

const char other_xml_fini[] = "</otherdata>\n"
| static

Definition at line 215 of file rpmrepo.c.

const char other_xml_init[]
| static

Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<otherdata xmlns=\"http://linux.duke.edu/metadata/other\" packages=\"0\">\n"

Definition at line 211 of file rpmrepo.c.

const char other_xml_qfmt[] =
| static

Definition at line 236 of file rpmrepo.c.

const char other_yaml_qfmt[] =
| static

Definition at line 251 of file rpmrepo.c.

const char Packages_qfmt[] =
| static

Definition at line 256 of file rpmrepo.c.

const char* primary_sql_init[]
| static

Initial value:
= {
"PRAGMA synchronous = \"OFF\";",
"pragma locking_mode = \"EXCLUSIVE\";",
"CREATE TABLE conflicts ( pkgKey INTEGER, name TEXT, flags TEXT, epoch TEXT, version TEXT, release TEXT );",
"CREATE TABLE db_info (dbversion INTEGER, checksum TEXT);",
"CREATE TABLE files ( pkgKey INTEGER, name TEXT, type TEXT );",
"CREATE TABLE obsoletes ( pkgKey INTEGER, name TEXT, flags TEXT, epoch TEXT, version TEXT, release TEXT );",
"CREATE TABLE packages ( pkgKey INTEGER PRIMARY KEY, pkgId TEXT, name TEXT, arch TEXT, version TEXT, epoch TEXT, release TEXT, summary TEXT, description TEXT, url TEXT, time_file INTEGER, time_build INTEGER, rpm_license TEXT, rpm_vendor TEXT, rpm_group TEXT, rpm_buildhost TEXT, rpm_sourcerpm TEXT, rpm_header_start INTEGER, rpm_header_end INTEGER, rpm_packager TEXT, size_package INTEGER, size_installed INTEGER, size_archive INTEGER, location_href TEXT, location_base TEXT, checksum_type TEXT);",
"CREATE TABLE provides ( pkgKey INTEGER, name TEXT, flags TEXT, epoch TEXT, version TEXT, release TEXT );",
"CREATE TABLE requires ( pkgKey INTEGER, name TEXT, flags TEXT, epoch TEXT, version TEXT, release TEXT );",
"CREATE INDEX filenames ON files (name);",
"CREATE INDEX packageId ON packages (pkgId);",
"CREATE INDEX packagename ON packages (name);",
"CREATE INDEX pkgconflicts on conflicts (pkgKey);",
"CREATE INDEX pkgobsoletes on obsoletes (pkgKey);",
"CREATE INDEX pkgprovides on provides (pkgKey);",
"CREATE INDEX pkgrequires on requires (pkgKey);",
"CREATE INDEX providesname ON provides (name);",
"CREATE INDEX requiresname ON requires (name);",
"CREATE TRIGGER removals AFTER DELETE ON packages\
\n BEGIN\n\
\n DELETE FROM files WHERE pkgKey = old.pkgKey;\
\n DELETE FROM requires WHERE pkgKey = old.pkgKey;\
\n DELETE FROM provides WHERE pkgKey = old.pkgKey;\
\n DELETE FROM conflicts WHERE pkgKey = old.pkgKey;\
\n DELETE FROM obsoletes WHERE pkgKey = old.pkgKey;\
\n END;",
"INSERT into db_info values (9, 'direct_create');",
NULL
}

Definition at line 267 of file rpmrepo.c.

const char primary_sql_qfmt[] =
| static

Definition at line 392 of file rpmrepo.c.

const char primary_xml_fini[] = "</metadata>\n"
| static

Definition at line 201 of file rpmrepo.c.

const char primary_xml_init[]
| static

Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<metadata xmlns=\"http://linux.duke.edu/metadata/common\" xmlns:rpm=\"http://linux.duke.edu/metadata/rpm\" packages=\"0\">\n"

Definition at line 197 of file rpmrepo.c.

const char primary_xml_qfmt[] =
| static

Definition at line 226 of file rpmrepo.c.

const char primary_yaml_qfmt[] =
| static

Definition at line 241 of file rpmrepo.c.

struct poptOption repoCompressionPoptTable[]
| static

Initial value:
= {
{ "uncompressed", '\0', POPT_ARG_VAL, &compression, 0,
N_("don't compress"), NULL },
{ "gzip", 'Z', POPT_ARG_VAL, &compression, 1,
N_("use gzip compression"), NULL },
{ "bzip2", '\0', POPT_ARG_VAL, &compression, 2,
N_("use bzip2 compression"), NULL },
{ "lzma", '\0', POPT_ARG_VAL, &compression, 3,
N_("use lzma compression"), NULL },
{ "xz", '\0', POPT_ARG_VAL, &compression, 4,
N_("use xz compression"), NULL },
POPT_TABLEEND
}

Definition at line 1859 of file rpmrepo.c.

const char repomd_xml_fini[] = "</repomd>\n"
| static

Definition at line 222 of file rpmrepo.c.

const char repomd_xml_init[]
| static

Initial value:
= "\
<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
<repomd xmlns=\"http://linux.duke.edu/metadata/repo\">\n"

Definition at line 218 of file rpmrepo.c.

const char Sources_qfmt[] =
| static

Definition at line 261 of file rpmrepo.c.