-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
RPM: Fix regex so old versions of DKMS modules are removed on upgrade #10327
RPM: Fix regex so old versions of DKMS modules are removed on upgrade #10327
Conversation
Due to a mismatch between the text and a regex looking for that text, the `%preuninstall` script would never run the `dkms remove` command necessary to avoid corrupting the DKMS data configuration. Increase regex specificity to avoid this issue. Closes: openzfs#9891 Signed-off-by: Chris Lindee <chris.lindee+github@gmail.com>
4a77718
to
5df480a
Compare
When testing this change, for whatever reason, zfs-import-cache.service fails consistently when I boot; however, Unfortunately, I can't verify that assertion because, without this fix, updating zfs-dkms to 0.8.4 will not create a zfs module - and I cannot manually create one with |
Codecov Report
@@ Coverage Diff @@
## master #10327 +/- ##
==========================================
+ Coverage 79.24% 79.28% +0.03%
==========================================
Files 390 390
Lines 123336 123336
==========================================
+ Hits 97737 97784 +47
+ Misses 25599 25552 -47
Continue to review full report at Codecov.
|
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 gave this a try by hand, and looks like it works:
# without patch
$ awk -F'"' '/META_ALIAS/ { print $2; exit 0 }' zfs_config.h
# with patch
$ awk -F'"' '/META_ALIAS\s+"/ { print $2; exit 0 }' zfs_config.h
zfs-0.8.4-1
Due to a mismatch between the text and a regex looking for that text, the `%preuninstall` script would never run the `dkms remove` command necessary to avoid corrupting the DKMS data configuration. Increase regex specificity to avoid this issue. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Chris Lindee <chris.lindee+github@gmail.com> Closes: openzfs#9891 Closes openzfs#10327 (cherry picked from commit 4d6043f)
Due to a mismatch between the text and a regex looking for that text, the `%preuninstall` script would never run the `dkms remove` command necessary to avoid corrupting the DKMS data configuration. Increase regex specificity to avoid this issue. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Chris Lindee <chris.lindee+github@gmail.com> Closes: openzfs#9891 Closes openzfs#10327
Due to a mismatch between the text and a regex looking for that text, the `%preuninstall` script would never run the `dkms remove` command necessary to avoid corrupting the DKMS data configuration. Increase regex specificity to avoid this issue. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Chris Lindee <chris.lindee+github@gmail.com> Closes: openzfs#9891 Closes openzfs#10327
Due to a mismatch between the text and a regex looking for that text, the `%preuninstall` script would never run the `dkms remove` command necessary to avoid corrupting the DKMS data configuration. Increase regex specificity to avoid this issue. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Chris Lindee <chris.lindee+github@gmail.com> Closes: openzfs#9891 Closes openzfs#10327
Due to a mismatch between the text and a regex looking for that text,
the
%preuninstall
script would never run thedkms remove
commandnecessary to avoid corrupting the DKMS data configuration. Increase
regex specificity to avoid this issue.
Closes: #9891
Motivation and Context
Solves #9891
Description
Adds more specificity to regex, to ensure it matches against a line that has a double quote (
"
). This keepsawk
from printing no output.How Has This Been Tested?
dnf update -y -x zfs\* -x kernel\*
.rpm --reinstall --noscripts ./zfs-dkms-0.8.3-1.fc31.noarch.rpm
to install the new%preuninstall
scriptdkms status
to verify DKMS tool still worksdnf update -y zfs-dkms
to install v0.8.4dkms status
and verified DKMS tool still worked, with no mention of zfs 0.8.3, but with an install of zfs 0.8.4 availablesystemctl restart zfs-import-cache
dnf update -y
to upgrade zfs-dkms to v0.8.4 and the kernel to 5.6.11dkms status
and verified DKMS tool still worked, with no mention of zfs 0.8.3, but with an install of zfs 0.8.4 available (for both 5.4.20 and 5.6.11)systemctl restart zfs-import-cache
Types of changes
Checklist:
Signed-off-by
.