[MDEV-29222] mysqld_safe script breaks with many versions of grep Created: 2022-08-01 Updated: 2022-08-10 Resolved: 2022-08-10 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients, Server |
| Affects Version/s: | 10.7.4 |
| Fix Version/s: | 10.6.9, 10.7.5, 10.8.4, 10.9.2 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Addison Gourluck | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | beginner-friendly | ||
| Environment: |
Linux |
||
| Description |
|
When running the mysqld_safe start command, if the grep command isn't the exact correct version, it will fail with the following error:
This is a problem, as the script should not assume that the grep command that is installed should have all the features. This was broken in commit 193bfdd831bbbf65e74acd12baf691d4305e3c11. The offending line of code is in server/scripts/CMakeLists.txt:
This could be fixed by changing the middle grep command from
To the new command:
|
| Comments |
| Comment by Daniel Black [ 2022-08-01 ] | |
|
Is removing the '-E' grep option sufficient for busybox to be happy? | |
| Comment by Addison Gourluck [ 2022-08-01 ] | |
|
I actually just tried this again with a different grep, and it has the same problem. grep (GNU grep) 3.7 exhibits the same behaviour. The issue persists whether or not the -E option is there. I'm beginning to wonder if this isn't just a typo, and thinking perhaps this code doesn't work on any machine? Perhaps the code was meant to be:
|