Repository navigation
Avoid 'sed -i' when building modules - #14854
collinfunk wants to merge 1 commit into
Conversation
The macOS implementation of 'sed' has an -i option that is not
compatible with GNU 'sed'. This leads to the following build error when
running make with BUILD_WITH_MODULES=yes:
Disabling -Werror for all modules
Processing redisjson
sed: rename(): No such file or directory
Processing redistimeseries
sed: rename(): No such file or directory
Processing redisbloom
sed: rename(): No such file or directory
Processing redisearch
sed: rename(): No such file or directory
make[1]: *** [handle-werrors] Error 1
We can use the more portable method of redirecting the output to a
temporary file and moving it.
|
Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset. In case there are security findings, they will be communicated to you as a comment inside the PR. Hope you’ll enjoy using Jit. Questions? Comments? Want to learn more? Get in touch with us. |
|
There is another issue on macOS M3 |
|
@sundb I noticed that to. It looks like RediSearch replaces it here: https://github.com/RediSearch/RediSearch/blob/969269694f24daa49bde8ccb23826c8997927949/sbin/get-platform#L32-L34 We can replace |
i'm not sure if we should fix it here, personally, i think |
No objection from my side. We should coordinate such changes with @kalinstaykov to make sure we are aligned with OSS build flows |
No objection from me too - let's use |
|
@collinfunk |
|
@sundb Oh, I didn't see that PR. I think this one should be good to close, then? |
I also just realized it, we can close this one. |
The macOS implementation of 'sed' has an -i option that is not compatible with GNU 'sed'. This leads to the following build error when running make with BUILD_WITH_MODULES=yes:
We can use the more portable method of redirecting the output to a temporary file and moving it.
Note
Low Risk
Low risk build-script portability change that only affects the optional
DISABLE_WERRORSpath when patching module build files; main build logic is unchanged.Overview
Makes the
handle-werrorsstep inmodules/Makefileportable by replacing in-placesed -iedits with a temp-file rewrite (sedto$$f.tmpthenmv).This prevents macOS/BSD
sedincompatibilities when stripping-Werrorfrom moduleMakefile/*.mk/CMakeLists.txtfiles during module builds.Written by Cursor Bugbot for commit a63eb40. This will update automatically on new commits. Configure here.