> 
>> From: David Coppa <[email protected]>
>> Date: Wed, Jan 21, 2015 at 9:22 AM
>> Subject: Re: UPDATE: x11/fluxbox 1.3.5 => 1.3.6
>> To: janis <[email protected]>
>> Cc: OpenBSD Ports <[email protected]>, Brian Callahan <[email protected]>
>>
>>
>> On Wed, Jan 21, 2015 at 9:13 AM, janis <[email protected]> wrote:
>>>> Please try the attached diff (from upstream git) and report back.
>>>>
>>> Thanks, David! Brian Callahan already asked me to test the same patch
>>> and I informed him that it works and solves my problem. Thank you very
>>> much. Please commit it.
>>
>> Excellent.
>>
>> Mathias Gumz (fluxbox' author) told me that since this bug affects us
>> and probably the other BSDs as well, he'll release fluxbox-1.3.7
>> soonish.
> 
> As anticipated by Mathias, here's Fluxbox 1.3.7.
> 
> Please test and comment.
> 
> Ciao!
> David
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/x11/fluxbox/Makefile,v
> retrieving revision 1.78
> diff -u -p -u -p -r1.78 Makefile
> --- Makefile  21 Jan 2015 08:52:04 -0000      1.78
> +++ Makefile  9 Feb 2015 10:32:52 -0000
> @@ -1,8 +1,7 @@
>  # $OpenBSD: Makefile,v 1.78 2015/01/21 08:52:04 dcoppa Exp $
>  
>  COMMENT =    window manager based on the original Blackbox code
> -DISTNAME =   fluxbox-1.3.6
> -REVISION =   0
> +DISTNAME =   fluxbox-1.3.7
>  CATEGORIES = x11
>  
>  HOMEPAGE =   http://fluxbox.org/
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/x11/fluxbox/distinfo,v
> retrieving revision 1.28
> diff -u -p -u -p -r1.28 distinfo
> --- distinfo  11 Jan 2015 15:59:19 -0000      1.28
> +++ distinfo  9 Feb 2015 10:32:52 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (fluxbox-1.3.6.tar.gz) = y1TrYtPbovKCpQ+90HfSaiyfVVwStb9mSxGS7OdmlSc=
> -SIZE (fluxbox-1.3.6.tar.gz) = 1312141
> +SHA256 (fluxbox-1.3.7.tar.gz) = yZ4rqgb/8eljQrIEFQWdEv8fopF63gFzx1svpXApW58=
> +SIZE (fluxbox-1.3.7.tar.gz) = 1267833
> Index: patches/patch-Makefile_in
> ===================================================================
> RCS file: /cvs/ports/x11/fluxbox/patches/patch-Makefile_in,v
> retrieving revision 1.3
> diff -u -p -u -p -r1.3 patch-Makefile_in
> --- patches/patch-Makefile_in 11 Jan 2015 15:59:19 -0000      1.3
> +++ patches/patch-Makefile_in 9 Feb 2015 10:32:52 -0000
> @@ -1,7 +1,7 @@
>  $OpenBSD: patch-Makefile_in,v 1.3 2015/01/11 15:59:19 bcallah Exp $
> ---- Makefile.in.orig Wed Jan  7 13:16:02 2015
> -+++ Makefile.in      Wed Jan  7 13:16:25 2015
> -@@ -5234,7 +5234,6 @@ src/defaults.hh:
> +--- Makefile.in.orig Sun Feb  8 04:44:52 2015
> ++++ Makefile.in      Mon Feb  9 04:26:49 2015
> +@@ -5275,7 +5275,6 @@ src/defaults.hh:
>   
>   src/defaults.cc: force
>       @( \
> @@ -9,7 +9,7 @@ $OpenBSD: patch-Makefile_in,v 1.3 2015/0
>               echo '// This file is generated from Makefile. Do not edit!'; \
>               echo '#include "defaults.hh"'; \
>               echo ''; \
> -@@ -5243,11 +5242,7 @@ src/defaults.cc: force
> +@@ -5284,11 +5283,7 @@ src/defaults.cc: force
>               echo '}'; \
>               echo ''; \
>               echo 'const char* gitrevision() {'; \
> Index: patches/patch-src_FbTk_TextButton_cc
> ===================================================================
> RCS file: patches/patch-src_FbTk_TextButton_cc
> diff -N patches/patch-src_FbTk_TextButton_cc
> --- patches/patch-src_FbTk_TextButton_cc      21 Jan 2015 08:52:04 -0000      
> 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,39 +0,0 @@
> -$OpenBSD: patch-src_FbTk_TextButton_cc,v 1.1 2015/01/21 08:52:04 dcoppa Exp $
> -
> -commit 7b8fd2d81ad80a73564fc9fbb779f47568f12652
> -Author: Mathias Gumz <[email protected]>
> -Date:   Sat Jan 10 22:44:37 2015 +0100
> -
> -Fix bug: integer underflow in startup phase
> -
> -When fluxbox comes up some of it's drawables span a 1x1 area. Subtracting 
> from
> -such small numbers bigger ones always lead to massive problems when 'unsigned
> -int' are involved:
> -
> -'button_width' is an unsigned int of '1' (this might be caused by another
> -issue or on purpose, anyway), subtracting -10 or any other number should
> -result in something < 0 when in reality an integer underflow happen: 
> max_width
> -is now MAX_INT-something big. This makes fluxbox crash under certain
> -circumstances.
> -
> ---- src/FbTk/TextButton.cc.orig      Mon Jun 17 06:38:14 2013
> -+++ src/FbTk/TextButton.cc   Wed Jan 21 01:54:20 2015
> -@@ -143,11 +143,17 @@ void TextButton::drawText(int x_offset, int y_offset, 
> -     unsigned int textlen = visual.size();
> -     unsigned int button_width = width();
> -     unsigned int button_height = height();
> -+    const int max_width = static_cast<int>(button_width) - x_offset -
> -+        m_left_padding - m_right_padding;
> - 
> -+    if (max_width <= bevel()) {
> -+        return;
> -+    }
> -+
> -     translateSize(m_orientation, button_width, button_height);
> - 
> -     // horizontal alignment, cut off text if needed
> --    int align_x = FbTk::doAlignment(button_width - x_offset - 
> m_left_padding - m_right_padding,
> -+    int align_x = FbTk::doAlignment(max_width,
> -                                     bevel(), justify(), font(),
> -                                     visual.data(), visual.size(),
> -                                     textlen); // return new text len
> Index: patches/patch-util_fluxbox-generate_menu_in
> ===================================================================
> RCS file: /cvs/ports/x11/fluxbox/patches/patch-util_fluxbox-generate_menu_in,v
> retrieving revision 1.10
> diff -u -p -u -p -r1.10 patch-util_fluxbox-generate_menu_in
> --- patches/patch-util_fluxbox-generate_menu_in       16 Apr 2013 15:27:03 
> -0000      1.10
> +++ patches/patch-util_fluxbox-generate_menu_in       9 Feb 2015 10:32:52 
> -0000
> @@ -2,20 +2,14 @@ $OpenBSD: patch-util_fluxbox-generate_me
>  
>  Adapt to our non-GNU grep
>  
> -Remove bashisms
> -(upstream git commit dcdfdfd56b5dbb6453062ad60876647b11433f18)
> -
> -Default browswer variable can be empty
> -(upstream git commit be2c52a146a013ebbfb708073317c337986371ff)
> -
> ---- util/fluxbox-generate_menu.in.orig       Sun Apr  7 18:18:38 2013
> -+++ util/fluxbox-generate_menu.in    Sun Apr  7 18:19:53 2013
> +--- util/fluxbox-generate_menu.in.orig       Sun Feb  8 04:44:45 2015
> ++++ util/fluxbox-generate_menu.in    Mon Feb  9 04:26:49 2015
>  @@ -330,7 +330,7 @@ searchForIcon(){
>       # echo "^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>" 
>       if [ -f "$entry_icon" ]; then
>       # if icon exists and entry does not already exists, add it
> --        if ! grep -q -m 1 
> "^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>" $ICONMAPPING 2> 
> /dev/null; then
> -+        if ! grep -q "^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>" 
> $ICONMAPPING 2> /dev/null; then
> -             printf "\"${entry_exec}\" \t <${entry_icon}>\n" >> $ICONMAPPING
> +-        if ! grep -q -m 1 
> "^.${execname}.[[:space:]]*<.*/${icon_base}\....>" $ICONMAPPING 2> /dev/null; 
> then
> ++        if ! grep -q "^.${execname}.[[:space:]]*<.*/${icon_base}\....>" 
> $ICONMAPPING 2> /dev/null; then
> +             printf "\"${execname}\" \t <${entry_icon}>\n" >> $ICONMAPPING
>           else 
> -             : echo "#    mapping already exists for ${entry_exec}" >> 
> $ICONMAPPING
> +             : echo "#    mapping already exists for ${execname}" >> 
> $ICONMAPPING
> 
Thank you. I'm sorry, I'm late to test: it's already commited. I report
that it works good.

Reply via email to