summaryrefslogtreecommitdiffstats
path: root/encap/src/encap-profiles/ostiary-3.4.ep
blob: c3d95c6c0ba88d5afdf0de91c2d3546a26017cb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?xml version="1.0"?>

<!-- $Id$ -->

<encap_profile
	profile_ver="1.0"
	pkgspec="ostiary-3.4"
>

<prereq package="m4-1.4.4" />
<prereq package="patch-2.5.9" />

<environment
        variable="CC"
        value="gcc"
        type="set"
/>

<environment
        variable="PATH"
PLATFORM_IF_MATCH(solaris)
        value="/usr/local/lib/bcfg2/bin:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin:"
PLATFORM_ELSE
        value="/usr/local/lib/bcfg2/bin:/usr/local/bin:"
PLATFORM_ENDIF
        type="prepend"
/>

PLATFORM_IF_MATCH(linux)
PLATFORM_ELSE
<environment
        variable="MAKE"
        value="gmake"
        type="set"
/>
PLATFORM_ENDIF

<source
url="http://www.pobox.com/users/dclark/mirror/ostiary/ostiary-3.4.tar.gz
     http://ingles.homeunix.org/software/ost/ostiary-3.4.tar.gz"
     use_objdir="no"
>

<patch options="-p1"><![CDATA[
#
# Allow up to 32 Actions (up from 8)...
#
--- ostiary-3.4/ost.h	2006-08-16 23:31:59.000000000 -0400
+++ ostiary-3.4.new/ost.h	2006-08-16 23:33:23.000000000 -0400
@@ -22,7 +22,7 @@
 /* Note: strictly IPv4 for now... */
 #define MAX_SIZEOF_IP 16
 
-#define MAX_NUM_SECRETS 8
+#define MAX_NUM_SECRETS 32
 #define MAX_NUM_CACHED_IPS 128
 
 #define MAX_SECRET_SIZE 64
@@ -53,7 +53,7 @@
 /* Note: strictly IPv4 for now... */
 #define MAX_SIZEOF_IP 16
 
-#define MAX_NUM_SECRETS 8
+#define MAX_NUM_SECRETS 32
 #define MAX_NUM_CACHED_IPS 128
 
 /* You can make MAX_SECRET_SIZE bigger, but don't forget to update
]]></patch>

</source>

<prepackage>
# /usr/local/etc stuff
test -d share || mkdir share
test -d share/doc || mkdir share/doc
test -d share/doc/ostiary || mkdir share/doc/ostiary
test -d share/doc/ostiary/examples || mkdir share/doc/ostiary/examples
mv etc/ostiary.cfg share/doc/ostiary/examples/ostiary.cfg
rmdir etc
# daemons should be in /usr/local/sbin
test -d sbin || mkdir sbin
mv bin/ostiaryd sbin/ostiaryd
# daemontool stuff
test -d var || mkdir var
test -d var/svc.d || mkdir var/svc.d
test -d var/svc.d/ostiary || mkdir var/svc.d/ostiary
test -d var/svc.d/ostiary/log || mkdir var/svc.d/ostiary/log
# Make "this encap is installed" sentinal file available in /usr/local/var/encap
test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>

<include_file name="var/svc.d/ostiary/run" mode="0755"><![CDATA[
#!/bin/sh
exec 2>&1
exec /usr/local/sbin/ostiaryd -c /usr/local/etc/ostiary.cfg -v -D
]]></include_file>

<include_file name="var/svc.d/ostiary/log/run" mode="0755"><![CDATA[
#!/bin/sh
exec 2>&1
exec /command/multilog t /usr/local/var/multilog/ostiary
]]></include_file>

<include_file name="postinstall" mode="0755"><![CDATA[
#!/bin/sh -e
umask 002
BASEDIR="`echo ${0} | xargs -n1 dirname`"
LOG=${BASEDIR}/postinstall.log
exec > $LOG 2>&1
printf "Running ostiary postinstall script...\n"
date
test -d /usr/local/var/multilog || mkdir /usr/local/var/multilog
test -d /usr/local/var/multilog/ostiary || mkdir /usr/local/var/multilog/ostiary
printf "Finished ostiary postinstall script.\n"
]]></include_file>

<encapinfo>
description Ostiary - Simple, Secure Remote Script Execution
</encapinfo>

</encap_profile>