Bug 975858 - dnf can't install in an empty installroot
dnf can't install in an empty installroot
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ales Kozumplik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-19 09:25 EDT by Harald Hoyer
Modified: 2014-09-30 19:41 EDT (History)
4 users (show)

See Also:
Fixed In Version: libsolv-0.3.0-5.git228d412.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-30 21:37:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Harald Hoyer 2013-06-19 09:25:26 EDT
$ mkdir container
$ sudo dnf -y --releasever=19 --nogpg --installroot=$(pwd)/container --disablerepo='*' --enablerepo=fedora install filesystem 
Config Error: No such file or directory: '/home/harald/git/fedora/filesystem/container/var/log/dnf.log'

$ mkdir -p container/var/log
$ sudo dnf -y --releasever=19 --nogpg --installroot=$(pwd)/container --disablerepo='*' --enablerepo=fedora install filesystem
mkdir: cannot create directory ‘container’: File exists
load_system_repo() failed.
Comment 1 Kay Sievers 2013-06-19 09:31:40 EDT
Note:
Things in general must be *very* careful when creating anything in the empty
and fresh root directory.

The filesystem.rpm sets up a couple of symlinks to directories, blindly
creating real directories instead of symlinks here will break setups.
Comment 2 Ales Kozumplik 2013-06-19 10:13:22 EDT
(In reply to Kay Sievers from comment #1)
> Note:
> Things in general must be *very* careful when creating anything in the empty
> and fresh root directory.

Kay, can you be more specific? DNF needs at least to put the .pid files somewhere, the logs, the metadata cache and the yumdb. Right now it's:

/var/run/dnf.pid
/var/log/dnf*log
/var/cache/dnf/
/var/lib/dnf/yumdb/

How should DNF ideally place these? 

Also, it is definitely not possible to wait until the filelist RPM is installed (it might not even be a part of the transaction and we need the cache dir before even downloading any RPMs).
Comment 3 Harald Hoyer 2013-06-19 10:34:48 EDT
/var/run/dnf.pid -> /run/dnf.pid
Comment 4 Kay Sievers 2013-06-19 10:40:41 EDT
(In reply to Harald Hoyer from comment #3)
> /var/run/dnf.pid -> /run/dnf.pid

This should be safe for now, for the current status quo, yes.

But the whole approach to place things into deeper-level subdirs in an
empty / before filesystem.rpm is installed is just a recipe for future
problems. :)
I guess we need some general solution to that problem, I'm confident
other tools or future changes will run into the same problem again.
Comment 5 Ales Kozumplik 2013-06-21 09:21:45 EDT
fixed by ae1e78f, included in dnf-0.3.8.
Comment 6 Fedora Update System 2013-06-24 09:25:57 EDT
libsolv-0.3.0-5.git228d412.fc19, librepo-0.0.4-2.fc19, hawkey-0.3.14-1.git78b3aa0.fc19, dnf-0.3.8-2.git85524ae.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/libsolv-0.3.0-5.git228d412.fc19,dnf-0.3.8-2.git85524ae.fc19,hawkey-0.3.14-1.git78b3aa0.fc19,librepo-0.0.4-2.fc19
Comment 7 Fedora Update System 2013-06-24 14:50:25 EDT
Package libsolv-0.3.0-5.git228d412.fc19, librepo-0.0.4-2.fc19, hawkey-0.3.14-1.git78b3aa0.fc19, dnf-0.3.8-2.git85524ae.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libsolv-0.3.0-5.git228d412.fc19 librepo-0.0.4-2.fc19 hawkey-0.3.14-1.git78b3aa0.fc19 dnf-0.3.8-2.git85524ae.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-11602/libsolv-0.3.0-5.git228d412.fc19,dnf-0.3.8-2.git85524ae.fc19,hawkey-0.3.14-1.git78b3aa0.fc19,librepo-0.0.4-2.fc19
then log in and leave karma (feedback).
Comment 8 Fedora Update System 2013-06-30 21:37:41 EDT
libsolv-0.3.0-5.git228d412.fc19, librepo-0.0.4-2.fc19, hawkey-0.3.14-1.git78b3aa0.fc19, dnf-0.3.8-2.git85524ae.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.