Skip to content

Commit e8c5b66

Browse files
authored
Update to latest hiredis (redis#10297)
This is basically just a subtree pull of the latest (unreleased) hiredis. Unfortunately, the `sds -> hisds` patch was pulled as a subtree update from a remote branch rather than a local redis change. Because of that, it goes away on every subtree update. It is now applied as a local commit so it should survive in the future.
2 parents b4079ab + 4740087 commit e8c5b66

28 files changed

+1559
-323
lines changed
Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
name: Build and test
2+
on: [push, pull_request]
3+
4+
jobs:
5+
ubuntu:
6+
name: Ubuntu
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout code
10+
uses: actions/checkout@v2
11+
with:
12+
repository: ${{ env.GITHUB_REPOSITORY }}
13+
ref: ${{ env.GITHUB_HEAD_REF }}
14+
15+
- name: Install dependencies
16+
run: |
17+
sudo add-apt-repository -y ppa:chris-lea/redis-server
18+
sudo apt-get update
19+
sudo apt-get install -y redis-server valgrind libevent-dev
20+
21+
- name: Build using cmake
22+
env:
23+
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON -DENABLE_ASYNC_TESTS:BOOL=ON
24+
CFLAGS: -Werror
25+
CXXFLAGS: -Werror
26+
run: mkdir build-ubuntu && cd build-ubuntu && cmake ..
27+
28+
- name: Build using makefile
29+
run: USE_SSL=1 TEST_ASYNC=1 make
30+
31+
- name: Run tests
32+
env:
33+
SKIPS_AS_FAILS: 1
34+
TEST_SSL: 1
35+
run: $GITHUB_WORKSPACE/test.sh
36+
37+
# - name: Run tests under valgrind
38+
# env:
39+
# SKIPS_AS_FAILS: 1
40+
# TEST_PREFIX: valgrind --error-exitcode=99 --track-origins=yes --leak-check=full
41+
# run: $GITHUB_WORKSPACE/test.sh
42+
43+
centos7:
44+
name: CentOS 7
45+
runs-on: ubuntu-latest
46+
container: centos:7
47+
steps:
48+
- name: Checkout code
49+
uses: actions/checkout@v2
50+
with:
51+
repository: ${{ env.GITHUB_REPOSITORY }}
52+
ref: ${{ env.GITHUB_HEAD_REF }}
53+
54+
- name: Install dependencies
55+
run: |
56+
yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
57+
yum -y --enablerepo=remi install redis
58+
yum -y install gcc gcc-c++ make openssl openssl-devel cmake3 valgrind libevent-devel
59+
60+
- name: Build using cmake
61+
env:
62+
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON -DENABLE_ASYNC_TESTS:BOOL=ON
63+
CFLAGS: -Werror
64+
CXXFLAGS: -Werror
65+
run: mkdir build-centos7 && cd build-centos7 && cmake3 ..
66+
67+
- name: Build using Makefile
68+
run: USE_SSL=1 TEST_ASYNC=1 make
69+
70+
- name: Run tests
71+
env:
72+
SKIPS_AS_FAILS: 1
73+
TEST_SSL: 1
74+
run: $GITHUB_WORKSPACE/test.sh
75+
76+
- name: Run tests under valgrind
77+
env:
78+
SKIPS_AS_FAILS: 1
79+
TEST_SSL: 1
80+
TEST_PREFIX: valgrind --error-exitcode=99 --track-origins=yes --leak-check=full
81+
run: $GITHUB_WORKSPACE/test.sh
82+
83+
centos8:
84+
name: RockyLinux 8
85+
runs-on: ubuntu-latest
86+
container: rockylinux:8
87+
steps:
88+
- name: Checkout code
89+
uses: actions/checkout@v2
90+
with:
91+
repository: ${{ env.GITHUB_REPOSITORY }}
92+
ref: ${{ env.GITHUB_HEAD_REF }}
93+
94+
- name: Install dependencies
95+
run: |
96+
dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
97+
dnf -y module install redis:remi-6.0
98+
dnf -y group install "Development Tools"
99+
dnf -y install openssl-devel cmake valgrind libevent-devel
100+
101+
- name: Build using cmake
102+
env:
103+
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON -DENABLE_ASYNC_TESTS:BOOL=ON
104+
CFLAGS: -Werror
105+
CXXFLAGS: -Werror
106+
run: mkdir build-centos8 && cd build-centos8 && cmake ..
107+
108+
- name: Build using Makefile
109+
run: USE_SSL=1 TEST_ASYNC=1 make
110+
111+
- name: Run tests
112+
env:
113+
SKIPS_AS_FAILS: 1
114+
TEST_SSL: 1
115+
run: $GITHUB_WORKSPACE/test.sh
116+
117+
- name: Run tests under valgrind
118+
env:
119+
SKIPS_AS_FAILS: 1
120+
TEST_SSL: 1
121+
TEST_PREFIX: valgrind --error-exitcode=99 --track-origins=yes --leak-check=full
122+
run: $GITHUB_WORKSPACE/test.sh
123+
124+
freebsd:
125+
runs-on: macos-10.15
126+
name: FreeBSD
127+
steps:
128+
- name: Checkout code
129+
uses: actions/checkout@v2
130+
with:
131+
repository: ${{ env.GITHUB_REPOSITORY }}
132+
ref: ${{ env.GITHUB_HEAD_REF }}
133+
134+
- name: Build in FreeBSD
135+
uses: vmactions/[email protected]
136+
with:
137+
prepare: pkg install -y gmake cmake
138+
run: |
139+
mkdir build && cd build && cmake .. && make && cd ..
140+
gmake
141+
142+
macos:
143+
name: macOS
144+
runs-on: macos-latest
145+
steps:
146+
- name: Checkout code
147+
uses: actions/checkout@v2
148+
with:
149+
repository: ${{ env.GITHUB_REPOSITORY }}
150+
ref: ${{ env.GITHUB_HEAD_REF }}
151+
152+
- name: Install dependencies
153+
run: |
154+
brew install openssl redis
155+
156+
- name: Build hiredis
157+
run: USE_SSL=1 make
158+
159+
- name: Run tests
160+
env:
161+
TEST_SSL: 1
162+
run: $GITHUB_WORKSPACE/test.sh
163+
164+
windows:
165+
name: Windows
166+
runs-on: windows-latest
167+
steps:
168+
- name: Checkout code
169+
uses: actions/checkout@v2
170+
with:
171+
repository: ${{ env.GITHUB_REPOSITORY }}
172+
ref: ${{ env.GITHUB_HEAD_REF }}
173+
174+
- name: Install dependencies
175+
run: |
176+
choco install -y ninja memurai-developer
177+
178+
- uses: ilammy/msvc-dev-cmd@v1
179+
- name: Build hiredis
180+
run: |
181+
mkdir build && cd build
182+
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_EXAMPLES=ON
183+
ninja -v
184+
185+
- name: Run tests
186+
run: |
187+
./build/hiredis-test.exe
188+
189+
- name: Setup cygwin
190+
uses: egor-tensin/setup-cygwin@v3
191+
with:
192+
platform: x64
193+
packages: make git gcc-core
194+
195+
- name: Build in cygwin
196+
env:
197+
HIREDIS_PATH: ${{ github.workspace }}
198+
run: |
199+
build_hiredis() {
200+
cd $(cygpath -u $HIREDIS_PATH)
201+
git clean -xfd
202+
make
203+
}
204+
build_hiredis
205+
shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'

deps/hiredis/.travis.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ branches:
1717
- /^release\/.*$/
1818

1919
install:
20-
- if [ "$BITS" == "64" ]; then
20+
- if [ "$TRAVIS_COMPILER" != "mingw" ]; then
2121
wget https://github.com/redis/redis/archive/6.0.6.tar.gz;
2222
tar -xzvf 6.0.6.tar.gz;
2323
pushd redis-6.0.6 && BUILD_TLS=yes make && export PATH=$PWD/src:$PATH && popd;
24-
fi
24+
fi;
2525

2626
before_script:
2727
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
@@ -33,8 +33,6 @@ before_script:
3333

3434
addons:
3535
apt:
36-
sources:
37-
- sourceline: 'ppa:chris-lea/redis-server'
3836
packages:
3937
- libc6-dbg
4038
- libc6-dev
@@ -46,17 +44,13 @@ addons:
4644
- libssl-dev
4745
- libssl-dev:i386
4846
- valgrind
49-
- redis
5047

5148
env:
5249
- BITS="32"
5350
- BITS="64"
5451

5552
script:
56-
- EXTRA_CMAKE_OPTS="-DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON";
57-
if [ "$BITS" == "64" ]; then
58-
EXTRA_CMAKE_OPTS="$EXTRA_CMAKE_OPTS -DENABLE_SSL_TESTS:BOOL=ON";
59-
fi;
53+
- EXTRA_CMAKE_OPTS="-DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON";
6054
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
6155
if [ "$BITS" == "32" ]; then
6256
CFLAGS="-m32 -Werror";

deps/hiredis/CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
## [1.0.2](https://github.com/redis/hiredis/tree/v1.0.2) - (2021-10-07)
2+
3+
Announcing Hiredis v1.0.2, which fixes CVE-2021-32765 but returns the SONAME to the correct value of `1.0.0`.
4+
5+
- [Revert SONAME bump](https://github.com/redis/hiredis/commit/d4e6f109a064690cde64765c654e679fea1d3548)
6+
([Michael Grunder](https://github.com/michael-grunder))
7+
8+
## [1.0.1](https://github.com/redis/hiredis/tree/v1.0.1) - (2021-10-04)
9+
10+
<span style="color:red">This release erroneously bumped the SONAME, please use [1.0.2](https://github.com/redis/hiredis/tree/v1.0.2)</span>
11+
12+
Announcing Hiredis v1.0.1, a security release fixing CVE-2021-32765
13+
14+
- Fix for [CVE-2021-32765](https://github.com/redis/hiredis/security/advisories/GHSA-hfm9-39pp-55p2)
15+
[commit](https://github.com/redis/hiredis/commit/76a7b10005c70babee357a7d0f2becf28ec7ed1e)
16+
([Yossi Gottlieb](https://github.com/yossigo))
17+
18+
_Thanks to [Yossi Gottlieb](https://github.com/yossigo) for the security fix and to [Microsoft Security Vulnerability Research](https://www.microsoft.com/en-us/msrc/msvr) for finding the bug._ :sparkling_heart:
19+
120
## [1.0.0](https://github.com/redis/hiredis/tree/v1.0.0) - (2020-08-03)
221

322
Announcing Hiredis v1.0.0, which adds support for RESP3, SSL connections, allocator injection, and better Windows support! :tada:

0 commit comments

Comments
 (0)