Bug 2242185 - Warning when installing kernel: "grep: warning: stray \ before /"
Summary: Warning when installing kernel: "grep: warning: stray \ before /"
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: kexec-tools
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Coiby
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-10-04 20:01 UTC by Marc Dionne
Modified: 2023-12-20 08:13 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-990 0 None None None 2023-10-04 20:01:51 UTC

Description Marc Dionne 2023-10-04 20:01:14 UTC
Installing a new kernel from a kernel build tree with "make install" generates this warning:

  grep: warning: stray \ before /

After some digging, I found that it comes from this line in /usr/bin/kdumpctl:

 _grubby_kernel_str=$(grubby --info ALL | grep -E "^kernel=.*$_release(\/\w+)?\"$")

where grep is warning that it should perhaps be (removing \ before /):

 _grubby_kernel_str=$(grubby --info ALL | grep -E "^kernel=.*$_release(/\w+)?\"$")

That does eliminates the warning.

Reproducible: Always

Steps to Reproduce:
1. Build kernel from source tree
2. make install
3.
Actual Results:  
Generates a warning, but the install works as expected (modulo some other fixed packages).

Expected Results:  
No warnings.


Note You need to log in before you can comment on or make changes to this bug.