aboutsummaryrefslogtreecommitdiff
path: root/openssl/trunk/demos/tunala/buffer.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2006-08-25 22:10:33 +0000
committerRob Austein <sra@hactrn.net>2006-08-25 22:10:33 +0000
commit8dee5be5895daa34537e76ffbe1c11e641de702a (patch)
tree9f816f2fc00eba2d2905781d0148df601daf2e64 /openssl/trunk/demos/tunala/buffer.c
parent42decf782ef8118977c8f149c79f8ea7dcd0a5a3 (diff)
Add resource-set-test
svn path=/tests/resource-set/Makefile; revision=229
Diffstat (limited to 'openssl/trunk/demos/tunala/buffer.c')
0 files changed, 0 insertions, 0 deletions
2011-11-10 05:55:19 +0000 move settings.py for portal gui django app to ${sysconfdir}/rpki since it really is a configuration file' href='/sra/rpki.net/commit/rpkid/Makefile.in?id=82cdb46860033738cff0ebc77ea6af75fd66fbb5'>82cdb468
7c26e04d
8e3a5e78


6f9a00b1
8e3a5e78
20308ab0



89506621

715368f2

ddc122bd

b9ea94e2
0fb7ecdb
64de8ede
744d01a9
64de8ede


b9ea94e2
0fb7ecdb
64de8ede



0fb7ecdb
8e3a5e78

61a8790f



e8326ac3
5adecaef
e185041e
5bb6712c
05397773
e185041e
5bb6712c
05397773
a49aa1e9
5bb6712c
a49aa1e9
84a57b72
5bb6712c
84a57b72
39676701
41759360


0fb7ecdb
7c26e04d
e8326ac3
8d32ffd7
89506621


b9ea94e2
a259bee8


5f1b3373

8d32ffd7
1bf351fb
42ef9375
e13f872d


3b361f01
3f3019d6
ce6f26e0

1f7c7823
59458a3c




d1709e15
10c6004d
d683fb93
10c6004d


b413d8ea
4bd92fbf
65b6e7ca
59458a3c

94bad6e5
2d26c4f5
2625ea19
dbc55c69
c4be735c
dbc55c69
e625b7a6

e625b7a6
41759360
e625b7a6

41759360
e625b7a6
b7994bfb
e625b7a6
60832545
e625b7a6

60832545

e625b7a6
60832545

e625b7a6
2d26c4f5
9f04e7e2
2d26c4f5
9f04e7e2
2d26c4f5
9f04e7e2
2d26c4f5
9f04e7e2
5cd0f4c6

567a0978

5cd0f4c6
9f04e7e2
c6302a1c
9f04e7e2
2d26c4f5
9f04e7e2
2d26c4f5
bc934a48
e13f872d
bc934a48
c6302a1c
7c26e04d
4ef63946
1bf351fb

1a914ecf
3fb45105
b9ea94e2

1a914ecf




89506621

1a914ecf
3fb45105
7319bdfc
1a914ecf
7319bdfc
54af2bea


20308ab0
bab399d2
54af2bea



f25b1a9a

20308ab0



f25b1a9a

b9ea94e2


f25b1a9a


20308ab0
bab399d2


54af2bea
f25b1a9a


89506621

42ef9375
89506621







d2d9b645















5f1b3373
42ef9375
d2d9b645
5f1b3373

89506621
42ef9375
89506621
89506621
5f1b3373
89506621
89506621
5f1b3373

89506621
42ef9375


89506621




a757c5f2







83079b56














































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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
      
                            
 
                          
 



                                         
 





                                  

                              
                              
 

                                    
                          
 


                                               
                                                 
                                                   
                                                                                                              
                         
 
                                                                                                             
 

                                   
                                              
 


                                     
       
                                   


                                                                                 
                    
 
                                            
                                                            
 
                                      
                                                      
 
                                              
                                                              
 
                      
                                      
 
                                                                                        

                                                                          
       
                                               
                            
 

                                  
                                                                                                 

                                                                                    
                                                                              
 
                     
                                                                 

                               
                       
 
                   
 



                                                                                                 
 
               
                                                                                            

                      
                   
 
                                                         
                            
              
                                                                                                                                                  
 
     
                                                                                                       
 
               
                      
                                                              
                        
                                                              
 
                              
 
         
                                  
                          
 
                          
 
                               
 
                                                                    
 
                                                                    
 
                                                                    
 
                                         
                                            
 
                 
                                                    
 
                          
 
  
 
                          
                            
                           
 
                                                      
                                                                                      
                        
 
                                                                  



                                                                      
                                                     
                               
 
       
                                
 

                                                                 
                                                                 
                                                                 


                                                                 
                                                                 


                                                                 
              

                              

                                                                 
                                                                 

                                                                 
              

                                                  
                   
                                                                                                       






                                                                     














                                                                                               
 
                     
                                                                                                                                                         
                                                      
               
                                                                 
 
              
                                 
 
               
                                               
 

                                               



                                                                      






                                                                    













































                                                                                                 
# $Id$

SUBDIRS		= portal-gui

PYTHON		= @PYTHON@
TRANG		= @TRANG@

CFLAGS		= @CFLAGS@
LDFLAGS		= @LDFLAGS@ @POW_LDFLAGS@
LIBS		= @LIBS@

INSTALL		= @INSTALL@ -m 555 

prefix		= @prefix@
exec_prefix	= @exec_prefix@
datarootdir	= @datarootdir@
datadir		= @datadir@
localstatedir	= @localstatedir@
sharedstatedir	= @sharedstatedir@
sysconfdir	= @sysconfdir@
bindir		= @bindir@
sbindir		= @sbindir@
libexecdir	= @libexecdir@
sysconfdir	= @sysconfdir@

abs_builddir	= @abs_builddir@
abs_top_srcdir	= @abs_top_srcdir@
abs_top_builddir= @abs_top_builddir@
srcdir          = @srcdir@

WSGI_DAEMON_PROCESS	= @WSGI_DAEMON_PROCESS@
WSGI_PROCESS_GROUP	= @WSGI_PROCESS_GROUP@
RCYNIC_HTML_DIR		= @RCYNIC_HTML_DIR@

RPKID_INSTALL_TARGETS	= @RPKID_INSTALL_TARGETS@

SETUP_PY_INSTALL_LAYOUT = @SETUP_PY_INSTALL_LAYOUT@

SETUP_PY_ROOT = `${PYTHON} -c 'import sys; print "--root " + sys.argv[1] if sys.argv[1] else ""' '${DESTDIR}'`

POW_SO = rpki/POW/_POW.so

all:: rpki/autoconf.py setup_autoconf.py rpki/relaxng.py myrpki.rng rpki/sql_schemas.py ${POW_SO} build/stamp

.FORCE:

${POW_SO}: .FORCE setup_autoconf.py
	${PYTHON} setup.py build_ext --inplace

build/stamp: .FORCE setup_autoconf.py
	${PYTHON} setup.py build
	touch $@

clean::
	rm -rf ${POW_SO} build dist

RNGS = left-right-schema.rng up-down-schema.rng publication-schema.rng myrpki.rng

rpki/relaxng.py: ${abs_top_srcdir}/buildtools/make-relaxng.py ${RNGS}
	${PYTHON} ${abs_top_srcdir}/buildtools/make-relaxng.py ${RNGS} >$@.tmp
	mv $@.tmp $@

left-right-schema.rng: left-right-schema.rnc
	${TRANG} left-right-schema.rnc left-right-schema.rng

up-down-schema.rng: up-down-schema.rnc
	${TRANG} up-down-schema.rnc up-down-schema.rng

publication-schema.rng: publication-schema.rnc
	${TRANG} publication-schema.rnc publication-schema.rng

myrpki.rng: myrpki.rnc
	${TRANG} myrpki.rnc myrpki.rng

rpki/sql_schemas.py: ${abs_top_srcdir}/buildtools/make-sql-schemas.py rpkid.sql pubd.sql
	${PYTHON} ${abs_top_srcdir}/buildtools/make-sql-schemas.py >$@.tmp
	mv $@.tmp $@

clean::
	find . -type f -name '*.py[co]' -delete
	cd tests; $(MAKE) $@

install:: ${RPKID_INSTALL_TARGETS}

install-always:: all
	${PYTHON} setup.py install ${SETUP_PY_ROOT} ${SETUP_PY_INSTALL_LAYOUT} --record installed
	@echo
	@echo "== Default configuration file location is ${sysconfdir}/rpki.conf =="
	@echo
	${INSTALL} examples/rpki.conf ${DESTDIR}${sysconfdir}/rpki.conf.sample
	${INSTALL} -d ${DESTDIR}${datarootdir}/rpki/publication

uninstall deinstall::
	-${libexecdir}/rpkigui-apache-conf-gen --remove --verbose
	xargs rm -fv <installed

distclean::
	rm -f installed

dont-run-trang:
	touch *.rng

relaxng: left-right-schema.rng up-down-schema.rng publication-schema.rng
	cd tests; $(MAKE) protocol-samples
	xmllint --noout --relaxng  left-right-schema.rng  tests/left-right-protocol-samples/*.xml
	xmllint --noout --relaxng     up-down-schema.rng     tests/up-down-protocol-samples/*.xml
	xmllint --noout --relaxng publication-schema.rng tests/publication-protocol-samples/*.xml

unit-tests: all
	PWD=`pwd`; for i in rpki/*.py; do echo "[$$i]"; PYTHONPATH=$$PWD ${PYTHON} $$i; done

all-tests:: unit-tests

all-tests:: relaxng

test all-tests parse-test profile yamltest yamlconf:: all
	cd tests; $(MAKE) $@

tags: Makefile
	find . -type f \( -name '*.py' -o -name '*.sql' -o -name '*.rnc' -o -name '*.py.in' \) ! -name relaxng.py ! -name sql_schemas.py | etags -

lint:
	pylint --rcfile ${abs_top_srcdir}/buildtools/pylint.rc rpki/*.py rpki/irdb/*.py *.py tests/*.py

# Documentation

doc/pubd.dot: pubd.sql
	sh ${abs_top_srcdir}/buildtools/graphviz-sql.sh $? >$@

doc/rpkid.dot: rpkid.sql
	sh ${abs_top_srcdir}/buildtools/graphviz-sql.sh $? >$@

.SUFFIXES: .dot .png .pdf .eps

.dot.pdf:
	dot -Tps2 $? | ps2pdf - $@

.dot.eps:
	dot -o $@ -Teps $?

.dot.png:
	dot -o $@ -Tpng $?

dot: doc/pubd.dot doc/rpkid.dot

eps: doc/pubd.eps doc/rpkid.eps doc/rpkid-bpki.eps doc/pubd-bpki.eps

png: doc/pubd.png doc/rpkid.png doc/rpkid-bpki.png doc/pubd-bpki.png

pdf: doc/pubd.pdf doc/rpkid.pdf doc/rpkid-bpki.pdf doc/pubd-bpki.pdf

docclean:
	rm -rf doc/html doc/latex doc/xml
	rm -f  doc/*.eps doc/*.pdf doc/*.png
	rm -f doc/pubd.dot doc/rpkid.dot

html: dot eps png
	TZ='' IMAGE_PATH=${abs_builddir}/doc doxygen

docs: dot eps png html pdf

##

distclean:: clean docclean
	cd tests; ${MAKE} $@
	rm -f TAGS Makefile

all install clean test distclean deinstall uninstall::
	@for i in ${SUBDIRS}; do echo "Making $@ in $$i"; (cd $$i && ${MAKE} $@); done

all:: examples/rpki.conf

examples/rpki.conf: rpki/autoconf.py rpki-confgen rpki-confgen.xml
	${PYTHON} rpki-confgen \
		--read-xml rpki-confgen.xml \
		--autoconf \
		--set myrpki::handle=`hostname -f | sed 's/[.]/_/g'` \
		--set myrpki::rpkid_server_host=`hostname -f` \
		--set myrpki::pubd_server_host=`hostname -f` \
		--pwgen myrpki::shared_sql_password \
		--pwgen web_portal::secret-key \
		--write-conf $@

clean::
	rm -f examples/rpki.conf

rpki/autoconf.py: Makefile
	@echo 'Generating $@';					\
	(echo '# Automatically generated.  DO NOT EDIT.';	\
	 echo ;							\
	 echo 'bindir         = "${bindir}"';			\
	 echo 'datarootdir    = "${datarootdir}"';		\
	 echo 'localstatedir  = "${localstatedir}"';		\
	 echo 'sbindir        = "${sbindir}"';			\
	 echo 'sharedstatedir = "${sharedstatedir}"';		\
	 echo 'sysconfdir     = "${sysconfdir}"';		\
	 echo 'libexecdir     = "${libexecdir}"';		\
	 echo ;							\
	 echo 'WSGI_DAEMON_PROCESS = "${WSGI_DAEMON_PROCESS}"';	\
	 echo 'WSGI_PROCESS_GROUP  = "${WSGI_PROCESS_GROUP}"';	\
	 echo 'RCYNIC_HTML_DIR     = "${RCYNIC_HTML_DIR}"';	\
	) > $@

clean::
	rm -f rpki/autoconf.py

setup_autoconf.py: rpki/autoconf.py
	@echo 'Generating $@';					\
	(cat rpki/autoconf.py;					\
	 echo ;							\
	 echo 'CFLAGS         = """${CFLAGS}"""';               \
	 echo 'LDFLAGS        = """${LDFLAGS}"""';              \
	 echo 'LIBS           = """${LIBS}"""';                 \
	) > $@

clean::
	rm -f setup_autoconf.py setup_autoconf.pyc

install-postconf: \
	install-user install-conf install-apache install-mysql install-django install-bpki install-cron

# This should create user "rpkid" and group "rpkid", but as we have
# not yet tested our ability to run in such a configuration, this
# would be a little premature.  Can steal Makefile code for this from
# rcynic when we're ready to do something with it.
install-user:
	@true

# We used to play the FreeBSD game of copying rpki.conf.sample to
# rpki.conf on install and removing rpki.conf if it's identical to
# rpki.conf.sample in uninstall, but that turns out to work poorly
# with generated passwords.  So now we copy rpki.conf.sample if and
# only if rpki.conf does not exist, and we leave removal of rpki.conf
# for the user to deal with.  This in turn leaves us with a different
# problem of how to upgrade rpki.conf, but at least in the FreeBSD
# universe we're supposed to leave that problem for the user.

install-conf:
	if test -f ${DESTDIR}${sysconfdir}/rpki.conf; \
	then \
	    true; \
	else \
	    cp -p ${DESTDIR}${sysconfdir}/rpki.conf.sample ${DESTDIR}${sysconfdir}/rpki.conf; \
	fi

uninstall deinstall::
#	if cmp -s ${DESTDIR}${sysconfdir}/rpki.conf ${DESTDIR}${sysconfdir}/rpki.conf.sample; then rm -f ${DESTDIR}${sysconfdir}/rpki.conf; else true; fi
	rm -f ${DESTDIR}${sysconfdir}/rpki.conf.sample

install-apache:
	${libexecdir}/rpkigui-apache-conf-gen --install --verbose

install-mysql:
	${sbindir}/rpki-sql-setup

install-django:
	${sbindir}/rpki-manage syncdb --noinput
	${sbindir}/rpki-manage migrate app

install-bpki:
	${sbindir}/rpkic initialize_server_bpki

# This needs to set up crontab entries for rpkigui-check-expired,
# rpkigui-import-routes, and rpkic update_bpki.  They probably don't
# want run under the same user IDs either, so what with having to use
# /usr/bin/crontab on some platforms, this should be entirely too
# entertaining.  Might be ok to run them all as user rpkid eventually.
#
# We really should be running exactly the same cron setup/teardown
# code here as we do in platform-specific post-installation scripts,
# but for now we just use crontab(1) here on all platforms.

install-cron: install-cron-using-crontab

uninstall deinstall:: uninstall-cron-using-crontab

# Code for setting up and tearing down cron jobs using the crontab(1)
# program.  We don't use this on all platforms, but we do use it on
# more than one, so it's broken out here as common code.
#
# CRONTAB_USER really should be rpkid, but we don't have the rest of
# the package set up for that yet, so run it as root for now.

CRONTAB_USER = root

install-cron-using-crontab:
	@crontab -l -u ${CRONTAB_USER} 2>/dev/null |						\
	 awk -v t=`hexdump -n 2 -e '"%u\n"' /dev/urandom` '					\
	     BEGIN {										\
		 cmd["${libexecdir}/rpkigui-import-routes"] = sprintf("%2u */2 * * *", t % 60);	\
		 cmd["${libexecdir}/rpkigui-check-expired"] =          "@daily      ";		\
		 cmd["${sbindir}/rpkic update_bpki"       ] =          "30 3 * * *  ";		\
	     }											\
	     {											\
		 print;										\
		 for (i in cmd)									\
		     if ($$0 ~ i)								\
			 found[i] = $$0;							\
	     }											\
	     END {										\
		 for (i in cmd)									\
		     if (!found[i])								\
			 print cmd[i] "\texec " i;						\
	     }' |										\
	 crontab -u ${CRONTAB_USER} -

uninstall-cron-using-crontab:
	@crontab -l -u ${CRONTAB_USER} 2>/dev/null |			\
	 awk '								\
	     BEGIN {							\
		empty = 1;						\
	     }								\
	     $$0 !~ "${libexecdir}/rpkigui-import-routes" &&		\
	     $$0 !~ "${libexecdir}/rpkigui-check-expired" &&		\
	     $$0 !~ "${sbindir}/rpkic update_bpki" {			\
		empty = 0;						\
		print | "/usr/bin/crontab -u ${CRONTAB_USER} -";	\
	     }								\
	     END {							\
		if (empty)						\
		    system("/usr/bin/crontab -u ${CRONTAB_USER} -r");	\
	     }'