From 2d0a92c9ab15c6df408f4fe864cee256e1dc9f8a Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Tue, 1 Oct 2019 14:55:16 +0000 Subject: [PATCH] Move simple_httpd out of picobsd, add HTTPD option (default OFF) picobsd/tinyware has had this compact HTTPD server for a long time, and some people do use it. Move it out into usr.sbin well in advance of any action being taken on picobsd. This has been gated behind an HTTPD option defaulted to *off*, primarily for two reasons: 1.) This code likely needs a good audit, as it's been living off in picobsd land for a long time, and 2.) We don't currently ship an httpd and this may not be a welcome surprise. Reviewed by: eugen Differential Revision: https://reviews.freebsd.org/D21724 --- share/mk/src.opts.mk | 1 + tools/build/options/WITHOUT_HTTPD | 2 ++ tools/build/options/WITH_HTTPD | 2 ++ usr.sbin/Makefile | 1 + .../picobsd/tinyware/simple_httpd => usr.sbin/httpd}/Makefile | 4 ++-- .../picobsd/tinyware/simple_httpd => usr.sbin/httpd}/README | 0 .../tinyware/simple_httpd => usr.sbin/httpd}/simple_httpd.c | 0 7 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 tools/build/options/WITHOUT_HTTPD create mode 100644 tools/build/options/WITH_HTTPD rename {release/picobsd/tinyware/simple_httpd => usr.sbin/httpd}/Makefile (56%) rename {release/picobsd/tinyware/simple_httpd => usr.sbin/httpd}/README (100%) rename {release/picobsd/tinyware/simple_httpd => usr.sbin/httpd}/simple_httpd.c (100%) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index fac7f8d019db..fcba0a0f184a 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -198,6 +198,7 @@ __DEFAULT_NO_OPTIONS = \ EXPERIMENTAL \ GNU_GREP_COMPAT \ HESIOD \ + HTTPD \ LIBSOFT \ LOADER_FIREWIRE \ LOADER_FORCE_LE \ diff --git a/tools/build/options/WITHOUT_HTTPD b/tools/build/options/WITHOUT_HTTPD new file mode 100644 index 000000000000..c2b8143070ea --- /dev/null +++ b/tools/build/options/WITHOUT_HTTPD @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to neither build nor install httpd diff --git a/tools/build/options/WITH_HTTPD b/tools/build/options/WITH_HTTPD new file mode 100644 index 000000000000..c175d20fb8c0 --- /dev/null +++ b/tools/build/options/WITH_HTTPD @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build and install httpd diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 7c028c5a1358..9bee390e9cd8 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -138,6 +138,7 @@ SUBDIR.${MK_FMTREE}+= fmtree SUBDIR.${MK_FREEBSD_UPDATE}+= freebsd-update SUBDIR.${MK_GSSAPI}+= gssd SUBDIR.${MK_GPIO}+= gpioctl +SUBDIR.${MK_HTTPD}+= httpd SUBDIR.${MK_INET6}+= ip6addrctl SUBDIR.${MK_INET6}+= mld6query SUBDIR.${MK_INET6}+= ndp diff --git a/release/picobsd/tinyware/simple_httpd/Makefile b/usr.sbin/httpd/Makefile similarity index 56% rename from release/picobsd/tinyware/simple_httpd/Makefile rename to usr.sbin/httpd/Makefile index 7b797acfe04d..080a1afb0b2d 100644 --- a/release/picobsd/tinyware/simple_httpd/Makefile +++ b/usr.sbin/httpd/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ # -PROG=simple_httpd -SRCS= simple_httpd.c +PROG= httpd +SRCS= simple_httpd.c MAN= WARNS?=6 diff --git a/release/picobsd/tinyware/simple_httpd/README b/usr.sbin/httpd/README similarity index 100% rename from release/picobsd/tinyware/simple_httpd/README rename to usr.sbin/httpd/README diff --git a/release/picobsd/tinyware/simple_httpd/simple_httpd.c b/usr.sbin/httpd/simple_httpd.c similarity index 100% rename from release/picobsd/tinyware/simple_httpd/simple_httpd.c rename to usr.sbin/httpd/simple_httpd.c