Quote of the week
So anybody who builds the kernel as root is doing something seriously wrong, in my opinion.
Posted Apr 25, 2019 15:02 UTC (Thu)
by nix (subscriber, #2304)
[Link] (4 responses)
(I note that Meson has added more madness here: it runs gtk-doc, which means xsltproc and God knows what else, as root...)
Posted Apr 25, 2019 15:26 UTC (Thu)
by mathstuf (subscriber, #69389)
[Link] (1 responses)
Is that really Meson's fault or is it more on the GTK Meson input rules that are only attached to the `install` target? Granted, running ninja itself has some issues as root[1]. However, personally, I almost never do a `sudo make install` anyways since I install software like ports into my home directory (and it needs added to PATH and friends manually). The system is managed by the package manager. I manage my home directory.
Posted Apr 26, 2019 11:48 UTC (Fri)
by nix (subscriber, #2304)
[Link]
And things like CPAN.pm and pip and gem make this even harder :/
Posted Apr 27, 2019 21:37 UTC (Sat)
by ballombe (subscriber, #9523)
[Link] (1 responses)
Posted Apr 29, 2019 13:20 UTC (Mon)
by mathstuf (subscriber, #69389)
[Link]
Posted Apr 25, 2019 20:14 UTC (Thu)
by flussence (guest, #85566)
[Link] (3 responses)
Quick primer for anyone not familiar with building the kernel the Right Way™: where - After running this line (it only needs to be done once), DESTDIR will contain a proxy Makefile that recognises all the usual kernel commands, and you can build a kernel in there as an unprivileged user. If you set the It seems easy once you know it's there, but the hardest part is to go from not knowing to knowing. The help output does mention
Posted May 25, 2019 7:23 UTC (Sat)
by mcortese (guest, #52099)
[Link] (1 responses)
$ cd where/the/kernel/source/is
Never used -C or O=
Perhaps you are trying to address a special case, like keeping the source in a central root-owned dir but allowing non-root users to compile their version?
Posted May 25, 2019 15:34 UTC (Sat)
by mathstuf (subscriber, #69389)
[Link]
Posted May 26, 2019 0:59 UTC (Sun)
by pabs (subscriber, #43278)
[Link]
make -f /usr/src/linux/Makefile
Quote of the week
Quote of the week
Quote of the week
Is that really Meson's fault or is it more on the GTK Meson input rules that are only attached to the `install` target?
Oh, almost certainly the latter -- but last I checked this stuff was managed by a plugin that was actually part of the Meson source tree, so it's Meson's doing in any case. :)
However, personally, I almost never do a `sudo make install` anyways since I install software like ports into my home directory (and it needs added to PATH and friends manually). The system is managed by the package manager. I manage my home directory.
Even if you're using a package manager, you should still be doing make install DESTDIR=... as non-root and doing a final, non-customizable-by-the-package-itself install phase of some kind as root (rpm installation, grafting, stowing, whatever, and the usual rebuilding of systemwide caches like fontconfig, mime-install, ldconfig etc as needed). However, this can lead to extra complexity and the need for either per-package customization work or some sort of LD_PRELOAD interposer like fakeroot if make install installs things with unusual ownerships or permissions, as some still do.
libtool and root
libtool and root
Quote of the week
make -C [SRCDIR] O=[DESTDIR] [TARGET]
/usr/src/linux
;~/kbuild
; will be created if missing);
oldconfig
).KBUILD_OUTPUT
env var to point to this location, you can even convince your package manager to build out-of-tree modules against it — all while having no write access to the source or object directories.make O=dir
but it's not obvious that that's the magic word.Quote of the week
$ make TARGET
Quote of the week
Quote of the week