Skip to content

Commit

Permalink
[build] Fix redis build in linux. (ray-project#29179)
Browse files Browse the repository at this point in the history
The current build in some platform will show errors:

```
    Execution platform: @local_config_platform//:host
    rm: cannot remove 'tmp-redis-bin/redis/bin/redis-cli': Permission denied
    rm: cannot remove 'tmp-redis-bin/redis/bin/redis-benchmark': Permission denied
    rm: cannot remove 'tmp-redis-bin/redis/bin/redis-check-rdb': Permission denied
    rm: cannot remove 'tmp-redis-bin/redis/bin/redis-sentinel': Permission denied
    rm: cannot remove 'tmp-redis-bin/redis/bin/redis-server': Permission denied
    rm: cannot remove 'tmp-redis-bin/redis/bin/redis-check-aof': Permission denied
    rm: cannot remove 'tmp-redis-bin/redis/include': Permission denied
```

This PR fixed this by avoiding creating tmp dir.
  • Loading branch information
fishbone authored Oct 7, 2022
1 parent da6adbb commit e16f49b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions bazel/BUILD.redis
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,8 @@ genrule(
"redis-cli",
],
cmd = """
mkdir tmp-redis-bin
cp -rf $(locations :redis) ./tmp-redis-bin/
cp tmp-redis-bin/redis-server $(location redis-server)
chmod +x $(location redis-server)
cp tmp-redis-bin/redis-cli $(location redis-cli)
chmod +x $(location redis-cli)
rm -rf tmp-redis-bin
cp $(RULEDIR)/redis/bin/redis-server $(location redis-server)
cp $(RULEDIR)/redis/bin/redis-cli $(location redis-cli)
""",
visibility = ["//visibility:public"],
tags = ["local"],
Expand Down

0 comments on commit e16f49b

Please sign in to comment.