git: fd3fd42e86eb - main - www/bozohttpd: Use blocklist
Jose Luis Duran <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.cvs.ports |
|---|---|
| Message-ID | <[email protected]> |
The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/ports/commit/?id=fd3fd42e86ebb6efc8a85f45798ed42e87288e75 commit fd3fd42e86ebb6efc8a85f45798ed42e87288e75 Author: Jose Luis Duran <[email protected]> AuthorDate: 2026-01-20 19:49:07 +0000 Commit: Jose Luis Duran <[email protected]> CommitDate: 2026-08-17 03:26:17 +0000 www/bozohttpd: Use blocklist Starting from FreeBSD version 1500000, prefer the new blocklist nomenclature. Once older versions are no longer supported, we should use blocklist exclusively. PR: 294080 --- www/bozohttpd/Makefile | 17 +++++-- .../files/blacklist-patches/patch-Makefile | 11 +++++ .../{ => blacklist-patches}/patch-auth-bozo.c | 0 .../files/blacklist-patches/patch-bozohttpd.8 | 56 ++++++++++++++++++++++ .../{ => blacklist-patches}/patch-bozohttpd.c | 0 .../files/blacklist-patches/patch-bozohttpd.h | 13 +++++ www/bozohttpd/files/patch-Makefile | 9 ---- www/bozohttpd/files/patch-bozohttpd.8 | 54 --------------------- www/bozohttpd/files/patch-bozohttpd.h | 11 ----- 9 files changed, 92 insertions(+), 79 deletions(-) diff --git a/www/bozohttpd/Makefile b/www/bozohttpd/Makefile index 6ccd604efc26..f3288ef2a1ba 100644 --- a/www/bozohttpd/Makefile +++ b/www/bozohttpd/Makefile @@ -1,5 +1,6 @@ PORTNAME= bozohttpd DISTVERSION= 20240126 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://eterna23.net/bozohttpd/ @@ -18,12 +19,12 @@ MAKE_ARGS= LDADD="${LIBS}" PLIST_FILES= bin/bozohttpd \ share/man/man8/bozohttpd.8.gz -OPTIONS_DEFINE= BLACKLIST CGI DAEMON DEBUG DIRINDEX\ +OPTIONS_DEFINE= BLOCKLIST CGI DAEMON DEBUG DIRINDEX\ DYNAMIC HTPASSWD LUA SSL USER -OPTIONS_DEFAULT= BLACKLIST CGI DAEMON DEBUG DIRINDEX\ +OPTIONS_DEFAULT= BLOCKLIST CGI DAEMON DEBUG DIRINDEX\ DYNAMIC HTPASSWD LUA SSL USER -BLACKLIST_DESC= Report Unauthorized and Forbidden accesses to blacklistd +BLOCKLIST_DESC= Report Unauthorized and Forbidden accesses to blocklistd CGI_DESC= Common Gateway Interface (CGI) support (-C, -c, -E, -e) DAEMON_DESC= Optional daemon mode (-b) DEBUG_DESC= Debug support (-d) @@ -34,8 +35,8 @@ LUA_DESC= Lua scripts for dynamic content (-L) SSL_DESC= SSL/TLS for HTTPS requests (-Z, -z) USER_DESC= Optional /~user transformation (-e, -p, -u) -BLACKLIST_CFLAGS_OFF= -DNO_BLACKLIST_SUPPORT -BLACKLIST_LIBS= -lblacklist +BLOCKLIST_CFLAGS_OFF= -DNO_BLOCKLIST_SUPPORT +BLOCKLIST_LIBS= -lblocklist CGI_CFLAGS_OFF= -DNO_CGIBIN_SUPPORT DAEMON_CFLAGS_OFF= -DNO_DAEMON_MODE DEBUG_CFLAGS_OFF= -DNO_DEBUG @@ -57,6 +58,12 @@ USER_CFLAGS_OFF= -DNO_USER_SUPPORT .include <bsd.port.options.mk> +.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1500000 +BLOCKLIST_CFLAGS_OFF= -DNO_BLACKLIST_SUPPORT +BLOCKLIST_LIBS= -lblacklist +EXTRA_PATCHES= ${FILESDIR}/blacklist-patches +.endif + .if ${OPSYS} == FreeBSD CFLAGS+= -Wno-error=unused-but-set-variable .endif diff --git a/www/bozohttpd/files/blacklist-patches/patch-Makefile b/www/bozohttpd/files/blacklist-patches/patch-Makefile new file mode 100644 index 000000000000..0a36f47b9dd0 --- /dev/null +++ b/www/bozohttpd/files/blacklist-patches/patch-Makefile @@ -0,0 +1,11 @@ +--- Makefile.orig 2024-02-04 05:55:04 UTC ++++ Makefile +@@ -14,7 +14,7 @@ + # NO_SSL_SUPPORT /* don't support ssl (https) */ + # DO_HTPASSWD /* support .htpasswd files */ + # NO_LUA_SUPPORT /* don't support Lua for dynamic content */ +-# NO_BLOCKLIST_SUPPORT /* don't support blocklist */ ++# NO_BLACKLIST_SUPPORT /* don't support blocklist */ + # + # other system specific defines: + # HAVE_NBUTIL_H /* netbsd compat is in <nbutil.h> diff --git a/www/bozohttpd/files/patch-auth-bozo.c b/www/bozohttpd/files/blacklist-patches/patch-auth-bozo.c similarity index 100% rename from www/bozohttpd/files/patch-auth-bozo.c rename to www/bozohttpd/files/blacklist-patches/patch-auth-bozo.c diff --git a/www/bozohttpd/files/blacklist-patches/patch-bozohttpd.8 b/www/bozohttpd/files/blacklist-patches/patch-bozohttpd.8 new file mode 100644 index 000000000000..6a0ab80202df --- /dev/null +++ b/www/bozohttpd/files/blacklist-patches/patch-bozohttpd.8 @@ -0,0 +1,56 @@ +--- bozohttpd.8.orig 2024-02-04 05:55:04 UTC ++++ bozohttpd.8 +@@ -475,21 +489,21 @@ It may require linking with the crypt library, using + on the compiler command line to enable this support. + It may require linking with the crypt library, using + .Dq -lcrypt . +-.Ss BLOCKLIST SUPPORT ++.Ss BLACKLIST SUPPORT + On +-.Nx , ++.Fx , + .Nm + supports +-.Xr blocklistd 8 ++.Xr blacklistd 8 + by default. + The support can be disabled with the +-.Dq -DNO_BLOCKLIST_SUPPORT ++.Dq -DNO_BLACKLIST_SUPPORT + compilation option. + .Pp + Upon occurrence, + .Nm + reports two HTTP status codes to +-.Xr blocklistd 8 ++.Xr blacklistd 8 + as failures: + .Em 401 + (``Unauthorized'') +@@ -501,7 +515,7 @@ A successful authorization decreases the counter kept + is the one received upon authorization failure with the + HTTP Basic Authorization mechanism. + A successful authorization decreases the counter kept by +-.Xr blocklistd 8 . ++.Xr blacklistd 8 . + .Pp + Note that the implementation of the HTTP Basic Authorization mechanism + uses a redirection; a status code +@@ -510,7 +524,7 @@ is reported as two failures to + Therefore, a single authorization failure of + .Pa .htpasswd + is reported as two failures to +-.Xr blocklistd 8 , ++.Xr blacklistd 8 , + but no failures are recorded upon successful authorization + due to the decrease of the failure counter. + .Ss SSL SUPPORT +@@ -821,7 +835,7 @@ provided support for + .An Jukka Ruohonen + .Aq Mt [email protected] + provided support for +-.Xr blocklistd 8 ++.Xr blacklistd 8 + .It + .An Thor Lancelot Simon + .Aq Mt [email protected] diff --git a/www/bozohttpd/files/patch-bozohttpd.c b/www/bozohttpd/files/blacklist-patches/patch-bozohttpd.c similarity index 100% rename from www/bozohttpd/files/patch-bozohttpd.c rename to www/bozohttpd/files/blacklist-patches/patch-bozohttpd.c diff --git a/www/bozohttpd/files/blacklist-patches/patch-bozohttpd.h b/www/bozohttpd/files/blacklist-patches/patch-bozohttpd.h new file mode 100644 index 000000000000..02c1a830f508 --- /dev/null +++ b/www/bozohttpd/files/blacklist-patches/patch-bozohttpd.h @@ -0,0 +1,13 @@ +--- bozohttpd.h.orig 2024-02-04 05:55:04 UTC ++++ bozohttpd.h +@@ -44,8 +44,8 @@ + #include <lua.h> + #endif + +-#ifndef NO_BLOCKLIST_SUPPORT +-#include <blocklist.h> ++#ifndef NO_BLACKLIST_SUPPORT ++#include <blacklist.h> + void pfilter_notify(const int, const int); + #endif + diff --git a/www/bozohttpd/files/patch-Makefile b/www/bozohttpd/files/patch-Makefile index c55ab1918696..641bf920fd6e 100644 --- a/www/bozohttpd/files/patch-Makefile +++ b/www/bozohttpd/files/patch-Makefile @@ -1,14 +1,5 @@ --- Makefile.orig 2024-02-04 05:55:04 UTC +++ Makefile -@@ -14,7 +14,7 @@ - # NO_SSL_SUPPORT /* don't support ssl (https) */ - # DO_HTPASSWD /* support .htpasswd files */ - # NO_LUA_SUPPORT /* don't support Lua for dynamic content */ --# NO_BLOCKLIST_SUPPORT /* don't support blocklist */ -+# NO_BLACKLIST_SUPPORT /* don't support blocklist */ - # - # other system specific defines: - # HAVE_NBUTIL_H /* netbsd compat is in <nbutil.h> @@ -24,22 +24,19 @@ # for setting CFLAGS relevant to your make, eg # % make COPTS="-DDO_HTPASSWD" diff --git a/www/bozohttpd/files/patch-bozohttpd.8 b/www/bozohttpd/files/patch-bozohttpd.8 index 8f3e84e155e1..063f5a46946d 100644 --- a/www/bozohttpd/files/patch-bozohttpd.8 +++ b/www/bozohttpd/files/patch-bozohttpd.8 @@ -70,51 +70,6 @@ has support for HTTP Basic Authorization enabled by default, in the portable distribution it is excluded. Compile -@@ -475,21 +489,21 @@ It may require linking with the crypt library, using - on the compiler command line to enable this support. - It may require linking with the crypt library, using - .Dq -lcrypt . --.Ss BLOCKLIST SUPPORT -+.Ss BLACKLIST SUPPORT - On --.Nx , -+.Fx , - .Nm - supports --.Xr blocklistd 8 -+.Xr blacklistd 8 - by default. - The support can be disabled with the --.Dq -DNO_BLOCKLIST_SUPPORT -+.Dq -DNO_BLACKLIST_SUPPORT - compilation option. - .Pp - Upon occurrence, - .Nm - reports two HTTP status codes to --.Xr blocklistd 8 -+.Xr blacklistd 8 - as failures: - .Em 401 - (``Unauthorized'') -@@ -501,7 +515,7 @@ A successful authorization decreases the counter kept - is the one received upon authorization failure with the - HTTP Basic Authorization mechanism. - A successful authorization decreases the counter kept by --.Xr blocklistd 8 . -+.Xr blacklistd 8 . - .Pp - Note that the implementation of the HTTP Basic Authorization mechanism - uses a redirection; a status code -@@ -510,7 +524,7 @@ is reported as two failures to - Therefore, a single authorization failure of - .Pa .htpasswd - is reported as two failures to --.Xr blocklistd 8 , -+.Xr blacklistd 8 , - but no failures are recorded upon successful authorization - due to the decrease of the failure counter. - .Ss SSL SUPPORT @@ -603,7 +617,7 @@ entry like: .Xr inetd.conf 5 entry like: @@ -142,12 +97,3 @@ .Ed and the script could look like: .Bd -literal -@@ -821,7 +835,7 @@ provided support for - .An Jukka Ruohonen - .Aq Mt [email protected] - provided support for --.Xr blocklistd 8 -+.Xr blacklistd 8 - .It - .An Thor Lancelot Simon - .Aq Mt [email protected] diff --git a/www/bozohttpd/files/patch-bozohttpd.h b/www/bozohttpd/files/patch-bozohttpd.h index 6bb8356bab47..13c79e20b639 100644 --- a/www/bozohttpd/files/patch-bozohttpd.h +++ b/www/bozohttpd/files/patch-bozohttpd.h @@ -1,16 +1,5 @@ --- bozohttpd.h.orig 2024-02-04 05:55:04 UTC +++ bozohttpd.h -@@ -44,8 +44,8 @@ - #include <lua.h> - #endif - --#ifndef NO_BLOCKLIST_SUPPORT --#include <blocklist.h> -+#ifndef NO_BLACKLIST_SUPPORT -+#include <blacklist.h> - void pfilter_notify(const int, const int); - #endif - @@ -130,7 +130,7 @@ typedef struct bozohttpd_t { unsigned ssl_timeout; /* ssl timeout */ unsigned initial_timeout;/* first line timeout */