diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..0a80fdce31f59c062e2abba28776e9521eddff30 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.gz filter=lfs diff=lfs merge=lfs -text diff --git a/.lfsconfig b/.lfsconfig new file mode 100644 index 0000000000000000000000000000000000000000..b710fbf44b9c6147fed6cde01eb8c859b14baa52 --- /dev/null +++ b/.lfsconfig @@ -0,0 +1,2 @@ +[lfs] + url = https://artlfs.openeuler.openatom.cn/src-openEuler/redis diff --git a/redis-7.2.7.tar.gz b/redis-7.2.7.tar.gz deleted file mode 100644 index efe8186f6b44a920ce70bf62ba2c4e325fcd9cde..0000000000000000000000000000000000000000 Binary files a/redis-7.2.7.tar.gz and /dev/null differ diff --git a/redis-8.0.2.tar.gz b/redis-8.0.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..bf5648b93e6d1b6a39d67903464c05eee700fee2 --- /dev/null +++ b/redis-8.0.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9296b67b54c91befbcca046d67071c780a1f7c9f9e1ae5ed94773c3bb9b542f +size 3815180 diff --git a/redis-doc-3541d0e.tar.gz b/redis-doc-3541d0e.tar.gz index 0d320e60a4fa4bcc0cd5e5c11191c8f9eb3e5ab7..ba04357205f1a19eb0cb73bc90870e06011ccbc9 100644 Binary files a/redis-doc-3541d0e.tar.gz and b/redis-doc-3541d0e.tar.gz differ diff --git a/redis.logrotate b/redis.logrotate index 3a3d185b6ddfc9315a6397cf056ef2b03752a583..c3dfe7c7d2d5a0c1e87b0caf837c8f3135b67dee 100644 --- a/redis.logrotate +++ b/redis.logrotate @@ -1,6 +1,5 @@ /var/log/redis/*.log { weekly - rotate 10 copytruncate delaycompress compress diff --git a/redis.spec b/redis.spec index 96b73782110ce2d04ab6bac8745acd0312383868..93eea67bc863b6264a34410e7040276b1afc81b7 100644 --- a/redis.spec +++ b/redis.spec @@ -2,18 +2,12 @@ # https://fedoraproject.org/wiki/Packaging:SourceURL "Commit Revision" %global doc_commit 3541d0e20cc4bb7873bdbf51a7717757b806577f %global short_doc_commit %(c=%{doc_commit}; echo ${c:0:7}) - -%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) Name: redis -Version: 7.2.7 -Release: 2 +Version: 8.0.2 +Release: 1 Summary: A persistent key-value database -# redis, hiredis: BSD-3-Clause -# hdrhistogram, jemalloc, lzf, linenoise: BSD-2-Clause -# lua: MIT -# fpconv: BSL-1.0 -License: BSD-3-Clause AND BSD-2-Clause AND MIT AND BSL-1.0 AND CC-BY-SA-4.0 +License: RSAL-2.0 OR SSPL-1.0 OR AGPL-3.0-or-later URL: https://redis.io Source0: http://download.redis.io/releases/%{name}-%{version}.tar.gz Source1: %{name}.logrotate @@ -22,9 +16,10 @@ Source3: %{name}.service Source4: %{name}-limit-systemd Source5: macros.%{name} Source6: https://github.com/%{name}/%{name}-doc/archive/%{doc_commit}/%{name}-doc-%{short_doc_commit}.tar.gz +Source7: %{name}.sysusers # https://github.com/redis/redis/pull/3491 - man pages Patch0001: 0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch -Patch0002: 0002-add-sw_64-support.patch +Patch0002: 0002-add-sw_64-support.patch BuildRequires: systemd BuildRequires: systemd-devel @@ -33,10 +28,8 @@ BuildRequires: make BuildRequires: openssl-devel Requires: /bin/awk Requires: logrotate -Requires(pre): shadow-utils -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd +%{?sysusers_requires_compat} +%{?systemd_requires} %global redis_modules_abi 1 %global redis_modules_dir %{_libdir}/%{name}/modules @@ -49,8 +42,7 @@ Redis is an advanced key-value store. It is often referred to as a dattructure s %prep %setup -q -n %{name}-%{version} -b 6 mv ../%{name}-doc-%{doc_commit} doc -%patch -P0001 -p1 -%patch -P0002 -p1 +%autopatch -p1 mv deps/lua/COPYRIGHT COPYRIGHT-lua mv deps/jemalloc/COPYING COPYING-jemalloc @@ -136,16 +128,13 @@ for page in $(find doc -name \*.md | sed -e 's|.md$||g'); do done # Install rpm macros for redis modules -mkdir -p %{buildroot}%{macrosdir} -install -pDm644 %{SOURCE5} %{buildroot}%{macrosdir}/macros.%{name} +mkdir -p %{buildroot}%{_rpmmacrodir} +install -pDm644 %{SOURCE5} %{buildroot}%{_rpmmacrodir}/macros.%{name} + +install -p -D -m 0644 %{S:7} %{buildroot}%{_sysusersdir}/%{name}.conf %pre -getent group %{name} &> /dev/null || \ -groupadd -r %{name} &> /dev/null -getent passwd %{name} &> /dev/null || \ -useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \ --c 'Redis Database Server' %{name} &> /dev/null -exit 0 +%sysusers_create_compat %{S:7} %post %systemd_post %{name}.service @@ -161,7 +150,7 @@ exit 0 %files -%license COPYING +%license LICENSE.txt %license COPYRIGHT-lua %license COPYING-jemalloc %license COPYING-hiredis @@ -184,9 +173,9 @@ exit 0 %config(noreplace) %{_sysconfdir}/systemd/system/%{name}-sentinel.service.d/limit.conf %{_mandir}/man1/%{name}* %{_mandir}/man5/%{name}* - +%{_sysusersdir}/%{name}.conf %{_includedir}/%{name}module.h -%{macrosdir}/* +%{_rpmmacrodir}/* # specific for documentation (CC-BY-SA) %license doc/LICENSE @@ -194,6 +183,9 @@ exit 0 %{_docdir}/%{name} %changelog +* Wed May 28 2025 Funda Wang - 8.0.2-1 +- update to 8.0.2 + * Fri Mar 07 2025 mahailiang - 7.2.7-2 - add sw_64 support diff --git a/redis.sysusers b/redis.sysusers new file mode 100644 index 0000000000000000000000000000000000000000..04947855a2121cb8f4206e6ebaaa94095c09285b --- /dev/null +++ b/redis.sysusers @@ -0,0 +1 @@ +u redis - "Redis Database Server" /var/lib/redis /sbin/nologin