scripts/enum-extract.pl should not hard code perl path
commitbfaa1d98f4cef71938bdbde4fd01d2db2559fccb
authorRichard Yao <richard.yao@alumni.stonybrook.edu>
Tue, 11 Oct 2022 19:32:07 +0000 (11 15:32 -0400)
committerGitHub <noreply@github.com>
Tue, 11 Oct 2022 19:32:07 +0000 (11 12:32 -0700)
tree1ab444e7f986863673a7c1256f2aa4bcf017f51f
parented566bf1cd0bdbf85e8c63c1c119e3d2ef5db1f6
scripts/enum-extract.pl should not hard code perl path

This is a portability issue. The issue had already been fixed for
scripts/cstyle.pl by 2dbf1bf8296f66f24d5e404505c991bfbeec7808.
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 #14012
scripts/enum-extract.pl