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

Fedora 28: Fix "file is executable, but no shebang" warnings #7359

Closed
tonyhutter opened this issue Mar 28, 2018 · 0 comments · Fixed by #7395
Closed

Fedora 28: Fix "file is executable, but no shebang" warnings #7359

tonyhutter opened this issue Mar 28, 2018 · 0 comments · Fixed by #7395
Labels
Type: Building Indicates an issue related to building binaries

Comments

@tonyhutter
Copy link
Contributor

System information

Type Version/Name
Distribution Name Fedora
Distribution Version 28
Linux Kernel 4.16
Architecture x86
ZFS Version master
SPL Version master

Describe the problem you're observing

Fedora 28's RPM build checks are stricter, and complain when executable files don't have a shebang line:

$ make pkg-utils
...
+ /usr/lib/rpm/redhat/brp-mangle-shebangs '' ''
*** WARNING: ./usr/share/initramfs-tools/scripts/zfs is executable but has empty or no shebang, removing executable bit
*** WARNING: ./usr/share/zfs/zfs-tests/tests/perf/perf.shlib is executable but has empty or no shebang, removing executable bit
*** WARNING: ./usr/share/zfs/zfs-tests/tests/perf/fio/sequential_writes.fio is executable but has empty or no shebang, removing executable bit
*** WARNING: ./usr/share/zfs/zfs-tests/tests/perf/fio/sequential_reads.fio is executable but has empty or no shebang, removing executable bit
*** WARNING: ./usr/share/zfs/zfs-tests/tests/perf/fio/random_writes.fio is executable but has empty or no shebang, removing executable bit
*** WARNING: ./usr/share/zfs/zfs-tests/tests/perf/fio/random_readwrite.fio is executable but has empty or no shebang, removing executable bit
*** WARNING: ./usr/share/zfs/zfs-tests/tests/perf/fio/random_reads.fio is executable but has empty or no shebang, removing executable bit
*** WARNING: ./usr/share/zfs/zfs-tests/tests/perf/fio/mkfiles.fio is executable but has empty or no shebang, removing executable bit
*** WARNING: ./usr/share/zfs/zfs-tests/tests/functional/zvol/zvol_common.shlib is executable but has empty or no shebang, removing executable bit
*** WARNING: ./usr/share/zfs/zfs-tests/tests/functional/zvol/zvol.cfg is executable but has empty or no shebang, removing executable bit
...

These warnings are caused by us wrongly including data & config files in the _SCRIPTS automake lines. Files in _SCRIPTS are marked executable by automake. The fix is to just include them in a _DATA line instead:

--- a/tests/zfs-tests/tests/functional/zvol/Makefile.am
+++ b/tests/zfs-tests/tests/functional/zvol/Makefile.am
@@ -1,5 +1,5 @@
 pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/zvol
-dist_pkgdata_SCRIPTS = \
+dist_pkgdata_DATA = \
        zvol.cfg \
        zvol_common.shlib

Describe how to reproduce the problem

make pkg-utils on Fedora 28

Include any warning/errors/backtraces from the system logs

@tonyhutter tonyhutter added the Type: Building Indicates an issue related to building binaries label Mar 28, 2018
@tonyhutter tonyhutter changed the title Fedora 28: Fix "file is executable, but not shebang" warnings Fedora 28: Fix "file is executable, but no shebang" warnings Mar 28, 2018
tonyhutter added a commit to tonyhutter/zfs that referenced this issue Apr 5, 2018
Fedora 28's RPM build checks warn when executable files don't have a
shebang line.  These warnings are caused when we (incorrectly)
include data & config files in the_SCRIPTS automake lines. Files in
_SCRIPTS are marked executable by automake. This patch fixes the
issue by including non-executable scripts in a _DATA line instead.

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes: openzfs#7359
tonyhutter added a commit to tonyhutter/zfs that referenced this issue Apr 5, 2018
Fedora 28's RPM build checks warn when executable files don't have a
shebang line.  These warnings are caused when we (incorrectly)
include data & config files in the_SCRIPTS automake lines. Files in
_SCRIPTS are marked executable by automake. This patch fixes the
issue by including non-executable scripts in a _DATA line instead.

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes: openzfs#7359
behlendorf pushed a commit that referenced this issue Apr 6, 2018
Fedora 28's RPM build checks warn when executable files don't have a
shebang line.  These warnings are caused when we (incorrectly)
include data & config files in the_SCRIPTS automake lines. Files in
_SCRIPTS are marked executable by automake. This patch fixes the
issue by including non-executable scripts in a _DATA line instead.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #7359 
Closes #7395
tonyhutter added a commit to tonyhutter/zfs that referenced this issue Apr 16, 2018
Fedora 28's RPM build checks warn when executable files don't have a
shebang line.  These warnings are caused when we (incorrectly)
include data & config files in the_SCRIPTS automake lines. Files in
_SCRIPTS are marked executable by automake. This patch fixes the
issue by including non-executable scripts in a _DATA line instead.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes openzfs#7359
Closes openzfs#7395
tonyhutter added a commit to tonyhutter/zfs that referenced this issue May 4, 2018
Fedora 28's RPM build checks warn when executable files don't have a
shebang line.  These warnings are caused when we (incorrectly)
include data & config files in the_SCRIPTS automake lines. Files in
_SCRIPTS are marked executable by automake. This patch fixes the
issue by including non-executable scripts in a _DATA line instead.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes openzfs#7359
Closes openzfs#7395
tonyhutter added a commit that referenced this issue May 10, 2018
Fedora 28's RPM build checks warn when executable files don't have a
shebang line.  These warnings are caused when we (incorrectly)
include data & config files in the_SCRIPTS automake lines. Files in
_SCRIPTS are marked executable by automake. This patch fixes the
issue by including non-executable scripts in a _DATA line instead.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #7359
Closes #7395
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Building Indicates an issue related to building binaries
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant