FreeBSD Bugzilla – Attachment 146562 Details for
Bug 193169
www/hydra: Support STAGEDIR
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
www_hydra.diff
www_hydra.diff (text/plain), 11.56 KB, created by
tkato432
on 2014-08-30 18:40:06 UTC
(
hide
)
Description:
www_hydra.diff
Filename:
MIME Type:
Creator:
tkato432
Created:
2014-08-30 18:40:06 UTC
Size:
11.56 KB
patch
obsolete
>diff -urN /usr/ports/www/hydra/Makefile www/hydra/Makefile >--- /usr/ports/www/hydra/Makefile 2014-07-24 03:56:17.000000000 +0900 >+++ www/hydra/Makefile 2014-08-31 00:00:00.000000000 +0900 >@@ -5,8 +5,7 @@ > PORTVERSION= 0.1.8 > PORTREVISION= 9 > CATEGORIES= www >-MASTER_SITES= http://mirror.inerd.com/FreeBSD/distfiles/${PORTNAME}/ \ >- ftp://ftp.hellug.gr/pub/software/hydra/ >+MASTER_SITES= http://hydra.hellug.gr/download/ > PKGNAMESUFFIX= -web > > MAINTAINER= ports@FreeBSD.org >@@ -14,38 +13,41 @@ > > LIB_DEPENDS= libgnutls.so:${PORTSDIR}/security/gnutls > >+USES= perl5 pkgconfig shebangfix >+SHEBANG_FILES= src/webindex.pl > USE_RC_SUBR= hydra >- >-CONFLICTS_INSTALL= hydra-[0-9]* >+USE_PERL5= run > GNU_CONFIGURE= yes > >-CPPFLAGS+= -I${LOCALBASE}/include >-LDFLAGS+= -L${LOCALBASE}/lib >+CFLAGS+= -DENABLE_SSL -DHAVE_LIBGNUTLS >+CPPFLAGS+= $$(pkg-config --cflags gnutls) >+LDFLAGS+= $$(pkg-config --libs gnutls) > >-LOGDIR?= /var/log/hydra >+PLIST_SUB= LOGDIR="${LOGDIR}" > > SUB_FILES= pkg-deinstall >-PLIST_SUB= LOGDIR=${LOGDIR} >-SUB_LIST= LOGDIR=${LOGDIR} >+SUB_LIST= LOGDIR="${LOGDIR}" >+ >+CONFLICTS_INSTALL= hydra-[0-9]* >+ >+LOGDIR?= /var/log/hydra > >-NO_STAGE= yes > post-patch: >+ @${REINPLACE_CMD} -e \ >+ '/LDFLAGS/s| -g"|"|' ${WRKSRC}/configure > .for f in src/defines.h examples/hydra.conf >- @${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" \ >- -e "s,%%LOGDIR%%,${LOGDIR},g" \ >- -e "s,%%WWWOWN%%,${WWWOWN},g" \ >- -e "s,%%WWWGRP%%,${WWWGRP},g" \ >- ${WRKSRC}/${f} >+ @${REINPLACE_CMD} -e \ >+ 's|%%PREFIX%%|${PREFIX}|g ; \ >+ s|%%LOGDIR%%|${LOGDIR}|g ; \ >+ s|%%WWWOWN%%|${WWWOWN}|g ; \ >+ s|%%WWWGRP%%|${WWWGRP}|g' ${WRKSRC}/${f} > .endfor > > post-install: >- @${MKDIR} ${PREFIX}/etc/hydra >+ @${MKDIR} ${STAGEDIR}${ETCDIR} > .for f in hydra.conf mime.types >- ${INSTALL_DATA} ${WRKSRC}/examples/${f} ${PREFIX}/etc/hydra/${f}-dist >- [ -f ${PREFIX}/etc/hydra/${f} ] || \ >- ${INSTALL_DATA} ${WRKSRC}/examples/${f} ${PREFIX}/etc/hydra/ >+ (cd ${WRKSRC}/examples && ${INSTALL_DATA} ${f} \ >+ ${STAGEDIR}${ETCDIR}/${f}.sample) > .endfor >- [ -d ${LOGDIR} ] || \ >- ( ${MKDIR} ${LOGDIR} && ${CHOWN} ${WWWOWN}:${WWWGRP} ${LOGDIR} ) > > .include <bsd.port.mk> >diff -urN /usr/ports/www/hydra/files/patch-src::cgi_ssl.c www/hydra/files/patch-src::cgi_ssl.c >--- /usr/ports/www/hydra/files/patch-src::cgi_ssl.c 1970-01-01 09:00:00.000000000 +0900 >+++ www/hydra/files/patch-src::cgi_ssl.c 2014-08-31 00:00:00.000000000 +0900 >@@ -0,0 +1,33 @@ >+--- src/cgi_ssl.c.orig Thu Nov 20 01:00:59 2003 >++++ src/cgi_ssl.c Thu Nov 20 01:01:17 2003 >+@@ -19,7 +19,7 @@ >+ */ >+ >+ #include "boa.h" >+-#include <gnutls/x509.h> >++#include <gnutls/gnutls.h> >+ >+ #ifdef ENABLE_SSL >+ extern int ssl_verify; >+@@ -44,7 +44,7 @@ >+ # define GNUTLS_MAX_SESSION_ID 32 >+ #endif >+ char session_id[GNUTLS_MAX_SESSION_ID]; >+- int session_id_length = sizeof(session_id); >++ size_t session_id_length = sizeof(session_id); >+ int i, ret; >+ char str_session_id[(GNUTLS_MAX_SESSION_ID * 2) + 1]; >+ size_t size; >+@@ -128,10 +128,10 @@ >+ } >+ >+ { >+- const gnutls_datum *cert_list; >++ const gnutls_datum_t *cert_list; >+ char buf[512]; >+ int cert_list_size, ret; >+- gnutls_x509_crt crt; >++ gnutls_x509_crt_t crt; >+ >+ buf[0] = 0; >+ >diff -urN /usr/ports/www/hydra/files/patch-src__cgi_ssl.c www/hydra/files/patch-src__cgi_ssl.c >--- /usr/ports/www/hydra/files/patch-src__cgi_ssl.c 2014-07-30 03:51:46.000000000 +0900 >+++ www/hydra/files/patch-src__cgi_ssl.c 1970-01-01 09:00:00.000000000 +0900 >@@ -1,11 +0,0 @@ >---- src/cgi_ssl.c.orig Thu Nov 20 01:00:59 2003 >-+++ src/cgi_ssl.c Thu Nov 20 01:01:17 2003 >-@@ -19,7 +19,7 @@ >- */ >- >- #include "boa.h" >--#include <gnutls/x509.h> >-+#include <gnutls/gnutls.h> >- >- #ifdef ENABLE_SSL >- extern int ssl_verify; >diff -urN /usr/ports/www/hydra/files/patch-src__global.h www/hydra/files/patch-src__global.h >--- /usr/ports/www/hydra/files/patch-src__global.h 1970-01-01 09:00:00.000000000 +0900 >+++ www/hydra/files/patch-src__global.h 2014-08-31 00:00:00.000000000 +0900 >@@ -0,0 +1,11 @@ >+--- src/globals.h.orig >++++ src/globals.h >+@@ -103,7 +103,7 @@ >+ int pollfd_id; >+ #endif >+ #ifdef ENABLE_SSL >+- gnutls_session ssl_state; >++ gnutls_session_t ssl_state; >+ char * certificate_verified; /* a string that describes the output of the >+ * certificate verification function. Needed >+ * in CGIs. >diff -urN /usr/ports/www/hydra/files/patch-src__request.c www/hydra/files/patch-src__request.c >--- /usr/ports/www/hydra/files/patch-src__request.c 1970-01-01 09:00:00.000000000 +0900 >+++ www/hydra/files/patch-src__request.c 2014-08-31 00:00:00.000000000 +0900 >@@ -0,0 +1,20 @@ >+--- src/request.c.orig >++++ src/request.c >+@@ -133,7 +133,7 @@ >+ int len; >+ static int sockbufsize = SOCKETBUF_SIZE; >+ #ifdef ENABLE_SSL >+- gnutls_session ssl_state = NULL; >++ gnutls_session_t ssl_state = NULL; >+ #endif >+ >+ remote_addr.S_FAMILY = 0xdead; >+@@ -194,7 +194,7 @@ >+ return; >+ } >+ >+- gnutls_transport_set_ptr(ssl_state, (gnutls_transport_ptr)fd); >++ gnutls_transport_set_ptr(ssl_state, (gnutls_transport_ptr_t)fd); >+ } >+ #endif >+ >diff -urN /usr/ports/www/hydra/files/patch-src__ssl.c www/hydra/files/patch-src__ssl.c >--- /usr/ports/www/hydra/files/patch-src__ssl.c 1970-01-01 09:00:00.000000000 +0900 >+++ www/hydra/files/patch-src__ssl.c 2014-08-31 00:00:00.000000000 +0900 >@@ -0,0 +1,148 @@ >+--- src/ssl.c.orig >++++ src/ssl.c >+@@ -29,10 +29,7 @@ >+ >+ #include <gnutls/gnutls.h> >+ #include <gnutls/x509.h> >+-#include <gcrypt.h> >+ #ifdef ENABLE_SMP >+-GCRY_THREAD_OPTION_PTHREAD_IMPL; >+- >+ pthread_mutex_t ssl_session_cache_lock = PTHREAD_MUTEX_INITIALIZER; >+ #endif >+ >+@@ -51,12 +48,12 @@ >+ */ >+ >+ static void wrap_db_init(void); >+-static int wrap_db_store(void *dbf, gnutls_datum key, gnutls_datum data); >+-static gnutls_datum wrap_db_fetch(void *dbf, gnutls_datum key); >+-static int wrap_db_delete(void *dbf, gnutls_datum key); >++static int wrap_db_store(void *dbf, gnutls_datum_t key, gnutls_datum_t data); >++static gnutls_datum_t wrap_db_fetch(void *dbf, gnutls_datum_t key); >++static int wrap_db_delete(void *dbf, gnutls_datum_t key); >+ >+ static int cur = 0; /* points to the credentials structure used */ >+-static gnutls_certificate_credentials credentials[2] = { NULL, NULL }; >++static gnutls_certificate_credentials_t credentials[2] = { NULL, NULL }; >+ >+ static int need_dh_params = 0; /* whether we need to generate DHE >+ * parameters. Depend on the chosen ciphersuites. >+@@ -69,10 +66,10 @@ >+ */ >+ extern int ssl_dh_bits; >+ >+-gnutls_dh_params _dh_params[2]; >+-gnutls_rsa_params _rsa_params[2]; >++gnutls_dh_params_t _dh_params[2]; >++gnutls_rsa_params_t _rsa_params[2]; >+ >+-static int generate_dh_primes( gnutls_dh_params* dh_params) >++static int generate_dh_primes( gnutls_dh_params_t* dh_params) >+ { >+ if (gnutls_dh_params_init( dh_params) < 0) { >+ log_error_time(); >+@@ -101,7 +98,7 @@ >+ return 0; >+ } >+ >+-static int generate_rsa_params( gnutls_rsa_params* rsa_params) >++static int generate_rsa_params( gnutls_rsa_params_t* rsa_params) >+ { >+ if (gnutls_rsa_params_init( rsa_params) < 0) { >+ log_error_time(); >+@@ -165,9 +162,9 @@ >+ /* Initializes a single SSL/TLS session. That is set the algorithm, >+ * the db backend, whether to request certificates etc. >+ */ >+-gnutls_session initialize_ssl_session(void) >++gnutls_session_t initialize_ssl_session(void) >+ { >+- gnutls_session state; >++ gnutls_session_t state; >+ >+ gnutls_init(&state, GNUTLS_SERVER); >+ >+@@ -215,9 +212,6 @@ >+ >+ log_error_time(); >+ fprintf(stderr, "tls: Initializing GnuTLS/%s.\n", gnutls_check_version(NULL)); >+-#ifdef ENABLE_SMP >+- gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); >+-#endif >+ gnutls_global_init(); >+ >+ if (gnutls_certificate_allocate_credentials( &credentials[0]) < 0) { >+@@ -294,8 +288,6 @@ >+ comp_priority[i++] = GNUTLS_COMP_NULL; >+ if ( parse_cs_string( ssl_comp, "ZLIB") != 0) >+ comp_priority[i++] = GNUTLS_COMP_ZLIB; >+- if ( parse_cs_string( ssl_comp, "LZO") != 0) >+- comp_priority[i++] = GNUTLS_COMP_LZO; >+ comp_priority[i] = 0; >+ >+ /* Add protocols >+@@ -416,7 +408,7 @@ >+ cache_db = calloc(1, ssl_session_cache * sizeof(CACHE)); >+ } >+ >+-static int wrap_db_store(void *dbf, gnutls_datum key, gnutls_datum data) >++static int wrap_db_store(void *dbf, gnutls_datum_t key, gnutls_datum_t data) >+ { >+ >+ if (cache_db == NULL) >+@@ -447,9 +439,9 @@ >+ return 0; >+ } >+ >+-static gnutls_datum wrap_db_fetch(void *dbf, gnutls_datum key) >++static gnutls_datum_t wrap_db_fetch(void *dbf, gnutls_datum_t key) >+ { >+- gnutls_datum res = { NULL, 0 }; >++ gnutls_datum_t res = { NULL, 0 }; >+ int i; >+ >+ if (cache_db == NULL) >+@@ -489,7 +481,7 @@ >+ return res; >+ } >+ >+-static int wrap_db_delete(void *dbf, gnutls_datum key) >++static int wrap_db_delete(void *dbf, gnutls_datum_t key) >+ { >+ int i; >+ >+@@ -567,11 +559,11 @@ >+ >+ if (ssl_verify >= 1) { >+ size_t size; >+- int verify, ret, valid; >++ int ret, valid; >+ char name[128]; >+- const gnutls_datum *cert_list; >+- int cert_list_size; >+- gnutls_x509_crt crt = NULL; >++ const gnutls_datum_t *cert_list; >++ unsigned int cert_list_size, verify; >++ gnutls_x509_crt_t crt = NULL; >+ >+ ret = gnutls_x509_crt_init( &crt); >+ if (ret < 0) { >+@@ -601,7 +593,7 @@ >+ } >+ >+ >+- verify = gnutls_certificate_verify_peers( current->ssl_state); >++ gnutls_certificate_verify_peers2( current->ssl_state, &verify); >+ current->certificate_verified = "NONE"; >+ >+ if (cert_list == NULL) { >+@@ -737,8 +729,6 @@ >+ comp_priority[i++] = GNUTLS_COMP_NULL; >+ if ( parse_cs_string( ssl_comp, "ZLIB") != 0) >+ comp_priority[i++] = GNUTLS_COMP_ZLIB; >+- if ( parse_cs_string( ssl_comp, "LZO") != 0) >+- comp_priority[i++] = GNUTLS_COMP_LZO; >+ comp_priority[i] = 0; >+ >+ /* Add protocols >diff -urN /usr/ports/www/hydra/files/patch-src__ssl.h www/hydra/files/patch-src__ssl.h >--- /usr/ports/www/hydra/files/patch-src__ssl.h 1970-01-01 09:00:00.000000000 +0900 >+++ www/hydra/files/patch-src__ssl.h 2014-08-31 00:00:00.000000000 +0900 >@@ -0,0 +1,17 @@ >+--- src/ssl.h.orig >++++ src/ssl.h >+@@ -1,12 +1,12 @@ >+ #ifdef ENABLE_SSL >+ >+-gnutls_session initialize_ssl_session(void); >++gnutls_session_t initialize_ssl_session(void); >+ void check_ssl_alert( request* req, int ret); >+ int send_alert(request * current); >+ int finish_handshake(request * current); >+ void ssl_regenerate_params(void); >+ void generate_x509_dn(char *buf, int sizeof_buf, >+- const gnutls_datum * cert, int issuer); >++ const gnutls_datum_t * cert, int issuer); >+ >+ #endif >+ >diff -urN /usr/ports/www/hydra/pkg-plist www/hydra/pkg-plist >--- /usr/ports/www/hydra/pkg-plist 2014-06-21 17:42:14.000000000 +0900 >+++ www/hydra/pkg-plist 2014-08-31 00:00:00.000000000 +0900 >@@ -1,10 +1,7 @@ >-bin/hydra > bin/boa_indexer >+bin/hydra > bin/webindex.pl >-@unexec if cmp -s %D/etc/hydra/hydra.conf %D/etc/hydra/hydra.conf-dist; then rm -f %D/etc/hydra/hydra.conf; fi >-etc/hydra/hydra.conf-dist >-@exec [ -f %B/hydra.conf ] || cp %B/%f %B/hydra.conf >-@unexec if cmp -s %D/etc/hydra/mime.types %D/etc/hydra/mime.types-dist; then rm -f %D/etc/hydra/mime.types; fi >-etc/hydra/mime.types-dist >-@exec [ -f %B/mime.types ] || cp %B/%f %B/mime.types >-@unexec rmdir %D/etc/hydra 2> /dev/null || echo "Dont forget to remove %D/etc/hydra if you won't use hydra anymore" >+@sample %%ETCDIR%%/hydra.conf.sample >+@sample %%ETCDIR%%/mime.types.sample >+@dirrmtry %%ETCDIR%% >+@exec install -d -o www -g www %%LOGDIR%%
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 193169
: 146562