Merge branch 'unstable' into keydbpro
Former-commit-id: 205d8f18d2bb8df5253bab40578b006b7aa73fd5
This commit is contained in:
commit
6b4f686f5f
478 files changed
+45073
-13953
No files matched your search
+50
-15
@@ -1,23 +1,58 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Generate some test certificates which are used by the regression test suite:
|
||||
#
|
||||
# tests/tls/ca.{crt,key} Self signed CA certificate.
|
||||
# tests/tls/redis.{crt,key} A certificate with no key usage/policy restrictions.
|
||||
# tests/tls/client.{crt,key} A certificate restricted for SSL client usage.
|
||||
# tests/tls/server.{crt,key} A certificate restricted fro SSL server usage.
|
||||
# tests/tls/redis.dh DH Params file.
|
||||
|
||||
generate_cert() {
|
||||
local name=$1
|
||||
local cn="$2"
|
||||
local opts="$3"
|
||||
|
||||
local keyfile=tests/tls/${name}.key
|
||||
local certfile=tests/tls/${name}.crt
|
||||
|
||||
[ -f $keyfile ] || openssl genrsa -out $keyfile 2048
|
||||
openssl req \
|
||||
-new -sha256 \
|
||||
-subj "/O=Redis Test/CN=$cn" \
|
||||
-key $keyfile | \
|
||||
openssl x509 \
|
||||
-req -sha256 \
|
||||
-CA tests/tls/ca.crt \
|
||||
-CAkey tests/tls/ca.key \
|
||||
-CAserial tests/tls/ca.txt \
|
||||
-CAcreateserial \
|
||||
-days 365 \
|
||||
$opts \
|
||||
-out $certfile
|
||||
}
|
||||
|
||||
mkdir -p tests/tls
|
||||
openssl genrsa -out tests/tls/ca.key 4096
|
||||
[ -f tests/tls/ca.key ] || openssl genrsa -out tests/tls/ca.key 4096
|
||||
openssl req \
|
||||
-x509 -new -nodes -sha256 \
|
||||
-key tests/tls/ca.key \
|
||||
-days 3650 \
|
||||
-subj '/O=Redis Test/CN=Certificate Authority' \
|
||||
-out tests/tls/ca.crt
|
||||
openssl genrsa -out tests/tls/redis.key 2048
|
||||
openssl req \
|
||||
-new -sha256 \
|
||||
-key tests/tls/redis.key \
|
||||
-subj '/O=Redis Test/CN=Server' | \
|
||||
openssl x509 \
|
||||
-req -sha256 \
|
||||
-CA tests/tls/ca.crt \
|
||||
-CAkey tests/tls/ca.key \
|
||||
-CAserial tests/tls/ca.txt \
|
||||
-CAcreateserial \
|
||||
-days 365 \
|
||||
-out tests/tls/redis.crt
|
||||
openssl dhparam -out tests/tls/redis.dh 2048
|
||||
|
||||
cat > tests/tls/openssl.cnf <<_END_
|
||||
[ server_cert ]
|
||||
keyUsage = digitalSignature, keyEncipherment
|
||||
nsCertType = server
|
||||
|
||||
[ client_cert ]
|
||||
keyUsage = digitalSignature, keyEncipherment
|
||||
nsCertType = client
|
||||
_END_
|
||||
|
||||
generate_cert server "Server-only" "-extfile tests/tls/openssl.cnf -extensions server_cert"
|
||||
generate_cert client "Client-only" "-extfile tests/tls/openssl.cnf -extensions client_cert"
|
||||
generate_cert redis "Generic-cert"
|
||||
|
||||
[ -f tests/tls/redis.dh ] || openssl dhparam -out tests/tls/redis.dh 2048
|
||||
@@ -26,9 +26,15 @@ GROUPS_BY_NAME = Hash[*
|
||||
].freeze
|
||||
|
||||
def argument arg
|
||||
name = arg["name"].is_a?(Array) ? arg["name"].join(" ") : arg["name"]
|
||||
name = arg["enum"].join "|" if "enum" == arg["type"]
|
||||
name = arg["command"] + " " + name if arg["command"]
|
||||
if "block" == arg["type"]
|
||||
name = arg["block"].map do |entry|
|
||||
argument entry
|
||||
end.join " "
|
||||
else
|
||||
name = arg["name"].is_a?(Array) ? arg["name"].join(" ") : arg["name"]
|
||||
name = arg["enum"].join "|" if "enum" == arg["type"]
|
||||
name = arg["command"] + (name ? " " + name : "") if arg["command"]
|
||||
end
|
||||
if arg["multiple"]
|
||||
name = "#{name} [#{name} ...]"
|
||||
end
|
||||
|
||||
@@ -30,7 +30,8 @@ dictType dictTypeTest = {
|
||||
NULL, /* val dup */
|
||||
dictKeyCompare, /* key compare */
|
||||
NULL, /* key destructor */
|
||||
NULL /* val destructor */
|
||||
NULL, /* val destructor */
|
||||
NULL /* allow to expand */
|
||||
};
|
||||
|
||||
void showBuckets(dictht ht) {
|
||||
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
if [ $# != "1" ]
|
||||
then
|
||||
echo "Usage: ./utils/releasetools/01_create_tarball.sh <version_tag>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TAG=$1
|
||||
TARNAME="redis-${TAG}.tar"
|
||||
echo "Generating /tmp/${TARNAME}"
|
||||
git archive $TAG --prefix redis-${TAG}/ > /tmp/$TARNAME || exit 1
|
||||
echo "Gizipping the archive"
|
||||
rm -f /tmp/$TARNAME.gz
|
||||
gzip -9 /tmp/$TARNAME
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
if [ $# != "1" ]
|
||||
then
|
||||
echo "Usage: ./utils/releasetools/02_upload_tarball.sh <version_tag>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Uploading..."
|
||||
scp /tmp/redis-${1}.tar.gz ubuntu@host.redis.io:/var/www/download/releases/
|
||||
echo "Updating web site... "
|
||||
echo "Please check the github action tests for the release."
|
||||
echo "Press any key if it is a stable release, or Ctrl+C to abort"
|
||||
read x
|
||||
ssh ubuntu@host.redis.io "cd /var/www/download;
|
||||
rm -rf redis-${1}.tar.gz;
|
||||
wget http://download.redis.io/releases/redis-${1}.tar.gz;
|
||||
tar xvzf redis-${1}.tar.gz;
|
||||
rm -rf redis-stable;
|
||||
mv redis-${1} redis-stable;
|
||||
tar cvzf redis-stable.tar.gz redis-stable;
|
||||
rm -rf redis-${1}.tar.gz;
|
||||
shasum -a 256 redis-stable.tar.gz > redis-stable.tar.gz.SHA256SUM;
|
||||
"
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
if [ $# != "1" ]
|
||||
then
|
||||
echo "Usage: ./utils/releasetools/03_test_release.sh <version_tag>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TAG=$1
|
||||
TARNAME="redis-${TAG}.tar.gz"
|
||||
DOWNLOADURL="http://download.redis.io/releases/${TARNAME}"
|
||||
|
||||
echo "Doing sanity test on the actual tarball"
|
||||
|
||||
cd /tmp
|
||||
rm -rf test_release_tmp_dir
|
||||
mkdir test_release_tmp_dir
|
||||
cd test_release_tmp_dir
|
||||
rm -f $TARNAME
|
||||
rm -rf redis-${TAG}
|
||||
wget $DOWNLOADURL
|
||||
tar xvzf $TARNAME
|
||||
cd redis-${TAG}
|
||||
make
|
||||
./runtest
|
||||
./runtest-sentinel
|
||||
./runtest-cluster
|
||||
./runtest-moduleapi
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
if [ $# != "1" ]
|
||||
then
|
||||
echo "Usage: ./utils/releasetools/04_release_hash.sh <version_tag>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SHA=$(curl -s http://download.redis.io/releases/redis-${1}.tar.gz | shasum -a 256 | cut -f 1 -d' ')
|
||||
ENTRY="hash redis-${1}.tar.gz sha256 $SHA http://download.redis.io/releases/redis-${1}.tar.gz"
|
||||
echo $ENTRY >> ../redis-hashes/README
|
||||
echo "Press any key to commit, Ctrl-C to abort)."
|
||||
read yes
|
||||
(cd ../redis-hashes; git commit -a -m "${1} hash."; git push)
|
||||
Executable
+35
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env tclsh
|
||||
|
||||
if {[llength $::argv] != 2 && [llength $::argv] != 3} {
|
||||
puts "Usage: $::argv0 <branch> <version> \[<num-commits>\]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
set branch [lindex $::argv 0]
|
||||
set ver [lindex $::argv 1]
|
||||
if {[llength $::argv] == 3} {
|
||||
set count [lindex ::$argv 2]
|
||||
} else {
|
||||
set count 100
|
||||
}
|
||||
|
||||
set template {
|
||||
================================================================================
|
||||
Redis %ver% Released %date%
|
||||
================================================================================
|
||||
|
||||
Upgrade urgency <URGENCY>: <DESCRIPTION>
|
||||
}
|
||||
|
||||
set template [string trim $template]
|
||||
append template "\n\n"
|
||||
set date [clock format [clock seconds]]
|
||||
set template [string map [list %ver% $ver %date% $date] $template]
|
||||
|
||||
append template [exec git log $branch~$count..$branch "--format=format:%an in commit %h:%n %s" --shortstat]
|
||||
|
||||
#Older, more verbose version.
|
||||
#
|
||||
#append template [exec git log $branch~30..$branch "--format=format:+-------------------------------------------------------------------------------%n| %s%n| By %an, %ai%n+--------------------------------------------------------------------------------%nhttps://github.com/redis/redis/commit/%H%n%n%b" --stat]
|
||||
|
||||
puts $template
|
||||
@@ -4,7 +4,7 @@
|
||||
# Software Watchdog, which provides a similar functionality but in
|
||||
# a more reliable / easy to use way.
|
||||
#
|
||||
# Check http://redis.io/topics/latency for more information.
|
||||
# Check https://redis.io/topics/latency for more information.
|
||||
|
||||
#!/bin/bash
|
||||
nsamples=1
|
||||
|
||||
Reference in new issue
Block a user