| header.h | | header.h | |
| | | | |
| skipping to change at line 90 | | skipping to change at line 90 | |
| * @param dl no. of bytes in header data. | | * @param dl no. of bytes in header data. | |
| * @param pev 1st element in tag array, big-endian | | * @param pev 1st element in tag array, big-endian | |
| * @param iv failing (or last) tag element, host-endian | | * @param iv failing (or last) tag element, host-endian | |
| * @param negate negative offset expected? | | * @param negate negative offset expected? | |
| * @return -1 on success, otherwise failing tag element index | | * @return -1 on success, otherwise failing tag element index | |
| */ | | */ | |
| int headerVerifyInfo(int il, int dl, const void * pev, void * iv, int negat
e); | | int headerVerifyInfo(int il, int dl, const void * pev, void * iv, int negat
e); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Convert header to on-disk representation. | | * Convert header to on-disk representation. | |
|
| | | * @deprecated Use headerExport() instead | |
| * @param h header (with pointers) | | * @param h header (with pointers) | |
| * @return on-disk header blob (i.e. with offsets) | | * @return on-disk header blob (i.e. with offsets) | |
| */ | | */ | |
| void * headerUnload(Header h); | | void * headerUnload(Header h); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
|
| | | * Export header to on-disk representation. | |
| | | * @param h header (with pointers) | |
| | | * @retval bsize on-disk header blob size in bytes | |
| | | * @return on-disk header blob (i.e. with offsets) | |
| | | */ | |
| | | void * headerExport(Header h, unsigned int * bsize); | |
| | | | |
| | | /** \ingroup header | |
| * Convert header to on-disk representation, and then reload. | | * Convert header to on-disk representation, and then reload. | |
| * This is used to insure that all header data is in one chunk. | | * This is used to insure that all header data is in one chunk. | |
| * @param h header (with pointers) | | * @param h header (with pointers) | |
| * @param tag region tag | | * @param tag region tag | |
| * @return on-disk header (with offsets) | | * @return on-disk header (with offsets) | |
| */ | | */ | |
| Header headerReload(Header h, rpmTagVal tag); | | Header headerReload(Header h, rpmTagVal tag); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Duplicate a header. | | * Duplicate a header. | |
| * @param h header | | * @param h header | |
| * @return new header instance | | * @return new header instance | |
| */ | | */ | |
| Header headerCopy(Header h); | | Header headerCopy(Header h); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Convert header to in-memory representation. | | * Convert header to in-memory representation. | |
|
| | | * @deprecated Use headerImport() instead | |
| * @param uh on-disk header blob (i.e. with offsets) | | * @param uh on-disk header blob (i.e. with offsets) | |
| * @return header | | * @return header | |
| */ | | */ | |
| Header headerLoad(void * uh); | | Header headerLoad(void * uh); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Make a copy and convert header to in-memory representation. | | * Make a copy and convert header to in-memory representation. | |
|
| | | * @deprecated Use headerImport() instead | |
| * @param uh on-disk header blob (i.e. with offsets) | | * @param uh on-disk header blob (i.e. with offsets) | |
| * @return header | | * @return header | |
| */ | | */ | |
| Header headerCopyLoad(const void * uh); | | Header headerCopyLoad(const void * uh); | |
| | | | |
|
| | | enum headerImportFlags_e { | |
| | | HEADERIMPORT_COPY = (1 << 0), /* Make copy of blob on import? | |
| | | */ | |
| | | HEADERIMPORT_FAST = (1 << 1), /* Faster but less safe? */ | |
| | | }; | |
| | | | |
| | | typedef rpmFlags headerImportFlags; | |
| | | | |
| | | /** \ingroup header | |
| | | * Import header to in-memory representation. | |
| | | * @param blob on-disk header blob (i.e. with offsets) | |
| | | * @param bsize on-disk header blob size in bytes (0 if unkn | |
| | | own) | |
| | | * @param flags flags to control operation | |
| | | * @return header | |
| | | */ | |
| | | Header headerImport(void *blob, unsigned int bsize, headerImportFlags flags | |
| | | ); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Read (and load) header from file handle. | | * Read (and load) header from file handle. | |
| * @param fd file handle | | * @param fd file handle | |
| * @param magicp read (and verify) 8 bytes of (magic, 0)? | | * @param magicp read (and verify) 8 bytes of (magic, 0)? | |
| * @return header (or NULL on error) | | * @return header (or NULL on error) | |
| */ | | */ | |
| Header headerRead(FD_t fd, int magicp); | | Header headerRead(FD_t fd, int magicp); | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Write (with unload) header to file handle. | | * Write (with unload) header to file handle. | |
| | | | |
End of changes. 5 change blocks. |
| 0 lines changed or deleted | | 30 lines changed or added | |
|
| rpmfi.h | | rpmfi.h | |
| | | | |
| skipping to change at line 46 | | skipping to change at line 46 | |
| */ | | */ | |
| typedef enum rpmfileState_e { | | typedef enum rpmfileState_e { | |
| RPMFILE_STATE_MISSING = -1, /* used for unavailable data */ | | RPMFILE_STATE_MISSING = -1, /* used for unavailable data */ | |
| RPMFILE_STATE_NORMAL = 0, | | RPMFILE_STATE_NORMAL = 0, | |
| RPMFILE_STATE_REPLACED = 1, | | RPMFILE_STATE_REPLACED = 1, | |
| RPMFILE_STATE_NOTINSTALLED = 2, | | RPMFILE_STATE_NOTINSTALLED = 2, | |
| RPMFILE_STATE_NETSHARED = 3, | | RPMFILE_STATE_NETSHARED = 3, | |
| RPMFILE_STATE_WRONGCOLOR = 4 | | RPMFILE_STATE_WRONGCOLOR = 4 | |
| } rpmfileState; | | } rpmfileState; | |
| | | | |
|
| | | #define RPMFILE_IS_INSTALLED(_x) ((_x) == RPMFILE_STATE_NORMAL || (_x) == R | |
| | | PMFILE_STATE_NETSHARED) | |
| | | | |
| /** | | /** | |
| * File Attributes. | | * File Attributes. | |
| */ | | */ | |
| enum rpmfileAttrs_e { | | enum rpmfileAttrs_e { | |
| RPMFILE_NONE = 0, | | RPMFILE_NONE = 0, | |
| RPMFILE_CONFIG = (1 << 0), /*!< from %%config */ | | RPMFILE_CONFIG = (1 << 0), /*!< from %%config */ | |
| RPMFILE_DOC = (1 << 1), /*!< from %%doc */ | | RPMFILE_DOC = (1 << 1), /*!< from %%doc */ | |
| RPMFILE_ICON = (1 << 2), /*!< from %%donotuse. */ | | RPMFILE_ICON = (1 << 2), /*!< from %%donotuse. */ | |
| RPMFILE_MISSINGOK = (1 << 3), /*!< from %%config(missingok) */ | | RPMFILE_MISSINGOK = (1 << 3), /*!< from %%config(missingok) */ | |
| RPMFILE_NOREPLACE = (1 << 4), /*!< from %%config(noreplace) */ | | RPMFILE_NOREPLACE = (1 << 4), /*!< from %%config(noreplace) */ | |
| | | | |
| skipping to change at line 392 | | skipping to change at line 394 | |
| RPMFI_NOFILECAPS = (1 << 8), | | RPMFI_NOFILECAPS = (1 << 8), | |
| RPMFI_NOFILELINKTOS = (1 << 9), | | RPMFI_NOFILELINKTOS = (1 << 9), | |
| RPMFI_NOFILEDIGESTS = (1 << 10), | | RPMFI_NOFILEDIGESTS = (1 << 10), | |
| RPMFI_NOFILEMTIMES = (1 << 11), | | RPMFI_NOFILEMTIMES = (1 << 11), | |
| RPMFI_NOFILERDEVS = (1 << 12), | | RPMFI_NOFILERDEVS = (1 << 12), | |
| RPMFI_NOFILEINODES = (1 << 13), | | RPMFI_NOFILEINODES = (1 << 13), | |
| RPMFI_NOFILESTATES = (1 << 14), | | RPMFI_NOFILESTATES = (1 << 14), | |
| RPMFI_NOFILECOLORS = (1 << 15), | | RPMFI_NOFILECOLORS = (1 << 15), | |
| RPMFI_NOFILEVERIFYFLAGS = (1 << 16), | | RPMFI_NOFILEVERIFYFLAGS = (1 << 16), | |
| RPMFI_NOFILEFLAGS = (1 << 17), | | RPMFI_NOFILEFLAGS = (1 << 17), | |
|
| RPMFI_ISBUILD = (1 << 30), /* internal */ | | | |
| RPMFI_ISSOURCE = (1 << 31), /* internal */ | | | |
| }; | | }; | |
| | | | |
| typedef rpmFlags rpmfiFlags; | | typedef rpmFlags rpmfiFlags; | |
| | | | |
| #define RPMFI_FLAGS_ERASE \ | | #define RPMFI_FLAGS_ERASE \ | |
| (RPMFI_NOFILECLASS | RPMFI_NOFILELANGS | \ | | (RPMFI_NOFILECLASS | RPMFI_NOFILELANGS | \ | |
| RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | RPMFI_NOFILEINODES | \ | | RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | RPMFI_NOFILEINODES | \ | |
| RPMFI_NOFILEVERIFYFLAGS) | | RPMFI_NOFILEVERIFYFLAGS) | |
| | | | |
| #define RPMFI_FLAGS_INSTALL \ | | #define RPMFI_FLAGS_INSTALL \ | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 3 lines changed or added | |
|
| rpmio.h | | rpmio.h | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| #include <unistd.h> | | #include <unistd.h> | |
| | | | |
| #include <rpm/rpmtypes.h> | | #include <rpm/rpmtypes.h> | |
| #include <rpm/rpmsw.h> | | #include <rpm/rpmsw.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /** \ingroup rpmio | | /** \ingroup rpmio | |
|
| * Hide libio API lossage. | | | |
| * The libio interface changed after glibc-2.1.3 to pass the seek offset | | | |
| * argument as a pointer rather than as an off_t. The snarl below defines | | | |
| * typedefs to isolate the lossage. | | | |
| */ | | | |
| #if defined(__GLIBC__) && \ | | | |
| (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) | | | |
| #define USE_COOKIE_SEEK_POINTER 1 | | | |
| typedef _IO_off64_t _libio_off_t; | | | |
| typedef _libio_off_t * _libio_pos_t; | | | |
| #else | | | |
| typedef off_t _libio_off_t; | | | |
| typedef off_t _libio_pos_t; | | | |
| #endif | | | |
| | | | |
| /** \ingroup rpmio | | | |
| */ | | */ | |
| typedef const struct FDIO_s * FDIO_t; | | typedef const struct FDIO_s * FDIO_t; | |
| | | | |
| /** \ingroup rpmio | | /** \ingroup rpmio | |
| * \name RPMIO Interface. | | * \name RPMIO Interface. | |
| */ | | */ | |
| | | | |
| /** \ingroup rpmio | | /** \ingroup rpmio | |
| * strerror(3) clone. | | * strerror(3) clone. | |
| */ | | */ | |
| | | | |
| skipping to change at line 64 | | skipping to change at line 48 | |
| ssize_t Fread(void * buf, size_t size, size_t nmemb, FD_t fd); | | ssize_t Fread(void * buf, size_t size, size_t nmemb, FD_t fd); | |
| | | | |
| /** \ingroup rpmio | | /** \ingroup rpmio | |
| * fwrite(3) clone. | | * fwrite(3) clone. | |
| */ | | */ | |
| ssize_t Fwrite(const void * buf, size_t size, size_t nmemb, FD_t fd); | | ssize_t Fwrite(const void * buf, size_t size, size_t nmemb, FD_t fd); | |
| | | | |
| /** \ingroup rpmio | | /** \ingroup rpmio | |
| * fseek(3) clone. | | * fseek(3) clone. | |
| */ | | */ | |
|
| int Fseek(FD_t fd, _libio_off_t offset, int whence); | | int Fseek(FD_t fd, off_t offset, int whence); | |
| | | | |
| /** \ingroup rpmio | | /** \ingroup rpmio | |
| * ftell(3) clone. | | * ftell(3) clone. | |
| */ | | */ | |
| off_t Ftell(FD_t fd); | | off_t Ftell(FD_t fd); | |
| | | | |
| /** \ingroup rpmio | | /** \ingroup rpmio | |
| * fclose(3) clone. | | * fclose(3) clone. | |
| */ | | */ | |
| int Fclose( FD_t fd); | | int Fclose( FD_t fd); | |
| | | | |
| skipping to change at line 107 | | skipping to change at line 91 | |
| * fileno(3) clone. | | * fileno(3) clone. | |
| */ | | */ | |
| int Fileno(FD_t fd); | | int Fileno(FD_t fd); | |
| | | | |
| /** \ingroup rpmio | | /** \ingroup rpmio | |
| * fcntl(2) clone. | | * fcntl(2) clone. | |
| */ | | */ | |
| int Fcntl(FD_t fd, int op, void *lip); | | int Fcntl(FD_t fd, int op, void *lip); | |
| | | | |
| /** \ingroup rpmio | | /** \ingroup rpmio | |
|
| * \name RPMIO Utilities. | | * Get informative description (eg file name) from fd for diagnostic output
. | |
| */ | | */ | |
|
| | | const char * Fdescr(FD_t fd); | |
| | | | |
| /** \ingroup rpmio | | /** \ingroup rpmio | |
|
| | | * \name RPMIO Utilities. | |
| */ | | */ | |
|
| off_t fdSize(FD_t fd); | | | |
| | | | |
| /** \ingroup rpmio | | /** \ingroup rpmio | |
| */ | | */ | |
|
| FD_t fdDup(int fdno); | | off_t fdSize(FD_t fd); | |
| | | | |
| /** \ingroup rpmio | | /** \ingroup rpmio | |
|
| * Get associated FILE stream from fd (if any) | | | |
| */ | | */ | |
|
| FILE * fdGetFILE(FD_t fd); | | FD_t fdDup(int fdno); | |
| | | | |
| /** \ingroup rpmio | | /** \ingroup rpmio | |
| */ | | */ | |
|
| FD_t fdLink(void * cookie); | | FD_t fdLink(FD_t fd); | |
| | | | |
| /** \ingroup rpmio | | /** \ingroup rpmio | |
| */ | | */ | |
| FD_t fdFree(FD_t fd); | | FD_t fdFree(FD_t fd); | |
| | | | |
|
| /** \ingroup rpmio | | | |
| */ | | | |
| FD_t fdNew (void); | | | |
| | | | |
| /** | | | |
| */ | | | |
| int ufdCopy(FD_t sfd, FD_t tfd); | | | |
| | | | |
| /** | | /** | |
|
| * XXX the name is misleading, this is a legacy wrapper that ensures | | | |
| * only S_ISREG() files are read, nothing to do with timed... | | | |
| * TODO: get this out of the API | | | |
| */ | | */ | |
|
| ssize_t timedRead(FD_t fd, void * bufptr, size_t length); | | off_t ufdCopy(FD_t sfd, FD_t tfd); | |
| | | | |
| /** \ingroup rpmio | | /** \ingroup rpmio | |
| * Identify per-desciptor I/O operation statistics. | | * Identify per-desciptor I/O operation statistics. | |
| */ | | */ | |
| typedef enum fdOpX_e { | | typedef enum fdOpX_e { | |
| FDSTAT_READ = 0, /*!< Read statistics index. */ | | FDSTAT_READ = 0, /*!< Read statistics index. */ | |
| FDSTAT_WRITE = 1, /*!< Write statistics index. */ | | FDSTAT_WRITE = 1, /*!< Write statistics index. */ | |
| FDSTAT_SEEK = 2, /*!< Seek statistics index. */ | | FDSTAT_SEEK = 2, /*!< Seek statistics index. */ | |
| FDSTAT_CLOSE = 3, /*!< Close statistics index */ | | FDSTAT_CLOSE = 3, /*!< Close statistics index */ | |
| FDSTAT_DIGEST = 4, /*!< Digest statistics index. */ | | FDSTAT_DIGEST = 4, /*!< Digest statistics index. */ | |
| | | | |
End of changes. 13 change blocks. |
| 35 lines changed or deleted | | 8 lines changed or added | |
|
| rpmlib.h | | rpmlib.h | |
| | | | |
| skipping to change at line 38 | | skipping to change at line 38 | |
| extern struct rpmMacroContext_s * rpmCLIMacroContext; | | extern struct rpmMacroContext_s * rpmCLIMacroContext; | |
| | | | |
| extern const char * const RPMVERSION; | | extern const char * const RPMVERSION; | |
| | | | |
| extern const char * const rpmNAME; | | extern const char * const rpmNAME; | |
| | | | |
| extern const char * const rpmEVR; | | extern const char * const rpmEVR; | |
| | | | |
| extern const int rpmFLAGS; | | extern const int rpmFLAGS; | |
| | | | |
|
| /** \ingroup header | | | |
| * Translate and merge legacy signature tags into header. | | | |
| * @todo Remove headerSort() through headerInitIterator() modifies sig. | | | |
| * @param h header | | | |
| * @param sigh signature header | | | |
| */ | | | |
| void headerMergeLegacySigs(Header h, const Header sigh); | | | |
| | | | |
| /** \ingroup header | | | |
| * Regenerate signature header. | | | |
| * @todo Remove headerSort() through headerInitIterator() modifies h. | | | |
| * @param h header | | | |
| * @param noArchiveSize don't copy archive size tag (pre rpm-4.1) | | | |
| * @return regenerated signature header | | | |
| */ | | | |
| Header headerRegenSigHeader(const Header h, int noArchiveSize); | | | |
| | | | |
| /* ==================================================================== */ | | /* ==================================================================== */ | |
| /** \name RPMRC */ | | /** \name RPMRC */ | |
| | | | |
| /** \ingroup rpmrc | | /** \ingroup rpmrc | |
| * Build and install arch/os table identifiers. | | * Build and install arch/os table identifiers. | |
| * @todo Eliminate from API. | | * @todo Eliminate from API. | |
| */ | | */ | |
| enum rpm_machtable_e { | | enum rpm_machtable_e { | |
| RPM_MACHTABLE_INSTARCH = 0, /*!< Install platform architecture.
*/ | | RPM_MACHTABLE_INSTARCH = 0, /*!< Install platform architecture.
*/ | |
| RPM_MACHTABLE_INSTOS = 1, /*!< Install platform operating syst
em. */ | | RPM_MACHTABLE_INSTOS = 1, /*!< Install platform operating syst
em. */ | |
| | | | |
| skipping to change at line 120 | | skipping to change at line 103 | |
| int rpmMachineScore(int type, const char * name); | | int rpmMachineScore(int type, const char * name); | |
| | | | |
| /** \ingroup rpmrc | | /** \ingroup rpmrc | |
| * Display current rpmrc (and macro) configuration. | | * Display current rpmrc (and macro) configuration. | |
| * @param fp output file handle | | * @param fp output file handle | |
| * @return 0 always | | * @return 0 always | |
| */ | | */ | |
| int rpmShowRC(FILE * fp); | | int rpmShowRC(FILE * fp); | |
| | | | |
| /** \ingroup rpmrc | | /** \ingroup rpmrc | |
|
| * @deprecated Use addMacro to set _target_* macros. | | | |
| * @todo Eliminate from API. | | | |
| # @note Only used by build code. | | | |
| * @param archTable | | | |
| * @param osTable | | | |
| */ | | | |
| void rpmSetTables(int archTable, int osTable); | | | |
| | | | |
| /** \ingroup rpmrc | | | |
| * Destroy rpmrc arch/os compatibility tables. | | * Destroy rpmrc arch/os compatibility tables. | |
| * @todo Eliminate from API. | | * @todo Eliminate from API. | |
| */ | | */ | |
| void rpmFreeRpmrc(void); | | void rpmFreeRpmrc(void); | |
| | | | |
| /** | | /** | |
| * Compare headers to determine which header is "newer". | | * Compare headers to determine which header is "newer". | |
| * @param first 1st header | | * @param first 1st header | |
| * @param second 2nd header | | * @param second 2nd header | |
| * @return result of comparison | | * @return result of comparison | |
| */ | | */ | |
| int rpmVersionCompare(Header first, Header second); | | int rpmVersionCompare(Header first, Header second); | |
| | | | |
|
| /** \ingroup header | | | |
| * Check for supported payload format in header. | | | |
| * @param h header to check | | | |
| * @return RPMRC_OK if supported, RPMRC_FAIL otherwise | | | |
| */ | | | |
| rpmRC headerCheckPayloadFormat(Header h); | | | |
| | | | |
| /** \ingroup header | | /** \ingroup header | |
| * Check header consistency, performing headerGetEntry() the hard way. | | * Check header consistency, performing headerGetEntry() the hard way. | |
| * | | * | |
| * Sanity checks on the header are performed while looking for a | | * Sanity checks on the header are performed while looking for a | |
| * header-only digest or signature to verify the blob. If found, | | * header-only digest or signature to verify the blob. If found, | |
| * the digest or signature is verified. | | * the digest or signature is verified. | |
| * | | * | |
| * @param ts transaction set | | * @param ts transaction set | |
| * @param uh unloaded header blob | | * @param uh unloaded header blob | |
| * @param uc no. of bytes in blob (or 0 to disable) | | * @param uc no. of bytes in blob (or 0 to disable) | |
| | | | |
End of changes. 3 change blocks. |
| 33 lines changed or deleted | | 0 lines changed or added | |
|
| rpmpgp.h | | rpmpgp.h | |
| | | | |
| skipping to change at line 963 | | skipping to change at line 963 | |
| unsigned int pgpGrab(const uint8_t *s, size_t nbytes) | | unsigned int pgpGrab(const uint8_t *s, size_t nbytes) | |
| { | | { | |
| size_t i = 0; | | size_t i = 0; | |
| size_t nb = (nbytes <= sizeof(i) ? nbytes : sizeof(i)); | | size_t nb = (nbytes <= sizeof(i) ? nbytes : sizeof(i)); | |
| while (nb--) | | while (nb--) | |
| i = (i << 8) | *s++; | | i = (i << 8) | *s++; | |
| return i; | | return i; | |
| } | | } | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
|
| * Return length of an OpenPGP packet. | | | |
| * @param s pointer to packet | | | |
| * @retval *lenp no. of bytes in packet | | | |
| * @return no. of bytes in length prefix | | | |
| */ | | | |
| static inline | | | |
| size_t pgpLen(const uint8_t *s, size_t * lenp) | | | |
| { | | | |
| if (*s < 192) { | | | |
| (*lenp) = *s++; | | | |
| return 1; | | | |
| } else if (*s < 255) { | | | |
| (*lenp) = ((((unsigned)s[0]) - 192) << 8) + s[1] + 192; | | | |
| return 2; | | | |
| } else { | | | |
| (*lenp) = pgpGrab(s+1, (size_t) 4); | | | |
| return 5; | | | |
| } | | | |
| } | | | |
| | | | |
| /** \ingroup rpmpgp | | | |
| * Return hex formatted representation of bytes. | | * Return hex formatted representation of bytes. | |
| * @param p bytes | | * @param p bytes | |
| * @param plen no. of bytes | | * @param plen no. of bytes | |
| * @return hex formatted string (malloc'ed) | | * @return hex formatted string (malloc'ed) | |
| */ | | */ | |
| char * pgpHexStr(const uint8_t *p, size_t plen); | | char * pgpHexStr(const uint8_t *p, size_t plen); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| * Calculate OpenPGP public key fingerprint. | | * Calculate OpenPGP public key fingerprint. | |
| * @todo V3 non-RSA public keys not implemented. | | * @todo V3 non-RSA public keys not implemented. | |
| | | | |
| skipping to change at line 1012 | | skipping to change at line 991 | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| * Extract OpenPGP public key fingerprint from base64 encoded packet. | | * Extract OpenPGP public key fingerprint from base64 encoded packet. | |
| * @todo V3 non-RSA public keys not implemented. | | * @todo V3 non-RSA public keys not implemented. | |
| * @param b64pkt base64 encoded openpgp packet | | * @param b64pkt base64 encoded openpgp packet | |
| * @retval keyid public key fingerprint | | * @retval keyid public key fingerprint | |
| * @return 8 (no. of bytes) on success, < 0 on error | | * @return 8 (no. of bytes) on success, < 0 on error | |
| */ | | */ | |
| int pgpExtractPubkeyFingerprint(const char * b64pkt, pgpKeyID_t keyid); | | int pgpExtractPubkeyFingerprint(const char * b64pkt, pgpKeyID_t keyid); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
|
| | | * Parse a OpenPGP packet(s). | |
| | | * @param pkts OpenPGP packet(s) | |
| | | * @param pktlen OpenPGP packet(s) length (no. of bytes) | |
| | | * @param pkttype Expected packet type (signature/key) or 0 for any | |
| | | * @retval ret signature/pubkey packet parameters on success (alloc | |
| | | ed) | |
| | | * @return -1 on error, 0 on success | |
| | | */ | |
| | | int pgpPrtParams(const uint8_t *pkts, size_t pktlen, unsigned int pkttype, | |
| | | pgpDigParams * ret); | |
| | | | |
| | | /** \ingroup rpmpgp | |
| * Print/parse a OpenPGP packet(s). | | * Print/parse a OpenPGP packet(s). | |
| * @param pkts OpenPGP packet(s) | | * @param pkts OpenPGP packet(s) | |
| * @param pktlen OpenPGP packet(s) length (no. of bytes) | | * @param pktlen OpenPGP packet(s) length (no. of bytes) | |
| * @retval dig parsed output of signature/pubkey packet parameters | | * @retval dig parsed output of signature/pubkey packet parameters | |
| * @param printing should packets be printed? | | * @param printing should packets be printed? | |
| * @return -1 on error, 0 on success | | * @return -1 on error, 0 on success | |
| */ | | */ | |
| int pgpPrtPkts(const uint8_t *pkts, size_t pktlen, pgpDig dig, int printing
); | | int pgpPrtPkts(const uint8_t *pkts, size_t pktlen, pgpDig dig, int printing
); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| | | | |
| skipping to change at line 1068 | | skipping to change at line 1058 | |
| void pgpCleanDig(pgpDig dig); | | void pgpCleanDig(pgpDig dig); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| * Destroy a container for parsed OpenPGP packet(s). | | * Destroy a container for parsed OpenPGP packet(s). | |
| * @param dig container | | * @param dig container | |
| * @return NULL always | | * @return NULL always | |
| */ | | */ | |
| pgpDig pgpFreeDig(pgpDig dig); | | pgpDig pgpFreeDig(pgpDig dig); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
|
| | | * Retrieve parameters for parsed OpenPGP packet(s). | |
| | | * @param dig container | |
| | | * @param pkttype type of params to retrieve (signature / pubkey) | |
| | | * @return pointer to OpenPGP parameters, NULL on error/not fou | |
| | | nd | |
| | | */ | |
| | | pgpDigParams pgpDigGetParams(pgpDig dig, unsigned int pkttype); | |
| | | | |
| | | /** \ingroup rpmpgp | |
| | | * Compare OpenPGP packet parameters | |
| | | * param p1 1st parameter container | |
| | | * param p2 2nd parameter container | |
| | | * return 1 if the parameters differ, 0 otherwise | |
| | | */ | |
| | | int pgpDigParamsCmp(pgpDigParams p1, pgpDigParams p2); | |
| | | | |
| | | /** \ingroup rpmpgp | |
| | | * Retrieve OpenPGP algorithm parameters | |
| | | * param digp parameter container | |
| | | * param algotype PGPVAL_HASHALGO / PGPVAL_PUBKEYALGO | |
| | | * return algorithm value, 0 on error | |
| | | */ | |
| | | unsigned int pgpDigParamsAlgo(pgpDigParams digp, unsigned int algotype); | |
| | | | |
| | | /** \ingroup rpmpgp | |
| | | * Destroy parsed OpenPGP packet parameter(s). | |
| | | * @param digp parameter container | |
| | | * @return NULL always | |
| | | */ | |
| | | pgpDigParams pgpDigParamsFree(pgpDigParams digp); | |
| | | | |
| | | /** \ingroup rpmpgp | |
| | | * Verify a PGP signature. | |
| | | * @param key public key | |
| | | * @param sig signature | |
| | | * @param hashctx digest context | |
| | | * @return RPMRC_OK on success | |
| | | */ | |
| | | rpmRC pgpVerifySignature(pgpDigParams key, pgpDigParams sig, DIGEST_CTX has | |
| | | hctx); | |
| | | | |
| | | /** \ingroup rpmpgp | |
| * Verify a PGP signature. | | * Verify a PGP signature. | |
|
| | | * @deprecated use pgpVerifySignature() instead | |
| | | * | |
| * @param dig container | | * @param dig container | |
| * @param hashctx digest context | | * @param hashctx digest context | |
| * @return RPMRC_OK on success | | * @return RPMRC_OK on success | |
| */ | | */ | |
| rpmRC pgpVerifySig(pgpDig dig, DIGEST_CTX hashctx); | | rpmRC pgpVerifySig(pgpDig dig, DIGEST_CTX hashctx); | |
| | | | |
| /** \ingroup rpmpgp | | /** \ingroup rpmpgp | |
| * Return a string identification of a PGP signature/pubkey. | | * Return a string identification of a PGP signature/pubkey. | |
| * @param digp signature/pubkey container | | * @param digp signature/pubkey container | |
| * @return string describing the item and parameters | | * @return string describing the item and parameters | |
| | | | |
End of changes. 4 change blocks. |
| 21 lines changed or deleted | | 56 lines changed or added | |
|
| rpmsq.h | | rpmsq.h | |
| #ifndef H_RPMSQ | | #ifndef H_RPMSQ | |
| #define H_RPMSQ | | #define H_RPMSQ | |
| | | | |
| /** \ingroup rpmio | | /** \ingroup rpmio | |
| * \file rpmio/rpmsq.h | | * \file rpmio/rpmsq.h | |
| * | | * | |
| */ | | */ | |
|
| | | | |
| #include <rpm/rpmsw.h> | | #include <rpm/rpmsw.h> | |
| #include <signal.h> | | #include <signal.h> | |
|
| #if defined(_RPMSQ_INTERNAL) | | | |
| #include <pthread.h> | | | |
| #endif | | | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /** \ingroup rpmsq | | /** \ingroup rpmsq | |
|
| */ | | | |
| typedef struct rpmsig_s * rpmsig; | | | |
| | | | |
| /** \ingroup rpmsq | | | |
| */ | | | |
| typedef struct rpmsqElem * rpmsq; | | | |
| | | | |
| /** \ingroup rpmsq | | | |
| * Default signal handler prototype. | | * Default signal handler prototype. | |
| * @param signum signal number | | * @param signum signal number | |
| * @param info (siginfo_t) signal info | | * @param info (siginfo_t) signal info | |
| * @param context signal context | | * @param context signal context | |
| */ | | */ | |
| #ifdef SA_SIGINFO | | #ifdef SA_SIGINFO | |
| typedef void (*rpmsqAction_t) (int signum, siginfo_t * info, void * context
); | | typedef void (*rpmsqAction_t) (int signum, siginfo_t * info, void * context
); | |
| #else | | #else | |
| typedef void (*rpmsqAction_t) (int signum); | | typedef void (*rpmsqAction_t) (int signum); | |
| #endif | | #endif | |
| | | | |
|
| /* XXX make this fully opaque? */ | | | |
| #if defined(_RPMSQ_INTERNAL) | | | |
| /** | | | |
| * SIGCHLD queue element. | | | |
| */ | | | |
| struct rpmsqElem { | | | |
| struct rpmsqElem * q_forw; /*!< for use by insque(3)/remque(3). */ | | | |
| struct rpmsqElem * q_back; | | | |
| pid_t child; /*!< Currently running child. */ | | | |
| volatile pid_t reaped; /*!< Reaped waitpid(3) return. */ | | | |
| volatile int status; /*!< Reaped waitpid(3) status. */ | | | |
| struct rpmop_s op; /*!< Scriptlet operation timestamp; */ | | | |
| rpmtime_t ms_scriptlets; /*!< Accumulated script duration (msecs). */ | | | |
| int reaper; /*!< Register SIGCHLD handler? */ | | | |
| int pipes[2]; /*!< Parent/child interlock. */ | | | |
| void * id; /*!< Blocking thread id (pthread_t). */ | | | |
| pthread_mutex_t mutex; /*!< Signal delivery to thread condvar. */ | | | |
| pthread_cond_t cond; | | | |
| }; | | | |
| #endif /* _RPMSQ_INTERNAL */ | | | |
| | | | |
| /** \ingroup rpmsq | | /** \ingroup rpmsq | |
| * Test if given signal has been caught (while signals blocked). | | * Test if given signal has been caught (while signals blocked). | |
| * Similar to sigismember() but operates on internal signal queue. | | * Similar to sigismember() but operates on internal signal queue. | |
| * @param signum signal to test for | | * @param signum signal to test for | |
| * @return 1 if caught, 0 if not and -1 on error | | * @return 1 if caught, 0 if not and -1 on error | |
| */ | | */ | |
| int rpmsqIsCaught(int signum); | | int rpmsqIsCaught(int signum); | |
| | | | |
| /** \ingroup rpmsq | | /** \ingroup rpmsq | |
| * Default signal handler. | | * Default signal handler. | |
| | | | |
| skipping to change at line 88 | | skipping to change at line 55 | |
| #endif | | #endif | |
| | | | |
| /** \ingroup rpmsq | | /** \ingroup rpmsq | |
| * Enable or disable a signal handler. | | * Enable or disable a signal handler. | |
| * @param signum signal to enable (or disable if negative) | | * @param signum signal to enable (or disable if negative) | |
| * @param handler sa_sigaction handler (or NULL to use rpmsqHandler()) | | * @param handler sa_sigaction handler (or NULL to use rpmsqHandler()) | |
| * @return no. of refs, -1 on error | | * @return no. of refs, -1 on error | |
| */ | | */ | |
| int rpmsqEnable(int signum, rpmsqAction_t handler); | | int rpmsqEnable(int signum, rpmsqAction_t handler); | |
| | | | |
|
| /** \ingroup rpmsq | | | |
| * Fork a child process. | | | |
| * @param sq scriptlet queue element | | | |
| * @return fork(2) pid | | | |
| */ | | | |
| pid_t rpmsqFork(rpmsq sq); | | | |
| | | | |
| /** \ingroup rpmsq | | | |
| * Wait for child process to be reaped. | | | |
| * @param sq scriptlet queue element | | | |
| * @return reaped child pid | | | |
| */ | | | |
| pid_t rpmsqWait(rpmsq sq); | | | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* H_RPMSQ */ | | #endif /* H_RPMSQ */ | |
| | | | |
End of changes. 5 change blocks. |
| 47 lines changed or deleted | | 0 lines changed or added | |
|
| rpmtag.h | | rpmtag.h | |
| | | | |
| skipping to change at line 147 | | skipping to change at line 147 | |
| RPMTAG_TRIGGERNAME = 1066, /* s[] */ | | RPMTAG_TRIGGERNAME = 1066, /* s[] */ | |
| RPMTAG_TRIGGERVERSION = 1067, /* s[] */ | | RPMTAG_TRIGGERVERSION = 1067, /* s[] */ | |
| RPMTAG_TRIGGERFLAGS = 1068, /* i[] */ | | RPMTAG_TRIGGERFLAGS = 1068, /* i[] */ | |
| RPMTAG_TRIGGERINDEX = 1069, /* i[] */ | | RPMTAG_TRIGGERINDEX = 1069, /* i[] */ | |
| RPMTAG_VERIFYSCRIPT = 1079, /* s */ | | RPMTAG_VERIFYSCRIPT = 1079, /* s */ | |
| RPMTAG_CHANGELOGTIME = 1080, /* i[] */ | | RPMTAG_CHANGELOGTIME = 1080, /* i[] */ | |
| RPMTAG_CHANGELOGNAME = 1081, /* s[] */ | | RPMTAG_CHANGELOGNAME = 1081, /* s[] */ | |
| RPMTAG_CHANGELOGTEXT = 1082, /* s[] */ | | RPMTAG_CHANGELOGTEXT = 1082, /* s[] */ | |
| RPMTAG_BROKENMD5 = 1083, /* internal - obsolete */ | | RPMTAG_BROKENMD5 = 1083, /* internal - obsolete */ | |
| RPMTAG_PREREQ = 1084, /* internal */ | | RPMTAG_PREREQ = 1084, /* internal */ | |
|
| RPMTAG_PREINPROG = 1085, /* s */ | | RPMTAG_PREINPROG = 1085, /* s[] */ | |
| RPMTAG_POSTINPROG = 1086, /* s */ | | RPMTAG_POSTINPROG = 1086, /* s[] */ | |
| RPMTAG_PREUNPROG = 1087, /* s */ | | RPMTAG_PREUNPROG = 1087, /* s[] */ | |
| RPMTAG_POSTUNPROG = 1088, /* s */ | | RPMTAG_POSTUNPROG = 1088, /* s[] */ | |
| RPMTAG_BUILDARCHS = 1089, /* s[] */ | | RPMTAG_BUILDARCHS = 1089, /* s[] */ | |
| RPMTAG_OBSOLETENAME = 1090, /* s[] */ | | RPMTAG_OBSOLETENAME = 1090, /* s[] */ | |
| #define RPMTAG_OBSOLETES RPMTAG_OBSOLETENAME /* s[] */ | | #define RPMTAG_OBSOLETES RPMTAG_OBSOLETENAME /* s[] */ | |
| #define RPMTAG_O RPMTAG_OBSOLETENAME /* s[] */ | | #define RPMTAG_O RPMTAG_OBSOLETENAME /* s[] */ | |
|
| RPMTAG_VERIFYSCRIPTPROG = 1091, /* s */ | | RPMTAG_VERIFYSCRIPTPROG = 1091, /* s[] */ | |
| RPMTAG_TRIGGERSCRIPTPROG = 1092, /* s[] */ | | RPMTAG_TRIGGERSCRIPTPROG = 1092, /* s[] */ | |
| RPMTAG_DOCDIR = 1093, /* internal */ | | RPMTAG_DOCDIR = 1093, /* internal */ | |
| RPMTAG_COOKIE = 1094, /* s */ | | RPMTAG_COOKIE = 1094, /* s */ | |
| RPMTAG_FILEDEVICES = 1095, /* i[] */ | | RPMTAG_FILEDEVICES = 1095, /* i[] */ | |
| RPMTAG_FILEINODES = 1096, /* i[] */ | | RPMTAG_FILEINODES = 1096, /* i[] */ | |
| RPMTAG_FILELANGS = 1097, /* s[] */ | | RPMTAG_FILELANGS = 1097, /* s[] */ | |
| RPMTAG_PREFIXES = 1098, /* s[] */ | | RPMTAG_PREFIXES = 1098, /* s[] */ | |
| RPMTAG_INSTPREFIXES = 1099, /* s[] */ | | RPMTAG_INSTPREFIXES = 1099, /* s[] */ | |
| RPMTAG_TRIGGERIN = 1100, /* internal */ | | RPMTAG_TRIGGERIN = 1100, /* internal */ | |
| RPMTAG_TRIGGERUN = 1101, /* internal */ | | RPMTAG_TRIGGERUN = 1101, /* internal */ | |
| | | | |
| skipping to change at line 217 | | skipping to change at line 217 | |
| RPMTAG_FILEDEPENDSX = 1143, /* i[] */ | | RPMTAG_FILEDEPENDSX = 1143, /* i[] */ | |
| RPMTAG_FILEDEPENDSN = 1144, /* i[] */ | | RPMTAG_FILEDEPENDSN = 1144, /* i[] */ | |
| RPMTAG_DEPENDSDICT = 1145, /* i[] */ | | RPMTAG_DEPENDSDICT = 1145, /* i[] */ | |
| RPMTAG_SOURCEPKGID = 1146, /* x */ | | RPMTAG_SOURCEPKGID = 1146, /* x */ | |
| RPMTAG_FILECONTEXTS = 1147, /* s[] - obsolete */ | | RPMTAG_FILECONTEXTS = 1147, /* s[] - obsolete */ | |
| RPMTAG_FSCONTEXTS = 1148, /* s[] extension */ | | RPMTAG_FSCONTEXTS = 1148, /* s[] extension */ | |
| RPMTAG_RECONTEXTS = 1149, /* s[] extension */ | | RPMTAG_RECONTEXTS = 1149, /* s[] extension */ | |
| RPMTAG_POLICIES = 1150, /* s[] selinux *.te policy file. */ | | RPMTAG_POLICIES = 1150, /* s[] selinux *.te policy file. */ | |
| RPMTAG_PRETRANS = 1151, /* s */ | | RPMTAG_PRETRANS = 1151, /* s */ | |
| RPMTAG_POSTTRANS = 1152, /* s */ | | RPMTAG_POSTTRANS = 1152, /* s */ | |
|
| RPMTAG_PRETRANSPROG = 1153, /* s */ | | RPMTAG_PRETRANSPROG = 1153, /* s[] */ | |
| RPMTAG_POSTTRANSPROG = 1154, /* s */ | | RPMTAG_POSTTRANSPROG = 1154, /* s[] */ | |
| RPMTAG_DISTTAG = 1155, /* s */ | | RPMTAG_DISTTAG = 1155, /* s */ | |
| RPMTAG_SUGGESTSNAME = 1156, /* s[] extension (unimplemen
ted) */ | | RPMTAG_SUGGESTSNAME = 1156, /* s[] extension (unimplemen
ted) */ | |
| #define RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME /* s[] (unimplemente
d) */ | | #define RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME /* s[] (unimplemente
d) */ | |
| RPMTAG_SUGGESTSVERSION = 1157, /* s[] extension (unimplemented) */ | | RPMTAG_SUGGESTSVERSION = 1157, /* s[] extension (unimplemented) */ | |
| RPMTAG_SUGGESTSFLAGS = 1158, /* i[] extension (unimplemented) */ | | RPMTAG_SUGGESTSFLAGS = 1158, /* i[] extension (unimplemented) */ | |
| RPMTAG_ENHANCESNAME = 1159, /* s[] extension placeholder
(unimplemented) */ | | RPMTAG_ENHANCESNAME = 1159, /* s[] extension placeholder
(unimplemented) */ | |
| #define RPMTAG_ENHANCES RPMTAG_ENHANCESNAME /* s[] (unimplemente
d) */ | | #define RPMTAG_ENHANCES RPMTAG_ENHANCESNAME /* s[] (unimplemente
d) */ | |
| RPMTAG_ENHANCESVERSION = 1160, /* s[] extension placeholder (unimpl
emented) */ | | RPMTAG_ENHANCESVERSION = 1160, /* s[] extension placeholder (unimpl
emented) */ | |
| RPMTAG_ENHANCESFLAGS = 1161, /* i[] extension placeholder (unimpl
emented) */ | | RPMTAG_ENHANCESFLAGS = 1161, /* i[] extension placeholder (unimpl
emented) */ | |
| RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimpl
emented) */ | | RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimpl
emented) */ | |
| | | | |
| skipping to change at line 302 | | skipping to change at line 302 | |
| RPMTAG_TRIGGERSCRIPTFLAGS = 5027, /* i[] */ | | RPMTAG_TRIGGERSCRIPTFLAGS = 5027, /* i[] */ | |
| RPMTAG_COLLECTIONS = 5029, /* s[] list of collections */ | | RPMTAG_COLLECTIONS = 5029, /* s[] list of collections */ | |
| RPMTAG_POLICYNAMES = 5030, /* s[] */ | | RPMTAG_POLICYNAMES = 5030, /* s[] */ | |
| RPMTAG_POLICYTYPES = 5031, /* s[] */ | | RPMTAG_POLICYTYPES = 5031, /* s[] */ | |
| RPMTAG_POLICYTYPESINDEXES = 5032, /* i[] */ | | RPMTAG_POLICYTYPESINDEXES = 5032, /* i[] */ | |
| RPMTAG_POLICYFLAGS = 5033, /* i[] */ | | RPMTAG_POLICYFLAGS = 5033, /* i[] */ | |
| RPMTAG_VCS = 5034, /* s */ | | RPMTAG_VCS = 5034, /* s */ | |
| RPMTAG_ORDERNAME = 5035, /* s[] */ | | RPMTAG_ORDERNAME = 5035, /* s[] */ | |
| RPMTAG_ORDERVERSION = 5036, /* s[] */ | | RPMTAG_ORDERVERSION = 5036, /* s[] */ | |
| RPMTAG_ORDERFLAGS = 5037, /* i[] */ | | RPMTAG_ORDERFLAGS = 5037, /* i[] */ | |
|
| | | RPMTAG_MSSFMANIFEST = 5038, /* s[] reservation (unimplem | |
| | | ented) */ | |
| | | RPMTAG_MSSFDOMAIN = 5039, /* s[] reservation (unimplemented) * | |
| | | / | |
| | | RPMTAG_INSTFILENAMES = 5040, /* s[] extension */ | |
| | | RPMTAG_REQUIRENEVRS = 5041, /* s[] extension */ | |
| | | RPMTAG_PROVIDENEVRS = 5042, /* s[] extension */ | |
| | | RPMTAG_OBSOLETENEVRS = 5043, /* s[] extension */ | |
| | | RPMTAG_CONFLICTNEVRS = 5044, /* s[] extension */ | |
| | | RPMTAG_FILENLINKS = 5045, /* i[] extension */ | |
| | | | |
| RPMTAG_FIRSTFREE_TAG /*!< internal */ | | RPMTAG_FIRSTFREE_TAG /*!< internal */ | |
| } rpmTag; | | } rpmTag; | |
| | | | |
| #define RPMTAG_EXTERNAL_TAG 1000000 | | #define RPMTAG_EXTERNAL_TAG 1000000 | |
| | | | |
| /** \ingroup rpmtag | | /** \ingroup rpmtag | |
| * Rpm database index tags. | | * Rpm database index tags. | |
| */ | | */ | |
| typedef enum rpmDbiTag_e { | | typedef enum rpmDbiTag_e { | |
| | | | |
| skipping to change at line 326 | | skipping to change at line 334 | |
| RPMDBI_GROUP = RPMTAG_GROUP, | | RPMDBI_GROUP = RPMTAG_GROUP, | |
| RPMDBI_REQUIRENAME = RPMTAG_REQUIRENAME, | | RPMDBI_REQUIRENAME = RPMTAG_REQUIRENAME, | |
| RPMDBI_PROVIDENAME = RPMTAG_PROVIDENAME, | | RPMDBI_PROVIDENAME = RPMTAG_PROVIDENAME, | |
| RPMDBI_CONFLICTNAME = RPMTAG_CONFLICTNAME, | | RPMDBI_CONFLICTNAME = RPMTAG_CONFLICTNAME, | |
| RPMDBI_OBSOLETENAME = RPMTAG_OBSOLETENAME, | | RPMDBI_OBSOLETENAME = RPMTAG_OBSOLETENAME, | |
| RPMDBI_TRIGGERNAME = RPMTAG_TRIGGERNAME, | | RPMDBI_TRIGGERNAME = RPMTAG_TRIGGERNAME, | |
| RPMDBI_DIRNAMES = RPMTAG_DIRNAMES, | | RPMDBI_DIRNAMES = RPMTAG_DIRNAMES, | |
| RPMDBI_INSTALLTID = RPMTAG_INSTALLTID, | | RPMDBI_INSTALLTID = RPMTAG_INSTALLTID, | |
| RPMDBI_SIGMD5 = RPMTAG_SIGMD5, | | RPMDBI_SIGMD5 = RPMTAG_SIGMD5, | |
| RPMDBI_SHA1HEADER = RPMTAG_SHA1HEADER, | | RPMDBI_SHA1HEADER = RPMTAG_SHA1HEADER, | |
|
| | | RPMDBI_INSTFILENAMES = RPMTAG_INSTFILENAMES, | |
| } rpmDbiTag; | | } rpmDbiTag; | |
| | | | |
| /** \ingroup signature | | /** \ingroup signature | |
| * Tags found in signature header from package. | | * Tags found in signature header from package. | |
| */ | | */ | |
| typedef enum rpmSigTag_e { | | typedef enum rpmSigTag_e { | |
| RPMSIGTAG_SIZE = 1000, /*!< internal Header+Payload size (32bit) in
bytes. */ | | RPMSIGTAG_SIZE = 1000, /*!< internal Header+Payload size (32bit) in
bytes. */ | |
| RPMSIGTAG_LEMD5_1 = 1001, /*!< internal Broken MD5, take 1 @deprecated
legacy. */ | | RPMSIGTAG_LEMD5_1 = 1001, /*!< internal Broken MD5, take 1 @deprecated
legacy. */ | |
| RPMSIGTAG_PGP = 1002, /*!< internal PGP 2.6.3 signature. */ | | RPMSIGTAG_PGP = 1002, /*!< internal PGP 2.6.3 signature. */ | |
| RPMSIGTAG_LEMD5_2 = 1003, /*!< internal Broken MD5, take 2 @deprecated
legacy. */ | | RPMSIGTAG_LEMD5_2 = 1003, /*!< internal Broken MD5, take 2 @deprecated
legacy. */ | |
| | | | |
End of changes. 5 change blocks. |
| 7 lines changed or deleted | | 18 lines changed or added | |
|
| rpmtd.h | | rpmtd.h | |
| | | | |
| skipping to change at line 17 | | skipping to change at line 17 | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| enum rpmtdFlags_e { | | enum rpmtdFlags_e { | |
| RPMTD_NONE = 0, | | RPMTD_NONE = 0, | |
| RPMTD_ALLOCED = (1 << 0), /* was memory allocated? */ | | RPMTD_ALLOCED = (1 << 0), /* was memory allocated? */ | |
| RPMTD_PTR_ALLOCED = (1 << 1), /* were array pointers allocated? */ | | RPMTD_PTR_ALLOCED = (1 << 1), /* were array pointers allocated? */ | |
| RPMTD_IMMUTABLE = (1 << 2), /* header data or modifiable? */ | | RPMTD_IMMUTABLE = (1 << 2), /* header data or modifiable? */ | |
| RPMTD_ARGV = (1 << 3), /* string array is NULL-terminated?
*/ | | RPMTD_ARGV = (1 << 3), /* string array is NULL-terminated?
*/ | |
|
| | | RPMTD_INVALID = (1 << 4), /* invalid data (in header) */ | |
| }; | | }; | |
| | | | |
| typedef rpmFlags rpmtdFlags; | | typedef rpmFlags rpmtdFlags; | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Container for rpm tag data (from headers or extensions). | | * Container for rpm tag data (from headers or extensions). | |
| * @todo Make this opaque (at least outside rpm itself) | | * @todo Make this opaque (at least outside rpm itself) | |
| */ | | */ | |
| struct rpmtd_s { | | struct rpmtd_s { | |
| rpm_tag_t tag; /* rpm tag of this data entry*/ | | rpm_tag_t tag; /* rpm tag of this data entry*/ | |
| | | | |
| skipping to change at line 90 | | skipping to change at line 91 | |
| rpmTagType rpmtdType(rpmtd td); | | rpmTagType rpmtdType(rpmtd td); | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Retrieve class of the container. | | * Retrieve class of the container. | |
| * @param td Tag data container | | * @param td Tag data container | |
| * @return Rpm tag class | | * @return Rpm tag class | |
| */ | | */ | |
| rpmTagClass rpmtdClass(rpmtd td); | | rpmTagClass rpmtdClass(rpmtd td); | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
|
| | | * Retrieve flags of the container (allocation details etc) | |
| | | * @param td Tag data container | |
| | | * @return Container flags | |
| | | */ | |
| | | rpmtdFlags rpmtdGetFlags(rpmtd td); | |
| | | | |
| | | /** \ingroup rpmtd | |
| * Retrieve current iteration index of the container. | | * Retrieve current iteration index of the container. | |
| * @param td Tag data container | | * @param td Tag data container | |
| * @return Iteration index (or -1 if not iterating) | | * @return Iteration index (or -1 if not iterating) | |
| */ | | */ | |
| int rpmtdGetIndex(rpmtd td); | | int rpmtdGetIndex(rpmtd td); | |
| | | | |
| /** \ingroup rpmtd | | /** \ingroup rpmtd | |
| * Set iteration index of the container. | | * Set iteration index of the container. | |
| * If new index is out of bounds for the container, -1 is returned and | | * If new index is out of bounds for the container, -1 is returned and | |
| * iteration index is left untouched. | | * iteration index is left untouched. | |
| | | | |
End of changes. 2 change blocks. |
| 0 lines changed or deleted | | 8 lines changed or added | |
|