Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 633360 - sys-apps/baselayout - Improve /run tmpfs warning detection
Summary: sys-apps/baselayout - Improve /run tmpfs warning detection
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-03 09:35 UTC by Giorgio Premi
Modified: 2017-10-03 22:12 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 Giorgio Premi 2017-10-03 09:35:07 UTC
Hi all,
    I just upgraded to `sys-apps/baselayout-2.4.1-r2` and noticed this big warning:

 * You should reboot the system now to get /run mounted with tmpfs!

Since I know my /run is in tmpfs I digged into baselayout-2.4.1-r2.ebuild and found the following code:

        # https://bugs.gentoo.org/361349
        if use kernel_linux; then
                mkdir -p "${EROOT}"run

                if ! grep -qs "^tmpfs.*/run " "${ROOT}"proc/mounts ; then
                        echo
                        ewarn "You should reboot the system now to get /run mounted with tmpfs!"
                fi
        fi

This make sense, but the regexp is incorrect, since in /proc/mount the filesystem is specified after the mountpoint. The preceding "label" just happen to be tmpfs, and in my case is "none", another common way of labelling.

I think is enough to change grep to:

        if ! grep -qs "/run\s\+tmpfs" "${ROOT}"proc/mounts ; then
Comment 1 William Hubbs gentoo-dev 2017-10-03 17:59:49 UTC
You are correct that this was an issue. However, I found a way to check
that I feel is more precise and doesn't spawn the grep process. This is
fixed in this commit:

https://gitweb.gentoo.org/repo/gentoo.git/commit?id=73187892e3b
Comment 2 Giorgio Premi 2017-10-03 22:12:34 UTC
Looks great to me. Thanks!