Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 795285 - sys-fs/static-dev check for devtmpfs seems to be wrong?
Summary: sys-fs/static-dev check for devtmpfs seems to be wrong?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-10 20:45 UTC by Krzysztof Olędzki
Modified: 2021-06-10 21:02 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 Krzysztof Olędzki 2021-06-10 20:45:27 UTC
I have only devtmpfs in one of my systems (no udev, devfs). My expectation is that with devtmpfs, there is no need for any dev-manager, please correct me if I'm wrong?

I noticed that it is still possible to install sys-fs/static-dev there that overwrites some files in /dev, despite the check:

    # We also want to not clobber newer devtmpfs setups.
    if [[ ${ROOT} == "/" ]] && \
       ! awk '$2 == "/dev" && $3 == "devtmpfs" { exit 1 }' /proc/mounts ; then
        abort
    fi

I wonder if instead of ${ROOT} == "/", we should be checking for ${ROOT} == "", as I think $ROOT expected to be empty?


This code has been present since its initial commit: https://gitweb.gentoo.org/repo/gentoo.git/commit/sys-fs/static-dev/static-dev-0.1.ebuild?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-06-10 21:01:08 UTC
You're right, that's a remnant from pre-EAPI 7! On it.
Comment 2 Larry the Git Cow gentoo-dev 2021-06-10 21:02:49 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca38032064b6bbcf36604e5c0421eac7533a0243

commit ca38032064b6bbcf36604e5c0421eac7533a0243
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-06-10 21:02:28 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-06-10 21:02:39 +0000

    sys-fs/static-dev: fix ROOT check for EAPI 7
    
    Closes: https://bugs.gentoo.org/795285
    Signed-off-by: Sam James <sam@gentoo.org>

 .../static-dev/{static-dev-0.1-r1.ebuild => static-dev-0.1-r2.ebuild}   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)