diff --git a/0001-utils-fileUtils-Fix-null-string.patch b/0001-utils-fileUtils-Fix-null-string.patch deleted file mode 100644 index 7c2bf378c7ddd3c36bd39af74b07137e5b4f2a14..0000000000000000000000000000000000000000 --- a/0001-utils-fileUtils-Fix-null-string.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 52f12fea424e62dc6b14aff69406eebe76bf2984 Mon Sep 17 00:00:00 2001 -From: "Christopher N. Hesse" -Date: Wed, 3 Apr 2019 22:23:06 +0200 -Subject: [PATCH 1/2] utils: fileUtils: Fix null string - -syncAndCloseFile() takes an error message string as second argument, so -do not pass NULL. - -Signed-off-by: Christopher N. Hesse ---- - utils/uds/fileUtils.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/utils/uds/fileUtils.c b/utils/uds/fileUtils.c -index d3f6e70..43f1e10 100644 ---- a/utils/uds/fileUtils.c -+++ b/utils/uds/fileUtils.c -@@ -157,7 +157,7 @@ int syncAndCloseFile(int fd, const char *errorMessage) - /**********************************************************************/ - void trySyncAndCloseFile(int fd) - { -- int result = syncAndCloseFile(fd, NULL); -+ int result = syncAndCloseFile(fd, ""); - if (result != UDS_SUCCESS) { - logDebugWithStringError(result, "error syncing and closing file"); - } --- -2.21.0 - diff --git a/0001-vdo-6.2.0.298-add-loongarch64-support.patch b/0001-vdo-6.2.0.298-add-loongarch64-support.patch index ec6e6b78ea9f8d3ec69b0163f67c8e8e5cef02f1..cf8089b6ea2f15c9ef42e7236eedc906d99db2aa 100644 --- a/0001-vdo-6.2.0.298-add-loongarch64-support.patch +++ b/0001-vdo-6.2.0.298-add-loongarch64-support.patch @@ -1,18 +1,18 @@ From 5671abc0df13895d2f13a4646a6ebd2af29f37ca Mon Sep 17 00:00:00 2001 From: Huang Yang Date: Tue, 14 Feb 2023 11:34:45 +0800 -Subject: [PATCH] vdo 6.2.0.298 add loongarch64 support +Subject: [PATCH] vdo 8.1.0.264 add loongarch64 support --- - utils/uds/atomicDefs.h | 8 +++++++- + utils/uds/atomicDefs.h | 6 ++++++ utils/uds/cpu.h | 2 +- - 2 files changed, 8 insertions(+), 2 deletions(-) + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/utils/uds/atomicDefs.h b/utils/uds/atomicDefs.h -index 86d6a4a..2508f40 100644 +index 1552783..68fa8ee 100644 --- a/utils/uds/atomicDefs.h +++ b/utils/uds/atomicDefs.h -@@ -96,6 +96,8 @@ static INLINE void smp_mb(void) +@@ -97,6 +97,8 @@ static INLINE void smp_mb(void) __asm__ __volatile__("bcr 14,0" : : : "memory"); #elif defined __PPC__ __asm__ __volatile__("sync" : : : "memory"); @@ -21,7 +21,7 @@ index 86d6a4a..2508f40 100644 #else #error "no fence defined" #endif -@@ -121,6 +123,8 @@ static INLINE void smp_rmb(void) +@@ -122,6 +124,8 @@ static INLINE void smp_rmb(void) __asm__ __volatile__("bcr 14,0" : : : "memory"); #elif defined __PPC__ __asm__ __volatile__("lwsync" : : : "memory"); @@ -30,7 +30,7 @@ index 86d6a4a..2508f40 100644 #else #error "no fence defined" #endif -@@ -146,6 +150,8 @@ static INLINE void smp_wmb(void) +@@ -147,6 +151,8 @@ static INLINE void smp_wmb(void) __asm__ __volatile__("bcr 14,0" : : : "memory"); #elif defined __PPC__ __asm__ __volatile__("lwsync" : : : "memory"); @@ -39,17 +39,8 @@ index 86d6a4a..2508f40 100644 #else #error "no fence defined" #endif -@@ -172,7 +178,7 @@ static INLINE void smp_mb__before_atomic(void) - static INLINE void smp_read_barrier_depends(void) - { - #if defined(__x86_64__) || defined(__PPC__) || defined(__s390__) \ -- || defined(__aarch64__) -+ || defined(__aarch64__) || defined(__loongarch64) - // Nothing needed for these architectures. - #else - // Default to playing it safe. diff --git a/utils/uds/cpu.h b/utils/uds/cpu.h -index 8b12a16..d987a1a 100644 +index 5e36066..3681cc6 100644 --- a/utils/uds/cpu.h +++ b/utils/uds/cpu.h @@ -36,7 +36,7 @@ @@ -58,7 +49,7 @@ index 8b12a16..d987a1a 100644 #define CACHE_LINE_BYTES 256 -#elif defined(__x86_64__) || defined(__aarch64__) +#elif defined(__x86_64__) || defined(__aarch64__) || defined(__loongarch64) - #define CACHE_LINE_BYTES 64 + #define CACHE_LINE_BYTES 64 #else #error "unknown cache line size" -- diff --git a/0002-Ignore-misaligned-pointers.patch b/0002-Ignore-misaligned-pointers.patch deleted file mode 100644 index 85cc8620837ac465773f8cc13f37018c35910b82..0000000000000000000000000000000000000000 --- a/0002-Ignore-misaligned-pointers.patch +++ /dev/null @@ -1,38 +0,0 @@ -From a85f6e9973697f90d11e9beb1eb16206774e4767 Mon Sep 17 00:00:00 2001 -From: "Christopher N. Hesse" -Date: Wed, 3 Apr 2019 22:24:29 +0200 -Subject: [PATCH 2/2] Ignore misaligned pointers - -Signed-off-by: Christopher N. Hesse ---- - utils/vdo/base/Makefile | 1 + - utils/vdo/user/Makefile | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/utils/vdo/base/Makefile b/utils/vdo/base/Makefile -index 4f2ed82..6d4c4e8 100644 ---- a/utils/vdo/base/Makefile -+++ b/utils/vdo/base/Makefile -@@ -46,6 +46,7 @@ C_WARNS = \ - -Wnested-externs \ - -Wold-style-definition \ - -Wswitch-default \ -+ -Wno-address-of-packed-member \ - - OPT_FLAGS = -O3 -fno-omit-frame-pointer - DEBUG_FLAGS = -diff --git a/utils/vdo/user/Makefile b/utils/vdo/user/Makefile -index b0a60d0..811dd8a 100644 ---- a/utils/vdo/user/Makefile -+++ b/utils/vdo/user/Makefile -@@ -48,6 +48,7 @@ C_WARNS = \ - -Wnested-externs \ - -Wold-style-definition \ - -Wswitch-default \ -+ -Wno-address-of-packed-member \ - - OPT_FLAGS = -O3 -fno-omit-frame-pointer - DEBUG_FLAGS = --- -2.21.0 - diff --git a/8.1.0.264.tar.gz b/8.1.0.264.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..34831a08ce6ae956f62996b22955452828b95917 Binary files /dev/null and b/8.1.0.264.tar.gz differ diff --git a/Adapt-service-file.patch b/Adapt-service-file.patch new file mode 100644 index 0000000000000000000000000000000000000000..4c08410887208055f6c3c2f050e66bc8230dc74f --- /dev/null +++ b/Adapt-service-file.patch @@ -0,0 +1,30 @@ +From ec4859836b01af44977421edda5670045fca5c0a Mon Sep 17 00:00:00 2001 +From: wang--ge +Date: Tue, 7 May 2024 19:52:23 +0800 +Subject: [PATCH] adapt service file + +--- + examples/systemd/vdo.service | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/examples/systemd/vdo.service b/examples/systemd/vdo.service +index abfd836..3bf9371 100644 +--- a/examples/systemd/vdo.service ++++ b/examples/systemd/vdo.service +@@ -1,3 +1,13 @@ + [Unit] + Description=VDO volume services (provided for compatibility) + Documentation=man:vdo(8) ++After=systemd-remount-fs.service ++ ++[Service] ++Type=oneshot ++RemainAfterExit=yes ++ExecStart=/usr/bin/vdo start --all --confFile /etc/vdoconf.yml ++ExecStop=/usr/bin/vdo stop --all --confFile /etc/vdoconf.yml ++ ++[Install] ++WantedBy=multi-user.target +-- +2.33.0 + diff --git a/vdo-84517ca.tar.gz b/vdo-84517ca.tar.gz deleted file mode 100644 index 4167000d3a49f6d552bdbb6eb683416e3606522f..0000000000000000000000000000000000000000 Binary files a/vdo-84517ca.tar.gz and /dev/null differ diff --git a/vdo.spec b/vdo.spec index 11740827eb12bdd0b66c127c06dde01737af65b6..75d549e8093869b5ac6b6aedd7d598e6f3855020 100644 --- a/vdo.spec +++ b/vdo.spec @@ -1,16 +1,14 @@ -%global commit 84517ca07dce84b4921aa5731fd48a114f6884a4 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - Name: vdo -Version: 6.2.0.298 -Release: 14 +Version: 8.1.0.264 +Release: 1 Summary: Management tools for Virtual Data Optimizer License: GPLv2 URL: http://github.com/dm-vdo/vdo -Source0: https://github.com/dm-vdo/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz -Patch0001: 0001-utils-fileUtils-Fix-null-string.patch -Patch0002: 0002-Ignore-misaligned-pointers.patch -Patch0003: 0001-vdo-6.2.0.298-add-loongarch64-support.patch +Source0: https://github.com/dm-vdo/vdo/archive/refs/tags/%{version}.tar.gz +%ifarch loongarch64 +Patch0001: 0001-vdo-6.2.0.298-add-loongarch64-support.patch +%endif +Patch0002: Adapt-service-file.patch BuildRequires: gcc libuuid-devel device-mapper-devel device-mapper-event-devel BuildRequires: valgrind-devel python3 python3-devel zlib-devel systemd @@ -28,12 +26,7 @@ This package provides the user-space management tools for VDO. %package_help %prep -%setup -n %{name}-%{commit} -%patch -p1 -P1 -%patch -p1 -P2 -%ifarch loongarch64 -%patch -p1 -P3 -%endif +%autosetup -n %{name}-%{version} -p1 %build %make_build @@ -46,8 +39,7 @@ This package provides the user-space management tools for VDO. # Fix the python3 shebangs for file in %{_bindir}/vdo \ - %{_bindir}/vdostats \ - %{_defaultdocdir}/%{name}/examples/ansible/vdo.py + %{_bindir}/vdostats do pathfix.py -pni "%{__python3}" %{buildroot}${file} done @@ -80,12 +72,19 @@ done %{python3_sitelib}/%{name}/utils/* %{_unitdir}/vdo.service %{_presetdir}/97-vdo.preset +/bash_completion.d/vdo +/bash_completion.d/vdostats +/etc/udev/rules.d/69-vdo-start-by-dev.rules +/usr/lib/systemd/system/vdo-start-by-dev@.service %files help %defattr(-,root,root) %{_mandir}/man8/* %changelog +* Tue May 07 2024 Ge Wang - 8.1.0.264-1 +- Upgrade to 8.1.0.264 + * Tue Feb 14 2023 Huang Yang - 6.2.0.298-14 - add loongarch64 support