- always use dl size in regionSwab() return.
- ppc: revert ppcmac to ppc. - ppc: autoconf test for va_copy. CVS patchset: 5015 CVS date: 2001/08/15 14:03:03
This commit is contained in:
parent
a36acaf3b8
commit
e42f1fd967
3
CHANGES
3
CHANGES
|
@ -214,6 +214,9 @@
|
|||
- fix: don't verify hash page nelem.
|
||||
- better error messages for verification failures.
|
||||
- include directory /usr/lib/rpm in rpm package.
|
||||
- always use dl size in regionSwab() return.
|
||||
- ppc: revert ppcmac to ppc.
|
||||
- ppc: autoconf test for va_copy.
|
||||
|
||||
4.0 -> 4.0.[12]
|
||||
- add doxygen and lclint annotations most everywhere.
|
||||
|
|
|
@ -80,6 +80,9 @@
|
|||
/* Define as 1 if your zlib has gzseek() */
|
||||
#undef HAVE_GZSEEK
|
||||
|
||||
/* Define as 1 if your va_list type is an array */
|
||||
#undef HAVE_VA_LIST_AS_ARRAY
|
||||
|
||||
/* Define to the full path name of the bzip2 library (libbz2.a) */
|
||||
#undef BZIP2LIB
|
||||
|
||||
|
|
28
configure.in
28
configure.in
|
@ -34,6 +34,34 @@ export CFLAGS
|
|||
AC_PROG_CPP
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
|
||||
dnl Does this platform require array notation to assign to a va_list?
|
||||
dnl If cross-compiling, we assume va_list is "normal". If this breaks
|
||||
dnl you, set ac_cv_valistisarray=true and maybe define HAVE_VA_LIST_AS_ARRAY
|
||||
dnl also just to be sure.
|
||||
AC_MSG_CHECKING(whether va_list assignments need array notation)
|
||||
AC_CACHE_VAL(ac_cv_valistisarray,
|
||||
[AC_TRY_RUN([#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
void foo(int i, ...) {
|
||||
va_list ap1, ap2;
|
||||
va_start(ap1, i);
|
||||
ap2 = ap1;
|
||||
if (va_arg(ap2, int) != 123 || va_arg(ap1, int) != 123)
|
||||
{ exit(1); }
|
||||
va_end(ap1); va_end(ap2);
|
||||
}
|
||||
int main() { foo(0, 123); return(0); }],
|
||||
[ac_cv_valistisarray=false],
|
||||
[ac_cv_valistisarray=true],
|
||||
[ac_cv_valistisarray=false])])
|
||||
|
||||
if test "$ac_cv_valistisarray" = true ; then
|
||||
AC_DEFINE(HAVE_VA_LIST_AS_ARRAY)
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
RPMUSER=rpm
|
||||
RPMUID=37
|
||||
RPMGROUP=rpm
|
||||
|
|
|
@ -24,7 +24,8 @@ RPM="./rpm --rcfile $TEMPRC"
|
|||
arch="`$RPM --eval '%{_arch}'`"
|
||||
VENDOR="`$RPM --eval '%{_vendor}'`"
|
||||
OS="`$RPM --eval '%{_os}'`"
|
||||
target_platform="`$RPM --eval '%{_target_platform}'`"
|
||||
RPMRC_GNU="`$RPM --eval '%{_gnu}'`"
|
||||
target_platform="`$RPM --eval '%{?_gnu:%undefine _gnu}%{_target_platform}'`"
|
||||
target="`$RPM --eval '%{_target}'`"
|
||||
|
||||
rm -f ${DESTDIR}/${pkglibdir}/noarch-${VENDOR}-${OS}
|
||||
|
@ -33,10 +34,10 @@ rm -f ${DESTDIR}/${pkglibdir}/noarch-${OS}
|
|||
ln -s ${arch}-${VENDOR}-${OS} ${DESTDIR}/${pkglibdir}/noarch-${OS}
|
||||
|
||||
case "$arch" in
|
||||
i[3456]86) SUBSTS='s_i386_i386_ s_i386_i486_ s_i386_i586_ s_i386_i686_' ;;
|
||||
i[3456]86) SUBSTS='s_i386_i386_ s_i386_i486_ s_i386_i586_ s_i386_i686_ s_i386_athlon_' ;;
|
||||
alpha*) SUBSTS='s_alpha_alpha_ s_alpha_alphaev5_ s_alpha_alphaev56_ s_alpha_alphapca56_ s_alpha_alphaev6_ s_alpha_alphaev67_' ;;
|
||||
sparc*) SUBSTS='s_sparc\(64\|v9\)_sparc_ s_sparc64_sparcv9_;s_sparc\([^v]\|$\)_sparcv9\1_ s_sparcv9_sparc64_;s_sparc\([^6]\|$\)_sparc64\1_' ;;
|
||||
powerpc*|ppc*) 's_\(powerpc\|ppc\)_ppc_' ;;
|
||||
powerpc*|ppc*) SUBSTS='s_\(powerpc\|ppc\)_ppc_' ;;
|
||||
*) SUBSTS=y___ ;;
|
||||
esac
|
||||
base_arch=`echo $arch | sed -e 's_i?86_i386_;s_sparc.*_sparc_;s_alpha.*_alpha_;s_\(powerpc\|ppc\).*_ppc_'`
|
||||
|
@ -91,6 +92,7 @@ for SUBST in $SUBSTS ; do
|
|||
cat $PLATFORM \
|
||||
| sed -e "s,@RPMRC_OPTFLAGS@,$RPMRC_OPTFLAGS," \
|
||||
-e "s,@RPMRC_ARCH@,$base_arch," \
|
||||
-e "s,@RPMRC_GNU@,$RPMRC_GNU," \
|
||||
-e "s,@LIB@,$LIB," \
|
||||
-e "s,@ARCH_INSTALL_POST@,$ARCH_INSTALL_POST," \
|
||||
-e "s,@DEFAULTDOCDIR@,$DEFAULTDOCDIR," \
|
||||
|
|
14
lib/header.c
14
lib/header.c
|
@ -409,8 +409,10 @@ static int regionSwab(/*@null@*/ indexEntry entry, int il, int dl,
|
|||
*/
|
||||
if (tl+REGION_TAG_COUNT == dl)
|
||||
tl += REGION_TAG_COUNT;
|
||||
#if 0
|
||||
if (tl > dl)
|
||||
dl = tl;
|
||||
#endif
|
||||
|
||||
return dl;
|
||||
}
|
||||
|
@ -587,7 +589,8 @@ t = te;
|
|||
rdlen += entry->info.count;
|
||||
|
||||
count = regionSwab(NULL, ril, 0, pe, t, 0);
|
||||
if (count != rdlen) goto errxit;
|
||||
if (count != rdlen)
|
||||
goto errxit;
|
||||
|
||||
} else {
|
||||
|
||||
|
@ -603,7 +606,8 @@ t = te;
|
|||
te += entry->info.count + drlen;
|
||||
|
||||
count = regionSwab(NULL, ril, 0, pe, t, 0);
|
||||
if (count != (rdlen + entry->info.count + drlen)) goto errxit;
|
||||
if (count != (rdlen + entry->info.count + drlen))
|
||||
goto errxit;
|
||||
}
|
||||
|
||||
/* Skip rest of entries in region. */
|
||||
|
@ -666,8 +670,10 @@ t = te;
|
|||
}
|
||||
|
||||
/* Insure that there are no memcpy underruns/overruns. */
|
||||
if (((char *)pe) != dataStart) goto errxit;
|
||||
if ((((char *)ei)+len) != te) goto errxit;
|
||||
if (((char *)pe) != dataStart)
|
||||
goto errxit;
|
||||
if ((((char *)ei)+len) != te)
|
||||
goto errxit;
|
||||
|
||||
if (lengthPtr)
|
||||
*lengthPtr = len;
|
||||
|
|
|
@ -168,7 +168,7 @@ int headerGetRawEntry(Header h, int_32 tag,
|
|||
/** \ingroup header
|
||||
* Dump a header in human readable format (for debugging).
|
||||
* @param h header
|
||||
* @param flags 0 or HEADER_DUMP_LINLINE
|
||||
* @param flags 0 or HEADER_DUMP_INLINE
|
||||
* @param tags array of tag name/value pairs
|
||||
*/
|
||||
/*@unused@*/
|
||||
|
|
|
@ -1212,7 +1212,7 @@ static void defaultMachine(/*@out@*/ const char ** arch,
|
|||
else if ( (pvr == 0x36) || (pvr == 0x37) )
|
||||
strcpy(un.machine, "ppciseries");
|
||||
else
|
||||
strcpy(un.machine, "ppcmac");
|
||||
strcpy(un.machine, "ppc");
|
||||
}
|
||||
# endif
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ int rpmvercmp(const char * a, const char * b)
|
|||
/* take care of the case where the two version segments are */
|
||||
/* different types: one numeric, the other alpha (i.e. empty) */
|
||||
if (one == str1) return -1; /* arbitrary */
|
||||
if (two == str2) return 1;
|
||||
if (two == str2) return -1;
|
||||
|
||||
if (isnum) {
|
||||
/* this used to be done by converting the digit segments */
|
||||
|
|
|
@ -110,13 +110,13 @@ static PyObject * pyrpmError;
|
|||
struct hdrObject_s {
|
||||
PyObject_HEAD;
|
||||
Header h;
|
||||
Header sigs;
|
||||
Header sigs; /* XXX signature tags are in header */
|
||||
char ** md5list;
|
||||
char ** fileList;
|
||||
char ** linkList;
|
||||
int_32 * fileSizes;
|
||||
int_32 * mtimes;
|
||||
int_32 * uids, * gids;
|
||||
int_32 * uids, * gids; /* XXX these tags are not used anymore */
|
||||
unsigned short * rdevs;
|
||||
unsigned short * modes;
|
||||
} ;
|
||||
|
@ -165,30 +165,30 @@ static PyObject * hdrUnload(hdrObject * s, PyObject * args, PyObject *keywords)
|
|||
if (!PyArg_ParseTupleAndKeywords(args, keywords, "|i", kwlist, &legacy))
|
||||
return NULL;
|
||||
|
||||
/* XXX this legacy switch is a hack, needs to be removed. */
|
||||
if (legacy) {
|
||||
Header h;
|
||||
|
||||
h = headerCopy(s->h);
|
||||
len = headerSizeof(h, 0);
|
||||
buf = headerUnload(h);
|
||||
/* XXX there's a missing headerFree(h); here */
|
||||
} else {
|
||||
len = headerSizeof(s->h, 0);
|
||||
buf = headerUnload(s->h);
|
||||
}
|
||||
|
||||
/* XXX there's a missing check on buf == NULL here. */
|
||||
rc = PyString_FromStringAndSize(buf, len);
|
||||
free(buf);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* Returns a list of these tuple for each part which failed:
|
||||
|
||||
(attr_name, correctValue, currentValue)
|
||||
|
||||
It should be passwd the file number to verify.
|
||||
*/
|
||||
/** \ingroup python
|
||||
* Returns a list of these tuples for each item that failed:
|
||||
* (attr_name, correctValue, currentValue)
|
||||
* It should be passed the file number to verify.
|
||||
*/
|
||||
static PyObject * hdrVerifyFile(hdrObject * s, PyObject * args) {
|
||||
int fileNumber;
|
||||
|
@ -208,6 +208,7 @@ static PyObject * hdrVerifyFile(hdrObject * s, PyObject * args) {
|
|||
|
||||
fileNumber = (int) PyInt_AsLong(args);
|
||||
|
||||
/* XXX this routine might use callbacks intelligently. */
|
||||
if (rpmVerifyFile("", s->h, fileNumber, &verifyResult, RPMVERIFY_NONE)) {
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
@ -217,6 +218,7 @@ static PyObject * hdrVerifyFile(hdrObject * s, PyObject * args) {
|
|||
|
||||
if (!verifyResult) return list;
|
||||
|
||||
/* XXX Legacy tag needs to go away. */
|
||||
if (!s->fileList) {
|
||||
headerGetEntry(s->h, RPMTAG_OLDFILENAMES, &type, (void **) &s->fileList,
|
||||
&count);
|
||||
|
@ -326,8 +328,14 @@ static PyObject * hdrVerifyFile(hdrObject * s, PyObject * args) {
|
|||
Py_DECREF(tuple);
|
||||
}
|
||||
|
||||
/* RPMVERIFY_USER and RPM_VERIFY_GROUP are handled wrong here, but rpmlib.a
|
||||
doesn't do these correctly either. At least this is consistent. */
|
||||
/*
|
||||
* RPMVERIFY_USER and RPM_VERIFY_GROUP are handled wrong here, but rpmlib.a
|
||||
* doesn't do these correctly either. At least this is consistent.
|
||||
*
|
||||
* XXX Consistent? rpmlib.a verifies user/group quite well, thank you.
|
||||
* XXX The code below does nothing useful. FILEUSERNAME needs to be
|
||||
* XXX retrieved and looked up.
|
||||
*/
|
||||
if (verifyResult & RPMVERIFY_USER) {
|
||||
if (!s->uids) {
|
||||
headerGetEntry(s->h, RPMTAG_FILEUIDS, &type, (void **) &s->uids,
|
||||
|
@ -345,6 +353,10 @@ static PyObject * hdrVerifyFile(hdrObject * s, PyObject * args) {
|
|||
Py_DECREF(tuple);
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX The code below does nothing useful. FILEGROUPNAME needs to be
|
||||
* XXX retrieved and looked up.
|
||||
*/
|
||||
if (verifyResult & RPMVERIFY_GROUP) {
|
||||
if (!s->gids) {
|
||||
headerGetEntry(s->h, RPMTAG_FILEGIDS, &type, (void **) &s->gids,
|
||||
|
@ -418,6 +430,7 @@ static void mungeFilelist(Header h)
|
|||
if (fileNames == NULL || count <= 0)
|
||||
return;
|
||||
|
||||
/* XXX Legacy tag needs to go away. */
|
||||
headerAddEntry(h, RPMTAG_OLDFILENAMES, RPM_STRING_ARRAY_TYPE,
|
||||
fileNames, count);
|
||||
|
||||
|
@ -518,6 +531,7 @@ static PyObject * hdrSubscript(hdrObject * s, PyObject * item) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* XXX signature tags are appended to header, this API is gonna die */
|
||||
if (!rpmPackageGetEntry(NULL, s->sigs, s->h, tag, &type, &data, &count))
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
|
@ -1004,7 +1018,7 @@ static void rpmdbDealloc(rpmdbObject * s) {
|
|||
PyMem_DEL(s);
|
||||
}
|
||||
|
||||
#ifndef DYINGSOON
|
||||
#ifndef DYINGSOON /* XXX OK, when? */
|
||||
/**
|
||||
*/
|
||||
static int
|
||||
|
@ -1015,7 +1029,6 @@ rpmdbLength(rpmdbObject * s) {
|
|||
|
||||
/* RPMDBI_PACKAGES */
|
||||
mi = rpmdbInitIterator(s->db, RPMDBI_PACKAGES, NULL, 0);
|
||||
/* XXX FIXME: unnecessary header mallocs are side effect here */
|
||||
while (rpmdbNextIterator(mi) != NULL)
|
||||
count++;
|
||||
rpmdbFreeIterator(mi);
|
||||
|
@ -1356,6 +1369,7 @@ struct tsCallbackType {
|
|||
};
|
||||
|
||||
/** \ingroup python
|
||||
* @todo Remove, there's no headerLink refcount on the pointer.
|
||||
*/
|
||||
static Header transactionSetHeader = NULL;
|
||||
|
||||
|
|
|
@ -275,7 +275,7 @@ exit 0
|
|||
%ifos linux
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
if [ $1 == 0 ]; then
|
||||
if [ $1 = 0 ]; then
|
||||
/usr/sbin/userdel rpm
|
||||
/usr/sbin/groupdel rpm
|
||||
fi
|
||||
|
|
|
@ -7,6 +7,18 @@
|
|||
#include "rpmlog.h"
|
||||
#include "debug.h"
|
||||
|
||||
#ifndef va_copy
|
||||
# ifdef __va_copy
|
||||
# define va_copy(DEST,SRC) __va_copy((DEST),(SRC))
|
||||
# else
|
||||
# ifdef HAVE_VA_LIST_AS_ARRAY
|
||||
# define va_copy(DEST,SRC) (*(DEST) = *(SRC))
|
||||
# else
|
||||
# define va_copy(DEST,SRC) ((DEST) = (SRC))
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*@access rpmlogRec @*/
|
||||
|
||||
static int nrecs = 0;
|
||||
|
@ -136,13 +148,9 @@ static void vrpmlog (unsigned code, const char *fmt, va_list ap)
|
|||
|
||||
/* Allocate a sufficently large buffer for output. */
|
||||
while (1) {
|
||||
#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ == 0
|
||||
/*@-unrecog@*/ nb = vsnprintf(msgbuf, msgnb, fmt, ap); /*@=unrecog@*/
|
||||
#else
|
||||
va_list apc;
|
||||
/*@-sysunrecog -usedef@*/ __va_copy(apc, ap); /*@=sysunrecog =usedef@*/
|
||||
/*@-sysunrecog -usedef@*/ va_copy(apc, ap); /*@=sysunrecog =usedef@*/
|
||||
/*@-unrecog@*/ nb = vsnprintf(msgbuf, msgnb, fmt, apc); /*@=unrecog@*/
|
||||
#endif
|
||||
if (nb > -1 && nb < msgnb)
|
||||
break;
|
||||
if (nb > -1) /* glibc 2.1 */
|
||||
|
|
|
@ -20,6 +20,7 @@ static struct poptOption optionsTable[] = {
|
|||
{ "fipsb",'\0', POPT_BIT_SET, &fips, 2, NULL, NULL },
|
||||
{ "fipsc",'\0', POPT_BIT_SET, &fips, 3, NULL, NULL },
|
||||
{ "debug",'d', POPT_ARG_VAL, &_rpmio_debug, -1, NULL, NULL },
|
||||
POPT_AUTOHELP
|
||||
POPT_TABLEEND
|
||||
};
|
||||
|
||||
|
@ -49,6 +50,7 @@ main(int argc, const char *argv[])
|
|||
while ((rc = poptGetNextOpt(optCon)) > 0)
|
||||
;
|
||||
|
||||
if (flags & RPMDIGEST_SHA1) flags &= ~RPMDIGEST_MD5;
|
||||
reverse = (flags & RPMDIGEST_REVERSE);
|
||||
if (fips) {
|
||||
flags &= ~RPMDIGEST_MD5;
|
||||
|
|
7
rpmrc.in
7
rpmrc.in
|
@ -1,7 +1,7 @@
|
|||
#/*! \page config_rpmrc Default configuration: /usr/lib/rpm/rpmrc
|
||||
# \verbatim
|
||||
#
|
||||
# $Id: rpmrc.in,v 2.43 2001/07/31 18:13:23 jbj Exp $
|
||||
# $Id: rpmrc.in,v 2.44 2001/08/15 14:03:03 jbj Exp $
|
||||
#
|
||||
# This is a global RPM configuration file. All changes made here will
|
||||
# be lost when the rpm package is upgraded. Any per-system configuration
|
||||
|
@ -37,7 +37,6 @@ optflags: m68k -O2 -fomit-frame-pointer
|
|||
optflags: ppc -O2 -fsigned-char
|
||||
optflags: ppciseries -O2 -fsigned-char
|
||||
optflags: ppcpseries -O2 -fsigned-char
|
||||
optflags: ppcmac -O2 -fsigned-char
|
||||
|
||||
optflags: parisc -O2 -mpa-risc-1-0
|
||||
optflags: hppa1.0 -O2 -mpa-risc-1-0
|
||||
|
@ -91,7 +90,6 @@ arch_canon: mips: mips 4
|
|||
arch_canon: ppc: ppc 5
|
||||
arch_canon: ppciseries: ppciseries 5
|
||||
arch_canon: ppcpseries: ppcpseries 5
|
||||
arch_canon: ppcmac: ppcmac 5
|
||||
|
||||
arch_canon: m68k: m68k 6
|
||||
arch_canon: IP: sgi 7
|
||||
|
@ -181,7 +179,6 @@ buildarchtranslate: powerpc: ppc
|
|||
buildarchtranslate: powerppc: ppc
|
||||
buildarchtranslate: ppciseries: ppc
|
||||
buildarchtranslate: ppcpseries: ppc
|
||||
buildarchtranslate: ppcmac: ppc
|
||||
|
||||
buildarchtranslate: atarist: m68kmint
|
||||
buildarchtranslate: atariste: m68kmint
|
||||
|
@ -220,7 +217,6 @@ arch_compat: powerpc: ppc
|
|||
arch_compat: powerppc: ppc
|
||||
arch_compat: ppciseries: ppc
|
||||
arch_compat: ppcpseries: ppc
|
||||
arch_compat: ppcmac: ppc
|
||||
arch_compat: ppc: rs6000
|
||||
arch_compat: rs6000: noarch
|
||||
|
||||
|
@ -313,7 +309,6 @@ buildarch_compat: m68k: noarch
|
|||
|
||||
buildarch_compat: ppciseries: noarch
|
||||
buildarch_compat: ppcpseries: noarch
|
||||
buildarch_compat: ppcmac: noarch
|
||||
buildarch_compat: ppc: noarch
|
||||
|
||||
buildarch_compat: mips: noarch
|
||||
|
|
|
@ -43,3 +43,10 @@ rpmsort_LDFLAGS =
|
|||
javadeps_SOURCES = javadeps.c
|
||||
|
||||
$(PROGRAMS): $(myLDADD)
|
||||
|
||||
gnash.o: gnash.c
|
||||
$(COMPILE) -o $@ -c gnash.c
|
||||
|
||||
gnash: gnash.o
|
||||
$(LINK) -all-static -o $@ gnash.o $(LDADD)
|
||||
|
||||
|
|
Loading…
Reference in New Issue