Bug 1281606 - /etc/fstab might be missing when installing systemd
Summary: /etc/fstab might be missing when installing systemd
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 23
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2015-11-12 22:05 UTC by an0nym
Modified: 2015-12-17 07:24 UTC (History)
7 users (show)

Fixed In Version: systemd-222-10.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-12-17 07:24:56 UTC
Type: Bug

Attachments (Terms of Use)

Description an0nym 2015-11-12 22:05:45 UTC
Description of problem:
systemd.spec of https://dl.fedoraproject.org/pub/fedora/linux/releases/23/Everything/source/SRPMS/s/systemd-222-7.fc23.src.rpm greps and seds /etc/fstab unconditionally but it might be missing when you install systemd to an empty dir while bootstrapping Fedora. And you will get File not found error. Fortunately it does not break anything.

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

How reproducible:

Steps to Reproduce:
1. mkdir /mnt/fedora23
2. dnf --installroot=/mnt/fedora23 --releasever=23 install fedora-release dnf

Actual results:
no errors

Expected results:
errors while installing systemd
grep: /etc/fstab: No such file or directory
sed: can't read /etc/fstab: No such file or directory

Additional info:
these are the lines of the systemd.spec responsible for the error
# Remove spurious /etc/fstab entries from very old installations
# https://bugzilla.redhat.com/show_bug.cgi?id=1009023
grep -v -E -q '^(devpts|tmpfs|sysfs|proc)' /etc/fstab || \
    sed -i.rpm.bak -r '/^devpts\s+\/dev\/pts\s+devpts\s+defaults\s+/d; /^tmpfs\s+\/dev\/shm\s+tmpfs\s+defaults\s+/d; /^sysfs\s+\/sys\s+sysfs\s+defaults\s+/d; /^proc\s+\/proc\s+proc\s+defaults\s+/d' /etc/fstab || :

Comment 1 Jan Synacek 2015-12-10 09:11:09 UTC
This was fixed in http://pkgs.fedoraproject.org/cgit/systemd.git/commit/?id=49f71b6ae346aac21597e5057715a18885f826b1.

It would be nice to link the commit when moving the bug to POST.

Comment 2 Fedora Update System 2015-12-14 12:29:18 UTC
systemd-222-10.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-76fc543765

Comment 3 Fedora Update System 2015-12-15 10:54:45 UTC
systemd-222-10.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update systemd'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-76fc543765

Comment 4 Fedora Update System 2015-12-17 07:24:01 UTC
systemd-222-10.fc23 has been pushed to the Fedora 23 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.