Re: [CVS] RPM: rpm/lib/ psm.c
Nice catch. On Jul 19, 2007, at 2:14 AM, Ralf S. Engelschall wrote: RPM Package Manager, CVS Repository http://rpm5.org/cvs/ __ __ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 08:14:54 Branch: HEAD Handle: 2007071907145400 Modified files: rpm/lib psm.c Log: Plug a memory leak and/or avoid segfaults by freeing the correct buffer as dirname(3) on some platforms return a pointer to internal storage space allocated on the first call that will be overwritten by subsequent calls while on other platforms it may just modify the contents of the string passed to it in-place. Summary: RevisionChanges Path 2.210 +4 -2 rpm/lib/psm.c __ __ patch -p0 '@@ .' Index: rpm/lib/psm.c == == $ cvs diff -u -r2.209 -r2.210 psm.c --- rpm/lib/psm.c 18 Jul 2007 12:56:03 - 2.209 +++ rpm/lib/psm.c 19 Jul 2007 06:14:54 - 2.210 @@ -1682,6 +1682,7 @@ /* Open output package for writing. */ { char tiddn[32]; const char * bfmt; + const char * pkgdn_buf; const char * pkgdn; const char * pkgbn; @@ -1695,9 +1696,10 @@ pkgbn); pkgbn = _free(pkgbn); (void) urlPath(psm-pkgURL, psm-pkgfn); - pkgdn = dirname(xstrdup(psm-pkgfn)); + pkgdn_buf = xstrdup(psm-pkgfn); + pkgdn = dirname(pkgdn_buf); rc = rpmMkdirPath(pkgdn, _repackage_dir); - pkgdn = _free(pkgdn); + pkgdn_buf = _free(pkgdn_buf); if (rc == RPMRC_FAIL) break; psm-fd = Fopen(psm-pkgfn, w.fdio); @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repository[EMAIL PROTECTED] __ RPM Package Managerhttp://rpm5.org Developer Communication Listrpm-devel@rpm5.org
Re: Eliminating Berekeley DB/Sqlite3 in favor of a flat file rpmdb
On Jul 18, 2007, at 4:17 PM, Thomas Lotterer wrote: On Wednesday, 18. July 2007 at 9:49 pm, [EMAIL PROTECTED] wrote: On Jul 18, 2007, at 3:35 PM, Thomas Lotterer wrote: Did you look at the tcl bindings used for BDB make check? I looked at them but the environment I was testing in did not support tcl. Also I have no experience in tcl. Bad start. What is the usage case? If you need Berkeley DB, I'll look at diagnosing the problem this week. There is no practical use case. It was just an attempt of mine to regain confidence in BDB but it turned out things went worse. So please don't waste your time beyond maybe looking at the critical open you have mentioned. My hope is it's just wrong a flag. BTW, the functionality I'm using to open the database from multiple independent processes seems to have been added especially for SVN. probe.c is using flags |= DB_INIT_TXN; but is otherwise not using trxnid's. FWIW, try rpmdb/tjfn.c, which also started life from Berkeley DB example code. The test program attempts a join operation on {Dirnames,Basenames} indices. The creation of a toy test database using a dbenv is similar to what you are doing in probe.c 73 de Jeff __ RPM Package Managerhttp://rpm5.org Developer Communication Listrpm-devel@rpm5.org
Re: [CVS] RPM: rpm/ devtool.conf
On Jul 19, 2007, at 2:18 PM, Ralf S. Engelschall wrote: On Thu, Jul 19, 2007, Ralf S. Engelschall wrote: +## o 2007-07-18: ix86-fedora7-gcc4.2.0 +## o 2007-07-19: ix86-fedora7-sunstudio12 +## o 2007-07-19: ix86-fedora7-icc10.0 Please notice especially those three esoteric ones here. Fedora 7 system uses a GCC 4.1.2 only. The above tests were done with GCC 4.2.0 from an OpenPKG instance, a cc from a Sun Studio 12 installation and an icc from an Intel C/C++ compiler installation. RPM 5 now builds and works under all of them and even the warnings under Sun Studio are rather minimal (most of them I've already fixed today). If I find time I'll also check whether I can also get rid of the compile-time warnings under Intel C/C++ (which are often related to the fact that we still have #if XXX constructs where XXX not defined at all). Very cool! (aside) So THAT'S why you wanted #if defined(foo) instead. ;-) Any chance to get Mac OS X wired up to an OpenPKG build system? I have a dual G5 and a MacPro hardware if you want to attempt. 73 de Jeff __ RPM Package Managerhttp://rpm5.org Developer Communication Listrpm-devel@rpm5.org
Re: [CVS] RPM: rpm/ CHANGES configure.ac rpm/rpmio/ md4.c rmd128.c rmd160....
On Jul 19, 2007, at 3:40 PM, Jeff Johnson wrote: Run-time, not compile-time, endian detection please. Never mind. Those crypto digests are following beecrypt, not rpm, programming practice. So the beecr5ypt programming paradigm is #if WORDS_BIGENDIAN 73 de Jeff __ RPM Package Managerhttp://rpm5.org Developer Communication Listrpm-devel@rpm5.org
Re: [CVS] RPM: rpm/ CHANGES configure.ac rpm/rpmio/ md4.c rmd128.c rmd160....
On Thu, Jul 19, 2007, Jeff Johnson wrote: On Jul 19, 2007, at 3:40 PM, Jeff Johnson wrote: Run-time, not compile-time, endian detection please. Never mind. Those crypto digests are following beecrypt, not rpm, programming practice. So the beecr5ypt programming paradigm is #if WORDS_BIGENDIAN Yes, I know. I've explicitly checked beforehand from where WORDS_BIGENDIAN came and have seen that is an Autoconf check present in BeeCrypt's configure but which was missing on our side. As a side-effect our side was broken although the code itself followed just fine the BeeCrypt coding practice. But as it is compiled outside the BeeCrypt build environment we have to provide the missing pieces ourself... Ralf S. Engelschall [EMAIL PROTECTED] www.engelschall.com __ RPM Package Managerhttp://rpm5.org Developer Communication Listrpm-devel@rpm5.org
Re: [CVS] RPM: rpm/ CHANGES configure.ac rpm/rpmio/ md4.c rmd128.c rmd160....
On Jul 19, 2007, at 3:50 PM, Ralf S. Engelschall wrote: On Thu, Jul 19, 2007, Jeff Johnson wrote: On Jul 19, 2007, at 3:40 PM, Jeff Johnson wrote: Run-time, not compile-time, endian detection please. Never mind. Those crypto digests are following beecrypt, not rpm, programming practice. So the beecr5ypt programming paradigm is #if WORDS_BIGENDIAN Yes, I know. I've explicitly checked beforehand from where WORDS_BIGENDIAN came and have seen that is an Autoconf check present in BeeCrypt's configure but which was missing on our side. As a side- effect our side was broken although the code itself followed just fine the BeeCrypt coding practice. But as it is compiled outside the BeeCrypt build environment we have to provide the missing pieces ourself... Ah, like missing HAVE_MMAP. My apologies for the noise. How do you notice these things btw? ;-) 73 de Jeff __ RPM Package Managerhttp://rpm5.org Developer Communication Listrpm-devel@rpm5.org