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 #7395

Merged
merged 1 commit into from
Apr 6, 2018

Conversation

tonyhutter
Copy link
Contributor

Description

Fedora 28's RPM build checks warn when executable files don't have a shebang line:

*** WARNING: ./tests/zfs-tests/tests/functional/mv_files/mv_files_common.kshlib is executable but has empty or no shebang, removing executable bit
*** WARNING: ./tests/zfs-tests/tests/functional/mv_files/mv_files.cfg is executable but has empty or no shebang, removing executable bit

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.

Motivation and Context

Closes: #7359

How Has This Been Tested?

Tested make pkg-utils on a Fedora 28 VM and no longer saw the warnings.

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)
  • Documentation (a change to man pages or other documentation)

Checklist:

  • My code follows the ZFS on Linux code style requirements.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commit messages are properly formatted and contain Signed-off-by.
  • Change has been approved by a ZFS on Linux member.

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 tonyhutter added the Type: Building Indicates an issue related to building binaries label Apr 5, 2018
@codecov
Copy link

codecov bot commented Apr 6, 2018

Codecov Report

Merging #7395 into master will decrease coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7395      +/-   ##
==========================================
- Coverage   76.39%   76.31%   -0.08%     
==========================================
  Files         329      329              
  Lines      104248   104237      -11     
==========================================
- Hits        79638    79552      -86     
- Misses      24610    24685      +75
Flag Coverage Δ
#kernel 76.24% <ø> (+0.06%) ⬆️
#user 65.58% <ø> (-0.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 533ea04...2eba4ef. Read the comment docs.

@@ -1,4 +1,6 @@
pkgdatadir = $(datadir)/@PACKAGE@/test-runner/include
dist_pkgdata_SCRIPTS = \
logapi.shlib \
logapi.shlib
Copy link
Contributor

@dinatale2 dinatale2 Apr 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: It appears a lot of our other shlib files don't have the shebang at the top of their files. Does logapi.shlib require it for some reason? It's included just like any other shlib files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dunno, I thought that was weird too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that it's optional since the .shlib files are only ever sourced, but we really should be consistent about it.

@behlendorf behlendorf merged commit 6c9af9e into openzfs:master Apr 6, 2018
tonyhutter added a commit to tonyhutter/zfs that referenced this pull request 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 pull request 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 pull request 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 this pull request may close these issues.

Fedora 28: Fix "file is executable, but no shebang" warnings
3 participants