#include "rpmbuild.h"
Go to the source code of this file.
Data Structures | |
struct | cpioSourceArchive_s |
Typedefs | |
typedef cpioSourceArchive_s * | CSA_t |
Functions | |
int | readRPM (const char *fileName, Spec *specp, struct rpmlead *lead, Header *sigs, CSA_t csa) |
Read rpm package components from file. | |
int | writeRPM (Header *hdrp, unsigned char **pkgidp, const char *fileName, int type, CSA_t csa, char *passPhrase, const char **cookie) |
Write rpm package to file. |
Definition in file buildio.h.
typedef struct cpioSourceArchive_s * CSA_t |
int readRPM | ( | const char * | fileName, | |
Spec * | specp, | |||
struct rpmlead * | lead, | |||
Header * | sigs, | |||
CSA_t | csa | |||
) |
Read rpm package components from file.
fileName | file name of package (or NULL to use stdin) |
specp | spec structure to carry package header (or NULL) | |
lead | package lead | |
sigs | package signature |
csa |
Definition at line 296 of file pack.c.
References _, cpioSourceArchive_s::cpioFdIn, Fclose(), fdDup(), Ferror(), Fopen(), Fread(), freeSpec(), Fseek(), Fstrerror(), Package_s::header, headerFree(), newPackage(), newSpec(), Spec_s::packages, RPMERR_BADMAGIC, RPMERR_FSEEK, rpmError, RPMRC_FAIL, RPMRC_NOKEY, RPMRC_NOTFOUND, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadPackageFile(), rpmtsCreate(), rpmtsFree(), and SEEK_SET.
Referenced by rewriteRPM().
int writeRPM | ( | Header * | hdrp, | |
unsigned char ** | pkgidp, | |||
const char * | fileName, | |||
int | type, | |||
CSA_t | csa, | |||
char * | passPhrase, | |||
const char ** | cookie | |||
) |
Write rpm package to file.
*hdrp | header to write (final header is returned). | |
*pkgidp | header+payload MD5 of package (NULL to disable). |
fileName | file name of package | |
type | RPMLEAD_SOURCE/RPMLEAD_BINARY | |
csa | ||
passPhrase |
cookie | generated cookie (i.e build host/time) |
Definition at line 420 of file pack.c.
References _, _free(), rpmlead::archnum, buildHost(), cpio_copy(), cpio_doio(), cpioSourceArchive_s::cpioArchiveSize, cpioSourceArchive_s::cpioFdIn, cpioSourceArchive_s::cpioList, Fclose(), fdFiniDigest(), fdInitDigest(), Ferror(), Fflush(), Fileno(), Fopen(), Fread(), Fseek(), Fstrerror(), Fwrite(), getBuildTime(), HEADER_MAGIC_YES, headerAddEntry(), headerFree(), headerGetEntry(), headerGetEntryMinMemory(), headerLink(), headerMergeLegacySigs(), headerNVR(), headerRead(), headerReload(), headerWrite(), cpioSourceArchive_s::lead, makeTempFile(), rpmlead::osnum, PGPHASHALGO_SHA1, providePackageNVR(), RPM_BIN_TYPE, RPM_INT32_TYPE, RPM_STRING_TYPE, rpmAddSignature(), RPMERR_BADARG, RPMERR_CREATE, RPMERR_FSEEK, RPMERR_NOSPACE, RPMERR_READ, RPMERR_RELOAD, rpmError, rpmExpand(), rpmFreeSignature(), rpmGetArchInfo(), rpmGetOsInfo(), RPMLEAD_BINARY, RPMLEAD_SOURCE, rpmLeadVersion(), rpmlibNeedsFeature(), RPMLOOKUPSIG_QUERY, rpmLookupSignatureType(), RPMMESS_NORMAL, rpmMessage, rpmNewSignature(), RPMRC_OK, RPMSIGTAG_MD5, RPMSIGTAG_PAYLOADSIZE, RPMSIGTAG_SHA1, RPMSIGTAG_SIZE, RPMSIGTYPE_HEADERSIG, RPMTAG_ARCHIVESIZE, RPMTAG_COOKIE, RPMTAG_HEADERIMMUTABLE, RPMTAG_HEADERSIGNATURES, RPMTAG_PAYLOADCOMPRESSOR, RPMTAG_PAYLOADFLAGS, RPMTAG_PAYLOADFORMAT, rpmWriteSignature(), SEEK_SET, tagType(), Unlink(), writeLead(), and xstrdup().
Referenced by packageBinaries(), packageSources(), and rewriteRPM().