build/pack.c File Reference
Assemble components of an RPM package.
More...
#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"
Go to the source code of this file.
Defines |
#define | RPMPKGVERSION_MIN 30004 |
#define | RPMPKGVERSION_MAX 40003 |
Functions |
static int | genSourceRpmName (Spec spec) |
static int | cpio_doio (FD_t fdo, Header h, CSA_t csa, const char *fmodeMacro) |
static int | cpio_copy (FD_t fdo, CSA_t csa) |
static StringBuf | addFileToTagAux (Spec spec, const char *file, StringBuf sb) |
static int | addFileToTag (Spec spec, const char *file, Header h, int tag) |
static int | addFileToArrayTag (Spec spec, const char *file, Header h, int tag) |
static 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.
|
static 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) |
| Generate binary package(s).
|
int | packageSources (Spec spec) |
| Generate source package.
|
Variables |
int | _noDirTokens |
static unsigned char | header_magic [8] |
static int | rpmpkg_version = -1 |
static int_32 | copyTags [] |
Detailed Description
Assemble components of an RPM package.
Definition in file pack.c.
Define Documentation
#define RPMPKGVERSION_MAX 40003 |
#define RPMPKGVERSION_MIN 30004 |
Function Documentation
static int addFileToArrayTag |
( |
Spec |
spec, |
|
|
const char * |
file, |
|
|
Header |
h, |
|
|
int |
tag | |
|
) |
| | [static] |
static int addFileToTag |
( |
Spec |
spec, |
|
|
const char * |
file, |
|
|
Header |
h, |
|
|
int |
tag | |
|
) |
| | [static] |
static int cpio_copy |
( |
FD_t |
fdo, |
|
|
CSA_t |
csa | |
|
) |
| | [static] |
static int cpio_doio |
( |
FD_t |
fdo, |
|
|
Header |
h, |
|
|
CSA_t |
csa, |
|
|
const char * |
fmodeMacro | |
|
) |
| | [static] |
- Todo:
- Create transaction set *much* earlier.
Definition at line 48 of file pack.c.
static int genSourceRpmName |
( |
Spec |
spec |
) |
[inline, static] |
static int processScriptFiles |
( |
Spec |
spec, |
|
|
Package |
pkg | |
|
) |
| | [static] |
Read rpm package components from file.
- Parameters:
-
| filename | file name of package (or NULL to use stdin) |
- Return values:
-
| specp | spec structure to carry package header (or NULL) |
| lead | package lead |
| sigs | package signature |
- Parameters:
-
- Returns:
- 0 on success
Definition at line 277 of file pack.c.
static int rpmLeadVersion |
( |
void |
|
) |
[static] |
int writeRPM |
( |
Header * |
hdrp, |
|
|
const char * |
fileName, |
|
|
int |
type, |
|
|
CSA_t |
csa, |
|
|
char * |
passPhrase, |
|
|
const char ** |
cookie | |
|
) |
| | |
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:
-
| hdrp | header to write (final header is returned). |
- Parameters:
-
| filename | file name of package |
| type | RPMLEAD_SOURCE/RPMLEAD_BINARY |
| csa | |
| passPhrase | |
- Return values:
-
| cookie | generated cookie (i.e build host/time) |
- Returns:
- 0 on success
Definition at line 385 of file pack.c.
Variable Documentation
Initial value: {
RPMTAG_CHANGELOGTIME,
RPMTAG_CHANGELOGNAME,
RPMTAG_CHANGELOGTEXT,
0
}
Definition at line 682 of file pack.c.
Initial value: {
0x8e, 0xad, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00
}
Definition at line 355 of file pack.c.