!7 Update to 2.3.1
From: @lyn1001 Reviewed-by: @caodongxia Signed-off-by: @caodongxia
This commit is contained in:
commit
3bae4d4e40
11
cmake-DOCDIR.patch
Normal file
11
cmake-DOCDIR.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
diff -up lsyncd-2.3.0/CMakeLists.txt.DOCDIR lsyncd-2.3.0/CMakeLists.txt
|
||||||
|
--- lsyncd-2.3.0/CMakeLists.txt.DOCDIR 2022-07-25 23:43:45.064362147 -0400
|
||||||
|
+++ lsyncd-2.3.0/CMakeLists.txt 2022-07-26 00:09:35.991866381 -0400
|
||||||
|
@@ -130,5 +130,5 @@ target_link_libraries( lsyncd ${LUA_LIBR
|
||||||
|
|
||||||
|
install( TARGETS lsyncd RUNTIME DESTINATION bin )
|
||||||
|
install( FILES docs/manpage/lsyncd.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT man )
|
||||||
|
-install( DIRECTORY examples DESTINATION doc )
|
||||||
|
-install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION doc OPTIONAL)
|
||||||
|
+install( DIRECTORY examples DESTINATION ${CMAKE_INSTALL_DOCDIR} )
|
||||||
|
+install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${CMAKE_INSTALL_DOCDIR} OPTIONAL)
|
||||||
@ -1,12 +0,0 @@
|
|||||||
diff -up lsyncd-42413cabbedca429d55a5378f6e830f191f3cc86/CMakeLists.txt.LUA_COMPAT_5_3 lsyncd-42413cabbedca429d55a5378f6e830f191f3cc86/CMakeLists.txt
|
|
||||||
--- lsyncd-42413cabbedca429d55a5378f6e830f191f3cc86/CMakeLists.txt.LUA_COMPAT_5_3 2020-12-08 19:33:54.268016329 -0500
|
|
||||||
+++ lsyncd-42413cabbedca429d55a5378f6e830f191f3cc86/CMakeLists.txt 2020-12-08 20:39:49.941802873 -0500
|
|
||||||
@@ -4,6 +4,8 @@ cmake_minimum_required( VERSION 2.8 )
|
|
||||||
set( LSYNCD_VERSION 2.2.3 )
|
|
||||||
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/" )
|
|
||||||
|
|
||||||
+# Enable Lua 5.3 compatibility macros
|
|
||||||
+add_definitions(-DLUA_COMPAT_5_3)
|
|
||||||
|
|
||||||
# finding Lua
|
|
||||||
find_package( Lua REQUIRED )
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
From 5e08ea2cefd61cd50685c54b30d39845fcc485fe Mon Sep 17 00:00:00 2001
|
|
||||||
From: Torben Jaeger <torben@jit-central.com>
|
|
||||||
Date: Thu, 8 Aug 2019 17:37:05 +0200
|
|
||||||
Subject: [PATCH] fix different version format in lua.h
|
|
||||||
|
|
||||||
---
|
|
||||||
cmake/FindLua.cmake | 12 ++++++++++--
|
|
||||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/cmake/FindLua.cmake b/cmake/FindLua.cmake
|
|
||||||
index 6d33dbe..ef9c685 100644
|
|
||||||
--- a/cmake/FindLua.cmake
|
|
||||||
+++ b/cmake/FindLua.cmake
|
|
||||||
@@ -102,9 +102,17 @@ ENDIF(LUA_LIBRARY)
|
|
||||||
|
|
||||||
# Determine Lua version
|
|
||||||
IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
|
|
||||||
- FILE(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"")
|
|
||||||
+ FILE(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_major_str REGEX "^#define[ \t]+LUA_VERSION_MAJOR[ \t]+\".+\"")
|
|
||||||
+ FILE(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_minor_str REGEX "^#define[ \t]+LUA_VERSION_MINOR[ \t]+\".+\"")
|
|
||||||
+ FILE(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_release_str REGEX "^#define[ \t]+LUA_VERSION_RELEASE[ \t]+\".+\"")
|
|
||||||
|
|
||||||
- STRING(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
|
|
||||||
+ STRING(REGEX REPLACE "^#define[ \t]+LUA_VERSION_MAJOR[ \t]+\"([^\"]+)\".*" "\\1" LUA_VERSION_MAJOR "${lua_version_major_str}")
|
|
||||||
+ STRING(REGEX REPLACE "^#define[ \t]+LUA_VERSION_MINOR[ \t]+\"([^\"]+)\".*" "\\1" LUA_VERSION_MINOR "${lua_version_minor_str}")
|
|
||||||
+ STRING(REGEX REPLACE "^#define[ \t]+LUA_VERSION_RELEASE[ \t]+\"([^\"]+)\".*" "\\1" LUA_VERSION_RELEASE "${lua_version_release_str}")
|
|
||||||
+
|
|
||||||
+ STRING(CONCAT LUA_VERSION_STRING ${LUA_VERSION_MAJOR} "." ${LUA_VERSION_MINOR} "." ${LUA_VERSION_RELEASE})
|
|
||||||
+
|
|
||||||
+ #STRING(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
|
|
||||||
UNSET(lua_version_str)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
diff -up lsyncd-release-2.2.3/CMakeLists.txt.orig lsyncd-release-2.2.3/CMakeLists.txt
|
|
||||||
--- lsyncd-release-2.2.3/CMakeLists.txt.orig 2018-03-09 07:39:11.000000000 -0500
|
|
||||||
+++ lsyncd-release-2.2.3/CMakeLists.txt 2020-12-08 15:00:44.112179103 -0500
|
|
||||||
@@ -107,5 +107,5 @@ add_executable( lsyncd ${LSYNCD_SRC} )
|
|
||||||
target_link_libraries( lsyncd ${LUA_LIBRARIES} )
|
|
||||||
|
|
||||||
install( TARGETS lsyncd RUNTIME DESTINATION bin )
|
|
||||||
-install( FILES doc/manpage/lsyncd.1 DESTINATION man )
|
|
||||||
+install( FILES doc/manpage/lsyncd.1 DESTINATION /usr/share/man/man1/ )
|
|
||||||
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
From 0af99d8d5ba35118e8799684a2d4a8ea4b0c6957 Mon Sep 17 00:00:00 2001
|
|
||||||
From: yokogawa-k <yokogawa-k@klab.com>
|
|
||||||
Date: Mon, 26 Mar 2018 17:11:29 +0900
|
|
||||||
Subject: [PATCH] fix non-versioned lua not search in cmake
|
|
||||||
|
|
||||||
"FOREACH" ignore empty elements, but "FOREACH IN LISTS" include emoty elements.
|
|
||||||
https://cmake.org/cmake/help/latest/command/foreach.html
|
|
||||||
---
|
|
||||||
cmake/FindLua.cmake | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/cmake/FindLua.cmake b/cmake/FindLua.cmake
|
|
||||||
index 1f95bf9..6d33dbe 100644
|
|
||||||
--- a/cmake/FindLua.cmake
|
|
||||||
+++ b/cmake/FindLua.cmake
|
|
||||||
@@ -39,7 +39,7 @@ SET(_POSSIBLE_LUA_INCLUDE include include/lua)
|
|
||||||
SET(_POSSIBLE_SUFFIXES "52" "5.2" "-5.2" "53" "5.3" "-5.3" "")
|
|
||||||
|
|
||||||
# Set up possible search names and locations
|
|
||||||
-FOREACH(_SUFFIX ${_POSSIBLE_SUFFIXES})
|
|
||||||
+FOREACH(_SUFFIX IN LISTS _POSSIBLE_SUFFIXES)
|
|
||||||
LIST(APPEND _POSSIBLE_LUA_INCLUDE "include/lua${_SUFFIX}")
|
|
||||||
LIST(APPEND _POSSIBLE_LUA_EXECUTABLE "lua${_SUFFIX}")
|
|
||||||
LIST(APPEND _POSSIBLE_LUA_COMPILER "luac${_SUFFIX}")
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
diff -up lsyncd-42413cabbedca429d55a5378f6e830f191f3cc86/cmake/FindLua.cmake.lua54 lsyncd-42413cabbedca429d55a5378f6e830f191f3cc86/cmake/FindLua.cmake
|
|
||||||
--- lsyncd-42413cabbedca429d55a5378f6e830f191f3cc86/cmake/FindLua.cmake.lua54 2020-12-08 19:14:57.365310674 -0500
|
|
||||||
+++ lsyncd-42413cabbedca429d55a5378f6e830f191f3cc86/cmake/FindLua.cmake 2020-12-08 19:26:11.064284269 -0500
|
|
||||||
@@ -36,7 +36,7 @@ SET(_POSSIBLE_LUA_INCLUDE include includ
|
|
||||||
#SET(_POSSIBLE_LUA_LIBRARY lua)
|
|
||||||
|
|
||||||
# Determine possible naming suffixes (there is no standard for this)
|
|
||||||
-SET(_POSSIBLE_SUFFIXES "52" "5.2" "-5.2" "53" "5.3" "-5.3" "")
|
|
||||||
+SET(_POSSIBLE_SUFFIXES "54" "5.4" "-5.4" "53" "5.3" "-5.3" "52" "5.2" "-5.2" "")
|
|
||||||
|
|
||||||
# Set up possible search names and locations
|
|
||||||
FOREACH(_SUFFIX IN LISTS _POSSIBLE_SUFFIXES)
|
|
||||||
Binary file not shown.
BIN
lsyncd-2.3.1.tar.gz
Normal file
BIN
lsyncd-2.3.1.tar.gz
Normal file
Binary file not shown.
@ -1,13 +1,15 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Live Syncing (Mirror) Daemon
|
Description=Live Syncing (Mirror) Daemon
|
||||||
Documentation=man:lsyncd(1) https://axkibe.github.io/lsyncd/
|
Documentation=man:lsyncd(1) file://usr/share/doc/lsyncd/README.md https://axkibe.github.io/lsyncd/
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
|
Nice=19
|
||||||
EnvironmentFile=-/etc/sysconfig/lsyncd
|
EnvironmentFile=-/etc/sysconfig/lsyncd
|
||||||
ExecStart=/usr/bin/lsyncd -nodaemon $LSYNCD_OPTIONS
|
ExecStart=/usr/bin/lsyncd -nodaemon $LSYNCD_OPTIONS
|
||||||
Restart=on-failure
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
Restart=always
|
||||||
SuccessExitStatus=143
|
SuccessExitStatus=143
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|||||||
27
lsyncd.spec
27
lsyncd.spec
@ -1,25 +1,21 @@
|
|||||||
%global _hardened_build 1
|
%global _hardened_build 1
|
||||||
%global gittag0 release-2.2.3
|
%global gittag0 v2.3.1
|
||||||
%global commit0 42413cabbedca429d55a5378f6e830f191f3cc86
|
%global commit0 6d59f16140468242fe157b4a5adf36d6a93cf6a4
|
||||||
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
|
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
|
||||||
Name: lsyncd
|
Name: lsyncd
|
||||||
Version: 2.2.3
|
Version: 2.3.1
|
||||||
Release: 2
|
Release: 1
|
||||||
Summary: File change monitoring and synchronization daemon
|
Summary: File change monitoring and synchronization daemon
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://github.com/axkibe/lsyncd/
|
URL: https://github.com/axkibe/lsyncd/
|
||||||
Source0: https://github.com/axkibe/%{name}/archive/%{gittag0}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/axkibe/%{name}/archive/%{gittag0}/%{name}-%{version}.tar.gz
|
||||||
Patch0: cmake-docpath.patch
|
Patch0: cmake-DOCDIR.patch
|
||||||
Patch1: cmake-define-LUA_COMPAT_5_3.patch
|
|
||||||
Patch3: cmake-find-lua-suffixes.patch
|
|
||||||
Patch2: cmake-prefer-lua-54.patch
|
|
||||||
Patch4: cmake-determine-lua-version.patch
|
|
||||||
Source1: lsyncd.sysconfig
|
Source1: lsyncd.sysconfig
|
||||||
Source2: lsyncd.logrotate
|
Source2: lsyncd.logrotate
|
||||||
Source3: lsyncd.conf
|
Source3: lsyncd.conf
|
||||||
Source4: lsyncd.service
|
Source4: lsyncd.service
|
||||||
Source5: lsyncd.sysctl
|
Source5: lsyncd.sysctl
|
||||||
BuildRequires: asciidoc cmake gcc gcc-c++ lua lua-devel >= 5.1.3 systemd rsync
|
BuildRequires: asciidoc cmake gcc gcc-c++ lua lua-devel >= 5.2 systemd rsync
|
||||||
Requires: lua rsync
|
Requires: lua rsync
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -32,10 +28,10 @@ easy to install not requiring new file systems or block devices and does
|
|||||||
not hamper local file system performance.
|
not hamper local file system performance.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-release-%{version} -p1
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake
|
%cmake -DCMAKE_INSTALL_MANDIR:PATH=%{_mandir} -DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name}
|
||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -43,7 +39,7 @@ not hamper local file system performance.
|
|||||||
install -p -d -m 0755 %{buildroot}%{_var}/log/%{name}
|
install -p -d -m 0755 %{buildroot}%{_var}/log/%{name}
|
||||||
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/lsyncd
|
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/lsyncd
|
||||||
install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/lsyncd
|
install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/lsyncd
|
||||||
install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/
|
install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/lsyncd.conf
|
||||||
install -p -D -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/lsyncd.service
|
install -p -D -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/lsyncd.service
|
||||||
install -p -D -m 0644 %{SOURCE5} %{buildroot}%{_sysctldir}/50-lsyncd.conf
|
install -p -D -m 0644 %{SOURCE5} %{buildroot}%{_sysctldir}/50-lsyncd.conf
|
||||||
|
|
||||||
@ -63,7 +59,7 @@ make
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc ChangeLog examples
|
%doc ChangeLog examples README.md
|
||||||
%doc %{_mandir}/man1/lsyncd.1.*
|
%doc %{_mandir}/man1/lsyncd.1.*
|
||||||
%config(noreplace) %{_sysconfdir}/lsyncd.conf
|
%config(noreplace) %{_sysconfdir}/lsyncd.conf
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/lsyncd
|
%config(noreplace) %{_sysconfdir}/sysconfig/lsyncd
|
||||||
@ -74,6 +70,9 @@ make
|
|||||||
%{_unitdir}/lsyncd.service
|
%{_unitdir}/lsyncd.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu May 4 2023 liyanan <thistleslyn@163.com> - 2.3.1-1
|
||||||
|
- update to 2.3.1
|
||||||
|
|
||||||
* Sat Jun 05 2021 maminjie <maminjie1@huawei.com> - 2.2.3-2
|
* Sat Jun 05 2021 maminjie <maminjie1@huawei.com> - 2.2.3-2
|
||||||
- Repair status failure after stopping service
|
- Repair status failure after stopping service
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user