mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-10 13:22:48 +02:00
add a patch to provide a descent PATH to cgi,
split in 3 packages (w/o ssl, w/ matrixssl & w/ openssl), add a restart command to init-script. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@2174 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
e0098f1b20
commit
442ac53465
@ -107,7 +107,7 @@ package-$(BR2_PACKAGE_MARADNS) += maradns
|
||||
package-$(BR2_PACKAGE_MATRIXSSL) += matrixssl
|
||||
package-$(BR2_PACKAGE_MICROCOM) += microcom
|
||||
package-$(BR2_PACKAGE_MICROPERL) += microperl
|
||||
package-$(BR2_PACKAGE_MINI_HTTPD) += mini_httpd
|
||||
package-$(BR2_COMPILE_MINI_HTTPD) += mini_httpd
|
||||
package-$(BR2_PACKAGE_MINI_SENDMAIL) += mini_sendmail
|
||||
package-$(BR2_PACKAGE_MONIT) += monit
|
||||
package-$(BR2_PACKAGE_MPD) += mpd
|
||||
@ -248,7 +248,6 @@ libvorbis-compile: libogg-compile
|
||||
libxml2-compile: zlib-compile
|
||||
libxslt-compile: libxml2-compile
|
||||
lighttpd-compile: openssl-compile pcre-compile
|
||||
mini_httpd-compile: matrixssl-compile
|
||||
mt-daapd-compile: howl-compile libgdbm-compile libid3tag-compile
|
||||
mtr-compile: ncurses-compile
|
||||
mysql-compile: ncurses-compile zlib-compile
|
||||
@ -314,6 +313,13 @@ ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_SQL_PGSQL),)
|
||||
freeradius-compile: postgresql-compile
|
||||
endif
|
||||
|
||||
ifneq ($(BR2_PACKAGE_MINI_HTTPD_MATRIXSSL),)
|
||||
mini_httpd-compile: matrixssl-compile
|
||||
endif
|
||||
ifneq ($(BR2_PACKAGE_MINI_HTTPD_OPENSSL),)
|
||||
mini_httpd-compile: openssl-compile
|
||||
endif
|
||||
|
||||
ifneq ($(BR2_PACKAGE_MPD_MP3),)
|
||||
mpd-compile: libid3tag-compile libmad-compile
|
||||
endif
|
||||
|
@ -1,6 +1,66 @@
|
||||
config BR2_COMPILE_MINI_HTTPD
|
||||
bool
|
||||
default n
|
||||
depends BR2_PACKAGE_MINI_HTTPD || BR2_PACKAGE_MINI_HTTPD_MATRIXSSL || BR2_PACKAGE_MINI_HTTPD_OPENSSL
|
||||
|
||||
config BR2_PACKAGE_MINI_HTTPD
|
||||
tristate "mini-httpd - A small web server"
|
||||
default m if CONFIG_DEVEL
|
||||
select BR2_COMPILE_MINI_HTTPD
|
||||
help
|
||||
mini_httpd is a small HTTP server. Its performance is not great, but for
|
||||
low or medium traffic sites it's quite adequate. It implements all the
|
||||
basic features of an HTTP server, including:
|
||||
|
||||
* GET, HEAD, and POST methods.
|
||||
* CGI.
|
||||
* Basic authentication.
|
||||
* Security against ".." filename snooping.
|
||||
* The common MIME types.
|
||||
* Trailing-slash redirection.
|
||||
* index.html, index.htm, index.cgi
|
||||
* Directory listings.
|
||||
* Multihoming / virtual hosting.
|
||||
* Standard logging.
|
||||
* Custom error pages.
|
||||
|
||||
It can also be configured to do IPv6.
|
||||
|
||||
http://www.acme.com/software/mini_httpd/
|
||||
|
||||
|
||||
config BR2_PACKAGE_MINI_HTTPD_MATRIXSSL
|
||||
tristate "mini-httpd-matrixssl - A small web server, built with SSL support using MatrixSSL"
|
||||
default m if CONFIG_DEVEL
|
||||
select BR2_COMPILE_MINI_HTTPD
|
||||
select BR2_PACKAGE_LIBMATRIXSSL
|
||||
help
|
||||
mini_httpd is a small HTTP server. Its performance is not great, but for
|
||||
low or medium traffic sites it's quite adequate. It implements all the
|
||||
basic features of an HTTP server, including:
|
||||
|
||||
* GET, HEAD, and POST methods.
|
||||
* CGI.
|
||||
* Basic authentication.
|
||||
* Security against ".." filename snooping.
|
||||
* The common MIME types.
|
||||
* Trailing-slash redirection.
|
||||
* index.html, index.htm, index.cgi
|
||||
* Directory listings.
|
||||
* Multihoming / virtual hosting.
|
||||
* Standard logging.
|
||||
* Custom error pages.
|
||||
|
||||
It can also be configured to do SSL/HTTPS and IPv6.
|
||||
|
||||
http://www.acme.com/software/mini_httpd/
|
||||
|
||||
|
||||
config BR2_PACKAGE_MINI_HTTPD_OPENSSL
|
||||
tristate "mini-httpd-openssl - A small web server, built with SSL support using OpenSSL"
|
||||
default m if CONFIG_DEVEL
|
||||
select BR2_COMPILE_MINI_HTTPD
|
||||
select BR2_PACKAGE_LIBOPENSSL
|
||||
help
|
||||
mini_httpd is a small HTTP server. Its performance is not great, but for
|
||||
low or medium traffic sites it's quite adequate. It implements all the
|
||||
|
@ -16,6 +16,8 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/mini_httpd-$(PKG_VERSION)
|
||||
include $(TOPDIR)/package/rules.mk
|
||||
|
||||
$(eval $(call PKG_template,MINI_HTTPD,mini-httpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
$(eval $(call PKG_template,MINI_HTTPD_MATRIXSSL,mini-httpd-matrixssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
$(eval $(call PKG_template,MINI_HTTPD_OPENSSL,mini-httpd-openssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
|
||||
|
||||
$(PKG_BUILD_DIR)/.configured:
|
||||
@ -23,18 +25,43 @@ $(PKG_BUILD_DIR)/.configured:
|
||||
touch $@
|
||||
|
||||
$(PKG_BUILD_DIR)/.built:
|
||||
# with MatrixSSL
|
||||
ifneq ($(BR2_PACKAGE_MINI_HTTPD_MATRIXSSL),)
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
CC=$(TARGET_CC) \
|
||||
OFLAGS="$(TARGET_CFLAGS)" \
|
||||
SSL_DEFS="-DUSE_SSL -DHAVE_MATRIXSSL" \
|
||||
SSL_INC="-I$(STAGING_DIR)/usr/include" \
|
||||
SSL_LIBS="-L$(STAGING_DIR)/usr/lib -lmatrixssl" \
|
||||
SSL_OBJS="matrixssl_helper.o" \
|
||||
all
|
||||
(cd $(PKG_BUILD_DIR); mv mini_httpd mini_httpd-matrixssl; )
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) clean
|
||||
endif
|
||||
# with OpenSSL
|
||||
ifneq ($(BR2_PACKAGE_MINI_HTTPD_OPENSSL),)
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
CC=$(TARGET_CC) \
|
||||
OFLAGS="$(TARGET_CFLAGS)" \
|
||||
SSL_DEFS="-DUSE_SSL -DHAVE_OPENSSL" \
|
||||
SSL_INC="-I$(STAGING_DIR)/usr/include" \
|
||||
SSL_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto" \
|
||||
all
|
||||
(cd $(PKG_BUILD_DIR); mv mini_httpd mini_httpd-openssl; )
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) clean
|
||||
endif
|
||||
# without SSL
|
||||
ifneq ($(BR2_PACKAGE_MINI_HTTPD),)
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
CC=$(TARGET_CC) \
|
||||
OFLAGS="$(TARGET_CFLAGS)" \
|
||||
all
|
||||
endif
|
||||
touch $@
|
||||
|
||||
$(IPKG_MINI_HTTPD):
|
||||
install -d -m0755 $(IDIR_MINI_HTTPD)/etc
|
||||
install -m0644 ./files/mini_httpd.conf $(IDIR_MINI_HTTPD)/etc/
|
||||
install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD)/etc/
|
||||
install -m0644 ./files/mini_httpd.conf $(IDIR_MINI_HTTPD)/etc/mini_httpd.conf
|
||||
install -d -m0755 $(IDIR_MINI_HTTPD)/etc/default
|
||||
install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD)/etc/default/mini_httpd
|
||||
install -d -m0755 $(IDIR_MINI_HTTPD)/etc/init.d
|
||||
@ -43,3 +70,29 @@ $(IPKG_MINI_HTTPD):
|
||||
install -m0755 $(PKG_BUILD_DIR)/mini_httpd $(IDIR_MINI_HTTPD)/usr/sbin/
|
||||
$(RSTRIP) $(IDIR_MINI_HTTPD)
|
||||
$(IPKG_BUILD) $(IDIR_MINI_HTTPD) $(PACKAGE_DIR)
|
||||
|
||||
$(IPKG_MINI_HTTPD_MATRIXSSL):
|
||||
install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc
|
||||
install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/mini_httpd.conf
|
||||
install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/
|
||||
install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default
|
||||
install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/default/mini_httpd
|
||||
install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d
|
||||
install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_MATRIXSSL)/etc/init.d/mini_httpd
|
||||
install -d -m0755 $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin
|
||||
install -m0755 $(PKG_BUILD_DIR)/mini_httpd-matrixssl $(IDIR_MINI_HTTPD_MATRIXSSL)/usr/sbin/mini_httpd
|
||||
$(RSTRIP) $(IDIR_MINI_HTTPD_MATRIXSSL)
|
||||
$(IPKG_BUILD) $(IDIR_MINI_HTTPD_MATRIXSSL) $(PACKAGE_DIR)
|
||||
|
||||
$(IPKG_MINI_HTTPD_OPENSSL):
|
||||
install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc
|
||||
install -m0644 ./files/mini_httpd-ssl.conf $(IDIR_MINI_HTTPD_OPENSSL)/etc/mini_httpd.conf
|
||||
install -m0600 ./files/mini_httpd.pem $(IDIR_MINI_HTTPD_OPENSSL)/etc/
|
||||
install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/default
|
||||
install -m0644 ./files/mini_httpd.default $(IDIR_MINI_HTTPD_OPENSSL)/etc/default/mini_httpd
|
||||
install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d
|
||||
install -m0755 ./files/mini_httpd.init $(IDIR_MINI_HTTPD_OPENSSL)/etc/init.d/mini_httpd
|
||||
install -d -m0755 $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin
|
||||
install -m0755 $(PKG_BUILD_DIR)/mini_httpd-openssl $(IDIR_MINI_HTTPD_OPENSSL)/usr/sbin/mini_httpd
|
||||
$(RSTRIP) $(IDIR_MINI_HTTPD_OPENSSL)
|
||||
$(IPKG_BUILD) $(IDIR_MINI_HTTPD_OPENSSL) $(PACKAGE_DIR)
|
||||
|
7
openwrt/package/mini_httpd/files/mini_httpd-ssl.conf
Normal file
7
openwrt/package/mini_httpd/files/mini_httpd-ssl.conf
Normal file
@ -0,0 +1,7 @@
|
||||
cgipat=cgi-bin/**|**.sh
|
||||
dir=/www
|
||||
nochroot
|
||||
pidfile=/var/run/mini_httpd.pid
|
||||
user=root
|
||||
ssl
|
||||
certfile=/etc/mini_httpd.pem
|
@ -1,7 +1,5 @@
|
||||
cgipat=cgi-bin/*
|
||||
cgipat=cgi-bin/**|**.sh
|
||||
dir=/www
|
||||
nochroot
|
||||
pidfile=/var/run/mini_httpd.pid
|
||||
user=root
|
||||
ssl
|
||||
certfile=/etc/mini_httpd.pem
|
||||
|
@ -1,20 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
DEFAULT=/etc/default/mini_httpd
|
||||
BIN=mini_httpd
|
||||
DEFAULT=/etc/default/$BIN
|
||||
RUN_D=/var/run
|
||||
PID_F=$RUN_D/mini_httpd.pid
|
||||
PID_F=$RUN_D/$BIN.pid
|
||||
[ -f $DEFAULT ] && . $DEFAULT
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
[ -d $RUN_D ] || mkdir -p $RUN_D
|
||||
mini_httpd $OPTIONS
|
||||
$BIN $OPTIONS 2>/dev/null
|
||||
;;
|
||||
stop)
|
||||
[ -f $PID_F ] && kill $(cat $PID_F)
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 (start|stop)"
|
||||
echo "usage: $0 (start|stop|restart)"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
/etc/default/mini_httpd
|
||||
/etc/mini_httpd.conf
|
||||
/etc/mini_httpd.pem
|
@ -0,0 +1,9 @@
|
||||
Package: mini-httpd-matrixssl
|
||||
Priority: optional
|
||||
Section: net
|
||||
Version: [TBDL]
|
||||
Architecture: [TBDL]
|
||||
Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
|
||||
Source: buildroot internal
|
||||
Description: A small HTTP server, built with SSL support using MatrixSSL.
|
||||
Depends: libmatrixssl
|
@ -0,0 +1,3 @@
|
||||
/etc/default/mini_httpd
|
||||
/etc/mini_httpd.conf
|
||||
/etc/mini_httpd.pem
|
@ -0,0 +1,9 @@
|
||||
Package: mini-httpd-openssl
|
||||
Priority: optional
|
||||
Section: net
|
||||
Version: [TBDL]
|
||||
Architecture: [TBDL]
|
||||
Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
|
||||
Source: buildroot internal
|
||||
Description: A small HTTP server, built with SSL support using OpenSSL.
|
||||
Depends: libopenssl
|
@ -1,3 +1,2 @@
|
||||
/etc/default/mini_httpd
|
||||
/etc/mini_httpd.conf
|
||||
/etc/mini_httpd.pem
|
||||
|
@ -3,7 +3,7 @@ Priority: optional
|
||||
Section: net
|
||||
Version: [TBDL]
|
||||
Architecture: [TBDL]
|
||||
Maintainer: OpenWrt Developers Team <bugs@openwrt.org>
|
||||
Source: http://openwrt.org/cgi-bin/viewcvs.cgi/openwrt/package/mini_httpd/
|
||||
Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
|
||||
Source: buildroot internal
|
||||
Description: A small HTTP server, built with SSL support using MatrixSSL.
|
||||
Depends: libmatrixssl
|
||||
|
16
openwrt/package/mini_httpd/patches/001-cgi_path.patch
Normal file
16
openwrt/package/mini_httpd/patches/001-cgi_path.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff -ruN mini_httpd-1.19-old/mini_httpd.c mini_httpd-1.19-new/mini_httpd.c
|
||||
--- mini_httpd-1.19-old/mini_httpd.c 2005-10-19 01:11:24.000000000 +0200
|
||||
+++ mini_httpd-1.19-new/mini_httpd.c 2005-10-19 01:13:05.000000000 +0200
|
||||
@@ -138,10 +138,10 @@
|
||||
#define CGI_NICE 10
|
||||
#endif /* CGI_NICE */
|
||||
#ifndef CGI_PATH
|
||||
-#define CGI_PATH "/usr/local/bin:/usr/ucb:/bin:/usr/bin"
|
||||
+#define CGI_PATH "/usr/bin:/bin:/usr/sbin:/sbin"
|
||||
#endif /* CGI_PATH */
|
||||
#ifndef CGI_LD_LIBRARY_PATH
|
||||
-#define CGI_LD_LIBRARY_PATH "/usr/local/lib:/usr/lib"
|
||||
+#define CGI_LD_LIBRARY_PATH "/usr/lib:/lib"
|
||||
#endif /* CGI_LD_LIBRARY_PATH */
|
||||
#ifndef AUTH_FILE
|
||||
#define AUTH_FILE ".htpasswd"
|
@ -14,11 +14,11 @@ diff -ruN mini_httpd-1.19-orig/Makefile mini_httpd-1.19-3/Makefile
|
||||
+#SSL_OBJS =
|
||||
+
|
||||
+# MatrixSSL
|
||||
+SSL_TREE =
|
||||
+SSL_DEFS = -DUSE_SSL -DHAVE_MATRIXSSL
|
||||
+SSL_INC =
|
||||
+SSL_LIBS = -lmatrixssl
|
||||
+SSL_OBJS = matrixssl_helper.o
|
||||
+#SSL_TREE =
|
||||
+#SSL_DEFS = -DUSE_SSL -DHAVE_MATRIXSSL
|
||||
+#SSL_INC =
|
||||
+#SSL_LIBS = -lmatrixssl
|
||||
+#SSL_OBJS = matrixssl_helper.o
|
||||
|
||||
|
||||
-BINDIR = /usr/local/sbin
|
||||
|
Loading…
Reference in New Issue
Block a user