lang/ghc and time_t

2013-08-16 Thread David Coppa

As already pointed out to Matthias some time ago, I think we'll
want the diff[1] below.

Otherwise, ghc assumes time_t is long.

[1] Adapted from the larger diff at 
https://raw.github.com/iquiw/ghc-NetBSD-patches/master/ghc-7.6.2-NetBSD.patch


Index: patches/patch-libraries_time_Data_Time_Clock_CTimeval_hs
===
RCS file: patches/patch-libraries_time_Data_Time_Clock_CTimeval_hs
diff -N patches/patch-libraries_time_Data_Time_Clock_CTimeval_hs
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-libraries_time_Data_Time_Clock_CTimeval_hs16 Aug 2013 
08:01:55 -
@@ -0,0 +1,52 @@
+$OpenBSD$
+--- libraries/time/Data/Time/Clock/CTimeval.hs.origMon Oct 31 01:39:22 2011
 libraries/time/Data/Time/Clock/CTimeval.hs Fri Aug 16 09:53:12 2013
+@@ -7,18 +7,42 @@ module Data.Time.Clock.CTimeval where
+ import Foreign
+ import Foreign.C
+ 
+-data CTimeval = MkCTimeval CLong CLong
++#include "HsTimeConfig.h"
+ 
++--
++-- we assume time_t and suseconds_t are either long long, long or int.
++--
++#ifndef SIZEOF_TIME_T
++#error "SIZEOF_TIME_T is not defined!"
++#endif
++#if SIZEOF_TIME_T == SIZEOF_LONG_LONG
++type TimeT = CLLong
++#elif SIZEOF_TIME_T == SIZEOF_LONG
++type TimeT = CLong
++#elif SIZEOF_TIME_T == SIZEOF_INT
++type TimeT = CInt
++#endif
++
++#if SIZEOF_SUSECONDS_T == SIZEOF_LONG_LONG
++type SusecondsT = CLLong
++#elif SIZEOF_SUSECONDS_T == SIZEOF_LONG
++type SusecondsT = CLong
++#elif SIZEOF_SUSECONDS_T == SIZEOF_INT
++type SusecondsT = CInt
++#endif
++
++data CTimeval = MkCTimeval TimeT SusecondsT
++
+ instance Storable CTimeval where
+-  sizeOf _ = (sizeOf (undefined :: CLong)) * 2
++  sizeOf _ = sizeOf (undefined :: TimeT) + sizeOf (undefined :: 
SusecondsT)
+   alignment _ = alignment (undefined :: CLong)
+   peek p = do
+-  s   <- peekElemOff (castPtr p) 0
+-  mus <- peekElemOff (castPtr p) 1
++  s   <- peekByteOff p 0
++  mus <- peekByteOff p (sizeOf (undefined :: TimeT))
+   return (MkCTimeval s mus)
+   poke p (MkCTimeval s mus) = do
+-  pokeElemOff (castPtr p) 0 s
+-  pokeElemOff (castPtr p) 1 mus
++  pokeByteOff p 0 s
++  pokeByteOff p (sizeOf (undefined :: TimeT)) mus
+ 
+ foreign import ccall unsafe "time.h gettimeofday" gettimeofday :: Ptr 
CTimeval -> Ptr () -> IO CInt
+ 
Index: patches/patch-libraries_time_configure
===
RCS file: patches/patch-libraries_time_configure
diff -N patches/patch-libraries_time_configure
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-libraries_time_configure  16 Aug 2013 08:01:55 -
@@ -0,0 +1,340 @@
+$OpenBSD$
+--- libraries/time/configure.orig  Fri Apr 19 00:47:17 2013
 libraries/time/configure   Fri Aug 16 09:53:12 2013
+@@ -1712,6 +1712,184 @@ $as_echo "$ac_res" >&6; }
+ 
+ } # ac_fn_c_check_func
+ 
++# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
++# 
++# Tries to find the compile-time value of EXPR in a program that includes
++# INCLUDES, setting VAR accordingly. Returns whether the value could be
++# computed
++ac_fn_c_compute_int ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  if test "$cross_compiling" = yes; then
++# Depending upon the size, compute the lo and hi bounds.
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) >= 0)];
++test_array [0] = 0
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_lo=0 ac_mid=0
++  while :; do
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) <= $ac_mid)];
++test_array [0] = 0
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_hi=$ac_mid; break
++else
++  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
++  if test $ac_lo -le $ac_mid; then
++ac_lo= ac_hi=
++break
++  fi
++  as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  done
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) < 0)];
++test_array [0] = 0
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_hi=-1 ac_mid=-1
++  while :; do
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) >= $ac_mid)];
++test_array [0] = 0
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_lo=$ac_mid; break
++else
++  as_fn_arith '(' $ac_mid ')' - 1

Re: ports build failures [mostly 64-bit time_t]

2013-08-16 Thread David Coppa
On Thu, 15 Aug 2013, Christian Weisgerber wrote:

> My list (amd64, plain GENERIC.MP) looks a lot like sthen's:

...

> x11/blackbox

IMHO this is a candidate for the Attic.

Latest release is dated Nov 3rd, 2005.
There're valid and more up-to-date alternatives in our tree, like
fluxbox or openbox.

Ciao,
David



Re: lang/ghc and time_t

2013-08-16 Thread David Coppa
On Fri, 16 Aug 2013, David Coppa wrote:

> 
> As already pointed out to Matthias some time ago, I think we'll
> want the diff[1] below.
> 
> Otherwise, ghc assumes time_t is long.
> 
> [1] Adapted from the larger diff at 
> https://raw.github.com/iquiw/ghc-NetBSD-patches/master/ghc-7.6.2-NetBSD.patch

New diff that adds the configure.ac bits, just because I'm unsure
if they'd be needed or not...

Index: patches/patch-libraries_time_Data_Time_Clock_CTimeval_hs
===
RCS file: patches/patch-libraries_time_Data_Time_Clock_CTimeval_hs
diff -N patches/patch-libraries_time_Data_Time_Clock_CTimeval_hs
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-libraries_time_Data_Time_Clock_CTimeval_hs16 Aug 2013 
09:32:34 -
@@ -0,0 +1,52 @@
+$OpenBSD$
+--- libraries/time/Data/Time/Clock/CTimeval.hs.origMon Oct 31 01:39:22 2011
 libraries/time/Data/Time/Clock/CTimeval.hs Fri Aug 16 09:53:12 2013
+@@ -7,18 +7,42 @@ module Data.Time.Clock.CTimeval where
+ import Foreign
+ import Foreign.C
+ 
+-data CTimeval = MkCTimeval CLong CLong
++#include "HsTimeConfig.h"
+ 
++--
++-- we assume time_t and suseconds_t are either long long, long or int.
++--
++#ifndef SIZEOF_TIME_T
++#error "SIZEOF_TIME_T is not defined!"
++#endif
++#if SIZEOF_TIME_T == SIZEOF_LONG_LONG
++type TimeT = CLLong
++#elif SIZEOF_TIME_T == SIZEOF_LONG
++type TimeT = CLong
++#elif SIZEOF_TIME_T == SIZEOF_INT
++type TimeT = CInt
++#endif
++
++#if SIZEOF_SUSECONDS_T == SIZEOF_LONG_LONG
++type SusecondsT = CLLong
++#elif SIZEOF_SUSECONDS_T == SIZEOF_LONG
++type SusecondsT = CLong
++#elif SIZEOF_SUSECONDS_T == SIZEOF_INT
++type SusecondsT = CInt
++#endif
++
++data CTimeval = MkCTimeval TimeT SusecondsT
++
+ instance Storable CTimeval where
+-  sizeOf _ = (sizeOf (undefined :: CLong)) * 2
++  sizeOf _ = sizeOf (undefined :: TimeT) + sizeOf (undefined :: 
SusecondsT)
+   alignment _ = alignment (undefined :: CLong)
+   peek p = do
+-  s   <- peekElemOff (castPtr p) 0
+-  mus <- peekElemOff (castPtr p) 1
++  s   <- peekByteOff p 0
++  mus <- peekByteOff p (sizeOf (undefined :: TimeT))
+   return (MkCTimeval s mus)
+   poke p (MkCTimeval s mus) = do
+-  pokeElemOff (castPtr p) 0 s
+-  pokeElemOff (castPtr p) 1 mus
++  pokeByteOff p 0 s
++  pokeByteOff p (sizeOf (undefined :: TimeT)) mus
+ 
+ foreign import ccall unsafe "time.h gettimeofday" gettimeofday :: Ptr 
CTimeval -> Ptr () -> IO CInt
+ 
Index: patches/patch-libraries_time_configure
===
RCS file: patches/patch-libraries_time_configure
diff -N patches/patch-libraries_time_configure
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-libraries_time_configure  16 Aug 2013 09:32:35 -
@@ -0,0 +1,340 @@
+$OpenBSD$
+--- libraries/time/configure.orig  Fri Apr 19 00:47:17 2013
 libraries/time/configure   Fri Aug 16 09:53:12 2013
+@@ -1712,6 +1712,184 @@ $as_echo "$ac_res" >&6; }
+ 
+ } # ac_fn_c_check_func
+ 
++# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
++# 
++# Tries to find the compile-time value of EXPR in a program that includes
++# INCLUDES, setting VAR accordingly. Returns whether the value could be
++# computed
++ac_fn_c_compute_int ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  if test "$cross_compiling" = yes; then
++# Depending upon the size, compute the lo and hi bounds.
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) >= 0)];
++test_array [0] = 0
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_lo=0 ac_mid=0
++  while :; do
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) <= $ac_mid)];
++test_array [0] = 0
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_hi=$ac_mid; break
++else
++  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
++  if test $ac_lo -le $ac_mid; then
++ac_lo= ac_hi=
++break
++  fi
++  as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  done
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) < 0)];
++test_array [0] = 0
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_hi=-1 ac_mid=-1
++  while :; do
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++static int test_array [1 - 2 * !(($2) >= $ac_mid)];
++test_array [

Re: chromium: inaccuracies wrt SUBST_CMD

2013-08-16 Thread David Coppa
On Tue, 13 Aug 2013, David Coppa wrote:

> Hi Robert,
> 
> You're doing a couple of ${SUBST_CMD} at pre-configure stage, but the
> paths are already "substituted": check
> patches/patch-webkit_plugins_npapi_plugin_list_posix_cc and
> patches/patch-build_linux_unbundle_replace_gyp_files_py...
> 
> cheers!
> David

Ok for the diff below?

Index: Makefile
===
RCS file: /cvs/ports/www/chromium/Makefile,v
retrieving revision 1.147
diff -u -p -u -p -r1.147 Makefile
--- Makefile8 Aug 2013 11:52:51 -   1.147
+++ Makefile16 Aug 2013 10:19:49 -
@@ -124,9 +124,10 @@ GYP_DEFS+= -Dffmpeg_branding=Chrome \
-Dproprietary_codecs=1
 .endif
 
+MODPY_ADJ_FILES=build/linux/unbundle/replace_gyp_files.py
+
 pre-configure:
-   ${SUBST_CMD} ${WRKSRC}/webkit/plugins/npapi/plugin_list_posix.cc \
-   ${WRKSRC}/build/linux/unbundle/replace_gyp_files.py
+   ${SUBST_CMD} ${WRKSRC}/webkit/plugins/npapi/plugin_list_posix.cc
@ln -sf ${MODPY_BIN} ${WRKDIR}/bin/python
 .for _arch in x64 ia32
@cp -pR 
${WRKSRC}/third_party/ffmpeg/chromium/config/Chrome/linux/${_arch}/libavutil \
Index: patches/patch-build_linux_unbundle_replace_gyp_files_py
===
RCS file: patches/patch-build_linux_unbundle_replace_gyp_files_py
diff -N patches/patch-build_linux_unbundle_replace_gyp_files_py
--- patches/patch-build_linux_unbundle_replace_gyp_files_py 15 Jul 2013 
14:59:30 -  1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,9 +0,0 @@
-$OpenBSD: patch-build_linux_unbundle_replace_gyp_files_py,v 1.1 2013/07/15 
14:59:30 robert Exp $
 build/linux/unbundle/replace_gyp_files.py.orig.portSat Jul 13 
17:03:02 2013
-+++ build/linux/unbundle/replace_gyp_files.py  Sun Jul 14 10:52:16 2013
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2.7
- # Copyright 2013 The Chromium Authors. All rights reserved.
- # Use of this source code is governed by a BSD-style license that can be
- # found in the LICENSE file.
Index: patches/patch-webkit_plugins_npapi_plugin_list_posix_cc
===
RCS file: 
/cvs/ports/www/chromium/patches/patch-webkit_plugins_npapi_plugin_list_posix_cc,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 patch-webkit_plugins_npapi_plugin_list_posix_cc
--- patches/patch-webkit_plugins_npapi_plugin_list_posix_cc 3 Apr 2013 
08:19:10 -   1.4
+++ patches/patch-webkit_plugins_npapi_plugin_list_posix_cc 16 Aug 2013 
10:19:51 -
@@ -6,7 +6,7 @@ $OpenBSD: patch-webkit_plugins_npapi_plu
// This varies across different browsers and versions, so check 'em all.
plugin_dirs->push_back(base::FilePath("/usr/lib/browser-plugins"));
 -  plugin_dirs->push_back(base::FilePath("/usr/lib/mozilla/plugins"));
-+  plugin_dirs->push_back(base::FilePath("/usr/local/lib/mozilla/plugins"));
++  plugin_dirs->push_back(base::FilePath("${LOCALBASE}/lib/mozilla/plugins"));
plugin_dirs->push_back(base::FilePath("/usr/lib/firefox/plugins"));
plugin_dirs->push_back(base::FilePath("/usr/lib/xulrunner-addons/plugins"));
  



Re: ports build failures [mostly 64-bit time_t]

2013-08-16 Thread Stuart Henderson
On 2013/08/15 19:06, Christian Weisgerber wrote:
> My list (amd64, plain GENERIC.MP) looks a lot like sthen's:
> 
> == broken by PHP update
> graphics/pecl-imagick
> lang/php/5.3,-tidy
> multimedia/ffmpeg-php
> www/pecl-phar
> www/pecl-swish
> 
> == getdirentries/getdents
> plan9/plan9port
> www/mozilla-firefox
> www/seamonkey
> 
> With sthen's fixes, Firefox and Seamonkey now die with strange
> linker errors:
> ../../ipc/chromium/process_util_posix.o(.text._ZN4base19CloseSuperfluousFdsERKSt6vectorINS_12InjectionArcESaIS1_EE+0xf5)/usr/bin/ld:
>  Dwarf Error: Invalid or unhandled FORM value: 25.
> 
> == others
> devel/jdk/1.6
> lang/fpc
> lang/go
> lang/pypy

I'll build a new bootstrap for pypy once I've got my laptop over the bump.

> multimedia/mediatomb
> net/socat
> net/spectrum
> x11/blackbox
> x11/nx/opennx
> 
> -- 
> Christian "naddy" Weisgerber  na...@mips.inka.de
> 

post-64bit-time_t base snapshots for all arch are now on many mirrors;
there's also a matching package snapshot for amd64, and i386 is on the
way. If your local mirror still has files dated from July, try a different
one or wait for a day or two.

Failure logs from i386 are at 
http://rhaalovely.net/build-failures/i386/20130815/

In particular, any people interested in helping with these?

http://rhaalovely.net/build-failures/i386/20130815/multimedia/mediatomb.log
http://rhaalovely.net/build-failures/i386/20130815/net/socat.log
http://rhaalovely.net/build-failures/i386/20130815/productivity/taskjuggler.log
http://rhaalovely.net/build-failures/i386/20130815/x11/nx/opennx.log

It's quite likely that additional things will be broken at runtime,
and there may be other file format incompatibilities like the one already
mentioned in faq/current.html for rrdtool; good reports about this sort of
thing would be welcome.



Re: time_t-related patch-* files that need looking at

2013-08-16 Thread David Coppa
On Thu, 15 Aug 2013, Christian Weisgerber wrote:

> x11/i3/patches/patch-src_startup_c

Is this ok?

Index: Makefile
===
RCS file: /cvs/ports/x11/i3/Makefile,v
retrieving revision 1.68
diff -u -p -u -p -r1.68 Makefile
--- Makefile13 Aug 2013 10:01:54 -  1.68
+++ Makefile16 Aug 2013 11:23:06 -
@@ -3,6 +3,7 @@
 COMMENT =  improved dynamic tiling window manager
 
 DISTNAME = i3-4.6
+REVISION = 0
 CATEGORIES =   x11
 
 EXTRACT_SUFX = .tar.bz2
Index: patches/patch-src_startup_c
===
RCS file: /cvs/ports/x11/i3/patches/patch-src_startup_c,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-src_startup_c
--- patches/patch-src_startup_c 13 Dec 2012 12:10:14 -  1.2
+++ patches/patch-src_startup_c 16 Aug 2013 11:23:06 -
@@ -1,24 +1,28 @@
 $OpenBSD: patch-src_startup_c,v 1.2 2012/12/13 12:10:14 dcoppa Exp $
 
-On OpenBSD, time_t is an int.
+On OpenBSD, time_t is long long.
 
 src/startup.c.orig Thu Dec 13 10:27:52 2012
-+++ src/startup.c  Thu Dec 13 10:28:36 2012
-@@ -104,7 +104,7 @@ static int _prune_startup_sequences(void) {
+--- src/startup.c.orig Wed Aug  7 20:50:24 2013
 src/startup.c  Fri Aug 16 13:18:23 2013
+@@ -104,8 +104,8 @@ static int _prune_startup_sequences(void) {
   */
  void startup_sequence_delete(struct Startup_Sequence *sequence) {
  assert(sequence != NULL);
 -DLOG("Deleting startup sequence %s, delete_at = %ld, current_time = 
%ld\n",
-+DLOG("Deleting startup sequence %s, delete_at = %d, current_time = %d\n",
-  sequence->id, sequence->delete_at, time(NULL));
+- sequence->id, sequence->delete_at, time(NULL));
++DLOG("Deleting startup sequence %s, delete_at = %lld, current_time = 
%lld\n",
++ sequence->id, (long long)sequence->delete_at, (long long)time(NULL));
  
  /* Unref the context, will be free()d */
-@@ -246,7 +246,7 @@ void startup_monitor_event(SnMonitorEvent *event, void
+ sn_launcher_context_unref(sequence->context);
+@@ -246,8 +246,8 @@ void startup_monitor_event(SnMonitorEvent *event, void
  /* Mark the given sequence for deletion in 30 seconds. */
  time_t current_time = time(NULL);
  sequence->delete_at = current_time + 30;
 -DLOG("Will delete startup sequence %s at timestamp %ld\n",
-+DLOG("Will delete startup sequence %s at timestamp %d\n",
-  sequence->id, sequence->delete_at);
+- sequence->id, sequence->delete_at);
++DLOG("Will delete startup sequence %s at timestamp %lld\n",
++ sequence->id, (long long)sequence->delete_at);
  
  if (_prune_startup_sequences() == 0) {
+ DLOG("No more startup sequences running, changing root window 
cursor to default pointer.\n");



Re: time_t-related patch-* files that need looking at

2013-08-16 Thread Christian Weisgerber
David Coppa:

> > x11/i3/patches/patch-src_startup_c
> 
> Is this ok?
-snip-

Yes.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: ports build failures [mostly 64-bit time_t]

2013-08-16 Thread David Coppa
On Fri, Aug 16, 2013 at 1:08 PM, Stuart Henderson  wrote:

> In particular, any people interested in helping with these?

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-misc/socat/files/socat-1.7.2.1-long-long.patch



Re: ports build failures [mostly 64-bit time_t]

2013-08-16 Thread David Coppa
On Fri, Aug 16, 2013 at 1:08 PM, Stuart Henderson  wrote:

> In particular, any people interested in helping with these?
>
> http://rhaalovely.net/build-failures/i386/20130815/multimedia/mediatomb.log
> http://rhaalovely.net/build-failures/i386/20130815/net/socat.log
> http://rhaalovely.net/build-failures/i386/20130815/productivity/taskjuggler.log
> http://rhaalovely.net/build-failures/i386/20130815/x11/nx/opennx.log

mediatomb:

http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/multimedia/mediatomb/patches/patch-ba



Re: ports build failures [mostly 64-bit time_t]

2013-08-16 Thread David Coppa
On Fri, Aug 16, 2013 at 3:09 PM, David Coppa  wrote:
> On Fri, Aug 16, 2013 at 1:08 PM, Stuart Henderson  wrote:
>
>> In particular, any people interested in helping with these?
>>
>> http://rhaalovely.net/build-failures/i386/20130815/multimedia/mediatomb.log
>> http://rhaalovely.net/build-failures/i386/20130815/net/socat.log
>> http://rhaalovely.net/build-failures/i386/20130815/productivity/taskjuggler.log
>> http://rhaalovely.net/build-failures/i386/20130815/x11/nx/opennx.log
>
> mediatomb:
>
> http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/multimedia/mediatomb/patches/patch-ba

Also patch-bb and patch-bc for this!

Sorry,
David



Re: PATCH: http -> https in a bunch of ports

2013-08-16 Thread Stuart Cassoff
On 08/10/13 16:22, Juan Francisco Cantero Hurtado wrote:
> Here is a partial diff with some MASTER_SITES changed from http to
> https.

Why?


Stu




Re: ports build failures [mostly 64-bit time_t]

2013-08-16 Thread patrick keshishian
On Friday, August 16, 2013, David Coppa wrote:

> On Thu, 15 Aug 2013, Christian Weisgerber wrote:
>
> > My list (amd64, plain GENERIC.MP) looks a lot like sthen's:
>
> ...
>
> > x11/blackbox
>
> IMHO this is a candidate for the Attic.


boo! i use it :(


> Latest release is dated Nov 3rd, 2005.
> There're valid and more up-to-date alternatives in our tree, like
> fluxbox or openbox.


both are shit alts. openbox is xml-ifed nightmare wrt its config files
(last time i looked, admitedly ages ago). fluxbox is better, but its
behavior is quite different than blackbox.

-pk


Ciao,
> David
>
>


Re: ports build failures [mostly 64-bit time_t]

2013-08-16 Thread David Coppa
On Fri, Aug 16, 2013 at 3:46 PM, patrick keshishian  wrote:
>
>
> On Friday, August 16, 2013, David Coppa wrote:
>>
>> On Thu, 15 Aug 2013, Christian Weisgerber wrote:
>>
>> > My list (amd64, plain GENERIC.MP) looks a lot like sthen's:
>>
>> ...
>>
>> > x11/blackbox
>>
>> IMHO this is a candidate for the Attic.
>
>
> boo! i use it :(

Then fix it ;)



Re: ports build failures [mostly 64-bit time_t]

2013-08-16 Thread patrick keshishian
On Friday, August 16, 2013, David Coppa wrote:

> On Fri, Aug 16, 2013 at 3:46 PM, patrick keshishian 
> >
> wrote:
> >
> >
> > On Friday, August 16, 2013, David Coppa wrote:
> >>
> >> On Thu, 15 Aug 2013, Christian Weisgerber wrote:
> >>
> >> > My list (amd64, plain GENERIC.MP) looks a lot like sthen's:
> >>
> >> ...
> >>
> >> > x11/blackbox
> >>
> >> IMHO this is a candidate for the Attic.
> >
> >
> > boo! i use it :(
>
> Then fix it ;)
>

give me a chance to get a new snapshot and look at it. i'm not as fast as
you guys.

-pk


Re: ports build failures [mostly 64-bit time_t]

2013-08-16 Thread Stuart Henderson
On 2013/08/16 06:46, patrick keshishian wrote:
> On Friday, August 16, 2013, David Coppa wrote:
> 
> > On Thu, 15 Aug 2013, Christian Weisgerber wrote:
> >
> > > My list (amd64, plain GENERIC.MP) looks a lot like sthen's:
> >
> > ...
> >
> > > x11/blackbox
> >
> > IMHO this is a candidate for the Attic.
> 
> 
> boo! i use it :(

This should be pretty straightforward to fix, it's just a simple code fix
needed, nothing fancy with bootstraps etc.

> > Latest release is dated Nov 3rd, 2005.

Maybe the author/s just decided it does everything needed so they stopped
fiddling. :-)

> > There're valid and more up-to-date alternatives in our tree, like
> > fluxbox or openbox.
> 
> 
> both are shit alts. openbox is xml-ifed nightmare wrt its config files
> (last time i looked, admitedly ages ago). fluxbox is better, but its
> behavior is quite different than blackbox.
> 
> -pk
> 
> 
> Ciao,
> > David
> >
> >



Re: PATCH: http -> https in a bunch of ports

2013-08-16 Thread Juan Francisco Cantero Hurtado
On Fri, Aug 16, 2013 at 09:22:34AM -0400, Stuart Cassoff wrote:
> On 08/10/13 16:22, Juan Francisco Cantero Hurtado wrote:
> > Here is a partial diff with some MASTER_SITES changed from http to
> > https.
> 
> Why?
> 

Increase the encrypted traffic. The idea came from a few comments from
naddy and bentley in ICB. Search similar commits in ports-changes
(github, google code, people.freebsd).

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: ports build failures [mostly 64-bit time_t]

2013-08-16 Thread Ryan Freeman
On Fri, Aug 16, 2013 at 06:46:37AM -0700, patrick keshishian wrote:
> On Friday, August 16, 2013, David Coppa wrote:
> 
> > On Thu, 15 Aug 2013, Christian Weisgerber wrote:
> >
> > > My list (amd64, plain GENERIC.MP) looks a lot like sthen's:
> >
> > ...
> >
> > > x11/blackbox
> >
> > IMHO this is a candidate for the Attic.
> 
> 
> boo! i use it :(
> 
> 
> > Latest release is dated Nov 3rd, 2005.
> > There're valid and more up-to-date alternatives in our tree, like
> > fluxbox or openbox.

just because software hasn't had a release in awhile doesn't always
mean its not usable! ;)

fluxbox, while i haven't tried it in quite awhile, used to be quite
crash-happy and it seemed like the project was generally managed in
a 'just get the features in, ignore fixing bugs' type fashion and it
made me avoid it like the plague

> both are shit alts. openbox is xml-ifed nightmare wrt its config files
> (last time i looked, admitedly ages ago). fluxbox is better, but its
> behavior is quite different than blackbox.

openbox is what I use presently, as it is just as stable as blackbox
was for me, with a few more useful features.  the xmlified confs and
menu ticked me off as well, but tbh imo its a shitty reason to write
off an entire piece of software.  generally only need to configure it
once, or use the silly obconf/obmenu gui programs to speed up the
process ;)  theme files from blackbox are generally pretty easy to
get going here, as they probably are with flux as well.

i -have- thought about using openbox as a reason to experiment
doing larger changes to software and revert it to bb-style confs again,
the standard way to make a change to software these days is to just
fork on github anyhow isn't it? ;)



-ryan

> 
> -pk
> 
> 
> Ciao,
> > David
> >
> >



Re: PATCH: http -> https in a bunch of ports

2013-08-16 Thread Stuart Henderson
On 2013/08/16 05:22, Juan Francisco Cantero Hurtado wrote:
> On Sun, Aug 11, 2013 at 01:22:24PM +0100, Stuart Henderson wrote:
> > On 2013/08/10 22:22, Juan Francisco Cantero Hurtado wrote:
> > > Here is a partial diff with some MASTER_SITES changed from http to
> > > https. Checksums and http response (ie, only 200, no redirections) have
> > > been checked for each new https url. Thanks to espie, sthen and naddy
> > > for the help.
> > > 
> > > Please review and commit:
> > > http://juanfra.info/bl/openbsd-https-201308/full.1.patch
> > > 
> > > Log of "make checksum":
> > > http://juanfra.info/bl/openbsd-https-201308/checksum.1.log (ignore the
> > > last error)
> > > 
> > 
> > Please don't do the spacehopper.org ones.
> > 
> 
> OK.
> 
> Full patch:
> http://juanfra.info/bl/openbsd-https-201308/full.2.patch
> 
> Logs of "make checksum":
> http://juanfra.info/bl/openbsd-https-201308/checksum.2.log
> http://juanfra.info/bl/openbsd-https-201308/checksum.3.log
> http://juanfra.info/bl/openbsd-https-201308/checksum.4.log
> http://juanfra.info/bl/openbsd-https-201308/checksum.5.log
> 
> -- 
> Juan Francisco Cantero Hurtado http://juanfra.info
> 

Hmm.. I've tried a random sample of these and it's not looking too promising 
SSL-wise.
A couple were OK but, for example...:

https://www.oberhumer.com/ - expired certificate
https://www.kde-apps.org/ - cert has wrong domain (*.opendesktop.org)
https://pkgs.fedoraproject.org/ - signed by Fedora CA, not in usual browsers or 
cert.pem
https://mpdbrowser.tuxfamily.org/ - can't validate, self-signed
https://people.freedesktop.org/ - cert has wrong domain (secure.freedesktop.org)
https://computeremuzone.com/ - cert has wrong domain (*.powweb.com)
https://leva.ecentrum.hu/ - can't validate, self-signed



Re: [NEW] net/rwhoisd

2013-08-16 Thread Andrew Klettke

The easiest way would be to:

1. Copy the contents of the example directory into a directory that 
_rwhoisd owns (I like to use /var/rwhoisd, so `cp -R 
/usr/local/share/doc/rwhoisd/examples/* /var/rwhoisd/`)


2. Run the rwhois_indexer like so: `/usr/local/bin/rwhois_indexer -c 
/var/rwhoisd/rwhoisd.conf -i -s "txt"`


3. Make applicable changes to rwhoisd.conf ('userid: _rwhoisd' and 
'use-syslog: YES' should be the only options you need to change)


4. Run the daemon (`cd /var/rwhoisd && rwhoisd`).

Then you can test it using telnet to port 4321 (just enter '10.0.0.1' 
after connecting if you're using the sample data); it binds to all inet4 
interfaces.


Thanks,

Andrew Klettke
Systems Admin
Optic Fusion

On 08/16/2013 04:11 PM, Chris Cappuccio wrote:

hey
do you have templates or some simple way of configuring this bastard to 
actually output data?

Andrew Klettke [aklet...@opticfusion.net] wrote:

I had this port working the last time I posted it, but with the
changes to the ports system it needed some updates. It never
actually made it into the ports tree (which is fine), but just in
case there are people using this that have run into problems, I've
been hacking away and got it working again.

Please see ARIN's rwhoisd server port tarball, attached. Testers
would be appreciated, inclusion into the ports tree would be nice,
too.

--
Thanks,

Andrew Klettke
Systems Admin
Optic Fusion








Re: ports build failures [mostly 64-bit time_t]

2013-08-16 Thread Christian Weisgerber
Stuart Henderson  wrote:

> x11/nx/opennx

Suggested fix below.

opennx wants to write a timestamp into a configuration file, but
the wxConfigBase framework does not deal with long long.  I've
looked a bit into it, but all integer types are mapped to long,
making it problematic to add support for long long.  The alternative
approach is to just put the timestamp into a long.  (Yes, this will
break on 32-bit platforms in 2038.)  Note that the existing code
already crams a long long filesize into a long, too.

All of this is in some smartcard handling code that may not even
be used on OpenBSD.

ok?

Index: patches/patch-opennxApp_cpp
===
RCS file: /cvs/ports/x11/nx/opennx/patches/patch-opennxApp_cpp,v
retrieving revision 1.5
diff -u -p -r1.5 patch-opennxApp_cpp
--- patches/patch-opennxApp_cpp 15 Nov 2012 10:12:54 -  1.5
+++ patches/patch-opennxApp_cpp 16 Aug 2013 22:56:23 -
@@ -1,7 +1,9 @@
 $OpenBSD: patch-opennxApp_cpp,v 1.5 2012/11/15 10:12:54 jasper Exp $
 
+wxConfigBase does not support long long.
+
 --- opennxApp.cpp.orig Mon Jul 30 20:04:59 2012
-+++ opennxApp.cpp  Thu Nov 15 10:37:38 2012
 opennxApp.cpp  Sat Aug 17 00:44:22 2013
 @@ -575,7 +575,7 @@ opennxApp::preInit()
  tmp = findExecutable(wxT("cupsd"));
  if (tmp.IsEmpty()) {
@@ -11,3 +13,15 @@ $OpenBSD: patch-opennxApp_cpp,v 1.5 2012
  NULL
  };
  int i;
+@@ -754,9 +754,9 @@ void opennxApp::checkNxSmartCardSupport()
+ #endif
+ if (!fn.FileExists())
+ return;
+-time_t last_mtime;
++long last_mtime;
+ long last_size;
+-time_t mtime = fn.GetModificationTime().GetTicks();
++long mtime = (long)fn.GetModificationTime().GetTicks();
+ long size = fn.GetSize().ToULong();
+ wxConfigBase::Get()->Read(wxT("Config/NxSshStamp"), &last_mtime, 0);
+ wxConfigBase::Get()->Read(wxT("Config/NxSshSize"), &last_size, 0);

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: ports build failures [mostly 64-bit time_t]

2013-08-16 Thread Theo de Raadt
> > x11/nx/opennx
> 
> Suggested fix below.
> 
> opennx wants to write a timestamp into a configuration file, but
> the wxConfigBase framework does not deal with long long.  I've
> looked a bit into it, but all integer types are mapped to long,
> making it problematic to add support for long long.  The alternative
> approach is to just put the timestamp into a long.  (Yes, this will
> break on 32-bit platforms in 2038.)  Note that the existing code
> already crams a long long filesize into a long, too.

If the format supports an unsigned 32 bit type, and there are no
deltas (ie. negative numbers), then using the unsigned 32 bit type
would be better.
 



Re: ports build failures [mostly 64-bit time_t]

2013-08-16 Thread Christian Weisgerber
Theo de Raadt:

> If the format supports an unsigned 32 bit type, and there are no
> deltas (ie. negative numbers), then using the unsigned 32 bit type
> would be better.

In this particular case of opennx and wxWidgets, unsigned long isn't
available either.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: ports build failures [mostly 64-bit time_t]

2013-08-16 Thread patrick keshishian
On 8/16/13, patrick keshishian  wrote:
> On Friday, August 16, 2013, David Coppa wrote:
>
>> On Fri, Aug 16, 2013 at 3:46 PM, patrick keshishian
>> >
>> wrote:
>> >
>> >
>> > On Friday, August 16, 2013, David Coppa wrote:
>> >>
>> >> On Thu, 15 Aug 2013, Christian Weisgerber wrote:
>> >>
>> >> > My list (amd64, plain GENERIC.MP) looks a lot like sthen's:
>> >>
>> >> ...
>> >>
>> >> > x11/blackbox
>> >>
>> >> IMHO this is a candidate for the Attic.
>> >
>> >
>> > boo! i use it :(
>>
>> Then fix it ;)
>>
>
> give me a chance to get a new snapshot and look at it. i'm not as fast as
> you guys.

Obviously I'm very confused.

I just installed the amd64 snapshot that is out there. I have
obviously done something extremely wrong here. I grabbed
the install54.iso, but now I realize that that file has a time
stamp of Jul 30, and:

$ sysctl kern.version
kern.version=OpenBSD 5.4 (GENERIC) #37: Tue Jul 30 15:24:05 MDT 2013
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC

although, the installed files, e.g., /bsd, /bsd.rd, /boot, etc.
have time stamp of Aug 16.

time_t has sizeof 4.

Which snapshot am I supposed to install?

--patrick