Fwd: Compiling RPM-5.1.9 with external Berkley
Hi, We use Berkley DB 4.8 for some DB transactions. The DB utilities are already exported for Berkley DB 4.8. Berkley 4.8 is also used in our case to link with RPM 4.8. However, we are planning to migrate to RPM 5.1.9. As part of this migration, I am able to compile RPM 5.1.9 externally with Berkley 4.8. I can also use the built rpm for queries etc. The problem comes when I try to install a package with --nodeps and initialize an RPMDB. A snippet is pasted below: [root@bgl-ng-install-vxr1 rpm-5.1.9]# ./rpm -ivh --nodeps --root=/tmp /tmp/cai-pkg-ncs6k-64.rp_lc-5.0.0-Default.x86_64.rpm Preparing...rpmdb: DB_ENV->add_data_dir: method not permitted after handle's open method rpmdb: stat: /tmp/usr/local/rpm5/__db.Basenames: No such file or directory rpmdb: Basenames: No such file or directory error: cannot open Basenames(1117) index using db3 - No such file or directory (2) rpm: rpmdb.c:3693: rpmdbFindFpList: Assertion mi !=3D ((void *)0)' failed. = Aborted (core dumped) I am not sure what sort of changes would be needed to get th= is working. I looked over the forum but failed to find any p= atches available for RPM 5.1.9 to support external Berkley. Thanks and Regards,Bishwajit Goswami
Re: Compiling RPM-5.1.9 with external Berkley
Hi Sriram, Thanks for your reply. The dbpath in my case is set properly as usr/local/rpm5. root assigned as /tmp is supposed to create the rpmdb using dbpath /tmp/usr/local/rpm5/. I am already working with RPM 5.1.9 compiled with internal Berkley and everything works fine, except when I try to use the same dbpath to be queried by RPM 4.8 causing RPMDB incompatibility. Thanks and Regards, Bishwajit > -- Forwarded message -- > From: Sriram Narayanan > Date: Wed, Nov 20, 2013 at 11:18 PM > Subject: Re: Compiling RPM-5.1.9 with external Berkley > To: rpm-users@rpm5.org > > > Let me try quoting that error again: Please see the error referring to a > specific path -> "rpmdb: stat: /tmp/usr/local/rpm5/__db. > Basenames: No such file or directory" > > See this for more info: > > > http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch19s03.html > > -- Ram > > > On Wed, Nov 20, 2013 at 11:44 AM, Sriram Narayanan wrote: > >> What's your rpmdb path ? >> >> Please see the error: >> >> rpmdb: stat: /tmp/usr/local/rpm5/__db.Basenames: No such file or directory >> >> >> On Wed, Nov 20, 2013 at 9:17 AM, bishwajit goswami < >> bswjt.callmeb...@gmail.com> wrote: >> >>> Hi, >>> >>> We use Berkley DB 4.8 for some DB transactions. The DB utilities are >>> already exported for Berkley DB 4.8. Berkley 4.8 is also used in our case >>> to link with RPM 4.8. >>> >>> However, we are planning to migrate to RPM 5.1.9. As part of this >>> migration, I am able to compile RPM 5.1.9 externally with Berkley 4.8. I >>> can also use the built rpm for queries etc. >>> >>> The problem comes when I try to install a package with --nodeps and >>> initialize an RPMDB. A snippet is pasted below: >>> >>> [root@bgl-ng-install-vxr1 rpm-5.1.9]# ./rpm -ivh --nodeps --root=/tmp >>> /tmp/cai-pkg-ncs6k-64.rp_lc-5.0.0-Default.x86_64.rpm >>> >>> Preparing...rpmdb: DB_ENV->add_data_dir: method not >>> permitted after handle's open method >>> >>> rpmdb: stat: /tmp/usr/local/rpm5/__db.Basenames: No such file or >>> directory >>> >>> rpmdb: Basenames: No such file or directory >>> >>> error: cannot open Basenames(1117) index using db3 - No such file or >>> directory (2) >>> >>> rpm: rpmdb.c:3693: rpmdbFindFpList: Assertion mi !=3D ((void *)0)' >>> failed. >>> >>> >> style=3D"margin-bottom:0.0001pt;line-height:normal">= >>> Aborted (core dumped) >>> >>> I am not sure what sort of changes would be needed to get >>> th= >>> is working. I looked over the forum but failed to find >>> any p= >>> atches available for RPM 5.1.9 to support external >>> Berkley. >>> >>> Thanks and Regards,Bishwajit Goswami >>> >>> >>> >> >> >> >> -- >> Belenix: www.belenix.org >> > > > > -- > Belenix: www.belenix.org > > -- Bishwajit Goswami Software Engineer, Cisco Systems India Pvt. Lmited Bangalore
rpmdb not updated with installed packages
Hi, I have a partition up and running with a set of RPMs. Now I want to prepare a backup partition with the same set of rpms. The installation goes through properly and the corresponding files are available on the alternate partition. The problem comes when querying the rpmdb of the created partition. The rpmdb do not seem to be updated with all the packages which were installed. A sample snapshot is below: [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$ rpm -ivh --nodeps --root /partprep ncs6k-sysadmin-boot.* Preparing... ## ncs6k-sysadmin-boot.sc ## ncs6k-sysadmin-boot.all ## ncs6k-sysadmin-boot.lc ## ncs6k-sysadmin-boot.rp ## [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$ rpm -qa --root /partprep ncs6k-sysadmin-boot.rp-5.2.0.01I-Default.x86_64 ncs6k-sysadmin-boot.lc-5.2.0.01I-Default.x86_64 [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$ When I check the double verbose output, I simply see that a few packages got remove from addition to corresponding rpmdb files. D: removing "ncs6k-sysadmin-boot.sc" from Name index. D: removing 19 entries from Basenames index. D: removing "Calvados/ncs6k-sysadmin-boot/ncs6k-sysadmin/sc/Default/mandatory/PII Any suggestion would be helpful in this regard. If needed, I could attach the verbose output. Also, the rpmdb do not seem to be corrupt since rpm verification runs smoothly. -- Bishwajit Goswami
Re: rpmdb not updated with installed packages
Hi Jeff, Thanks for looking into this issue. I have looked at the output and I find a few things confusing: While the rpm installation is over a new partition specified by --root, the rpm installation during its flow refers to the current rpmdb for a few databases as below (partition being prepared is /partprep, current rpmdb is available at /rpmdb/lib/rpm): D: opening db index /partprep/rpmdb/lib/rpm/Name create mode=0x42 D: running pre-transaction scripts D: computing 214 file fingerprints D: pool ht: created size 64 limit -1 flags 0 Preparing...D: computing file dispositions D: opening db index * /rpmdb/lib/rpm/Basenames* create mode=0x42 Such databases include: Triggername Group Providename Requirename Dirnames Requireversion Provideversion Installtid,etc. Going by this output, I renamed the current rpmdb and triggered the same command for rpm installation on the new partition. This time, the installation was proper and query returned successfully all the installed rpms. Do let me know the reason for this behavior and if there is a fix available. Regards, Bishwajit On Thu, Dec 12, 2013 at 11:40 PM, Jeffrey Johnson wrote: > > On Dec 12, 2013, at 12:34 PM, bishwajit goswami wrote: > > Hi, > > I have a partition up and running with a set of RPMs. Now I want to > prepare a backup partition with the same set of rpms. The installation goes > through properly and the corresponding files are available on the alternate > partition. > The problem comes when querying the rpmdb of the created partition. The > rpmdb do not seem to be updated with all the packages which were installed. > A sample snapshot is below: > [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$ rpm -ivh --nodeps --root /partprep > ncs6k-sysadmin-boot.* > Preparing... > ## > ncs6k-sysadmin-boot.sc > ## > ncs6k-sysadmin-boot.all > ## > ncs6k-sysadmin-boot.lc > ## > ncs6k-sysadmin-boot.rp > ## > [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$ rpm -qa --root /partprep > ncs6k-sysadmin-boot.rp-5.2.0.01I-Default.x86_64 > ncs6k-sysadmin-boot.lc-5.2.0.01I-Default.x86_64 > [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$ > > When I check the double verbose output, I simply see that a few packages > got remove from addition to corresponding rpmdb files. > D: removing "ncs6k-sysadmin-boot.sc" from Name index. > D: removing 19 entries from Basenames index. > D: removing > "Calvados/ncs6k-sysadmin-boot/ncs6k-sysadmin/sc/Default/mandatory/PII > > Any suggestion would be helpful in this regard. If needed, I could attach > the verbose output. > Also, the rpmdb do not seem to be corrupt since rpm verification runs > smoothly. > > > If you actually used -i (rather than -U), then rpm should _NOT_ have > removed anything. > > The likeliest explanation is that there is an Obsoletes: in some package > that is causing a package to be removed. > > Examine the -vv output ... everything that rpm does is logged in -vv output > (but there isn't enough information to guess the cause from what you > provided). > > 73 de Jeff > > > -- > Bishwajit Goswami > > > -- Bishwajit Goswami Software Engineer, Cisco Systems India Pvt. Lmited Bangalore
Re: rpmdb not updated with installed packages
Hi, This issue I am facing is with rpm-5.1.9. When an installation is tried with --root, the local rpmdb is referred leading to a situation which is similar to an upgrade scenario. This causes the rpmdb to be updated with lesser number of rpms than the number of rpms actually installed. I tried the same operation without --root, but with a different --dbpath to see if local rpmdb gets accessed. I do not see reference to local rpmdb in such a case. Any help in this regard would be appreciated. Thanks and Regards, Bishwajit On Mon, Dec 16, 2013 at 1:00 PM, bishwajit goswami < bswjt.callmeb...@gmail.com> wrote: > Hi Jeff, > > Thanks for looking into this issue. > I have looked at the output and I find a few things confusing: > While the rpm installation is over a new partition specified by --root, > the rpm installation during its flow refers to the current rpmdb for a few > databases as below (partition being prepared is /partprep, current rpmdb is > available at /rpmdb/lib/rpm): > D: opening db index /partprep/rpmdb/lib/rpm/Name create mode=0x42 > D: running pre-transaction scripts > D: computing 214 file fingerprints > D: pool ht: created size 64 limit -1 flags 0 > Preparing...D: computing file dispositions > D: opening db index * /rpmdb/lib/rpm/Basenames* create mode=0x42 > > Such databases include: > Triggername > Group > Providename > Requirename > Dirnames > Requireversion > Provideversion > Installtid,etc. > > Going by this output, I renamed the current rpmdb and triggered the same > command for rpm installation on the new partition. > This time, the installation was proper and query returned successfully all > the installed rpms. > > Do let me know the reason for this behavior and if there is a fix > available. > > Regards, > Bishwajit > > > > On Thu, Dec 12, 2013 at 11:40 PM, Jeffrey Johnson wrote: > >> >> On Dec 12, 2013, at 12:34 PM, bishwajit goswami wrote: >> >> Hi, >> >> I have a partition up and running with a set of RPMs. Now I want to >> prepare a backup partition with the same set of rpms. The installation goes >> through properly and the corresponding files are available on the alternate >> partition. >> The problem comes when querying the rpmdb of the created partition. The >> rpmdb do not seem to be updated with all the packages which were installed. >> A sample snapshot is below: >> [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$ rpm -ivh --nodeps --root /partprep >> ncs6k-sysadmin-boot.* >> Preparing... >> ## >> ncs6k-sysadmin-boot.sc >> ## >> ncs6k-sysadmin-boot.all >> ## >> ncs6k-sysadmin-boot.lc >> ## >> ncs6k-sysadmin-boot.rp >> ## >> [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$ rpm -qa --root /partprep >> ncs6k-sysadmin-boot.rp-5.2.0.01I-Default.x86_64 >> ncs6k-sysadmin-boot.lc-5.2.0.01I-Default.x86_64 >> [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$ >> >> When I check the double verbose output, I simply see that a few packages >> got remove from addition to corresponding rpmdb files. >> D: removing "ncs6k-sysadmin-boot.sc" from Name index. >> D: removing 19 entries from Basenames index. >> D: removing >> "Calvados/ncs6k-sysadmin-boot/ncs6k-sysadmin/sc/Default/mandatory/PII >> >> Any suggestion would be helpful in this regard. If needed, I could attach >> the verbose output. >> Also, the rpmdb do not seem to be corrupt since rpm verification runs >> smoothly. >> >> >> If you actually used -i (rather than -U), then rpm should _NOT_ have >> removed anything. >> >> The likeliest explanation is that there is an Obsoletes: in some package >> that is causing a package to be removed. >> >> Examine the -vv output ... everything that rpm does is logged in -vv >> output >> (but there isn't enough information to guess the cause from what you >> provided). >> >> 73 de Jeff >> >> >> -- >> Bishwajit Goswami >> >> >> > > > -- > Bishwajit Goswami > Software Engineer, > Cisco Systems India Pvt. Lmited > Bangalore > -- Bishwajit Goswami Software Engineer, Cisco Systems India Pvt. Lmited Bangalore
Information on patch available on rpm5
Hi, I was checking on a few rpm patches available. I found patch as below: -#definePLD_CHROOT -#ifdef PLD_CHROOT - if (rpmdb->db_chrootDone) - xx = dbenv->set_data_dir(dbenv, dbhome); -#endif rpmdb->db_opens++; I was not able to figure out the context for which this patch was required. Could someone let me know the issue which needed this patch? Thanks and Regards, Bishwajit