Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 723208 - app-emulation/lxd-4.0.1 - build-error - permission denied checking /dev/zfs on configure
Summary: app-emulation/lxd-4.0.1 - build-error - permission denied checking /dev/zfs o...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-15 07:41 UTC by Hoess
Modified: 2020-05-15 10:09 UTC (History)
0 users

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 Hoess 2020-05-15 07:41:46 UTC
On trying to emerge lxd-4.0.1 I get the following error during the configure run:

----
[...]
checking for zfs... yes
 * ACCESS DENIED:  open_wr:      /dev/zfs
[...]

 * --------------------------- ACCESS VIOLATION SUMMARY 
 * LOG FILE: "/var/tmp/portage/app-emulation/lxd-4.0.1/temp/sandbox.log"
 *
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: open_wr
S: deny
P: /dev/zfs
A: /dev/zfs
R: /dev/zfs
C: zfs version
 * ---------------------------------------------------

>>> Failed to emerge app-emulation/lxd-4.0.1
---

While investigating I found in the lxd-3.16-ebuild was
a workaround in src_prepare.
----
[...]
        # Workaround for " * ACCESS DENIED:  open_wr:      /dev/zfs"
        sed -i 's#zfs version | cut -f 2#< /sys/module/zfs/version cut -f 1#' configure.ac || die "Can't sed configure.ac for raft"
[...]
---

This workaround is no longer in 4.0.1. Perhaps this is the cause.
Comment 1 Larry the Git Cow gentoo-dev 2020-05-15 08:30:51 UTC
The bug has been closed via the following commit(s):

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

commit 5d2b71f562ab76e38974cb928567b3acd12d795c
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2020-05-15 08:30:19 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-05-15 08:30:42 +0000

    app-emulation/lxd: copy zfs fix from 3.16 ebuild to 4 LTS
    
    Closes: https://bugs.gentoo.org/723208
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 app-emulation/lxd/lxd-4.0.1.ebuild | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Comment 2 Hoess 2020-05-15 08:38:40 UTC
I think the sed needs to be update like this for 4.0.1

---
sed -i 's#zfs version 2>/dev/null | cut -f 2 -d - | head -1#< /sys/module/zfs/version cut -f 1#' configure.ac || die "Can't sed configure.ac for raft"
--

just got a clean compile using this line, version.
Comment 3 Larry the Git Cow gentoo-dev 2020-05-15 08:57:53 UTC
The bug has been closed via the following commit(s):

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

commit bd9a21c94f79536ee7feb436db238b234b197ff7
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2020-05-15 08:57:06 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-05-15 08:57:06 +0000

    app-emulation/lxd: update zfs fix line per feedback on bug 723208
    
     - straight copypaste from the bug (I don't have zfs to test on).
    
    Closes: https://bugs.gentoo.org/723208
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 app-emulation/lxd/lxd-4.0.1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 4 Joonas Niilola gentoo-dev 2020-05-15 08:59:08 UTC
Thanks, I knew this was going to be a work-in-progress because I cleaned the ebuild a bit, and don't have zfs to test with.

Hopefully it's fine now.
Comment 5 Hoess 2020-05-15 10:09:00 UTC
I just re-emerged lxd with your latest changes on my ZFS-machine to re-verify. 

Also checked if it is really using -DRAFT_HAVE_ZFS_WITH_DIRECT_IO=1 during compile, as it should do so on my machine).

Everything worked, so all fine now :-)