Bug 256681 - localhost entry required in /etc/hosts
Summary: localhost entry required in /etc/hosts
Alias: None
Product: Fedora Hosted Projects
Classification: Retired
Component: mock   
(Show other bugs)
Version: unspecified
Hardware: All
OS: All
Target Milestone: ---
Assignee: Clark Williams
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2007-08-27 15:13 UTC by BJ Dierkes
Modified: 2013-01-10 04:24 UTC (History)
3 users (show)

Fixed In Version: 0.9.7-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-03-07 20:31:56 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to create /etc/hosts with a localhost entry. (614 bytes, patch)
2007-08-27 15:13 UTC, BJ Dierkes
no flags Details | Diff

Description BJ Dierkes 2007-08-27 15:13:36 UTC
Description of problem:

No /etc/hosts file created.

Version-Release number of selected component (if applicable):


How reproducible:

Perform anything that needs to 'init' a build root.

Steps to Reproduce:
1. mock -r<config> init

Actual results:

No /etc/hosts file created.

Expected results:

/etc/hosts file created, with atleast an entry for localhost.

Additional info:

This is a minor change, however certain build require localhost to resolve to  For example, MySQL test suites run a MySQL instance running on
localhost.  If 'localhost' does not resolve (meaning, there is no entry in
/etc/hosts for it) then the test cases fail.

Comment 1 BJ Dierkes 2007-08-27 15:13:36 UTC
Created attachment 173761 [details]
Patch to create /etc/hosts with a localhost entry.

Comment 2 Tuomo Soini 2007-09-09 19:20:19 UTC
I'd suggest copying system /etc/hosts file into mock chroot instead of
generating new one.

Comment 3 Clark Williams 2008-03-07 20:31:56 UTC
the current version of mock creates a default hosts file with localhost entry.
If you want to use a copy of the system hosts file, you can create a chroot then
use the --copyin function to overwrite the default.

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