From 322a92961fa1fc7125b82b4411c25fa222dd9f70 Mon Sep 17 00:00:00 2001 From: Shaun Amott Date: Fri, 14 Nov 2008 16:11:09 +0000 Subject: [PATCH] - Upgrade inn to 2.4.5. - Upgrade inn-current to the latest snapshot, fixing some issues with the port [1]; the port is still BROKEN, though. - Fix IPv6 binding issue. [2] PR: ports/124566 [1] Submitted by: thierry [1] Obtained from: http://marc.info/?t=122460141500003 [2] --- news/inn-current/Makefile | 6 +- news/inn-current/distinfo | 6 +- news/inn-current/files/patch-configure | 57 ------------------- news/inn/Makefile | 74 ++++++++++++------------- news/inn/distinfo | 6 +- news/inn/files/patch-configure | 17 +++--- news/inn/files/patch-innfeed_endpoint.c | 11 ---- news/inn/files/patch-ipv6 | 40 +++++++++++++ news/inn/pkg-plist | 16 +++--- 9 files changed, 104 insertions(+), 129 deletions(-) delete mode 100644 news/inn-current/files/patch-configure delete mode 100644 news/inn/files/patch-innfeed_endpoint.c create mode 100644 news/inn/files/patch-ipv6 diff --git a/news/inn-current/Makefile b/news/inn-current/Makefile index d11ab2969828..eae5fc66fefe 100644 --- a/news/inn-current/Makefile +++ b/news/inn-current/Makefile @@ -6,17 +6,17 @@ # PORTVERSION= ${SNAPSHOT} -PORTREVISION= 1 # Ensure master is overridden +PORTREVISION= 0 # Ensure master is overridden MASTER_SITE_ISC?= # Empty MASTER_SITES= ${MASTER_SITE_ISC:C/$/ ${MASTER_SITE_LOCAL:C/%SUBDIR%/shaun/g}/1} MASTER_SITE_SUBDIR= inn/snapshots PKGNAMESUFFIX= -${BRANCH} DISTNAME= ${PORTNAME}-${BRANCH:U}-${SNAPSHOT} -BROKEN= Does not install +BROKEN= Does not install (makedbz segfaults) BRANCH= current -SNAPSHOT= 20061024 +SNAPSHOT= 20081107 CONFLICTS= inn-2.[0-9]* inn-stable-[0-9]* diff --git a/news/inn-current/distinfo b/news/inn-current/distinfo index 9e3e74f640e8..abeceed3e958 100644 --- a/news/inn-current/distinfo +++ b/news/inn-current/distinfo @@ -1,3 +1,3 @@ -MD5 (inn-CURRENT-20061024.tar.gz) = a052ce18e47c6e16ecc3fa566b960b40 -SHA256 (inn-CURRENT-20061024.tar.gz) = 01302c2a89a3a61721c0dcc208cfe5434a944b485579c3bd7201969313e755c4 -SIZE (inn-CURRENT-20061024.tar.gz) = 2152219 +MD5 (inn-CURRENT-20081107.tar.gz) = e8f9e573f0a3cd1f27c756a5b4697499 +SHA256 (inn-CURRENT-20081107.tar.gz) = 9be02f3e1594de8c95fab0c85b1ae316de30d247ad45111a13957c4683c50e92 +SIZE (inn-CURRENT-20081107.tar.gz) = 2256893 diff --git a/news/inn-current/files/patch-configure b/news/inn-current/files/patch-configure deleted file mode 100644 index 83c031ddbbfe..000000000000 --- a/news/inn-current/files/patch-configure +++ /dev/null @@ -1,57 +0,0 @@ ---- configure.orig Tue Oct 24 18:54:13 2006 -+++ configure Tue Oct 24 20:49:19 2006 -@@ -24229,52 +24229,11 @@ - { echo "$as_me:$LINENO: checking for Berkeley DB location" >&5 - echo $ECHO_N "checking for Berkeley DB location... $ECHO_C" >&6; } - -- if test x"$DB_DIR" = xyes ; then -- for version in BerkeleyDB.4.4 BerkeleyDB.4.3 BerkeleyDB.4.2 \ -- BerkeleyDB.4.1 BerkeleyDB.4.0 \ -- BerkeleyDB.3.3 BerkeleyDB.3.2 BerkeleyDB.3.1 \ -- BerkeleyDB.3.0 BerkeleyDB ; do -- if test -d "/usr/local/$version" ; then -- DB_DIR=/usr/local/$version -- break -- fi -- done -- fi -- -- if test x"$DB_DIR" = xyes ; then -- for version in db44 db43 db42 db41 db4 db3 db2 ; do -- if test -d "/usr/local/include/$version" ; then -- DB_CPPFLAGS="-I/usr/local/include/$version" -+ DB_CPPFLAGS="-I/usr/local/include/${DB_VER}" - DB_LDFLAGS="-L/usr/local/lib" -- DB_LIBS="-l$version" -+ DB_LIBS="-l${DB_VER}" - { echo "$as_me:$LINENO: result: FreeBSD locations" >&5 - echo "${ECHO_T}FreeBSD locations" >&6; } -- break -- fi -- done -- if test x"$DB_LIBS" = x ; then -- for version in db44 db43 db42 db41 db4 db3 db2 ; do -- if test -d "/usr/include/$version" ; then -- DB_CPPFLAGS="-I/usr/include/$version" -- DB_LIBS="-l$version" -- { echo "$as_me:$LINENO: result: Red Hat locations" >&5 --echo "${ECHO_T}Red Hat locations" >&6; } -- break -- fi -- done -- if test x"$DB_LIBS" = x ; then -- DB_LIBS=-ldb -- { echo "$as_me:$LINENO: result: trying -ldb" >&5 --echo "${ECHO_T}trying -ldb" >&6; } -- fi -- fi -- else -- DB_CPPFLAGS="-I$DB_DIR/include" -- DB_LDFLAGS="-L$DB_DIR/lib" -- DB_LIBS="-ldb" -- { echo "$as_me:$LINENO: result: $DB_DIR" >&5 --echo "${ECHO_T}$DB_DIR" >&6; } -- fi - - cat >>confdefs.h <<\_ACEOF - #define USE_BERKELEY_DB 1 diff --git a/news/inn/Makefile b/news/inn/Makefile index eade0431ebd2..560c9bbcdb40 100644 --- a/news/inn/Makefile +++ b/news/inn/Makefile @@ -6,8 +6,8 @@ # PORTNAME?= inn -PORTVERSION?= 2.4.3 -PORTREVISION?= 3 +PORTVERSION?= 2.4.5 +PORTREVISION?= 0 CATEGORIES= news ipv6 MASTER_SITES?= ${MASTER_SITE_ISC} MASTER_SITE_SUBDIR?= ${PORTNAME} @@ -33,6 +33,7 @@ OPTIONS= PERL "Embedded Perl script support" On \ TCL "Embedded TCL support" Off \ KERBEROS "Enable Kerberos auth support" Off \ SASL "Enable SASL support (for imapfeed auth)" Off \ + SSL "Enable OpenSSL support (for NNTP over SSL)" On \ TAGGED_HASH "Use tagged hash table for history" Off \ LARGE_FILES "Support for files larger than 2GB" Off \ KEYWORDS "Automatic keyword generation support" On \ @@ -58,32 +59,28 @@ CONFIGURE_ARGS+= --mandir=${MANPREFIX}/man \ .include .if defined(WITH_BERKELEYDB) -CONFIGURE_ARGS+= --with-berkeleydb -. if !defined(WITH_BDB_VER) -WITH_BDB_VER= 4 -. endif -. if (${WITH_BDB_VER} == 3) || (${WITH_BDB_VER} == 4) || (${WITH_BDB_VER} == 41) -LIB_DEPENDS+= db${WITH_BDB_VER}:${PORTSDIR}/databases/db${WITH_BDB_VER} -. elif ${WITH_BDB_VER} == 2 -BROKEN= Does not compile with db2 -. else -BROKEN= Unknown BerkeleyDB version -. endif -CONFIGURE_ENV+= DB_VER=db${WITH_BDB_VER} +USE_BDB= 3+ +CONFIGURE_ENV+= DB_VER=db${BDB_VER} +CONFIGURE_ENV+= DB_LIB=${BDB_LIB_NAME} CONFIGURE_ARGS+= --with-berkeleydb=${LOCALBASE} .endif +.if defined(WITH_SSL) +.include "${PORTSDIR}/Mk/bsd.openssl.mk" +CONFIGURE_ARGS+= --with-ssl=${OPENSSLBASE} +.endif + .if defined(WITH_KERBEROS) . if exists(${LOCALBASE}/bin/krb5-config) LIB_DEPENDS+= gssapi_krb5:${PORTSDIR}/security/krb5 -CONFIGURE_ARGS+= --enable-kerberos=${LOCALBASE} +CONFIGURE_ARGS+= --with-kerberos=${LOCALBASE} . else -CONFIGURE_ARGS+= --enable-kerberos=/usr +CONFIGURE_ARGS+= --with-kerberos=/usr . endif -CONFIGURE_ENV+= ac_cv_search_krb5_parse_name="-lcrypt -lcrypto -lkrb5 -lasn1 -lroken" +CONFIGURE_ENV+= ac_cv_search_krb5_parse_name="-lcrypt -lcrypto -lkrb5 -lasn1 -lroken -lhx509" CONFIGURE_ENV+= ac_cv_func_krb5_init_ets=yes .else -CONFIGURE_ARGS+= --disable-kerberos +CONFIGURE_ARGS+= --without-kerberos .endif .if !defined(WITHOUT_PERL) @@ -98,6 +95,7 @@ CONFIGURE_ARGS+= --with-python .endif .if defined(WITH_TCL) +USE_TCL= 84 CONFIGURE_ARGS+= --with-tcl=${LOCALBASE} BUILD_DEPENDS+= ${LOCALBASE}/include/tcl8.3/tcl.h:${PORTSDIR}/lang/tcl83 .endif @@ -135,7 +133,7 @@ PLIST_SUB+= WITHOUT_TAGGED_HASH="" .endif PORTDOCS= CONTRIBUTORS HACKING INSTALL LICENSE MANIFEST NEWS README TODO -HEADERS= clibrary.h config.h dbz.h libinn.h storage.h +HEADERS= clibrary.h config.h dbz.h MAN1= convdate.1 fastrm.1 getlist.1 grephistory.1 inews.1 innconfval.1 \ innfeed.1 innmail.1 nntpget.1 pgpverify.1 rnews.1 shlock.1 \ @@ -159,25 +157,14 @@ MAN8= actsync.8 archive.8 auth_smb.8 batcher.8 buffchan.8 \ radius.8 rc.news.8 scanlogs.8 send-nntp.8 send-uucp.8 sendinpaths.8 \ tally.control.8 tdx-util.8 writelog.8 -.if ${BRANCH} != "current" -MAN1+= startinnfeed.1 -MAN3+= parsedate.3 -MAN5+= sasl.conf.5 -MAN8+= actsyncd.8 inndstart.8 -PLIST_SUB+= NOTCURRENT="" -.else -PLIST_SUB+= NOTCURRENT="@comment " -MAN8+= innbind.8 tinyleaf.8 -.endif - .if defined(WITH_KERBEROS) MAN8+= auth_krb5.8 .endif TO_BE_STRIPPED= bin/auth/resolv/domain bin/auth/resolv/ident bin/auth/passwd/auth_smb \ bin/auth/passwd/ckpasswd bin/auth/passwd/radius bin/rnews.libexec/decode \ - bin/rnews.libexec/encode bin/tdx-util bin/innd bin/inndstart bin/nnrpd \ - bin/innfeed bin/startinnfeed bin/imapfeed bin/convdate bin/expire \ + bin/rnews.libexec/encode bin/tdx-util bin/innd bin/nnrpd \ + bin/innfeed bin/imapfeed bin/convdate bin/expire \ bin/expireover bin/fastrm bin/grephistory bin/makedbz bin/makehistory \ bin/prunehistory bin/ctlinnd bin/getlist bin/inews bin/innconfval \ bin/ovdb_init bin/ovdb_monitor bin/ovdb_server bin/ovdb_stat bin/rnews \ @@ -192,6 +179,19 @@ CONFIG_FILES= actsync.cfg actsync.ign buffindexed.conf control.ctl cycbuff.conf passwd.nntp radius.conf readers.conf sasl.conf storage.conf \ subscriptions +.if ${BRANCH} != "current" +MAN1+= startinnfeed.1 +MAN3+= parsedate.3 +MAN5+= sasl.conf.5 +MAN8+= actsyncd.8 inndstart.8 +TO_BE_STRIPPED+=bin/inndstart bin/startinnfeed +HEADERS+= libinn.h storage.h +PLIST_SUB+= NOTCURRENT="" +.else +PLIST_SUB+= NOTCURRENT="@comment " +MAN8+= innbind.8 tinyleaf.8 +.endif + SUB_LIST+= EGDIR="${EXAMPLESDIR:C,^${PREFIX},\\$\\${PREFIX},}" PLIST_SUB+= ETCFILES="${CONFIG_FILES}" @@ -199,8 +199,8 @@ post-patch: @${REINPLACE_CMD} -E 's!\$$[{(]PATHETC[})]!${EXAMPLESDIR}!g' \ ${WRKSRC}/site/Makefile .if defined(WITH_TCL) - @${REINPLACE_CMD} -e 's!!!' ${WRKSRC}/innd/innd.h - @${REINPLACE_CMD} -e 's!-ltcl!-ltcl83!' \ + @${REINPLACE_CMD} -e 's!!!' ${WRKSRC}/innd/innd.h + @${REINPLACE_CMD} -e 's!-ltcl!-ltcl84!' \ ${WRKSRC}/configure .endif @${REINPLACE_CMD} -e 's!et/com_err\.h!com_err.h!g' \ @@ -224,7 +224,7 @@ post-build: post-install: .if !defined(WITHOUT_STRIP) . for FILE in ${TO_BE_STRIPPED} - @[ -e ${INN_NEWSBASE}/${FILE} ] && ${STRIP_CMD} ${INN_NEWSBASE}/${FILE} + [ -e ${INN_NEWSBASE}/${FILE} ] && ${STRIP_CMD} ${INN_NEWSBASE}/${FILE} . endfor .endif ${CHOWN} ${MANOWN}:${MANGRP} ${PREFIX}/man ${PREFIX}/man/man1 ${PREFIX}/man/man3 \ @@ -240,8 +240,8 @@ post-install: .for FILE in ${HEADERS} ${INSTALL_DATA} ${WRKSRC}/include/${FILE} ${INN_NEWSBASE}/include/ .endfor - @${CHOWN} ${BINOWN}:news ${INN_NEWSBASE}/bin/auth/passwd/ckpasswd - @${CHMOD} 4755 ${INN_NEWSBASE}/bin/auth/passwd/ckpasswd + ${CHOWN} ${BINOWN}:news ${INN_NEWSBASE}/bin/auth/passwd/ckpasswd + ${CHMOD} 4755 ${INN_NEWSBASE}/bin/auth/passwd/ckpasswd @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} CHECK-CONF ${INN_ETCDIR} @(if [ ! -f ${INN_DBDIR}/history ] ; then \ ${ECHO} 'Creating empty history database...' ; \ diff --git a/news/inn/distinfo b/news/inn/distinfo index 1e4badf16203..b7156f7da966 100644 --- a/news/inn/distinfo +++ b/news/inn/distinfo @@ -1,3 +1,3 @@ -MD5 (inn-2.4.3.tar.gz) = 6caa10909a7bf55fb91535685990aec9 -SHA256 (inn-2.4.3.tar.gz) = b69679ed4b79ed8384db50e43a09a7d52e4da51712235b912bcfae037e137bf2 -SIZE (inn-2.4.3.tar.gz) = 1871994 +MD5 (inn-2.4.5.tar.gz) = 07bc6530c5e296b0ee81a5d6ac4cd355 +SHA256 (inn-2.4.5.tar.gz) = 7d33c383fccb119ff2d474c35ad09ffb223822cce3575cb457eab8a2c4b1f23e +SIZE (inn-2.4.5.tar.gz) = 1908550 diff --git a/news/inn/files/patch-configure b/news/inn/files/patch-configure index cd2f404670e2..0eed46af6376 100644 --- a/news/inn/files/patch-configure +++ b/news/inn/files/patch-configure @@ -1,11 +1,11 @@ ---- configure.orig Mon Mar 20 04:14:57 2006 -+++ configure Sat May 6 02:32:58 2006 -@@ -7604,36 +7604,9 @@ +--- configure.orig 2008-06-30 04:56:57.000000000 +1100 ++++ configure 2008-08-18 12:35:35.000000000 +1100 +@@ -7535,36 +7535,9 @@ done done fi - if test x"$BERKELEY_DB_DIR" = xyes ; then -- for v in db43 db42 db41 db4 db3 db2 ; do +- for v in db46 db45 db44 db43 db42 db41 db4 db3 db2 ; do - if test -d "/usr/local/include/$v" ; then - BERKELEY_DB_LDFLAGS="-L/usr/local/lib" - BERKELEY_DB_CFLAGS="-I/usr/local/include/$v" @@ -15,7 +15,7 @@ - fi - done - if test x"$BERKELEY_DB_LIB" = x ; then -- for v in db43 db42 db41 db4 db3 db2 ; do +- for v in db44 db43 db42 db41 db4 db3 db2 ; do - if test -d "/usr/include/$v" ; then - BERKELEY_DB_CFLAGS="-I/usr/include/$v" - BERKELEY_DB_LIB="-l$v" @@ -29,13 +29,14 @@ - fi - fi - else - BERKELEY_DB_LDFLAGS="-L$BERKELEY_DB_DIR/lib" +- BERKELEY_DB_LDFLAGS="-L$BERKELEY_DB_DIR/lib" - BERKELEY_DB_CFLAGS="-I$BERKELEY_DB_DIR/include" - BERKELEY_DB_LIB="-ldb" - echo "$ac_t""$BERKELEY_DB_DIR" 1>&6 - fi -+ BERKELEY_DB_CFLAGS="-I$BERKELEY_DB_DIR/include/${DB_VER}" -+ BERKELEY_DB_LIB="-l${DB_VER}" ++ BERKELEY_DB_LDFLAGS="-L$BERKELEY_DB_DIR/lib" ++ BERKELEY_DB_CFLAGS="-I$BERKELEY_DB_DIR/include/${DB_VER}" ++ BERKELEY_DB_LIB="-l${DB_LIB}" cat >> confdefs.h <<\EOF #define USE_BERKELEY_DB 1 EOF diff --git a/news/inn/files/patch-innfeed_endpoint.c b/news/inn/files/patch-innfeed_endpoint.c deleted file mode 100644 index b50fb3011898..000000000000 --- a/news/inn/files/patch-innfeed_endpoint.c +++ /dev/null @@ -1,11 +0,0 @@ ---- innfeed/endpoint.c.orig Mon Mar 20 04:14:57 2006 -+++ innfeed/endpoint.c Wed Sep 26 20:02:26 2007 -@@ -1644,7 +1644,7 @@ - if (sigHandlers == NULL) - { - sigHandlers = xmalloc (sizeof(sigfn) * NSIG) ; -- sigFlags = xmalloc (sizeof(int) * NSIG) ; -+ sigFlags = xmalloc (sizeof(sig_atomic_t) * NSIG) ; - for (i = 0 ; i < NSIG ; i++) - { - sigHandlers [i] = NULL ; diff --git a/news/inn/files/patch-ipv6 b/news/inn/files/patch-ipv6 new file mode 100644 index 000000000000..d0a34b693c35 --- /dev/null +++ b/news/inn/files/patch-ipv6 @@ -0,0 +1,40 @@ +--- nnrpd/nnrpd.c 2008/08/23 13:45:02 7953 ++++ nnrpd/nnrpd.c 2008/10/25 17:06:15 8144 +@@ -804,9 +804,9 @@ + struct timeval tv; + unsigned short ListenPort = NNTP_PORT; + #ifdef HAVE_INET6 +- char ListenAddr[INET6_ADDRSTRLEN]; ++ char ListenAddr[INET6_ADDRSTRLEN] = "::0"; + #else +- char ListenAddr[16]; ++ char ListenAddr[16] = "0.0.0.0"; + #endif + int lfd, fd; + socklen_t clen; +@@ -948,11 +948,14 @@ + SPOOLlen = strlen(innconf->patharticles); + + if (DaemonMode) { ++ bool ipv4binding = true; ++ + #ifdef HAVE_INET6 + memset(&ssa, '\0', sizeof(struct sockaddr_in6)); + ssa6->sin6_family = AF_INET6; + ssa6->sin6_port = htons(ListenPort); + if (inet_pton(AF_INET6, ListenAddr, ssa6->sin6_addr.s6_addr) > 0) { ++ ipv4binding = false; + if ( (lfd = socket(AF_INET6, SOCK_STREAM, 0)) < 0) { + syslog(L_FATAL, "can't open socket (%m)"); + exit(1); +@@ -979,7 +982,9 @@ + exit(1); + } + +- if (bind(lfd, (struct sockaddr *) &ssa, sizeof(ssa)) < 0) { ++ if (bind(lfd, (struct sockaddr *) &ssa, ++ ipv4binding ? sizeof(struct sockaddr_in) ++ : sizeof(struct sockaddr_storage)) < 0) { + fprintf(stderr, "%s: can't bind (%s)\n", argv[0], strerror(errno)); + syslog(L_FATAL, "can't bind local address (%m)"); + exit(1); diff --git a/news/inn/pkg-plist b/news/inn/pkg-plist index bb7ff854573d..9cdaeee80ab1 100644 --- a/news/inn/pkg-plist +++ b/news/inn/pkg-plist @@ -38,8 +38,10 @@ bin/filter/filter_innd.pl bin/filter/filter_innd.py bin/filter/filter_nnrpd.pl bin/filter/nnrpd_access.pl +bin/filter/nnrpd_access.py bin/filter/nnrpd_auth.pl bin/filter/nnrpd_auth.py +bin/filter/nnrpd_dynamic.py %%NOTCURRENT%%bin/filter/startup.tcl bin/filter/startup_innd.pl bin/getlist @@ -121,7 +123,7 @@ doc/hook-python %%NOTCURRENT%%doc/hook-tcl doc/sample-control include/clibrary.h -include/conffile.h +%%NOTCURRENT%%include/conffile.h include/config.h include/dbz.h include/inn/buffer.h @@ -142,12 +144,12 @@ include/inn/tst.h include/inn/vector.h include/inn/version.h include/inn/wire.h -include/inndcomm.h -include/libinn.h -include/nntp.h -include/ov.h -include/paths.h -include/storage.h +%%NOTCURRENT%%include/inndcomm.h +%%NOTCURRENT%%include/libinn.h +%%NOTCURRENT%%include/nntp.h +%%NOTCURRENT%%include/ov.h +%%NOTCURRENT%%include/paths.h +%%NOTCURRENT%%include/storage.h lib/innreport_inn.pm lib/innshellvars lib/innshellvars.pl