Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts/enum-extract.pl should not hard code perl path #14012

Merged
merged 1 commit into from Oct 11, 2022

Conversation

ryao
Copy link
Contributor

@ryao ryao commented Oct 10, 2022

Motivation and Context

This is a portability issue. The issue had already been fixed for scripts/cstyle.pl by 2dbf1bf. scripts/enum-extract.pl was added to the repository the following year without this portability fix.

Michael Bishop informed me that this broke his attempt to build ZFS 2.1.6 on NixOS, since he was building manually outside of their package manager (that usually rewrites the shebangs to NixOS' unusual paths). NixOS puts all of the paths into $PATH, so scripts that portably rely on env to find the interpreter still work.

Description

Corrected shebang. Also, dropped -w flag since the non-deprecated use warnings is already in use.

How Has This Been Tested?

No testing is needed, but the buildbot will test it anyway.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

This is a portability issue. The issue had already been fixed for
scripts/cstyle.pl by 2dbf1bf.
scripts/enum-extract.pl was added to the repository the following year
without this portability fix.

Michael Bishop informed me that this broke his attempt to build ZFS
2.1.6 on NixOS, since he was building manually outside of their package
manager (that usually rewrites the shebangs to NixOS' unusual paths).
NixOS puts all of the paths into $PATH, so scripts that portably rely
on env to find the interpreter still work.

Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
@ghost ghost added the Status: Accepted Ready to integrate (reviewed, tested) label Oct 11, 2022
@behlendorf behlendorf merged commit bfaa1d9 into openzfs:master Oct 11, 2022
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Oct 12, 2022
This is a portability issue. The issue had already been fixed for
scripts/cstyle.pl by 2dbf1bf.
scripts/enum-extract.pl was added to the repository the following year
without this portability fix.

Michael Bishop informed me that this broke his attempt to build ZFS
2.1.6 on NixOS, since he was building manually outside of their package
manager (that usually rewrites the shebangs to NixOS' unusual paths).
NixOS puts all of the paths into $PATH, so scripts that portably rely
on env to find the interpreter still work.

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> 
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes openzfs#14012
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Nov 23, 2022
This is a portability issue. The issue had already been fixed for
scripts/cstyle.pl by 2dbf1bf.
scripts/enum-extract.pl was added to the repository the following year
without this portability fix.

Michael Bishop informed me that this broke his attempt to build ZFS
2.1.6 on NixOS, since he was building manually outside of their package
manager (that usually rewrites the shebangs to NixOS' unusual paths).
NixOS puts all of the paths into $PATH, so scripts that portably rely
on env to find the interpreter still work.

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes openzfs#14012
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Nov 30, 2022
This is a portability issue. The issue had already been fixed for
scripts/cstyle.pl by 2dbf1bf.
scripts/enum-extract.pl was added to the repository the following year
without this portability fix.

Michael Bishop informed me that this broke his attempt to build ZFS
2.1.6 on NixOS, since he was building manually outside of their package
manager (that usually rewrites the shebangs to NixOS' unusual paths).
NixOS puts all of the paths into $PATH, so scripts that portably rely
on env to find the interpreter still work.

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes openzfs#14012
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 1, 2022
This is a portability issue. The issue had already been fixed for
scripts/cstyle.pl by 2dbf1bf.
scripts/enum-extract.pl was added to the repository the following year
without this portability fix.

Michael Bishop informed me that this broke his attempt to build ZFS
2.1.6 on NixOS, since he was building manually outside of their package
manager (that usually rewrites the shebangs to NixOS' unusual paths).
NixOS puts all of the paths into $PATH, so scripts that portably rely
on env to find the interpreter still work.

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes openzfs#14012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants