Re: net/irssi-icb Segmentation fault

2016-06-11 Thread Marcus Glocker
On Sun, Jun 12, 2016 at 06:54:28AM +0200, Jeremie Courreges-Anglas wrote:

> Marcus Glocker  writes:
> 
> > On Sun, Jun 05, 2016 at 08:04:26AM +0200, Marcus Glocker wrote:
> >
> >> ICB has been designed for a user always need to be joined to a group.
> >> With the irssi-icb module you can break this rule currently by running
> >> the '/window close' command and therefore crash irssi simply:
> >> 
> >>/window close
> >>/j 2
> >>Segmentation fault (core dumped)
> >> 
> >> icb-channels.c:icb_change_channel() will try to compare the current
> >> group with the new group on the next join command, and in case of a
> >> previous '/window close' irssi has already destroyed our group and
> >> freed the reference to it.  Hence icb_change_channel() is comparing
> >> a group string against a freed memory address and segfaults.
> >> 
> >> Attached patch disables the '/window close' command for ICB
> >> connections, since this just shouldn't be supported.
> >
> > This is an improved version of the last diff.  It still allows one to
> > close windows for private queries but just returns an error when you
> > try to close your ICB group window.
> 
> I would prefer if /wc would just disconnect from the server, there
> is no point in keeping the connection around since as you say a user is

Well, I find /wc still useful to close old private queries on icb, which
will work now with the updated diff.

> supposed to always be joined to a group.  Are you sure that only /wc
> could get irssi confused? That said...

I was thinking about this was well, but except /wc nothing else came in
mind to me yet.  Maybe when I send this patch upstream they'll have a
further think also.
 
> > I will also try to push this one upstream.
> >
> > Anyone brave around to ok this? :-)
> 
> Your diff fixes a crash which would be very annoying for people that
> also use irssi for other purposes than icb, thus I think it's a valuable
> addition.

Count me in :-)  I trapped in to this several times ...

> ok jca@, but please also unbind cmd_window in icb_commands_deinit, as in
> the updated patch below.

Yep, good point.  Thanks for your feedback, much appreciated.

> Index: Makefile
> ===
> RCS file: /cvs/ports/net/irssi-icb/Makefile,v
> retrieving revision 1.39
> diff -u -p -r1.39 Makefile
> --- Makefile  16 Mar 2016 21:19:38 -  1.39
> +++ Makefile  12 Jun 2016 04:50:01 -
> @@ -7,6 +7,7 @@ GH_PROJECT=   irssi-icb
>  GH_COMMIT=   8f7060835355d5f620a5d3b75a45336ab8efefd9
>  
>  DISTNAME=irssi-icb-0.16pre20160307
> +REVISION=0
>  
>  CATEGORIES= net
>  
> Index: patches/patch-src_core_icb-commands_c
> ===
> RCS file: patches/patch-src_core_icb-commands_c
> diff -N patches/patch-src_core_icb-commands_c
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ patches/patch-src_core_icb-commands_c 12 Jun 2016 04:49:13 -
> @@ -0,0 +1,50 @@
> +$OpenBSD$
> +--- src/core/icb-commands.c.orig Mon Mar  7 09:54:15 2016
>  src/core/icb-commands.c  Sun Jun 12 06:49:09 2016
> +@@ -19,6 +19,7 @@
> + */
> + 
> + #include "module.h"
> ++#include "../fe-common/core/fe-windows.h"
> + 
> + #include "icb-commands.h"
> + #include "icb-servers.h"
> +@@ -101,6 +102,24 @@ static void cmd_beep(const char *data, ICB_SERVER_REC 
> + }
> + }
> + 
> ++static void cmd_window(const char *data, ICB_SERVER_REC *server)
> ++{
> ++CMD_ICB_SERVER(server);
> ++
> ++/*
> ++ * Return an error in case the '/window close' command has been
> ++ * issued in your active ICB group window.  In ICB you always
> ++ * need to be joined to one group.
> ++ */
> ++if (*data != '\0' && (*data == 'c' || *data == 'C')) {
> ++if (!strcmp(window_get_active_name(active_win),
> ++server->group->name)) {
> ++cmd_return_error(CMDERR_ILLEGAL_PROTO);
> ++signal_stop();
> ++}
> ++}
> ++}
> ++
> + void icb_commands_init(void)
> + {
> + char **cmd;
> +@@ -116,6 +135,7 @@ void icb_commands_init(void)
> + command_bind_icb("kick", NULL, (SIGNAL_FUNC) cmd_boot);
> + command_bind_icb("g", NULL, (SIGNAL_FUNC) cmd_group);
> + command_bind_icb("beep", NULL, (SIGNAL_FUNC) cmd_beep);
> ++command_bind_icb("window", NULL, (SIGNAL_FUNC) cmd_window);
> + 
> + command_set_options("connect", "+icbnet");
> + }
> +@@ -134,4 +154,5 @@ void icb_commands_deinit(void)
> + command_unbind("kick", (SIGNAL_FUNC) cmd_boot);
> + command_unbind("g", (SIGNAL_FUNC) cmd_group);
> + command_unbind("beep", (SIGNAL_FUNC) cmd_beep);
> ++command_unbind("window", (SIGNAL_FUNC) cmd_window);
> + }



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:ports
Changes by: j...@cvs.openbsd.org2016/06/11 23:44:46

Modified files:
audio/cantata  : Makefile 

Log message:
No need to list qt4 in LIB_DEPENDS, the x11/qt4 module does it for us

ok landry@



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:ports
Changes by: j...@cvs.openbsd.org2016/06/11 23:43:31

Modified files:
audio/cantata  : Makefile 

Log message:
lrelease4 -> MODQT_LRELEASE

ok landry@



Re: CVS: cvs.openbsd.org: ports

2016-06-11 Thread Sebastien Marie
On Sat, Jun 11, 2016 at 09:51:29PM +0100, Stuart Henderson wrote:
> On 2016/06/08 22:20, Sebastien Marie wrote:
> > CVSROOT:/cvs
> > Module name:ports
> > Changes by: sema...@cvs.openbsd.org 2016/06/08 22:20:10
> > 
> > Modified files:
> > lang/rust  : Makefile distinfo 
> > lang/rust/patches: patch-src_librustdoc_test_rs 
> >patch-src_libstd_sys_unix_os_rs 
> > Added files:
> > lang/rust/patches: patch-mk_main_mk 
> > 
> > Log message:
> > lang/rust: change bootstrap method
> > 
> > OK juanfra@
> > 
> 
> +DISTFILES +=   rustc-bootstrap-${MACHINE_ARCH}-${BV}.tar.gz:0
> 
> dpb fetching is run on all arches, including ones which are not
> listed in "ONLY_FOR_ARCHS", so whatever makes it into DISTFILES
> needs to be fetchable.
> 
> Diff below is probably the easiest way out for now, unless someone
> has a better idea.

ah, I missed that fetching was done on all archs. sorry.

the diff is OK semarie@

> Index: Makefile
> ===
> RCS file: /cvs/ports/lang/rust/Makefile,v
> retrieving revision 1.24
> diff -u -p -r1.24 Makefile
> --- Makefile  9 Jun 2016 04:20:10 -   1.24
> +++ Makefile  11 Jun 2016 20:48:33 -
> @@ -38,7 +38,9 @@ MASTER_SITES0 = http://semarie.free.fr/
>  
>  DIST_SUBDIR =rust
>  DISTFILES =  ${DISTNAME}${EXTRACT_SUFX}
> +.if "${MACHINE_ARCH}" == "amd64"
>  DISTFILES += rustc-bootstrap-${MACHINE_ARCH}-${BV}.tar.gz:0
> +.endif
>  
>  SUPDISTFILES =   rustc-bootstrap-amd64-${BV}.tar.gz:0
>  
> 
> Also noticed while there..
> 
> RUST_HASH !=echo -n ${V} | md5 | cut -c1-8
> 
> afaik we try to avoid "!=" in Makefiles unless it's unavoidable..
> 

I switched from manually setting the version to this more "automatic"
way. But I could revert to manual way if it is preferable.

-- 
Sebastien Marie



Re: net/irssi-icb Segmentation fault

2016-06-11 Thread Jeremie Courreges-Anglas
Marcus Glocker  writes:

> On Sun, Jun 05, 2016 at 08:04:26AM +0200, Marcus Glocker wrote:
>
>> ICB has been designed for a user always need to be joined to a group.
>> With the irssi-icb module you can break this rule currently by running
>> the '/window close' command and therefore crash irssi simply:
>> 
>>  /window close
>>  /j 2
>>  Segmentation fault (core dumped)
>> 
>> icb-channels.c:icb_change_channel() will try to compare the current
>> group with the new group on the next join command, and in case of a
>> previous '/window close' irssi has already destroyed our group and
>> freed the reference to it.  Hence icb_change_channel() is comparing
>> a group string against a freed memory address and segfaults.
>> 
>> Attached patch disables the '/window close' command for ICB
>> connections, since this just shouldn't be supported.
>
> This is an improved version of the last diff.  It still allows one to
> close windows for private queries but just returns an error when you
> try to close your ICB group window.

I would prefer if /wc would just disconnect from the server, there
is no point in keeping the connection around since as you say a user is
supposed to always be joined to a group.  Are you sure that only /wc
could get irssi confused? That said...

> I will also try to push this one upstream.
>
> Anyone brave around to ok this? :-)

Your diff fixes a crash which would be very annoying for people that
also use irssi for other purposes than icb, thus I think it's a valuable
addition.

ok jca@, but please also unbind cmd_window in icb_commands_deinit, as in
the updated patch below.


Index: Makefile
===
RCS file: /cvs/ports/net/irssi-icb/Makefile,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile
--- Makefile16 Mar 2016 21:19:38 -  1.39
+++ Makefile12 Jun 2016 04:50:01 -
@@ -7,6 +7,7 @@ GH_PROJECT= irssi-icb
 GH_COMMIT= 8f7060835355d5f620a5d3b75a45336ab8efefd9
 
 DISTNAME=  irssi-icb-0.16pre20160307
+REVISION=  0
 
 CATEGORIES= net
 
Index: patches/patch-src_core_icb-commands_c
===
RCS file: patches/patch-src_core_icb-commands_c
diff -N patches/patch-src_core_icb-commands_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-src_core_icb-commands_c   12 Jun 2016 04:49:13 -
@@ -0,0 +1,50 @@
+$OpenBSD$
+--- src/core/icb-commands.c.orig   Mon Mar  7 09:54:15 2016
 src/core/icb-commands.cSun Jun 12 06:49:09 2016
+@@ -19,6 +19,7 @@
+ */
+ 
+ #include "module.h"
++#include "../fe-common/core/fe-windows.h"
+ 
+ #include "icb-commands.h"
+ #include "icb-servers.h"
+@@ -101,6 +102,24 @@ static void cmd_beep(const char *data, ICB_SERVER_REC 
+   }
+ }
+ 
++static void cmd_window(const char *data, ICB_SERVER_REC *server)
++{
++  CMD_ICB_SERVER(server);
++
++  /*
++   * Return an error in case the '/window close' command has been
++   * issued in your active ICB group window.  In ICB you always
++   * need to be joined to one group.
++   */
++  if (*data != '\0' && (*data == 'c' || *data == 'C')) {
++  if (!strcmp(window_get_active_name(active_win),
++  server->group->name)) {
++  cmd_return_error(CMDERR_ILLEGAL_PROTO);
++  signal_stop();
++  }
++  }
++}
++
+ void icb_commands_init(void)
+ {
+   char **cmd;
+@@ -116,6 +135,7 @@ void icb_commands_init(void)
+ command_bind_icb("kick", NULL, (SIGNAL_FUNC) cmd_boot);
+ command_bind_icb("g", NULL, (SIGNAL_FUNC) cmd_group);
+ command_bind_icb("beep", NULL, (SIGNAL_FUNC) cmd_beep);
++command_bind_icb("window", NULL, (SIGNAL_FUNC) cmd_window);
+ 
+   command_set_options("connect", "+icbnet");
+ }
+@@ -134,4 +154,5 @@ void icb_commands_deinit(void)
+ command_unbind("kick", (SIGNAL_FUNC) cmd_boot);
+ command_unbind("g", (SIGNAL_FUNC) cmd_group);
+ command_unbind("beep", (SIGNAL_FUNC) cmd_beep);
++command_unbind("window", (SIGNAL_FUNC) cmd_window);
+ }


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



UPDATE: SMPlayer-16.6.0

2016-06-11 Thread Gonzalo L. Rodriguez
Hello,

Update for SMPlayer to 16.6.0:

* New themes: Masalla, Papirus and PapirusDark.
* Built by default with Qt 5.

Thanks to jca@ for the help!

Comments? Oks?

Cheers.-

-- 
Sending from my toaster.
Index: Makefile
===
RCS file: /cvs/ports/x11/smplayer/Makefile,v
retrieving revision 1.26
diff -u -p -r1.26 Makefile
--- Makefile11 Jun 2016 15:50:40 -  1.26
+++ Makefile12 Jun 2016 02:01:23 -
@@ -2,7 +2,7 @@
 
 COMMENT =  complete front-end for MPlayer
 
-DISTNAME = smplayer-16.4.0
+DISTNAME = smplayer-16.6.0
 
 CATEGORIES =   multimedia x11
 
@@ -13,15 +13,14 @@ MAINTAINER =Gonzalo L. R. =20090708 \
devel/desktop-file-utils \
x11/gtk+3,-guic
Index: distinfo
===
RCS file: /cvs/ports/x11/smplayer/distinfo,v
retrieving revision 1.15
diff -u -p -r1.15 distinfo
--- distinfo15 Apr 2016 15:11:38 -  1.15
+++ distinfo12 Jun 2016 02:01:23 -
@@ -1,2 +1,2 @@
-SHA256 (smplayer-16.4.0.tar.bz2) = 3kFpx+Oh2L9vPJp3+gqMJMH2PbPyuKMlvGdhwKnS0uw=
-SIZE (smplayer-16.4.0.tar.bz2) = 4020567
+SHA256 (smplayer-16.6.0.tar.bz2) = ECIJgfcmDsXz5yAaW1uLU0phBW9haBGhGNWailaW00Y=
+SIZE (smplayer-16.6.0.tar.bz2) = 4154300
Index: patches/patch-src_globalshortcuts_globalshortcuts_cpp
===
RCS file: patches/patch-src_globalshortcuts_globalshortcuts_cpp
diff -N patches/patch-src_globalshortcuts_globalshortcuts_cpp
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-src_globalshortcuts_globalshortcuts_cpp   12 Jun 2016 
02:01:23 -
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- src/globalshortcuts/globalshortcuts.cpp.orig   Sat Jun 11 19:32:51 2016
 src/globalshortcuts/globalshortcuts.cppSat Jun 11 19:33:31 2016
+@@ -119,7 +119,7 @@ void GlobalShortcuts::activateShortcut(Qt::Key key) {
+ 
+ #include "moc_globalshortcuts.cpp"
+ 
+-#ifdef Q_OS_LINUX
++#ifdef Q_OS_UNIX
+ #include "globalshortcuts_linux.cpp"
+ #endif
+ 
Index: patches/patch-src_preferences_cpp
===
RCS file: /cvs/ports/x11/smplayer/patches/patch-src_preferences_cpp,v
retrieving revision 1.9
diff -u -p -r1.9 patch-src_preferences_cpp
--- patches/patch-src_preferences_cpp   15 Apr 2016 15:11:38 -  1.9
+++ patches/patch-src_preferences_cpp   12 Jun 2016 02:01:23 -
@@ -1,7 +1,7 @@
 $OpenBSD: patch-src_preferences_cpp,v 1.9 2016/04/15 15:11:38 gonzalo Exp $
 src/preferences.cpp.orig   Fri Mar 18 23:20:20 2016
-+++ src/preferences.cppWed Apr 13 00:24:15 2016
-@@ -150,7 +150,7 @@ void Preferences::reset() {
+--- src/preferences.cpp.orig   Sun Jun  5 17:52:14 2016
 src/preferences.cppSat Jun 11 18:36:58 2016
+@@ -154,7 +154,7 @@ void Preferences::reset() {
softvol_max = 110; // 110 = default value in mplayer
use_scaletempo = Detect;
use_hwac3 = false;
@@ -10,7 +10,7 @@ $OpenBSD: patch-src_preferences_cpp,v 1.
  
global_volume = true;
volume = 50;
-@@ -180,8 +180,8 @@ void Preferences::reset() {
+@@ -188,8 +188,8 @@ void Preferences::reset() {
 Drives (CD/DVD)
 *** */
  
@@ -21,7 +21,7 @@ $OpenBSD: patch-src_preferences_cpp,v 1.
  #ifdef BLURAY_SUPPORT
bluray_device = "";
  #endif
-@@ -298,13 +298,13 @@ void Preferences::reset() {
+@@ -311,13 +311,13 @@ void Preferences::reset() {
  mplayer_additional_audio_filters="";
  
  #ifdef LOG_MPLAYER


Re: devel/gdb and shared libs with no .text

2016-06-11 Thread Jeremie Courreges-Anglas
j...@wxcvbn.org (Jeremie Courreges-Anglas) writes:

> I bumped into this problem using gdb:
>
> (gdb) r
> Starting program: /usr/obj/pobj/surf-0.7/surf-0.7/surf www.google.fr
> symfile.c:973: internal-error: sect_index_text not initialized
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Quit this debugging session? (y or n) n
>
> The issue is that gdb assumes that it can find an entry point in
> a shared library, but libicudata.so doesn't have a .text section, only
> data.

To reproduce the issue, here a trivial testcase.  Just run ./prog under
egdb.



gdb-testcase.tgz
Description: Binary data


> There are other SECT_OFF_TEXT assumptions in dwarf2read.c that
> prevent egdb from being useful on a shared lib built with debug symbols.
> But the patch below should at least help running egdb against all
> programs that link against libicudata.so.  Tested against www/surf,
> www/vimb and sysutils/dwdiff.
>
> Comments / ok?
>
> Index: Makefile
> ===
> RCS file: /cvs/ports/devel/gdb/Makefile,v
> retrieving revision 1.41
> diff -u -p -r1.41 Makefile
> --- Makefile  7 May 2016 12:40:56 -   1.41
> +++ Makefile  12 Jun 2016 00:34:26 -
> @@ -4,7 +4,7 @@ COMMENT=  GNU debugger
>  CATEGORIES=  devel
>  
>  DISTNAME=gdb-7.11
> -REVISION=0
> +REVISION=1
>  
>  HOMEPAGE=https://www.gnu.org/software/gdb/
>  
> Index: patches/patch-gdb_symfile_c
> ===
> RCS file: patches/patch-gdb_symfile_c
> diff -N patches/patch-gdb_symfile_c
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ patches/patch-gdb_symfile_c   12 Jun 2016 00:34:26 -
> @@ -0,0 +1,20 @@
> +$OpenBSD$
> +
> +Don't crash if a shared lib doesn't have code at all (eg libicudata.so).
> +
> +--- gdb/symfile.c.orig   Wed Feb 10 04:19:39 2016
>  gdb/symfile.cSun Jun 12 02:33:28 2016
> +@@ -970,7 +970,12 @@ init_entry_point_info (struct objfile *objfile)
> + }
> + 
> +   if (!found)
> +-ei->the_bfd_section_index = SECT_OFF_TEXT (objfile);
> ++{
> ++  if (objfile->sect_index_text == -1)
> ++ei->entry_point_p = 0;
> ++  else
> ++ei->the_bfd_section_index = objfile->sect_index_text;
> ++}
> + }
> + }
> + 

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


devel/gdb and shared libs with no .text

2016-06-11 Thread Jeremie Courreges-Anglas

I bumped into this problem using gdb:

(gdb) r
Starting program: /usr/obj/pobj/surf-0.7/surf-0.7/surf www.google.fr
symfile.c:973: internal-error: sect_index_text not initialized
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) n

The issue is that gdb assumes that it can find an entry point in
a shared library, but libicudata.so doesn't have a .text section, only
data.

There are other SECT_OFF_TEXT assumptions in dwarf2read.c that
prevent egdb from being useful on a shared lib built with debug symbols.
But the patch below should at least help running egdb against all
programs that link against libicudata.so.  Tested against www/surf,
www/vimb and sysutils/dwdiff.

Comments / ok?

Index: Makefile
===
RCS file: /cvs/ports/devel/gdb/Makefile,v
retrieving revision 1.41
diff -u -p -r1.41 Makefile
--- Makefile7 May 2016 12:40:56 -   1.41
+++ Makefile12 Jun 2016 00:34:26 -
@@ -4,7 +4,7 @@ COMMENT=GNU debugger
 CATEGORIES=devel
 
 DISTNAME=  gdb-7.11
-REVISION=  0
+REVISION=  1
 
 HOMEPAGE=  https://www.gnu.org/software/gdb/
 
Index: patches/patch-gdb_symfile_c
===
RCS file: patches/patch-gdb_symfile_c
diff -N patches/patch-gdb_symfile_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-gdb_symfile_c 12 Jun 2016 00:34:26 -
@@ -0,0 +1,20 @@
+$OpenBSD$
+
+Don't crash if a shared lib doesn't have code at all (eg libicudata.so).
+
+--- gdb/symfile.c.orig Wed Feb 10 04:19:39 2016
 gdb/symfile.c  Sun Jun 12 02:33:28 2016
+@@ -970,7 +970,12 @@ init_entry_point_info (struct objfile *objfile)
+   }
+ 
+   if (!found)
+-  ei->the_bfd_section_index = SECT_OFF_TEXT (objfile);
++  {
++if (objfile->sect_index_text == -1)
++  ei->entry_point_p = 0;
++else
++  ei->the_bfd_section_index = objfile->sect_index_text;
++  }
+ }
+ }
+ 


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



Re: net/irssi-icb Segmentation fault

2016-06-11 Thread Marcus Glocker
On Sun, Jun 05, 2016 at 08:04:26AM +0200, Marcus Glocker wrote:

> ICB has been designed for a user always need to be joined to a group.
> With the irssi-icb module you can break this rule currently by running
> the '/window close' command and therefore crash irssi simply:
> 
>   /window close
>   /j 2
>   Segmentation fault (core dumped)
> 
> icb-channels.c:icb_change_channel() will try to compare the current
> group with the new group on the next join command, and in case of a
> previous '/window close' irssi has already destroyed our group and
> freed the reference to it.  Hence icb_change_channel() is comparing
> a group string against a freed memory address and segfaults.
> 
> Attached patch disables the '/window close' command for ICB
> connections, since this just shouldn't be supported.

This is an improved version of the last diff.  It still allows one to
close windows for private queries but just returns an error when you
try to close your ICB group window.

I will also try to push this one upstream.

Anyone brave around to ok this? :-)


Index: net/irssi-icb/Makefile
===
RCS file: /cvs/ports/net/irssi-icb/Makefile,v
retrieving revision 1.39
diff -u -p -u -p -r1.39 Makefile
--- net/irssi-icb/Makefile  16 Mar 2016 21:19:38 -  1.39
+++ net/irssi-icb/Makefile  11 Jun 2016 22:13:12 -
@@ -7,6 +7,7 @@ GH_PROJECT= irssi-icb
 GH_COMMIT= 8f7060835355d5f620a5d3b75a45336ab8efefd9
 
 DISTNAME=  irssi-icb-0.16pre20160307
+REVISION=  0
 
 CATEGORIES= net
 
Index: net/irssi-icb/patches/patch-src_core_icb-commands_c
===
RCS file: net/irssi-icb/patches/patch-src_core_icb-commands_c
diff -N net/irssi-icb/patches/patch-src_core_icb-commands_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ net/irssi-icb/patches/patch-src_core_icb-commands_c 11 Jun 2016 22:13:12 
-
@@ -0,0 +1,44 @@
+$OpenBSD$
+--- src/core/icb-commands.c.orig   Mon Mar  7 09:54:15 2016
 src/core/icb-commands.cSun Jun 12 00:06:13 2016
+@@ -19,6 +19,7 @@
+ */
+ 
+ #include "module.h"
++#include "../fe-common/core/fe-windows.h"
+ 
+ #include "icb-commands.h"
+ #include "icb-servers.h"
+@@ -101,6 +102,24 @@
+   }
+ }
+ 
++static void cmd_window(const char *data, ICB_SERVER_REC *server)
++{
++  CMD_ICB_SERVER(server);
++
++  /*
++   * Return an error in case the '/window close' command has been
++   * issued in your active ICB group window.  In ICB you always
++   * need to be joined to one group.
++   */
++  if (*data != '\0' && (*data == 'c' || *data == 'C')) {
++  if (!strcmp(window_get_active_name(active_win),
++  server->group->name)) {
++  cmd_return_error(CMDERR_ILLEGAL_PROTO);
++  signal_stop();
++  }
++  }
++}
++
+ void icb_commands_init(void)
+ {
+   char **cmd;
+@@ -116,6 +135,7 @@
+ command_bind_icb("kick", NULL, (SIGNAL_FUNC) cmd_boot);
+ command_bind_icb("g", NULL, (SIGNAL_FUNC) cmd_group);
+ command_bind_icb("beep", NULL, (SIGNAL_FUNC) cmd_beep);
++command_bind_icb("window", NULL, (SIGNAL_FUNC) cmd_window);
+ 
+   command_set_options("connect", "+icbnet");
+ }



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Stuart Henderson
CVSROOT:/cvs
Module name:ports
Changes by: st...@cvs.openbsd.org   2016/06/11 16:15:05

Modified files:
multimedia/get_iplayer: Makefile distinfo 
multimedia/get_iplayer/patches: patch-get_iplayer 

Log message:
update to newer get_iplayer snapshot



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Stuart Henderson
CVSROOT:/cvs
Module name:ports
Changes by: st...@cvs.openbsd.org   2016/06/11 16:12:13

Modified files:
multimedia/atomicparsley: Makefile distinfo 
Removed files:
multimedia/atomicparsley/files: Makefile 

Log message:
update to AtomicParsley-0.96



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Stuart Henderson
CVSROOT:/cvs
Module name:ports
Changes by: st...@cvs.openbsd.org   2016/06/11 16:11:53

Added files:
multimedia/atomicparsley/patches: patch-src_CDtoc_cpp 
Removed files:
multimedia/atomicparsley/patches: patch-AtomicParsley_cpp 

Log message:
update to AtomicParsley-0.96



lang/rust (was: CVS: cvs.openbsd.org: ports)

2016-06-11 Thread Matthias Kilian
Hi,

On Sat, Jun 11, 2016 at 09:51:29PM +0100, Stuart Henderson wrote:
> +DISTFILES +=   rustc-bootstrap-${MACHINE_ARCH}-${BV}.tar.gz:0
> 
> dpb fetching is run on all arches, including ones which are not
> listed in "ONLY_FOR_ARCHS", so whatever makes it into DISTFILES
> needs to be fetchable.
> 
> Diff below is probably the easiest way out for now, unless someone
> has a better idea.

lang/ghc has a similar mechanism, just with some more indirection and
iterating over architectures.

So i think your diff is ok.

> Index: Makefile
> ===
> RCS file: /cvs/ports/lang/rust/Makefile,v
> retrieving revision 1.24
> diff -u -p -r1.24 Makefile
> --- Makefile  9 Jun 2016 04:20:10 -   1.24
> +++ Makefile  11 Jun 2016 20:48:33 -
> @@ -38,7 +38,9 @@ MASTER_SITES0 = http://semarie.free.fr/
>  
>  DIST_SUBDIR =rust
>  DISTFILES =  ${DISTNAME}${EXTRACT_SUFX}
> +.if "${MACHINE_ARCH}" == "amd64"
>  DISTFILES += rustc-bootstrap-${MACHINE_ARCH}-${BV}.tar.gz:0
> +.endif
>  
>  SUPDISTFILES =   rustc-bootstrap-amd64-${BV}.tar.gz:0



Re: CVS: cvs.openbsd.org: ports

2016-06-11 Thread Stuart Henderson
On 2016/06/08 22:20, Sebastien Marie wrote:
> CVSROOT:  /cvs
> Module name:  ports
> Changes by:   sema...@cvs.openbsd.org 2016/06/08 22:20:10
> 
> Modified files:
>   lang/rust  : Makefile distinfo 
>   lang/rust/patches: patch-src_librustdoc_test_rs 
>  patch-src_libstd_sys_unix_os_rs 
> Added files:
>   lang/rust/patches: patch-mk_main_mk 
> 
> Log message:
> lang/rust: change bootstrap method
> 
> OK juanfra@
> 

+DISTFILES +=   rustc-bootstrap-${MACHINE_ARCH}-${BV}.tar.gz:0

dpb fetching is run on all arches, including ones which are not
listed in "ONLY_FOR_ARCHS", so whatever makes it into DISTFILES
needs to be fetchable.

Diff below is probably the easiest way out for now, unless someone
has a better idea.

Index: Makefile
===
RCS file: /cvs/ports/lang/rust/Makefile,v
retrieving revision 1.24
diff -u -p -r1.24 Makefile
--- Makefile9 Jun 2016 04:20:10 -   1.24
+++ Makefile11 Jun 2016 20:48:33 -
@@ -38,7 +38,9 @@ MASTER_SITES0 =   http://semarie.free.fr/
 
 DIST_SUBDIR =  rust
 DISTFILES =${DISTNAME}${EXTRACT_SUFX}
+.if "${MACHINE_ARCH}" == "amd64"
 DISTFILES +=   rustc-bootstrap-${MACHINE_ARCH}-${BV}.tar.gz:0
+.endif
 
 SUPDISTFILES = rustc-bootstrap-amd64-${BV}.tar.gz:0
 

Also noticed while there..

RUST_HASH !=echo -n ${V} | md5 | cut -c1-8

afaik we try to avoid "!=" in Makefiles unless it's unavoidable..



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Stuart Henderson
CVSROOT:/cvs
Module name:ports
Changes by: st...@cvs.openbsd.org   2016/06/11 14:37:50

Modified files:
graphics/GraphicsMagick: Tag: OPENBSD_5_9 Makefile distinfo 
graphics/GraphicsMagick/patches: Tag: OPENBSD_5_9 
 patch-configure 
graphics/GraphicsMagick/pkg: Tag: OPENBSD_5_9 PLIST 

Log message:
update GraphicsMagick in -stable to 1.3.24 (it has various vulnerability
fixes and hardening), Brad agrees.



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Stuart Henderson
CVSROOT:/cvs
Module name:ports
Changes by: st...@cvs.openbsd.org   2016/06/11 12:10:00

Modified files:
www/squid  : Makefile 

Log message:
Switch squid to ports gcc, it's already used on powerpc, fixes some problems
on arm (found by Steven Chamberlain), so it seems like it may be a safer
approach (and the next major version requires newer c++ anyway).  Based on
a diff from Steven Chamberlain.



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:ports
Changes by: j...@cvs.openbsd.org2016/06/11 11:06:07

Modified files:
audio/mumble   : Makefile 

Log message:
Use MODQT_LRELEASE instead of hardcoding lrelease4

ok dcoppa@



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:ports
Changes by: j...@cvs.openbsd.org2016/06/11 09:56:02

Modified files:
security/libgcrypt/patches: patch-cipher_crc-intel-pclmul_c 
patch-cipher_crc_c 

Log message:
Committed upstream.



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:ports
Changes by: j...@cvs.openbsd.org2016/06/11 09:50:40

Modified files:
x11/smplayer   : Makefile 
x11/smtube : Makefile 

Log message:
Use MODQT_QMAKE & MODQT_LRELEASE instead of harcoding version-specific paths

ok gonzalo@ (maintainer)



Re: UPDATE: pypy-5.3.0

2016-06-11 Thread Edd Barrett
On Fri, Jun 10, 2016 at 04:36:13PM +0100, Edd Barrett wrote:
> Comments? OK?

I'll take a "looks OK" on this, as I know in the past people have not
had enough RAM to build PyPy.

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk



Re: pledge par2cmdline

2016-06-11 Thread Carlin Bingham
On Sat, Jun 11, 2016 at 09:27:58AM +0200, Sebastien Marie wrote:
> 
> the promises seems correct to me, but patches needs some comments (based
> on your previous description for example).
> 
> it is OK semarie@ (with additionnal comments), but I would be glad to
> have maintener point of vue too.
> 
> thanks.

Updated patch with comments.


--
Carlin



Index: archivers/par2cmdline/Makefile
===
RCS file: /cvs/ports/archivers/par2cmdline/Makefile,v
retrieving revision 1.11
diff -u -p -u -r1.11 Makefile
--- archivers/par2cmdline/Makefile  5 Oct 2015 16:50:14 -   1.11
+++ archivers/par2cmdline/Makefile  11 Jun 2016 14:44:22 -
@@ -5,6 +5,7 @@ COMMENT =   command line implementation of
 V =0.6.14
 DISTNAME = par2cmdline-$V
 DISTFILES =${DISTNAME}{v$V}.tar.gz
+REVISION = 0
 
 CATEGORIES =   archivers
 
@@ -13,6 +14,7 @@ HOMEPAGE =https://github.com/BlackIkeEa
 # GPLv2+
 PERMIT_PACKAGE_CDROM = Yes
 
+# uses pledge()
 WANTLIB =  c m stdc++
 
 MAINTAINER =   Mikolaj Kucharski 
Index: archivers/par2cmdline/patches/patch-configure_ac
===
RCS file: archivers/par2cmdline/patches/patch-configure_ac
diff -N archivers/par2cmdline/patches/patch-configure_ac
--- /dev/null   1 Jan 1970 00:00:00 -
+++ archivers/par2cmdline/patches/patch-configure_ac11 Jun 2016 14:44:22 
-
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- configure.ac.orig  Wed Jun  8 23:30:46 2016
 configure.ac   Wed Jun  8 23:31:20 2016
+@@ -56,6 +56,7 @@ dnl Checks for library functions.
+ AC_FUNC_MEMCMP
+ AC_CHECK_FUNCS([stricmp] [strcasecmp])
+ AC_CHECK_FUNCS([strchr] [memcpy])
++AC_CHECK_FUNCS([pledge])
+ 
+ AC_CHECK_FUNCS([getopt] [getopt_long])
+ 
Index: archivers/par2cmdline/patches/patch-par1repairer_cpp
===
RCS file: archivers/par2cmdline/patches/patch-par1repairer_cpp
diff -N archivers/par2cmdline/patches/patch-par1repairer_cpp
--- /dev/null   1 Jan 1970 00:00:00 -
+++ archivers/par2cmdline/patches/patch-par1repairer_cpp11 Jun 2016 
14:44:22 -
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+pledge:
+'par2 repair' with par1 files - stdio rpath cpath
+once the target files have been opened for writing, wpath is no
+longer required, cpath must be kept to delete partial files in
+case of an error
+
+--- par1repairer.cpp.orig  Wed Jun  8 23:41:11 2016
 par1repairer.cpp   Wed Jun  8 23:42:01 2016
+@@ -157,6 +157,14 @@ Result Par1Repairer::Process(const CommandLine 
+ if (!CreateTargetFiles())
+   return eFileIOError;
+ 
++#ifdef HAVE_PLEDGE
++if (pledge("stdio rpath cpath", NULL) == -1)
++{
++  cerr << "pledge failed" << endl;
++  return eLogicError;
++}
++#endif
++
+ // Work out which data blocks are available, which need to be 
recreated, 
+ // and compute the appropriate Reed Solomon matrix.
+ if (!ComputeRSmatrix())
Index: archivers/par2cmdline/patches/patch-par2cmdline_cpp
===
RCS file: archivers/par2cmdline/patches/patch-par2cmdline_cpp
diff -N archivers/par2cmdline/patches/patch-par2cmdline_cpp
--- /dev/null   1 Jan 1970 00:00:00 -
+++ archivers/par2cmdline/patches/patch-par2cmdline_cpp 11 Jun 2016 14:44:22 
-
@@ -0,0 +1,57 @@
+$OpenBSD$
+
+pledge:
+'par2 create' - stdio rpath wpath cpath
+creates and writes par files
+
+'par2 repair' - stdio rpath wpath cpath
+renames and deletes partial/damaged files, writes repaired files
+
+'par2 verify' - stdio rpath cpath
+may delete par files, only if -p option was given, otherwise
+cpath is not required
+
+--- par2cmdline.cpp.orig   Wed Jun  8 23:31:42 2016
 par2cmdline.cppWed Jun  8 23:38:36 2016
+@@ -34,6 +34,14 @@ int main(int argc, char *argv[])
+   _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_ALLOC_MEM_DF | 
/*_CRTDBG_CHECK_CRT_DF | */_CRTDBG_DELAY_FREE_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
+ #endif
+ 
++#ifdef HAVE_PLEDGE
++  if (pledge("stdio rpath wpath cpath", NULL) == -1)
++  {
++cerr << "pledge failed" << endl;
++return eLogicError;
++  }
++#endif
++
+   // Parse the command line
+   CommandLine *commandline = new CommandLine;
+ 
+@@ -55,6 +63,26 @@ int main(int argc, char *argv[])
+ break;
+   case CommandLine::opVerify:
+ {
++#ifdef HAVE_PLEDGE
++  if (!commandline->GetPurgeFiles())
++  {
++if (pledge("stdio rpath", NULL) == -1)
++{
++  cerr << "pledge failed" << endl;
++  result = eLogicError;
++  break;
++}
++  }
++  else
++  {
++if (pledge("stdio rpath cpath", NULL) == -1)
++{
++  cerr << "pledge 

CVS: cvs.openbsd.org: ports

2016-06-11 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:ports
Changes by: j...@cvs.openbsd.org2016/06/11 08:10:06

Modified files:
devel/luapack  : Makefile 
devel/luapack/patches: patch-lpack_c 
devel/lua-cmsgpack: Makefile 
devel/lua-cmsgpack/patches: patch-lua_cmsgpack_c 

Log message:
Restore lua51 compat



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Gleydson Soares
CVSROOT:/cvs
Module name:ports
Changes by: gsoa...@cvs.openbsd.org 2016/06/11 06:27:56

Modified files:
devel/afl  : Makefile distinfo 
devel/afl/patches: patch-Makefile 

Log message:
update to 2.14b
OK jsg@



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Stuart Henderson
CVSROOT:/cvs
Module name:ports
Changes by: st...@cvs.openbsd.org   2016/06/11 05:59:31

Modified files:
graphics/ImageMagick: Tag: OPENBSD_5_9 Makefile distinfo 

Log message:
pull ImageMagick-6.9.4-8 across to -stable



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Stuart Henderson
CVSROOT:/cvs
Module name:ports
Changes by: st...@cvs.openbsd.org   2016/06/11 05:58:00

Modified files:
graphics/ImageMagick: Makefile distinfo 

Log message:
update to ImageMagick 6.9.4-8, from Brad (fixes include a heap overflow)



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Stuart Henderson
CVSROOT:/cvs
Module name:ports
Changes by: st...@cvs.openbsd.org   2016/06/11 05:48:17

Modified files:
graphics/GraphicsMagick: Makefile distinfo 
graphics/GraphicsMagick/patches: patch-configure 
graphics/GraphicsMagick/pkg: PLIST 

Log message:
update to GraphicsMagick-1.3.24, from Brad (maintainer)



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Antoine Jacoutot
CVSROOT:/cvs
Module name:ports
Changes by: ajacou...@cvs.openbsd.org   2016/06/11 04:06:23

Modified files:
print/cups-filters: Makefile distinfo 
print/cups-filters/patches: 
patch-filter_foomatic-rip_foomaticrip_c 

Log message:
Update to cups-filters-1.9.0.



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Marc Espie
CVSROOT:/cvs
Module name:ports
Changes by: es...@cvs.openbsd.org   2016/06/11 03:54:20

Modified files:
infrastructure/man/man8: bulk.8 

Log message:
thinko/typo



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Antoine Jacoutot
CVSROOT:/cvs
Module name:ports
Changes by: ajacou...@cvs.openbsd.org   2016/06/11 03:49:51

Modified files:
net/py-botocore: Makefile distinfo 

Log message:
Update to py-botocore-1.4.27.



CVS: cvs.openbsd.org: ports

2016-06-11 Thread Antoine Jacoutot
CVSROOT:/cvs
Module name:ports
Changes by: ajacou...@cvs.openbsd.org   2016/06/11 03:50:15

Modified files:
sysutils/awscli: Makefile distinfo 
sysutils/awscli/pkg: PLIST 

Log message:
Update to awscli-1.10.37.



Re: pledge par2cmdline

2016-06-11 Thread Sebastien Marie
On Thu, Jun 09, 2016 at 09:51:46AM +1200, Carlin Bingham wrote:
> This adds pledge to par2 and its utilities.
> 
> The 'create' command needs cpath and wpath to create and write the pars.
> 
> The 'repair' command needs cpath to rename damaged files and delete
> partial files, and wpath to write the recovered files (at least to
> begin with).
> 
> The 'verify' command may need cpath to delete files if -p was passed.
> 
> 'repair' opens all the files it is going to write before it begins
> performing the recovery so we can drop wpath at that point. It needs to
> hold on to cpath as it deletes any partially reconstructed files if it
> encounters an error.
> 
> The 'verify' command calls the same function as 'repair' but won't hit
> the codepath with the late pledge call.
> 
> All the tests pass, but that doesn't mean much...
> 
> 
> This patch does the pledge needed by create/repair up front and then
> pledges again if running verify, this way we can pledge before the
> command line parsing. And does a different pledge for verify depending
> on whether -p is set.
> 

the promises seems correct to me, but patches needs some comments (based
on your previous description for example).

it is OK semarie@ (with additionnal comments), but I would be glad to
have maintener point of vue too.

thanks.
-- 
Sebastien Marie