aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs160
1 files changed, 0 insertions, 160 deletions
diff --git a/URPM.xs b/URPM.xs
index 2a2a011..b5e3acf 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -101,150 +101,6 @@ typedef struct s_Package* URPM__Package;
1 for rpm 4.2 and better new approach. */
#define PROMOTE_EPOCH_SENSE 1
-/* these are in rpmlib but not in rpmlib.h */
-int readLead(FD_t fd, struct rpmlead *lead);
-/* Importing rpm hidden functions,
- Does RedHat try to force using their fucking functions using char **
- as direct mapping of rpm command line options ? */
-
-/* almost direct importation of rpmio_internal.h */
-
-/** \ingroup rpmio
- * Values parsed from OpenPGP signature/pubkey packet(s).
- */
-struct pgpDigParams_s {
-/*@only@*/ /*@null@*/
- const char * userid;
-/*@only@*/ /*@null@*/
- const byte * hash;
- const char * params[4];
- byte tag;
-
- byte version; /*!< version number. */
- byte time[4]; /*!< time that the key was created. */
- byte pubkey_algo; /*!< public key algorithm. */
-
- byte hash_algo;
- byte sigtype;
- byte hashlen;
- byte signhash16[2];
- byte signid[8];
- byte saved;
-#define PGPDIG_SAVED_TIME (1 << 0)
-#define PGPDIG_SAVED_ID (1 << 1)
-
-};
-
-/** \ingroup rpmio
- * Container for values parsed from an OpenPGP signature and public key.
- */
-struct pgpDig_s {
- struct pgpDigParams_s signature;
- struct pgpDigParams_s pubkey;
-
- size_t nbytes; /*!< No. bytes of plain text. */
-
-/*@only@*/ /*@null@*/
- DIGEST_CTX sha1ctx; /*!< (dsa) sha1 hash context. */
-/*@only@*/ /*@null@*/
- DIGEST_CTX hdrsha1ctx; /*!< (dsa) header sha1 hash context. */
-/*@only@*/ /*@null@*/
- void * sha1; /*!< (dsa) V3 signature hash. */
- size_t sha1len; /*!< (dsa) V3 signature hash length. */
-
-/*@only@*/ /*@null@*/
- DIGEST_CTX md5ctx; /*!< (rsa) md5 hash context. */
-#ifdef NOTYET
-/*@only@*/ /*@null@*/
- DIGEST_CTX hdrmd5ctx; /*!< (rsa) header md5 hash context. */
-#endif
-/*@only@*/ /*@null@*/
- void * md5; /*!< (rsa) V3 signature hash. */
- size_t md5len; /*!< (rsa) V3 signature hash length. */
-
- /* WARNING INCOMPLETE TYPE */
-};
-
-/** \ingroup rpmio
- */
-typedef struct _FDSTACK_s {
- FDIO_t io;
-/*@dependent@*/ void * fp;
- int fdno;
-} FDSTACK_t;
-
-/** \ingroup rpmio
- * Cumulative statistics for an I/O operation.
- */
-typedef struct {
- int count; /*!< Number of operations. */
- off_t bytes; /*!< Number of bytes transferred. */
- time_t msecs; /*!< Number of milli-seconds. */
-} OPSTAT_t;
-
-/** \ingroup rpmio
- * Identify per-desciptor I/O operation statistics.
- */
-enum FDSTAT_e {
- FDSTAT_READ = 0, /*!< Read statistics index. */
- FDSTAT_WRITE = 1, /*!< Write statistics index. */
- FDSTAT_SEEK = 2, /*!< Seek statistics index. */
- FDSTAT_CLOSE = 3 /*!< Close statistics index */
-};
-
-/** \ingroup rpmio
- * Cumulative statistics for a descriptor.
- */
-typedef /*@abstract@*/ struct {
- struct timeval create; /*!< Structure creation time. */
- struct timeval begin; /*!< Operation start time. */
- OPSTAT_t ops[4]; /*!< Cumulative statistics. */
-} * FDSTAT_t;
-
-/** \ingroup rpmio
- */
-typedef struct _FDDIGEST_s {
- pgpHashAlgo hashalgo;
- DIGEST_CTX hashctx;
-} * FDDIGEST_t;
-
-/** \ingroup rpmio
- * The FD_t File Handle data structure.
- */
-struct _FD_s {
-/*@refs@*/ int nrefs;
- int flags;
-#define RPMIO_DEBUG_IO 0x40000000
-#define RPMIO_DEBUG_REFS 0x20000000
- int magic;
-#define FDMAGIC 0x04463138
- int nfps;
- FDSTACK_t fps[8];
- int urlType; /* ufdio: */
-
-/*@dependent@*/ void * url; /* ufdio: URL info */
- int rd_timeoutsecs; /* ufdRead: per FD_t timer */
- ssize_t bytesRemain; /* ufdio: */
- ssize_t contentLength; /* ufdio: */
- int persist; /* ufdio: */
- int wr_chunked; /* ufdio: */
-
- int syserrno; /* last system errno encountered */
-/*@observer@*/ const void *errcookie; /* gzdio/bzdio/ufdio: */
-
- FDSTAT_t stats; /* I/O statistics */
-
- int ndigests;
-#define FDDIGEST_MAX 4
- struct _FDDIGEST_s digests[FDDIGEST_MAX];
-
- int ftpFileDoneNeeded; /* ufdio: (FTP) */
- unsigned int firstFree; /* fadio: */
- long int fileSize; /* fadio: */
- long int fd_cpioPos; /* cpio: */
-};
-/*@access FD_t@*/
-
static int rpmError_callback_data;
void rpmError_callback() {
if (rpmErrorCode() != RPMERR_UNLINK && rpmErrorCode() != RPMERR_RMDIR) {
@@ -252,22 +108,6 @@ void rpmError_callback() {
}
}
-static inline
-void fdInitDigest(FD_t fd, pgpHashAlgo hashalgo, int flags)
- /*@modifies fd @*/
-{
- FDDIGEST_t fddig = fd->digests + fd->ndigests;
- if (fddig != (fd->digests + FDDIGEST_MAX)) {
- fd->ndigests++;
- fddig->hashalgo = hashalgo;
- fddig->hashctx = rpmDigestInit(hashalgo, flags);
- }
-}
-
-/* end of incoporated rpmio_internal.h */
-
-int rpmReadSignature(FD_t fd, Header *header, short sig_type, const char **msg);
-
/* needed for importing keys (from rpmio) */
int rpmioSlurp(const char * fn, const byte ** bp, ssize_t * blenp);
int b64decode (const char * s, void ** datap, size_t *lenp);