From: Sedat Dilek <sedat.dilek@gmail.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Pavel Machek <pavel@ucw.cz>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Linux 5.11-rc1
Date: Sat, 2 Jan 2021 10:13:22 +0100 [thread overview]
Message-ID: <CA+icZUXyfv0sOP=UG6oeoxpHbEpOrufJzzUWb3ZOpE_TMQerwQ@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNASQZ7SWrAykdH71iq6SyLj=gG-EGhCy8SHkDz_bdq2BMw@mail.gmail.com>
On Sat, Jan 2, 2021 at 8:52 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Sat, Jan 2, 2021 at 3:55 AM Sedat Dilek <sedat.dilek@gmail.com> wrote:
> >
> > On Fri, Jan 1, 2021 at 5:14 PM Pavel Machek <pavel@ucw.cz> wrote:
> > >
> > > Hi!
> > > > >
> > > > > > $ dpkg -L kmod | grep bin | grep depmod
> > > > > > /sbin/depmod
> > > > > >
> > > > > > $ which depmod
> > > > > > [ empty ]
> > > > > >
> > > > > > $ echo $PATH
> > > > > > /opt/proxychains-ng/bin:/home/dileks/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
> > > >
> > > > Ok, I think this is a broken setup that has a separate /sbin but does
> > > > not have it in the PATH.
> > >
> > > That's how it is supposed to work, AFAICT. It is so on Debian here,
> > > for example.
> > >
> > > /sbin is for management commands, why would I have it in PATH when
> > > running as normal user?
> > >
> >
> > I am here on Debian/testing AMD64 and waiting for feedback [2].
> >
> > For now I have applied the diff from [1].
> >
> > - Sedat -
> >
> > [1] https://marc.info/?l=linux-kbuild&m=160919738006768&w=2
> > [2] https://marc.info/?l=linux-kernel&m=160919729606750&w=2
>
>
> PATH for the root on Debian is
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
>
>
> depmod is used from 'make module_install'.
>
> For the native module installation to the host machine,
> module_install is run after 'su -'
> or 'sudo', which successfully finds depmod in /sbin.
>
>
> I also tested 'make deb-pkg' with/without
> rootless builds. It also successfully found depmod
> in /sbin, presumably dpkg tools automatically tweak
> PATH env variable.
>
>
> Maybe, the problem is when we run 'make modules_install'
> for cross compilation, which we do not necessarily
> require the root permission.
>
> Users can still adjust PATH in ~/.profile, but
> somebody may think breaking the legacy behavior
> is annoying.
>
> So, after some consideration, the workaround by Linus
> looks good to me.
>
Happy new 2020+1,
Thanks for your feedback Masahiro.
Building a Linux kernel on Debian is mostly done using fakeroot binary
(so I do) - so in the user's (PATH) environment.
I cannot speak for the case of cross-compilation as I never used it in
the last years.
We are in the transition "Xmas -> New year -> Weekend" so a lot of
user's of Debian system will not test and hit the problem.
To be honest I wondered why there were no more reports on this.
With upcoming Sunday/Monday we will have Linux v5.11-rc2 released
which has an elegant solution by restoring common legacy behaviour by
putting "sbin" to the end of "PATH" (search).
Regards,
- Sedat -
next prev parent reply other threads:[~2021-01-02 9:14 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-28 7:30 Linux 5.11-rc1 Sedat Dilek
2020-12-28 8:04 ` Sedat Dilek
2020-12-28 15:18 ` Sedat Dilek
2020-12-28 19:40 ` Linus Torvalds
2020-12-28 20:05 ` Sedat Dilek
2021-01-01 16:14 ` Pavel Machek
2021-01-01 18:55 ` Sedat Dilek
2021-01-01 22:31 ` Sedat Dilek
2021-01-02 7:51 ` Masahiro Yamada
2021-01-02 9:13 ` Sedat Dilek [this message]
2021-01-02 11:05 ` Bernd Petrovitsch
2021-01-02 11:26 ` Sedat Dilek
2021-01-02 11:57 ` Bernd Petrovitsch
2021-01-02 12:11 ` Sedat Dilek
2021-01-03 17:39 ` David Laight
2021-01-02 15:30 ` Masahiro Yamada
2020-12-28 15:25 ` Sedat Dilek
2020-12-28 19:45 ` Linus Torvalds
2020-12-28 20:08 ` Sedat Dilek
-- strict thread matches above, loose matches on Subject: below --
2021-01-02 23:26 Ilkka Prusi
2021-01-03 17:45 ` David Laight
2021-01-04 1:47 ` Adam Borowski
2020-12-28 0:04 Linus Torvalds
2020-12-28 15:51 ` Guenter Roeck
2020-12-28 18:59 ` Linus Torvalds
2020-12-28 19:37 ` Kalesh Singh
2020-12-28 20:02 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+icZUXyfv0sOP=UG6oeoxpHbEpOrufJzzUWb3ZOpE_TMQerwQ@mail.gmail.com' \
--to=sedat.dilek@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=pavel@ucw.cz \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).