build/pack.c - Assemble components of an RPM package.
#include 'system.h'
#include 'rpmio_internal.h'
#include 'rpmbuild.h'
#include 'buildio.h'
#include 'misc.h'
#include 'signature.h'
#include 'rpmlead.h'
#include 'debug.h'
#define RPMPKGVERSION_MIN 30004
#define RPMPKGVERSION_MAX 40003
int genSourceRpmName (Spec spec)
int cpio_doio (FD_t fdo, Header h, CSA_t csa, const char *fmodeMacro)
int cpio_copy (FD_t fdo, CSA_t csa)
StringBuf addFileToTagAux (Spec spec, const char *file, StringBuf sb)
int addFileToTag (Spec spec, const char *file, Header h, int tag)
int addFileToArrayTag (Spec spec, const char *file, Header h, int tag)
int processScriptFiles (Spec spec, Package pkg)
int readRPM (const char *fileName, Spec *specp, struct rpmlead *lead, Header *sigs, CSA_t csa)
Read rpm package components from file.
int rpmLeadVersion (void)
int writeRPM (Header *hdrp, const char *fileName, int type, CSA_t csa, char *passPhrase, const char **cookie)
Write rpm package to file.
int packageBinaries (Spec spec)
int packageSources (Spec spec)
int _noDirTokens
unsigned char header_magic [8]
int rpmpkg_version = -1
int_32 copyTags []
Assemble components of an RPM package.
Definition at line 360 of file pack.c.
Referenced by rpmLeadVersion().
Definition at line 359 of file pack.c.
Referenced by rpmLeadVersion().
Definition at line 187 of file pack.c.
References addFileToTagAux(), freeStringBuf(), getStringBuf(), headerAddOrAppendEntry(), newStringBuf(), and RPM_STRING_ARRAY_TYPE.
Referenced by processScriptFiles().
Definition at line 162 of file pack.c.
References addFileToTagAux(), appendLineStringBuf, freeStringBuf(), getStringBuf(), headerAddEntry(), headerRemoveEntry(), HGE_t, newStringBuf(), and RPM_STRING_TYPE.
Referenced by processScriptFiles().
Definition at line 123 of file pack.c.
References _, _free(), appendStringBuf, expandMacros(), Fclose(), fdGetFp(), Ferror(), Fopen(), freeStringBuf(), RPMERR_BADSPEC, rpmError, and rpmGetPath().
Referenced by addFileToArrayTag(), and addFileToTag().
Definition at line 98 of file pack.c.
References _, Ferror(), Fread(), Fstrerror(), Fwrite(), RPMERR_CPIO, and rpmError.
Todo:
Create transaction set *much* earlier.
Definition at line 48 of file pack.c.
References _, _free(), cpioStrerror(), Fclose(), fdDup(), Fdopen(), Fflush(), Fileno(), transactionFileInfo_s::fsm, FSM_PKGBUILD, fsmSetup(), fsmTeardown(), RPMERR_CPIO, rpmError, rpmExpand(), rpmtransCreateSet(), rpmtransFree(), and xstrdup().
Definition at line 29 of file pack.c.
References headerNVR(), and xstrdup().
Referenced by packageBinaries(), and packageSources().
Definition at line 207 of file pack.c.
References _, addFileToArrayTag(), addFileToTag(), TriggerFileEntry::fileName, headerAddOrAppendEntry(), TriggerFileEntry::next, TriggerFileEntry::prog, RPM_STRING_ARRAY_TYPE, RPMERR_BADFILENAME, rpmError, RPMTAG_POSTIN, RPMTAG_POSTUN, RPMTAG_PREIN, RPMTAG_PREUN, RPMTAG_TRIGGERSCRIPTPROG, RPMTAG_TRIGGERSCRIPTS, RPMTAG_VERIFYSCRIPT, and TriggerFileEntry::script.
Referenced by packageBinaries().
Read rpm package components from file.
Parameters:
Return values:
Parameters:
Definition at line 277 of file pack.c.
References _, cpioSourceArchive_s::cpioFdIn, Fclose(), fdDup(), Ferror(), Fopen(), Fread(), freeSpec(), Fseek(), Fstrerror(), PackageStruct::header, headerFree(), newPackage(), newSpec(), SpecStruct::packages, RPMERR_BADMAGIC, RPMERR_FSEEK, rpmError, rpmRC, RPMRC_BADMAGIC, RPMRC_BADSIZE, RPMRC_FAIL, RPMRC_OK, RPMRC_SHORTREAD, rpmReadPackageInfo(), and SEEK_SET.
Definition at line 364 of file pack.c.
References _noDirTokens, rpmExpandNumeric(), rpmpkg_version, RPMPKGVERSION_MAX, and RPMPKGVERSION_MIN.
Write rpm package to file.
Warning: The first argument (header) is now passed by reference in order to return a reloaded contiguous header to the caller.
Return values:
Parameters:
Returns: 0 on success
Definition at line 385 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(), headerLink(), headerMergeLegacySigs(), headerNVR(), headerRead(), headerReload(), headerWrite(), HGE_t, int_32, cpioSourceArchive_s::lead, rpmlead::major, makeTempFile(), rpmlead::minor, rpmlead::name, rpmlead::osnum, PGPHASHALGO_SHA1, providePackageNVR(), 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(), RPMSIGTAG_MD5, RPMSIGTAG_SIZE, RPMSIGTYPE_HEADERSIG, RPMTAG_ARCHIVESIZE, RPMTAG_COOKIE, RPMTAG_HEADERIMMUTABLE, RPMTAG_HEADERSIGNATURES, RPMTAG_PAYLOADCOMPRESSOR, RPMTAG_PAYLOADFLAGS, RPMTAG_PAYLOADFORMAT, RPMTAG_SHA1HEADER, rpmWriteSignature(), SEEK_SET, rpmlead::signature_type, rpmlead::type, Unlink(), writeLead(), and xstrdup().
Referenced by packageBinaries(), packageSources(), and rewriteRPM().
Initial value:
{ RPMTAG_CHANGELOGTIME, RPMTAG_CHANGELOGNAME, RPMTAG_CHANGELOGTEXT, 0 }
Definition at line 682 of file pack.c.
Referenced by packageBinaries().
Initial value:
{ 0x8e, 0xad, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00 }
Definition at line 355 of file pack.c.
Definition at line 362 of file pack.c.
Referenced by rpmLeadVersion().
Generated automatically by Doxygen for rpm from the source code.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |