summaryrefslogtreecommitdiffstats
path: root/encap/src/encap-profiles/ostiary-3.4.ep
blob: da57d68912484e31dbe5db31d3f5eb866849e2bf (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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?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 -static-libgcc"
        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://encapsrcdist/mirror/ostiary/ostiary-3.4.tar.gz
     http://mirror.opensysadmin.com/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
# runit stuff
test -d var || mkdir var
test -d etc || mkdir etc
test -d etc/sv || mkdir etc/sv
test -d etc/sv/ostiary || mkdir etc/sv/ostiary
test -d etc/sv/ostiary/log || mkdir etc/sv/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="etc/sv/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="etc/sv/ostiary/log/run" mode="0755"><![CDATA[
#!/bin/sh
exec 2>&1
exec /usr/local/bin/svlogd -tt /usr/local/var/svlogd/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/svlogd || mkdir /usr/local/var/svlogd
test -d /usr/local/var/svlogd/ostiary || mkdir /usr/local/var/svlogd/ostiary
printf "Finished ostiary postinstall script.\n"
]]></include_file>

<include_file name="preremove" mode="0755"><![CDATA[
#!/bin/sh

printf "Running ostiary preremove script...\n"
date

if [ -h /usr/local/var/service/ostiary ]; then
    printf "INFO: Removing /usr/local/var/service/ostiary...\n"
    rm /usr/local/var/service/ostiary
fi

printf "Finished ostiary preremove script.\n"
]]></include_file>

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

</encap_profile>