-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
contrib/initramfs: switch to automake #6761
Conversation
161f8b0
to
2342444
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks totally reasonable to me. Just a few nits.
contrib/initramfs/Makefile.am
Outdated
$(top_srcdir)/contrib/initramfs/hooks/zfs \ | ||
$(top_srcdir)/contrib/initramfs/scripts/zfs \ | ||
$(top_srcdir)/contrib/initramfs/hooks/zfs.in \ | ||
$(top_srcdir)/contrib/initramfs/scripts/zfs.in \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you've added proper Makefile's for the hooks
and scripts
sub-directories you can do the EXTRA_DIST for the .in
file in each respective Makefile. They should be removed entirely from here. You can use make dist
and check the tarball as a way to verify they were properly included.
|
||
EXTRA_DIST = \ | ||
$(top_srcdir)/contrib/initramfs/scripts/zfs.in | ||
$(top_srcdir)/contrib/initramfs/scripts/local-top/zfs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's with the local-top
entry? This shouldn't be needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually don't know how to properly use autotools, i just copy-pasted most of these files from the other dirs.
If i understand correctly local-top/zfs
is needed in either contrib/initramfs/scripts/Makefile.am
or contrib/initramfs/Makefile.am
, not both; since contrib/initramfs/scripts/Makefile.am
is dealing with files in "contrib/initramfs/scripts" maybe it's better to remove local-top/zfs
from the other Makefile.am?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The EXTRA_DIST
variable is used to add additional files to the tarball which otherwise would be excluded because they're not directly referenced in a Makefile.am
as _SOURCES
, _HEADERS
, _SCRIPTS
, etc.
I think we have two pretty reasonable options here.
-
Keep everything needed to build and install this directory in one
contrib/initramfsMakefile.am
as it is now. You'd then need to add the new.in
targets tocontrib/initramfs/Makefile.am
. Or, -
Create a
Makefile.am
in each sub-directory which is responsible for only including, building, and installing the files in that directory. This would be my preference and basically the way you were going with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does option 2 also include sub-directories? In this case it's better to leave local-top/zfs
in this Makefile ("contrib/initramfs/scripts/Makefile.am"), right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you'd either want a Makefile.am
in each sub-directory which is responsible for the files in that directory. Like most of the rest of the tree.
initramfs/Makefile.am
initramfs/conf-hooks.d/Makefile.am
initramfs/hooks/Makefile.am
initramfs/scripts/Makefile.am
initramfs/scripts/local-top/Makefile.am
or, a single initramfs/Makefile.am
responsible for all the sub-directories as it is now.
Either are reasonable options but we should avoid doing something in between which would be confusing.
Codecov Report
@@ Coverage Diff @@
## master #6761 +/- ##
==========================================
+ Coverage 75.3% 75.35% +0.05%
==========================================
Files 297 297
Lines 94441 94441
==========================================
+ Hits 71116 71164 +48
+ Misses 23325 23277 -48
Continue to review full report at Codecov.
|
|
||
EXTRA_DIST = \ | ||
$(top_srcdir)/contrib/initramfs/scripts/zfs.in | ||
$(top_srcdir)/contrib/initramfs/scripts/local-top/zfs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The EXTRA_DIST
variable is used to add additional files to the tarball which otherwise would be excluded because they're not directly referenced in a Makefile.am
as _SOURCES
, _HEADERS
, _SCRIPTS
, etc.
I think we have two pretty reasonable options here.
-
Keep everything needed to build and install this directory in one
contrib/initramfsMakefile.am
as it is now. You'd then need to add the new.in
targets tocontrib/initramfs/Makefile.am
. Or, -
Create a
Makefile.am
in each sub-directory which is responsible for only including, building, and installing the files in that directory. This would be my preference and basically the way you were going with this.
b1d7b47
to
23c6988
Compare
21e4f22
to
6ee7c1b
Compare
6ee7c1b
to
36fc16e
Compare
Do we need corresponding changes for dracut? In addition, aren't |
I can't comment on this, i'm only fixing this for my Debian8 box which i think only uses the initramfs code. |
@loli10K As Debian can use either initramfs-tools or dracut, and Debian will eventually move to dracut, it'd be good to check to see if similar fixes are needed there. |
I'll be sure to push additional dracut fixes in a follow-up PR as soon as i'm in a position to test/verify them. EDIT: merge conflicts resolved. |
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
36fc16e
to
a06602d
Compare
Sounds good, let's get this fixed in the current PR and follow up with the needed dracut changes. |
Use automake to build initramfs scripts and hooks. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes openzfs#6761
Use automake to build initramfs scripts and hooks. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes openzfs#6761
Use automake to build initramfs scripts and hooks. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes openzfs#6761 (cherry picked from commit cb3b041)
Use automake to build initramfs scripts and hooks. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes openzfs#6761 (cherry picked from commit cb3b041) Signed-off-by: Neal Gompa <ngompa@datto.com> Requires-spl: spl-0.7-release
Use automake to build initramfs scripts and hooks. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes openzfs#6761
Use automake to build initramfs scripts and hooks. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes #6761
Use automake to build initramfs scripts and hooks. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes openzfs#6761
Description
Use automake to build initramfs scripts and hooks.
Motivation and Context
On my Debian systems i can't
update-initramfs -u
successfully with ZFS./configure
d with custom--prefix=
:This PR seems to fix it:
How Has This Been Tested?
Local Debian box.
Types of changes
Checklist:
Signed-off-by
.