39#define DRPM_VISIBLE __attribute__((visibility("default")))
74#define DRPM_ERR_MEMORY 1
75#define DRPM_ERR_ARGS 2
77#define DRPM_ERR_FORMAT 4
78#define DRPM_ERR_CONFIG 5
79#define DRPM_ERR_OTHER 6
80#define DRPM_ERR_OVERFLOW 7
81#define DRPM_ERR_PROG 8
82#define DRPM_ERR_MISMATCH 9
83#define DRPM_ERR_NOINSTALL 10
90#define DRPM_TYPE_STANDARD 0
91#define DRPM_TYPE_RPMONLY 1
98#define DRPM_COMP_NONE 0
99#define DRPM_COMP_GZIP 1
100#define DRPM_COMP_BZIP2 2
101#define DRPM_COMP_LZMA 3
102#define DRPM_COMP_XZ 4
103#ifdef HAVE_LZLIB_DEVEL
115#define DRPM_COMP_LZIP 5
116#define DRPM_COMP_ZSTD 6
123#define DRPM_TAG_FILENAME 0
124#define DRPM_TAG_VERSION 1
125#define DRPM_TAG_TYPE 2
126#define DRPM_TAG_COMP 3
127#define DRPM_TAG_SEQUENCE 4
128#define DRPM_TAG_SRCNEVR 5
129#define DRPM_TAG_TGTNEVR 6
130#define DRPM_TAG_TGTSIZE 7
131#define DRPM_TAG_TGTMD5 8
132#define DRPM_TAG_TGTCOMP 9
133#define DRPM_TAG_TGTCOMPPARAM 10
134#define DRPM_TAG_TGTHEADERLEN 11
135#define DRPM_TAG_ADJELEMS 12
136#define DRPM_TAG_TGTLEAD 13
137#define DRPM_TAG_PAYLOADFMTOFF 14
138#define DRPM_TAG_INTCOPIES 15
139#define DRPM_TAG_EXTCOPIES 16
140#define DRPM_TAG_EXTDATALEN 17
141#define DRPM_TAG_INTDATALEN 18
148#define DRPM_COMP_LEVEL_DEFAULT 0
155#define DRPM_CHECK_NONE 0
156#define DRPM_CHECK_FULL 1
157#define DRPM_CHECK_FILESIZES 2
181int drpm_apply(
const char *oldrpm,
const char *deltarpm,
const char *newrpm);
DRPM_VISIBLE const char * drpm_strerror(int error)
Returns description of error code as a string.
DRPM_VISIBLE int drpm_apply(const char *oldrpm, const char *deltarpm, const char *newrpm)
Applies a DeltaRPM to an old RPM or on-disk data to re-create a new RPM.
DRPM_VISIBLE int drpm_check_sequence(const char *oldrpm, const char *sequence, int checkmode)
Checks if the reconstruction is possible based on sequence ID.
DRPM_VISIBLE int drpm_check(const char *deltarpm, int checkmode)
Checks if the reconstruction is possible based on DeltaRPM file.
struct drpm_make_options drpm_make_options
Options for drpm_make()
Definition drpm.h:170
DRPM_VISIBLE int drpm_make_options_set_version(drpm_make_options *opts, unsigned short version)
Sets DeltaRPM version.
DRPM_VISIBLE int drpm_make_options_set_delta_comp(drpm_make_options *opts, unsigned short comp, unsigned short level)
Sets DeltaRPM compression type and level.
DRPM_VISIBLE int drpm_make_options_set_seqfile(drpm_make_options *opts, const char *seqfile)
Specifies file to which to write DeltaRPM sequence ID.
DRPM_VISIBLE int drpm_make_options_set_addblk_comp(drpm_make_options *opts, unsigned short comp, unsigned short level)
Sets add block compression type and level.
DRPM_VISIBLE int drpm_make_options_copy(drpm_make_options *dst, const drpm_make_options *src)
Copies drpm_make_options.
DRPM_VISIBLE int drpm_make_options_init(drpm_make_options **opts)
Initializes drpm_make_options with default options.
DRPM_VISIBLE int drpm_make_options_get_delta_comp_from_rpm(drpm_make_options *opts)
DeltaRPM compression method is the same as used in the new RPM.
DRPM_VISIBLE int drpm_make_options_set_type(drpm_make_options *opts, unsigned short type)
Sets DeltaRPM type.
DRPM_VISIBLE int drpm_make_options_destroy(drpm_make_options **opts)
Frees drpm_make_options.
DRPM_VISIBLE int drpm_make_options_defaults(drpm_make_options *opts)
Resets options to default values.
DRPM_VISIBLE int drpm_make_options_forbid_addblk(drpm_make_options *opts)
Forbids add block creation.
DRPM_VISIBLE int drpm_make_options_add_patches(drpm_make_options *opts, const char *oldrpmprint, const char *oldpatchrpm)
Requests incorporation of RPM patch files for the old RPM.
DRPM_VISIBLE int drpm_make(const char *oldrpm, const char *newrpm, const char *deltarpm, const drpm_make_options *opts)
Creates a DeltaRPM from two RPMs.
DRPM_VISIBLE int drpm_get_ulong(drpm *delta, int tag, unsigned long *target)
Fetches information representable as an unsigned long integer.
DRPM_VISIBLE int drpm_get_string(drpm *delta, int tag, char **target)
Fetches information representable as a string.
DRPM_VISIBLE int drpm_get_ullong(drpm *delta, int tag, unsigned long long *target)
Fetches information representable as an unsigned long long integer.
DRPM_VISIBLE int drpm_read(drpm **delta, const char *filename)
Reads information from a DeltaRPM.
DRPM_VISIBLE int drpm_get_ulong_array(drpm *delta, int tag, unsigned long **target, unsigned long *size)
Fetches information representable as an array of unsigned long integers.
DRPM_VISIBLE int drpm_destroy(drpm **delta)
Frees memory allocated by drpm_read().
struct drpm drpm
DeltaRPM package info.
Definition drpm.h:164
DRPM_VISIBLE int drpm_get_uint(drpm *delta, int tag, unsigned *target)
Fetches information representable as an unsigned integer.