Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 401127 - media-gfx/splashutils-1.5.4.4 destroys /etc/mtab symlink
Summary: media-gfx/splashutils-1.5.4.4 destroys /etc/mtab symlink
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michal Januszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-28 04:51 UTC by Maxim Kammerer
Modified: 2013-01-01 22:14 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 Maxim Kammerer 2012-01-28 04:51:22 UTC
If /etc/mtab is a symlink to /proc/self/mounts, splashutils destroys it. Apparently, the culprit is here:

  splashutils-1.5.4.4/src/libfbsplash.c: system("/bin/sed -i -e '\\#"FBSPLASH_CACHEDIR"# d' /etc/mtab");

In addition, the following line:

  splashutils-1.5.4.4/scripts/splash-functions.sh.in: [ -w /etc/mtab ] || mntopt="-n"

works for a symlink, but won't work for an actual read-only /etc if /bin/sh is dash. /usr/bin/test -w will work, but it's in /usr. However, I would say that not having non-symlink /etc/mtab on read-only /etc is user's responsibility.
Comment 1 Maxim Kammerer 2012-01-28 16:48:01 UTC
Addition: newer OpenRC (in git) apparently has checkpath -W to properly check for a writable filesystem.
Comment 2 Maxim Kammerer 2012-02-16 15:46:37 UTC
The following ebuild patch fixes the issue for me:

--- /usr/portage/media-gfx/splashutils/splashutils-1.5.4.4.ebuild	2012-02-07 22:06:35.000000000 +0000
+++ /usr/portage/media-gfx/splashutils/splashutils-1.5.4.4.ebuild.new	2012-02-07 22:05:51.000000000 +0000
@@ -82,6 +82,7 @@
 
 	cd "${S}"
 	ln -sf "${S}/src" "${WORKDIR}/core"
+	sed -i '\:/etc/mtab\>:d' "${S}"/src/libfbsplash.c
 
 	if ! tc-is-cross-compiler && \
 	   has_version "sys-devel/gcc:$(gcc-version)[vanilla]" ; then
Comment 3 Maxim Kammerer 2012-07-08 20:53:59 UTC
Hi, I don't use splashutils anymore, so feel free to resolve upstream, unless someone else is willing to support resolution.