From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.0.4-1.3.1 Firefox/1.0.4 Description of problem: rpm --initdb error: can't create transaction lock as non-root user. Version-Release number of selected component (if applicable): RPM version 4.3.2 How reproducible: Always Steps to Reproduce: 1. setup ~/.rpmmacros as non-root user and set %_topdir, %_tmppath and %_dbpath. 2. Create correct directory structure under %_topdir. 3. run rpm --initdb Actual Results: error: can't create transaction lock Expected Results: Initiate rpm database. Additional info: Works on Red Hat Enterprise Linux WS release 3 (Taroon Update 5) with rpm-4.2.3-21_nonptl using same setup.
So this did use to work under RH9, and is important functionality for those of use who have centrally managed machines for which we don't have root access. It's still valuable to be able to do private rpm installs, and using your own dbpath used to allow that.
The path to the file is configurable: %_rpmlock_path %{_dbpath}/__db.000 in rpm-4.4.2. Reconfigure, put the file in a directory where you have permission to create a write the path used for fcntl locking.