* Linux 5.11-rc1
[not found] <CA+icZUUQRKuZzN0ZbaG6vprRWcKPKYVYTryiMFac7q_PRcBvgA@mail.gmail.com>
@ 2020-12-28 7:33 ` Sedat Dilek
2020-12-28 8:04 ` Sedat Dilek
1 sibling, 0 replies; 16+ messages in thread
From: Sedat Dilek @ 2020-12-28 7:33 UTC (permalink / raw)
To: linux-kbuild
Grrr, wrong email it should be <linux-kbuild@vger.kernel.org>
- sed@ -
---------- Forwarded message ---------
From: Sedat Dilek <sedat.dilek@gmail.com>
Date: Mon, Dec 28, 2020 at 8:30 AM
Subject: Re: Linux 5.11-rc1
To: Linus Torvalds <torvalds@linux-foundation.org>, Masahiro Yamada
<masahiroy@kernel.org>
Cc: <inux-kbuild@vger.kernel.org>, <linux-kernel@vger.kernel.org>
[ Please CC me I am not subscribed to LKML and linux-kbuild ML ]
Hi Linus, Hi Mashiro,
thanks for the Linux v5.11-rc1 release.
With a new release I always do my first builds with my distro's
default compiler and linker (GCC v10.2.1 and GNU/ld BFD v2.35.1).
( It's approx. 40% faster than LLVM toolchain v11.0.1-rc2 here on
Debian/testing AMD64. )
The only warning I see for the first time (with v5.10.3 not observed):
sh ./scripts/depmod.sh depmod 5.11.0-rc1-1-amd64-gcc10-bfd
Warning: 'make modules_install' requires depmod. Please install it.
This is probably in the kmod package.
The only change I see in this area is:
436e980e2ed5 kbuild: don't hardcode depmod path
depmod from kmod Debian package is placed and I have no /sbin in my
user's path (and not before?):
$ 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, this is a warning, but might confuse other users.
Please, let me know if you need further information and keep me CCed.
Thanks.
Regards,
- Sedat -
[1] https://git.kernel.org/linus/436e980e2ed526832de822cbf13c317a458b78e1
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Linux 5.11-rc1
[not found] <CA+icZUUQRKuZzN0ZbaG6vprRWcKPKYVYTryiMFac7q_PRcBvgA@mail.gmail.com>
2020-12-28 7:33 ` 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
1 sibling, 2 replies; 16+ messages in thread
From: Sedat Dilek @ 2020-12-28 8:04 UTC (permalink / raw)
To: Linus Torvalds, Masahiro Yamada; +Cc: linux-kbuild, linux-kernel
On Mon, Dec 28, 2020 at 8:30 AM Sedat Dilek <sedat.dilek@gmail.com> wrote:
>
> [ Please CC me I am not subscribed to LKML and linux-kbuild ML ]
>
> Hi Linus, Hi Mashiro,
>
> thanks for the Linux v5.11-rc1 release.
>
> With a new release I always do my first builds with my distro's
> default compiler and linker (GCC v10.2.1 and GNU/ld BFD v2.35.1).
> ( It's approx. 40% faster than LLVM toolchain v11.0.1-rc2 here on
> Debian/testing AMD64. )
>
> The only warning I see for the first time (with v5.10.3 not observed):
>
> sh ./scripts/depmod.sh depmod 5.11.0-rc1-1-amd64-gcc10-bfd
> Warning: 'make modules_install' requires depmod. Please install it.
> This is probably in the kmod package.
>
> The only change I see in this area is:
>
> 436e980e2ed5 kbuild: don't hardcode depmod path
>
> depmod from kmod Debian package is placed and I have no /sbin in my
> user's path (and not before?):
>
> $ 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, this is a warning, but might confuse other users.
>
> Please, let me know if you need further information and keep me CCed.
>
> Thanks.
>
> Regards,
> - Sedat -
>
> [1] https://git.kernel.org/linus/436e980e2ed526832de822cbf13c317a458b78e1
[ Correct email-address of linux-kbuild ML ]
This might be distro-specific:
[ /etc/login.defs ]
99:# *REQUIRED* The default PATH settings, for superuser and normal users.
100:#
101:# (they are minimal, add the rest in the shell startup files)
102:ENV_SUPATH
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
103:ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
What is your recommendation?
- Sedat -
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Linux 5.11-rc1
2020-12-28 8:04 ` Sedat Dilek
@ 2020-12-28 15:18 ` Sedat Dilek
2020-12-28 19:40 ` Linus Torvalds
1 sibling, 0 replies; 16+ messages in thread
From: Sedat Dilek @ 2020-12-28 15:18 UTC (permalink / raw)
To: Linus Torvalds, Masahiro Yamada; +Cc: linux-kbuild, linux-kernel
On Mon, Dec 28, 2020 at 9:04 AM Sedat Dilek <sedat.dilek@gmail.com> wrote:
>
> On Mon, Dec 28, 2020 at 8:30 AM Sedat Dilek <sedat.dilek@gmail.com> wrote:
> >
> > [ Please CC me I am not subscribed to LKML and linux-kbuild ML ]
> >
> > Hi Linus, Hi Mashiro,
> >
> > thanks for the Linux v5.11-rc1 release.
> >
> > With a new release I always do my first builds with my distro's
> > default compiler and linker (GCC v10.2.1 and GNU/ld BFD v2.35.1).
> > ( It's approx. 40% faster than LLVM toolchain v11.0.1-rc2 here on
> > Debian/testing AMD64. )
> >
> > The only warning I see for the first time (with v5.10.3 not observed):
> >
> > sh ./scripts/depmod.sh depmod 5.11.0-rc1-1-amd64-gcc10-bfd
> > Warning: 'make modules_install' requires depmod. Please install it.
> > This is probably in the kmod package.
> >
> > The only change I see in this area is:
> >
> > 436e980e2ed5 kbuild: don't hardcode depmod path
> >
> > depmod from kmod Debian package is placed and I have no /sbin in my
> > user's path (and not before?):
> >
> > $ 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, this is a warning, but might confuse other users.
> >
> > Please, let me know if you need further information and keep me CCed.
> >
> > Thanks.
> >
> > Regards,
> > - Sedat -
> >
> > [1] https://git.kernel.org/linus/436e980e2ed526832de822cbf13c317a458b78e1
>
> [ Correct email-address of linux-kbuild ML ]
>
> This might be distro-specific:
>
> [ /etc/login.defs ]
>
> 99:# *REQUIRED* The default PATH settings, for superuser and normal users.
> 100:#
> 101:# (they are minimal, add the rest in the shell startup files)
> 102:ENV_SUPATH
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> 103:ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
>
> What is your recommendation?
>
For now, I reverted the above commit and use DEPMOD="/sbin/depmod".
Can I pass DEPMOD="/sbin/depmod" to my make line to override the
default DEPMOD in the top level Makefile?
- Sedat -
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Linux 5.11-rc1
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
1 sibling, 2 replies; 16+ messages in thread
From: Linus Torvalds @ 2020-12-28 19:40 UTC (permalink / raw)
To: Sedat Dilek
Cc: Masahiro Yamada, Linux Kbuild mailing list,
Linux Kernel Mailing List
On Mon, Dec 28, 2020 at 12:04 AM Sedat Dilek <sedat.dilek@gmail.com> wrote:
>
> > $ 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.
As you noticed, you can fix it with
DEPMOD=/sbin/depmod
or you could just make /sbin part of your PATH.
It looks like on your distro, /sbin is restricted to just the
super-user PATH, which is odd, but I guess there's at least _some_
logic to it.
I guess we could have some compatibility thing in scripts/depmod.sh,
something like
diff --git a/scripts/depmod.sh b/scripts/depmod.sh
index e083bcae343f..a93261207453 100755
--- a/scripts/depmod.sh
+++ b/scripts/depmod.sh
@@ -15,6 +15,8 @@ if ! test -r System.map ; then
exit 0
fi
+# legacy behavior: "depmod" in /sbin
+PATH="$PATH:/sbin"
if [ -z $(command -v $DEPMOD) ]; then
echo "Warning: 'make modules_install' requires $DEPMOD. Please
install it." >&2
echo "This is probably in the kmod package." >&2
or similar. Does that work for you?
Linus
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Linux 5.11-rc1
2020-12-28 19:40 ` Linus Torvalds
@ 2020-12-28 20:05 ` Sedat Dilek
2021-01-01 16:14 ` Pavel Machek
1 sibling, 0 replies; 16+ messages in thread
From: Sedat Dilek @ 2020-12-28 20:05 UTC (permalink / raw)
To: Linus Torvalds
Cc: Masahiro Yamada, Linux Kbuild mailing list,
Linux Kernel Mailing List
On Mon, Dec 28, 2020 at 8:40 PM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Mon, Dec 28, 2020 at 12:04 AM Sedat Dilek <sedat.dilek@gmail.com> wrote:
> >
> > > $ 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.
>
> As you noticed, you can fix it with
>
> DEPMOD=/sbin/depmod
>
> or you could just make /sbin part of your PATH.
>
> It looks like on your distro, /sbin is restricted to just the
> super-user PATH, which is odd, but I guess there's at least _some_
> logic to it.
>
> I guess we could have some compatibility thing in scripts/depmod.sh,
> something like
>
> diff --git a/scripts/depmod.sh b/scripts/depmod.sh
> index e083bcae343f..a93261207453 100755
> --- a/scripts/depmod.sh
> +++ b/scripts/depmod.sh
> @@ -15,6 +15,8 @@ if ! test -r System.map ; then
> exit 0
> fi
>
> +# legacy behavior: "depmod" in /sbin
> +PATH="$PATH:/sbin"
> if [ -z $(command -v $DEPMOD) ]; then
> echo "Warning: 'make modules_install' requires $DEPMOD. Please
> install it." >&2
> echo "This is probably in the kmod package." >&2
>
> or similar. Does that work for you?
>
Looks like it works.
I see:
sh ./scripts/depmod.sh depmod 5.11.0-rc1-2-amd64-clang-ias
But no more a depmod warning.
Will you send a patch or apply this directly?
- Sedat -
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Linux 5.11-rc1
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
1 sibling, 1 reply; 16+ messages in thread
From: Pavel Machek @ 2021-01-01 16:14 UTC (permalink / raw)
To: Linus Torvalds
Cc: Sedat Dilek, Masahiro Yamada, Linux Kbuild mailing list,
Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 618 bytes --]
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?
Best regards,
Pavel
--
http://www.livejournal.com/~pavelmachek
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Linux 5.11-rc1
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
0 siblings, 2 replies; 16+ messages in thread
From: Sedat Dilek @ 2021-01-01 18:55 UTC (permalink / raw)
To: Pavel Machek
Cc: Linus Torvalds, Masahiro Yamada, Linux Kbuild mailing list,
Linux Kernel Mailing List
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Linux 5.11-rc1
2021-01-01 18:55 ` Sedat Dilek
@ 2021-01-01 22:31 ` Sedat Dilek
2021-01-02 7:51 ` Masahiro Yamada
1 sibling, 0 replies; 16+ messages in thread
From: Sedat Dilek @ 2021-01-01 22:31 UTC (permalink / raw)
To: Pavel Machek
Cc: Linus Torvalds, Masahiro Yamada, Linux Kbuild mailing list,
Linux Kernel Mailing List
On Fri, Jan 1, 2021 at 7:55 PM 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
Fixed upstream, see "depmod: handle the case of /sbin/depmod without
/sbin in PATH".
- Sedat -
[1] https://git.kernel.org/linus/cedd1862be7e666be87ec824dabc6a2b05618f36
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Linux 5.11-rc1
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
2021-01-02 15:30 ` Masahiro Yamada
1 sibling, 2 replies; 16+ messages in thread
From: Masahiro Yamada @ 2021-01-02 7:51 UTC (permalink / raw)
To: Sedat Dilek
Cc: Pavel Machek, Linus Torvalds, Linux Kbuild mailing list,
Linux Kernel Mailing List
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.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Linux 5.11-rc1
2021-01-02 7:51 ` Masahiro Yamada
@ 2021-01-02 9:13 ` Sedat Dilek
2021-01-02 11:05 ` Bernd Petrovitsch
2021-01-02 15:30 ` Masahiro Yamada
1 sibling, 1 reply; 16+ messages in thread
From: Sedat Dilek @ 2021-01-02 9:13 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Pavel Machek, Linus Torvalds, Linux Kbuild mailing list,
Linux Kernel Mailing List
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 -
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Linux 5.11-rc1
2021-01-02 9:13 ` Sedat Dilek
@ 2021-01-02 11:05 ` Bernd Petrovitsch
2021-01-02 11:26 ` Sedat Dilek
2021-01-03 17:39 ` David Laight
0 siblings, 2 replies; 16+ messages in thread
From: Bernd Petrovitsch @ 2021-01-02 11:05 UTC (permalink / raw)
To: sedat.dilek, Masahiro Yamada
Cc: Pavel Machek, Linus Torvalds, Linux Kbuild mailing list,
Linux Kernel Mailing List
On Sat, 2021-01-02 at 10:13 +0100, Sedat Dilek wrote:
[...]
> To be honest I wondered why there were no more reports on this.
Perhaps I'm not the only one who has /sbin and /usr/sbin in the
$PATH of normal accounts too (and idk what's the default
behaviour of distributions is - my .bashrc "fixes" the
$PATH).
MfG,
Bernd
--
Bernd Petrovitsch Email : bernd@petrovitsch.priv.at
There is no cloud, just other people computers. - FSFE
LUGA : http://www.luga.at
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Linux 5.11-rc1
2021-01-02 11:05 ` Bernd Petrovitsch
@ 2021-01-02 11:26 ` Sedat Dilek
2021-01-02 11:57 ` Bernd Petrovitsch
2021-01-03 17:39 ` David Laight
1 sibling, 1 reply; 16+ messages in thread
From: Sedat Dilek @ 2021-01-02 11:26 UTC (permalink / raw)
To: Bernd Petrovitsch
Cc: Masahiro Yamada, Pavel Machek, Linus Torvalds,
Linux Kbuild mailing list, Linux Kernel Mailing List
On Sat, Jan 2, 2021 at 12:05 PM Bernd Petrovitsch
<bernd@petrovitsch.priv.at> wrote:
>
> On Sat, 2021-01-02 at 10:13 +0100, Sedat Dilek wrote:
> [...]
> > To be honest I wondered why there were no more reports on this.
>
> Perhaps I'm not the only one who has /sbin and /usr/sbin in the
> $PATH of normal accounts too (and idk what's the default
> behaviour of distributions is - my .bashrc "fixes" the
> $PATH).
>
I was thinking more towards maxim/dictum:
"Never break userspace!" or "It worked before but now it is not."
Think of automated kernel build and test setups based on Debian.
Debian/testing AMD64 has...
[ /etc/login.defs ]
# *REQUIRED* The default PATH settings, for superuser and normal users.
#
# (they are minimal, add the rest in the shell startup files)
ENV_SUPATH
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
IMHO users should not need to fix their environment.
( The discussion is a bit obsolete as we now have a fix. )
- Sedat -
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Linux 5.11-rc1
2021-01-02 11:26 ` Sedat Dilek
@ 2021-01-02 11:57 ` Bernd Petrovitsch
2021-01-02 12:11 ` Sedat Dilek
0 siblings, 1 reply; 16+ messages in thread
From: Bernd Petrovitsch @ 2021-01-02 11:57 UTC (permalink / raw)
To: sedat.dilek
Cc: Masahiro Yamada, Pavel Machek, Linus Torvalds,
Linux Kbuild mailing list, Linux Kernel Mailing List
On Sat, 2021-01-02 at 12:26 +0100, Sedat Dilek wrote:
> On Sat, Jan 2, 2021 at 12:05 PM Bernd Petrovitsch
> <bernd@petrovitsch.priv.at> wrote:
> > On Sat, 2021-01-02 at 10:13 +0100, Sedat Dilek wrote:
> > [...]
> > > To be honest I wondered why there were no more reports on this.
> >
> > Perhaps I'm not the only one who has /sbin and /usr/sbin in the
> > $PATH of normal accounts too (and idk what's the default
> > behaviour of distributions is - my .bashrc "fixes" the
> > $PATH).
>
> I was thinking more towards maxim/dictum:
> "Never break userspace!" or "It worked before but now it is not."
But if userspace changed (and that could be a change by the
distribution which the user isn't aware) than ...
> Think of automated kernel build and test setups based on Debian.
>
> Debian/testing AMD64 has...
OK.
> [ /etc/login.defs ]
>
> # *REQUIRED* The default PATH settings, for superuser and normal users.
> #
> # (they are minimal, add the rest in the shell startup files)
> ENV_SUPATH
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
Well, "minimal" and /usr/local/games:/usr/games ...
/usr/local/* is the next ...
Yes, it's hard for the distribution to "guess" the local admins
habits and policies ....
> IMHO users should not need to fix their environment.
> ( The discussion is a bit obsolete as we now have a fix. )
FWIW, I have no (and don't see any) problems simply appending
/sbin:/usr/sbin to the $PATH in/for the kernel's scripts.
MfG,
Bernd
--
Bernd Petrovitsch Email : bernd@petrovitsch.priv.at
There is no cloud, just other people computers. - FSFE
LUGA : http://www.luga.at
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Linux 5.11-rc1
2021-01-02 11:57 ` Bernd Petrovitsch
@ 2021-01-02 12:11 ` Sedat Dilek
0 siblings, 0 replies; 16+ messages in thread
From: Sedat Dilek @ 2021-01-02 12:11 UTC (permalink / raw)
To: Bernd Petrovitsch
Cc: Masahiro Yamada, Pavel Machek, Linus Torvalds,
Linux Kbuild mailing list, Linux Kernel Mailing List
> > IMHO users should not need to fix their environment.
> > ( The discussion is a bit obsolete as we now have a fix. )
>
> FWIW, I have no (and don't see any) problems simply appending
> /sbin:/usr/sbin to the $PATH in/for the kernel's scripts.
>
Another workaround is to pass DEPMOD=/path/to/depmod in the kernel-build script.
Again, such custom workarounds should not be necessary.
- Sedat -
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Linux 5.11-rc1
2021-01-02 7:51 ` Masahiro Yamada
2021-01-02 9:13 ` Sedat Dilek
@ 2021-01-02 15:30 ` Masahiro Yamada
1 sibling, 0 replies; 16+ messages in thread
From: Masahiro Yamada @ 2021-01-02 15:30 UTC (permalink / raw)
To: Sedat Dilek
Cc: Pavel Machek, Linus Torvalds, Linux Kbuild mailing list,
Linux Kernel Mailing List
On Sat, Jan 2, 2021 at 4:51 PM 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.
I retract this hunk about deb-pkg.
(My test environment in the docker was wrong.)
I tested deb-pkg builds in the full debian installation
in KVM, and confirmed deb-pkg failed to build.
So, 'make deb-pkg' would have broken without
cedd1862be7e6
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: Linux 5.11-rc1
2021-01-02 11:05 ` Bernd Petrovitsch
2021-01-02 11:26 ` Sedat Dilek
@ 2021-01-03 17:39 ` David Laight
1 sibling, 0 replies; 16+ messages in thread
From: David Laight @ 2021-01-03 17:39 UTC (permalink / raw)
To: 'Bernd Petrovitsch', sedat.dilek@gmail.com,
Masahiro Yamada
Cc: Pavel Machek, Linus Torvalds, Linux Kbuild mailing list,
Linux Kernel Mailing List
From: Bernd Petrovitsch
> Sent: 02 January 2021 11:05
>
> On Sat, 2021-01-02 at 10:13 +0100, Sedat Dilek wrote:
> [...]
> > To be honest I wondered why there were no more reports on this.
>
> Perhaps I'm not the only one who has /sbin and /usr/sbin in the
> $PATH of normal accounts too (and idk what's the default
> behaviour of distributions is - my .bashrc "fixes" the
> $PATH).
Yep, I've pretty much always added sbin to my non-root $PATH
for most of the last 30+ years.
Too much stuff that a 'techie' wants to run non-root is in there.
/usr/bin, /usr/sbin and /usr/lib should have got removed once
disks got large enough that the boot disk (aka /) didn't overflow
required some system files be moved into the 'user' disk.
(The last disks that weren't really big enough were the 600MB ones.
The user's home directories could go into /usr where they belong.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2021-01-03 17:41 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CA+icZUUQRKuZzN0ZbaG6vprRWcKPKYVYTryiMFac7q_PRcBvgA@mail.gmail.com>
2020-12-28 7:33 ` 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
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox