]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
build: standard directory layout
authorAlon Bar-Lev <alon.barlev@gmail.com>
Wed, 29 Feb 2012 20:11:59 +0000 (22:11 +0200)
committerDavid Sommerseth <davids@redhat.com>
Thu, 22 Mar 2012 21:07:08 +0000 (22:07 +0100)
Suitable for mature project.

root   - administrative stuff
doc    - documents
src    - sources
tests  - tests
distro - distro specific files
sample - samples

SIDE EFFECT: many changes to rpm spec.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: Adriaan de Jong <dejong@fox-it.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
253 files changed:
.gitignore
.svnignore [deleted file]
Makefile.am
configure.ac
debug/doval [moved from doval with 100% similarity]
debug/dovalns [moved from dovalns with 100% similarity]
distro/Makefile.am [new file with mode: 0644]
distro/rpm/Makefile.am [new file with mode: 0644]
distro/rpm/openvpn.init.d.rhel [moved from sample-scripts/openvpn.init with 100% similarity]
distro/rpm/openvpn.init.d.suse [moved from suse/openvpn.init with 99% similarity]
distro/rpm/openvpn.spec.in [moved from openvpn.spec.in with 80% similarity]
doc/Makefile.am [new file with mode: 0644]
doc/doxygen/doc_compression.h [moved from doxygen/doc_compression.h with 100% similarity]
doc/doxygen/doc_control_processor.h [moved from doxygen/doc_control_processor.h with 100% similarity]
doc/doxygen/doc_control_tls.h [moved from doxygen/doc_control_tls.h with 100% similarity]
doc/doxygen/doc_data_control.h [moved from doxygen/doc_data_control.h with 100% similarity]
doc/doxygen/doc_data_crypto.h [moved from doxygen/doc_data_crypto.h with 100% similarity]
doc/doxygen/doc_eventloop.h [moved from doxygen/doc_eventloop.h with 100% similarity]
doc/doxygen/doc_external_multiplexer.h [moved from doxygen/doc_external_multiplexer.h with 100% similarity]
doc/doxygen/doc_fragmentation.h [moved from doxygen/doc_fragmentation.h with 100% similarity]
doc/doxygen/doc_internal_multiplexer.h [moved from doxygen/doc_internal_multiplexer.h with 100% similarity]
doc/doxygen/doc_key_generation.h [moved from doxygen/doc_key_generation.h with 100% similarity]
doc/doxygen/doc_mainpage.h [moved from doxygen/doc_mainpage.h with 100% similarity]
doc/doxygen/doc_memory_management.h [moved from doxygen/doc_memory_management.h with 100% similarity]
doc/doxygen/doc_protocol_overview.h [moved from doxygen/doc_protocol_overview.h with 100% similarity]
doc/doxygen/doc_reliable.h [moved from doxygen/doc_reliable.h with 100% similarity]
doc/doxygen/doc_tunnel_state.h [moved from doxygen/doc_tunnel_state.h with 100% similarity]
doc/doxygen/openvpn.doxyfile [moved from doxygen/openvpn.doxyfile with 100% similarity]
doc/management-notes.txt [moved from management/management-notes.txt with 100% similarity]
doc/openvpn.8 [moved from openvpn.8 with 100% similarity]
include/Makefile.am [new file with mode: 0644]
include/openvpn-plugin.h [moved from openvpn-plugin.h with 100% similarity]
include/tap-windows.h [moved from tap-windows.h with 100% similarity]
plugins/auth-pam/.svnignore [deleted file]
sample/Makefile.am [new file with mode: 0644]
sample/sample-config-files/README [moved from sample-config-files/README with 100% similarity]
sample/sample-config-files/client.conf [moved from sample-config-files/client.conf with 100% similarity]
sample/sample-config-files/firewall.sh [moved from sample-config-files/firewall.sh with 100% similarity]
sample/sample-config-files/home.up [moved from sample-config-files/home.up with 100% similarity]
sample/sample-config-files/loopback-client [moved from sample-config-files/loopback-client with 100% similarity]
sample/sample-config-files/loopback-server [moved from sample-config-files/loopback-server with 100% similarity]
sample/sample-config-files/office.up [moved from sample-config-files/office.up with 100% similarity]
sample/sample-config-files/openvpn-shutdown.sh [moved from sample-config-files/openvpn-shutdown.sh with 100% similarity]
sample/sample-config-files/openvpn-startup.sh [moved from sample-config-files/openvpn-startup.sh with 100% similarity]
sample/sample-config-files/server.conf [moved from sample-config-files/server.conf with 100% similarity]
sample/sample-config-files/static-home.conf [moved from sample-config-files/static-home.conf with 100% similarity]
sample/sample-config-files/static-office.conf [moved from sample-config-files/static-office.conf with 100% similarity]
sample/sample-config-files/tls-home.conf [moved from sample-config-files/tls-home.conf with 100% similarity]
sample/sample-config-files/tls-office.conf [moved from sample-config-files/tls-office.conf with 100% similarity]
sample/sample-config-files/xinetd-client-config [moved from sample-config-files/xinetd-client-config with 100% similarity]
sample/sample-config-files/xinetd-server-config [moved from sample-config-files/xinetd-server-config with 100% similarity]
sample/sample-keys/README [moved from sample-keys/README with 100% similarity]
sample/sample-keys/ca.crt [moved from sample-keys/ca.crt with 100% similarity]
sample/sample-keys/ca.key [moved from sample-keys/ca.key with 100% similarity]
sample/sample-keys/client.crt [moved from sample-keys/client.crt with 100% similarity]
sample/sample-keys/client.key [moved from sample-keys/client.key with 100% similarity]
sample/sample-keys/dh1024.pem [moved from sample-keys/dh1024.pem with 100% similarity]
sample/sample-keys/pass.crt [moved from sample-keys/pass.crt with 100% similarity]
sample/sample-keys/pass.key [moved from sample-keys/pass.key with 100% similarity]
sample/sample-keys/pkcs12.p12 [moved from sample-keys/pkcs12.p12 with 100% similarity]
sample/sample-keys/server.crt [moved from sample-keys/server.crt with 100% similarity]
sample/sample-keys/server.key [moved from sample-keys/server.key with 100% similarity]
sample/sample-scripts/auth-pam.pl [moved from sample-scripts/auth-pam.pl with 100% similarity]
sample/sample-scripts/bridge-start [moved from sample-scripts/bridge-start with 100% similarity]
sample/sample-scripts/bridge-stop [moved from sample-scripts/bridge-stop with 100% similarity]
sample/sample-scripts/ucn.pl [moved from sample-scripts/ucn.pl with 100% similarity]
sample/sample-scripts/verify-cn [moved from sample-scripts/verify-cn with 100% similarity]
sample/sample-windows/sample.ovpn [moved from sample-windows/sample.ovpn with 100% similarity]
service-win32/.svnignore [deleted file]
service-win32/Makefile.am [deleted file]
sources [deleted file]
src/Makefile.am [new file with mode: 0644]
src/openvpn/Makefile.am [new file with mode: 0644]
src/openvpn/base64.c [moved from base64.c with 100% similarity]
src/openvpn/base64.h [moved from base64.h with 100% similarity]
src/openvpn/basic.h [moved from basic.h with 100% similarity]
src/openvpn/buffer.c [moved from buffer.c with 100% similarity]
src/openvpn/buffer.h [moved from buffer.h with 100% similarity]
src/openvpn/circ_list.h [moved from circ_list.h with 100% similarity]
src/openvpn/clinat.c [moved from clinat.c with 100% similarity]
src/openvpn/clinat.h [moved from clinat.h with 100% similarity]
src/openvpn/common.h [moved from common.h with 100% similarity]
src/openvpn/compat.c [moved from compat.c with 100% similarity]
src/openvpn/compat.h [moved from compat.h with 100% similarity]
src/openvpn/crypto.c [moved from crypto.c with 100% similarity]
src/openvpn/crypto.h [moved from crypto.h with 100% similarity]
src/openvpn/crypto_backend.h [moved from crypto_backend.h with 100% similarity]
src/openvpn/crypto_openssl.c [moved from crypto_openssl.c with 100% similarity]
src/openvpn/crypto_openssl.h [moved from crypto_openssl.h with 100% similarity]
src/openvpn/crypto_polarssl.c [moved from crypto_polarssl.c with 100% similarity]
src/openvpn/crypto_polarssl.h [moved from crypto_polarssl.h with 100% similarity]
src/openvpn/cryptoapi.c [moved from cryptoapi.c with 100% similarity]
src/openvpn/cryptoapi.h [moved from cryptoapi.h with 100% similarity]
src/openvpn/dhcp.c [moved from dhcp.c with 100% similarity]
src/openvpn/dhcp.h [moved from dhcp.h with 100% similarity]
src/openvpn/errlevel.h [moved from errlevel.h with 100% similarity]
src/openvpn/error.c [moved from error.c with 100% similarity]
src/openvpn/error.h [moved from error.h with 100% similarity]
src/openvpn/event.c [moved from event.c with 100% similarity]
src/openvpn/event.h [moved from event.h with 100% similarity]
src/openvpn/fdmisc.c [moved from fdmisc.c with 100% similarity]
src/openvpn/fdmisc.h [moved from fdmisc.h with 100% similarity]
src/openvpn/forward-inline.h [moved from forward-inline.h with 100% similarity]
src/openvpn/forward.c [moved from forward.c with 100% similarity]
src/openvpn/forward.h [moved from forward.h with 100% similarity]
src/openvpn/fragment.c [moved from fragment.c with 100% similarity]
src/openvpn/fragment.h [moved from fragment.h with 100% similarity]
src/openvpn/gremlin.c [moved from gremlin.c with 100% similarity]
src/openvpn/gremlin.h [moved from gremlin.h with 100% similarity]
src/openvpn/helper.c [moved from helper.c with 100% similarity]
src/openvpn/helper.h [moved from helper.h with 100% similarity]
src/openvpn/httpdigest.c [moved from httpdigest.c with 100% similarity]
src/openvpn/httpdigest.h [moved from httpdigest.h with 100% similarity]
src/openvpn/init.c [moved from init.c with 100% similarity]
src/openvpn/init.h [moved from init.h with 100% similarity]
src/openvpn/integer.h [moved from integer.h with 100% similarity]
src/openvpn/interval.c [moved from interval.c with 100% similarity]
src/openvpn/interval.h [moved from interval.h with 100% similarity]
src/openvpn/list.c [moved from list.c with 100% similarity]
src/openvpn/list.h [moved from list.h with 100% similarity]
src/openvpn/lladdr.c [moved from lladdr.c with 100% similarity]
src/openvpn/lladdr.h [moved from lladdr.h with 100% similarity]
src/openvpn/lzo.c [moved from lzo.c with 100% similarity]
src/openvpn/lzo.h [moved from lzo.h with 100% similarity]
src/openvpn/manage.c [moved from manage.c with 100% similarity]
src/openvpn/manage.h [moved from manage.h with 100% similarity]
src/openvpn/mbuf.c [moved from mbuf.c with 100% similarity]
src/openvpn/mbuf.h [moved from mbuf.h with 100% similarity]
src/openvpn/memdbg.h [moved from memdbg.h with 100% similarity]
src/openvpn/misc.c [moved from misc.c with 100% similarity]
src/openvpn/misc.h [moved from misc.h with 100% similarity]
src/openvpn/mroute.c [moved from mroute.c with 100% similarity]
src/openvpn/mroute.h [moved from mroute.h with 100% similarity]
src/openvpn/mss.c [moved from mss.c with 100% similarity]
src/openvpn/mss.h [moved from mss.h with 100% similarity]
src/openvpn/mstats.c [moved from mstats.c with 100% similarity]
src/openvpn/mstats.h [moved from mstats.h with 100% similarity]
src/openvpn/mtcp.c [moved from mtcp.c with 100% similarity]
src/openvpn/mtcp.h [moved from mtcp.h with 100% similarity]
src/openvpn/mtu.c [moved from mtu.c with 100% similarity]
src/openvpn/mtu.h [moved from mtu.h with 100% similarity]
src/openvpn/mudp.c [moved from mudp.c with 100% similarity]
src/openvpn/mudp.h [moved from mudp.h with 100% similarity]
src/openvpn/multi.c [moved from multi.c with 100% similarity]
src/openvpn/multi.h [moved from multi.h with 100% similarity]
src/openvpn/ntlm.c [moved from ntlm.c with 100% similarity]
src/openvpn/ntlm.h [moved from ntlm.h with 100% similarity]
src/openvpn/occ-inline.h [moved from occ-inline.h with 100% similarity]
src/openvpn/occ.c [moved from occ.c with 100% similarity]
src/openvpn/occ.h [moved from occ.h with 100% similarity]
src/openvpn/openvpn.c [moved from openvpn.c with 100% similarity]
src/openvpn/openvpn.h [moved from openvpn.h with 100% similarity]
src/openvpn/options.c [moved from options.c with 100% similarity]
src/openvpn/options.h [moved from options.h with 100% similarity]
src/openvpn/otime.c [moved from otime.c with 100% similarity]
src/openvpn/otime.h [moved from otime.h with 100% similarity]
src/openvpn/packet_id.c [moved from packet_id.c with 100% similarity]
src/openvpn/packet_id.h [moved from packet_id.h with 100% similarity]
src/openvpn/perf.c [moved from perf.c with 100% similarity]
src/openvpn/perf.h [moved from perf.h with 100% similarity]
src/openvpn/pf-inline.h [moved from pf-inline.h with 100% similarity]
src/openvpn/pf.c [moved from pf.c with 100% similarity]
src/openvpn/pf.h [moved from pf.h with 100% similarity]
src/openvpn/ping-inline.h [moved from ping-inline.h with 100% similarity]
src/openvpn/ping.c [moved from ping.c with 100% similarity]
src/openvpn/ping.h [moved from ping.h with 100% similarity]
src/openvpn/pkcs11.c [moved from pkcs11.c with 100% similarity]
src/openvpn/pkcs11.h [moved from pkcs11.h with 100% similarity]
src/openvpn/pkcs11_backend.h [moved from pkcs11_backend.h with 100% similarity]
src/openvpn/pkcs11_openssl.c [moved from pkcs11_openssl.c with 100% similarity]
src/openvpn/pkcs11_polarssl.c [moved from pkcs11_polarssl.c with 100% similarity]
src/openvpn/plugin.c [moved from plugin.c with 100% similarity]
src/openvpn/plugin.h [moved from plugin.h with 100% similarity]
src/openvpn/pool.c [moved from pool.c with 100% similarity]
src/openvpn/pool.h [moved from pool.h with 100% similarity]
src/openvpn/proto.c [moved from proto.c with 100% similarity]
src/openvpn/proto.h [moved from proto.h with 100% similarity]
src/openvpn/proxy.c [moved from proxy.c with 100% similarity]
src/openvpn/proxy.h [moved from proxy.h with 100% similarity]
src/openvpn/ps.c [moved from ps.c with 100% similarity]
src/openvpn/ps.h [moved from ps.h with 100% similarity]
src/openvpn/push.c [moved from push.c with 100% similarity]
src/openvpn/push.h [moved from push.h with 100% similarity]
src/openvpn/pushlist.h [moved from pushlist.h with 100% similarity]
src/openvpn/reliable.c [moved from reliable.c with 100% similarity]
src/openvpn/reliable.h [moved from reliable.h with 100% similarity]
src/openvpn/route.c [moved from route.c with 100% similarity]
src/openvpn/route.h [moved from route.h with 100% similarity]
src/openvpn/schedule.c [moved from schedule.c with 100% similarity]
src/openvpn/schedule.h [moved from schedule.h with 100% similarity]
src/openvpn/session_id.c [moved from session_id.c with 100% similarity]
src/openvpn/session_id.h [moved from session_id.h with 100% similarity]
src/openvpn/shaper.c [moved from shaper.c with 100% similarity]
src/openvpn/shaper.h [moved from shaper.h with 100% similarity]
src/openvpn/sig.c [moved from sig.c with 100% similarity]
src/openvpn/sig.h [moved from sig.h with 100% similarity]
src/openvpn/socket.c [moved from socket.c with 100% similarity]
src/openvpn/socket.h [moved from socket.h with 100% similarity]
src/openvpn/socks.c [moved from socks.c with 100% similarity]
src/openvpn/socks.h [moved from socks.h with 100% similarity]
src/openvpn/ssl.c [moved from ssl.c with 100% similarity]
src/openvpn/ssl.h [moved from ssl.h with 100% similarity]
src/openvpn/ssl_backend.h [moved from ssl_backend.h with 100% similarity]
src/openvpn/ssl_common.h [moved from ssl_common.h with 100% similarity]
src/openvpn/ssl_openssl.c [moved from ssl_openssl.c with 100% similarity]
src/openvpn/ssl_openssl.h [moved from ssl_openssl.h with 100% similarity]
src/openvpn/ssl_polarssl.c [moved from ssl_polarssl.c with 100% similarity]
src/openvpn/ssl_polarssl.h [moved from ssl_polarssl.h with 100% similarity]
src/openvpn/ssl_verify.c [moved from ssl_verify.c with 100% similarity]
src/openvpn/ssl_verify.h [moved from ssl_verify.h with 100% similarity]
src/openvpn/ssl_verify_backend.h [moved from ssl_verify_backend.h with 100% similarity]
src/openvpn/ssl_verify_openssl.c [moved from ssl_verify_openssl.c with 100% similarity]
src/openvpn/ssl_verify_openssl.h [moved from ssl_verify_openssl.h with 100% similarity]
src/openvpn/ssl_verify_polarssl.c [moved from ssl_verify_polarssl.c with 100% similarity]
src/openvpn/ssl_verify_polarssl.h [moved from ssl_verify_polarssl.h with 100% similarity]
src/openvpn/status.c [moved from status.c with 100% similarity]
src/openvpn/status.h [moved from status.h with 100% similarity]
src/openvpn/syshead.h [moved from syshead.h with 100% similarity]
src/openvpn/tun.c [moved from tun.c with 100% similarity]
src/openvpn/tun.h [moved from tun.h with 100% similarity]
src/openvpn/win32.c [moved from win32.c with 100% similarity]
src/openvpn/win32.h [moved from win32.h with 100% similarity]
src/openvpnserv/Makefile.am [new file with mode: 0644]
src/openvpnserv/openvpnserv.c [moved from service-win32/openvpnserv.c with 100% similarity]
src/openvpnserv/service.c [moved from service-win32/service.c with 100% similarity]
src/openvpnserv/service.h [moved from service-win32/service.h with 100% similarity]
src/plugins/README [moved from plugins/README with 100% similarity]
src/plugins/auth-pam/Makefile [moved from plugins/auth-pam/Makefile with 96% similarity]
src/plugins/auth-pam/README [moved from plugins/auth-pam/README with 100% similarity]
src/plugins/auth-pam/auth-pam.c [moved from plugins/auth-pam/auth-pam.c with 100% similarity]
src/plugins/auth-pam/pamdl.c [moved from plugins/auth-pam/pamdl.c with 100% similarity]
src/plugins/auth-pam/pamdl.h [moved from plugins/auth-pam/pamdl.h with 100% similarity]
src/plugins/defer/README [moved from plugins/defer/README with 100% similarity]
src/plugins/defer/build [moved from plugins/examples/build with 89% similarity]
src/plugins/defer/simple.c [moved from plugins/defer/simple.c with 100% similarity]
src/plugins/defer/simple.def [moved from plugins/defer/simple.def with 100% similarity]
src/plugins/defer/winbuild [moved from plugins/defer/winbuild with 95% similarity]
src/plugins/down-root/Makefile [moved from plugins/down-root/Makefile with 93% similarity]
src/plugins/down-root/README [moved from plugins/down-root/README with 100% similarity]
src/plugins/down-root/down-root.c [moved from plugins/down-root/down-root.c with 100% similarity]
src/plugins/examples/README [moved from plugins/examples/README with 100% similarity]
src/plugins/examples/build [moved from plugins/defer/build with 91% similarity]
src/plugins/examples/log.c [moved from plugins/examples/log.c with 100% similarity]
src/plugins/examples/log_v3.c [moved from plugins/examples/log_v3.c with 100% similarity]
src/plugins/examples/simple.c [moved from plugins/examples/simple.c with 100% similarity]
src/plugins/examples/simple.def [moved from plugins/examples/simple.def with 100% similarity]
src/plugins/examples/winbuild [moved from plugins/examples/winbuild with 94% similarity]
tests/Makefile.am [new file with mode: 0644]
tests/t_client.rc-sample [moved from t_client.rc-sample with 92% similarity]
tests/t_client.sh.in [moved from t_client.sh.in with 95% similarity]
tests/t_cltsrv-down.sh [moved from t_cltsrv-down.sh with 100% similarity]
tests/t_cltsrv.sh [moved from t_cltsrv.sh with 76% similarity]
tests/t_lpback.sh [moved from t_lpback.sh with 84% similarity]

index 8cc07de42bbdde3a593d07c6be65dd3e9847a7bf..46cd4c88065e1bcb5a29ed999549d768ba42f4ac 100644 (file)
@@ -1,11 +1,13 @@
 *.[oa]
 *.dll
 *.exe
+*.exe.*
 *.mak
 *.obj
 *.pyc
 *.so
 *~
+*.idb
 .deps
 Makefile
 Makefile.in
@@ -21,21 +23,11 @@ config.sub
 configure
 configure.h
 depcomp
-dist/
+stamp-h1
 install-sh
-install-win32/settings
-install-win32/tmp
 missing
-openvpn
-openvpn.8.html
-openvpn.exe.manifest
-openvpnserv.exe.manifest
-openvpn.spec
-stamp-h1
-t_client.sh
-tap-win32/SOURCES
-tap-win32/amd64/
-tap-win32/i386/
-tapinstall/
-vc90.idb
-win/version_m4_vars.tmp
+
+doc/openvpn.8.html
+distro/rpm/openvpn.spec
+tests/t_client.sh
+src/openvpn/openvpn
diff --git a/.svnignore b/.svnignore
deleted file mode 100644 (file)
index c02d2b8..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-*.o
-*.obj
-config.status
-config.log
-config.guess
-aclocal.m4
-install-sh
-Makefile.in
-openvpn
-depcomp
-config.h
-.deps
-Makefile
-config.h.in
-configure
-config.sub
-openvpn.spec
-stamp-h1
-autom4te.cache
-missing
index a8ff4572aa57d2c2c0d792503ae44b5c6418e630..850074b36bb83dc7a859b565e5966b16a07ffa8b 100644 (file)
@@ -7,6 +7,7 @@
 #
 #  Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
 #  Copyright (C) 2010      David Sommerseth <dazo@users.sourceforge.net>
+#  Copyright (C) 2006-2012 Alon Bar-Lev <alon.barlev@gmail.com>
 #
 #  This program is free software; you can redistribute it and/or modify
 #  it under the terms of the GNU General Public License version 2
@@ -34,30 +35,13 @@ MAINTAINERCLEANFILES = \
        $(srcdir)/config.h.in $(srcdir)/config.h.in~ $(srcdir)/configure \
        $(srcdir)/install-sh $(srcdir)/ltmain.sh $(srcdir)/missing \
        $(srcdir)/depcomp $(srcdir)/aclocal.m4 \
-       $(srcdir)/config.guess $(srcdir)/config.sub \
-       $(srcdir)/openvpn.spec
-CLEANFILES = openvpn.8.html
+       $(srcdir)/config.guess $(srcdir)/config.sub
 
 EXTRA_DIST = \
-       sample-config-files \
-       sample-keys \
-       sample-scripts \
-       suse \
        contrib \
-       debug \
-       plugins
+       debug
 
-SUBDIRS = service-win32
-
-TESTS = t_client.sh t_lpback.sh t_cltsrv.sh
-sbin_PROGRAMS = openvpn
-
-dist_doc_DATA = \
-       management/management-notes.txt
-
-dist_noinst_SCRIPTS = \
-       $(TESTS) \
-       t_cltsrv-down.sh
+SUBDIRS = distro include src sample doc tests
 
 dist_doc_DATA = \
        COPYRIGHT.GPL \
@@ -65,101 +49,12 @@ dist_doc_DATA = \
 
 dist_noinst_DATA = \
        .gitignore \
-       openvpn.spec \
        PORTS \
        README.IPv6 TODO.IPv6 \
-       README.polarssl \
+       README.polarssl
 
 if WIN32
 dist_doc_DATA += INSTALL-win32.txt
 else
 dist_noinst_DATA += INSTALL-win32.txt
 endif
-
-openvpn_SOURCES = \
-        base64.c base64.h \
-       basic.h \
-       buffer.c buffer.h \
-       circ_list.h \
-       clinat.c clinat.h \
-       common.h \
-       compat.h compat.c \
-       crypto.c crypto.h crypto_backend.h \
-       crypto_openssl.c crypto_openssl.h \
-       crypto_polarssl.c crypto_polarssl.h \
-       dhcp.c dhcp.h \
-       errlevel.h \
-       error.c error.h \
-       event.c event.h \
-       fdmisc.c fdmisc.h \
-        forward.c forward.h forward-inline.h \
-       fragment.c fragment.h \
-       gremlin.c gremlin.h \
-       helper.c helper.h \
-       httpdigest.c httpdigest.h \
-       lladdr.c lladdr.h \
-       init.c init.h \
-       integer.h \
-        interval.c interval.h \
-       list.c list.h \
-       lzo.c lzo.h \
-       manage.c manage.h \
-       mbuf.c mbuf.h \
-        memdbg.h \
-       misc.c misc.h \
-       mroute.c mroute.h \
-       mss.c mss.h \
-       mstats.c mstats.h \
-       mtcp.c mtcp.h \
-       mtu.c mtu.h \
-       mudp.c mudp.h \
-       multi.c multi.h \
-        ntlm.c ntlm.h \
-       occ.c occ.h occ-inline.h \
-       pkcs11.c pkcs11.h pkcs11_backend.h \
-       pkcs11_openssl.c \
-       pkcs11_polarssl.c \
-       openvpn.c openvpn.h \
-       openvpn-plugin.h \
-       options.c options.h \
-       otime.c otime.h \
-       packet_id.c packet_id.h \
-       perf.c perf.h \
-       pf.c pf.h pf-inline.h \
-       ping.c ping.h ping-inline.h \
-       plugin.c plugin.h \
-       pool.c pool.h \
-       proto.c proto.h \
-       proxy.c proxy.h \
-        ps.c ps.h \
-       push.c push.h \
-       pushlist.h \
-       reliable.c reliable.h \
-       route.c route.h \
-       schedule.c schedule.h \
-       session_id.c session_id.h \
-       shaper.c shaper.h \
-       sig.c sig.h \
-       socket.c socket.h \
-       socks.c socks.h \
-       ssl.c ssl.h  ssl_backend.h \
-       ssl_openssl.c ssl_openssl.h \
-       ssl_polarssl.c ssl_polarssl.h \
-       ssl_common.h \
-       ssl_verify.c ssl_verify.h ssl_verify_backend.h \
-       ssl_verify_openssl.c ssl_verify_openssl.h \
-       ssl_verify_polarssl.c ssl_verify_polarssl.h \
-       status.c status.h \
-       syshead.h \
-       tun.c tun.h tap-windows.h \
-       win32.h win32.c \
-       cryptoapi.h cryptoapi.c
-
-if WIN32
-dist_noinst_DATA += openvpn.8
-nodist_html_DATA = openvpn.8.html
-openvpn.8.html: $(srcdir)/openvpn.8
-       $(MAN2HTML) < $(srcdir)/openvpn.8 > openvpn.8.html
-else
-dist_man_MANS = openvpn.8
-endif
index 0b703256b4cc2a63b6c8bad2b3a5a245366bf15d..fe0fbab7927f1cd357dfcebbed7a450bd07ca207 100644 (file)
@@ -31,7 +31,7 @@ AC_INIT([PRODUCT_NAME], [PRODUCT_VERSION], [PRODUCT_BUGREPORT], [PRODUCT_TARNAME
 m4_include(compat.m4)
 AC_CONFIG_AUX_DIR([.])
 AM_CONFIG_HEADER([config.h])
-AC_CONFIG_SRCDIR([syshead.h])
+AC_CONFIG_SRCDIR([src/openvpn/syshead.h])
 AC_CONFIG_MACRO_DIR([m4])
 AM_INIT_AUTOMAKE
 AC_CANONICAL_HOST
@@ -928,10 +928,18 @@ AC_SUBST([TAP_WIN_MIN_MINOR])
 
 AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
 
-AC_CONFIG_FILES([t_client.sh], [chmod +x t_client.sh])
 AC_CONFIG_FILES([
        Makefile
-       openvpn.spec
-       service-win32/Makefile
+       distro/Makefile
+       distro/rpm/Makefile
+       distro/rpm/openvpn.spec
+       include/Makefile
+       src/Makefile
+       src/openvpn/Makefile
+       src/openvpnserv/Makefile
+       tests/Makefile
+       sample/Makefile
+       doc/Makefile
 ])
+AC_CONFIG_FILES([tests/t_client.sh], [chmod +x tests/t_client.sh])
 AC_OUTPUT
similarity index 100%
rename from doval
rename to debug/doval
similarity index 100%
rename from dovalns
rename to debug/dovalns
diff --git a/distro/Makefile.am b/distro/Makefile.am
new file mode 100644 (file)
index 0000000..2dd6a6e
--- /dev/null
@@ -0,0 +1,15 @@
+#
+#  OpenVPN -- An application to securely tunnel IP networks
+#             over a single UDP port, with support for SSL/TLS-based
+#             session authentication and key exchange,
+#             packet encryption, packet authentication, and
+#             packet compression.
+#
+#  Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
+#  Copyright (C) 2006-2012 Alon Bar-Lev <alon.barlev@gmail.com>
+#
+
+MAINTAINERCLEANFILES = \
+       $(srcdir)/Makefile.in
+
+SUBDIRS = rpm
diff --git a/distro/rpm/Makefile.am b/distro/rpm/Makefile.am
new file mode 100644 (file)
index 0000000..536061d
--- /dev/null
@@ -0,0 +1,18 @@
+#
+#  OpenVPN -- An application to securely tunnel IP networks
+#             over a single UDP port, with support for SSL/TLS-based
+#             session authentication and key exchange,
+#             packet encryption, packet authentication, and
+#             packet compression.
+#
+#  Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
+#  Copyright (C) 2006-2012 Alon Bar-Lev <alon.barlev@gmail.com>
+#
+
+MAINTAINERCLEANFILES = \
+       $(srcdir)/Makefile.in
+
+dist_noinst_DATA = \
+       openvpn.spec \
+       openvpn.init.d.rhel \
+       openvpn.init.d.suse
similarity index 99%
rename from suse/openvpn.init
rename to distro/rpm/openvpn.init.d.suse
index 8f1060aa1f001e3455f6995582c5d67e1d5e174d..2bac7f322821f243ccf1eb2b728df50f7432c4e2 100644 (file)
@@ -82,7 +82,7 @@
 #
 
 # Location of openvpn binary
-openvpn="/usr/local/sbin/openvpn"
+openvpn="/usr/sbin/openvpn"
 
 # Lockfile
 lock="/var/lock/subsys/openvpn"
similarity index 80%
rename from openvpn.spec.in
rename to distro/rpm/openvpn.spec.in
index 6283d625632e308e1fbc10231c2bcff3c9fd4e24..455f73956fe50f872da1bcd40725f604b598c96e 100644 (file)
@@ -68,6 +68,13 @@ support for dynamic IP addresses and DHCP,
 scalability to hundreds or thousands of users,
 and portability to most major OS platforms.
 
+%package devel
+Summary:       OpenVPN is a robust and highly flexible VPN daemon by James Yonan.
+Group:         Applications/Internet
+Requires:      %{name}
+%description devel
+Development support for OpenVPN.
+
 #
 # Define vendor type
 #
@@ -99,17 +106,22 @@ and portability to most major OS platforms.
 %setup -q
 
 %build
-%configure --disable-dependency-tracking %{?with_password_save:--enable-password-save} %{?without_lzo:--disable-lzo} %{?with_kerberos:--with-ssl-headers=/usr/kerberos/include}
+%configure \
+       --disable-dependency-tracking \
+       --docdir="%{_docdir}/%{name}-%{version}" \
+       %{?with_password_save:--enable-password-save} \
+       %{?without_lzo:--disable-lzo} \
+       %{?with_kerberos:--with-ssl-headers=/usr/kerberos/include}
 %__make
 
 # Build down-root plugin
-pushd plugins/down-root
+pushd src/plugins/down-root
 %__make
 popd
 
 # Build auth-pam plugin
 %if %{build_auth_pam}
-pushd plugins/auth-pam
+pushd src/plugins/auth-pam
 %__make
 popd
 %endif
@@ -124,17 +136,15 @@ popd
 
 # Install init script
 %if "%{VENDOR}" == "SuSE"
-%__install -c -d -m 755 %{buildroot}/etc/init.d
-%__sed -e 's#openvpn=\"/usr/local/sbin/openvpn\"#openvpn=\"/usr/sbin/openvpn\"#' < suse/%{name}.init > %{_tmppath}/%{name}.init
-%__install -c -m 755 %{_tmppath}/%{name}.init %{buildroot}/etc/init.d/%{name}
-%__rm %{_tmppath}/%{name}.init 
+%__install -c -d -m 755 "%{buildroot}/etc/init.d"
+%__install -c -m 755 "distro/rpm/%{name}.init.d.suse"  "%{buildroot}/etc/init.d/%{name}"
 %else
-%__install -c -d -m 755 %{buildroot}/etc/rc.d/init.d
-%__install -c -m 755 sample-scripts/%{name}.init %{buildroot}/etc/rc.d/init.d/%{name}
+%__install -c -d -m 755 "%{buildroot}/etc/rc.d/init.d"
+%__install -c -m 755 distro/rpm/%{name}.init.d.rhel  "%{buildroot}/etc/rc.d/init.d/%{name}"
 %endif
 
 # Install /etc/openvpn
-%__install -c -d -m 755 %{buildroot}/etc/%{name}
+%__install -c -d -m 755 "%{buildroot}/etc/%{name}"
 
 #
 # Build /usr/share/openvpn
@@ -146,23 +156,23 @@ popd
 # Install the plugins
 #
 
-%__mkdir_p %{buildroot}%{_datadir}/%{name}/plugins/lib
+%__mkdir_p "%{buildroot}%{_datadir}/%{name}/plugins/lib"
 
 for pi in auth-pam down-root; do
-  %__mv -f plugins/$pi/README plugins/README.$pi
-  if [ -e plugins/$pi/openvpn-$pi.so ]; then
-    %__install -c -m 755 plugins/$pi/openvpn-$pi.so %{buildroot}%{_datadir}/openvpn/plugins/lib/openvpn-$pi.so
+  %__mv -f src/plugins/$pi/README src/plugins/README.$pi
+  if [ -e src/plugins/$pi/openvpn-$pi.so ]; then
+    %__install -c -m 755 src/plugins/$pi/openvpn-$pi.so "%{buildroot}%{_datadir}/openvpn/plugins/lib/openvpn-$pi.so"
   fi
 done
 
-%__mv -f plugins/README plugins/README.plugins
+%__mv -f src/plugins/README src/plugins/README.plugins
 
 #
 # Clean section
 #
 
 %clean
-[ %{buildroot} != "/" ] && rm -rf %{buildroot}
+[ %{buildroot} != "/" ] && rm -rf "%{buildroot}"
 
 #
 # On Linux 2.4, make the device node
@@ -215,7 +225,11 @@ fi
 %endif
 
 # Install extra %doc stuff
-%doc contrib/ sample-*/ plugins/README.*
+%doc contrib/ sample/ src/plugins/README.*
+
+%files devel
+%defattr(-,root,root)
+%{_includedir}/*
 
 %changelog
 * Thu Jul 30 2009 David Sommerseth <dazo@users.sourceforge.net>
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644 (file)
index 0000000..46687b2
--- /dev/null
@@ -0,0 +1,28 @@
+#
+#  OpenVPN -- An application to securely tunnel IP networks
+#             over a single UDP port, with support for SSL/TLS-based
+#             session authentication and key exchange,
+#             packet encryption, packet authentication, and
+#             packet compression.
+#
+#  Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
+#  Copyright (C) 2006-2012 Alon Bar-Lev <alon.barlev@gmail.com>
+#
+
+MAINTAINERCLEANFILES = \
+       $(srcdir)/Makefile.in
+
+CLEANFILES = openvpn.8.html
+
+dist_doc_DATA = \
+       management-notes.txt
+
+if WIN32
+dist_noinst_DATA = openvpn.8
+nodist_html_DATA = openvpn.8.html
+openvpn.8.html: $(srcdir)/openvpn.8
+       $(MAN2HTML) < $(srcdir)/openvpn.8 > openvpn.8.html
+else
+dist_man_MANS = openvpn.8
+endif
+
similarity index 100%
rename from openvpn.8
rename to doc/openvpn.8
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644 (file)
index 0000000..36eeb6c
--- /dev/null
@@ -0,0 +1,17 @@
+#
+#  OpenVPN -- An application to securely tunnel IP networks
+#             over a single UDP port, with support for SSL/TLS-based
+#             session authentication and key exchange,
+#             packet encryption, packet authentication, and
+#             packet compression.
+#
+#  Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
+#  Copyright (C) 2006-2012 Alon Bar-Lev <alon.barlev@gmail.com>
+#
+
+MAINTAINERCLEANFILES = \
+       $(srcdir)/Makefile.in
+
+dist_noinst_HEADERS = tap-windows.h
+
+include_HEADERS = openvpn-plugin.h
similarity index 100%
rename from openvpn-plugin.h
rename to include/openvpn-plugin.h
similarity index 100%
rename from tap-windows.h
rename to include/tap-windows.h
diff --git a/plugins/auth-pam/.svnignore b/plugins/auth-pam/.svnignore
deleted file mode 100644 (file)
index 140f8cf..0000000
+++ /dev/null
@@ -1 +0,0 @@
-*.so
diff --git a/sample/Makefile.am b/sample/Makefile.am
new file mode 100644 (file)
index 0000000..5df8d9c
--- /dev/null
@@ -0,0 +1,19 @@
+#
+#  OpenVPN -- An application to securely tunnel IP networks
+#             over a single UDP port, with support for SSL/TLS-based
+#             session authentication and key exchange,
+#             packet encryption, packet authentication, and
+#             packet compression.
+#
+#  Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
+#  Copyright (C) 2006-2012 Alon Bar-Lev <alon.barlev@gmail.com>
+#
+
+MAINTAINERCLEANFILES = \
+       $(srcdir)/Makefile.in
+
+EXTRA_DIST = \
+       sample-config-files \
+       sample-windows \
+       sample-keys \
+       sample-scripts
similarity index 100%
rename from sample-keys/README
rename to sample/sample-keys/README
similarity index 100%
rename from sample-keys/ca.crt
rename to sample/sample-keys/ca.crt
similarity index 100%
rename from sample-keys/ca.key
rename to sample/sample-keys/ca.key
diff --git a/service-win32/.svnignore b/service-win32/.svnignore
deleted file mode 100644 (file)
index d9987b3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-*.o
-Makefile.in
-.deps
-Makefile
diff --git a/service-win32/Makefile.am b/service-win32/Makefile.am
deleted file mode 100644 (file)
index 4e4f55e..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-#  OpenVPN -- An application to securely tunnel IP networks
-#             over a single UDP port, with support for SSL/TLS-based
-#             session authentication and key exchange,
-#             packet encryption, packet authentication, and
-#             packet compression.
-#
-#  Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
-#
-#  This program is free software; you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License version 2
-#  as published by the Free Software Foundation.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program (see the file COPYING included with this
-#  distribution); if not, write to the Free Software Foundation, Inc.,
-#  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-#
-
-MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
-
-if WIN32
-
-sbin_PROGRAMS = openvpnserv
-
-openvpnserv_SOURCES = \
-       openvpnserv.c \
-       service.h service.c
-
-else
-
-dist_noinst_DATA = \
-       openvpnserv.c \
-       service.h service.c
-
-endif
diff --git a/sources b/sources
deleted file mode 100755 (executable)
index dbfa018..0000000
--- a/sources
+++ /dev/null
@@ -1,2 +0,0 @@
-ls -1 *.[ch]
-ls -1 configure.ac Makefile.am
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644 (file)
index 0000000..f2481c2
--- /dev/null
@@ -0,0 +1,18 @@
+#
+#  OpenVPN -- An application to securely tunnel IP networks
+#             over a single UDP port, with support for SSL/TLS-based
+#             session authentication and key exchange,
+#             packet encryption, packet authentication, and
+#             packet compression.
+#
+#  Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
+#  Copyright (C) 2006-2012 Alon Bar-Lev <alon.barlev@gmail.com>
+#
+
+MAINTAINERCLEANFILES = \
+       $(srcdir)/Makefile.in
+
+EXTRA_DIST = \
+       plugins
+
+SUBDIRS = openvpn openvpnserv
diff --git a/src/openvpn/Makefile.am b/src/openvpn/Makefile.am
new file mode 100644 (file)
index 0000000..4a6b497
--- /dev/null
@@ -0,0 +1,95 @@
+#
+#  OpenVPN -- An application to securely tunnel IP networks
+#             over a single UDP port, with support for SSL/TLS-based
+#             session authentication and key exchange,
+#             packet encryption, packet authentication, and
+#             packet compression.
+#
+#  Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
+#  Copyright (C) 2006-2012 Alon Bar-Lev <alon.barlev@gmail.com>
+#
+
+MAINTAINERCLEANFILES = \
+       $(srcdir)/Makefile.in
+
+INCLUDES = -I$(top_srcdir)/include
+
+sbin_PROGRAMS = openvpn
+
+openvpn_SOURCES = \
+       base64.c base64.h \
+       basic.h \
+       buffer.c buffer.h \
+       circ_list.h \
+       clinat.c clinat.h \
+       common.h \
+       compat.h compat.c \
+       crypto.c crypto.h crypto_backend.h \
+       crypto_openssl.c crypto_openssl.h \
+       crypto_polarssl.c crypto_polarssl.h \
+       dhcp.c dhcp.h \
+       errlevel.h \
+       error.c error.h \
+       event.c event.h \
+       fdmisc.c fdmisc.h \
+       forward.c forward.h forward-inline.h \
+       fragment.c fragment.h \
+       gremlin.c gremlin.h \
+       helper.c helper.h \
+       httpdigest.c httpdigest.h \
+       lladdr.c lladdr.h \
+       init.c init.h \
+       integer.h \
+       interval.c interval.h \
+       list.c list.h \
+       lzo.c lzo.h \
+       manage.c manage.h \
+       mbuf.c mbuf.h \
+       memdbg.h \
+       misc.c misc.h \
+       mroute.c mroute.h \
+       mss.c mss.h \
+       mstats.c mstats.h \
+       mtcp.c mtcp.h \
+       mtu.c mtu.h \
+       mudp.c mudp.h \
+       multi.c multi.h \
+       ntlm.c ntlm.h \
+       occ.c occ.h occ-inline.h \
+       pkcs11.c pkcs11.h pkcs11_backend.h \
+       pkcs11_openssl.c \
+       pkcs11_polarssl.c \
+       openvpn.c openvpn.h \
+       options.c options.h \
+       otime.c otime.h \
+       packet_id.c packet_id.h \
+       perf.c perf.h \
+       pf.c pf.h pf-inline.h \
+       ping.c ping.h ping-inline.h \
+       plugin.c plugin.h \
+       pool.c pool.h \
+       proto.c proto.h \
+       proxy.c proxy.h \
+       ps.c ps.h \
+       push.c push.h \
+       pushlist.h \
+       reliable.c reliable.h \
+       route.c route.h \
+       schedule.c schedule.h \
+       session_id.c session_id.h \
+       shaper.c shaper.h \
+       sig.c sig.h \
+       socket.c socket.h \
+       socks.c socks.h \
+       ssl.c ssl.h  ssl_backend.h \
+       ssl_openssl.c ssl_openssl.h \
+       ssl_polarssl.c ssl_polarssl.h \
+       ssl_common.h \
+       ssl_verify.c ssl_verify.h ssl_verify_backend.h \
+       ssl_verify_openssl.c ssl_verify_openssl.h \
+       ssl_verify_polarssl.c ssl_verify_polarssl.h \
+       status.c status.h \
+       syshead.h \
+       tun.c tun.h \
+       win32.h win32.c \
+       cryptoapi.h cryptoapi.c
similarity index 100%
rename from base64.c
rename to src/openvpn/base64.c
similarity index 100%
rename from base64.h
rename to src/openvpn/base64.h
similarity index 100%
rename from basic.h
rename to src/openvpn/basic.h
similarity index 100%
rename from buffer.c
rename to src/openvpn/buffer.c
similarity index 100%
rename from buffer.h
rename to src/openvpn/buffer.h
similarity index 100%
rename from circ_list.h
rename to src/openvpn/circ_list.h
similarity index 100%
rename from clinat.c
rename to src/openvpn/clinat.c
similarity index 100%
rename from clinat.h
rename to src/openvpn/clinat.h
similarity index 100%
rename from common.h
rename to src/openvpn/common.h
similarity index 100%
rename from compat.c
rename to src/openvpn/compat.c
similarity index 100%
rename from compat.h
rename to src/openvpn/compat.h
similarity index 100%
rename from crypto.c
rename to src/openvpn/crypto.c
similarity index 100%
rename from crypto.h
rename to src/openvpn/crypto.h
similarity index 100%
rename from cryptoapi.c
rename to src/openvpn/cryptoapi.c
similarity index 100%
rename from cryptoapi.h
rename to src/openvpn/cryptoapi.h
similarity index 100%
rename from dhcp.c
rename to src/openvpn/dhcp.c
similarity index 100%
rename from dhcp.h
rename to src/openvpn/dhcp.h
similarity index 100%
rename from errlevel.h
rename to src/openvpn/errlevel.h
similarity index 100%
rename from error.c
rename to src/openvpn/error.c
similarity index 100%
rename from error.h
rename to src/openvpn/error.h
similarity index 100%
rename from event.c
rename to src/openvpn/event.c
similarity index 100%
rename from event.h
rename to src/openvpn/event.h
similarity index 100%
rename from fdmisc.c
rename to src/openvpn/fdmisc.c
similarity index 100%
rename from fdmisc.h
rename to src/openvpn/fdmisc.h
similarity index 100%
rename from forward.c
rename to src/openvpn/forward.c
similarity index 100%
rename from forward.h
rename to src/openvpn/forward.h
similarity index 100%
rename from fragment.c
rename to src/openvpn/fragment.c
similarity index 100%
rename from fragment.h
rename to src/openvpn/fragment.h
similarity index 100%
rename from gremlin.c
rename to src/openvpn/gremlin.c
similarity index 100%
rename from gremlin.h
rename to src/openvpn/gremlin.h
similarity index 100%
rename from helper.c
rename to src/openvpn/helper.c
similarity index 100%
rename from helper.h
rename to src/openvpn/helper.h
similarity index 100%
rename from httpdigest.c
rename to src/openvpn/httpdigest.c
similarity index 100%
rename from httpdigest.h
rename to src/openvpn/httpdigest.h
similarity index 100%
rename from init.c
rename to src/openvpn/init.c
similarity index 100%
rename from init.h
rename to src/openvpn/init.h
similarity index 100%
rename from integer.h
rename to src/openvpn/integer.h
similarity index 100%
rename from interval.c
rename to src/openvpn/interval.c
similarity index 100%
rename from interval.h
rename to src/openvpn/interval.h
similarity index 100%
rename from list.c
rename to src/openvpn/list.c
similarity index 100%
rename from list.h
rename to src/openvpn/list.h
similarity index 100%
rename from lladdr.c
rename to src/openvpn/lladdr.c
similarity index 100%
rename from lladdr.h
rename to src/openvpn/lladdr.h
similarity index 100%
rename from lzo.c
rename to src/openvpn/lzo.c
similarity index 100%
rename from lzo.h
rename to src/openvpn/lzo.h
similarity index 100%
rename from manage.c
rename to src/openvpn/manage.c
similarity index 100%
rename from manage.h
rename to src/openvpn/manage.h
similarity index 100%
rename from mbuf.c
rename to src/openvpn/mbuf.c
similarity index 100%
rename from mbuf.h
rename to src/openvpn/mbuf.h
similarity index 100%
rename from memdbg.h
rename to src/openvpn/memdbg.h
similarity index 100%
rename from misc.c
rename to src/openvpn/misc.c
similarity index 100%
rename from misc.h
rename to src/openvpn/misc.h
similarity index 100%
rename from mroute.c
rename to src/openvpn/mroute.c
similarity index 100%
rename from mroute.h
rename to src/openvpn/mroute.h
similarity index 100%
rename from mss.c
rename to src/openvpn/mss.c
similarity index 100%
rename from mss.h
rename to src/openvpn/mss.h
similarity index 100%
rename from mstats.c
rename to src/openvpn/mstats.c
similarity index 100%
rename from mstats.h
rename to src/openvpn/mstats.h
similarity index 100%
rename from mtcp.c
rename to src/openvpn/mtcp.c
similarity index 100%
rename from mtcp.h
rename to src/openvpn/mtcp.h
similarity index 100%
rename from mtu.c
rename to src/openvpn/mtu.c
similarity index 100%
rename from mtu.h
rename to src/openvpn/mtu.h
similarity index 100%
rename from mudp.c
rename to src/openvpn/mudp.c
similarity index 100%
rename from mudp.h
rename to src/openvpn/mudp.h
similarity index 100%
rename from multi.c
rename to src/openvpn/multi.c
similarity index 100%
rename from multi.h
rename to src/openvpn/multi.h
similarity index 100%
rename from ntlm.c
rename to src/openvpn/ntlm.c
similarity index 100%
rename from ntlm.h
rename to src/openvpn/ntlm.h
similarity index 100%
rename from occ-inline.h
rename to src/openvpn/occ-inline.h
similarity index 100%
rename from occ.c
rename to src/openvpn/occ.c
similarity index 100%
rename from occ.h
rename to src/openvpn/occ.h
similarity index 100%
rename from openvpn.c
rename to src/openvpn/openvpn.c
similarity index 100%
rename from openvpn.h
rename to src/openvpn/openvpn.h
similarity index 100%
rename from options.c
rename to src/openvpn/options.c
similarity index 100%
rename from options.h
rename to src/openvpn/options.h
similarity index 100%
rename from otime.c
rename to src/openvpn/otime.c
similarity index 100%
rename from otime.h
rename to src/openvpn/otime.h
similarity index 100%
rename from packet_id.c
rename to src/openvpn/packet_id.c
similarity index 100%
rename from packet_id.h
rename to src/openvpn/packet_id.h
similarity index 100%
rename from perf.c
rename to src/openvpn/perf.c
similarity index 100%
rename from perf.h
rename to src/openvpn/perf.h
similarity index 100%
rename from pf-inline.h
rename to src/openvpn/pf-inline.h
similarity index 100%
rename from pf.c
rename to src/openvpn/pf.c
similarity index 100%
rename from pf.h
rename to src/openvpn/pf.h
similarity index 100%
rename from ping-inline.h
rename to src/openvpn/ping-inline.h
similarity index 100%
rename from ping.c
rename to src/openvpn/ping.c
similarity index 100%
rename from ping.h
rename to src/openvpn/ping.h
similarity index 100%
rename from pkcs11.c
rename to src/openvpn/pkcs11.c
similarity index 100%
rename from pkcs11.h
rename to src/openvpn/pkcs11.h
similarity index 100%
rename from plugin.c
rename to src/openvpn/plugin.c
similarity index 100%
rename from plugin.h
rename to src/openvpn/plugin.h
similarity index 100%
rename from pool.c
rename to src/openvpn/pool.c
similarity index 100%
rename from pool.h
rename to src/openvpn/pool.h
similarity index 100%
rename from proto.c
rename to src/openvpn/proto.c
similarity index 100%
rename from proto.h
rename to src/openvpn/proto.h
similarity index 100%
rename from proxy.c
rename to src/openvpn/proxy.c
similarity index 100%
rename from proxy.h
rename to src/openvpn/proxy.h
similarity index 100%
rename from ps.c
rename to src/openvpn/ps.c
similarity index 100%
rename from ps.h
rename to src/openvpn/ps.h
similarity index 100%
rename from push.c
rename to src/openvpn/push.c
similarity index 100%
rename from push.h
rename to src/openvpn/push.h
similarity index 100%
rename from pushlist.h
rename to src/openvpn/pushlist.h
similarity index 100%
rename from reliable.c
rename to src/openvpn/reliable.c
similarity index 100%
rename from reliable.h
rename to src/openvpn/reliable.h
similarity index 100%
rename from route.c
rename to src/openvpn/route.c
similarity index 100%
rename from route.h
rename to src/openvpn/route.h
similarity index 100%
rename from schedule.c
rename to src/openvpn/schedule.c
similarity index 100%
rename from schedule.h
rename to src/openvpn/schedule.h
similarity index 100%
rename from session_id.c
rename to src/openvpn/session_id.c
similarity index 100%
rename from session_id.h
rename to src/openvpn/session_id.h
similarity index 100%
rename from shaper.c
rename to src/openvpn/shaper.c
similarity index 100%
rename from shaper.h
rename to src/openvpn/shaper.h
similarity index 100%
rename from sig.c
rename to src/openvpn/sig.c
similarity index 100%
rename from sig.h
rename to src/openvpn/sig.h
similarity index 100%
rename from socket.c
rename to src/openvpn/socket.c
similarity index 100%
rename from socket.h
rename to src/openvpn/socket.h
similarity index 100%
rename from socks.c
rename to src/openvpn/socks.c
similarity index 100%
rename from socks.h
rename to src/openvpn/socks.h
similarity index 100%
rename from ssl.c
rename to src/openvpn/ssl.c
similarity index 100%
rename from ssl.h
rename to src/openvpn/ssl.h
similarity index 100%
rename from ssl_backend.h
rename to src/openvpn/ssl_backend.h
similarity index 100%
rename from ssl_common.h
rename to src/openvpn/ssl_common.h
similarity index 100%
rename from ssl_openssl.c
rename to src/openvpn/ssl_openssl.c
similarity index 100%
rename from ssl_openssl.h
rename to src/openvpn/ssl_openssl.h
similarity index 100%
rename from ssl_polarssl.c
rename to src/openvpn/ssl_polarssl.c
similarity index 100%
rename from ssl_polarssl.h
rename to src/openvpn/ssl_polarssl.h
similarity index 100%
rename from ssl_verify.c
rename to src/openvpn/ssl_verify.c
similarity index 100%
rename from ssl_verify.h
rename to src/openvpn/ssl_verify.h
similarity index 100%
rename from status.c
rename to src/openvpn/status.c
similarity index 100%
rename from status.h
rename to src/openvpn/status.h
similarity index 100%
rename from syshead.h
rename to src/openvpn/syshead.h
similarity index 100%
rename from tun.c
rename to src/openvpn/tun.c
similarity index 100%
rename from tun.h
rename to src/openvpn/tun.h
similarity index 100%
rename from win32.c
rename to src/openvpn/win32.c
similarity index 100%
rename from win32.h
rename to src/openvpn/win32.h
diff --git a/src/openvpnserv/Makefile.am b/src/openvpnserv/Makefile.am
new file mode 100644 (file)
index 0000000..7ce3375
--- /dev/null
@@ -0,0 +1,20 @@
+#
+#  OpenVPN -- An application to securely tunnel IP networks
+#             over a single UDP port, with support for SSL/TLS-based
+#             session authentication and key exchange,
+#             packet encryption, packet authentication, and
+#             packet compression.
+#
+#  Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
+#  Copyright (C) 2006-2012 Alon Bar-Lev <alon.barlev@gmail.com>
+#
+
+MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
+
+if WIN32
+sbin_PROGRAMS = openvpnserv
+endif
+
+openvpnserv_SOURCES = \
+       openvpnserv.c \
+       service.h service.c
similarity index 100%
rename from plugins/README
rename to src/plugins/README
similarity index 96%
rename from plugins/auth-pam/Makefile
rename to src/plugins/auth-pam/Makefile
index d45a203c797de8b2bb0b7605cdced5505c3c21c4..c0b9c79e39df9eee248139684df08eb379fd9ed5 100755 (executable)
@@ -13,7 +13,7 @@ else
 endif
 
 # This directory is where we will look for openvpn-plugin.h
-CPPFLAGS=-I../..
+CPPFLAGS=-I../../../include
 
 CC=gcc
 CFLAGS=-O2 -Wall
similarity index 89%
rename from plugins/examples/build
rename to src/plugins/defer/build
index 7605595b36a4e19bd6c02c987169e9f9e5e68721..0612c0808ed5c35525b47f504fbcefb3de222842 100755 (executable)
@@ -6,7 +6,7 @@
 #
 
 # This directory is where we will look for openvpn-plugin.h
-CPPFLAGS="${CPPFLAGS:--I../..}"
+CPPFLAGS="${CPPFLAGS:--I../../../include}"
 
 CC="${CC:-gcc}"
 CFLAGS="${CFLAGS:--O2 -Wall -g}"
similarity index 95%
rename from plugins/defer/winbuild
rename to src/plugins/defer/winbuild
index 97e724a57dd930cb62866e207c106b85d85edb0a..82927d962cad59baf056b3bbcd6208b50a501be9 100755 (executable)
@@ -5,7 +5,7 @@
 #
 
 # This directory is where we will look for openvpn-plugin.h
-INCLUDE="-I.."
+INCLUDE="-I../../../build"
 
 CC_FLAGS="-O2 -Wall"
 
similarity index 93%
rename from plugins/down-root/Makefile
rename to src/plugins/down-root/Makefile
index 9659b7fddd8d12049a16178ee0c30abbbcfa964e..e66c99aed7754a22e13cd12d3951bc401c1e741d 100755 (executable)
@@ -3,7 +3,7 @@
 #
 
 # This directory is where we will look for openvpn-plugin.h
-CPPFLAGS=-I../..
+CPPFLAGS=-I../../../include
 
 CC=gcc
 CFLAGS=-O2 -Wall
similarity index 91%
rename from plugins/defer/build
rename to src/plugins/examples/build
index 9629c11f15b3b5b7091fc453e957522435c263d1..bbb05f7c786cf8877b02e86c410ebc1960f66fef 100755 (executable)
@@ -6,7 +6,7 @@
 #
 
 # This directory is where we will look for openvpn-plugin.h
-CPPFLAGS="${CPPFLAGS:--I../..}"
+CPPFLAGS="${CPPFLAGS:--I../../..}"
 
 CC="${CC:-gcc}"
 CFLAGS="${CFLAGS:--O2 -Wall -g}"
similarity index 94%
rename from plugins/examples/winbuild
rename to src/plugins/examples/winbuild
index 97e724a57dd930cb62866e207c106b85d85edb0a..decf05f8b7e599d9cbfbf06541f376fcba0e07da 100755 (executable)
@@ -5,7 +5,7 @@
 #
 
 # This directory is where we will look for openvpn-plugin.h
-INCLUDE="-I.."
+INCLUDE="-I../../../include"
 
 CC_FLAGS="-O2 -Wall"
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644 (file)
index 0000000..6ae845b
--- /dev/null
@@ -0,0 +1,24 @@
+#
+#  OpenVPN -- An application to securely tunnel IP networks
+#             over a single UDP port, with support for SSL/TLS-based
+#             session authentication and key exchange,
+#             packet encryption, packet authentication, and
+#             packet compression.
+#
+#  Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
+#  Copyright (C) 2006-2012 Alon Bar-Lev <alon.barlev@gmail.com>
+#
+
+MAINTAINERCLEANFILES = \
+       $(srcdir)/Makefile.in
+
+test_scripts = t_lpback.sh t_cltsrv.sh
+
+TESTS_ENVIRONMENT = top_srcdir="$(top_srcdir)"
+TESTS = $(test_scripts)
+
+dist_noinst_SCRIPTS = \
+       $(test_scripts) \
+       t_cltsrv-down.sh \
+       t_client.sh
+
similarity index 92%
rename from t_client.rc-sample
rename to tests/t_client.rc-sample
index e766b5db03693d363ab7f2f87250ca4ff79d4692..dcb3e4ae401264f2d0eb4cfa7e3f869c2735c17f 100644 (file)
@@ -7,9 +7,10 @@
 #
 # define these - if empty, no tests will run
 #
-CA_CERT="/home/openvpn-test-ca/keys/ca.crt"
-CLIENT_KEY="/home/openvpn-test-ca/keys/client-test.key"
-CLIENT_CERT="/home/openvpn-test-ca/keys/client-test.crt"
+top_srcdir="${top_srcdir:-..}"
+CA_CERT="${top_srcdir}/sample/sample-keys/ca.crt"
+CLIENT_KEY="${top_srcdir}/sample/sample-keys/client.key"
+CLIENT_CERT="${top_srcdir}/sample/sample-keys/client.crt"
 #
 # remote host (used as macro below)
 #
similarity index 95%
rename from t_client.sh.in
rename to tests/t_client.sh.in
index 47839deef90f08d596f1c170ce8f49394dc8ca90..7ba124c988a3aebbc0c3760f5dd09d2f26629775 100755 (executable)
 # - for "ping6" checks: fping6 binary in $PATH
 #
 
-if [ -r ./t_client.rc ] ; then
-    . ./t_client.rc
-elif [ -r "${srcdir}"/t_client.rc ] ; then
+srcdir="${srcdir:-.}"
+top_builddir="${top_builddir:-..}"
+if [ -r "${srcdir}"/t_client.rc ] ; then
     . "${srcdir}"/t_client.rc
 else
-    echo "$0: cannot find 't_client.rc' in current directory or" >&2
-    echo "$0: source dir ('${srcdir}').  SKIPPING TEST." >&2
+    echo "$0: cannot find 't_client.rc' in ('${srcdir}'). SKIPPING TEST." >&2
     exit 77
 fi
 
-if [ ! -x ./openvpn ]
+if [ ! -x "${top_builddir}/src/openvpn/openvpn" ]
 then
     echo "no (executable) openvpn binary in current directory. FAIL." >&2
     exit 1
@@ -228,8 +227,8 @@ do
        continue
     fi
 
-    echo " run ./openvpn $openvpn_conf"
-    $RUN_SUDO ./openvpn $openvpn_conf >$LOGDIR/$SUF:openvpn.log &
+    echo " run openvpn $openvpn_conf"
+    $RUN_SUDO "${top_builddir}/src/openvpn/openvpn" $openvpn_conf >$LOGDIR/$SUF:openvpn.log &
     opid=$!
 
     # make sure openvpn client is terminated in case shell exits
similarity index 100%
rename from t_cltsrv-down.sh
rename to tests/t_cltsrv-down.sh
similarity index 76%
rename from t_cltsrv.sh
rename to tests/t_cltsrv.sh
index 5bcbfc7088a6c44fdeee99270ee2172216c5a441..752251e4c9a7b504f0324132b1a7fdd8f6b791ab 100755 (executable)
@@ -19,6 +19,9 @@
 # 02110-1301, USA.
 
 set -e
+srcdir="${srcdir:-.}"
+top_srcdir="${top_srcdir:-..}"
+top_builddir="${top_builddir:-..}"
 trap "rm -f log.$$ log.$$.signal ; trap 0 ; exit 77" 1 2 15
 trap "rm -f log.$$ log.$$.signal ; exit 1" 0 3
 addopts=
@@ -41,8 +44,9 @@ esac
 
 # make sure that the --down script is executable -- fail (rather than
 # skip) test if it isn't.
-downscript="t_cltsrv-down.sh"
-test -x "${srcdir}"/$downscript || chmod +x "${srcdir}"/$downscript || { echo >&2 "$downscript is not executable, failing." ; exit 1 ; }
+downscript="../tests/t_cltsrv-down.sh"
+root="${top_srcdir}/sample"
+test -x "${root}/${downscript}" || chmod +x "${root}/${downscript}" || { echo >&2 "${root}/${downscript} is not executable, failing." ; exit 1 ; }
 echo "The following test will take about two minutes." >&2
 echo "If the addresses are in use, this test will retry up to two times." >&2
 
@@ -51,8 +55,8 @@ success=0
 for i in 1 2 3 ; do
   set +e
   (
-  ./openvpn --script-security 2 --cd "${srcdir}" ${addopts} --setenv role srv --down "$downscript" --tls-exit --ping-exit 180 --config sample-config-files/loopback-server &
-  ./openvpn --script-security 2 --cd "${srcdir}" ${addopts} --setenv role clt --down "$downscript" --tls-exit --ping-exit 180 --config sample-config-files/loopback-client
+  "${top_builddir}/src/openvpn/openvpn" --script-security 2 --cd "${root}" ${addopts} --setenv role srv --down "${downscript}" --tls-exit --ping-exit 180 --config "sample-config-files/loopback-server" &
+  "${top_builddir}/src/openvpn/openvpn" --script-security 2 --cd "${top_srcdir}/sample" ${addopts} --setenv role clt --down "${downscript}" --tls-exit --ping-exit 180 --config "sample-config-files/loopback-client"
   ) 3>log.$$.signal >log.$$ 2>&1
   e1=$?
   wait $!
similarity index 84%
rename from t_lpback.sh
rename to tests/t_lpback.sh
index b860de4235651d3eaa5eb8872fb69515c71a8de7..40767a1b7c887201ffe5dac716c3623f5b478e55 100755 (executable)
 # 02110-1301, USA.
 
 set -e
+top_builddir="${top_builddir:-..}"
 trap "rm -f key.$$ log.$$ ; trap 0 ; exit 77" 1 2 15
 trap "rm -f key.$$ log.$$ ; exit 1" 0 3
-./openvpn --genkey --secret key.$$
+"${top_builddir}/src/openvpn/openvpn" --genkey --secret key.$$
 set +e
-( ./openvpn --test-crypto --secret key.$$ ) >log.$$ 2>&1
+( "${top_builddir}/src/openvpn/openvpn" --test-crypto --secret key.$$ ) >log.$$ 2>&1
 e=$?
 if [ $e != 0 ] ; then cat log.$$ ; fi
 rm key.$$ log.$$