Update to 2.2.0

add some arc4random patches
take maintainership
ok & hints Joachim Shipper (old maintainer)
This commit is contained in:
giovanni 2014-04-29 16:41:36 +00:00
parent 8ad9553b67
commit da09db4dad
8 changed files with 79 additions and 25 deletions

View File

@ -1,11 +1,10 @@
# $OpenBSD: Makefile,v 1.43 2013/04/19 21:32:37 sthen Exp $
# $OpenBSD: Makefile,v 1.44 2014/04/29 16:41:36 giovanni Exp $
COMMENT= threaded NNTP- and spool-based UseNet newsreader
DISTNAME= tin-${MAJORVERSION}.${PATCHLEVEL}
MAJORVERSION= 2.0
PATCHLEVEL= 1
REVISION= 1
MAJORVERSION= 2.2
PATCHLEVEL= 0
CATEGORIES= news
MASTER_SITES= http://ftp.funet.fi/pub/unix/news/tin-unoff/ \
@ -15,7 +14,7 @@ MASTER_SITES= http://ftp.funet.fi/pub/unix/news/tin-unoff/ \
HOMEPAGE= http://www.tin.org/
MAINTAINER= Joachim Schipper <joachim@joachimschipper.nl>
MAINTAINER= Giovanni Bechis <giovanni@openbsd.org>
MODULES= devel/gettext
@ -25,12 +24,11 @@ MODULES= devel/gettext
PERMIT_PACKAGE_CDROM= no fee
PERMIT_PACKAGE_FTP= Yes
WANTLIB= c>=58.2 icuuc idn ncurses pcre pthread
WANTLIB= c>=58.2 icuuc ncurses pcre pthread
CONFIGURE_STYLE= autoconf no-autoheader
AUTOCONF_VERSION= 2.13
# XXX Re-review --disable-gsasl on update, it may become useful in the future.
#
# --with-x does not affect the build, but let's be safe.
CONFIGURE_ARGS+= --with-ispell=${LOCALBASE}/bin/ispell \
--without-metamail \
@ -52,7 +50,6 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
LIB_DEPENDS+= devel/pcre \
devel/libidn \
textproc/icu4c
ALL_TARGET= build

View File

@ -1,2 +1,2 @@
SHA256 (tin-2.0.1.tar.gz) = BeZ3TaPxlg6fZK9d6z6y5vuKYNgjRjB77BlHUouYhOs=
SIZE (tin-2.0.1.tar.gz) = 2482327
SHA256 (tin-2.2.0.tar.gz) = qJKmWVgPgk8KGlti5fJaoe3yUtlbgBqTfQBmzTb//FY=
SIZE (tin-2.2.0.tar.gz) = 2683997

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-configure_in,v 1.2 2011/10/07 14:12:55 giovanni Exp $
--- configure.in.orig Tue Aug 23 00:03:55 2011
+++ configure.in Tue Oct 4 11:16:42 2011
$OpenBSD: patch-configure_in,v 1.3 2014/04/29 16:41:36 giovanni Exp $
--- configure.in.orig Tue Dec 24 00:33:36 2013
+++ configure.in Fri Apr 18 12:39:03 2014
@@ -34,7 +34,7 @@ dnl SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SU
dnl
dnl Process this file with autoconf to produce a configure script.
@ -10,7 +10,7 @@ $OpenBSD: patch-configure_in,v 1.2 2011/10/07 14:12:55 giovanni Exp $
AC_INIT(include/tin.h)
AC_CONFIG_HEADER(include/autoconf.h:include/autoconf.hin)
AC_PREFIX_DEFAULT(/usr/local)
@@ -828,13 +828,15 @@ fi
@@ -899,13 +899,15 @@ fi
### Checks for libraries.
# libuu/uudeview
# only define HAVE_LIBUU and HAVE_UUDEVIEW_H if both are found
@ -31,9 +31,9 @@ $OpenBSD: patch-configure_in,v 1.2 2011/10/07 14:12:55 giovanni Exp $
+dnl )]
+dnl )
# libidn - Internationalized Domain Names
AC_CHECK_LIB(idn, stringprep_check_version,
@@ -1043,7 +1045,11 @@ CF_TERMIOS
# ICU - International Components for Unicode
@@ -1189,7 +1191,11 @@ CF_TERMIOS
CF_PW_GECOS
CF_TM_GMTOFF

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_Makefile_in,v 1.6 2011/10/07 14:12:55 giovanni Exp $
--- src/Makefile.in.orig Tue May 3 15:20:34 2011
+++ src/Makefile.in Tue Oct 4 11:21:26 2011
$OpenBSD: patch-src_Makefile_in,v 1.7 2014/04/29 16:41:36 giovanni Exp $
--- src/Makefile.in.orig Tue Nov 26 09:11:46 2013
+++ src/Makefile.in Fri Apr 18 12:39:03 2014
@@ -78,6 +78,7 @@ LINK_LIBS = $(PCRE_LIBS) $(CANLIB) @LIBS@ $(INTL_LIBS)
# Where do you want the binary & manual page installed?
DESTDIR = @DESTDIR@
@ -9,7 +9,7 @@ $OpenBSD: patch-src_Makefile_in,v 1.6 2011/10/07 14:12:55 giovanni Exp $
INS_MANUAL_DIR = @mandir@/man
INS_SYSDEF_DIR = @TIN_DEFAULTS_DIR@
INS_MANUAL_EXT = 1
@@ -328,6 +329,7 @@ help :
@@ -329,6 +330,7 @@ help :
$(DESTDIR)$(INS_MANUAL_DIR)$(INS_MANUAL_EXT) \
$(DESTDIR)$(INS_MANUAL_DIR)5 \
$(DESTDIR)$(INS_BINARY_DIR) \
@ -17,7 +17,7 @@ $OpenBSD: patch-src_Makefile_in,v 1.6 2011/10/07 14:12:55 giovanni Exp $
$(DESTDIR)$(INS_SYSDEF_DIR) :
mkdir -p $@
@@ -336,8 +338,6 @@ install_manpage : $(DESTDIR)$(INS_MANUAL_DIR)$(INS_MAN
@@ -337,8 +339,6 @@ install_manpage : $(DESTDIR)$(INS_MANUAL_DIR)$(INS_MAN
@$(INSTALL) -m 444 $(DOCDIR)/tin.1 $(DESTDIR)$(INS_MANUAL_DIR)$(INS_MANUAL_EXT)/$(PROJECT).$(INS_MANUAL_EXT)
@( $(CD) $(DESTDIR)$(INS_MANUAL_DIR)$(INS_MANUAL_EXT) && $(RM) -f r$(PROJECT).$(INS_MANUAL_EXT) && $(LN) $(PROJECT).$(INS_MANUAL_EXT) r$(PROJECT).$(INS_MANUAL_EXT) )
@$(INSTALL) -m 444 $(DOCDIR)/tin.5 $(DESTDIR)$(INS_MANUAL_DIR)5/$(PROJECT).5
@ -26,7 +26,7 @@ $OpenBSD: patch-src_Makefile_in,v 1.6 2011/10/07 14:12:55 giovanni Exp $
uninstall_manpage :
@$(ECHO) "Uninstalling $(PROJECT) manual page in $(DESTDIR)$(INS_MANUAL_DIR)$(INS_MANUAL_EXT) ..."
@@ -359,13 +359,13 @@ uninstall_sysdefs :
@@ -376,13 +376,13 @@ uninstall_sysdefs :
@-$(RM) -f $(DESTDIR)$(INS_SYSDEF_DIR)/tin.defaults
@-$(RM) -f $(DESTDIR)$(INS_SYSDEF_DIR)/mime.types

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-src_misc_c,v 1.1 2014/04/29 16:41:36 giovanni Exp $
--- src/misc.c.orig Fri Apr 18 12:42:33 2014
+++ src/misc.c Fri Apr 18 12:45:22 2014
@@ -2142,8 +2142,6 @@ random_organization(
if (*in_org != '/') /* M_UNIXism?! */
return in_org;
- srand((unsigned int) time(NULL));
-
if ((orgfp = fopen(in_org, "r")) == NULL)
return selorg;
@@ -2157,7 +2155,7 @@ random_organization(
}
rewind(orgfp);
- sol = rand() % nool + 1;
+ sol = arc4random_uniform(nool) + 1;
nool = 0;
while ((nool != sol) && (fgets(selorg, (int) sizeof(selorg), orgfp)))
nool++;

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-src_rfc2047_c,v 1.1 2014/04/29 16:41:36 giovanni Exp $
--- src/rfc2047.c.orig Fri Apr 18 12:52:50 2014
+++ src/rfc2047.c Fri Apr 18 12:53:26 2014
@@ -1031,9 +1031,8 @@ generate_random_mime_boundary(
{
size_t i;
- srand((unsigned int) time(NULL));
for (i = 0; i < len - 1; i++)
- boundary[i] = base64_alphabet[rand() % sizeof(base64_alphabet)];
+ boundary[i] = base64_alphabet[arc4random_uniform(sizeof(base64_alphabet))];
boundary[len - 1] = '\0';
}

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-src_sigfile_c,v 1.1 2014/04/29 16:41:36 giovanni Exp $
--- src/sigfile.c.orig Fri Apr 18 12:55:26 2014
+++ src/sigfile.c Fri Apr 18 12:58:04 2014
@@ -162,8 +162,6 @@ static FILE *
open_random_sig(
char *sigdir)
{
- srand((unsigned int) time(NULL));
-
if (chdir(sigdir) == 0) {
if (thrashdir(sigdir) || !*sigfile) {
#ifdef DEBUG
@@ -236,7 +234,7 @@ thrashdir(
return 1;
}
#endif /* HAVE_REWINDDIR */
- pick = rand() % numentries + 1;
+ pick = arc4random_uniform(numentries) + 1;
while (--pick >= 0) {
if ((dp = readdir(dirp)) == NULL)
break;

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.10 2011/10/07 14:12:55 giovanni Exp $
@comment $OpenBSD: PLIST,v 1.11 2014/04/29 16:41:36 giovanni Exp $
@pkgpath news/tin,nntp_only
bin/rtin
@bin bin/tin
@ -19,6 +19,7 @@ share/locale/fr/LC_MESSAGES/tin.mo
share/locale/ru/LC_MESSAGES/tin.mo
share/locale/sv/LC_MESSAGES/tin.mo
share/locale/tr/LC_MESSAGES/tin.mo
share/locale/zh_TW/LC_MESSAGES/tin.mo
share/tin/
share/tin/metamutt
share/tin/mime.types