#include "system.h"
#include <rpmcli.h>
#include <rpmxp.h>
#include <rpmlead.h>
#include <signature.h>
#include "header_internal.h"
#include "misc.h"
#include "debug.h"
Go to the source code of this file.
Data Structures | |
struct | rpmavi_s |
struct | iobits_s |
Defines | |
#define | _RPMIOBITS_PKGMASK (RPMIOBITS_LEAD|RPMIOBITS_SHEADER|RPMIOBITS_HEADER|RPMIOBITS_PAYLOAD) |
#define | _RPMIOBITS_MODEMASK (RPMIOBITS_FDIO|RPMIOBITS_UFDIO|RPMIOBITS_GZDIO|RPMIOBITS_BZDIO) |
Typedefs | |
typedef rpmavi_s * | rpmavi |
typedef enum rpmtoolIOBits_e | rpmtoolIOBits |
Enumerations | |
enum | rpmtoolIOBits_e { RPMIOBITS_NONE = 0, RPMIOBITS_LEAD = (1 << 0), RPMIOBITS_SHEADER = (1 << 1), RPMIOBITS_HEADER = (1 << 2), RPMIOBITS_PAYLOAD = (1 << 3), RPMIOBITS_FDIO = (1 << 4), RPMIOBITS_UFDIO = (1 << 5), RPMIOBITS_GZDIO = (1 << 6), RPMIOBITS_BZDIO = (1 << 7), RPMIOBITS_UNCOMPRESS = (1 << 8), RPMIOBITS_BINARY = (1 << 9), RPMIOBITS_DUMP = (1 << 10), RPMIOBITS_XML = (1 << 11) } |
Functions | |
static rpmavi | rpmaviFree (rpmavi avi) |
static rpmavi | rpmaviNew (const char **av, int flags) |
static const char * | rpmaviNext (rpmavi avi) |
static int | parseFmt (const char *fmt, rpmtoolIOBits *bits, const char **mode) |
static void | initTool (const char *argv0) |
static void | spewHeader (FD_t fdo, Header h) |
int | main (int argc, char *const argv[]) |
Variables | |
const char * | program_name |
static int | _rpmtool_debug = 0 |
static struct headerTagTableEntry_s | rpmSTagTbl [] |
headerTagTableEntry_s * | rpmSTagTable = rpmSTagTbl |
static const char * | iav [] = { "-", NULL } |
static const char * | ifmt = NULL |
static const char * | ipath = NULL |
static const char * | imode = NULL |
static rpmtoolIOBits | ibits = RPMIOBITS_NONE |
static const char * | oav [] = { "-", NULL } |
static const char * | ofmt = NULL |
static const char * | opath = NULL |
static const char * | omode = NULL |
static rpmtoolIOBits | obits = RPMIOBITS_NONE |
static struct iobits_s | iobits [] |
static struct poptOption | optionsTable [] |
#define _RPMIOBITS_MODEMASK (RPMIOBITS_FDIO|RPMIOBITS_UFDIO|RPMIOBITS_GZDIO|RPMIOBITS_BZDIO) |
Referenced by parseFmt().
#define _RPMIOBITS_PKGMASK (RPMIOBITS_LEAD|RPMIOBITS_SHEADER|RPMIOBITS_HEADER|RPMIOBITS_PAYLOAD) |
Referenced by initTool(), and main().
typedef enum rpmtoolIOBits_e rpmtoolIOBits |
enum rpmtoolIOBits_e |
static void initTool | ( | const char * | argv0 | ) | [static] |
Definition at line 211 of file rpmtool.c.
References __progname, _RPMIOBITS_PKGMASK, ibits, obits, RPMIOBITS_DUMP, RPMIOBITS_HEADER, RPMIOBITS_LEAD, RPMIOBITS_PAYLOAD, RPMIOBITS_SHEADER, RPMIOBITS_UNCOMPRESS, and setprogname.
Referenced by main().
int main | ( | int | argc, | |
char *const | argv[] | |||
) |
Definition at line 275 of file rpmtool.c.
References _, __progname, _free(), _RPMIOBITS_PKGMASK, _rpmtool_debug, alloca(), EXIT_FAILURE, Fclose(), fdDup(), Fdopen(), Ferror(), Fileno(), Fopen(), Fread(), Fstrerror(), Fwrite(), HEADER_MAGIC_YES, headerFree(), headerGetEntry(), headerRead(), headerSprintf(), iav, ibits, ifmt, imode, initTool(), obits, ofmt, omode, opath, parseFmt(), readLead(), rpmaviFree(), rpmaviNew(), rpmaviNext(), rpmcliFini(), rpmcliInit(), rpmGetPath(), rpmHeaderFormats, RPMIOBITS_HEADER, RPMIOBITS_LEAD, RPMIOBITS_PAYLOAD, RPMIOBITS_SHEADER, RPMIOBITS_UNCOMPRESS, rpmMkdirPath(), RPMRC_OK, rpmReadSignature(), RPMSIGTYPE_HEADERSIG, RPMTAG_PAYLOADCOMPRESSOR, rpmTagTable, spewHeader(), stpcpy(), ufdCopy(), urlPath(), writeLead(), and xstrdup().
static int parseFmt | ( | const char * | fmt, | |
rpmtoolIOBits * | bits, | |||
const char ** | mode | |||
) | [static] |
Definition at line 130 of file rpmtool.c.
References _, __progname, _free(), _RPMIOBITS_MODEMASK, iobits, iobits_s::name, stpcpy(), and xmalloc().
Referenced by main().
static rpmavi rpmaviNew | ( | const char ** | av, | |
int | flags | |||
) | [static] |
static const char* rpmaviNext | ( | rpmavi | avi | ) | [static] |
Definition at line 250 of file rpmtool.c.
References _free(), Fwrite(), HEADER_DUMP_INLINE, HEADER_MAGIC_YES, headerDump(), headerIsEntry(), headerSprintf(), headerWrite(), obits, rpmHeaderFormats, RPMIOBITS_DUMP, RPMIOBITS_XML, rpmSTagTable, RPMTAG_HEADERI18NTABLE, rpmTagTable, and rpmxpDTD.
Referenced by main().
int _rpmtool_debug = 0 [static] |
const char* iav[] = { "-", NULL } [static] |
rpmtoolIOBits ibits = RPMIOBITS_NONE [static] |
Referenced by parseFmt().
const char* ipath = NULL [static] |
rpmtoolIOBits obits = RPMIOBITS_NONE [static] |
Definition at line 103 of file rpmtool.c.
Referenced by getOutputFrom(), initTool(), main(), and spewHeader().
const char* omode = NULL [static] |
const char* opath = NULL [static] |
Definition at line 101 of file rpmtool.c.
Referenced by fsmMakeLinks(), fsmStage(), main(), and writeFile().
struct poptOption optionsTable[] [static] |
const char* program_name |
struct headerTagTableEntry_s* rpmSTagTable = rpmSTagTbl |
struct headerTagTableEntry_s rpmSTagTbl[] [static] |
Initial value:
{ { "RPMTAG_HEADERIMAGE", HEADER_IMAGE, RPM_BIN_TYPE }, { "RPMTAG_HEADERSIGNATURES", HEADER_SIGNATURES, RPM_BIN_TYPE }, { "RPMTAG_HEADERIMMUTABLE", HEADER_IMMUTABLE, RPM_BIN_TYPE }, { "RPMTAG_HEADERREGIONS", HEADER_REGIONS, RPM_BIN_TYPE }, { "RPMTAG_SIGSIZE", 999+1, RPM_INT32_TYPE }, { "RPMTAG_SIGLEMD5_1", 999+2, RPM_BIN_TYPE }, { "RPMTAG_SIGPGP", 999+3, RPM_BIN_TYPE }, { "RPMTAG_SIGLEMD5_2", 999+4, RPM_BIN_TYPE }, { "RPMTAG_SIGMD5", 999+5, RPM_BIN_TYPE }, { "RPMTAG_SIGGPG", 999+6, RPM_BIN_TYPE }, { "RPMTAG_SIGPGP5", 999+7, RPM_BIN_TYPE }, { "RPMTAG_SIGPAYLOADSIZE", 999+8, RPM_INT32_TYPE }, { "RPMTAG_BADSHA1_1", HEADER_SIGBASE+8, RPM_STRING_TYPE }, { "RPMTAG_BADSHA1_2", HEADER_SIGBASE+9, RPM_STRING_TYPE }, { "RPMTAG_PUBKEYS", HEADER_SIGBASE+10, RPM_STRING_ARRAY_TYPE }, { "RPMTAG_DSAHEADER", HEADER_SIGBASE+11, RPM_BIN_TYPE }, { "RPMTAG_RSAHEADER", HEADER_SIGBASE+12, RPM_BIN_TYPE }, { "RPMTAG_SHA1HEADER", HEADER_SIGBASE+13, RPM_STRING_TYPE }, { NULL, 0 } }