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

Add missing zfs-dracut RPM dependencies #7747

Merged
merged 1 commit into from Jul 31, 2018

Conversation

behlendorf
Copy link
Contributor

Motivation and Context

Issue #7729. It's possible for a system to not have awk installed which
is required by the zfs-dracut package.

Description

The zfs-dracut package requires the hostid, basename, head, awk,
and grep utilities be installed. The first three are provided by
coreutils but additional dependencies are required for awk and grep.

How Has This Been Tested?

Locally built and verified additional dependencies are added.

@Rudd-O can you review this, only the rpm dependencies needed to be added. The dracut install script is already doing the right thing.

https://github.com/zfsonlinux/zfs/blob/master/contrib/dracut/90zfs/module-setup.sh.in#L60

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.

@@ -214,6 +214,8 @@ Summary: Dracut module
Group: System Environment/Kernel
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: dracut
Requires: gawk
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we do just awk here to accommodate BusyBox awk? Or do we use GNU extensions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Initially I tried using awk but ran in to problems since the CentOS/Fedora repositories don't include a package by that name, or an alias. So I was forced to switch to gawk. Although any of the other awk variants should work fine. If someone knows a better generic way to specific this I'm all for it. Maybe Requires: /usr/bin/awk?

@Rudd-O
Copy link
Contributor

Rudd-O commented Jul 27, 2018 via email

@codecov
Copy link

codecov bot commented Jul 28, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7747      +/-   ##
==========================================
- Coverage   78.39%   78.18%   -0.22%     
==========================================
  Files         368      368              
  Lines      111981   111981              
==========================================
- Hits        87786    87549     -237     
- Misses      24195    24432     +237
Flag Coverage Δ
#kernel 78.72% <ø> (+12.85%) ⬆️
#user 67.03% <ø> (-0.65%) ⬇️

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 fb7307b...f409ccb. Read the comment docs.

@Rudd-O
Copy link
Contributor

Rudd-O commented Jul 28, 2018 via email

The zfs-dracut package requires the hostid, basename, head, awk,
and grep utilities be installed.  The first three are provided by
coreutils but additional dependencies are required for awk and grep.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
@behlendorf
Copy link
Contributor Author

behlendorf commented Jul 30, 2018

I've refreshed the patch to use Requires: /usr/bin/awk and let the dracut scripts untouched. This way the dracut functionality will still work with alternative awk implementations as long as the distribution packaging requires their preferred version of awk.

@behlendorf behlendorf added Reviewed Status: Accepted Ready to integrate (reviewed, tested) labels Jul 30, 2018
@behlendorf behlendorf merged commit 3905cac into openzfs:master Jul 31, 2018
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Aug 28, 2018
The zfs-dracut package requires the hostid, basename, head, awk,
and grep utilities be installed.  The first three are provided by
coreutils but additional dependencies are required for awk and grep.

Reviewed-by: Manuel Amador (Rudd-O) <rudd-o@rudd-o.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#7729
Closes openzfs#7747
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Aug 30, 2018
The zfs-dracut package requires the hostid, basename, head, awk,
and grep utilities be installed.  The first three are provided by
coreutils but additional dependencies are required for awk and grep.

Reviewed-by: Manuel Amador (Rudd-O) <rudd-o@rudd-o.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#7729
Closes openzfs#7747
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Sep 5, 2018
The zfs-dracut package requires the hostid, basename, head, awk,
and grep utilities be installed.  The first three are provided by
coreutils but additional dependencies are required for awk and grep.

Reviewed-by: Manuel Amador (Rudd-O) <rudd-o@rudd-o.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#7729
Closes openzfs#7747
@behlendorf behlendorf deleted the issue-7729 branch April 19, 2021 19:29
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

3 participants