aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2008-10-24 12:26:41 +0000
committerMartin Wilke <miwi@FreeBSD.org>2008-10-24 12:26:41 +0000
commit1dd44b180eb9cd755ac19dcd06383d9b24ed5e0a (patch)
tree58fd2adf6e092b0b792e9e958222d251f9a1218f /sysutils
parentaad6c199dae4962e6bce0a5ebbdc84cd0c4324d1 (diff)
slack is an evolution from the usual "put files in some central directory"
that is fairly common practice. It's descended from an earlier system its author also wrote, called "subsets", and uses a multi-stage rsync to fix some of the problems he had there. Basically, it's a glorified wrapper around rsync. WWW: http://code.google.com/p/slack/ PR: ports/127911 Submitted by: Steve Atwell
Notes
Notes: svn path=/head/; revision=221985
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/slack/Makefile56
-rw-r--r--sysutils/slack/distinfo3
-rw-r--r--sysutils/slack/files/patch-installpaths187
-rw-r--r--sysutils/slack/pkg-descr8
-rw-r--r--sysutils/slack/pkg-plist20
6 files changed, 275 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 56833bcf5324..afbffd3a9f89 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -663,6 +663,7 @@
SUBDIR += shlock
SUBDIR += sjog
SUBDIR += skill
+ SUBDIR += slack
SUBDIR += sleuthkit
SUBDIR += slmon
SUBDIR += sloth
diff --git a/sysutils/slack/Makefile b/sysutils/slack/Makefile
new file mode 100644
index 000000000000..93f7af3ee84a
--- /dev/null
+++ b/sysutils/slack/Makefile
@@ -0,0 +1,56 @@
+# New ports collection makefile for: slack
+# Date created: 3 October 2008
+# Whom: Steve Atwell
+#
+# $FreeBSD$
+#
+
+PORTNAME= slack
+PORTVERSION= 0.15.2
+CATEGORIES= sysutils
+MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} \
+ http://www.sundell.net/~alan/projects/slack/
+
+MAINTAINER= satwell@disjoint.net
+COMMENT= Configuration management system designed to appeal to lazy admins
+
+RUN_DEPENDS= rsync:${PORTSDIR}/net/rsync
+
+USE_PERL5= 5.6.0+
+USE_GMAKE= yes
+
+MAN1= slack-diff.1
+MAN5= slack.conf.5
+MAN8= slack.8
+
+PORTDOCS= ChangeLog COPYING CREDITS FAQ GPL README TODO \
+ fixfiles-and-dirs.txt slack-intro
+
+MAKE_ARGS= prefix=${PREFIX} exec_prefix=${PREFIX} \
+ libexecdir=${PREFIX}/libexec mandir=${PREFIX}/man \
+ localstatedir=/var
+
+pre-build:
+ ${REINPLACE_CMD} -e '1s,^#!.*perl,#!${PERL},' ${WRKSRC}/test/gen_config_file
+
+post-build:
+ @for f in ${WRKSRC}/src/build/*; do \
+ ${REINPLACE_CMD} -e '1s,^#!.*perl,#!${PERL},' $$f; \
+ done
+
+post-install:
+ @${INSTALL_DATA} ${WRKSRC}/src/build/slack.conf ${PREFIX}/etc/slack.conf.sample
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/ChangeLog ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/COPYING ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/CREDITS ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/FAQ ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/GPL ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/TODO ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/doc/fixfiles-and-dirs.txt ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/doc/slack-intro ${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/sysutils/slack/distinfo b/sysutils/slack/distinfo
new file mode 100644
index 000000000000..abc900f972c7
--- /dev/null
+++ b/sysutils/slack/distinfo
@@ -0,0 +1,3 @@
+MD5 (slack-0.15.2.tar.gz) = 4056df8e7e152a6e4e6730708a86bd25
+SHA256 (slack-0.15.2.tar.gz) = 5c11a6d29035bbb202a5c20c180ae86e8d9fa8ecc89b7f110713d0e0bedf21ce
+SIZE (slack-0.15.2.tar.gz) = 51555
diff --git a/sysutils/slack/files/patch-installpaths b/sysutils/slack/files/patch-installpaths
new file mode 100644
index 000000000000..1ae971fa17fb
--- /dev/null
+++ b/sysutils/slack/files/patch-installpaths
@@ -0,0 +1,187 @@
+diff -uNr ./Makefile.common ../slack-0.15.2/Makefile.common
+--- ./Makefile.common 2008-04-20 18:06:15.000000000 -0700
++++ ../slack-0.15.2/Makefile.common 2008-10-05 09:04:50.000000000 -0700
+@@ -6,7 +6,7 @@
+
+ DESTDIR =
+
+-prefix = /
++prefix =
+ exec_prefix = /usr
+ sysconfdir = ${prefix}/etc
+ mandir = ${exec_prefix}/share/man
+diff -uNr ./src/Makefile ../slack-0.15.2/src/Makefile
+--- ./src/Makefile 2008-04-20 18:06:15.000000000 -0700
++++ ../slack-0.15.2/src/Makefile 2008-10-06 22:48:40.000000000 -0700
+@@ -2,35 +2,53 @@
+
+ include ../Makefile.common
+
++BUILDDIR = build
++
+ BACKENDS = slack-getroles slack-installfiles slack-runscript slack-sync slack-stage slack-rolediff
+
+-all:
++TARGETS = $(addprefix $(BUILDDIR)/,$(BACKENDS)) \
++ $(BUILDDIR)/Slack.pm \
++ $(BUILDDIR)/slack \
++ $(BUILDDIR)/slack-diff \
++ $(BUILDDIR)/slack.conf
++
++all: $(TARGETS)
++
++$(BUILDDIR)/%: %
++ mkdir -p $(BUILDDIR)
++ sed -e 's#@SYSCONFDIR@#$(sysconfdir)#g' \
++ -e 's#@SLACK_LIBDIR@#$(slack_libdir)#g' \
++ -e 's#@SLACK_LIBEXECDIR@#$(slack_libexecdir)#g' \
++ -e 's#@SLACK_LOCALSTATEDIR@#$(slack_localstatedir)#g' \
++ -e 's#@SLACK_LOCALCACHEDIR@#$(slack_localcachedir)#g' $< > $@
+
+ install: install-bin install-conf install-lib install-man
+
+ install-bin: all
+ $(MKDIR) $(DESTDIR)$(sbindir)
+- $(INSTALL) slack $(DESTDIR)$(sbindir)
++ $(INSTALL) $(BUILDDIR)/slack $(DESTDIR)$(sbindir)
+ $(MKDIR) $(DESTDIR)$(bindir)
+- $(INSTALL) slack-diff $(DESTDIR)$(bindir)
++ $(INSTALL) $(BUILDDIR)/slack-diff $(DESTDIR)$(bindir)
+ $(MKDIR) $(DESTDIR)$(slack_libexecdir)
+ @set -ex;\
+ for i in $(BACKENDS); do \
+- $(INSTALL) $$i $(DESTDIR)$(slack_libexecdir); done
++ $(INSTALL) $(BUILDDIR)/$$i $(DESTDIR)$(slack_libexecdir); done
+ $(INSTALL) -d -m $(PRIVDIRMODE) $(DESTDIR)$(slack_localstatedir)
+ $(INSTALL) -d -m $(PRIVDIRMODE) $(DESTDIR)$(slack_localcachedir)
+
+ install-conf: all
+ $(MKDIR) $(DESTDIR)$(sysconfdir)
+- $(INSTALL) -m 0644 slack.conf $(DESTDIR)$(sysconfdir)
++ test -f $(DESTDIR)$(sysconfdir)/slack.conf || \
++ $(INSTALL) -m 0644 $(BUILDDIR)/slack.conf $(DESTDIR)$(sysconfdir)
+
+ install-lib: all
+ $(MKDIR) $(DESTDIR)$(slack_libdir)
+- $(INSTALL) -m 0644 Slack.pm $(DESTDIR)$(slack_libdir)
++ $(INSTALL) -m 0644 $(BUILDDIR)/Slack.pm $(DESTDIR)$(slack_libdir)
+
+ install-man: all
+
+ clean:
++ rm -rf $(BUILDDIR)
+
+ realclean: clean
+
+diff -uNr ./src/slack ../slack-0.15.2/src/slack
+--- ./src/slack 2008-04-20 18:06:15.000000000 -0700
++++ ../slack-0.15.2/src/slack 2008-10-06 20:38:16.000000000 -0700
+@@ -19,8 +19,8 @@
+ use File::Find;
+ use POSIX; # for strftime
+
+-use constant LIBEXEC_DIR => '/usr/lib/slack';
+-use constant LIB_DIR => '/usr/lib/slack';
++use constant LIBEXEC_DIR => '@SLACK_LIBEXECDIR@';
++use constant LIB_DIR => '@SLACK_LIBDIR@';
+ use lib LIB_DIR;
+ use Slack;
+
+diff -uNr ./src/slack.conf ../slack-0.15.2/src/slack.conf
+--- ./src/slack.conf 2008-04-20 18:06:14.000000000 -0700
++++ ../slack-0.15.2/src/slack.conf 2008-10-06 20:37:03.000000000 -0700
+@@ -3,7 +3,7 @@
+ # See slack.conf(5)
+ ROLE_LIST=etc/roles.conf
+ SOURCE=slack-master::slack
+-CACHE=/var/cache/slack
+-STAGE=/var/lib/slack/stage
++CACHE=@SLACK_LOCALCACHEDIR@
++STAGE=@SLACK_LOCALSTATEDIR@/stage
+ ROOT=/
+-BACKUP_DIR=/var/lib/slack/backups
++BACKUP_DIR=@SLACK_LOCALSTATEDIR@/backups
+diff -uNr ./src/slack-getroles ../slack-0.15.2/src/slack-getroles
+--- ./src/slack-getroles 2008-04-20 18:06:14.000000000 -0700
++++ ../slack-0.15.2/src/slack-getroles 2008-10-06 20:37:17.000000000 -0700
+@@ -17,7 +17,7 @@
+
+ use File::Path;
+
+-use constant LIB_DIR => '/usr/lib/slack';
++use constant LIB_DIR => '@SLACK_LIBDIR@';
+ use lib LIB_DIR;
+ use Slack;
+
+diff -uNr ./src/slack-installfiles ../slack-0.15.2/src/slack-installfiles
+--- ./src/slack-installfiles 2008-04-20 18:06:14.000000000 -0700
++++ ../slack-0.15.2/src/slack-installfiles 2008-10-06 20:37:26.000000000 -0700
+@@ -17,7 +17,7 @@
+
+ use File::Path;
+
+-use constant LIB_DIR => '/usr/lib/slack';
++use constant LIB_DIR => '@SLACK_LIBDIR@';
+ use lib LIB_DIR;
+ use Slack;
+
+diff -uNr ./src/Slack.pm ../slack-0.15.2/src/Slack.pm
+--- ./src/Slack.pm 2008-04-20 18:06:14.000000000 -0700
++++ ../slack-0.15.2/src/Slack.pm 2008-10-06 20:37:38.000000000 -0700
+@@ -19,7 +19,7 @@
+ @EXPORT = qw();
+ @EXPORT_OK = qw();
+
+-$DEFAULT_CONFIG_FILE = '/etc/slack.conf';
++$DEFAULT_CONFIG_FILE = '@SYSCONFDIR@/slack.conf';
+
+ my $term;
+
+diff -uNr ./src/slack-rolediff ../slack-0.15.2/src/slack-rolediff
+--- ./src/slack-rolediff 2008-04-20 18:06:14.000000000 -0700
++++ ../slack-0.15.2/src/slack-rolediff 2008-10-06 20:37:45.000000000 -0700
+@@ -18,7 +18,7 @@
+ use File::Path;
+ use File::Find;
+
+-use constant LIB_DIR => '/usr/lib/slack';
++use constant LIB_DIR => '@SLACK_LIBDIR@';
+ use lib LIB_DIR;
+ use Slack;
+
+diff -uNr ./src/slack-runscript ../slack-0.15.2/src/slack-runscript
+--- ./src/slack-runscript 2008-04-20 18:06:14.000000000 -0700
++++ ../slack-0.15.2/src/slack-runscript 2008-10-06 20:37:52.000000000 -0700
+@@ -17,7 +17,7 @@
+ use File::Path;
+ use File::Find;
+
+-use constant LIB_DIR => '/usr/lib/slack';
++use constant LIB_DIR => '@SLACK_LIBDIR@';
+ use lib LIB_DIR;
+ use Slack;
+
+diff -uNr ./src/slack-stage ../slack-0.15.2/src/slack-stage
+--- ./src/slack-stage 2008-04-20 18:06:15.000000000 -0700
++++ ../slack-0.15.2/src/slack-stage 2008-10-06 20:38:01.000000000 -0700
+@@ -19,7 +19,7 @@
+ use File::Path;
+ use File::Find;
+
+-use constant LIB_DIR => '/usr/lib/slack';
++use constant LIB_DIR => '@SLACK_LIBDIR@';
+ use lib LIB_DIR;
+ use Slack;
+
+diff -uNr ./src/slack-sync ../slack-0.15.2/src/slack-sync
+--- ./src/slack-sync 2008-04-20 18:06:14.000000000 -0700
++++ ../slack-0.15.2/src/slack-sync 2008-10-06 20:38:07.000000000 -0700
+@@ -17,7 +17,7 @@
+
+ use File::Path;
+
+-use constant LIB_DIR => '/usr/lib/slack';
++use constant LIB_DIR => '@SLACK_LIBDIR@';
+ use lib LIB_DIR;
+ use Slack;
+
diff --git a/sysutils/slack/pkg-descr b/sysutils/slack/pkg-descr
new file mode 100644
index 000000000000..44a3e8407ec7
--- /dev/null
+++ b/sysutils/slack/pkg-descr
@@ -0,0 +1,8 @@
+slack is an evolution from the usual "put files in some central directory"
+that is fairly common practice. It's descended from an earlier system its
+author also wrote, called "subsets", and uses a multi-stage rsync to fix
+some of the problems he had there.
+
+Basically, it's a glorified wrapper around rsync.
+
+WWW: http://code.google.com/p/slack/
diff --git a/sysutils/slack/pkg-plist b/sysutils/slack/pkg-plist
new file mode 100644
index 000000000000..a66c5183b91b
--- /dev/null
+++ b/sysutils/slack/pkg-plist
@@ -0,0 +1,20 @@
+@unexec if cmp -s %D/etc/slack.conf.sample %D/etc/slack.conf; then rm -f %D/etc/slack.conf; fi
+etc/slack.conf.sample
+@exec if [ ! -f %D/etc/slack.conf ]; then cp -p %D/%F %B/slack.conf; chmod 644 %B/slack.conf; fi
+bin/slack-diff
+lib/slack/Slack.pm
+libexec/slack/slack-getroles
+libexec/slack/slack-installfiles
+libexec/slack/slack-rolediff
+libexec/slack/slack-runscript
+libexec/slack/slack-stage
+libexec/slack/slack-sync
+sbin/slack
+@exec install -d -m 0700 /var/lib/slack
+@exec install -d -m 0700 /var/cache/slack
+@unexec rmdir /var/lib/slack 2>/dev/null || true
+@unexec rmdir /var/lib 2>/dev/null || true
+@unexec rmdir /var/cache/slack 2>/dev/null || true
+@unexec rmdir /var/cache 2>/dev/null || true
+@dirrm lib/slack
+@dirrm libexec/slack