[CVS] RPM: rpm/python/ rpmmodule.c system.h
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Anders F. Björklund Root: /v/rpm/cvs Email: a...@rpm5.org Module: rpm Date: 05-Jan-2009 10:16:49 Branch: HEAD Handle: 2009010509164900 Modified files: rpm/python rpmmodule.c system.h Log: fix building with python 2.3 Summary: RevisionChanges Path 1.177 +0 -4 rpm/python/rpmmodule.c 1.3 +9 -0 rpm/python/system.h patch -p0 '@@ .' Index: rpm/python/rpmmodule.c $ cvs diff -u -r1.176 -r1.177 rpmmodule.c --- rpm/python/rpmmodule.c8 Dec 2008 01:20:02 - 1.176 +++ rpm/python/rpmmodule.c5 Jan 2009 09:16:49 - 1.177 @@ -52,10 +52,6 @@ extern sigset_t rpmsqCaught; -#if PY_VERSION_HEX 0x0205 -typedef int Py_ssize_t; -#endif - /** * */ static PyObject * archScore(PyObject * s, PyObject * args, @@ . patch -p0 '@@ .' Index: rpm/python/system.h $ cvs diff -u -r1.2 -r1.3 system.h --- rpm/python/system.h 21 Feb 2005 15:23:30 - 1.2 +++ rpm/python/system.h 5 Jan 2009 09:16:49 - 1.3 @@ -11,6 +11,15 @@ #include Python.h +#if PY_MAJOR_VERSION == 2 PY_MINOR_VERSION 4 +typedef inquiry lenfunc; +#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None +#define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True +#endif +#if PY_MAJOR_VERSION == 2 PY_MINOR_VERSION 5 +typedef int Py_ssize_t; +#endif + #ifdef __LCLINT__ #undef PyObject_HEAD #define PyObject_HEAD int _PyObjectHead; @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ devtool.conf
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Anders F. Björklund Root: /v/rpm/cvs Email: a...@rpm5.org Module: rpm Date: 05-Jan-2009 10:45:56 Branch: HEAD Handle: 2009010509455600 Modified files: rpm devtool.conf Log: macosx: include new rpm programs, avoid trying to list Summary: RevisionChanges Path 2.257 +1 -6 rpm/devtool.conf patch -p0 '@@ .' Index: rpm/devtool.conf $ cvs diff -u -r2.256 -r2.257 devtool.conf --- rpm/devtool.conf 5 Jan 2009 09:27:59 - 2.256 +++ rpm/devtool.conf 5 Jan 2009 09:45:56 - 2.257 @@ -1840,14 +1840,9 @@ rm -f /tmp/rpm-root/usr/local/lib/pkgconfig/lzma.pc # strip debugging symbols, and remove libtool files (.la) -strip -S /tmp/rpm-root/usr/local/bin/rpm -strip -S /tmp/rpm-root/usr/local/bin/rpm2cpio -strip -S /tmp/rpm-root/usr/local/bin/rpmbuild -strip -S /tmp/rpm-root/usr/local/bin/rpmconstant -strip -S /tmp/rpm-root/usr/local/bin/rpmcache +strip -S /tmp/rpm-root/usr/local/bin/rpm* strip -S /tmp/rpm-root/usr/local/lib/rpm/rpmcmp strip -S /tmp/rpm-root/usr/local/lib/rpm/rpmdeps -strip -S /tmp/rpm-root/usr/local/bin/rpmdigest strip -S /tmp/rpm-root/usr/local/lib/rpm/db_* strip -S /tmp/rpm-root/usr/local/lib/librpm*.dylib chmod 755 /tmp/rpm-root/Library/Perl/*/darwin-thread-multi-2level/auto/RPM/RPM.bundle @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ VENDOR rpm/rpmio/ ugid.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: r...@rpm5.org Module: rpm Date: 05-Jan-2009 20:49:14 Branch: HEAD Handle: 2009010519491400 Modified files: rpm VENDOR rpm/rpmio ugid.c Log: OpenPKG-specific change no-hard-coded-ugid: do not make hard-coded assumptions about any uid/gid, because OpenPKG can safely rely on the /etc/passwd and /etc/group lookups for all uid/gid and has no need to assume that for instance GID 0 is root. Actually, such an assumption is a portability problem as GID 0 under e.g. BSD is named wheel and not root, etc. As a result, things like rpm -V would report wrong information, etc. Summary: RevisionChanges Path 2.66+11 -0 rpm/VENDOR 2.11+10 -0 rpm/rpmio/ugid.c patch -p0 '@@ .' Index: rpm/VENDOR $ cvs diff -u -r2.65 -r2.66 VENDOR --- rpm/VENDOR21 Dec 2008 17:16:47 - 2.65 +++ rpm/VENDOR5 Jan 2009 19:49:14 - 2.66 @@ -35,6 +35,17 @@ Characteristic: cross-platform multiple-instance use of RPM + Change: no-hard-coded-ugid + Purpose:do not make hard-coded assumptions about any uid/gid + Reason: OpenPKG can safely rely on the /etc/passwd and /etc/group + lookups for all uid/gid and has no need to assume + that for instance GID 0 is root. Actually, such + an assumption is a portability problem as GID 0 + under e.g. BSD is named wheel and not root, + etc. As a result, things like rpm -V would report + wrong information, etc. + + Change: splitted-source-directory Purpose:support so-called splitted source directories, i.e., source files (listed on SourceX and PatchX headers) @@ . patch -p0 '@@ .' Index: rpm/rpmio/ugid.c $ cvs diff -u -r2.10 -r2.11 ugid.c --- rpm/rpmio/ugid.c 6 Oct 2007 19:40:23 - 2.10 +++ rpm/rpmio/ugid.c 5 Jan 2009 19:49:14 - 2.11 @@ -25,9 +25,11 @@ if (!thisUname) { lastUnameLen = 0; return -1; +#if !defined(RPM_VENDOR_OPENPKG) /* no-hard-coded-ugid */ } else if (strcmp(thisUname, root) == 0) { *uid = 0; return 0; +#endif } thisUnameLen = strlen(thisUname); @@ -69,9 +71,11 @@ if (thisGname == NULL) { lastGnameLen = 0; return -1; +#if !defined(RPM_VENDOR_OPENPKG) /* no-hard-coded-ugid */ } else if (strcmp(thisGname, root) == 0) { *gid = 0; return 0; +#endif } thisGnameLen = strlen(thisGname); @@ -91,6 +95,7 @@ /*...@=internalglobs@*/ grent = getgrnam(thisGname); if (grent == NULL) { +#if !defined(RPM_VENDOR_OPENPKG) /* no-hard-coded-ugid */ /* XXX The filesystem package needs group/lock w/o getgrnam. */ if (strcmp(thisGname, lock) == 0) { *gid = lastGid = 54; @@ -100,6 +105,7 @@ *gid = lastGid = 12; return 0; } else +#endif return -1; } } @@ -120,8 +126,10 @@ if (uid == (uid_t) -1) { lastUid = (uid_t) -1; return NULL; +#if !defined(RPM_VENDOR_OPENPKG) /* no-hard-coded-ugid */ } else if (uid == (uid_t) 0) { return root; +#endif } else if (uid == lastUid) { return lastUname; } else { @@ -151,8 +159,10 @@ if (gid == (gid_t) -1) { lastGid = (gid_t) -1; return NULL; +#if !defined(RPM_VENDOR_OPENPKG) /* no-hard-coded-ugid */ } else if (gid == (gid_t) 0) { return root; +#endif } else if (gid == lastGid) { return lastGname; } else { @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ CHANGES rpm/python/ header-py.c rpm/rpmdb/ rpmevr.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 05-Jan-2009 22:09:37 Branch: HEAD Handle: 2009010521093601 Modified files: rpm CHANGES rpm/python header-py.c rpm/rpmdb rpmevr.c Log: - EVRtuple: handle EVR_t opaquely in python labelCompare(). - EVRtuple: postpone committing to single missing value for now. Summary: RevisionChanges Path 1.2729 +2 -0 rpm/CHANGES 1.102 +12 -11 rpm/python/header-py.c 1.28+15 -1 rpm/rpmdb/rpmevr.c patch -p0 '@@ .' Index: rpm/CHANGES $ cvs diff -u -r1.2728 -r1.2729 CHANGES --- rpm/CHANGES 5 Jan 2009 00:44:35 - 1.2728 +++ rpm/CHANGES 5 Jan 2009 21:09:36 - 1.2729 @@ -1,5 +1,7 @@ 5.2a2 - 5.2a3: +- jbj: EVRtuple: handle EVR_t opaquely in python labelCompare(). +- jbj: EVRtuple: postpone committing to single missing value for now. - jbj: EVRtuple: attempt rpmEVRparse() during parseRCPOT(). no error returns from rpmEVRparse() to trigger the message yet, todo++. - jbj: EVRtuple: teach --whatneeds/--needswhat to use EVR_t opaquely. @@ . patch -p0 '@@ .' Index: rpm/python/header-py.c $ cvs diff -u -r1.101 -r1.102 header-py.c --- rpm/python/header-py.c1 Jan 2009 19:28:01 - 1.101 +++ rpm/python/header-py.c5 Jan 2009 21:09:37 - 1.102 @@ -918,23 +918,24 @@ PyObject * labelCompare (PyObject * self, PyObject * args) { -EVR_t A = memset(alloca(sizeof(*A)), 0, sizeof(*A)); -EVR_t B = memset(alloca(sizeof(*B)), 0, sizeof(*B)); +EVR_t a = rpmEVRnew(RPMSENSE_EQUAL, 1); +EVR_t b = rpmEVRnew(RPMSENSE_EQUAL, 1); int rc; +/* XXX FIXME: labelCompare cannot specify Distepoch: field */ if (!PyArg_ParseTuple(args, (zzz)(zzz), - A-F[RPMEVR_E], A-F[RPMEVR_V], A-F[RPMEVR_R], B-F[RPMEVR_E], B-F[RPMEVR_V], B-F[RPMEVR_R])) + a-F[RPMEVR_E], a-F[RPMEVR_V], a-F[RPMEVR_R], + b-F[RPMEVR_E], b-F[RPMEVR_V], b-F[RPMEVR_R])) +{ + a = rpmEVRfree(a); + b = rpmEVRfree(b); return NULL; +} -/* XXX nuke the unnecessary (and fix non-opaque) sanity check. */ -if (A-F[RPMEVR_E] == NULL) A-F[RPMEVR_E] = 0; -if (B-F[RPMEVR_E] == NULL) B-F[RPMEVR_E] = 0; -if (A-F[RPMEVR_V] == NULL) A-F[RPMEVR_V] = ; -if (B-F[RPMEVR_V] == NULL) B-F[RPMEVR_V] = ; -if (A-F[RPMEVR_R] == NULL) A-F[RPMEVR_R] = ; -if (B-F[RPMEVR_R] == NULL) B-F[RPMEVR_R] = ; +rc = rpmEVRcompare(a, b); -rc = rpmEVRcompare(A, B); +a = rpmEVRfree(a); +b = rpmEVRfree(b); return Py_BuildValue(i, rc); } @@ . patch -p0 '@@ .' Index: rpm/rpmdb/rpmevr.c $ cvs diff -u -r1.27 -r1.28 rpmevr.c --- rpm/rpmdb/rpmevr.c5 Jan 2009 00:34:43 - 1.27 +++ rpm/rpmdb/rpmevr.c5 Jan 2009 21:09:37 - 1.28 @@ -29,6 +29,7 @@ evr-F[RPMEVR_E] = 0; evr-F[RPMEVR_V] = ; evr-F[RPMEVR_R] = ; + evr-F[RPMEVR_D] = ; } return evr; } @@ -315,9 +316,11 @@ assert(a-F[RPMEVR_E] != NULL); assert(a-F[RPMEVR_V] != NULL); assert(a-F[RPMEVR_R] != NULL); +assert(a-F[RPMEVR_D] != NULL); assert(b-F[RPMEVR_E] != NULL); assert(b-F[RPMEVR_V] != NULL); assert(b-F[RPMEVR_R] != NULL); +assert(b-F[RPMEVR_D] != NULL); for (s = rpmEVRorder(); *s; s++) { int ix; @@ -339,9 +342,20 @@ { rpmsenseFlags aF = a-Flags; rpmsenseFlags bF = b-Flags; -int sense = rpmEVRcompare(a, b); +int sense; int result; +/* XXX HACK: postpone committing to single missing value for now. */ +if (a-F[RPMEVR_E] == NULL) a-F[RPMEVR_E] = 0; +if (b-F[RPMEVR_E] == NULL) b-F[RPMEVR_E] = 0; +if (a-F[RPMEVR_V] == NULL) a-F[RPMEVR_V] = ; +if (b-F[RPMEVR_V] == NULL) b-F[RPMEVR_V] = ; +if (a-F[RPMEVR_R] == NULL) a-F[RPMEVR_R] = ; +if (b-F[RPMEVR_R] == NULL) b-F[RPMEVR_R] = ; +if (a-F[RPMEVR_D] == NULL) a-F[RPMEVR_D] = ; +if (b-F[RPMEVR_D] == NULL) b-F[RPMEVR_D] = ; +sense = rpmEVRcompare(a, b); + /* Detect overlap of {A,B} range. */ if (aF ==