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

Ensure initramfs directory /usr/bin exists before attempting subsequent copy #10448

Closed
wants to merge 1 commit into from

Conversation

IslandLife
Copy link

@IslandLife IslandLife commented Jun 12, 2020

Motivation and Context

Fix for #10434 initramfs hook zfsunlock creates initramfs /usr/bin as as file and not directory

Description

Modeled on the similar mkdir statement for inirtramfs /etc in the hook zfs

How Has This Been Tested?

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)

Invoke update-initramfs

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.
  • I have run the ZFS Test Suite with this change applied.
  • All commit messages are properly formatted and contain Signed-off-by.

…mpting subsequent copy

Ref: initramfs hook zfsunlock creates initramfs /usr/bin as as file and not directory openzfs#10434

Modeled on the similar mkdir statement for inirtramfs /etc in the hook zfs
@codecov
Copy link

codecov bot commented Jun 12, 2020

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10448      +/-   ##
==========================================
- Coverage   79.58%   79.31%   -0.28%     
==========================================
  Files         391      391              
  Lines      123872   123872              
==========================================
- Hits        98586    98247     -339     
- Misses      25286    25625     +339     
Flag Coverage Δ
#kernel 80.01% <ø> (-0.02%) ⬇️
#user 64.67% <ø> (-1.45%) ⬇️
Impacted Files Coverage Δ
cmd/ztest/ztest.c 73.28% <0.00%> (-6.85%) ⬇️
module/zfs/vdev_indirect.c 74.66% <0.00%> (-6.00%) ⬇️
module/zfs/bpobj.c 86.86% <0.00%> (-4.29%) ⬇️
module/zfs/dsl_scan.c 82.92% <0.00%> (-3.01%) ⬇️
module/zcommon/zfs_fletcher.c 75.65% <0.00%> (-2.64%) ⬇️
module/zfs/vdev_removal.c 94.85% <0.00%> (-2.63%) ⬇️
module/zfs/dsl_synctask.c 92.40% <0.00%> (-2.54%) ⬇️
module/zfs/vdev_indirect_mapping.c 96.61% <0.00%> (-1.94%) ⬇️
module/icp/api/kcf_mac.c 37.14% <0.00%> (-1.72%) ⬇️
module/zfs/ddt.c 87.47% <0.00%> (-0.78%) ⬇️
... and 47 more

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 e08b993...0f903b4. Read the comment docs.

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Jun 12, 2020
@behlendorf behlendorf requested a review from rlaager June 13, 2020 16:31
@@ -15,4 +15,5 @@ esac

. /usr/share/initramfs-tools/hook-functions

mkdir -p "$DESTDIR/usr/bin/"
copy_exec /usr/share/initramfs-tools/zfsunlock /usr/bin
Copy link
Member

Choose a reason for hiding this comment

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

copy_exec calls copy_file, which has a mkdir in it. Instead of adding a mkdir, does this work:
copy_exec /usr/share/initramfs-tools/zfsunlock /usr/bin/zfsunlock

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, this would be better.

@behlendorf behlendorf added Status: Revision Needed Changes are required for the PR to be accepted and removed Status: Code Review Needed Ready for review and testing labels Jul 10, 2020
@behlendorf
Copy link
Contributor

@IslandLife can you make suggested change to this PR so we can get it merged.

@behlendorf
Copy link
Contributor

Closing. Resolved by #11162.

@behlendorf behlendorf closed this Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Revision Needed Changes are required for the PR to be accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants