[lsyncd/el6] * Fri Dec 21 2012 Paul Wouters <pwouters at redhat.com> - 2.1.4-1 - Updated to 2.1.4 - Merged in change
Paul Wouters
pwouters at fedoraproject.org
Fri Dec 21 18:32:16 UTC 2012
commit b1c460bc9d846c00440f069b3a220ad9ca6334f1
Author: Paul Wouters <pwouters at redhat.com>
Date: Fri Dec 21 11:46:16 2012 -0500
* Fri Dec 21 2012 Paul Wouters <pwouters at redhat.com> - 2.1.4-1
- Updated to 2.1.4
- Merged in changes of rhbz#805849
- Fixed URL/Source
- Added initscripts
- Removed prelink/executestack handling - gcc should handle it
(and prelink causes FIPS issues)
.gitignore | 1 +
lsyncd.conf | 11 ++++++
lsyncd.init | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
lsyncd.logrotate | 10 +++++
lsyncd.spec | 66 ++++++++++++++++++++++++++--------
lsyncd.sysconfig | 6 +++
sources | 2 +-
7 files changed, 183 insertions(+), 16 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 959b4e6..e8699bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/lsyncd-2.0.4.tar.gz
+/lsyncd-2.1.4.tar.gz
diff --git a/lsyncd.conf b/lsyncd.conf
new file mode 100644
index 0000000..b2e815a
--- /dev/null
+++ b/lsyncd.conf
@@ -0,0 +1,11 @@
+----
+-- User configuration file for lsyncd.
+--
+-- Simple example for default rsync, but executing moves through on the target.
+--
+-- For more examples, see /usr/share/doc/lsyncd*/examples/
+--
+-- sync{default.rsyncssh, source="/var/www/html", host="localhost", targetdir="/tmp/htmlcopy/"}
+
+
+
diff --git a/lsyncd.init b/lsyncd.init
new file mode 100644
index 0000000..6c46d4d
--- /dev/null
+++ b/lsyncd.init
@@ -0,0 +1,103 @@
+#!/bin/bash
+#
+# chkconfig: - 85 15
+# description: Lightweight inotify based sync daemon
+#
+# processname: lsyncd
+# config: /etc/lsyncd.conf
+# config: /etc/sysconfig/lsyncd
+# pidfile: /var/run/lsyncd.pid
+
+# Source function library
+. /etc/init.d/functions
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+# Check that networking is up.
+[ "$NETWORKING" = "no" ] && exit 0
+
+LSYNCD_OPTIONS="-pidfile /var/run/lsyncd.pid /etc/lsyncd.conf"
+
+if [ -e /etc/sysconfig/lsyncd ]; then
+ . /etc/sysconfig/lsyncd
+fi
+
+RETVAL=0
+
+prog="lsyncd"
+thelock=/var/lock/subsys/lsyncd
+
+start() {
+ [ -f /etc/lsyncd.conf ] || exit 6
+ echo -n $"Starting $prog: "
+ if [ $UID -ne 0 ]; then
+ RETVAL=1
+ failure
+ else
+ daemon /usr/bin/lsyncd $LSYNCD_OPTIONS
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch $thelock
+ fi;
+ echo
+ return $RETVAL
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ if [ $UID -ne 0 ]; then
+ RETVAL=1
+ failure
+ else
+ killproc lsyncd
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && rm -f $thelock
+ fi;
+ echo
+ return $RETVAL
+}
+
+reload(){
+ echo -n $"Reloading $prog: "
+ killproc lsyncd -HUP
+ RETVAL=$?
+ echo
+ return $RETVAL
+}
+
+restart(){
+ stop
+ start
+}
+
+condrestart(){
+ [ -e $thelock ] && restart
+ return 0
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ restart
+ ;;
+ reload)
+ reload
+ ;;
+ condrestart)
+ condrestart
+ ;;
+ status)
+ status lsyncd
+ RETVAL=$?
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
+ RETVAL=1
+esac
+
+exit $RETVAL
diff --git a/lsyncd.logrotate b/lsyncd.logrotate
new file mode 100644
index 0000000..c67f2ee
--- /dev/null
+++ b/lsyncd.logrotate
@@ -0,0 +1,10 @@
+/var/log/lsyncd/*log {
+ missingok
+ notifempty
+ sharedscripts
+ postrotate
+ if [ -f /var/lock/lsyncd ]; then
+ /sbin/service lsyncd restart > /dev/null 2>/dev/null || true
+ fi
+ endscript
+}
diff --git a/lsyncd.spec b/lsyncd.spec
index 09fc453..74f24bd 100644
--- a/lsyncd.spec
+++ b/lsyncd.spec
@@ -1,16 +1,27 @@
Name: lsyncd
-Version: 2.0.4
-Release: 1%{?dist}.1
+Version: 2.1.4
+Release: 1%{?dist}
Summary: File change monitoring and synchronization daemon
-
Group: Applications/Internet
License: GPLv2+
URL: http://code.google.com/p/lsyncd/
Source0: http://lsyncd.googlecode.com/files/%{name}-%{version}.tar.gz
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+Source1: %{name}.init
+Source3: %{name}.sysconfig
+Source4: %{name}.logrotate
+Source5: %{name}.conf
+
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: lua-devel >= 5.1.3
-BuildRequires: prelink
+BuildRequires: asciidoc
+Requires: lua
+Requires: rsync, openssh-clients
+
+Requires(post): chkconfig
+Requires(preun): chkconfig
+Requires(preun): initscripts
+Requires(postun): initscripts
%description
Lsyncd watches a local directory trees event monitor interface (inotify).
@@ -22,36 +33,61 @@ Lsyncd is thus a light-weight live mirror solution that is comparatively
easy to install not requiring new file systems or block devices and does
not hamper local file system performance.
-
%prep
%setup -q
-
%build
%configure
make %{?_smp_mflags}
-# http://code.google.com/p/lsyncd/issues/detail?id=55
-execstack -c lsyncd
-
-
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
-
+install -d 0755 %{buildroot}%{_initrddir}
+install -p -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/lsyncd
+install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
+install -d -m 0755 %{buildroot}%{_localstatedir}/run/%{name}
+install -p -D -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
+install -p -D -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/
%clean
rm -rf $RPM_BUILD_ROOT
-
%files
%defattr(-,root,root,-)
-%{_bindir}/lsyncd
%{_mandir}/man1/lsyncd.1*
-%exclude %{_docdir}/lsyncd
%doc COPYING ChangeLog examples
+%config(noreplace) %{_sysconfdir}/%{name}.conf
+%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
+%attr(0755,root,root) %{_initrddir}/%{name}
+%dir %{_localstatedir}/run/%{name}
+%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
+%{_bindir}/lsyncd
+%exclude %{_docdir}/lsyncd
+
+%post
+/sbin/chkconfig --add %{name}
+mkdir -p
+%preun
+if [ "$1" -eq 0 ]; then
+ /sbin/service %{name} stop >/dev/null 2>&1
+ /sbin/chkconfig --del %{name}
+fi
+
+%postun
+if [ "$1" -ge "1" ]; then
+ /sbin/service %{name} condrestart >/dev/null 2>&1 || :
+fi
%changelog
+* Fri Dec 21 2012 Paul Wouters <pwouters at redhat.com> - 2.1.4-1
+- Updated to 2.1.4
+- Merged in changes of rhbz#805849
+- Fixed URL/Source
+- Added initscripts
+- Removed prelink/executestack handling - gcc should handle it
+ (and prelink causes FIPS issues)
+
* Fri Apr 29 2011 Lubomir Rintel (GoodData) <lubo.rintel at gooddata.com> - 2.0.4-1
- Initial packaging
diff --git a/lsyncd.sysconfig b/lsyncd.sysconfig
new file mode 100644
index 0000000..23fb669
--- /dev/null
+++ b/lsyncd.sysconfig
@@ -0,0 +1,6 @@
+# Keep the space there for systemd. Don't nest variables without
+# changing the systemd service file to use: /usr/bin/sh -c 'eval XXXX'
+#
+#LSYNCD_OPTIONS="-pidfile /var/run/lsyncd.pid /etc/lsyncd.conf"
+
+LSYNCD_OPTIONS=" "
diff --git a/sources b/sources
index ecf2fa1..72fcd61 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-0b4557dd3d87a02ae0cbd7b5fc16cd0c lsyncd-2.0.4.tar.gz
+9302e0c1e9ec8e9da0a1e58c9fb44ecd lsyncd-2.1.4.tar.gz
More information about the scm-commits
mailing list