Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 430382 - /lib64/rc/cache write assumed
Summary: /lib64/rc/cache write assumed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 417391
  Show dependency tree
 
Reported: 2012-08-08 03:32 UTC by Walter
Modified: 2012-09-10 19:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Walter 2012-08-08 03:32:37 UTC
In the case of a read-only root (such as diskless boot with NFS, as on a cluster I am building) the apparent assumption of write to /lib64/rc/cache is spurious.

Assumption lives in the file init.d/savecache.in

Similar to the test against clock skew, a test for write could be performed similarly to the following (not tested).

# check if either:
#  - cache file exists and is writable
#  - cache file doesn't exist, but $RC_LIBEXECDIR exists and is writable
if [ -w "$RC_LIBEXECDIR"/cache || [ ! -e "$RC_LIBEXECDIR"/cache && -w "$RC_LIBEXECDIR" ] ]; then
 # ... existing code here
else
 eerror "Not saving deptree cache"
 return 1
fi
Comment 1 William Hubbs gentoo-dev 2012-09-08 00:28:40 UTC
A fix for this has been implemented in commit a087744.
Comment 2 Dennis Schridde 2012-09-10 19:05:29 UTC
Same issue might exist for other directories, too:
https://bugzilla.redhat.com/show_bug.cgi?id=537969#c17

I got several messages similar to:
mkdir `/lib64/rc/init.d/starting': Read-only file system

I do not remember the OpenRC version, though. Probably the latest ppc64 or ~ppc64 version.