UPDATE: devel/intellij 15.0.1

2015-11-14 Thread Caspar Schutijser
Hi ports@,

Below is an update to a new major version of IntelliJ. I tested it on
amd64, works fine for me. I @commented out the
intellij/bin/fsnotifier-arm line in PLIST, looks appropriate considering
the other fsnotifier entries.

Best regards,
Caspar Schutijser


Index: Makefile
===
RCS file: /cvs/ports/devel/intellij/Makefile,v
retrieving revision 1.26
diff -u -p -r1.26 Makefile
--- Makefile7 Oct 2015 21:39:53 -   1.26
+++ Makefile14 Nov 2015 11:33:36 -
@@ -4,7 +4,7 @@ SHARED_ONLY=Yes
 
 COMMENT=   IntelliJ IDEA Java IDE
 
-V= 14.1.5
+V= 15.0.1
 DISTNAME=  ideaIC-${V}
 PKGNAME=   intellij-${V}
 CATEGORIES=devel
@@ -28,7 +28,7 @@ NO_TEST=  Yes
 
 SUBST_VARS+=   JAVA_HOME
 
-WRKDIST=   ${WRKDIR}/idea-IC-141.2735.5
+WRKDIST=   ${WRKDIR}/idea-IC-143.382.35
 IJ=${PREFIX}/intellij
 
 # If NO_BUILD is set, JAVA_HOME doesn't get defined. So do
Index: distinfo
===
RCS file: /cvs/ports/devel/intellij/distinfo,v
retrieving revision 1.9
diff -u -p -r1.9 distinfo
--- distinfo7 Oct 2015 21:39:53 -   1.9
+++ distinfo14 Nov 2015 11:33:36 -
@@ -1,2 +1,2 @@
-SHA256 (ideaIC-14.1.5.tar.gz) = Mz1v1XFy676f4sg6lCzjQVAJkXc66gaj1J6IKaiM2aQ=
-SIZE (ideaIC-14.1.5.tar.gz) = 183304363
+SHA256 (ideaIC-15.0.1.tar.gz) = +soXOyFss+7/U7SZtDJ4ChLBVDonw2wL72LPLoL8fLU=
+SIZE (ideaIC-15.0.1.tar.gz) = 230760554
Index: pkg/PLIST
===
RCS file: /cvs/ports/devel/intellij/pkg/PLIST,v
retrieving revision 1.13
diff -u -p -r1.13 PLIST
--- pkg/PLIST   7 Oct 2015 21:39:53 -   1.13
+++ pkg/PLIST   14 Nov 2015 11:33:36 -
@@ -3,10 +3,12 @@ bin/idea
 bin/intellij
 intellij/
 intellij/Install-Linux-tar.txt
+intellij/LICENSE.txt
 intellij/NOTICE.txt
 intellij/bin/
 intellij/bin/appletviewer.policy
 @comment intellij/bin/fsnotifier
+@comment intellij/bin/fsnotifier-arm
 @comment intellij/bin/fsnotifier64
 intellij/bin/idea.png
 intellij/bin/idea.properties
@@ -88,26 +90,28 @@ intellij/lib/boot.jar
 intellij/lib/bootstrap.jar
 intellij/lib/cglib-2.2.2.jar
 intellij/lib/cli-parser-1.1.jar
-intellij/lib/commons-codec-1.8.jar
+intellij/lib/commons-codec-1.9.jar
 intellij/lib/commons-httpclient-3.1-patched.jar
-intellij/lib/commons-logging-1.1.3.jar
+intellij/lib/commons-logging-1.2.jar
 intellij/lib/commons-net-3.3.jar
+intellij/lib/coverage-agent.jar
+intellij/lib/coverage-instrumenter.jar
+intellij/lib/coverage-util.jar
 intellij/lib/ecj-4.4.jar
 intellij/lib/extensions.jar
-intellij/lib/fluent-hc-4.3.6.jar
+intellij/lib/fluent-hc-4.4.1.jar
 intellij/lib/forms_rt.jar
-intellij/lib/freemarker.jar
 intellij/lib/groovy-all-2.3.9.jar
-intellij/lib/gson-2.3.jar
+intellij/lib/gson-2.3.1.jar
 intellij/lib/guava-17.0.jar
 intellij/lib/hamcrest-core-1.3.jar
-intellij/lib/hamcrest-library-1.3.jar
-intellij/lib/httpclient-4.3.6.jar
-intellij/lib/httpcore-4.3.3.jar
-intellij/lib/httpmime-4.3.6.jar
+intellij/lib/httpclient-4.4.1.jar
+intellij/lib/httpcore-4.4.1.jar
+intellij/lib/httpmime-4.4.1.jar
 intellij/lib/icons.jar
 intellij/lib/idea.jar
 intellij/lib/idea_rt.jar
+intellij/lib/imgscalr-lib-4.2.jar
 intellij/lib/isorelax.jar
 intellij/lib/javac2.jar
 intellij/lib/jaxen-1.1.3.jar
@@ -120,12 +124,12 @@ intellij/lib/jgoodies-forms.jar
 intellij/lib/jgoodies-looks-2.4.2.jar
 intellij/lib/jh.jar
 intellij/lib/jing.jar
-intellij/lib/jna-utils.jar
+intellij/lib/jna-platform.jar
 intellij/lib/jna.jar
+intellij/lib/jps-builders.jar
 intellij/lib/jps-launcher.jar
 intellij/lib/jps-model.jar
-intellij/lib/jps-server.jar
-intellij/lib/jsch-0.1.51.jar
+intellij/lib/jsch-0.1.52.jar
 intellij/lib/jsch.agentproxy.connector-factory.jar
 intellij/lib/jsch.agentproxy.core.jar
 intellij/lib/jsch.agentproxy.pageant.jar
@@ -134,9 +138,11 @@ intellij/lib/jsch.agentproxy.usocket-jna
 intellij/lib/jsch.agentproxy.usocket-nc.jar
 intellij/lib/jsr166e.jar
 intellij/lib/jsr173_1.0_api.jar
-intellij/lib/junit-4.11.jar
+intellij/lib/junit-4.12.jar
 intellij/lib/junit.jar
 intellij/lib/jzlib-1.1.1.jar
+intellij/lib/kotlin-reflect.jar
+intellij/lib/kotlin-runtime.jar
 intellij/lib/libpty/
 intellij/lib/libpty/linux/
 intellij/lib/libpty/linux/x86/
@@ -166,14 +172,14 @@ intellij/lib/microba.jar
 intellij/lib/miglayout-swing.jar
 intellij/lib/nanoxml-2.2.3.jar
 intellij/lib/nekohtml-1.9.14.jar
-intellij/lib/netty-all-4.1.0.Beta4.jar
+intellij/lib/netty-all-4.1.0.Beta6.jar
 intellij/lib/openapi.jar
 intellij/lib/optimizedFileManager.jar
 intellij/lib/oromatcher.jar
 intellij/lib/picocontainer.jar
 intellij/lib/protobuf-2.5.0.jar
 intellij/lib/proxy-vole_20131209.jar
-intellij/lib/pty4j-0.4.22.jar
+intellij/lib/pty4j-0.5.jar
 intellij/lib/purejavacomm.jar
 intellij/lib/resolver.jar
 intellij/lib/resour

UPDATE: graphics/gd

2015-11-14 Thread Rafael Sadowski
Hi @ports,

simple libgd update to 2.1.1. CVE-2014-9709 patch is not more necessary.
Tested on amd64: "All 93 tests passed".

Cheers, Rafael


Index: Makefile
===
RCS file: /cvs/ports/graphics/gd/Makefile,v
retrieving revision 1.62
diff -u -p -u -p -r1.62 Makefile
--- Makefile17 Aug 2015 19:52:39 -  1.62
+++ Makefile14 Nov 2015 12:19:52 -
@@ -2,10 +2,9 @@
 
 COMMENT=   library for dynamic creation of images
 
-V= 2.1.0
+V= 2.1.1
 DISTNAME=  libgd-$V
 PKGNAME=   gd-$V
-REVISION=  2
 
 SHARED_LIBS=   gd  21.0
 
Index: distinfo
===
RCS file: /cvs/ports/graphics/gd/distinfo,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 distinfo
--- distinfo17 Mar 2014 23:20:57 -  1.7
+++ distinfo14 Nov 2015 12:19:52 -
@@ -1,2 +1,2 @@
-SHA256 (libgd-2.1.0.tar.gz) = PO72nVRUo5LoeTrpC18NYy3T4gh5wShWqh0dPQY6Ucg=
-SIZE (libgd-2.1.0.tar.gz) = 2330322
+SHA256 (libgd-2.1.1.tar.gz) = z0e85aTExtx3uo0DSdHuyc7/d+2G8UskmgeAt/GFVMU=
+SIZE (libgd-2.1.1.tar.gz) = 2390586
Index: patches/patch-src_gd_gif_in_c
===
RCS file: patches/patch-src_gd_gif_in_c
diff -N patches/patch-src_gd_gif_in_c
--- patches/patch-src_gd_gif_in_c   26 Mar 2015 09:16:31 -  1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,32 +0,0 @@
-$OpenBSD: patch-src_gd_gif_in_c,v 1.1 2015/03/26 09:16:31 jasper Exp $
-
-Security fix for CVE-2014-9709, gd: buffer read overflow in gd_gif_in.c
-
 src/gd_gif_in.c.orig   Thu Mar 26 10:07:17 2015
-+++ src/gd_gif_in.cThu Mar 26 10:08:35 2015
-@@ -75,8 +75,10 @@ static struct {
- 
- #define STACK_SIZE ((1<<(MAX_LWZ_BITS))*2)
- 
-+#define CSD_BUF_SIZE 280
-+
- typedef struct {
--  unsigned char buf[280];
-+  unsigned char buf[CSD_BUF_SIZE];
-   int curbit;
-   int lastbit;
-   int done;
-@@ -410,7 +412,12 @@ GetCode_(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_
- 
-   ret = 0;
-   for (i = scd->curbit, j = 0; j < code_size; ++i, ++j) {
--  ret |= ((scd->buf[i / 8] & (1 << (i % 8))) != 0) << j;
-+  if (i < CSD_BUF_SIZE * 8) {
-+  ret |= ((scd->buf[i / 8] & (1 << (i % 8))) != 0) << j;
-+  } else {
-+  ret = -1;
-+  break;
-+  }
-   }
- 
-   scd->curbit += code_size;



Re: UPDATE: graphics/gd

2015-11-14 Thread Stuart Henderson
I'll take care of this. There are also API additions so it needs
a SHARED_LIBS bump.


On 2015/11/14 14:20, Rafael Sadowski wrote:
> Hi @ports,
> 
> simple libgd update to 2.1.1. CVE-2014-9709 patch is not more necessary.
> Tested on amd64: "All 93 tests passed".
> 
> Cheers, Rafael
> 
> 
> Index: Makefile
> ===
> RCS file: /cvs/ports/graphics/gd/Makefile,v
> retrieving revision 1.62
> diff -u -p -u -p -r1.62 Makefile
> --- Makefile  17 Aug 2015 19:52:39 -  1.62
> +++ Makefile  14 Nov 2015 12:19:52 -
> @@ -2,10 +2,9 @@
>  
>  COMMENT= library for dynamic creation of images
>  
> -V=   2.1.0
> +V=   2.1.1
>  DISTNAME=libgd-$V
>  PKGNAME= gd-$V
> -REVISION=2
>  
>  SHARED_LIBS= gd  21.0
>  
> Index: distinfo
> ===
> RCS file: /cvs/ports/graphics/gd/distinfo,v
> retrieving revision 1.7
> diff -u -p -u -p -r1.7 distinfo
> --- distinfo  17 Mar 2014 23:20:57 -  1.7
> +++ distinfo  14 Nov 2015 12:19:52 -
> @@ -1,2 +1,2 @@
> -SHA256 (libgd-2.1.0.tar.gz) = PO72nVRUo5LoeTrpC18NYy3T4gh5wShWqh0dPQY6Ucg=
> -SIZE (libgd-2.1.0.tar.gz) = 2330322
> +SHA256 (libgd-2.1.1.tar.gz) = z0e85aTExtx3uo0DSdHuyc7/d+2G8UskmgeAt/GFVMU=
> +SIZE (libgd-2.1.1.tar.gz) = 2390586
> Index: patches/patch-src_gd_gif_in_c
> ===
> RCS file: patches/patch-src_gd_gif_in_c
> diff -N patches/patch-src_gd_gif_in_c
> --- patches/patch-src_gd_gif_in_c 26 Mar 2015 09:16:31 -  1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -
> @@ -1,32 +0,0 @@
> -$OpenBSD: patch-src_gd_gif_in_c,v 1.1 2015/03/26 09:16:31 jasper Exp $
> -
> -Security fix for CVE-2014-9709, gd: buffer read overflow in gd_gif_in.c
> -
>  src/gd_gif_in.c.orig Thu Mar 26 10:07:17 2015
> -+++ src/gd_gif_in.c  Thu Mar 26 10:08:35 2015
> -@@ -75,8 +75,10 @@ static struct {
> - 
> - #define STACK_SIZE ((1<<(MAX_LWZ_BITS))*2)
> - 
> -+#define CSD_BUF_SIZE 280
> -+
> - typedef struct {
> --unsigned char buf[280];
> -+unsigned char buf[CSD_BUF_SIZE];
> - int curbit;
> - int lastbit;
> - int done;
> -@@ -410,7 +412,12 @@ GetCode_(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_
> - 
> - ret = 0;
> - for (i = scd->curbit, j = 0; j < code_size; ++i, ++j) {
> --ret |= ((scd->buf[i / 8] & (1 << (i % 8))) != 0) << j;
> -+if (i < CSD_BUF_SIZE * 8) {
> -+ret |= ((scd->buf[i / 8] & (1 << (i % 8))) != 0) << j;
> -+} else {
> -+ret = -1;
> -+break;
> -+}
> - }
> - 
> - scd->curbit += code_size;
> 



Re: net/tor - add Flavor

2015-11-14 Thread Stuart Henderson
On 2015/11/14 00:50, Uwe Werler wrote:
> On Sat, Nov 14, 2015 at 12:35:32AM +0100, Stefan Sperling wrote:
> > On Sat, Nov 14, 2015 at 01:05:12AM +0100, Rafael Sadowski wrote:
> > > I prefer to enable by default:
> > 
> > " Using Tor2web trades off security for convenience and usability."
> > https://tor2web.org/
> > 
> > Please don't.
> > 
> From man:
> 
>Tor2webMode 0|1
>When this option is set, Tor connects to hidden services
>non-anonymously. This option also disables client connections to
>non-hidden-service hostnames through Tor. It must only be used when
>running a tor2web Hidden Service web proxy. To enable this option
>the compile time flag --enable-tor2webmode must be specified.
>(Default: 0)
> 
> I think it shouldn't be turned on per default - even if it's not enabled per 
> default in config.
> 
> There are three scenarios therefore this mode is usefull:
> 
> 1. You want to provide a http proxy which is able to connect to tor HS for 
> clients (resolving onion domains).
> 2. You want to connect a reverse proxy to a HS.
> 3. You want to inter connect two (or more) machines within the tor network in 
> client-server-mode.
> 
> Regards Uwe
> 
> -- 
> 

So we have to balance the possibility of users shooting themselves in
the foot by enabling the config option by mistake, with the possibility
that someone will build their own "--enable-tor2webmode" package and
either not update to a newer version when a security fix comes out
because packages aren't available, or that will accidentally update
to a version without this config option.

So from what I've seen, I think that probably having this in a non-
default FLAVOR with a good but concise explanation in DESCR of what
it actually does is probably going to be the best idea. But the final
decision should rest with the maintainer.



Re: new: sysutils/grive2

2015-11-14 Thread Stuart Henderson
On 2015/11/13 23:12, Rafael Sadowski wrote:
> Hey @ports,
> 
> I asked sthen@ to remove sysutils/grive from ports tree last week. The
> old grive is dead and not support the new google drive REST API.
> 
> I've found a fork which is current under development. Tested on amd64
> with my private google drive account.
> 
> If you will test without the tarball checkout openbsd-wip:
> 
> https://github.com/jasperla/openbsd-wip/tree/master/sysutils/grive2
> 
> DESCR:
> 
> grive2 is the fork of original "Grive" (https://github.com/Grive/grive)
> Google Drive client with the support for the new Drive REST API and
> partial sync.
> 
> 
> Comments? OK?
> 
> Best regards,
> 
> Rafael

With the license marker changed to "GPLv2 only" it's OK with me to
import.

It could do with a quirks change too.

Index: Makefile
===
RCS file: /cvs/ports/devel/quirks/Makefile,v
retrieving revision 1.313
diff -u -p -r1.313 Makefile
--- Makefile13 Nov 2015 12:55:36 -  1.313
+++ Makefile14 Nov 2015 13:14:02 -
@@ -5,7 +5,7 @@ CATEGORIES =devel databases
 DISTFILES =
 
 # API.rev
-PKGNAME =  quirks-2.158
+PKGNAME =  quirks-2.159
 PKG_ARCH = *
 MAINTAINER =   Marc Espie 
 
Index: files/Quirks.pm
===
RCS file: /cvs/ports/devel/quirks/files/Quirks.pm,v
retrieving revision 1.323
diff -u -p -r1.323 Quirks.pm
--- files/Quirks.pm 13 Nov 2015 12:55:36 -  1.323
+++ files/Quirks.pm 14 Nov 2015 13:14:02 -
@@ -386,6 +386,7 @@ my $stem_extensions = {
'icinga2-pgsql' => 'icinga2-ido-pgsql',
'rcsparse' => 'py-rcsparse',
'tesseract-dan-frak' => 'tesseract-dan_frak',
+   'grive' => 'grive2',
 };
 
 # reasons for obsolete packages
@@ -688,7 +689,6 @@ my $obsolete_reason = {
'node-syslog' => 7,
'gtk2hs-buildtools' => 5,
'coffeescript' => 7,
-   'grive' => 3,
'pb-browser' => 0,
'unace' => 0,
 };



Re: new: sysutils/grive2

2015-11-14 Thread Rafael Sadowski
On Sat Nov 14, 2015 at 01:18:43PM +, Stuart Henderson wrote:
> On 2015/11/13 23:12, Rafael Sadowski wrote:
> > Hey @ports,
> > 
> > I asked sthen@ to remove sysutils/grive from ports tree last week. The
> > old grive is dead and not support the new google drive REST API.
> > 
> > I've found a fork which is current under development. Tested on amd64
> > with my private google drive account.
> > 
> > If you will test without the tarball checkout openbsd-wip:
> > 
> > https://github.com/jasperla/openbsd-wip/tree/master/sysutils/grive2
> > 
> > DESCR:
> > 
> > grive2 is the fork of original "Grive" (https://github.com/Grive/grive)
> > Google Drive client with the support for the new Drive REST API and
> > partial sync.
> > 
> > 
> > Comments? OK?
> > 
> > Best regards,
> > 
> > Rafael
> 
> With the license marker changed to "GPLv2 only" it's OK with me to
> import.

updated version on https://github.com/jasperla/openbsd-wip

now, it's in your hand. Thank you Stuart.

> 
> It could do with a quirks change too.
> 
yeah good idea, that would be nice.



Re: net/tor - add Flavor

2015-11-14 Thread Uwe Werler
On Sat, Nov 14, 2015 at 12:53:23PM +, Stuart Henderson wrote:
> On 2015/11/14 00:50, Uwe Werler wrote:
> > On Sat, Nov 14, 2015 at 12:35:32AM +0100, Stefan Sperling wrote:
> > > On Sat, Nov 14, 2015 at 01:05:12AM +0100, Rafael Sadowski wrote:
> > > > I prefer to enable by default:
> > > 
> > > " Using Tor2web trades off security for convenience and usability."
> > > https://tor2web.org/
> > > 
> > > Please don't.
> > > 
> > From man:
> > 
> >Tor2webMode 0|1
> >When this option is set, Tor connects to hidden services
> >non-anonymously. This option also disables client connections to
> >non-hidden-service hostnames through Tor. It must only be used 
> > when
> >running a tor2web Hidden Service web proxy. To enable this option
> >the compile time flag --enable-tor2webmode must be specified.
> >(Default: 0)
> > 
> > I think it shouldn't be turned on per default - even if it's not enabled 
> > per default in config.
> > 
> > There are three scenarios therefore this mode is usefull:
> > 
> > 1. You want to provide a http proxy which is able to connect to tor HS for 
> > clients (resolving onion domains).
> > 2. You want to connect a reverse proxy to a HS.
> > 3. You want to inter connect two (or more) machines within the tor network 
> > in client-server-mode.
> > 
> > Regards Uwe
> > 
> > -- 
> > 
> 

Stuart, I fully agree - and thanks for the explanation.

The last days I intensively tested tinc on top of tor in different
scenarios (yeah - layer 2 via tor). With this mode enabled on the
"client" machine one get's more throughput - increased by probably
40-50%. I measured rates up to 9,6 Mbps instead of max. 5 Mbps.

> So we have to balance the possibility of users shooting themselves in
> the foot by enabling the config option by mistake, with the possibility
> that someone will build their own "--enable-tor2webmode" package and
> either not update to a newer version when a security fix comes out
> because packages aren't available, or that will accidentally update
> to a version without this config option.
> 
> So from what I've seen, I think that probably having this in a non-
> default FLAVOR with a good but concise explanation in DESCR of what
> it actually does is probably going to be the best idea. But the final
> decision should rest with the maintainer.
> 

-- 



mpv issue since last package rebuild

2015-11-14 Thread Dimitris Papastamos
Hi everyone,

I am on current and since the last package upgrade mpv
seems to produce a high frequency continuous pitch on some videos.

Audio does not seem to be drained.  It is stuck at 0 seconds.

Not sure if this issue is because of mpv or one of its dependencies.
mplayer works well.

OpenBSD 5.8-current (GENERIC.MP) #1598: Thu Nov 12 15:25:56 MST 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8451125248 (8059MB)
avail mem = 8190869504 (7811MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xdae9c000 (63 entries)
bios0: vendor LENOVO version "83ET76WW (1.46 )" date 07/05/2013
bios0: LENOVO 4236MBG
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC SSDT SSDT SSDT HPET APIC MCFG ECDT ASF! TCPA SSDT 
SSDT DMAR UEFI UEFI UEFI
acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP4(S4) EHC1(S3) EHC2(S3) 
HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz, 2591.96 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz, 2591.58 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz, 2591.58 MHz
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz, 2591.58 MHz
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG_)
acpiprt2 at acpi0: bus 2 (EXP1)
acpiprt3 at acpi0: bus 3 (EXP2)
acpiprt4 at acpi0: bus -1 (EXP4)
acpiprt5 at acpi0: bus 13 (EXP5)
acpicpu0 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu1 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu2 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu3 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpipwrres0 at acpi0: PUBS, resource for EHC1, EHC2
acpitz0 at acpi0: critical temperature is 98 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "45N1173" serial 26283 type LION oem "SANYO"
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
cpu0: Enhanced SpeedStep 2591 MHz: speeds: 2601, 2600, 2400, 2200, 2000, 1800, 
1600, 1400, 1200, 1000, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 2G Host" rev 0x09
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 3000" rev 0x09
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1600x900
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 6 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
puc0 at pci0 dev 22 function 3 "Intel 6 Series KT" rev 0x04: ports: 1 com
com4 at puc0 port 0 apic 2 int 19: ns16550a, 16 byte fifo
com4: probed fifo depth: 0 bytes
em0 at pci0 dev 25 function 0 "Intel 82579LM" rev 0x04: msi, address 
00:21:cc:5d:e1:40
ehci0 at pci0 dev 26 function 0 "Intel 6 Series USB" rev 0x04: apic 2 int 16
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 6 Series HD Audio" rev 0x04: msi
azalia0: codecs: Conexant CX20590, Intel/0x2805,

NEW: security/pecl-libsodium

2015-11-14 Thread Stuart Henderson
from pkg/DESCR:

pecl-libsodium is a wrapper for the Sodium cryptographic library. It
provides a low-level interface; see https://paragonie.com/project/halite
for a high-level interface using this extension.

OK to import?



Re: mpv issue since last package rebuild

2015-11-14 Thread Dimitris Papastamos
On Sat, Nov 14, 2015 at 03:06:17PM +, Dimitris Papastamos wrote:
> Hi everyone,
> 
> I am on current and since the last package upgrade mpv
> seems to produce a high frequency continuous pitch on some videos.
> 
> Audio does not seem to be drained.  It is stuck at 0 seconds.
> 
> Not sure if this issue is because of mpv or one of its dependencies.
> mplayer works well.
Hi,

I fixed this by setting audio-channels = 2 in the ~/.mpv/config file.
Not sure what changed that required this modification to be made.

Cheers,
Dimitris



Re: net/tor - add Flavor

2015-11-14 Thread Pascal Stumpf
On Fri, 13 Nov 2015 17:37:12 -0500, Michael McConville wrote:
> Uwe Werler wrote:
> > Hello list,
> > 
> > I'd like to add a Flavor to tor which allows Tor2webMode:
> 
> This seems like a rare enough use-case that it probably isn't worth a
> flavor. 

I tend to agree.  A tor2web proxy is an extremely rare configuration
compared to the total number of tor nodes.

I am also opposed to the whole model of making .onion sites available
through clearnet.  Where a hidden service is needed, it is mostly for
content that both the content provider and the recipient may get into
legal trouble (or worse) in their respective jurisdictions.  While
tor2web preserves the content provider's anonymity, it exposes the
(often naive) end user to uncertain risks.

It is protected by no more than simple SSL/TLS, which makes correlation
attacks even easier, especially considering the very limited number of
.onion sites out there.  An attacker can plausibly deduce the site
you're looking at just by inspecting the encrypted traffic.

Frankly, I don't think it's ethical to provide people with this
particular gun to shoot themselves in the foot (i.e. ruin their life).
It is a convenience mechanism to access .onion content on the clearnet
that is on .onion in the first place *for a darn good reason*.


> It also runs the risk that people will think "Tor2web" is what
> they need (plausible, based on the name) and thereby deanonymize
> themselves.
> 
> > --- net/tor/Makefile.orig   Fri Nov 13 05:25:33 2015
> > +++ net/tor/MakefileFri Nov 13 04:26:09 2015
> > @@ -12,6 +12,9 @@
> >  # BSD
> >  PERMIT_PACKAGE_CDROM=  Yes
> >  
> > +PSEUDO_FLAVORS = tor2web
> > +FLAVOR ?=
> > +
> >  WANTLIB += c crypto event m pthread ssl z
> >  
> >  MASTER_SITES=  https://www.torproject.org/dist/
> > @@ -22,6 +25,11 @@
> >  # anyway on FRAME_GROWS_DOWN archs.
> >  CONFIGURE_ARGS=--with-ssl-dir=/usr \
> > --disable-gcc-hardening
> > +
> > +.if ${FLAVOR:L:Mtor2web}
> > +CONFIGURE_ARGS += --enable-tor2web-mode
> > +.endif
> > +
> >  CONFIGURE_ENV+=ac_cv_member_struct_ssl_method_st_get_cipher_by_char=no
> >  
> >  DB_DIR=/var/tor
> > 
> > ##
> > 
> > --- net/tor/pkg/DESCR.orig  Fri Nov 13 05:16:53 2015
> > +++ net/tor/pkg/DESCR   Fri Nov 13 05:22:06 2015
> > @@ -1,2 +1,6 @@
> >  Tor is a connection-based low-latency anonymous communication system that
> >  protects TCP streams: web browsing, instant messaging, irc, ssh, etc.
> > +
> > +In Tor2webMode Tor connects to hidden services non-anonymously but faster.
> > +It's useful only when running a tor2web Hidden Service web proxy or to 
> > connect
> > +directly to a Hidden Service without the need of client anonymity.
> > 
> > ##
> > 
> > Regards Uwe
> > 
> > -- 
> > 
> 
> 



NEW: devel/py-ptyprocess

2015-11-14 Thread Edd Barrett
"Launch a subprocess in a pseudo terminal (pty), and interact with both the
process and its pty."

Needed for terminado, in turn needed by jupyter-notebook.

OK?

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk


py-ptyprocess.tgz
Description: application/tar-gz


NEW: www/py-terminado

2015-11-14 Thread Edd Barrett
"A Tornado websocket backend for the term.js Javascript terminal
emulator library."

Needed by jupyter-notebook. Requires the py-ptyprocess port I just
posted.

OK?

P.S.

If you are interested in IPython4 or jupyter-notebook, there's two more deps
on-list which also need review (py-traitlets and py-ipython_genutils).

Cheers


-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk


py-terminado.tgz
Description: application/tar-gz


Re: net/tor - add Flavor

2015-11-14 Thread Uwe Werler
On Sat, Nov 14, 2015 at 08:40:40PM +0100, Pascal Stumpf wrote:
> On Fri, 13 Nov 2015 17:37:12 -0500, Michael McConville wrote:
> > Uwe Werler wrote:
> > > Hello list,
> > > 
> > > I'd like to add a Flavor to tor which allows Tor2webMode:
> > 
> > This seems like a rare enough use-case that it probably isn't worth a
> > flavor. 
> 
> I tend to agree.  A tor2web proxy is an extremely rare configuration
> compared to the total number of tor nodes.

I don't think so 'cause it's one possible way e.g. leaking sites may run.

> I am also opposed to the whole model of making .onion sites available
> through clearnet.  Where a hidden service is needed, it is mostly for
> content that both the content provider and the recipient may get into
> legal trouble (or worse) in their respective jurisdictions. 

Yeah, maybe. I live in a country where some years ago You could be
hung for listening BBC or radio London. There are countries in the
world where it's illegal to read foreign newspapers or to be gay...

I think it's not our businness to decide which sites people want to
look for or not.

> While
> tor2web preserves the content provider's anonymity, it exposes the
> (often naive) end user to uncertain risks.

I tend to forbit knives 'cause naive people my cut their fingers off.
Or we should remove the -d switch from pfctl too.

> 
> It is protected by no more than simple SSL/TLS, which makes correlation
> attacks even easier, especially considering the very limited number of
> .onion sites out there.  An attacker can plausibly deduce the site
> you're looking at just by inspecting the encrypted traffic.

It's not to keep the user itself anonymously or a proxy e.g.

> Frankly, I don't think it's ethical to provide people with this
> particular gun to shoot themselves in the foot (i.e. ruin their life).

It's not ethical to pay taxes for governments to shoot innocent people
in other countries. Isn't it? Or should government protect us for
ourself?

I think it's not the right place here to decide what other people
should or shouldn't do.

> It is a convenience mechanism to access .onion content on the clearnet
> that is on .onion in the first place *for a darn good reason*.

This is only *one* possible scenario. I told two others which imho
makes more sense than simply making hidden content public available.

> 
> > It also runs the risk that people will think "Tor2web" is what
> > they need (plausible, based on the name) and thereby deanonymize
> > themselves.
> > 



Re: Bison 3, again

2015-11-14 Thread Jérémie Courrèges-Anglas

I'll commit this tomorrow unless I hear objections.

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



Re: Bison 3, again

2015-11-14 Thread Stuart Henderson
On 2015/11/14 21:39, Jérémie Courrèges-Anglas wrote:
> 
> I'll commit this tomorrow unless I hear objections.

I think it's the least bad option for now. The regex problem is
solved with this...

Index: patches/patch-data_c++_m4
===
RCS file: patches/patch-data_c++_m4
diff -N patches/patch-data_c++_m4
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-data_c++_m4   14 Nov 2015 21:00:09 -
@@ -0,0 +1,15 @@
+$OpenBSD$
+--- data/c++.m4.orig   Sat Nov 14 20:54:33 2015
 data/c++.m4Sat Nov 14 20:56:33 2015
+@@ -100,9 +100,9 @@ m4_define([b4_namespace_open],
+ m4_define([b4_namespace_close],
+ [b4_user_code([b4_percent_define_get_syncline([[api.namespace]])
+ m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref[ ]),
+-[^\(.\)[   ]*\(::\)?\([^][:]\|:[^:]\)*],
++[^\(.\)[   ]*\(::\)?\([^]:[]\|:[^:]\)*],
+ [\1])),
+- [::\([^][:]\|:[^:]\)*], [} ])[} // ]b4_namespace_ref])])
++ [::\([^]:[]\|:[^:]\)*], [} ])[} // ]b4_namespace_ref])])
+ 
+ 
+ # b4_token_enums

... but then we run into problems with this from m4sugar

m4_translit(m4_dquote(m4_format(m4_dquote(m4_for(
  ,1,255,,[[%c]]))m4_for([i],1,255,,[,i]))), [$*-], [*$])-)

"null definition" ... m4_for itself is earlier in the file but I think
that may require m4 scuba gear to dissect ;)

Anyway I'm OK with this update with the changes we talked about offlist,
but if anyone has ideas about either ways to change m4sugar to work
better with our m4, or ways to change m4 to support it, it would
be very nice...



UPDATE: devel/py-decorator 4.0.4

2015-11-14 Thread Alexandr Shadchin
Hi,

This diff updates py-decorator to the latest release.
Tested on amd64.

Comments ? OK ?

-- 
Alexandr Shadchin

Index: Makefile
===
RCS file: /cvs/ports/devel/py-decorator/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile29 Sep 2015 10:51:53 -  1.12
+++ Makefile14 Nov 2015 22:43:45 -
@@ -2,10 +2,9 @@
 
 COMMENT =  simplify usage of decorators
 
-MODPY_EGG_VERSION = 3.3.2
+MODPY_EGG_VERSION = 4.0.4
 DISTNAME = decorator-${MODPY_EGG_VERSION}
 PKGNAME =  py-${DISTNAME}
-REVISION = 0
 
 CATEGORIES =   devel
 
@@ -19,7 +18,5 @@ MODPY_PI =Yes
 MODULES =  lang/python
 
 MODPY_SETUPTOOLS = Yes
-
-NO_TEST =  Yes
 
 .include 
Index: distinfo
===
RCS file: /cvs/ports/devel/py-decorator/distinfo,v
retrieving revision 1.6
diff -u -p -r1.6 distinfo
--- distinfo18 Jan 2015 03:13:41 -  1.6
+++ distinfo14 Nov 2015 22:43:45 -
@@ -1,2 +1,2 @@
-SHA256 (decorator-3.3.2.tar.gz) = yHjjyaQBWJP93MehRQF71UvVHNoOsjTKtqIPoCVAyx8=
-SIZE (decorator-3.3.2.tar.gz) = 28506
+SHA256 (decorator-4.0.4.tar.gz) = WtDBD60xZIz/oV7gZA7uBLuxuEOgLeJq03AHQHaMw+E=
+SIZE (decorator-4.0.4.tar.gz) = 67150



NetBeans garbage output problem report

2015-11-14 Thread Scott Walters
Hopefully this is going to the correct place.
http://www.openbsd.org/faq/faq15.html#Problems says to mail the
maintain, and http://openports.se/devel/netbeans gives
http://openports.se/bbmaint.php?maint=ports|a|openbsd.org as the
maintainer.

The "Output" window in NetBeans shows garbled characters (boxes) when
the green "play arrow"/Run button is pressed.  This is reproducible
for me by starting NetBeans, picking "New Project", taking the default
of "Java", naming it "Hello World", then immediately pressing the
green arrow to run the default skeleton project.

NetBeans on OpenBSD (5.8, amd64, package current as of the other day)
continues to exhibit this problem first reported in 2008 to the
NetBeans bug tracker:
https://netbeans.org/bugzilla/show_bug.cgi?id=145696

No small number of OpenBSD people have chimed in there.
https://netbeans.org/bugzilla/show_bug.cgi?id=224526 seems to be
continuation of that bug.  Other platforms are affected by the same
basic failure mode.

The problem seems to be that NetBeans does not detect the encoding of
output from Maven, nor does it attempt to interrogate Maven's
configuration to learn the encoding it will likely use.  For example,
Maven emits UTF-16 and NetBeans interprets it as UTF-8 (or as ASCII,
how the OpenBSD port has its configured).

scott@fluffy:~$ /usr/local/netbeans/java/maven/bin/mvn --version
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da;
2013-02-19 06:51:28-0700)
Maven home: /usr/local/netbeans/java/maven
Java version: 1.7.0_80, vendor: Oracle Corporation
Java home: /usr/local/jdk-1.7.0/jre
Default locale: en_US, platform encoding: US-ASCII
OS name: "openbsd", version: "5.8", arch: "amd64", family: "unix"

I don't know why (stopped investigating at this point), but mvn says
the "Default locale" is "en_US" and platform encoding is "US-ASCII",
but this piece of configuration change (also documented in more detail
on the NetBeans ticket) fixes the garbled output:

In ~/NetBeansProjects/*/build.xml, at the top level (under ),
where "*" is your project (or repeated for each project), at this:

  

  
org.apache.maven.plugins
maven-resources-plugin
3.0.5

  US-ASCII

  

  

... needs to match Maven's version.  That file is
created for a project after the project is created.  Start NetBeans,
create the project, quit, edit the file, restart, then press "play",
and output should be non-garbled (or this worked for me at least).

I wasn't able to successfully apply this fix to
/usr/local/netbeans/java/maven/conf/settings.xml (perhaps it has a
different structure or needs to be installed somewhere to be used; I
didn't investigate).

I was able to reproduce this problem in the latest daily developer
release of NetBeans, dated yesterday, in addition to the 6.9.1 in
OpenBSD packages.

tl;dr It may be possible to fix the garbage from running a project
that shows up in the "Output" window with a config change to Maven or
NetBeans.

Thank you everyone for your work.  I send this in the hope that it is helpful.

-scott

P.S.:  The NetBeans project manager blocked me when I pressed him for
instructions on exactly how to change the config to work around this
when I refused to disclose my platform.  I am now persona non-gratis
there.  That happened after he contacted me offering to help resolve
my issue.

OpenBSD 5.8 (GENERIC.MP) #1236: Sun Aug 16 02:31:04 MDT 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP



Re: Bison 3, again

2015-11-14 Thread Nigel Taylor
On 11/14/15 22:46, Stuart Henderson wrote:
> On 2015/11/14 21:39, Jérémie Courrèges-Anglas wrote:
>>
>> I'll commit this tomorrow unless I hear objections.
> 
> I think it's the least bad option for now. The regex problem is
> solved with this...
> 
> Index: patches/patch-data_c++_m4
> ===
> RCS file: patches/patch-data_c++_m4
> diff -N patches/patch-data_c++_m4
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ patches/patch-data_c++_m4 14 Nov 2015 21:00:09 -
> @@ -0,0 +1,15 @@
> +$OpenBSD$
> +--- data/c++.m4.orig Sat Nov 14 20:54:33 2015
>  data/c++.m4  Sat Nov 14 20:56:33 2015
> +@@ -100,9 +100,9 @@ m4_define([b4_namespace_open],
> + m4_define([b4_namespace_close],
> + [b4_user_code([b4_percent_define_get_syncline([[api.namespace]])
> + m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref[ ]),
> +-[^\(.\)[ 
> ]*\(::\)?\([^][:]\|:[^:]\)*],
> ++[^\(.\)[ 
> ]*\(::\)?\([^]:[]\|:[^:]\)*],
> + [\1])),
> +- [::\([^][:]\|:[^:]\)*], [} ])[} // ]b4_namespace_ref])])
> ++ [::\([^]:[]\|:[^:]\)*], [} ])[} // ]b4_namespace_ref])])
> + 
> + 
> + # b4_token_enums
> 
> ... but then we run into problems with this from m4sugar
> 
> m4_translit(m4_dquote(m4_format(m4_dquote(m4_for(
>   ,1,255,,[[%c]]))m4_for([i],1,255,,[,i]))), [$*-], [*$])-)
> 
> "null definition" ... m4_for itself is earlier in the file but I think
> that may require m4 scuba gear to dissect ;)
> 
> Anyway I'm OK with this update with the changes we talked about offlist,
> but if anyone has ideas about either ways to change m4sugar to work
> better with our m4, or ways to change m4 to support it, it would
> be very nice...
> 
> 
Haven't looked at the most recent diff for the Makefile, so might have
changed.

Not easy to switch to m4 as implied. More is required than the
CONFIGURE_ENV change. ac_cv_prog_gnu_m4_gnu gets forced to yes/no "-g"
setting is ignored, as M4_GNU = "" or "--gnu" in configure, so I patched
configure, also possible as an alternative to bring back/update the
output.c patch. Patching configure causes gnu m4 problems, when tests
fail, as the changed configure causes some regeneration, and wants
autoconf or more (I just move the configure patch out the way).




Did ask about fixing m4 long ago, no reply = nothing was done my me. Now
stated have a look.



m4 - Think I'm down to about the last problem with m4.

$ diff -u bison-3.0.4{.gm4,}/bison-3.0.4/examples/calc++/calc++-parser.cc
--- bison-3.0.4.gm4/bison-3.0.4/examples/calc++/calc++-parser.cc Thu Nov
12 01:25:32 2015
+++ bison-3.0.4/bison-3.0.4/examples/calc++/calc++-parser.cc Sat Nov 14
13:09:05 2015
@@ -1010,7 +1010,7 @@
// The symbols being reduced.
for (int yyi = 0; yyi < yynrhs; yyi++)
YY_SYMBOL_PRINT (" $" << yyi + 1 << " =",
- yystack_[(yynrhs) - (yyi + 1)]);
+ yystack_[..]);
}
#endif // YYDEBUG


This gets over that last problem with the first example, which compiles.
But hit the same sort of issue on the second example, but not so easy to
get around, looks like I need to fix properly.

$ cat patches/patch-data_lalr1_cc
$OpenBSD$
--- data/lalr1.cc.orig  Fri Jan 23 06:52:50 2015
+++ data/lalr1.cc   Sat Nov 14 22:44:24 2015
@@ -1159,7 +1159,7 @@ b4_error_verbose_if([state_type yystate, const symbol_
 // The symbols being reduced.
 for (int yyi = 0; yyi < yynrhs; yyi++)
   YY_SYMBOL_PRINT ("   $" << yyi + 1 << " =",
-   ]b4_rhs_data(yynrhs, yyi + 1)[);
+   yystack_[(yynrhs) - (yyi + 1)]);
   }
 #endif // ]b4_api_PREFIX[DEBUG



The patch you want is this, for c++.m4, it works for both m4 and gnu
m4 others don't.

$ cat patches/patch-data_c++_m4
$OpenBSD$
--- data/c++.m4.orig Fri Jan 16 14:47:42 2015
+++ data/c++.m4 Thu Nov 12 01:20:00 2015
@@ -100,9 +100,9 @@ m4_define([b4_namespace_open],
m4_define([b4_namespace_close],
[b4_user_code([b4_percent_define_get_syncline([[api.namespace]])
m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref[ ]),
- [^\(.\)[ ]*\(::\)?\([^][:]\|:[^:]\)*],
+ [^\(.\)[ ]*\(::\)?\([ -9;-Z^-~]\|:[^:]\)*],
[\1])),
- [::\([^][:]\|:[^:]\)*], [} ])[} // ]b4_namespace_ref])])
+ [::\([-9;-Z\^-~]\|:[^:]\)*], [} ])[} // ]b4_namespace_ref])])


It's tab-9 not space-9 in the above Could scan the RE string, and
convert [^[]:] into this.


Next problem is m4 only supports a single digit macro arguments,
I updated m4's eval.c to support multiple digits

Bison tests with m4 go wrong on expanding this

m4_pushdef(_m4_f,
$1[$4]$2[]$1[$5]$2[]$1[$6]$2[]$1[$7]$2[]$1[$8]$2[]$1[$9]$2[]$1[$10]$2[]$1[$11]$2[]_m4_popdef([_m4_f]))

where the number of arguments depends on the number of tokens defined.
Instead of $10 you get $1 followed by 0 with m4 or m4 -g.


m4_f comes from autoconf lib/m4sugar/foreach.m4, in versions 2.63b -
2.64 of autoconf a

Re: Bison 3, again

2015-11-14 Thread Jérémie Courrèges-Anglas
Nigel Taylor  writes:

[...]

> Haven't looked at the most recent diff for the Makefile, so might have
> changed.
>
> Not easy to switch to m4 as implied. More is required than the
> CONFIGURE_ENV change. ac_cv_prog_gnu_m4_gnu gets forced to yes/no "-g"
> setting is ignored, as M4_GNU = "" or "--gnu" in configure, so I patched
> configure, also possible as an alternative to bring back/update the
> output.c patch. Patching configure causes gnu m4 problems, when tests
> fail, as the changed configure causes some regeneration, and wants
> autoconf or more (I just move the configure patch out the way).

Ah ha, indeed.  Since that makes the CONFIGURE_ENV parts irrelevant,
I'll drop them.

It might be a detail given the amount of work you mention below, but
maybe /usr/bin/m4 should lie better, and support long options --help
and --gnu?

> Did ask about fixing m4 long ago, no reply = nothing was done my me. Now
> stated have a look.

Nice to hear that, I wasn't aware.  Awesome. :)

> m4 - Think I'm down to about the last problem with m4.
>
> $ diff -u bison-3.0.4{.gm4,}/bison-3.0.4/examples/calc++/calc++-parser.cc
> --- bison-3.0.4.gm4/bison-3.0.4/examples/calc++/calc++-parser.cc Thu Nov
> 12 01:25:32 2015
> +++ bison-3.0.4/bison-3.0.4/examples/calc++/calc++-parser.cc Sat Nov 14
> 13:09:05 2015
> @@ -1010,7 +1010,7 @@
> // The symbols being reduced.
> for (int yyi = 0; yyi < yynrhs; yyi++)
> YY_SYMBOL_PRINT (" $" << yyi + 1 << " =",
> - yystack_[(yynrhs) - (yyi + 1)]);
> + yystack_[..]);
> }
> #endif // YYDEBUG
>
>
> This gets over that last problem with the first example, which compiles.
> But hit the same sort of issue on the second example, but not so easy to
> get around, looks like I need to fix properly.
>
> $ cat patches/patch-data_lalr1_cc
> $OpenBSD$
> --- data/lalr1.cc.orig  Fri Jan 23 06:52:50 2015
> +++ data/lalr1.cc   Sat Nov 14 22:44:24 2015
> @@ -1159,7 +1159,7 @@ b4_error_verbose_if([state_type yystate, const symbol_
>  // The symbols being reduced.
>  for (int yyi = 0; yyi < yynrhs; yyi++)
>YY_SYMBOL_PRINT ("   $" << yyi + 1 << " =",
> -   ]b4_rhs_data(yynrhs, yyi + 1)[);
> +   yystack_[(yynrhs) - (yyi + 1)]);
>}
>  #endif // ]b4_api_PREFIX[DEBUG
>
>
>
> The patch you want is this, for c++.m4, it works for both m4 and gnu
> m4 others don't.
>
> $ cat patches/patch-data_c++_m4
> $OpenBSD$
> --- data/c++.m4.orig Fri Jan 16 14:47:42 2015
> +++ data/c++.m4 Thu Nov 12 01:20:00 2015
> @@ -100,9 +100,9 @@ m4_define([b4_namespace_open],
> m4_define([b4_namespace_close],
> [b4_user_code([b4_percent_define_get_syncline([[api.namespace]])
> m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref[ ]),
> - [^\(.\)[ ]*\(::\)?\([^][:]\|:[^:]\)*],
> + [^\(.\)[ ]*\(::\)?\([   -9;-Z^-~]\|:[^:]\)*],
> [\1])),
> - [::\([^][:]\|:[^:]\)*], [} ])[} // ]b4_namespace_ref])])
> + [::\([  -9;-Z\^-~]\|:[^:]\)*], [} ])[} // ]b4_namespace_ref])])
>
>
> It's tab-9 not space-9 in the above Could scan the RE string, and
> convert [^[]:] into this.
>
>
> Next problem is m4 only supports a single digit macro arguments,
> I updated m4's eval.c to support multiple digits
>
> Bison tests with m4 go wrong on expanding this
>
> m4_pushdef(_m4_f,
> $1[$4]$2[]$1[$5]$2[]$1[$6]$2[]$1[$7]$2[]$1[$8]$2[]$1[$9]$2[]$1[$10]$2[]$1[$11]$2[]_m4_popdef([_m4_f]))
>
> where the number of arguments depends on the number of tokens defined.
> Instead of $10 you get $1 followed by 0 with m4 or m4 -g.
>
>
> m4_f comes from autoconf lib/m4sugar/foreach.m4, in versions 2.63b -
> 2.64 of autoconf and later. Just a rare case that m_f is used with more
> than 9 arguments. foreach.m4 from autoconf is duplicated in a few/lot of
> ports for building. Could be possible to change bison.m4 etc to avoid
> using m_f, other ports / autoconf could break at some point if using
> m_f, some may have switched to gnu m4.
>
>
>
>
> The next issue is with comments // appear on the line above,
> data/c-like.m4, RE patten matching, looks for non-empty lines to insert
> // in front, may have been simpler to put /* */ around the multi-line
> comments
>
> patsubst( , [
> \(.\), [
> // \1])
>
> But . also matches new line as next character, can replace with
>
> patsubst( , [
> \([^
> ]\), [
> // \1])
>
> and works, gnum4.c, putsubst has REG_NEWLINE added if not mimic_gnu,
> adding REG_NEWLINE for all cases fixes, but breaks something else.
> Needed an extra check, if the patten contains newline, need to switch to
> REG_NEWLINE if gnu_mimic, also patsubst and regexp not setting flags the
> same way could give different results for the same RE. (May need a
> closer look). gnum4.c fixed for this flag adjustment moved into the
> twiddle routine used by both patsubst and regexp when mimicking gnu m4.
>
>
>
> Still have these additional changes from previous fix in 2011
>
> http://marc.info/?l=openbsd-ports&m=130023382518651&w=2
>
> $ cvs -R -q up -Pd regress/usr.bin/m4 usr.bi

Re: Bison 3, again

2015-11-14 Thread Nigel Taylor
On 11/15/15 01:31, Jérémie Courrèges-Anglas wrote:
> Nigel Taylor  writes:
> 
> [...]
> 
>> Haven't looked at the most recent diff for the Makefile, so might have
>> changed.
>>
>> Not easy to switch to m4 as implied. More is required than the
>> CONFIGURE_ENV change. ac_cv_prog_gnu_m4_gnu gets forced to yes/no "-g"
>> setting is ignored, as M4_GNU = "" or "--gnu" in configure, so I patched
>> configure, also possible as an alternative to bring back/update the
>> output.c patch. Patching configure causes gnu m4 problems, when tests
>> fail, as the changed configure causes some regeneration, and wants
>> autoconf or more (I just move the configure patch out the way).
> 
> Ah ha, indeed.  Since that makes the CONFIGURE_ENV parts irrelevant,
> I'll drop them.
> 
> It might be a detail given the amount of work you mention below, but
> maybe /usr/bin/m4 should lie better, and support long options --help
> and --gnu?
> 

Added --gnu option, -g exists.

-h doesn't exist, --help -h can be added, less of a priority.

I put some diffs in ~nigel for m4, doesn't include --gnu option, but has
other changes so far.