Permalink
Browse files

Release 8.5

  • Loading branch information...
0 parents commit 4d7196fc1d811a448476332cff38dbf76e4cc988 @hsleisink committed Oct 3, 2012
Showing with 59,798 additions and 0 deletions.
  1. +1 −0 AUTHORS
  2. +96 −0 CMakeFiles.txt
  3. +156 −0 CMakeLists.txt
  4. +1,125 −0 ChangeLog
  5. +38 −0 INSTALL
  6. +339 −0 LICENSE
  7. +12 −0 cmake/CopyIfNotExists.cmake
  8. +182 −0 cmake/GNUInstallDirs.cmake
  9. +47 −0 config.h.in
  10. +17 −0 config/cgi-wrapper.conf
  11. +110 −0 config/hiawatha.conf.in
  12. +117 −0 config/index.xslt
  13. +91 −0 config/mimetype.conf
  14. +23 −0 config/php-fcgi.conf.in
  15. +23 −0 config/toolkit.conf
  16. +47 −0 extra/config.h
  17. +1 −0 extra/debian/README.debian
  18. +1 −0 extra/debian/compat
  19. +16 −0 extra/debian/control
  20. +10 −0 extra/debian/copyright
  21. +8 −0 extra/debian/hiawatha.dirs
  22. +17 −0 extra/debian/hiawatha.dsc
  23. +5 −0 extra/debian/hiawatha.postinst
  24. +5 −0 extra/debian/hiawatha.postrm
  25. +4 −0 extra/debian/hiawatha.prerm
  26. +1 −0 extra/debian/hiawatha.substvars
  27. +15 −0 extra/debian/info
  28. +116 −0 extra/debian/init.d/hiawatha
  29. +69 −0 extra/debian/init.d/php-fcgi
  30. +1 −0 extra/debian/source/format
  31. +52 −0 extra/hiawatha.html
  32. +49 −0 extra/index.html
  33. +9 −0 extra/logrotate.in
  34. +48 −0 extra/macosx/HiawathaWebserver.prefPane/Contents/Info.plist
  35. BIN extra/macosx/HiawathaWebserver.prefPane/Contents/MacOS/HiawathaWebserver
  36. BIN extra/macosx/HiawathaWebserver.prefPane/Contents/Resources/English.lproj/HiawathaWebserverPref.nib
  37. BIN extra/macosx/HiawathaWebserver.prefPane/Contents/Resources/English.lproj/InfoPlist.strings
  38. BIN extra/macosx/HiawathaWebserver.prefPane/Contents/Resources/HiawathaWebserverPref.tiff
  39. BIN extra/macosx/HiawathaWebserver.prefPane/Contents/Resources/hiawatha_logo.png
  40. BIN extra/macosx/HiawathaWebserver.prefPane_source.tar.gz
  41. +1 −0 extra/macosx/Introduction.txt
  42. +339 −0 extra/macosx/License.txt
  43. +3 −0 extra/macosx/Readme.txt
  44. +8 −0 extra/macosx/diskimage/Installation.txt
  45. +19 −0 extra/macosx/diskimage/Uninstallation.txt
  46. +1 −0 extra/macosx/hiawatha.pmdoc/01root-contents.xml
  47. +1 −0 extra/macosx/hiawatha.pmdoc/01root.xml
  48. BIN extra/macosx/hiawatha.pmdoc/hiawatha_logo.png
  49. +1 −0 extra/macosx/hiawatha.pmdoc/index.xml
  50. BIN extra/macosx/hiawatha_logo.png
  51. +20 −0 extra/macosx/org.hiawatha-webserver.httpd.plist
  52. +52 −0 extra/make_debian_extra
  53. +75 −0 extra/make_debian_package
  54. +72 −0 extra/make_macosx_package
  55. +22 −0 extra/make_source_package
  56. +93 −0 extra/make_windows_package
  57. +9 −0 extra/mkcert
  58. +117 −0 extra/newroot
  59. BIN extra/windows/Hiawatha webserver.lnk
  60. +12 −0 extra/windows/Hiawatha.bat
  61. BIN extra/windows/Hiawatha.ico
  62. +30 −0 extra/windows/Installation.txt
  63. BIN extra/windows/PHP5 FastCGI.lnk
  64. +12 −0 extra/windows/TestConfig.bat
  65. +81 −0 extra/windows/hiawatha.conf
  66. +52 −0 man/cgi-wrapper.1.in
  67. +971 −0 man/hiawatha.1.in
  68. +31 −0 man/newroot.1
  69. +67 −0 man/php-fcgi.1.in
  70. +102 −0 man/ssi-cgi.1
  71. +41 −0 man/wigwam.1
  72. +31 −0 polarssl/CMakeLists.txt
  73. +522 −0 polarssl/ChangeLog
  74. +339 −0 polarssl/LICENSE
  75. +11 −0 polarssl/include/CMakeLists.txt
  76. +176 −0 polarssl/include/polarssl/aes.h
  77. +80 −0 polarssl/include/polarssl/arc4.h
  78. +244 −0 polarssl/include/polarssl/asn1.h
  79. +87 −0 polarssl/include/polarssl/base64.h
  80. +632 −0 polarssl/include/polarssl/bignum.h
  81. +742 −0 polarssl/include/polarssl/bn_mul.h
  82. +182 −0 polarssl/include/polarssl/camellia.h
  83. +47 −0 polarssl/include/polarssl/certs.h
  84. +456 −0 polarssl/include/polarssl/cipher.h
  85. +91 −0 polarssl/include/polarssl/cipher_wrap.h
  86. +688 −0 polarssl/include/polarssl/config.h
  87. +228 −0 polarssl/include/polarssl/ctr_drbg.h
  88. +89 −0 polarssl/include/polarssl/debug.h
  89. +227 −0 polarssl/include/polarssl/des.h
  90. +153 −0 polarssl/include/polarssl/dhm.h
  91. +150 −0 polarssl/include/polarssl/entropy.h
  92. +75 −0 polarssl/include/polarssl/entropy_poll.h
  93. +101 −0 polarssl/include/polarssl/error.h
  94. +71 −0 polarssl/include/polarssl/havege.h
  95. +354 −0 polarssl/include/polarssl/md.h
  96. +153 −0 polarssl/include/polarssl/md2.h
  97. +152 −0 polarssl/include/polarssl/md4.h
  98. +154 −0 polarssl/include/polarssl/md5.h
  99. +64 −0 polarssl/include/polarssl/md_wrap.h
  100. +159 −0 polarssl/include/polarssl/net.h
  101. +136 −0 polarssl/include/polarssl/openssl.h
  102. +100 −0 polarssl/include/polarssl/padlock.h
  103. +100 −0 polarssl/include/polarssl/pem.h
  104. +126 −0 polarssl/include/polarssl/pkcs11.h
  105. +372 −0 polarssl/include/polarssl/rsa.h
  106. +152 −0 polarssl/include/polarssl/sha1.h
  107. +160 −0 polarssl/include/polarssl/sha2.h
  108. +168 −0 polarssl/include/polarssl/sha4.h
  109. +703 −0 polarssl/include/polarssl/ssl.h
  110. +75 −0 polarssl/include/polarssl/timing.h
  111. +81 −0 polarssl/include/polarssl/version.h
  112. +726 −0 polarssl/include/polarssl/x509.h
  113. +111 −0 polarssl/include/polarssl/xtea.h
  114. +56 −0 polarssl/library/CMakeLists.txt
  115. +72 −0 polarssl/library/Makefile
  116. +1,336 −0 polarssl/library/aes.c
  117. +169 −0 polarssl/library/arc4.c
  118. +260 −0 polarssl/library/asn1parse.c
  119. +254 −0 polarssl/library/base64.c
  120. +2,111 −0 polarssl/library/bignum.c
  121. +1,035 −0 polarssl/library/camellia.c
  122. +196 −0 polarssl/library/certs.c
  123. +527 −0 polarssl/library/cipher.c
  124. +552 −0 polarssl/library/cipher_wrap.c
  125. +566 −0 polarssl/library/ctr_drbg.c
  126. +238 −0 polarssl/library/debug.c
  127. +993 −0 polarssl/library/des.c
  128. +302 −0 polarssl/library/dhm.c
  129. +204 −0 polarssl/library/entropy.c
  130. +136 −0 polarssl/library/entropy_poll.c
  131. +512 −0 polarssl/library/error.c
  132. +231 −0 polarssl/library/havege.c
  133. +297 −0 polarssl/library/md.c
  134. +364 −0 polarssl/library/md2.c
  135. +460 −0 polarssl/library/md4.c
  136. +583 −0 polarssl/library/md5.c
  137. +715 −0 polarssl/library/md_wrap.c
  138. +356 −0 polarssl/library/net.c
  139. +162 −0 polarssl/library/padlock.c
  140. +352 −0 polarssl/library/pem.c
  141. +238 −0 polarssl/library/pkcs11.c
  142. +1,211 −0 polarssl/library/rsa.c
  143. +624 −0 polarssl/library/sha1.c
  144. +705 −0 polarssl/library/sha2.c
  145. +760 −0 polarssl/library/sha4.c
  146. +833 −0 polarssl/library/ssl_cli.c
  147. +1,028 −0 polarssl/library/ssl_srv.c
  148. +2,333 −0 polarssl/library/ssl_tls.c
  149. +271 −0 polarssl/library/timing.c
  150. +50 −0 polarssl/library/version.c
  151. +3,252 −0 polarssl/library/x509parse.c
  152. +248 −0 polarssl/library/xtea.c
  153. +155 −0 src/alternative.c
  154. +39 −0 src/alternative.h
  155. +531 −0 src/cache.c
  156. +60 −0 src/cache.h
  157. +472 −0 src/cgi-wrapper.c
  158. +821 −0 src/cgi.c
  159. +83 −0 src/cgi.h
  160. +767 −0 src/client.c
  161. +57 −0 src/client.h
  162. +287 −0 src/envir.c
  163. +21 −0 src/envir.h
  164. +37 −0 src/global.h
  165. +2,046 −0 src/hiawatha.c
  166. +641 −0 src/http.c
  167. +13 −0 src/http.h
  168. +427 −0 src/httpauth.c
  169. +20 −0 src/httpauth.h
  170. +564 −0 src/libfs.c
  171. +47 −0 src/libfs.h
  172. +254 −0 src/libip.c
  173. +58 −0 src/libip.h
  174. +561 −0 src/liblist.c
  175. +114 −0 src/liblist.h
  176. +350 −0 src/libssl.c
  177. +51 −0 src/libssl.h
  178. +549 −0 src/libstr.c
  179. +40 −0 src/libstr.h
  180. +485 −0 src/log.c
  181. +36 −0 src/log.h
  182. +170 −0 src/mimetype.c
  183. +38 −0 src/mimetype.h
  184. +417 −0 src/monitor.c
  185. +40 −0 src/monitor.h
  186. +550 −0 src/php-fcgi.c
  187. +387 −0 src/rproxy.c
  188. +75 −0 src/rproxy.h
  189. +704 −0 src/send.c
  190. +39 −0 src/send.h
  191. +2,077 −0 src/serverconfig.c
  192. +350 −0 src/serverconfig.h
  193. +774 −0 src/session.c
  194. +145 −0 src/session.h
  195. +568 −0 src/ssi-cgi.c
  196. +1,458 −0 src/target.c
  197. +32 −0 src/target.h
  198. +448 −0 src/tomahawk.c
  199. +62 −0 src/tomahawk.h
  200. +733 −0 src/toolkit.c
  201. +91 −0 src/toolkit.h
  202. +164 −0 src/userconfig.c
  203. +27 −0 src/userconfig.h
  204. +836 −0 src/wigwam.c
  205. +855 −0 src/xslt.c
  206. +29 −0 src/xslt.h
@@ -0,0 +1 @@
+The Hiawatha webserver has been written by Hugo Leisink <hugo@leisink.net>.
@@ -0,0 +1,96 @@
+# cgi-wrapper sources
+set(cgi_wrapper_src
+ src/alternative.c
+ src/cgi-wrapper.c
+ src/userconfig.c
+ src/libfs.c
+ src/libstr.c
+)
+
+# hiawatha sources
+set(hiawatha_src
+ src/alternative.c
+ src/cache.c
+ src/cgi.c
+ src/client.c
+ src/envir.c
+ src/hiawatha.c
+ src/http.c
+ src/httpauth.c
+ src/libfs.c
+ src/libip.c
+ src/liblist.c
+ src/libssl.c
+ src/libstr.c
+ src/log.c
+ src/mimetype.c
+ src/monitor.c
+ src/rproxy.c
+ src/send.c
+ src/serverconfig.c
+ src/session.c
+ src/target.c
+ src/tomahawk.c
+ src/toolkit.c
+ src/userconfig.c
+ src/xslt.c
+)
+if(NOT ENABLE_SSL)
+ set(hiawatha_src ${hiawatha_src} polarssl/library/md5.c)
+endif()
+
+# php-fcgi sources
+set(php_fcgi_src
+ src/alternative.c
+ src/libip.c
+ src/liblist.c
+ src/libstr.c
+ src/php-fcgi.c
+ src/userconfig.c
+)
+
+# ssi-cgi sources
+set(ssi_cgi_src
+ src/alternative.c
+ src/libfs.c
+ src/libip.c
+ src/liblist.c
+ src/libstr.c
+ src/ssi-cgi.c
+)
+
+# wigwam sources
+set(wigwam_src
+ src/alternative.c
+ src/libfs.c
+ src/libip.c
+ src/libstr.c
+ src/liblist.c
+ src/toolkit.c
+ src/wigwam.c
+ polarssl/library/md5.c
+)
+
+# configuration files
+set(config_files
+ config/cgi-wrapper.conf
+ config/index.xslt
+ config/mimetype.conf
+)
+
+set(config_files_in
+ config/hiawatha.conf
+ config/php-fcgi.conf
+)
+
+# manual pages
+set(manual_pages
+ man/ssi-cgi.1
+ man/wigwam.1
+)
+
+set(manual_pages_in
+ man/cgi-wrapper.1
+ man/hiawatha.1
+ man/php-fcgi.1
+)
@@ -0,0 +1,156 @@
+cmake_minimum_required(VERSION 2.8.4)
+project(Hiawatha C)
+
+# Options
+option(ENABLE_CACHE "Enable cache support in Hiawatha." on)
+option(ENABLE_CHROOT "Enable chroot support in Hiawatha." off)
+option(ENABLE_DEBUG "Enable debug information (for development only)." off)
+option(ENABLE_IPV6 "Enable IPv6 support in Hiawatha." on)
+option(ENABLE_MONITOR "Enable support for the Hiawatha Monitor." off)
+option(ENABLE_RPROXY "Enable reverse proxy support in Hiawatha." on)
+option(ENABLE_SSL "Enable SSL (PolarSSL) support in Hiawatha." on)
+option(ENABLE_TOMAHAWK "Enable Tomahawk in Hiawatha" off)
+option(ENABLE_TOOLKIT "Enable the URL toolkit in Hiawatha" on)
+option(ENABLE_XSLT "Enable XSLT support in Hiawatha." on)
+
+# Includes
+include(CMakeFiles.txt)
+include(CheckIncludeFile)
+include(CheckIncludeFiles)
+include(CheckFunctionExists)
+include(CheckLibraryExists)
+include(FindLibXml2)
+include(FindLibXslt)
+include(cmake/GNUInstallDirs.cmake)
+include(cmake/CopyIfNotExists.cmake)
+
+# Settings
+set(HIAWATHA_VERSION_MAJOR 8)
+set(HIAWATHA_VERSION_MINOR 5)
+set(HIAWATHA_VERSION_PATCH 0)
+string(TOLOWER ${CMAKE_PROJECT_NAME} PROJECT_NAME)
+if(${HIAWATHA_VERSION_PATCH} EQUAL 0)
+ set(HIAWATHA_VERSION "${HIAWATHA_VERSION_MAJOR}.${HIAWATHA_VERSION_MINOR}")
+else()
+ set(HIAWATHA_VERSION "${HIAWATHA_VERSION_MAJOR}.${HIAWATHA_VERSION_MINOR}.${HIAWATHA_VERSION_PATCH}")
+endif()
+if(EXISTS "/proc/loadavg")
+ option(ENABLE_LOADCHECK "Enable the ability to check for server load." on)
+endif()
+set(CONFIG_DIR ${CMAKE_INSTALL_FULL_SYSCONFDIR}/hiawatha CACHE STRING "Configuration directory")
+set(LOG_DIR ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/log/hiawatha CACHE STRING "Log directory")
+set(PID_DIR ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run CACHE STRING "PID directory")
+set(WEBROOT_DIR ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/www/hiawatha CACHE STRING "Webroot directory")
+set(WORK_DIR ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/hiawatha CACHE STRING "Work directory")
+set(CMAKE_BUILD_TYPE "RelWithDebInfo")
+set(CMAKE_C_FLAGS "-Wall -Wextra")
+
+# Compiler options
+check_include_file(crypt.h HAVE_CRYPT_H)
+check_include_file(arpa/inet.h HAVE_ARPA_INET_H)
+check_include_files("sys/types.h;netinet/in.h" HAVE_NETINET_IN_H)
+check_include_files("sys/types.h;netinet/tcp.h" HAVE_NETINET_TCP_H)
+check_include_file(rpcsvc/crypt.h HAVE_RPCSVC_CRYPT_H)
+
+check_function_exists(setenv HAVE_SETENV)
+check_function_exists(unsetenv HAVE_UNSETENV)
+check_function_exists(clearenv HAVE_CLEARENV)
+check_function_exists(strcasecmp HAVE_STRCASECMP)
+check_function_exists(strncasecmp HAVE_STRNCASECMP)
+check_function_exists(strnstr HAVE_STRNSTR)
+check_function_exists(strcasestr HAVE_STRCASESTR)
+
+check_library_exists(crypt crypt "" HAVE_CRYPT_LIBRARY)
+check_library_exists(network socket "" HAVE_NETWORK_LIBRARY)
+check_library_exists(z gzdopen "" HAVE_Z_LIBRARY)
+
+if(HAVE_CRYPT_LIBRARY)
+ set(CRYPT_LIBRARY "crypt")
+endif()
+if(HAVE_NETWORK_LIBRARY)
+ set(NETWORK_LIBRARY "network")
+endif()
+if(HAVE_Z_LIBRARY)
+ set(Z_LIBRARY "z")
+endif()
+if (APPLE OR CYGWIN)
+ set(CIFS 1)
+endif()
+
+# CPack
+set(CPACK_PACKAGE_VERSION_MAJOR ${HIAWATHA_VERSION_MAJOR})
+set(CPACK_PACKAGE_VERSION_MINOR ${HIAWATHA_VERSION_MINOR})
+set(CPACK_PACKAGE_VERSION_PATCH ${HIAWATHA_VERSION_PATCH})
+set(CPACK_SOURCE_GENERATOR "TGZ")
+set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${HIAWATHA_VERSION}")
+set(CPACK_SOURCE_IGNORE_FILES "/build(/|_.*/)")
+include(CPack)
+
+# PolarSSL
+if(ENABLE_SSL)
+ option(USE_SHARED_POLARSSL_LIBRARY "Build PolarSSL as a shared library." ON)
+ set(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_FULL_LIBDIR}/hiawatha)
+ set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/hiawatha)
+ add_subdirectory(polarssl)
+ set(POLARSSL_LIBRARY "polarssl")
+endif()
+
+# Hiawatha
+include_directories(${CMAKE_CURRENT_BINARY_DIR} polarssl/include)
+if(ENABLE_XSLT)
+ include_directories(${LIBXML2_INCLUDE_DIR} ${LIBXSLT_INCLUDE_DIR})
+endif()
+
+# Configure files
+configure_file(config.h.in config.h)
+foreach (configfile ${config_files_in})
+ configure_file(${configfile}.in ${configfile} @ONLY)
+endforeach()
+foreach(manpage ${manual_pages_in})
+ configure_file(${manpage}.in ${manpage})
+endforeach()
+configure_file(extra/logrotate.in logrotate.d/hiawatha)
+
+# Binaries
+add_executable(cgi-wrapper ${cgi_wrapper_src})
+add_executable(hiawatha ${hiawatha_src})
+add_executable(php-fcgi ${php_fcgi_src})
+add_executable(ssi-cgi ${ssi_cgi_src})
+add_executable(wigwam ${wigwam_src})
+target_link_libraries(wigwam ${CRYPT_LIBRARY})
+target_link_libraries(hiawatha ${CRYPT_LIBRARY} pthread ${Z_LIBRARY})
+if(ENABLE_SSL)
+ target_link_libraries(hiawatha ${POLARSSL_LIBRARY})
+ set_target_properties(hiawatha PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/hiawatha)
+endif()
+if(ENABLE_XSLT)
+ target_link_libraries(hiawatha ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES})
+endif()
+
+# Installation
+install(TARGETS hiawatha php-fcgi wigwam DESTINATION ${CMAKE_INSTALL_SBINDIR})
+install(TARGETS cgi-wrapper DESTINATION ${CMAKE_INSTALL_SBINDIR}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE SETUID)
+install(TARGETS ssi-cgi DESTINATION ${CMAKE_INSTALL_BINDIR})
+if(ENABLE_CHROOT)
+ install(PROGRAMS extra/newroot DESTINATION ${CMAKE_INSTALL_SBINDIR})
+endif()
+
+foreach(configfile ${config_files})
+ install(CODE "copy_if_not_exists(\"${CMAKE_SOURCE_DIR}/${configfile}\" \"${CONFIG_DIR}\")")
+endforeach()
+foreach(configfile ${config_files_in})
+ install(CODE "copy_if_not_exists(\"${CMAKE_CURRENT_BINARY_DIR}/${configfile}\" \"${CONFIG_DIR}\")")
+endforeach()
+
+install(FILES ${manual_pages} DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1)
+foreach(manpage ${manual_pages_in})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${manpage} DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1)
+endforeach()
+
+install(FILES extra/index.html DESTINATION ${WEBROOT_DIR})
+
+# Create directories
+install(DIRECTORY empty DESTINATION ${LOG_DIR} PATTERN "empty" EXCLUDE)
+install(DIRECTORY empty DESTINATION ${PID_DIR} PATTERN "empty" EXCLUDE)
+install(DIRECTORY empty DESTINATION ${WORK_DIR} PATTERN "empty" EXCLUDE)
Oops, something went wrong.

0 comments on commit 4d7196f

Please sign in to comment.