* [PATCH v2] tools: hv: lsvmbus: change shebang to use python3
@ 2024-07-02 10:22 Anthony Nandaa
2024-07-03 16:44 ` Michael Kelley
0 siblings, 1 reply; 3+ messages in thread
From: Anthony Nandaa @ 2024-07-02 10:22 UTC (permalink / raw)
To: linux-hyperv, decui, mhklinux, wei.liu; +Cc: kys, Anthony Nandaa
In many modern Linux distros, running `lsvmbus` returns the error:
```
/usr/bin/env: 'python': No such file or directory
```
because 'python' doesn't point anywhere.
Now that python2 has reached EOL as of January 1, 2020 and is no longer
maintained[1], these distros have python3 instead.
Also, the script isn't executable by default because the permissions are
set to mode 644.
Fix this by updating the shebang in the `lsvmbus` to use python3 instead
of python. Also fix the permissions to be 755 so that is executable by
default, which matches other similar scripts in `tools/hv`.
The script is also tested and verified that is compatible with
python3.
[1] https://www.python.org/doc/sunset-python-2/
Signed-off-by: Anthony Nandaa <profnandaa@gmail.com>
Reviewed-by: Wei Liu <wei.liu@kernel.org>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
---
v2:
* change the commit message body to conform to guidelines.
---
tools/hv/lsvmbus | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
mode change 100644 => 100755 tools/hv/lsvmbus
diff --git a/tools/hv/lsvmbus b/tools/hv/lsvmbus
old mode 100644
new mode 100755
index 55e7374bade0..23dcd8e705be
--- a/tools/hv/lsvmbus
+++ b/tools/hv/lsvmbus
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0
import os
--
2.39.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH v2] tools: hv: lsvmbus: change shebang to use python3
2024-07-02 10:22 [PATCH v2] tools: hv: lsvmbus: change shebang to use python3 Anthony Nandaa
@ 2024-07-03 16:44 ` Michael Kelley
2024-08-03 0:02 ` Wei Liu
0 siblings, 1 reply; 3+ messages in thread
From: Michael Kelley @ 2024-07-03 16:44 UTC (permalink / raw)
To: Anthony Nandaa, linux-hyperv@vger.kernel.org, decui@microsoft.com,
wei.liu@kernel.org
Cc: kys@microsoft.com
From: Anthony Nandaa <profnandaa@gmail.com> Sent: Tuesday, July 2, 2024 3:23 AM
>
> In many modern Linux distros, running `lsvmbus` returns the error:
> ```
> /usr/bin/env: 'python': No such file or directory
> ```
> because 'python' doesn't point anywhere.
>
> Now that python2 has reached EOL as of January 1, 2020 and is no longer
> maintained[1], these distros have python3 instead.
>
> Also, the script isn't executable by default because the permissions are
> set to mode 644.
>
> Fix this by updating the shebang in the `lsvmbus` to use python3 instead
> of python. Also fix the permissions to be 755 so that is executable by
> default, which matches other similar scripts in `tools/hv`.
>
> The script is also tested and verified that is compatible with
> python3.
>
> [1] https://www.python.org/doc/sunset-python-2/
>
> Signed-off-by: Anthony Nandaa <profnandaa@gmail.com>
> Reviewed-by: Wei Liu <wei.liu@kernel.org>
> Reviewed-by: Michael Kelley <mhklinux@outlook.com>
> ---
> v2:
> * change the commit message body to conform to guidelines.
> ---
> tools/hv/lsvmbus | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> mode change 100644 => 100755 tools/hv/lsvmbus
>
> diff --git a/tools/hv/lsvmbus b/tools/hv/lsvmbus
> old mode 100644
> new mode 100755
> index 55e7374bade0..23dcd8e705be
> --- a/tools/hv/lsvmbus
> +++ b/tools/hv/lsvmbus
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python3
> # SPDX-License-Identifier: GPL-2.0
>
> import os
> --
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] tools: hv: lsvmbus: change shebang to use python3
2024-07-03 16:44 ` Michael Kelley
@ 2024-08-03 0:02 ` Wei Liu
0 siblings, 0 replies; 3+ messages in thread
From: Wei Liu @ 2024-08-03 0:02 UTC (permalink / raw)
To: Michael Kelley
Cc: Anthony Nandaa, linux-hyperv@vger.kernel.org, decui@microsoft.com,
wei.liu@kernel.org, kys@microsoft.com
On Wed, Jul 03, 2024 at 04:44:05PM +0000, Michael Kelley wrote:
> From: Anthony Nandaa <profnandaa@gmail.com> Sent: Tuesday, July 2, 2024 3:23 AM
> > Signed-off-by: Anthony Nandaa <profnandaa@gmail.com>
> > Reviewed-by: Michael Kelley <mhklinux@outlook.com>
>
> Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Applied to hyperv-fixes. Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-03 0:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-02 10:22 [PATCH v2] tools: hv: lsvmbus: change shebang to use python3 Anthony Nandaa
2024-07-03 16:44 ` Michael Kelley
2024-08-03 0:02 ` Wei Liu
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).