From 97d433ef07683a193be8ac2e9e8bce8ac6395f66 Mon Sep 17 00:00:00 2001 From: Matthew Story Date: Sun, 3 Jun 2012 03:49:44 -0400 Subject: [PATCH 01/20] fixes a few docs issues. missing word program in a few places, change runs to executes as it is more correct, change trigger-listen to trigger-wait in trigger-listen -t documentation Signed-off-by: Matthew Story --- doc/trigger-listen.txt | 2 +- doc/trigger-pull.txt | 5 +---- doc/trigger-wait.txt | 8 ++++---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/doc/trigger-listen.txt b/doc/trigger-listen.txt index 86b75cd..bb6662f 100644 --- a/doc/trigger-listen.txt +++ b/doc/trigger-listen.txt @@ -2,7 +2,7 @@ :doctype: manpage == NAME -trigger-listen - listen to a fifo and run a command +trigger-listen - listen to a fifo and execute a command == SYNOPSIS !!!! diff --git a/doc/trigger-pull.txt b/doc/trigger-pull.txt index 3e6cd30..9d7c9cd 100644 --- a/doc/trigger-pull.txt +++ b/doc/trigger-pull.txt @@ -10,7 +10,7 @@ trigger-pull _path_ !!!! == DESCRIPTION -The +trigger-pull+ performs a non-blocking write of one byte of data to +The +trigger-pull+ program performs a non-blocking write of one byte of data to +_path_+. == EXIT STATUS @@ -23,6 +23,3 @@ lack of reader on the fifo +_path_+, treating these as successes. !!!! trigger-pull ./trigger !!!! - - - diff --git a/doc/trigger-wait.txt b/doc/trigger-wait.txt index 51d31c8..f12681f 100644 --- a/doc/trigger-wait.txt +++ b/doc/trigger-wait.txt @@ -2,7 +2,7 @@ :doctype: manpage == NAME -trigger-wait - listen to a trigger and optionally run a command +trigger-wait - listen to a trigger and optionally execute a command == SYNOPSIS !!!! @@ -11,15 +11,15 @@ trigger-wait [ -wWdD -t _timeout_ ] _path_ [ _prog_ ] == DESCRIPTION -The +trigger-wait+ listens for input on the fifo +_path_+. If +_prog_+ is -present, +trigger-wait+ runs it and optionally waits for it to complete. It +The +trigger-wait+ program listens for input on the fifo +_path_+. If +_prog_+ is +present, +trigger-wait+ executes it and optionally waits for it to complete. It then exits 0 if it received a trigger pull and 99 otherwise. === OPTIONS +-t _timeout_+:: Wait at most +_timeout_+ seconds for a trigger pull. If +_timeout_+ -seconds elapse without a trigger pull, then +trigger-listen+ pulls +seconds elapse without a trigger pull, then +trigger-wait+ pulls its own trigger. The default value of +_timeout_+ is +(unsigned int)~0+. From 8c75e5bb209388e46792dc58503bee0feec46c4c Mon Sep 17 00:00:00 2001 From: Matthew Story Date: Sun, 3 Jun 2012 05:39:23 -0400 Subject: [PATCH 02/20] trigger-pull manpage, referencing other manpages appropriately, with the addition of an informative SEE ALSO section Signed-off-by: Matthew Story --- doc/trigger-pull.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/trigger-pull.txt b/doc/trigger-pull.txt index 9d7c9cd..692509d 100644 --- a/doc/trigger-pull.txt +++ b/doc/trigger-pull.txt @@ -2,24 +2,26 @@ :doctype: manpage == NAME -trigger-pull - write a non-blocking byte to a fifo to pull a trigger +trigger-pull - write a non-blocking byte to a fifo(7) to pull a trigger == SYNOPSIS !!!! -trigger-pull _path_ ++trigger-pull+ +_path_+ !!!! == DESCRIPTION -The +trigger-pull+ program performs a non-blocking write of one byte of data to -+_path_+. +The +trigger-pull+ program performs a non-blocking +write(2)+ of one byte of +data to +_path_+. == EXIT STATUS The +trigger-pull+ program exits 100 for incorrect usage and 111 for temporary -errors. It does not retry if the write would have blocked and it ignores the -lack of reader on the fifo +_path_+, treating these as successes. - +errors. It does not retry if the +write(2)+ would have blocked and it ignores the +lack of reader on the +fifo(7)+ +_path_+, treating these as successes. == EXAMPLES !!!! trigger-pull ./trigger !!!! + +== SEE ALSO ++mkfifo(1)+, +trigger-listen(1)+, +trigger-wait(1)+, +fifo(7)+ From 1f1072a353bb1103b6175a227c240b5110028200 Mon Sep 17 00:00:00 2001 From: Matthew Story Date: Sun, 3 Jun 2012 06:07:06 -0400 Subject: [PATCH 03/20] trigger-listen manpage, referencing other manpages appropriately, with the addition of an informative SEE ALSO section Signed-off-by: Matthew Story --- doc/trigger-listen.txt | 60 ++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/doc/trigger-listen.txt b/doc/trigger-listen.txt index bb6662f..4579c24 100644 --- a/doc/trigger-listen.txt +++ b/doc/trigger-listen.txt @@ -2,19 +2,22 @@ :doctype: manpage == NAME -trigger-listen - listen to a fifo and execute a command +trigger-listen - listen to a fifo(7) and execute a command + == SYNOPSIS !!!! -trigger-listen [ -UdDqQv1 -c _limit_ -t _timeout_ -i _interval_ -g _gid_ -u _uid_ ] _path_ _prog_ ++trigger-listen+ [ +-UdDqQv1+ +-c+ +_limit_+ +-t+ +_timeout_+ +-i+ +_interval_+ +-g+ +_gid_+ +-u+ +_uid_+ ] +_path_+ +_prog_+ !!!! + == DESCRIPTION -The +trigger-listen+ program listens for input on the fifo +_path_+. When -it receives input +trigger-listen+ invokes +_prog_+ and continues to -listen for input on +_path_+. An external program pulls the trigger by -writing a byte of data to +_path_+. The +trigger-listen+ does not examine input -data. +The +trigger-listen+ program listens for input on the +fifo(7)+ +_path_+ using ++read(2)+. When it receives input +trigger-listen+ invokes +_prog_+ and +continues to listen for input on +_path_+. An external program pulls the +trigger by writing a byte of data to +_path_+. The +trigger-listen+ program +does not examine input data. + == OPTIONS @@ -22,13 +25,12 @@ data. +-q+:: Quiet. Do not print error messages. -+-Q+:: ++-Q+:: Print error messages. (Default) +-v+:: Verbose. Print both status and error messages. - === LISTENING OPTIONS +-1+:: Execute +_prog_+ immediately upon startup. @@ -40,32 +42,33 @@ trigger pull occurs while +_limit_+ copies are running, copies exits. +-t _timeout_+:: -Wait at most +_timeout_+ seconds for a trigger pull. If -+_timeout_+ +Wait at most +_timeout_+ seconds for a trigger pull. If +_timeout_+ seconds elapse without a trigger pull, then +trigger-listen+ pulls -its own trigger. The default value of +_timeout_+ -is +(unsigned int)~0+. +its own trigger. (Default: +(unsigned int)~0+) +-i _interval_+:: Wait at least +_interval_+ seconds between executions of -+_prog_+. If -it receives a trigger pull within +_interval_+ seconds of the last -execution, +trigger-listen+ executes +_prog_+ when -+_interval_+ -seconds have elapsed. The default value of +_interval_+ is 0. ++_prog_+. If +trigger-listen+ receives a trigger pull within +_interval_+ +seconds of the last execution, +trigger-listen+ executes +_prog_+ when ++_interval_+ seconds have elapsed. (Default: 0). +-g _gid_+:: -Switch group ID to +_gid_+ after preparing to receive trigger pulls. +Set the effective group ID to +_gid_+ using +setgid(2)+ after preparing to +receive trigger pulls. +-u _uid_+:: -Switch user ID to +_uid_+ after preparing to receive connections. +Set the effective user ID to +_uid_+ using +setuid(2)+ after preparing to +receive trigger pulls. +-U+:: -Same as +-g $GID -u $UID+. Typically, +$GID+ and +$UID+ are -set by http://cr.yp.to/daemontools/envuidgid.html[+envuidgid+]. +Set the effective user ID to the +environ(7)+ variable +_UID_+ and the +effective group ID to the +environ(7)+ variable +_GID_+ after preparing to +receive trigger pulls. Same as +-g+ +_$GID_+ +-u+ +_$UID_+, where +_$UID_+ +and +_$GID_+ are typically set by +http://cr.yp.to/daemontools/envuidgid.html[+envuidgid(8)+]. -+-d+:: -Delete. Remove and recreate the fifo +_path_+ upon startup. (Default) ++-d+:: +Delete. Remove and recreate the +fifo(7)+ +_path_+ upon startup. (Default) +-D+:: No delete. Do not remove and recreate +_path_+ upon startup. @@ -73,12 +76,17 @@ No delete. Do not remove and recreate +_path_+ upon startup. == EXIT STATUS The +trigger-listen+ program exits 111 for temporary errors and 100 for -permanent errors. It exits 0 on success or when terminated by signal. +permanent errors. +trigger-listen+ exits 0 on success or when terminated by +signal. == EXAMPLES !!!! -trigger-listen ./trigger echo \'Hello world!' ++trigger-listen+ ./trigger echo \'Hello world!' !!!! +== SEE ALSO ++mkfifo(1)+, link:trigger-pull.html[+trigger-pull(1)+], +link:trigger-wait.html[+trigger-wait(1)+], +setuid(2)+, +setgid(2)+, ++fifo(7)+, +envuidgid(8)+ From 3c5a5fe85623d576bd50dec59cbd8e47ed632fb6 Mon Sep 17 00:00:00 2001 From: Matthew Story Date: Sun, 3 Jun 2012 06:07:30 -0400 Subject: [PATCH 04/20] adds link to trigger-listen HTML page, because we can Signed-off-by: Matthew Story --- doc/trigger-pull.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/trigger-pull.txt b/doc/trigger-pull.txt index 692509d..a6a2541 100644 --- a/doc/trigger-pull.txt +++ b/doc/trigger-pull.txt @@ -24,4 +24,4 @@ trigger-pull ./trigger !!!! == SEE ALSO -+mkfifo(1)+, +trigger-listen(1)+, +trigger-wait(1)+, +fifo(7)+ ++mkfifo(1)+, link:trigger-listen.html[+trigger-listen(1)+], +trigger-wait(1)+, +fifo(7)+ From 3d8b9da8359e7956531f0f91c4265a30a308a0a3 Mon Sep 17 00:00:00 2001 From: Matthew Story Date: Sun, 3 Jun 2012 06:16:38 -0400 Subject: [PATCH 05/20] trigger-wait manpage, referencing other manpages appropriately, with the addition of an informative SEE ALSO section Signed-off-by: Matthew Story --- doc/trigger-wait.txt | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/doc/trigger-wait.txt b/doc/trigger-wait.txt index f12681f..e7584ce 100644 --- a/doc/trigger-wait.txt +++ b/doc/trigger-wait.txt @@ -2,50 +2,53 @@ :doctype: manpage == NAME -trigger-wait - listen to a trigger and optionally execute a command +trigger-wait - listen to a fifo(7) and optionally execute a command == SYNOPSIS !!!! -trigger-wait [ -wWdD -t _timeout_ ] _path_ [ _prog_ ] ++trigger-wait+ [ +-wWdD+ +-t+ _timeout_ ] _path_ [ _prog_ ] !!!! == DESCRIPTION -The +trigger-wait+ program listens for input on the fifo +_path_+. If +_prog_+ is -present, +trigger-wait+ executes it and optionally waits for it to complete. It -then exits 0 if it received a trigger pull and 99 otherwise. +The +trigger-wait+ program listens for input on the +fifo(7)+ +_path_+ using ++read(2)+. If +_prog_+ is present, +trigger-wait+ executes +_prog_+ and +optionally waits for it to complete. === OPTIONS +-t _timeout_+:: Wait at most +_timeout_+ seconds for a trigger pull. If +_timeout_+ seconds elapse without a trigger pull, then +trigger-wait+ pulls -its own trigger. The default value of +_timeout_+ -is +(unsigned int)~0+. +its own trigger. (Default: +(unsigned int)~0+) +-w+:: -Wait for +_prog_+ to complete. (Default) +Wait for +_prog_+ to complete before exit. (Default) +-W+:: -Do not wait for +_prog_+ to complete. +Do not wait for +_prog_+ to complete before exit. +-d+:: -Delete. Remove and recreate the fifo +_path_+ upon startup. (Default) +Delete. Remove and recreate the +fifo(7)+ +_path_+ upon startup. (Default) +-D+:: No delete. Do not remove and recreate +_path_+ upon startup. == EXIT STATUS -The +trigger-wait+ program exits 100 for permanent -errors and 111 for temporary errors. It exits 0 if it received a trigger pull, -and 99 otherwise. +The +trigger-wait+ program exits 100 for permanent errors and 111 for +temporary errors. It exits 0 if it received a trigger pull, and 99 otherwise. == EXAMPLES -Assume that the processor for +/service/foo/log+ pulls the trigger as its dying -act: +Assume that the processor for +_/service/foo/log_+ pulls the trigger as its +dying act: !!!! cd /service/foo && trigger-wait -t 5 ./trigger-rotate svc -a log !!!! + +== SEE ALSO ++mkfifo(1)+, link:trigger-pull.html[+trigger-pull(1)+], +link:trigger-listen.html[+trigger-listen(1)+], +fifo(7)+, +multilog(8)+, ++svc(8)+ From 9e4198055d06e1b4d2c1da0270a8e18c6f828331 Mon Sep 17 00:00:00 2001 From: Matthew Story Date: Sat, 2 Jun 2012 16:24:35 -0400 Subject: [PATCH 06/20] dash '.' is broken, prefix build_it_cmds with './' to make build work on debian. cleanup || and && with { } to cut down on subshells and make things easier to read. make tmp mv 'safe', and make 'build_it' safe Signed-off-by: Matthew Story --- src/makefile.build | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/makefile.build b/src/makefile.build index c797743..a3628e2 100644 --- a/src/makefile.build +++ b/src/makefile.build @@ -27,7 +27,7 @@ build_dependcc() { } build_do() { - ( . "$build_it_cmds" "$1" "$2" "$3" > "$3" ) + ( . "./$build_it_cmds" "$1" "$2" "$3" > "$3" ) } build_it() { @@ -35,14 +35,13 @@ build_it() { build_it_target="$2" build_it_base="$3" build_it_tmp="$build_it_target.tmp" - build_do "$build_it_target" "$build_it_base" "$build_it_tmp" \ - && { - [ -f "$build_it_tmp" ] && mv "$build_it_tmp" "$build_it_target" - } \ - || { + if build_do "$build_it_target" "$build_it_base" "$build_it_tmp" + then + [ -f "$build_it_tmp" ] && safe mv "$build_it_tmp" "$build_it_target" + else rm -f "$build_it_tmp" return 111 - } + fi return 0 } @@ -52,5 +51,5 @@ build_it() { # build_it cmds target base [ 1 -le $# ] || usage -build_it "$@" +safe build_it "$@" exit 0 From 40577756014ed6993bbf0b5ed3a6ecffe691ee58 Mon Sep 17 00:00:00 2001 From: Matthew Story Date: Sat, 2 Jun 2012 16:25:45 -0400 Subject: [PATCH 07/20] 8 spaces does not a tab make (whitespace cleanup) Signed-off-by: Matthew Story --- package/build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package/build b/package/build index ef9f3f7..4d332cd 100755 --- a/package/build +++ b/package/build @@ -122,7 +122,7 @@ then safe awk ' BEGIN { for (i = 1;i < ARGC;++i) - file[ARGV[i]] = 1 + file[ARGV[i]] = 1 ARGC = 1 } { if (file[$1]) print $1 } @@ -138,4 +138,3 @@ else fi exit 0 - From 6b8e0f3083562c07313bae5a795d2170a8580700 Mon Sep 17 00:00:00 2001 From: Matthew Story Date: Sun, 3 Jun 2012 00:22:47 -0400 Subject: [PATCH 08/20] dash '.' is broken, prefix build_it_cmds with './' to make build work ... for doc build Signed-off-by: Matthew Story --- doc/makefile.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/makefile.build b/doc/makefile.build index c797743..be1e990 100644 --- a/doc/makefile.build +++ b/doc/makefile.build @@ -27,7 +27,7 @@ build_dependcc() { } build_do() { - ( . "$build_it_cmds" "$1" "$2" "$3" > "$3" ) + ( . "./$build_it_cmds" "$1" "$2" "$3" > "$3" ) } build_it() { From 32ddebc0b637fc202e45cddf7e3c1c248df53ca0 Mon Sep 17 00:00:00 2001 From: Alan Grow Date: Mon, 4 Jun 2012 11:58:06 -0400 Subject: [PATCH 09/20] initial debianization; doesn't install binaries to prefix yet --- debian/changelog | 6 ++++++ debian/compat | 1 + debian/control | 11 +++++++++++ debian/copyright | 9 +++++++++ debian/rules | 6 ++++++ 5 files changed, 33 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100755 debian/rules diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..7c91480 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +trigger (0:0.66) unstable; urgency=low + + * release 0.66 from superscript.com + + -- Super Script Mon, 04 Jun 2012 11:20:19 -0400 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..9cb997c --- /dev/null +++ b/debian/control @@ -0,0 +1,11 @@ +Source: trigger +Section: devel +Priority: optional +Maintainer: Super Script +Standards-Version: 0.1.0 + +Package: trigger +Architecture: any +Depends: ${shlibs:Depends} +Description: Unix utilities for event-based program execution. + Unix utilities for event-based program execution. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..2bdc4c9 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,9 @@ +This package was debianized by Alan Grow on +Mon, 04 Jun 2012 11:20:19 -0400 + +Upstream Author: Super Script (sst@superscript.com) + +Copyright: + +This code, like Prof.~ Bernstein's original code, is released into the public +domain. diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..92a31be --- /dev/null +++ b/debian/rules @@ -0,0 +1,6 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +%: + dh $@ + From 7fd8848ff42b9cd18bf0c08f26aa707db7f8e261 Mon Sep 17 00:00:00 2001 From: Alan Grow Date: Mon, 4 Jun 2012 12:06:10 -0400 Subject: [PATCH 10/20] top level makefile for common tasksh --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..80e35da --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +all : + $(MAKE) -C src it + +clean : + $(MAKE) -C src clean + +install : + package/install + From 1068efaf6ab2326239b893e9d104ff8df7aabe07 Mon Sep 17 00:00:00 2001 From: Alan Grow Date: Wed, 8 May 2013 00:38:53 -0600 Subject: [PATCH 11/20] debian package: override 'make install' for a non-/package install --- debian/rules | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/rules b/debian/rules index 92a31be..8acc9e5 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,12 @@ #!/usr/bin/make -f # -*- makefile -*- +DIR = ./debian/trigger + %: dh $@ +override_dh_install: + install -d -m 0755 $(DIR)/usr/bin + install -m 0755 command/* $(DIR)/usr/bin + From eee42e4ba0d77fe1842bb09003f1ac7d4de9f613 Mon Sep 17 00:00:00 2001 From: Alan Grow Date: Wed, 18 Sep 2013 11:57:23 -0600 Subject: [PATCH 12/20] debian package: the build depends on asciidoc --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index 9cb997c..64df90f 100644 --- a/debian/control +++ b/debian/control @@ -7,5 +7,6 @@ Standards-Version: 0.1.0 Package: trigger Architecture: any Depends: ${shlibs:Depends} +Build-Depends: asciidoc Description: Unix utilities for event-based program execution. Unix utilities for event-based program execution. From be0ede7de4e0a3eeb386101ade6da75e0aff6003 Mon Sep 17 00:00:00 2001 From: Alan Grow Date: Fri, 24 Apr 2015 17:09:07 -0600 Subject: [PATCH 13/20] `make dist` now creates a source tarball. --- Makefile | 3 +++ src/tarsource.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 src/tarsource.sh diff --git a/Makefile b/Makefile index 80e35da..5b210d6 100644 --- a/Makefile +++ b/Makefile @@ -7,3 +7,6 @@ clean : install : package/install +dist : + sh src/tarsource.sh + diff --git a/src/tarsource.sh b/src/tarsource.sh new file mode 100644 index 0000000..2547715 --- /dev/null +++ b/src/tarsource.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +set -e + +PKG_NAME=`basename "$PWD"` +PKG_VERSION="`tail -1 package/versions`" +PKG_BUILD_DIR="$PKG_NAME-$PKG_VERSION" +PKG_SOURCE="$PKG_NAME-$PKG_VERSION".tar.gz + +main() +{ + git ls-files | tar_rewrite "@^@$PKG_BUILD_DIR/@" czf ./"$PKG_SOURCE" -T - + echo "created tarball at ./$PKG_SOURCE" +} + +tar_rewrite() +{ + pattern="$1" ; shift + if [ -n "`tar --version | head -1 | grep GNU`" ]; then + tar "$@" --transform "flags=r;s${pattern}" + else + tar "$@" -s "$pattern" + fi +} + +main "$@" + From ac229e67f26cc628a3c97931df6eaf92b94a4b25 Mon Sep 17 00:00:00 2001 From: Alan Grow Date: Fri, 24 Apr 2015 18:40:10 -0600 Subject: [PATCH 14/20] docs: build *.1 man pages with a2x. --- doc/Makefile | 17 ++++++++++++++++- doc/default.1.build | 5 +++++ doc/it=d | 3 +++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 doc/default.1.build diff --git a/doc/Makefile b/doc/Makefile index e8588db..e44387a 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -40,6 +40,9 @@ install.html \ trigger-listen.html \ trigger-pull.html \ trigger-wait.html \ +trigger-listen.1 \ +trigger-pull.1 \ +trigger-wait.1 \ develop.html \ asciidoc.css sh makefile.build default.build it it @@ -74,6 +77,15 @@ webpage.conf \ attribute.conf sh makefile.build default.html.build trigger-wait.html trigger-wait +trigger-listen.1: trigger-listen.txt + sh makefile.build default.1.build trigger-listen.1 trigger-listen + +trigger-pull.1: trigger-pull.txt + sh makefile.build default.1.build trigger-pull.1 trigger-pull + +trigger-wait.1: trigger-wait.txt + sh makefile.build default.1.build trigger-wait.1 trigger-wait + clean: rm -f \ attribute.conf \ @@ -84,4 +96,7 @@ clean: mkfile \ trigger-listen.html \ trigger-pull.html \ - trigger-wait.html + trigger-wait.html \ + trigger-listen.1 \ + trigger-pull.1 \ + trigger-wait.1 diff --git a/doc/default.1.build b/doc/default.1.build new file mode 100644 index 0000000..6f11b37 --- /dev/null +++ b/doc/default.1.build @@ -0,0 +1,5 @@ +build_ifchanged "$2.txt" +safe a2x -L -f manpage "$2.txt" +safe cat "$1" # a2x can't write to stdout? :/ +exit $? + diff --git a/doc/it=d b/doc/it=d index b634ed5..5dfd292 100644 --- a/doc/it=d +++ b/doc/it=d @@ -5,3 +5,6 @@ trigger-pull.html trigger-wait.html develop.html asciidoc.css +trigger-listen.1 +trigger-pull.1 +trigger-wait.1 From 578dff68938800a4d27622d0449773613926b130 Mon Sep 17 00:00:00 2001 From: Alan Grow Date: Fri, 24 Apr 2015 19:26:31 -0600 Subject: [PATCH 15/20] build documentation via `make all`. --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 5b210d6..3a0cb16 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,10 @@ all : $(MAKE) -C src it + $(MAKE) -C doc it clean : $(MAKE) -C src clean + $(MAKE) -C doc clean install : package/install From f70df077fbb76149d99a423fe5dbd3c6b3424657 Mon Sep 17 00:00:00 2001 From: Alan Grow Date: Fri, 24 Apr 2015 19:26:50 -0600 Subject: [PATCH 16/20] install manpages in ubuntu package. --- debian/rules | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/rules b/debian/rules index 8acc9e5..17a1d14 100755 --- a/debian/rules +++ b/debian/rules @@ -9,4 +9,6 @@ DIR = ./debian/trigger override_dh_install: install -d -m 0755 $(DIR)/usr/bin install -m 0755 command/* $(DIR)/usr/bin + install -d -m 0755 $(DIR)/usr/share/man/man1 + install -m 0644 doc/*.1 $(DIR)/usr/share/man/man1 From 468369b5de9865e1cd7ba32f3c301fabca2b303e Mon Sep 17 00:00:00 2001 From: Alan Grow Date: Fri, 24 Apr 2015 20:39:04 -0600 Subject: [PATCH 17/20] asciidoc manpager dislikes !!!!, barfs tags in output. --- doc/trigger-listen.txt | 8 ++------ doc/trigger-pull.txt | 9 +++------ doc/trigger-wait.txt | 9 +++------ 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/doc/trigger-listen.txt b/doc/trigger-listen.txt index 4579c24..1e3a7f4 100644 --- a/doc/trigger-listen.txt +++ b/doc/trigger-listen.txt @@ -6,9 +6,7 @@ trigger-listen - listen to a fifo(7) and execute a command == SYNOPSIS -!!!! -+trigger-listen+ [ +-UdDqQv1+ +-c+ +_limit_+ +-t+ +_timeout_+ +-i+ +_interval_+ +-g+ +_gid_+ +-u+ +_uid_+ ] +_path_+ +_prog_+ -!!!! +*+trigger-listen+ [ +-UdDqQv1+ +-c+ +_limit_+ +-t+ +_timeout_+ +-i+ +_interval_+ +-g+ +_gid_+ +-u+ +_uid_+ ] +_path_+ +_prog_+* == DESCRIPTION @@ -81,9 +79,7 @@ signal. == EXAMPLES -!!!! -+trigger-listen+ ./trigger echo \'Hello world!' -!!!! +*+trigger-listen+ ./trigger echo \'Hello world!'* == SEE ALSO diff --git a/doc/trigger-pull.txt b/doc/trigger-pull.txt index a6a2541..8ae951c 100644 --- a/doc/trigger-pull.txt +++ b/doc/trigger-pull.txt @@ -5,9 +5,7 @@ trigger-pull - write a non-blocking byte to a fifo(7) to pull a trigger == SYNOPSIS -!!!! -+trigger-pull+ +_path_+ -!!!! +*+trigger-pull+ +_path_+* == DESCRIPTION The +trigger-pull+ program performs a non-blocking +write(2)+ of one byte of @@ -19,9 +17,8 @@ errors. It does not retry if the +write(2)+ would have blocked and it ignores t lack of reader on the +fifo(7)+ +_path_+, treating these as successes. == EXAMPLES -!!!! -trigger-pull ./trigger -!!!! +*trigger-pull ./trigger* == SEE ALSO +mkfifo(1)+, link:trigger-listen.html[+trigger-listen(1)+], +trigger-wait(1)+, +fifo(7)+ + diff --git a/doc/trigger-wait.txt b/doc/trigger-wait.txt index e7584ce..231a013 100644 --- a/doc/trigger-wait.txt +++ b/doc/trigger-wait.txt @@ -5,9 +5,7 @@ trigger-wait - listen to a fifo(7) and optionally execute a command == SYNOPSIS -!!!! -+trigger-wait+ [ +-wWdD+ +-t+ _timeout_ ] _path_ [ _prog_ ] -!!!! +*+trigger-wait+ [ +-wWdD+ +-t+ _timeout_ ] _path_ [ _prog_ ]* == DESCRIPTION @@ -43,9 +41,8 @@ temporary errors. It exits 0 if it received a trigger pull, and 99 otherwise. == EXAMPLES Assume that the processor for +_/service/foo/log_+ pulls the trigger as its dying act: -!!!! -cd /service/foo && trigger-wait -t 5 ./trigger-rotate svc -a log -!!!! + +*cd /service/foo && trigger-wait -t 5 ./trigger-rotate svc -a log* == SEE ALSO From a88fc73a6b57500165e8fbf8d04d0b8c8a0f9ffb Mon Sep 17 00:00:00 2001 From: Alan Grow Date: Sun, 26 Apr 2015 15:17:43 -0600 Subject: [PATCH 18/20] asciidoc: disable network dtd fetching. --- doc/default.1.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/default.1.build b/doc/default.1.build index 6f11b37..a9ceb37 100644 --- a/doc/default.1.build +++ b/doc/default.1.build @@ -1,5 +1,5 @@ build_ifchanged "$2.txt" -safe a2x -L -f manpage "$2.txt" +safe a2x --format manpage --no-xmllint --xsltproc-opts "--nonet" "$2.txt" safe cat "$1" # a2x can't write to stdout? :/ exit $? From d364d98c77890a6bf74e260094eb187b644e1d6b Mon Sep 17 00:00:00 2001 From: Alan Grow Date: Fri, 24 Apr 2015 17:18:05 -0600 Subject: [PATCH 19/20] ubuntu packaging updates. bump to 0.67. --- debian/changelog | 6 ++++++ debian/control | 3 ++- package/versions | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7c91480..fff61c1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +trigger (0:0.67) trusty; urgency=low + + * release 0.67 from alangrow.com + + -- Alan Grow Sat, 18 Apr 2015 17:57:30 -0600 + trigger (0:0.66) unstable; urgency=low * release 0.66 from superscript.com diff --git a/debian/control b/debian/control index 64df90f..870a1ee 100644 --- a/debian/control +++ b/debian/control @@ -2,11 +2,12 @@ Source: trigger Section: devel Priority: optional Maintainer: Super Script +Build-Depends: debhelper (>= 7.0.50~), asciidoc (>= 8.6.9~), + xsltproc (>= 1.1.28~), docbook (>= 4.5~), docbook-xml (>= 4.5~), docbook-xsl (>= 1.78~) Standards-Version: 0.1.0 Package: trigger Architecture: any Depends: ${shlibs:Depends} -Build-Depends: asciidoc Description: Unix utilities for event-based program execution. Unix utilities for event-based program execution. diff --git a/package/versions b/package/versions index 16beebb..ec45680 100644 --- a/package/versions +++ b/package/versions @@ -2,3 +2,4 @@ 0.60 0.65 0.66 +0.67 From c40f1e4bd7dba8800cba5db38c559e07d09a7786 Mon Sep 17 00:00:00 2001 From: Alan Grow Date: Sun, 26 Apr 2015 16:26:56 -0600 Subject: [PATCH 20/20] bump to 0.68 --- debian/changelog | 6 ++++++ package/versions | 1 + 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index fff61c1..b2eb49b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +trigger (0:0.68) trusty; urgency=low + + * release 0.68 from alangrow.com. man page fixes. + + -- Alan Grow Sun, 26 Apr 2015 16:24:41 -0600 + trigger (0:0.67) trusty; urgency=low * release 0.67 from alangrow.com diff --git a/package/versions b/package/versions index ec45680..17e7e97 100644 --- a/package/versions +++ b/package/versions @@ -3,3 +3,4 @@ 0.65 0.66 0.67 +0.68