Bug 735645 - readonly-root rwtab fail to copy directory contents for dirs directive
Summary: readonly-root rwtab fail to copy directory contents for dirs directive
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 15
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-04 14:35 UTC by John L Magee
Modified: 2014-03-17 03:28 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-07 17:30:10 UTC


Attachments (Terms of Use)

Description John L Magee 2011-09-04 14:35:05 UTC
Description of problem:
The  find... | cpio... line in the following routine from /lib/systemd/fedora-readonly does not copy the contents of the directory as specified for the dirs directive of rwtab,

	mount_dirs() {
		if [ -e "$1" ]; then
			mkdir -p "$RW_MOUNT$1"
			find "$1" -type d -print0 | cpio -p -0vd "$RW_MOUNT" &>/dev/null
			mount -n --bind "$RW_MOUNT$1" "$1"
		fi
	}


Version-Release number of selected component (if applicable):
AFAICT, this has not worked since it was introduced around RHEL 5.2. There was a comment #fixme find fails in earlier versions of rc.sysinit

How reproducible:
run the following commands and note that there are no data files in the first tree but there  are files in the second. The fix could be a simple as the changing the -type d to -depth in the find but the root issue could be that cpio  does not copy directory contents as described in its man page.

rm -rf cpiotest
rm -rf /tmp/cpiotest
mkdir cpiotest
mkdir cpiotest/one
mkdir cpiotest/two
mkdir cpiotest/two/a
mkdir cpiotest/three
mkdir cpiotest/three/c
mkdir cpiotest/three/d
touch cpiotest/one/data001
touch cpiotest/one/data002
touch cpiotest/two/a/data003
touch cpiotest/three/d/data004
find cpiotest -type d -print0 | cpio -p -0vd /tmp/
tree /tmp/cpiotest/
find cpiotest -depth -print0 | cpio -p -0vd /tmp/
tree /tmp/cpiotest/


Additional info:  Filed under systemd because I thought it might get some attention.

Comment 1 Fedora End Of Life 2012-08-07 17:30:13 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


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