Gentoo Archives: gentoo-soc

From: EBo <ebo@×××××××.com>
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 15:20:32
Message-Id: 0dee7966f918715e43a2cb0edaf487fd@mail.swcp.com
In Reply to: Re: [gentoo-soc] zfs-kmod was Application for Google Summer of Code 2018-Mishal Roy by Rich Freeman
1 On Mar 23 2018 8:50 AM, Rich Freeman wrote:
2 > On Fri, Mar 23, 2018 at 9:49 AM, EBo <ebo@×××××××.com> wrote:
3 >> On Mar 23 2018 7:37 AM, Rich Freeman wrote:
4 >>>
5 >>> On Fri, Mar 23, 2018 at 2:50 AM, Patrick Lauer <patrick@g.o>
6 >>> wrote:
7 >>>>
8 >>>>
9 >>>> https://github.com/adjust/gentoo-overlay/tree/master/sys-kernel
10 >>>>
11 >>>> This just needs to be cleaned up a bit to be upstreamed, and so
12 >>>> far I've
13 >>>> not had the time for it.
14 >>>>
15 >>>> It's a solved problem (I'm aware of at least two other ebuilds to
16 >>>> do the
17 >>>> same) :)
18 >>>>
19 >>>
20 >>> Yeah, that is certainly one approach. Part of me thinks that
21 >>> modularizing the initramfs portion would be ideal, and as Benda
22 >>> suggested making it possible to install the built sources might be
23 >>> useful (if doing so one would need to patch the file that points to
24 >>> the build location so that future module builds can find them).
25 >>> This
26 >>> particular ebuild uses sources in /usr/src but I think it would be
27 >>> cleaner to just fetch these into the build directory.
28 >>>
29 >>> The package I find most frustrating is zfs-kmod, because it needs
30 >>> fully-built sources and not just prepared sources. I build to a
31 >>> tmpfs, and re-creating prepared sources using that approach is
32 >>> trivial, but doing a full rebuild just to update zfs modules is a
33 >>> bit
34 >>> painful (granted, less so now that I have 12 cores). I've been too
35 >>> lazy to figure out why zfs needs them...
36 >>
37 >> In the past I have had zfs-kmod seriously break my kernel builds.
38 >> Cleaning
39 >> that up to be consistent would probably be useful to the general
40 >> community
41 >> as a whole IMNSHO. Isn't there a way to set the build and install
42 >> directories from some env variable?
43 >
44 > Can you elaborate as to what exactly happened? I wouldn't think that
45 > zfs-kmod could touch your kernel sources due to the sandbox since it
46 > is built using portage. A quick check shows that all the files it
47 > installs seem unlikely to collide with anything you should already
48 > have.
49 >
50 > When you're building a kernel you can certainly direct its output,
51 > but
52 > that is before zfs-kmod even enters into things. I typically do this
53 > with something like:
54 > cd /usr/src/linux
55 > make O=/var/tmp/linux oldconfig (and so on)
56 >
57 > Then if you emerge zfs-kmod it would use the kernel sources in
58 > /usr/src/linux and build output in /var/tmp/linux to do its own
59 > build,
60 > assuming both still exist.
61
62 It has been quite some time since this has happened (I seem to remember
63 removing zfs from that machine due to the headaches, but I would have to
64 check as it is possible that someone just fixed it and it now works),
65 but as I recall every time that I built a new kernel with genkernel that
66 it then runs 'emerge @module-rebuild' automatically before the install.
67 If that fails due to some conflict or dependency, then everything gets
68 jammed up. Yes, if you are building the kernel by hand, then you *may*
69 be able to ignore a broken module, but as I recall in those instances it
70 would not finish the build and install.
71
72 At this point I would have to try to replicate the scenario. I still
73 have that machine around and could do this, but the timing is a bit bad
74 for me. Do let me know if you need this replicated and give me some
75 time lines so that I can figure out if I can do this by the time you
76 need.
77
78 Thanks and best regards,
79
80 EBo --