Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 318511 - www-client/chromium calls "die" on /dev/shm permissions
Summary: www-client/chromium calls "die" on /dev/shm permissions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Paweł Hajdan, Jr. (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-04 20:49 UTC by cyrillic
Modified: 2010-05-11 11:25 UTC (History)
2 users (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 cyrillic 2010-05-04 20:49:53 UTC
I was not able to reopen bug 299777, but this check should result in a warning only, not a fatal error.

Reproducible: Always

Steps to Reproduce:
1. emerge www-client/chromium in my tinderbox with /dev/shm not mounted
2.
3.

Actual Results:  
Fail

Expected Results:  
Successful compile
Comment 1 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-05-07 08:40:30 UTC
Could you suggest some changes to the ebuild?

I'd prefer to keep the error fatal, because it results in a really broken system, and bogus bug reports.
Comment 2 Harald van Dijk (RETIRED) gentoo-dev 2010-05-08 15:04:52 UTC
As noted in the other bug, missing /dev/shm causes problems at run time, not at build time. So, how about checking for it at run time instead of at build time, by moving the check into a wrapper script? This allows building chromium on a system without /dev/shm mounted, and installing it on a system that does have it, and does not waste compile time for people that accidentally don't have it mounted, since they can just mount it after installation.
Comment 3 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-05-08 16:58:33 UTC
When you post a patch to the launcher script so that it informs the user correctly what's going on when launched from the desktop environment menu (so writing things to the console is not sufficient), I'd be glad to commit that.
Comment 4 Harald van Dijk (RETIRED) gentoo-dev 2010-05-08 18:05:17 UTC
Not in patch format, but using xmessage it would be as simple as

if ! grep -q /dev/shm /proc/mounts; then
  xmessage -file - <<EOF
You don't have tmpfs mounted at /dev/shm.
chromium isn't going to work in that configuration.
Please uncomment the /dev/shm entry in /etc/fstab,
run 'mount /dev/shm' and try again.
EOF
  exit 1
fi
Comment 5 cyrillic 2010-05-09 02:01:06 UTC
(In reply to comment #1)
> Could you suggest some changes to the ebuild?
> 
Yes.
Since baselayout-2 mounts /dev/shm properly without needing an entry in /etc/fstab, this is how I would improve the ebuild.


--- /usr/portage/www-client/chromium/chromium-9999.ebuild	2010-05-05 08:37:10.000000000 -0400
+++ /usr/portage.new/www-client/chromium/chromium-9999.ebuild	2010-05-08 19:41:24.000000000 -0400
@@ -26,6 +26,7 @@
 	media-libs/jpeg:0
 	media-libs/libpng
 	>=media-video/ffmpeg-0.5_p21602[mp3=,threads,x264=]
+	>=sys-apps/baselayout-2
 	sys-libs/zlib
 	>=x11-libs/gtk+-2.14.7
 	x11-libs/libXScrnSaver"
@@ -52,29 +53,6 @@
 		!www-plugins/gecko-mediaplayer[gnome]
 	)"
 
-pkg_setup() {
-	if [[ "${ROOT}" == "/" ]]; then
-		# Prevent user problems like bug 299777.
-		if ! grep -q /dev/shm <<< $(get_mounts); then
-			eerror "You don't have tmpfs mounted at /dev/shm."
-			eerror "${PN} isn't going to work in that configuration."
-			eerror "Please uncomment the /dev/shm entry in /etc/fstab,"
-			eerror "run 'mount /dev/shm' and try again."
-			die "/dev/shm is not mounted"
-		fi
-		if [ `stat -c %a /dev/shm` -ne 1777 ]; then
-			eerror "/dev/shm does not have correct permissions."
-			eerror "${PN} isn't going to work in that configuration."
-			eerror "Please run chmod 1777 /dev/shm and try again."
-			die "/dev/shm has incorrect permissions"
-		fi
-	fi
-
-	elog "${PN} might crash occasionally. To get more useful backtraces"
-	elog "and submit better bug reports, please read"
-	elog "http://www.gentoo.org/proj/en/qa/backtraces.xml"
-}
-
 src_unpack() {
 	subversion_src_unpack
 	mv "${S}" "${WORKDIR}"/depot_tools
Comment 6 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-05-11 11:25:44 UTC
Fixed with a recent bump, thanks truedfx.