Update of /cvsroot/fink/dists/10.4/stable/main/finkinfo/crypto
In directory vz-cvs-3.sog:/tmp/cvs-serv11975
Added Files:
rpm5.info rpm5.patch
Log Message:
rpm5-5.0.3-3: move to stable
--- NEW FILE: rpm5.patch ---
diff -urp build/pack.c.orig build/pack.c
--- rpm-5.0.3.orig/build/pack.c 2008-01-29 14:57:33.000000000 +0100
+++ rpm-5.0.3/build/pack.c 2009-06-08 10:54:15.000000000 +0200
@@ -672,6 +672,13 @@ rpmRC writeRPM(Header *hdrp, unsigned ch
he->c = 1;
xx = headerPut(h, he, 0);
(void) rpmlibNeedsFeature(h, "PayloadIsLzma", "4.4.6-1");
+ } else if (s[1] == 'x' && s[2] == 'z') {
+ he->tag = RPMTAG_PAYLOADCOMPRESSOR;
+ he->t = RPM_STRING_TYPE;
+ he->p.str = "xz";
+ he->c = 1;
+ xx = headerPut(h, he, 0);
+ (void) rpmlibNeedsFeature(h, "PayloadIsXz", "5.2-1");
}
strcpy(buf, rpmio_flags);
buf[s - rpmio_flags] = '\0';
diff -urp build/parsePrep.c.orig build/parsePrep.c
--- rpm-5.0.3.orig/build/parsePrep.c 2007-12-31 17:21:47.000000000 +0100
+++ rpm-5.0.3/build/parsePrep.c 2009-04-06 08:38:11.000000000 +0200
@@ -159,6 +159,9 @@ static char *doPatch(Spec spec, int c, i
case COMPRESSED_LZMA:
zipper = "%{__lzma}";
break;
+ case COMPRESSED_XZ:
+ zipper = "%{__xz}";
+ break;
}
zipper = rpmGetPath(zipper, NULL);
@@ -289,6 +292,9 @@ _rpmmg_debug = 0;
case COMPRESSED_LZMA:
t = "%{__lzma} -dc";
break;
+ case COMPRESSED_XZ:
+ t = "%{__xz} -dc";
+ break;
case COMPRESSED_ZIP:
if (rpmIsVerbose() && !quietly)
t = "%{__unzip}";
diff -urp configure.ac.orig configure.ac
--- rpm-5.0.3.orig/configure.ac 2008-03-03 09:41:37.000000000 +0100
+++ rpm-5.0.3/configure.ac 2009-07-29 10:21:26.000000000 +0200
@@ -469,6 +469,7 @@ AC_PATH_PROG(__TCLSH, tclsh, %{_bindir}/
AC_PATH_PROG(__UNZIP, unzip, %{_bindir}/unzip, $MYPATH)
AC_PATH_PROG(__WGET, wget, %{_bindir}/wget, $MYPATH)
AC_PATH_PROG(__XAR, xar, %{_bindir}/xar, $MYPATH)
+AC_PATH_PROG(__XZ, xz, %{_bindir}/xz, $MYPATH)
AC_PATH_PROG(__LD, ld, %{_bindir}/ld, $MYPATH)
AC_PATH_PROG(__NM, nm, %{_bindir}/nm, $MYPATH)
AC_PATH_PROG(__OBJCOPY, objcopy, %{_bindir}/objcopy, $MYPATH)
@@ -927,6 +928,13 @@ RPM_CHECK_LIB(
[no,external:none], [],
[], [])
+dnl # LZMA Utils
+RPM_CHECK_LIB(
+ [XZ libLZMA], [xz],
+ [lzma], [lzma_auto_decoder], [lzma.h],
+ [no,external:none], [],
+ [], [])
+
dnl # BeeCrypt
RPM_CHECK_LIB(
[BeeCrypt], [beecrypt],
diff -urp lib/psm.c.orig lib/psm.c
--- rpm-5.0.3.orig/lib/psm.c 2008-02-05 21:23:53.000000000 +0100
+++ rpm-5.0.3/lib/psm.c 2009-04-06 08:38:13.000000000 +0200
@@ -2408,6 +2408,8 @@ psm->te->h = headerFree(psm->te->h);
t = stpcpy(t, ".bzdio");
if (!strcmp(payload_compressor, "lzma"))
t = stpcpy(t, ".lzdio");
+ if (!strcmp(payload_compressor, "xz"))
+ t = stpcpy(t, ".xzdio");
payload_compressor = _free(payload_compressor);
he->tag = RPMTAG_PAYLOADFORMAT;
diff -urp lib/rpmds.c.orig lib/rpmds.c
--- rpm-5.0.3.orig/lib/rpmds.c 2007-12-15 12:17:03.000000000 +0100
+++ rpm-5.0.3/lib/rpmds.c 2009-04-06 08:38:13.000000000 +0200
@@ -1391,6 +1391,11 @@ static struct rpmlibProvides_s rpmlibPro
{ "rpmlib(FileDigestParameterized)", "4.4.6-1",
(RPMSENSE_RPMLIB|RPMSENSE_EQUAL),
N_("file digests can be other than MD5.") },
+#if defined(HAVE_LZMA_H)
+ { "rpmlib(PayloadIsXz)", "5.2-1",
+ (RPMSENSE_RPMLIB|RPMSENSE_EQUAL),
+ N_("package payload can be compressed using xz.") },
+#endif
{ NULL, NULL, 0, NULL }
};
diff -urp macros.in.orig macros.in
--- rpm-5.0.3.orig/macros.in 2008-03-03 09:41:19.000000000 +0100
+++ rpm-5.0.3/macros.in 2009-07-29 10:13:06.000000000 +0200
@@ -93,6 +93,7 @@
%__vcheck %{__perl} %{_rpmhome}/vcheck
%__wget @__WGET@
%__xar @__XAR@
+%__xz @__XZ@
#==============================================================================
# ---- Build system path macros.
diff -urp rpmio/macro.c.orig rpmio/macro.c
--- rpm-5.0.3.orig/rpmio/macro.c 2008-02-05 21:23:56.000000000 +0100
+++ rpm-5.0.3/rpmio/macro.c 2009-04-13 09:20:07.000000000 +0200
@@ -1314,6 +1314,9 @@ doFoo(MacroBuf mb, int negate, const cha
case 5: /* COMPRESSED_LZMA */
sprintf(be, "%%__lzma -dc '%s'", b);
break;
+ case 6: /* COMPRESSED_XZ */
+ sprintf(be, "%%__xz -dc '%s'", b);
+ break;
}
b = be;
} else if (STREQ("mkstemp", f, fn)) {
@@ -2414,6 +2417,10 @@ int isCompressed(const char * file, rpmC
magic[11] == (unsigned char) 0x00 && magic[12] == (unsigned char) 0x00)
/* lzmash */
*compressed = COMPRESSED_LZMA;
else
+ if (magic[0] == (unsigned char) 0xFD && magic[1] == 0x37 &&
magic[2] == 0x7A
+ && magic[3] == 0x58 && magic[4] == 0x5A && magic[5] == 0x00)
/* xz */
+ *compressed = COMPRESSED_XZ;
+ else
if ((magic[0] == (unsigned char) 0037 && magic[1] == (unsigned char) 0213)
/* gzip */
|| (magic[0] == (unsigned char) 0037 && magic[1] == (unsigned
char) 0236) /* old gzip */
|| (magic[0] == (unsigned char) 0037 && magic[1] == (unsigned
char) 0036) /* pack */
diff -urp rpmio/rpmio.c.orig rpmio/rpmio.c
--- rpm-5.0.3.orig/rpmio/rpmio.c 2008-01-29 14:57:50.000000000 +0100
+++ rpm-5.0.3/rpmio/rpmio.c 2009-07-29 11:57:14.000000000 +0200
@@ -216,6 +216,10 @@ static /*@observer@*/ const char * fdbg(
#endif
} else if (fps->io == lzdio) {
sprintf(be, "LZD %p fdno %d", fps->fp, fps->fdno);
+#if defined(HAVE_LZMA_H)
+ } else if (fps->io == xzdio) {
+ sprintf(be, "XZD %p fdno %d", fps->fp, fps->fdno);
+#endif
} else if (fps->io == fpio) {
/*@+voidabstract@*/
sprintf(be, "%s %p(%d) fdno %d",
@@ -3079,6 +3083,422 @@ static struct FDIO_s lzdio_s = {
FDIO_t lzdio = /*@-compmempass@*/ &lzdio_s /*@=compmempass@*/ ;
/* =============================================================== */
+/* Support for LZMA compression library.
+ */
+#if defined(HAVE_LZMA_H)
+
+/* provide necessary defines for inclusion of <lzma.h>
+ similar to LZMAUtils's internal <common.h> and as
+ explicitly stated in the top-level comment of <lzma.h> */
+#ifndef UINT32_C
+# define UINT32_C(n) n ## U
+#endif
+#ifndef UINT32_MAX
+# define UINT32_MAX UINT32_C(4294967295)
+#endif
+#if SIZEOF_UNSIGNED_LONG == 4
+# ifndef UINT64_C
+# define UINT64_C(n) n ## ULL
+# endif
+#else
+# ifndef UINT64_C
+# define UINT64_C(n) n ## UL
+# endif
+#endif
+#ifndef UINT64_MAX
+# define UINT64_MAX UINT64_C(18446744073709551615)
+#endif
+
+#include "lzma.h"
+
+#ifndef LZMA_PRESET_DEFAULT
+#define LZMA_PRESET_DEFAULT UINT32_C(6)
+#endif
+
+/*@access FD_t @*/
+
+#define XZDONLY(fd) assert(fdGetIo(fd) == xzdio)
+
+#define kBufferSize (1 << 15)
+
+typedef struct xzfile {
+/*@only@*/
+ uint8_t buf[kBufferSize]; /*!< IO buffer */
+ lzma_stream strm; /*!< LZMA stream */
+/*@dependent@*/
+ FILE * fp;
+ int encoding;
+ int eof;
+} XZFILE;
+
+/*@-globstate@*/
+/*@null@*/
+static XZFILE *xzopen_internal(const char *path, const char *mode, int fdno,
int xz)
+ /*@globals fileSystem @*/
+ /*@modifies fileSystem @*/
+{
+ int level = LZMA_PRESET_DEFAULT;
+ int encoding = 0;
+ FILE *fp;
+ XZFILE *xzfile;
+ lzma_stream tmp;
+ lzma_ret ret;
+
+ for (; *mode != '\0'; mode++) {
+ if (*mode == 'w')
+ encoding = 1;
+ else if (*mode == 'r')
+ encoding = 0;
+ else if (*mode >= '0' && *mode <= '9')
+ level = (int)(*mode - '0');
+ }
+ if (fdno != -1)
+ fp = fdopen(fdno, encoding ? "w" : "r");
+ else
+ fp = fopen(path, encoding ? "w" : "r");
+ if (!fp)
+ return NULL;
+ xzfile = calloc(1, sizeof(*xzfile));
+ if (!xzfile) {
+ (void) fclose(fp);
+ return NULL;
+ }
+ xzfile->fp = fp;
+ xzfile->encoding = encoding;
+ xzfile->eof = 0;
+ tmp = (lzma_stream)LZMA_STREAM_INIT;
+ xzfile->strm = tmp;
+ if (encoding) {
+ if (xz) {
+ ret = lzma_easy_encoder(&xzfile->strm, level, LZMA_CHECK_CRC32);
+ } else {
+ lzma_options_lzma options;
+ (void) lzma_lzma_preset(&options, level);
+ ret = lzma_alone_encoder(&xzfile->strm, &options);
+ }
+ } else {
+ /* We set the memlimit for decompression to 100MiB which should be
+ * more than enough to be sufficient for level 9 which requires 65 MiB.
+ */
+ ret = lzma_auto_decoder(&xzfile->strm, 100<<20, 0);
+ }
+ if (ret != LZMA_OK) {
+ (void) fclose(fp);
+ memset(xzfile, 0, sizeof(*xzfile));
+ free(xzfile);
+ return NULL;
+ }
+ return xzfile;
+}
+/*@=globstate@*/
+
+/*@null@*/
+static XZFILE *xzopen(const char *path, const char *mode)
+ /*@globals fileSystem @*/
+ /*@modifies fileSystem @*/
+{
+ return xzopen_internal(path, mode, -1, 1);
+}
+
+/*@null@*/
+static XZFILE *xzdopen(int fdno, const char *mode)
+ /*@globals fileSystem @*/
+ /*@modifies fileSystem @*/
+{
+ if (fdno < 0)
+ return NULL;
+ return xzopen_internal(0, mode, fdno, 1);
+}
+
+static int xzflush(XZFILE *xzfile)
+ /*@globals fileSystem @*/
+ /*@modifies xzfile, fileSystem @*/
+{
+ return fflush(xzfile->fp);
+}
+
+static int xzclose(/*@only@*/ XZFILE *xzfile)
+ /*@globals fileSystem @*/
+ /*@modifies *xzfile, fileSystem @*/
+{
+ lzma_ret ret;
+ size_t n;
+ int rc;
+
+ if (!xzfile)
+ return -1;
+ if (xzfile->encoding) {
+ for (;;) {
+ xzfile->strm.avail_out = kBufferSize;
+ xzfile->strm.next_out = (uint8_t *)xzfile->buf;
+ ret = lzma_code(&xzfile->strm, LZMA_FINISH);
+ if (ret != LZMA_OK && ret != LZMA_STREAM_END)
+ return -1;
+ n = kBufferSize - xzfile->strm.avail_out;
+ if (n && fwrite(xzfile->buf, 1, n, xzfile->fp) != n)
+ return -1;
+ if (ret == LZMA_STREAM_END)
+ break;
+ }
+ }
+ lzma_end(&xzfile->strm);
+ rc = fclose(xzfile->fp);
+ memset(xzfile, 0, sizeof(*xzfile));
+ free(xzfile);
+ return rc;
+}
+
+/*@-mustmod@*/
+static ssize_t xzread(XZFILE *xzfile, void *buf, size_t len)
+ /*@globals fileSystem @*/
+ /*@modifies xzfile, *buf, fileSystem @*/
+{
+ lzma_ret ret;
+ int eof = 0;
+
+ if (!xzfile || xzfile->encoding)
+ return -1;
+ if (xzfile->eof)
+ return 0;
+/*@-temptrans@*/
+ xzfile->strm.next_out = buf;
+/*@=temptrans@*/
+ xzfile->strm.avail_out = len;
+ for (;;) {
+ if (!xzfile->strm.avail_in) {
+ xzfile->strm.next_in = (uint8_t *)xzfile->buf;
+ xzfile->strm.avail_in = fread(xzfile->buf, 1, kBufferSize,
xzfile->fp);
+ if (!xzfile->strm.avail_in)
+ eof = 1;
+ }
+ ret = lzma_code(&xzfile->strm, LZMA_RUN);
+ if (ret == LZMA_STREAM_END) {
+ xzfile->eof = 1;
+ return len - xzfile->strm.avail_out;
+ }
+ if (ret != LZMA_OK)
+ return -1;
+ if (!xzfile->strm.avail_out)
+ return len;
+ if (eof)
+ return -1;
+ }
+ /*@notreached@*/
+}
+/*@=mustmod@*/
+
+static ssize_t xzwrite(XZFILE *xzfile, void *buf, size_t len)
+ /*@globals fileSystem @*/
+ /*@modifies xzfile, fileSystem @*/
+{
+ lzma_ret ret;
+ size_t n;
+
+ if (!xzfile || !xzfile->encoding)
+ return -1;
+ if (!len)
+ return 0;
+/*@-temptrans@*/
+ xzfile->strm.next_in = buf;
+/*@=temptrans@*/
+ xzfile->strm.avail_in = len;
+ for (;;) {
+ xzfile->strm.next_out = (uint8_t *)xzfile->buf;
+ xzfile->strm.avail_out = kBufferSize;
+ ret = lzma_code(&xzfile->strm, LZMA_RUN);
+ if (ret != LZMA_OK)
+ return -1;
+ n = kBufferSize - xzfile->strm.avail_out;
+ if (n && fwrite(xzfile->buf, 1, n, xzfile->fp) != n)
+ return -1;
+ if (!xzfile->strm.avail_in)
+ return len;
+ }
+ /*@notreached@*/
+}
+
+/* =============================================================== */
+
+static inline /*@dependent@*/ /*@null@*/ void * xzdFileno(FD_t fd)
+ /*@*/
+{
+ void * rc = NULL;
+ int i;
+
+ FDSANE(fd);
+ for (i = fd->nfps; i >= 0; i--) {
+/*@-boundsread@*/
+ FDSTACK_t * fps = &fd->fps[i];
+/*@=boundsread@*/
+ if (fps->io != xzdio && fps->io != lzdio)
+ continue;
+ rc = fps->fp;
+ break;
+ }
+
+ return rc;
+}
+
+/*@-globuse@*/
+static /*@null@*/ FD_t xzdOpen(const char * path, const char * fmode)
+ /*@globals fileSystem @*/
+ /*@modifies fileSystem @*/
+{
+ FD_t fd;
+ mode_t mode = (fmode && fmode[0] == 'w' ? O_WRONLY : O_RDONLY);
+ XZFILE * xzfile = xzopen(path, fmode);
+
+ if (xzfile == NULL)
+ return NULL;
+ fd = fdNew("open (xzdOpen)");
+ fdPop(fd); fdPush(fd, xzdio, xzfile, -1);
+ fdSetOpen(fd, path, fileno(xzfile->fp), mode);
+ return fdLink(fd, "xzdOpen");
+}
+/*@=globuse@*/
+
+/*@-globuse@*/
+static /*@null@*/ FD_t xzdFdopen(void * cookie, const char * fmode)
+ /*@globals fileSystem, internalState @*/
+ /*@modifies fileSystem, internalState @*/
+{
+ FD_t fd = c2f(cookie);
+ int fdno = fdFileno(fd);
+ XZFILE *xzfile;
+
+assert(fmode != NULL);
+ fdSetFdno(fd, -1); /* XXX skip the fdio close */
+ if (fdno < 0) return NULL;
+ xzfile = xzdopen(fdno, fmode);
+ if (xzfile == NULL) return NULL;
+ fdPush(fd, xzdio, xzfile, fdno);
+ return fdLink(fd, "xzdFdopen");
+}
+/*@=globuse@*/
+
+/*@-globuse@*/
+static int xzdFlush(void * cookie)
+ /*@globals fileSystem @*/
+ /*@modifies fileSystem @*/
+{
+ FD_t fd = c2f(cookie);
+ return xzflush(xzdFileno(fd));
+}
+/*@=globuse@*/
+
+/* =============================================================== */
+/*@-globuse@*/
+/*@-mustmod@*/ /* LCL: *buf is modified */
+static ssize_t xzdRead(void * cookie, /*@out@*/ char * buf, size_t count)
+ /*@globals fileSystem, internalState @*/
+ /*@modifies *buf, fileSystem, internalState @*/
+{
+ FD_t fd = c2f(cookie);
+ XZFILE *xzfile;
+ ssize_t rc = -1;
+
+assert(fd != NULL);
+ if (fd->bytesRemain == 0) return 0; /* XXX simulate EOF */
+ xzfile = xzdFileno(fd);
+assert(xzfile != NULL);
+ fdstat_enter(fd, FDSTAT_READ);
+/*@-compdef@*/
+ rc = xzread(xzfile, buf, count);
+/*@=compdef@*/
+DBGIO(fd, (stderr, "==>\txzdRead(%p,%p,%u) rc %lx %s\n", cookie, buf,
(unsigned)count, (unsigned long)rc, fdbg(fd)));
+ if (rc == -1) {
+ fd->errcookie = "Lzma: decoding error";
+ } else if (rc >= 0) {
+ fdstat_exit(fd, FDSTAT_READ, rc);
+ /*@-compdef@*/
+ if (fd->ndigests && rc > 0) fdUpdateDigests(fd, (void *)buf, rc);
+ /*@=compdef@*/
+ }
+ return rc;
+}
+/*@=mustmod@*/
+/*@=globuse@*/
+
+/*@-globuse@*/
+static ssize_t xzdWrite(void * cookie, const char * buf, size_t count)
+ /*@globals fileSystem, internalState @*/
+ /*@modifies fileSystem, internalState @*/
+{
+ FD_t fd = c2f(cookie);
+ XZFILE *xzfile;
+ ssize_t rc = 0;
+
+ if (fd == NULL || fd->bytesRemain == 0) return 0; /* XXX simulate EOF */
+
+ if (fd->ndigests && count > 0) fdUpdateDigests(fd, (void *)buf, count);
+
+ xzfile = xzdFileno(fd);
+
+ fdstat_enter(fd, FDSTAT_WRITE);
+ rc = xzwrite(xzfile, (void *)buf, count);
+DBGIO(fd, (stderr, "==>\txzdWrite(%p,%p,%u) rc %lx %s\n", cookie, buf,
(unsigned)count, (unsigned long)rc, fdbg(fd)));
+ if (rc < 0) {
+ fd->errcookie = "Lzma: encoding error";
+ } else if (rc > 0) {
+ fdstat_exit(fd, FDSTAT_WRITE, rc);
+ }
+ return rc;
+}
+
+static inline int xzdSeek(void * cookie, /*@unused@*/ _libio_pos_t pos,
+ /*@unused@*/ int whence)
+ /*@*/
+{
+ FD_t fd = c2f(cookie);
+
+ XZDONLY(fd);
+ return -2;
+}
+
+static int xzdClose( /*@only@*/ void * cookie)
+ /*@globals fileSystem, internalState @*/
+ /*@modifies fileSystem, internalState @*/
+{
+ FD_t fd = c2f(cookie);
+ XZFILE *xzfile;
+ const char * errcookie;
+ int rc;
+
+ xzfile = xzdFileno(fd);
+
+ if (xzfile == NULL) return -2;
+ errcookie = strerror(ferror(xzfile->fp));
+
+ fdstat_enter(fd, FDSTAT_CLOSE);
+ /*@-dependenttrans@*/
+ rc = xzclose(xzfile);
+ /*@=dependenttrans@*/
+ fdstat_exit(fd, FDSTAT_CLOSE, rc);
+
+ if (fd && rc == -1)
+ fd->errcookie = errcookie;
+
+DBGIO(fd, (stderr, "==>\txzdClose(%p) rc %lx %s\n", cookie, (unsigned long)rc,
fdbg(fd)));
+
+ if (_rpmio_debug || rpmIsDebug()) fdstat_print(fd, "XZDIO", stderr);
+ /*@-branchstate@*/
+ if (rc == 0)
+ fd = fdFree(fd, "open (xzdClose)");
+ /*@=branchstate@*/
+ return rc;
+}
+
+/*@-type@*/ /* LCL: function typedefs */
+static struct FDIO_s xzdio_s = {
+ xzdRead, xzdWrite, xzdSeek, xzdClose, xzdOpen, xzdFdopen, xzdFlush,
+};
+/*@=type@*/
+
+FDIO_t xzdio = /*@-compmempass@*/ &xzdio_s /*@=compmempass@*/ ;
+
+#endif /* HAVE_LZMA_H */
+
+/* =============================================================== */
/*@observer@*/
static const char * getFdErrstr (FD_t fd)
/*@*/
@@ -3099,6 +3519,11 @@ static const char * getFdErrstr (FD_t fd
if (fdGetIo(fd) == lzdio) {
errstr = fd->errcookie;
} else
+#ifdef HAVE_LZMA_H
+ if (fdGetIo(fd) == xzdio) {
+ errstr = fd->errcookie;
+ } else
+#endif
{
errstr = (fd->syserrno ? strerror(fd->syserrno) : "");
}
@@ -3416,6 +3841,11 @@ fprintf(stderr, "*** Fdopen(%p,%s) %s\n"
} else if (!strcmp(end, "lzdio")) {
iof = lzdio;
fd = lzdFdopen(fd, zstdio);
+#if defined(HAVE_LZMA_H)
+ } else if (!strcmp(end, "xzdio")) {
+ iof = xzdio;
+ fd = xzdFdopen(fd, zstdio);
+#endif
} else if (!strcmp(end, "ufdio")) {
iof = ufdio;
} else if (!strcmp(end, "fpio")) {
@@ -3568,6 +3998,10 @@ int Fflush(FD_t fd)
if (vh && fdGetIo(fd) == bzdio)
return bzdFlush(vh);
#endif
+#if defined(HAVE_LZMA_H)
+ if (vh && fdGetIo(fd) == xzdio)
+ return xzdFlush(vh);
+#endif
return 0;
}
@@ -3602,6 +4036,11 @@ int Ferror(FD_t fd)
} else if (fps->io == lzdio) {
ec = (fd->syserrno || fd->errcookie != NULL) ? -1 : 0;
i--; /* XXX fdio under lzdio always has fdno == -1 */
+#if defined(HAVE_LZMA_H)
+ } else if (fps->io == xzdio) {
+ ec = (fd->syserrno || fd->errcookie != NULL) ? -1 : 0;
+ i--; /* XXX fdio under xzdio always has fdno == -1 */
+#endif
} else {
/* XXX need to check ufdio/gzdio/bzdio/fdio errors correctly. */
ec = (fdFileno(fd) < 0 ? -1 : 0);
diff -urp rpmio/rpmio.h.orig rpmio/rpmio.h
--- rpm-5.0.3.orig/rpmio/rpmio.h 2007-12-09 14:04:30.000000000 +0100
+++ rpm-5.0.3/rpmio/rpmio.h 2009-04-06 08:38:33.000000000 +0200
@@ -793,6 +793,10 @@ int ufdGetFile( /*@killref@*/ FD_t sfd,
/**
*/
+/*@observer@*/ /*@unchecked@*/ extern FDIO_t xzdio;
+
+/**
+ */
/*@observer@*/ /*@unchecked@*/ extern FDIO_t fadio;
/*@=exportlocal@*/
/*@}*/
diff -urp rpmio/rpmmacro.h.orig rpmio/rpmmacro.h
--- rpm-5.0.3.orig/rpmio/rpmmacro.h 2008-01-29 14:57:50.000000000 +0100
+++ rpm-5.0.3/rpmio/rpmmacro.h 2009-04-06 08:38:33.000000000 +0200
@@ -208,7 +208,8 @@ typedef enum rpmCompressedMagic_e {
COMPRESSED_BZIP2 = 2, /*!< bzip2 can handle */
COMPRESSED_ZIP = 3, /*!< unzip can handle */
COMPRESSED_LZOP = 4, /*!< lzop can handle */
- COMPRESSED_LZMA = 5 /*!< lzma can handle */
+ COMPRESSED_LZMA = 5, /*!< lzma can handle */
+ COMPRESSED_XZ = 6 /*!< xz can handle */
} rpmCompressedMagic;
/**
diff -urp tools/rpm2cpio.c.orig tools/rpm2cpio.c
--- rpm-5.0.3.orig/tools/rpm2cpio.c 2007-12-09 14:04:30.000000000 +0100
+++ rpm-5.0.3/tools/rpm2cpio.c 2009-04-06 08:38:33.000000000 +0200
@@ -89,6 +89,8 @@ int main(int argc, char **argv)
t = stpcpy(t, ".bzdio");
if (!strcmp(payload_compressor, "lzma"))
t = stpcpy(t, ".lzdio");
+ if (!strcmp(payload_compressor, "xz"))
+ t = stpcpy(t, ".xzdio");
he->p.ptr = _free(he->p.ptr);
}
--- rpm-5.0.3.orig/configure.ac.orig 2010-09-22 23:22:07.000000000 +0200
+++ rpm-5.0.3/configure.ac 2010-09-22 23:41:59.000000000 +0200
@@ -809,14 +809,14 @@
AC_ARG_WITH(python, AS_HELP_STRING([--with-python], [build with RPM Python
language bindings]), [
if test ".$withval" != .no; then
case "$withval" in
- 2.x|2.3|2.4|2.5)
+ 2.x|2.3|2.4|2.5|2.6|2.7)
python_version=$withval
;;
yes)
- python_version="2.5 2.4 2.3 2.x"
+ python_version="2.7 2.6 2.5 2.4 2.3 2.x"
;;
*)
- AC_MSG_WARN([--with-python only supports values 2.x, 2.3,
2.4, or 2.5, ignoring...])
+ AC_MSG_WARN([--with-python only supports values 2.x, 2.3,
2.4, 2.5, 2.6, or 2.7, ignoring...])
python_version=""
;;
esac
@@ -894,9 +894,9 @@
done
fi
AC_ARG_WITH(python-inc-dir, AS_HELP_STRING([--with-python-inc-dir=DIR],
[directory with Python include files]),
- [WITH_PYTHON_INCDIR="$withval"], [WITH_PYTHON_INCDIR="`python -c
'from distutils.sysconfig import get_python_inc; print get_python_inc()'`"])
+ [WITH_PYTHON_INCDIR="$withval"], [WITH_PYTHON_INCDIR="`${__PYTHON}
-c 'from distutils.sysconfig import get_python_inc; print get_python_inc()'`"])
AC_ARG_WITH(python-lib-dir, AS_HELP_STRING([--with-python-lib-dir=DIR],
[directory with Python library]),
- [WITH_PYTHON_LIBDIR="$withval"], [WITH_PYTHON_LIBDIR="`python -c
'from distutils.sysconfig import get_python_lib; print get_python_lib(1)'`"])
+ [WITH_PYTHON_LIBDIR="$withval"], [WITH_PYTHON_LIBDIR="`${__PYTHON}
-c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)'`"])
])
AC_SUBST(WITH_PYTHON_SUBDIR)
AC_SUBST(WITH_PYTHON_SUBPACKAGE)
--- NEW FILE: rpm5.info ---
Package: rpm5
Version: 5.0.3
Revision: 3
Description: RPM Package Manager
License: LGPL
Maintainer: Anders F Bjorklund <[email protected]>
Depends: %N-shlibs (= %v-%r), libgettext8-shlibs
BuildDepends: <<
fink (>= 0.24.12),
autoconf (>= 2.61-1),
automake1.10,
gettext-tools (>= 0.16-1),
libtool2,
beecrypt6,
libiconv-dev,
system-openssl-dev,
libgettext8-dev,
libxml2,
neon26,
libxar1-dev,
liblzma,
pcre,
popt,
python25
<<
CustomMirror: <<
Primary: http://rpm5.org/files/rpm/rpm-5.0/
<<
Source: mirror:custom:rpm-%v.tar.gz
Source-MD5: b3df4e54e84cf3344ce6b76fa2a8d5bf
PatchFile: %n.patch
PatchFile-MD5: d2b9bbb1baee32c7a2b13f51ce614080
# workarounds for XAR
SetCPPFLAGS: -I%p/lib/system-openssl/include -I%p/include/xar
SetLDFLAGS: -L%p/lib/system-openssl/lib
SetLIBS: -lz -lcrypto -lxml2 -liconv
ConfigureParams: <<
--disable-dependency-tracking \
--without-bzip2 --without-perl \
--without-lua --without-sqlite \
--with-python-inc-dir=%p/include/python2.5 \
--with-python-lib-dir=%p/lib/python2.5/site-packages \
--with-python=2.5 --with-xar=external \
--with-xz=external --with-pcre=external \
--sysconfdir=%p/etc --with-path-cfg=%p/etc/rpm
<<
CompileScript: <<
./autogen.sh
__PYTHON=%p/bin/python2.5 \
./configure %c
make
<<
InstallScript: <<
make install DESTDIR=%d
# change topdir/tmppath, remove src
rm -rf "%i/src"
perl -pi -e 's|^(\%%_topdir\s+)\%%{_usr}/src/rpm|$1\%%(echo \$HOME)/rpmbuild|'
%i/lib/rpm/macros
perl -pi -e 's|^(\%%_tmppath\s+)\%%{_var}/tmp|$1/var/tmp|' %i/lib/rpm/macros
# remove sloppy build directories
for la in %i/lib/lib*.la; do \
perl -pi -e 's|-L%b\S*||g' $la; \
done
rm -f %i/lib/python2.5/site-packages/rpm/*.la
rm -f %i/lib/python2.5/site-packages/rpm/*.a
<<
DocFiles: CHANGES COPYING.LIB CREDITS README NEWS
SplitOff: <<
Package: %N-shlibs
Depends: <<
libiconv,
beecrypt6-shlibs,
libxml2-shlibs,
neon26-shlibs,
libxar1-shlibs,
liblzma-shlibs,
pcre-shlibs,
popt-shlibs
<<
Description: Shared libraries for RPM
DocFiles: COPYING.LIB
Files: <<
lib/librpm-5.0.dylib
lib/librpmbuild-5.0.dylib
lib/librpmconstant-5.0.dylib
lib/librpmdb-5.0.dylib
lib/librpmio-5.0.dylib
lib/librpmmisc-5.0.dylib
<<
Shlibs: <<
%p/lib/librpm-5.0.dylib 0.0.0 %n (>= 5.0-1)
%p/lib/librpmbuild-5.0.dylib 0.0.0 %n (>= 5.0-1)
%p/lib/librpmconstant-5.0.dylib 0.0.0 %n (>= 5.0-1)
%p/lib/librpmdb-5.0.dylib 0.0.0 %n (>= 5.0-1)
%p/lib/librpmio-5.0.dylib 0.0.0 %n (>= 5.0-1)
%p/lib/librpmmisc-5.0.dylib 0.0.0 %n (>= 5.0-1)
<<
<<
SplitOff2: <<
Package: %N-dev
Description: Development headers and libraries for RPM
Depends: %N (= %v-%r)
BuildDependsOnly: true
DocFiles: COPYING.LIB
Files: include lib/*.la lib/*.dylib lib/*.a lib/pkgconfig
<<
SplitOff3: <<
Package: %N-python-py25
Description: Python module for RPM
Depends: %N-shlibs (= %v-%r), python25-shlibs
DocFiles: COPYING.LIB
Files: <<
lib/python2.5/site-packages/rpm/*.py
lib/python2.5/site-packages/rpm/*.so
<<
<<
Homepage: http://www.rpm5.org/
DescDetail: <<
The RPM Package Manager (RPM) is a powerful command line driven package
management system capable of installing, uninstalling, verifying,
querying, and updating computer software packages. Each software package
consists of an archive of files along with information about the package
like its version, a description, and the like.
<<
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs