Gentoo Archives: gentoo-soc

From: Rich Freeman <rich0@g.o>
To: gentoo-soc@l.g.o
Subject: Re: [gentoo-soc] zfs-kmod was Application for Google Summer of Code 2018-Mishal Roy
Date: Fri, 23 Mar 2018 14:50:59
Message-Id: CAGfcS_kXay+SQyoLUqsjWJwg7MbaeepzX7jrQ2c2a2pV+WWowg@mail.gmail.com
1 On Fri, Mar 23, 2018 at 9:49 AM, EBo <ebo@×××××××.com> wrote:
2 > On Mar 23 2018 7:37 AM, Rich Freeman wrote:
3 >>
4 >> On Fri, Mar 23, 2018 at 2:50 AM, Patrick Lauer <patrick@g.o> wrote:
5 >>>
6 >>>
7 >>> https://github.com/adjust/gentoo-overlay/tree/master/sys-kernel
8 >>>
9 >>> This just needs to be cleaned up a bit to be upstreamed, and so far I've
10 >>> not had the time for it.
11 >>>
12 >>> It's a solved problem (I'm aware of at least two other ebuilds to do the
13 >>> same) :)
14 >>>
15 >>
16 >> Yeah, that is certainly one approach. Part of me thinks that
17 >> modularizing the initramfs portion would be ideal, and as Benda
18 >> suggested making it possible to install the built sources might be
19 >> useful (if doing so one would need to patch the file that points to
20 >> the build location so that future module builds can find them). This
21 >> particular ebuild uses sources in /usr/src but I think it would be
22 >> cleaner to just fetch these into the build directory.
23 >>
24 >> The package I find most frustrating is zfs-kmod, because it needs
25 >> fully-built sources and not just prepared sources. I build to a
26 >> tmpfs, and re-creating prepared sources using that approach is
27 >> trivial, but doing a full rebuild just to update zfs modules is a bit
28 >> painful (granted, less so now that I have 12 cores). I've been too
29 >> lazy to figure out why zfs needs them...
30 >
31 > In the past I have had zfs-kmod seriously break my kernel builds. Cleaning
32 > that up to be consistent would probably be useful to the general community
33 > as a whole IMNSHO. Isn't there a way to set the build and install
34 > directories from some env variable?
35
36 Can you elaborate as to what exactly happened? I wouldn't think that
37 zfs-kmod could touch your kernel sources due to the sandbox since it
38 is built using portage. A quick check shows that all the files it
39 installs seem unlikely to collide with anything you should already
40 have.
41
42 When you're building a kernel you can certainly direct its output, but
43 that is before zfs-kmod even enters into things. I typically do this
44 with something like:
45 cd /usr/src/linux
46 make O=/var/tmp/linux oldconfig (and so on)
47
48 Then if you emerge zfs-kmod it would use the kernel sources in
49 /usr/src/linux and build output in /var/tmp/linux to do its own build,
50 assuming both still exist.
51
52 --
53 Rich

Replies