From ec67af4bd66cb11a9f31f873cad587ea9c221431 Mon Sep 17 00:00:00 2001 From: Nagy Karoly Gabriel Date: Tue, 6 Mar 2012 14:47:58 +0100 Subject: [PATCH] incron: Added incron 0.5.9 - A cron ibased on filesystem events. --- base/incron/incron-0.5.9-Makefile.patch | 135 ++++++++++++++++++++++++ base/incron/incron-0.5.9-gcc44.patch | 95 +++++++++++++++++ base/incron/incron.cache | 23 ++++ base/incron/incron.conf | 15 +++ base/incron/incron.desc | 33 ++++++ 5 files changed, 301 insertions(+) create mode 100644 base/incron/incron-0.5.9-Makefile.patch create mode 100644 base/incron/incron-0.5.9-gcc44.patch create mode 100644 base/incron/incron.cache create mode 100644 base/incron/incron.conf create mode 100644 base/incron/incron.desc diff --git a/base/incron/incron-0.5.9-Makefile.patch b/base/incron/incron-0.5.9-Makefile.patch new file mode 100644 index 000000000..302cdcb8e --- /dev/null +++ b/base/incron/incron-0.5.9-Makefile.patch @@ -0,0 +1,135 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../incron/incron-0.5.9-Makefile.patch +# Copyright (C) 2012 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +From 3f4e9ad5e9cf57fabdcaa3c1bc296b449c061a1b Mon Sep 17 00:00:00 2001 +From: Christian Ruppert +Date: Mon, 31 Jan 2011 16:00:34 +0100 +Subject: [PATCH 2/2] Some improvements + +Respect DESTDIR. +Don't override CXX/CXXFLAGS/LDFLAGS. +Create all necessary directories during install. +Install the example configuration into $(PREFIX)/share/doc/... instead of /etc. +--- + Makefile | 57 +++++++++++++++++++++++++++++---------------------------- + 1 files changed, 29 insertions(+), 28 deletions(-) + +diff --git a/Makefile b/Makefile +index ded8e68..3ffc854 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,15 +1,15 @@ +- + PREFIX = /usr/local + USERDATADIR = /var/spool/incron + SYSDATADIR = /etc/incron.d + CFGDIR = /etc +-MANPATH = /usr/share/man ++MANPATH = $(PREFIX)/share/man + RELEASE = incron-`cat VERSION` + RELEASEDIR = /tmp/$(RELEASE) ++DOCDIR = $(PREFIX)/share/doc/$(RELEASE)/ + + USER = root + +-CXX = g++ ++CXX ?= g++ + INSTALL = install + + OPTIMIZE = -O2 +@@ -17,8 +17,8 @@ DEBUG = -g0 + WARNINGS = -Wall + CXXAUX = -pipe + +-CXXFLAGS = $(OPTIMIZE) $(DEBUG) $(WARNINGS) $(CXXAUX) +-LDFLAGS = $(WARNINGS) ++CXXFLAGS ?= $(OPTIMIZE) $(DEBUG) $(CXXAUX) ++CXXFLAGS += $(WARNINGS) + + PROGRAMS = incrond incrontab + +@@ -29,10 +29,10 @@ INCRONTAB_OBJ = ict-main.o incrontab.o inotify-cxx.o strtok.o incroncfg.o apparg + all: $(PROGRAMS) + + incrond: $(INCROND_OBJ) +- $(CXX) $(LDFLAGS) -o $@ $(INCROND_OBJ) ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(INCROND_OBJ) + + incrontab: $(INCRONTAB_OBJ) +- $(CXX) $(LDFLAGS) -o $@ $(INCRONTAB_OBJ) ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(INCRONTAB_OBJ) + + .cpp.o: + $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $< +@@ -44,33 +44,34 @@ clean: + distclean: clean + + install: all install-man +- [ -d $(PREFIX) ] +- $(INSTALL) -m 04755 -o $(USER) incrontab $(PREFIX)/bin/ +- $(INSTALL) -m 0755 incrond $(PREFIX)/sbin/ +- $(INSTALL) -m 0755 -o $(USER) -d $(USERDATADIR) +- $(INSTALL) -m 0755 -o $(USER) -d $(SYSDATADIR) +- $(INSTALL) -m 0644 -o $(USER) incron.conf.example $(CFGDIR) ++ $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/bin/ ++ $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/sbin/ ++ $(INSTALL) -m 0755 -d $(DESTDIR)$(DOCDIR)/ ++ $(INSTALL) -m 04755 -o $(USER) incrontab $(DESTDIR)$(PREFIX)/bin/ ++ $(INSTALL) -m 0755 incrond $(DESTDIR)$(PREFIX)/sbin/ ++ $(INSTALL) -m 0755 -o $(USER) -d $(DESTDIR)$(USERDATADIR) ++ $(INSTALL) -m 0755 -o $(USER) -d $(DESTDIR)$(SYSDATADIR) ++ $(INSTALL) -m 0644 incron.conf.example $(DESTDIR)$(DOCDIR)/ + + install-man: incrontab.1 incrontab.5 incrond.8 incron.conf.5 +- $(INSTALL) -m 0755 -d $(MANPATH)/man1 +- $(INSTALL) -m 0755 -d $(MANPATH)/man5 +- $(INSTALL) -m 0755 -d $(MANPATH)/man8 +- $(INSTALL) -m 0644 incrontab.1 $(MANPATH)/man1 +- $(INSTALL) -m 0644 incrontab.5 $(MANPATH)/man5 +- $(INSTALL) -m 0644 incrond.8 $(MANPATH)/man8 +- $(INSTALL) -m 0644 incron.conf.5 $(MANPATH)/man5 ++ $(INSTALL) -m 0755 -d $(DESTDIR)$(MANPATH)/man1 ++ $(INSTALL) -m 0755 -d $(DESTDIR)$(MANPATH)/man5 ++ $(INSTALL) -m 0755 -d $(DESTDIR)$(MANPATH)/man8 ++ $(INSTALL) -m 0644 incrontab.1 $(DESTDIR)$(MANPATH)/man1 ++ $(INSTALL) -m 0644 incrontab.5 $(DESTDIR)$(MANPATH)/man5 ++ $(INSTALL) -m 0644 incrond.8 $(DESTDIR)$(MANPATH)/man8 ++ $(INSTALL) -m 0644 incron.conf.5 $(DESTDIR)$(MANPATH)/man5 + + uninstall: uninstall-man +- [ -d $(PREFIX) ] +- rm -f $(PREFIX)/bin/incrontab +- rm -f $(PREFIX)/sbin/incrond +- rm -f $(CFGDIR)/incron.conf.example ++ rm -f $(DESTDIR)$(PREFIX)/bin/incrontab ++ rm -f $(DESTDIR)$(PREFIX)/sbin/incrond ++ rm -rf $(DESTDIR)$(DOCDIR)/ + + uninstall-man: +- rm -f $(MANPATH)/man1/incrontab.1 +- rm -f $(MANPATH)/man5/incrontab.5 +- rm -f $(MANPATH)/man8/incrond.8 +- rm -f $(MANPATH)/man5/incron.conf.5 ++ rm -f $(DESTDIR)$(MANPATH)/man1/incrontab.1 ++ rm -f $(DESTDIR)$(MANPATH)/man5/incrontab.5 ++ rm -f $(DESTDIR)$(MANPATH)/man8/incrond.8 ++ rm -f $(DESTDIR)$(MANPATH)/man5/incron.conf.5 + + update: uninstall install + +-- +1.7.3.4 + diff --git a/base/incron/incron-0.5.9-gcc44.patch b/base/incron/incron-0.5.9-gcc44.patch new file mode 100644 index 000000000..334a5123f --- /dev/null +++ b/base/incron/incron-0.5.9-gcc44.patch @@ -0,0 +1,95 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../incron/incron-0.5.9-gcc44.patch +# Copyright (C) 2012 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +From 09eee740a4b962b4d8140b3256bddc62b6cd8cb5 Mon Sep 17 00:00:00 2001 +From: Christian Ruppert +Date: Mon, 31 Jan 2011 15:04:10 +0100 +Subject: [PATCH 1/2] GCC 4.4 fixes + +http://bts.aiken.cz/view.php?id=385 +http://bts.aiken.cz/view.php?id=447 +--- + appargs.cpp | 1 + + appinst.h | 1 + + incroncfg.cpp | 2 +- + incroncfg.h | 1 + + inotify-cxx.h | 1 + + 5 files changed, 5 insertions(+), 1 deletions(-) + +diff --git a/appargs.cpp b/appargs.cpp +index 3bac9b7..ac238b2 100644 +--- a/appargs.cpp ++++ b/appargs.cpp +@@ -21,6 +21,7 @@ + + + #include ++#include + + #include "strtok.h" + +diff --git a/appinst.h b/appinst.h +index d5f2cbe..bdbc8e7 100644 +--- a/appinst.h ++++ b/appinst.h +@@ -23,6 +23,7 @@ + + + #include ++#include + + + #define APPLOCK_BASEDIR "/var/run" +diff --git a/incroncfg.cpp b/incroncfg.cpp +index 6ff4d76..54fcfc5 100644 +--- a/incroncfg.cpp ++++ b/incroncfg.cpp +@@ -181,7 +181,7 @@ bool IncronCfg::ParseLine(const char* s, std::string& rKey, std::string& rVal) + + bool IncronCfg::IsComment(const char* s) + { +- char* sx = strchr(s, '#'); ++ const char* sx = strchr(s, '#'); + if (sx == NULL) + return false; + +diff --git a/incroncfg.h b/incroncfg.h +index 5d2c5b2..12aaf7d 100644 +--- a/incroncfg.h ++++ b/incroncfg.h +@@ -19,6 +19,7 @@ + + + #include ++#include + #include + + /// Configuration class. +diff --git a/inotify-cxx.h b/inotify-cxx.h +index bb3a0e6..1d98bd7 100644 +--- a/inotify-cxx.h ++++ b/inotify-cxx.h +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + // Please ensure that the following headers take the right place + #include +-- +1.7.3.4 + diff --git a/base/incron/incron.cache b/base/incron/incron.cache new file mode 100644 index 000000000..4007530cc --- /dev/null +++ b/base/incron/incron.cache @@ -0,0 +1,23 @@ + +[TIMESTAMP] 1331041531 Tue Mar 6 14:45:31 2012 +[BUILDTIME] 0 (5) +[SIZE] 0.17 MB, 16 files + +[DEP] bash +[DEP] binutils +[DEP] bzip2 +[DEP] coreutils +[DEP] diffutils +[DEP] fhs +[DEP] findutils +[DEP] gawk +[DEP] gcc +[DEP] glibc +[DEP] grep +[DEP] linux-header +[DEP] make +[DEP] patch +[DEP] runit +[DEP] sed +[DEP] sysfiles +[DEP] tar diff --git a/base/incron/incron.conf b/base/incron/incron.conf new file mode 100644 index 000000000..31086f0c4 --- /dev/null +++ b/base/incron/incron.conf @@ -0,0 +1,15 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../incron/incron.conf +# Copyright (C) 2012 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. A copy of the +# GNU General Public License can be found in the file COPYING. +# --- SDE-COPYRIGHT-NOTE-END --- + +var_append makeinstopt " " "PREFIX=/$prefix" diff --git a/base/incron/incron.desc b/base/incron/incron.desc new file mode 100644 index 000000000..34d7f9732 --- /dev/null +++ b/base/incron/incron.desc @@ -0,0 +1,33 @@ +[COPY] --- SDE-COPYRIGHT-NOTE-BEGIN --- +[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. +[COPY] +[COPY] Filename: package/.../incron/incron.desc +[COPY] Copyright (C) 2012 The OpenSDE Project +[COPY] +[COPY] More information can be found in the files COPYING and README. +[COPY] +[COPY] This program is free software; you can redistribute it and/or modify +[COPY] it under the terms of the GNU General Public License as published by +[COPY] the Free Software Foundation; version 2 of the License. A copy of the +[COPY] GNU General Public License can be found in the file COPYING. +[COPY] --- SDE-COPYRIGHT-NOTE-END --- + +[I] A cron ibased on filesystem events. + +[T] An "inotify cron" system. It consists of a daemon and a table manipulator. +[T] You can use it a similar way as the regular cron. The difference is that +[T] the inotify cron handles filesystem events rather than time periods. + +[U] http://inotify.aiken.cz/download/incron + +[A] Lukas Jelinek +[M] Nagy Karoly Gabriel + +[C] extra/tool + +[L] GPL +[S] Stable +[V] 0.5.9 +[P] X -----5---9 800.000 + +[D] 645340051 incron-0.5.9.tar.bz2 http://inotify.aiken.cz/download/incron/