[CVS] RPM: rpm-5_3: rpm/ CHANGES rpm/rpmdb/ hdrfmt.c rpm/rpmio/ rpmuui...
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: 26-Mar-2011 13:57:24 Branch: rpm-5_3 Handle: 2011032612572301 Modified files: (Branch: rpm-5_3) rpm CHANGES rpm/rpmdb hdrfmt.c rpm/rpmio rpmuuid.c Log: - uuid: permit --qf '%{RPMTAG:uuid}' UUIDv1/UUIDv5 output display. - uuid: rework for single exit return. Summary: RevisionChanges Path 1.3296.2.179+2 -0 rpm/CHANGES 1.145.2.7 +81 -21 rpm/rpmdb/hdrfmt.c 2.5.8.1 +16 -24 rpm/rpmio/rpmuuid.c patch -p0 <<'@@ .' Index: rpm/CHANGES $ cvs diff -u -r1.3296.2.178 -r1.3296.2.179 CHANGES --- rpm/CHANGES 25 Mar 2011 16:24:56 - 1.3296.2.178 +++ rpm/CHANGES 26 Mar 2011 12:57:23 - 1.3296.2.179 @@ -1,4 +1,6 @@ 5.3.9 -> 5.3.10 +- jbj: uuid: permit --qf '%{RPMTAG:uuid}' UUIDv1/UUIDv5 output display. +- jbj: uuid: rework for single exit return. - devzero2000: permit in configure phase to enable the --enable-rpm-lua-extensions-based-on-rpmlib used by OpenPKG today and, for rpm.vercmp, by rpm.org (ref https://blueprints.launchpad.net/rpm/+spec/rpm-split-vendor-config-in-autofu) @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/hdrfmt.c $ cvs diff -u -r1.145.2.6 -r1.145.2.7 hdrfmt.c --- rpm/rpmdb/hdrfmt.c25 Jan 2011 18:13:14 - 1.145.2.6 +++ rpm/rpmdb/hdrfmt.c26 Mar 2011 12:57:24 - 1.145.2.7 @@ -1631,7 +1631,7 @@ } he->p.ui8p[6] &= 0xf0; /* preserve version, clear time_hi nibble */ -he->p.ui8p[8] &= 0x3f; /* preserve reserved, clear clock */ +he->p.ui8p[8] &= 0xc0; /* preserve variant, clear clock */ he->p.ui8p[9] &= 0x00; he->p.ui8p[3] = (rpmuint8_t)(uuid_time >> 0); @@ -1780,6 +1780,7 @@ const char * ns = NULL; const char * tagn = tagName(he->tag); const char * s = NULL; +char * t = (val ? val : alloca(40)); int rc; /* XXX Substitute Pkgid & Hdrid strings for aliases. */ @@ -1807,12 +1808,13 @@ he->c = 128/8; he->p.ptr = xcalloc(1, he->c); he->freeData = 1; -rc = rpmuuidMake((int)version, ns, s, val, (unsigned char *)he->p.ui8p); +rc = rpmuuidMake((int)version, ns, s, t, (unsigned char *)he->p.ui8p); if (rc) { he->p.ptr = _free(he->p.ptr); he->freeData = 0; } s = _free(s); + return rc; } @@ -4706,22 +4708,91 @@ /*@globals rpmGlobalMacroContext, h_errno, internalState @*/ /*@modifies rpmGlobalMacroContext, internalState @*/ { +static const char hex[] = "0123456789abcdef"; +/* XXX use private tag container to avoid memory issues for now. */ +HE_t nhe = memset(alloca(sizeof(*nhe)), 0, sizeof(*nhe)); /*@-nullassign@*/ -/*@unchecked@*/ /*@observer@*/ +/*@unchecked@*/ /*@observer@*/ static const char *avdefault[] = { "v5", NULL }; /*@=nullassign@*/ -rpmuint32_t version = 0; int ix = (he->ix > 0 ? he->ix : 0); char * val = NULL; -int i; +struct timeval tv; +char * t; +char * te; +uint32_t i; assert(ix == 0); +val = xmalloc((128/4 + 4) + 1); +*val = '\0'; + +nhe->tag = he->tag; +nhe->t = he->t; switch(he->t) { default: + val = _free(val); val = xstrdup(_("(invalid type :uuid)")); goto exit; /*@notreached@*/ break; +case RPM_UINT64_TYPE: + /* XXX Limit to tag time stamps with UUIDv1 direct conversion. */ + switch (he->tag) { + default: + val = _free(val); + val = xstrdup(_("(invalid tag :uuid)")); + goto exit; + break; + case RPMTAG_INSTALLTIME: + case RPMTAG_BUILDTIME: + case RPMTAG_ORIGINTIME: + case RPMTAG_INSTALLTID: + case RPMTAG_REMOVETID: + case RPMTAG_ORIGINTID: + + /* Convert tag time stamp to UUIDv1. */ + tv.tv_sec = (long) he->p.ui64p[0]; + tv.tv_usec = (long) (he->c > 1 ? he->p.ui64p[1] : 0); + ix = tv2uuidv1(NULL, nhe, &tv); + + /* Convert UUIDv1 to display string. */ + te = val; + for (i = 0; i < nhe->c; i++) { + *te++ = hex[ (int)((nhe->p.ui8p[i] >> 4) & 0x0f) ]; + *te++ = hex[ (int)((nhe->p.ui8p[i] ) & 0x0f) ]; + if
[CVS] RPM: rpm-5_4: rpm/ CHANGES rpm/rpmdb/ hdrfmt.c rpm/rpmio/ rpmuui...
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: 26-Mar-2011 14:03:54 Branch: rpm-5_4 Handle: 2011032613035300 Modified files: (Branch: rpm-5_4) rpm CHANGES rpm/rpmdb hdrfmt.c rpm/rpmio rpmuuid.c Log: - uuid: permit --qf '%{RPMTAG:uuid}' UUIDv1/UUIDv5 output display. - uuid: rework for single exit return. Summary: RevisionChanges Path 1.3501.2.77 +2 -0 rpm/CHANGES 1.151.2.2 +80 -20 rpm/rpmdb/hdrfmt.c 2.5.10.1+15 -23 rpm/rpmio/rpmuuid.c patch -p0 <<'@@ .' Index: rpm/CHANGES $ cvs diff -u -r1.3501.2.76 -r1.3501.2.77 CHANGES --- rpm/CHANGES 25 Mar 2011 16:22:41 - 1.3501.2.76 +++ rpm/CHANGES 26 Mar 2011 13:03:53 - 1.3501.2.77 @@ -1,4 +1,6 @@ 5.4.0 -> 5.4.1: +- jbj: uuid: permit --qf '%{RPMTAG:uuid}' UUIDv1/UUIDv5 output display. +- jbj: uuid: rework for single exit return. - devzero2000: permit in configure phase to enable the --enable-rpm-lua-extensions-based-on-rpmlib used by OpenPKG today and, for rpm.vercmp, by rpm.org (ref https://blueprints.launchpad.net/rpm/+spec/rpm-split-vendor-config-in-autofu) @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/hdrfmt.c $ cvs diff -u -r1.151.2.1 -r1.151.2.2 hdrfmt.c --- rpm/rpmdb/hdrfmt.c25 Jan 2011 18:12:22 - 1.151.2.1 +++ rpm/rpmdb/hdrfmt.c26 Mar 2011 13:03:53 - 1.151.2.2 @@ -1631,7 +1631,7 @@ } he->p.ui8p[6] &= 0xf0; /* preserve version, clear time_hi nibble */ -he->p.ui8p[8] &= 0x3f; /* preserve reserved, clear clock */ +he->p.ui8p[8] &= 0xc0; /* preserve variant, clear clock */ he->p.ui8p[9] &= 0x00; he->p.ui8p[3] = (rpmuint8_t)(uuid_time >> 0); @@ -1780,6 +1780,7 @@ const char * ns = NULL; const char * tagn = tagName(he->tag); const char * s = NULL; +char * t = (val ? val : alloca(40)); int rc; /* XXX Substitute Pkgid & Hdrid strings for aliases. */ @@ -1807,12 +1808,13 @@ he->c = 128/8; he->p.ptr = xcalloc(1, he->c); he->freeData = 1; -rc = rpmuuidMake((int)version, ns, s, val, (unsigned char *)he->p.ui8p); +rc = rpmuuidMake((int)version, ns, s, t, (unsigned char *)he->p.ui8p); if (rc) { he->p.ptr = _free(he->p.ptr); he->freeData = 0; } s = _free(s); + return rc; } @@ -4706,22 +4708,91 @@ /*@globals rpmGlobalMacroContext, h_errno, internalState @*/ /*@modifies rpmGlobalMacroContext, internalState @*/ { +static const char hex[] = "0123456789abcdef"; +/* XXX use private tag container to avoid memory issues for now. */ +HE_t nhe = memset(alloca(sizeof(*nhe)), 0, sizeof(*nhe)); /*@-nullassign@*/ /*@unchecked@*/ /*@observer@*/ static const char *avdefault[] = { "v5", NULL }; /*@=nullassign@*/ -rpmuint32_t version = 0; int ix = (he->ix > 0 ? he->ix : 0); char * val = NULL; -int i; +struct timeval tv; +char * t; +char * te; +uint32_t i; assert(ix == 0); +val = xmalloc((128/4 + 4) + 1); +*val = '\0'; + +nhe->tag = he->tag; +nhe->t = he->t; switch(he->t) { default: + val = _free(val); val = xstrdup(_("(invalid type :uuid)")); goto exit; /*@notreached@*/ break; +case RPM_UINT64_TYPE: + /* XXX Limit to tag time stamps with UUIDv1 direct conversion. */ + switch (he->tag) { + default: + val = _free(val); + val = xstrdup(_("(invalid tag :uuid)")); + goto exit; + break; + case RPMTAG_INSTALLTIME: + case RPMTAG_BUILDTIME: + case RPMTAG_ORIGINTIME: + case RPMTAG_INSTALLTID: + case RPMTAG_REMOVETID: + case RPMTAG_ORIGINTID: + + /* Convert tag time stamp to UUIDv1. */ + tv.tv_sec = (long) he->p.ui64p[0]; + tv.tv_usec = (long) (he->c > 1 ? he->p.ui64p[1] : 0); + ix = tv2uuidv1(NULL, nhe, &tv); + + /* Convert UUIDv1 to display string. */ + te = val; + for (i = 0; i < nhe->c; i++) { + *te++ = hex[ (int)((nhe->p.ui8p[i] >> 4) & 0x0f) ]; + *te++ = hex[ (int)((nhe->p.ui8p[i] ) & 0x0f) ]; + if (i == 3 || i == 5 || i == 7 || i == 9
[CVS] RPM: rpm/ CHANGES
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: 26-Mar-2011 14:18:54 Branch: HEAD Handle: 2011032613185300 Modified files: rpm CHANGES Log: - uuid: permit --qf '%{RPMTAG:uuid}' UUIDv1/UUIDv5 output display. - uuid: rework for single exit return. Summary: RevisionChanges Path 1.3578 +2 -0 rpm/CHANGES patch -p0 <<'@@ .' Index: rpm/CHANGES $ cvs diff -u -r1.3577 -r1.3578 CHANGES --- rpm/CHANGES 25 Mar 2011 16:49:30 - 1.3577 +++ rpm/CHANGES 26 Mar 2011 13:18:53 - 1.3578 @@ -1,4 +1,6 @@ 5.4.0 -> 5.4.1: +- jbj: uuid: permit --qf '%{RPMTAG:uuid}' UUIDv1/UUIDv5 output display. +- jbj: uuid: rework for single exit return. - devzero2000: add a toy trpmluaclassify.sh script - devzero2000: arch macro for all EFI-compatible architectures - jbj: add a --nofsync popt alias (caveat: experimental & risky). @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm-5_3: rpm/ devtool.conf
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: 26-Mar-2011 16:57:34 Branch: rpm-5_3 Handle: 2011032615573400 Modified files: (Branch: rpm-5_3) rpm devtool.conf Log: - devtool: +with-uuid for cooker. Summary: RevisionChanges Path 2.333.2.73 +1 -1 rpm/devtool.conf patch -p0 <<'@@ .' Index: rpm/devtool.conf $ cvs diff -u -r2.333.2.72 -r2.333.2.73 devtool.conf --- rpm/devtool.conf 9 Feb 2011 22:35:27 - 2.333.2.72 +++ rpm/devtool.conf 26 Mar 2011 15:57:34 - 2.333.2.73 @@ -779,7 +779,7 @@ --with-libxml2 \ --with-pcre \ --enable-utf8 \ ---without-uuid \ +--with-uuid \ --with-attr \ --with-acl \ --without-xar \ @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm-5_4: rpm/ devtool.conf
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: 26-Mar-2011 16:58:36 Branch: rpm-5_4 Handle: 2011032615583600 Modified files: (Branch: rpm-5_4) rpm devtool.conf Log: - devtool: +with-uuid for cooker. Summary: RevisionChanges Path 2.365.2.5 +1 -1 rpm/devtool.conf patch -p0 <<'@@ .' Index: rpm/devtool.conf $ cvs diff -u -r2.365.2.4 -r2.365.2.5 devtool.conf --- rpm/devtool.conf 25 Jan 2011 13:39:46 - 2.365.2.4 +++ rpm/devtool.conf 26 Mar 2011 15:58:36 - 2.365.2.5 @@ -777,7 +777,7 @@ --with-libxml2 \ --with-pcre \ --enable-utf8 \ ---without-uuid \ +--with-uuid \ --with-attr \ --with-acl \ --without-xar \ @@ . __ 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: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 26-Mar-2011 16:59:41 Branch: HEAD Handle: 2011032615594100 Modified files: rpm devtool.conf Log: - devtool: +with-uuid for cooker. Summary: RevisionChanges Path 2.371 +1 -1 rpm/devtool.conf patch -p0 <<'@@ .' Index: rpm/devtool.conf $ cvs diff -u -r2.370 -r2.371 devtool.conf --- rpm/devtool.conf 25 Jan 2011 13:36:59 - 2.370 +++ rpm/devtool.conf 26 Mar 2011 15:59:41 - 2.371 @@ -777,7 +777,7 @@ --with-libxml2 \ --with-pcre \ --enable-utf8 \ ---without-uuid \ +--with-uuid \ --with-attr \ --with-acl \ --without-xar \ @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm-5_3: rpm/ CHANGES rpm/rpmdb/ db3.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: 27-Mar-2011 07:15:12 Branch: rpm-5_3 Handle: 2011032705151101 Modified files: (Branch: rpm-5_3) rpm CHANGES rpm/rpmdb db3.c Log: - fix: reduce false positives checking for duplicate keys (#62822). Summary: RevisionChanges Path 1.3296.2.180+1 -0 rpm/CHANGES 1.150.2.11 +4 -2 rpm/rpmdb/db3.c patch -p0 <<'@@ .' Index: rpm/CHANGES $ cvs diff -u -r1.3296.2.179 -r1.3296.2.180 CHANGES --- rpm/CHANGES 26 Mar 2011 12:57:23 - 1.3296.2.179 +++ rpm/CHANGES 27 Mar 2011 05:15:11 - 1.3296.2.180 @@ -1,4 +1,5 @@ 5.3.9 -> 5.3.10 +- jbj: fix: reduce false positives checking for duplicate keys (#62822). - jbj: uuid: permit --qf '%{RPMTAG:uuid}' UUIDv1/UUIDv5 output display. - jbj: uuid: rework for single exit return. - devzero2000: permit in configure phase to enable the @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/db3.c $ cvs diff -u -r1.150.2.10 -r1.150.2.11 db3.c --- rpm/rpmdb/db3.c 24 Mar 2011 16:46:13 - 1.150.2.10 +++ rpm/rpmdb/db3.c 27 Mar 2011 05:15:12 - 1.150.2.11 @@ -1919,11 +1919,13 @@ if (ns > 0) /* No "" empty keys please. */ xx = loadDBT(_r, he->tag, s, ns); } else { - static double e = 1.0e-4; + static double e = 1.0e-5; + static size_t nmin = 16; + size_t n = 2 * (he->c > nmin ? he->c : nmin); size_t m = 0; size_t k = 0; rpmbf bf; - rpmbfParams(he->c, e, &m, &k); + rpmbfParams(n, e, &m, &k); bf = rpmbfNew(m, k, 0); _r->flags = DB_DBT_MULTIPLE | DB_DBT_APPMALLOC; @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm-5_4: rpm/ CHANGES rpm/rpmdb/ db3.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: 27-Mar-2011 07:16:04 Branch: rpm-5_4 Handle: 2011032705160301 Modified files: (Branch: rpm-5_4) rpm CHANGES rpm/rpmdb db3.c Log: - fix: reduce false positives checking for duplicate keys (#62822). Summary: RevisionChanges Path 1.3501.2.78 +1 -0 rpm/CHANGES 1.156.2.6 +4 -2 rpm/rpmdb/db3.c patch -p0 <<'@@ .' Index: rpm/CHANGES $ cvs diff -u -r1.3501.2.77 -r1.3501.2.78 CHANGES --- rpm/CHANGES 26 Mar 2011 13:03:53 - 1.3501.2.77 +++ rpm/CHANGES 27 Mar 2011 05:16:03 - 1.3501.2.78 @@ -1,4 +1,5 @@ 5.4.0 -> 5.4.1: +- jbj: fix: reduce false positives checking for duplicate keys (#62822). - jbj: uuid: permit --qf '%{RPMTAG:uuid}' UUIDv1/UUIDv5 output display. - jbj: uuid: rework for single exit return. - devzero2000: permit in configure phase to enable the @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/db3.c $ cvs diff -u -r1.156.2.5 -r1.156.2.6 db3.c --- rpm/rpmdb/db3.c 25 Jan 2011 14:51:43 - 1.156.2.5 +++ rpm/rpmdb/db3.c 27 Mar 2011 05:16:04 - 1.156.2.6 @@ -1917,11 +1917,13 @@ if (ns > 0) /* No "" empty keys please. */ xx = loadDBT(_r, he->tag, s, ns); } else { - static double e = 1.0e-4; + static double e = 1.0e-5; + static size_t nmin = 16; + size_t n = 2 * (he->c > nmin ? he->c : nmin); size_t m = 0; size_t k = 0; rpmbf bf; - rpmbfParams(he->c, e, &m, &k); + rpmbfParams(n, e, &m, &k); bf = rpmbfNew(m, k, 0); _r->flags = DB_DBT_MULTIPLE | DB_DBT_APPMALLOC; @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ CHANGES rpm/rpmdb/ db3.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: 27-Mar-2011 07:16:44 Branch: HEAD Handle: 2011032705164300 Modified files: rpm CHANGES rpm/rpmdb db3.c Log: - fix: reduce false positives checking for duplicate keys (#62822). Summary: RevisionChanges Path 1.3579 +1 -0 rpm/CHANGES 1.162 +4 -2 rpm/rpmdb/db3.c patch -p0 <<'@@ .' Index: rpm/CHANGES $ cvs diff -u -r1.3578 -r1.3579 CHANGES --- rpm/CHANGES 26 Mar 2011 13:18:53 - 1.3578 +++ rpm/CHANGES 27 Mar 2011 05:16:43 - 1.3579 @@ -1,4 +1,5 @@ 5.4.0 -> 5.4.1: +- jbj: fix: reduce false positives checking for duplicate keys (#62822). - jbj: uuid: permit --qf '%{RPMTAG:uuid}' UUIDv1/UUIDv5 output display. - jbj: uuid: rework for single exit return. - devzero2000: add a toy trpmluaclassify.sh script @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/db3.c $ cvs diff -u -r1.161 -r1.162 db3.c --- rpm/rpmdb/db3.c 25 Jan 2011 14:50:56 - 1.161 +++ rpm/rpmdb/db3.c 27 Mar 2011 05:16:43 - 1.162 @@ -1917,11 +1917,13 @@ if (ns > 0) /* No "" empty keys please. */ xx = loadDBT(_r, he->tag, s, ns); } else { - static double e = 1.0e-4; + static double e = 1.0e-5; + static size_t nmin = 16; + size_t n = 2 * (he->c > nmin ? he->c : nmin); size_t m = 0; size_t k = 0; rpmbf bf; - rpmbfParams(he->c, e, &m, &k); + rpmbfParams(n, e, &m, &k); bf = rpmbfNew(m, k, 0); _r->flags = DB_DBT_MULTIPLE | DB_DBT_APPMALLOC; @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org