Browse Source

Move binary names: angel becomes lighttpd2, worker lighttpd2-worker

personal/stbuehler/wip
Stefan Bühler 11 years ago
parent
commit
c3164aba8b
  1. 13
      configure.ac
  2. 3
      doc/Makefile.am
  3. 6
      doc/angel.conf
  4. 8
      doc/lighttpd2-worker.8
  5. 8
      doc/lighttpd2.8
  6. 34
      src/CMakeLists.txt
  7. 10
      src/angel/Makefile.am
  8. 7
      src/angel/angel_plugin_core.c
  9. 2
      src/angel/wscript
  10. 14
      src/main/Makefile.am
  11. 0
      src/main/lighttpd_glue.c
  12. 0
      src/main/lighttpd_worker.c
  13. 6
      src/main/wscript

13
configure.ac

@ -3,7 +3,7 @@
AC_PREREQ(2.61)
AC_INIT([lighttpd], [2.0.0], [contact@lighttpd.net])
AC_CONFIG_SRCDIR([src/main/lighttpd.c])
AC_CONFIG_SRCDIR([src/main/lighttpd_worker.c])
AC_CONFIG_HEADER([include/lighttpd/config.h])
AC_CONFIG_MACRO_DIR([m4])
@ -47,6 +47,15 @@ AC_ARG_WITH(
[pkglibdir=$libdir/lighttpd-$PACKAGE_VERSION])
AC_SUBST(pkglibdir)
# libexecdir
AC_ARG_WITH(
[libexecdir],
AS_HELP_STRING([--with-libexecdir=dir],
[specify directory for lighttpd2-worker file (default LIBDIR/lighttpd2]),
[libexecdir=$withval],
[libexecdir=$libdir/lighttpd2])
AC_SUBST(libexecdir)
# Checks for libraries.
# glib/gthread (gthread includes glib)
@ -329,7 +338,7 @@ AC_ARG_ENABLE(extra-warnings,
esac],[extrawarnings=false])
if test x$extrawarnings = xtrue; then
CFLAGS="${CFLAGS} -g -O2 -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wno-pointer-sign -Wcast-align -Winline -Wsign-compare -Wnested-externs -Wpointer-arith -Wl,--as-needed -Wformat-security"
CFLAGS="${CFLAGS} -g -O2 -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wno-pointer-sign -Wcast-align -Wsign-compare -Wnested-externs -Wpointer-arith -Wl,--as-needed -Wformat-security"
fi
AC_CONFIG_FILES([Makefile \

3
doc/Makefile.am

@ -1,5 +1,4 @@
dist_man8_MANS=lighttpd2-angel.8
dist_man1_MANS=lighttpd2.1
dist_man8_MANS=lighttpd2.8 lighttpd2-worker.8
EXTRA_DIST=angel.conf lighttpd.conf mimetypes.conf service \
core__cached_html.lua \

6
doc/angel.conf

@ -1,7 +1,5 @@
instance {
user "www-data";
binary "/usr/bin/lighttpd2";
config "/etc/lighttpd2/lighttpd.conf";
max-open-files 16384;
copy-env ( "PATH" );
@ -9,7 +7,3 @@ instance {
# env ( "G_SLICE=always-malloc", "G_DEBUG=gc-friendly" );
# wrapper ("/usr/bin/valgrind", "--leak-check=full", "--show-reachable=yes", "--leak-resolution=high" );
}
listen { ip "[::/0]:80"; }
listen { ip "[::/0]:443"; }

8
doc/lighttpd2.1 → doc/lighttpd2-worker.8

@ -1,10 +1,10 @@
.TH lighttpd2 "1" "2009-12-26" "" ""
.TH lighttpd2-worker "8" "2010-08-24" "" ""
.
.SH NAME
lighttpd \- a fast, secure and flexible web server
.
.SH SYNOPSIS
\fBlighttpd2\fP [\fB\-ltvh\fP] \fB\-c\fP \fIconfigfile\fP [\fB\-m\fP \fImoduledir\fP]
\fBlighttpd2-worker\fP [\fB\-ltvh\fP] \fB\-c\fP \fIconfigfile\fP [\fB\-m\fP \fImoduledir\fP]
.
.SH DESCRIPTION
\fBlighttpd\fP (pronounced 'lighty') is an advanced HTTP daemon that aims
@ -15,6 +15,8 @@ CGI, basic and digest HTTP authentication, output compression, URL rewriting.
This manual page only lists the command line arguments. For details
on how to configure \fBlighttpd\fP and its modules see the online documentation:
http://redmine.lighttpd.net/wiki/lighttpd-sandbox
.PP
You probably want to use the angel instead of this application: lighttpd2(8)
.
.SH OPTIONS
The following options are supported:
@ -42,7 +44,7 @@ Show a brief help message and exit.
.SH SEE ALSO
Online Documentation: http://redmine.lighttpd.net/wiki/lighttpd-sandbox
.PP
spawn-fcgi(1), lighttpd2-angel(8)
spawn-fcgi(1), lighttpd2(8)
.
.SH AUTHOR
Jan Kneschke <jan@kneschke.de>

8
doc/lighttpd2-angel.8 → doc/lighttpd2.8

@ -1,10 +1,10 @@
.TH lighttpd2-angel "8" "2009-12-26" "" ""
.TH lighttpd2 "8" "2010-08-24" "" ""
.
.SH NAME
lighttpd \- a fast, secure and flexible web server
.
.SH SYNOPSIS
\fBlighttpd2-angel\fP [\fB\-nvh\fP] \fB\-c\fP \fIconfigfile\fP [\fB\-m\fP \fImoduledir\fP] [\fB\--pid-file\fP \fIpidfile\fP]
\fBlighttpd2\fP [\fB\-nvh\fP] \fB\-c\fP \fIconfigfile\fP [\fB\-m\fP \fImoduledir\fP] [\fB\--pid-file\fP \fIpidfile\fP]
.
.SH DESCRIPTION
\fBlighttpd\fP (pronounced 'lighty') is an advanced HTTP daemon that aims
@ -12,7 +12,7 @@ to be secure, fast, compliant and very flexible. It has been optimized for
high performance. Its feature set includes, but is not limited to, FastCGI,
CGI, basic and digest HTTP authentication, output compression, URL rewriting.
.PP
The angel is used to keep lighty running and for other tasks where root
The angel is used to keep the worker running and for other tasks where root
permissions are needed (opening network sockets, ...)
.PP
This manual page only lists the command line arguments. For details
@ -46,7 +46,7 @@ Show a brief help message and exit.
.SH SEE ALSO
Online Documentation: http://redmine.lighttpd.net/wiki/lighttpd-sandbox
.PP
lighttpd2(1)
lighttpd2-worker(8)
.
.SH AUTHOR
Jan Kneschke <jan@kneschke.de>

34
src/CMakeLists.txt

@ -203,7 +203,7 @@ SET(LIGHTTPD_SHARED_SRC
http_range_parser.c
http_request_parser.c
http_response_parser.c
lighttpd-glue.c
lighttpd_glue.c
log.c
network.c
network_write.c network_writev.c
@ -295,17 +295,17 @@ ADD_LIBRARY(lighttpd-${PACKAGE_VERSION}-sharedangel SHARED
)
TARGET_LINK_LIBRARIES(lighttpd-${PACKAGE_VERSION}-sharedangel lighttpd-${PACKAGE_VERSION}-common)
ADD_EXECUTABLE(lighttpd2
main/lighttpd.c
ADD_EXECUTABLE(lighttpd2-worker
main/lighttpd_worker.c
)
TARGET_LINK_LIBRARIES(lighttpd2 lighttpd-${PACKAGE_VERSION}-common lighttpd-${PACKAGE_VERSION}-shared)
TARGET_LINK_LIBRARIES(lighttpd2-worker lighttpd-${PACKAGE_VERSION}-common lighttpd-${PACKAGE_VERSION}-shared)
ADD_EXECUTABLE(lighttpd2-angel
ADD_EXECUTABLE(lighttpd2
angel/angel_main.c
)
TARGET_LINK_LIBRARIES(lighttpd2-angel lighttpd-${PACKAGE_VERSION}-common lighttpd-${PACKAGE_VERSION}-sharedangel)
TARGET_LINK_LIBRARIES(lighttpd2 lighttpd-${PACKAGE_VERSION}-common lighttpd-${PACKAGE_VERSION}-sharedangel)
SET(L_INSTALL_TARGETS ${L_INSTALL_TARGETS} lighttpd2 lighttpd2-angel lighttpd-${PACKAGE_VERSION}-common lighttpd-${PACKAGE_VERSION}-shared lighttpd-${PACKAGE_VERSION}-sharedangel)
SET(L_INSTALL_TARGETS ${L_INSTALL_TARGETS} lighttpd2-worker lighttpd2 lighttpd-${PACKAGE_VERSION}-common lighttpd-${PACKAGE_VERSION}-shared lighttpd-${PACKAGE_VERSION}-sharedangel)
IF(BUILD_EXTRA_WARNINGS)
SET(WARN_CFLAGS "-g -O2 -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Wsign-compare -Wnested-externs -Wpointer-arith")
@ -372,12 +372,12 @@ ADD_TARGET_PROPERTIES(lighttpd-${PACKAGE_VERSION}-shared COMPILE_FLAGS ${COMMON_
ADD_TARGET_PROPERTIES(lighttpd-${PACKAGE_VERSION}-sharedangel LINK_FLAGS ${COMMON_LDFLAGS})
ADD_TARGET_PROPERTIES(lighttpd-${PACKAGE_VERSION}-sharedangel COMPILE_FLAGS ${COMMON_CFLAGS})
ADD_TARGET_PROPERTIES(lighttpd2-worker LINK_FLAGS ${COMMON_LDFLAGS})
ADD_TARGET_PROPERTIES(lighttpd2-worker COMPILE_FLAGS ${COMMON_CFLAGS})
ADD_TARGET_PROPERTIES(lighttpd2 LINK_FLAGS ${COMMON_LDFLAGS})
ADD_TARGET_PROPERTIES(lighttpd2 COMPILE_FLAGS ${COMMON_CFLAGS})
ADD_TARGET_PROPERTIES(lighttpd2-angel LINK_FLAGS ${COMMON_LDFLAGS})
ADD_TARGET_PROPERTIES(lighttpd2-angel COMPILE_FLAGS ${COMMON_CFLAGS})
IF(HAVE_LIBKVM)
TARGET_LINK_LIBRARIES(lighttpd-${PACKAGE_VERSION}-common kvm)
ENDIF(HAVE_LIBKVM)
@ -390,16 +390,16 @@ IF(CMAKE_COMPILER_IS_GNUCC)
ADD_DEFINITIONS(-D_GNU_SOURCE)
ENDIF(CMAKE_COMPILER_IS_GNUCC)
SET_TARGET_PROPERTIES(lighttpd2 PROPERTIES CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
SET_TARGET_PROPERTIES(lighttpd2-worker PROPERTIES CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
IF(WIN32)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNVALGRIND")
ADD_TARGET_PROPERTIES(lighttpd2 COMPILE_FLAGS "-DLI_DECLARE_EXPORTS")
TARGET_LINK_LIBRARIES(lighttpd2 ws2_32)
ADD_TARGET_PROPERTIES(lighttpd2-worker COMPILE_FLAGS "-DLI_DECLARE_EXPORTS")
TARGET_LINK_LIBRARIES(lighttpd2-worker ws2_32)
IF(MINGW)
TARGET_LINK_LIBRARIES(lighttpd2 msvcr70)
ADD_TARGET_PROPERTIES(lighttpd2 LINK_FLAGS "-Wl,-subsystem,console")
TARGET_LINK_LIBRARIES(lighttpd2-worker msvcr70)
ADD_TARGET_PROPERTIES(lighttpd2-worker LINK_FLAGS "-Wl,-subsystem,console")
ENDIF(MINGW)
ENDIF(WIN32)
@ -410,10 +410,10 @@ IF(NOT WIN32)
ARCHIVE DESTINATION ${LIGHTTPD_MODULES_DIR}/static)
ELSE(NOT WIN32)
## HACK to make win32 to install our libraries in desired directory..
INSTALL(TARGETS lighttpd2
INSTALL(TARGETS lighttpd2-worker
RUNTIME DESTINATION ${SBINDIR}
ARCHIVE DESTINATION lib/static)
LIST(REMOVE_ITEM L_INSTALL_TARGETS lighttpd2)
LIST(REMOVE_ITEM L_INSTALL_TARGETS lighttpd2-worker)
INSTALL(TARGETS ${L_INSTALL_TARGETS}
RUNTIME DESTINATION ${SBINDIR}/lib
LIBRARY DESTINATION lib

10
src/angel/Makefile.am

@ -1,5 +1,5 @@
sbin_PROGRAMS=lighttpd2-angel
sbin_PROGRAMS=lighttpd2
lib_LTLIBRARIES=liblighttpd2-sharedangel.la
common_cflags=-I$(top_srcdir)/include -I$(top_builddir)/include
@ -25,8 +25,8 @@ liblighttpd2_sharedangel_la_CPPFLAGS=$(common_cflags) $(GTHREAD_CFLAGS) $(GMODUL
liblighttpd2_sharedangel_la_LDFLAGS=-release $(PACKAGE_VERSION) -export-dynamic $(GTHREAD_LIBS) $(GMODULE_LIBS) $(LIBEV_LIBS)
liblighttpd2_sharedangel_la_LIBADD=../common/liblighttpd2-common.la
lighttpd2_angel_SOURCES=angel_main.c
lighttpd2_SOURCES=angel_main.c
lighttpd2_angel_CPPFLAGS=$(common_cflags) $(GTHREAD_CFLAGS) $(GMODULE_CFLAGS) $(LIBEV_CFLAGS) $(LUA_CFLAGS) -DDEFAULT_LIBDIR='"$(pkglibdir)"'
lighttpd2_angel_LDFLAGS=-export-dynamic $(GTHREAD_LIBS) $(GMODULE_LIBS) $(LIBEV_LIBS) $(LUA_LIBS)
lighttpd2_angel_LDADD=../common/liblighttpd2-common.la liblighttpd2-sharedangel.la
lighttpd2_CPPFLAGS=$(common_cflags) $(GTHREAD_CFLAGS) $(GMODULE_CFLAGS) $(LIBEV_CFLAGS) $(LUA_CFLAGS) -DDEFAULT_LIBDIR='"$(pkglibdir)"' -DDEFAULT_LIBEXECDIR='"$(libexecdir)"'
lighttpd2_LDFLAGS=-export-dynamic $(GTHREAD_LIBS) $(GMODULE_LIBS) $(LIBEV_LIBS) $(LUA_LIBS)
lighttpd2_LDADD=../common/liblighttpd2-common.la liblighttpd2-sharedangel.la

7
src/angel/angel_plugin_core.c

@ -5,6 +5,11 @@
typedef struct listen_socket listen_socket;
typedef struct listen_ref_resource listen_ref_resource;
#ifndef DEFAULT_LIBEXECDIR
# define DEFAULT_LIBEXECDIR "/usr/local/lib/lighttpd2"
#endif
struct listen_socket {
gint refcount;
@ -156,7 +161,7 @@ static void core_instance_parse(liServer *srv, liPlugin *p, liValue **options) {
if (options[2]) {
g_ptr_array_add(cmd, g_strndup(GSTR_LEN(options[2]->data.string)));
} else {
g_ptr_array_add(cmd, g_strndup(CONST_STR_LEN("/usr/bin/lighttpd")));
g_ptr_array_add(cmd, g_strndup(CONST_STR_LEN(DEFAULT_LIBEXECDIR "/lighttpd2-worker")));
}
g_ptr_array_add(cmd, g_strndup(CONST_STR_LEN("--angel")));

2
src/angel/wscript

@ -33,4 +33,4 @@ def build(bld):
uselib = ['glib', 'gthread', 'gmodule', 'ev'],
uselib_local = ['common'],
includes = ['#/include/'],
target = 'lighttpd2-angel')
target = 'lighttpd2')

14
src/main/Makefile.am

@ -1,5 +1,5 @@
bin_PROGRAMS=lighttpd2
libexec_PROGRAMS=lighttpd2-worker
lib_LTLIBRARIES=liblighttpd2-shared.la
common_cflags=-I$(top_srcdir)/include -I$(top_builddir)/include
@ -22,7 +22,7 @@ lighttpd_shared_src= \
http_range_parser.c \
http_request_parser.c \
http_response_parser.c \
lighttpd-glue.c \
lighttpd_glue.c \
log.c \
network.c \
network_write.c network_writev.c \
@ -66,7 +66,7 @@ endif
if WITH_PROFILER
lighttpd_shared_src+= profiler.c
endif
EXTRA_lighttpd2_SOURCES=$(lua_src) profiler.c
EXTRA_lighttpd2_worker_SOURCES=$(lua_src) profiler.c
BUILT_SOURCES=config_parser.c http_range_parser.c http_request_parser.c http_response_parser.c url_parser.c
@ -88,8 +88,8 @@ liblighttpd2_shared_la_CPPFLAGS=$(common_cflags) $(GTHREAD_CFLAGS) $(GMODULE_CFL
liblighttpd2_shared_la_LDFLAGS=-release $(PACKAGE_VERSION) -export-dynamic $(GTHREAD_LIBS) $(GMODULE_LIBS) $(LIBEV_LIBS) $(LUA_LIBS)
liblighttpd2_shared_la_LIBADD=../common/liblighttpd2-common.la
lighttpd2_SOURCES=lighttpd.c
lighttpd2_worker_SOURCES=lighttpd_worker.c
lighttpd2_CPPFLAGS=$(common_cflags) $(GTHREAD_CFLAGS) $(GMODULE_CFLAGS) $(LIBEV_CFLAGS) $(LUA_CFLAGS) -DDEFAULT_LIBDIR='"$(pkglibdir)"'
lighttpd2_LDFLAGS=-export-dynamic $(GTHREAD_LIBS) $(GMODULE_LIBS) $(LIBEV_LIBS) $(LUA_LIBS)
lighttpd2_LDADD=../common/liblighttpd2-common.la liblighttpd2-shared.la
lighttpd2_worker_CPPFLAGS=$(common_cflags) $(GTHREAD_CFLAGS) $(GMODULE_CFLAGS) $(LIBEV_CFLAGS) $(LUA_CFLAGS) -DDEFAULT_LIBDIR='"$(pkglibdir)"'
lighttpd2_worker_LDFLAGS=-export-dynamic $(GTHREAD_LIBS) $(GMODULE_LIBS) $(LIBEV_LIBS) $(LUA_LIBS)
lighttpd2_worker_LDADD=../common/liblighttpd2-common.la liblighttpd2-shared.la

0
src/main/lighttpd-glue.c → src/main/lighttpd_glue.c

0
src/main/lighttpd.c → src/main/lighttpd_worker.c

6
src/main/wscript

@ -35,8 +35,8 @@ def build(bld):
http_range_parser.rl
http_request_parser.rl
http_response_parser.rl
lighttpd-glue.c
lighttpd.c
lighttpd_glue.c
lighttpd_worker.c
log.c
network.c
network_sendfile.c
@ -91,4 +91,4 @@ def build(bld):
uselib = libs,
uselib_local = ['common'],
includes = ['#/include/'],
target = 'lighttpd2')
target = 'lighttpd2-worker')

Loading…
Cancel
Save