Bug#749659: audacity: Systematic check for Printf/Format mismatches

2014-10-10 Thread Martin Steghöfer

El 09/10/14 a les 01:11, Benjamin Drung ha escrit:

Your patch needs to be forward ported,


We already have a patch that fixes 2.0.6 for wxWidgets 3.0. Back when 
you asked me to forward-port my patch to the current svn head (in order 
to get the changes into upstream), I did. Apart from the porting it 
includes specific fixes for svn head. Fortunately, 2.0.6 isn't that 
different from what was svn head back then, so we have a patch for 
2.0.6, find it attached. To keep it small, I've removed everything that 
isn't relevant here (fixes of dead code or code that otherwise isn't 
relevant on Debian), but we will have that available for upstream. Be 
aware that this patch is by far not as well tested as my patch for 2.0.5!



[...] backport the preliminary upstream changes for wxWidgets 3.0.1 from r13403 
[...]
[...]
Upstream want to get wx3.0 support in for 2.0.7 and is actively working on 
getting it in the svn


Actively working, yes, unfortunately. Why? Your messages sounded like 
upstream was aware of this being resolved already, especially with you 
being part of upstream (AFAIK). Not only was this a major duplication of 
effort, but now it also requires additional porting - which is mainly 
manual work here, given that different people have been working on 
similar issues and touching the same code, but in different ways. What 
we're doing here is really inefficient.




So you could provide the missing bits and we will get
upstream to test your proposed changes (when I commit them to the
upstream repository).


So you're proposing to do the upstream integration first? I'd do it the 
other way round, given that for 2.0.6 we already have a patch and that 
the upstream integration has just gotten more complicated. We've already 
lost a lot of time. And before we just upload stuff to upstream, I'd 
also like to discuss the upstream integration with the person that has 
been working on wx3.0 there, especially as he has been fixing some code 
that I consider obsolete with wx3.0 and that I'd like to fix some things 
in a different way.


Cheers,
Martin

Description: Compile audacity against wxWidgets 3.0
 Solved compilation issues:
 (1.) Allow wxWidgets 3.0 in various configure scripts.
 (2.) The file dialog was derived from an internal wx class that
 disappeared in wx3.0 (discussed in further detail below).
 (3.) In several places the types in interfaces changed between
 wxChar* and wxString. I've tried to modify the code so it works with
 both interfaces (thanks to implicit conversion; may look a bit weird
 in some places).
 (4.) Calls to wxTheApp-SuspendIdleCallback() are no longer
 supported. They were part of a workaround for a clipboard problem,
 which fortunately doesn't seem to be there any longer in wx3.0, so I
 deactivated it for wx3.0.
 (5.) AddPendingEvent() and ProcessEvent() now have the visibility
 protected in wxWindow. It has always been a bad idea to call them
 directly on a wxWindow object, but now it's explicitly forbidden.
 Instead, those functions should be called on the object returned by
 GetEventHandler().
 (6.) The class wxStandardPaths is now a singleton and has to be
 treated as such (no more explicit constructor calls).
 (7.) wxLogWarning is a macro now, so the :: prefix doesn't work
 on it anymore.
 (8.) Several int types (which were actually used as enums) are now
 real enum types (e.g. wxRasterOperationMode, wxMouseButton) and have
 to be used as such.
 (9.) Apart from the FD constants (which have been fixed in Olly's
 patch already) there are some other constants which have received a
 prefix (e.g. wx* - wxFONTFAMILY_*, wx* - wxFONTSTYLE_*, wx* -
 wxFONTWEIGHT_*).
 (10.) Signature changes in constructors of wxFlexGridSizer and wxIcon
 and wxSizeEvent
 (11.) Missing includes (missing header files were probably included
 indirectly in wx2.8 by chance)
 (12.) When deriving from the abstract class wxGridTableBase,
 different methods have to be implemented with wx3.0 (EndEdit with new
 signature and ApplyEdit) than before with wx2.8 (only EndEdit with
 old signature). Now both versions are implemented in parallel in the
 classes TimeEditor and ChoiceEditor (one version essentially being a
 wrapper of the other one).
 Solved runtime issues:
 (1.) Segmentation fault: The LadspaEffectDialog receives EVT_TEXT
 events before it's properly initialized. To prevent this, a
 workaround was already in place, but was only active on Windows. It
 looks like this happens now on more platforms (including GTK). As the
 workaround doesn't do any harm, even if activated unnecessarily, I've
 simply activated it for all environments.
 (2.) GTK critical warning IA__gtk_range_set_range: assertion
 'min  max' failed because of negative numbers as result of window
 size checking. Added a sanity check that straightens up the numbers
 in edge cases.
 (3.) GTK critical warning IA__gdk_window_get_origin: assertion
 'GDK_IS_WINDOW (window)' failed: Received events of type wxSizeEvent
 on the main project 

Bug#749659: audacity: Systematic check for Printf/Format mismatches

2014-10-10 Thread Martin Steghöfer

Hi Benjamin!


Martin Steghöfer wrote:
And before we just upload stuff to upstream, I'd also like to discuss 
the upstream integration with the person that has been working on 
wx3.0 there


Looking at the recent upstream activity, I've changed my mind about 
this: We should get this into upstream as soon as possible! Otherwise 
porting the fixes is just going to be even more difficult. Now that 
someone has made an initial commit about wxWidgets 3.0, people upgrade 
and try to fix things - but not always in the proper way.


Today's upstream commits alone justify being worried: 3 commits arrived 
upstream trying to fix wx3.0-related stuff: The first one removed 
functionality (!) in order to avoid the problems. The second one 
replaced one inadequate function call by another inadequate function 
call - which avoids the crash for the moment, but is equally wrong and 
may still crash with other compiler flags. The third one silenced a 
warning instead of fixing the underlying problem - which causes an 
invalid memory access and therefore a possible crash. With all those 
fixes in place, porting the patch won't only get harder (because of 
conflicts), but the diff will also become more cryptic (it's easier to 
understand a simple fix than to understand the fix of an existing fix).


So today I took the time to port my fixes (again) to the current svn 
head. I've got them sitting in my local git, divided in many commits, 
for better documentation (the Debian patch is huge and no one can tell 
any more, which change corresponds to which fix). I can send them all to 
you and you import them manually into svn. Or I can commit them directly 
to the svn - I've got git-svn set-up, I'd just need access to the 
repository. I can also send the patches to you first, for inspection 
(but it's mainly what you've seen here in the debdiff, just divided, 
ported and with non-Debian-relevant changes).


For the Debian package I still recommend the patch I've sent earlier 
today. Why bother with extra porting work and combining several patches 
(including additional porting work)?


Cheers,
Martin

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#749659: audacity: Systematic check for Printf/Format mismatches

2014-10-09 Thread Olly Betts
On Thu, Oct 09, 2014 at 01:11:56AM +0200, Benjamin Drung wrote:
 PS: I was reluctant to upload the debdiff because I liked to see the
 patch for 2.0.6 (which has autoreconf fixed). Upstream want to get wx3.0
 support in for 2.0.7 and is actively working on getting it in the svn
 repository. So you could provide the missing bits and we will get
 upstream to test your proposed changes (when I commit them to the
 upstream repository).

I'm assuming here that by you you mean Martin (just to make sure we
avoid misunderstandings, as I was the direct recipient of your message).

Cheers,
Olly

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#749659: audacity: Systematic check for Printf/Format mismatches

2014-10-08 Thread Benjamin Drung
Hi all,

sorry for reacting too lazy.

Am Montag, den 06.10.2014, 02:33 +0100 schrieb Olly Betts:
 On Thu, Oct 02, 2014 at 10:42:07PM +0200, Martin Steghöfer wrote:
  Find attached the (hopefully) final debdiff from my side. It's big,
  but relatively easy to review because most of the changes can be
  interpreted independently.
 
 Thanks for all your work on this, Martin.
 
 Is someone looking at this with an eye to getting an updated version of
 audacity actually uploaded?
 
 This is now the last package waiting for an upload in the wxwidgets3.0
 transition, and the latest upload date to make it to testing before the
 release freeze is now less than 3 weeks away (the freeze is November
 5th, but an upload would need to age for 10 days).
 
 I can NMU with this patch if need be, but if the package maintainers are
 already on the case there's no point me duplicating their efforts.

I finally found time to import the upstream release 2.0.6, backport the
preliminary upstream changes for wxWidgets 3.0.1 from r13403, and pushed
everything to our git repository. Your patch needs to be forward ported,
which I will try to do when I have some spare time (knowing that it
should be done ASAP due to the nearing freeze). I would be happy to get
help forward porting the patch.

PS: I was reluctant to upload the debdiff because I liked to see the
patch for 2.0.6 (which has autoreconf fixed). Upstream want to get wx3.0
support in for 2.0.7 and is actively working on getting it in the svn
repository. So you could provide the missing bits and we will get
upstream to test your proposed changes (when I commit them to the
upstream repository).

-- 
Benjamin Drung
Debian  Ubuntu Developer

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#749659: audacity: Systematic check for Printf/Format mismatches

2014-10-05 Thread Olly Betts
On Thu, Oct 02, 2014 at 10:42:07PM +0200, Martin Steghöfer wrote:
 Find attached the (hopefully) final debdiff from my side. It's big,
 but relatively easy to review because most of the changes can be
 interpreted independently.

Thanks for all your work on this, Martin.

Is someone looking at this with an eye to getting an updated version of
audacity actually uploaded?

This is now the last package waiting for an upload in the wxwidgets3.0
transition, and the latest upload date to make it to testing before the
release freeze is now less than 3 weeks away (the freeze is November
5th, but an upload would need to age for 10 days).

I can NMU with this patch if need be, but if the package maintainers are
already on the case there's no point me duplicating their efforts.

Cheers,
Olly

___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#749659: audacity: Systematic check for Printf/Format mismatches

2014-10-02 Thread Martin Steghöfer

Martin Steghöfer wrote:
 Please find attached a new debdiff including the mentioned changes.

Anyone still following this or have I put everyone to sleep with my 
lengthy patches? ;-)


Anyway, a last little update... In order to make things more solid, I 
did what I proposed in my first post:



The functions wxString::Format and wxString::Printf
have become stricter about parameter types that don't
match (format string vs. function parameters). So the
bugs (that were already present in audacity before)
become visible in wx3.0 as error messages. I've fixed
all the ones that popped up during my testing, but
there might be more of them that I just didn't happen
to hit. At some point, all the calls to
wxString::Format and wxString::Printf have to be
checked systematically.



I've done the systematic check. I manually inspected all 990 occurrences 
of Printf, wxPrintf, PrintfV, Format, FormatV, wxLogDebug and wxLogError 
and came up with some that still needed fixing. Most of them had not 
been hit during my first testing because they are used within error 
messages and are therefore harder to trigger. Whenever the _ 
(underscore) macro was involved, I preferred casting the argument over 
modifying the specifier, in order to avoid screwing up the translations. 
Besides, to keep the patch size acceptable, I also didn't patch 
occurrences in code that's not used in Debian (unused debug code, 
unreachable code, #if 0, etc.). I fixed them in my git branch for 
upstream, however.


Find attached the (hopefully) final debdiff from my side. It's big, but 
relatively easy to review because most of the changes can be interpreted 
independently.


Cheers,
Martin

diff -Nru audacity-2.0.5/debian/changelog audacity-2.0.5/debian/changelog
--- audacity-2.0.5/debian/changelog 2014-05-31 22:04:20.0 +0200
+++ audacity-2.0.5/debian/changelog 2014-10-02 11:29:05.0 +0200
@@ -1,3 +1,16 @@
+audacity (2.0.5-3) UNRELEASED; urgency=medium
+
+  * Compile audacity against wxWidgets 3.0: (Closes: #749659)
+- debian/patches/wx30.patch: Patch source for compatibility.
+- debian/control: Upgrade build dependency to wxWidgets dev package.
+  * Fix dh-autoreconf by backporting patches from upstream:
+- debian/patches/autoreconf-subdirectories.patch: r12761
+- debian/patches/autoreconf-subdirectories-lib-widget-extra.patch: r12901
+- debian/patches/autoreconf.patch: Fix problems in the autotools
+  configuration files of subdirectories.
+
+ -- Martin Steghöfer mar...@steghoefer.eu  Thu, 2 Oct 2014 19:26:23 +0200
+
 audacity (2.0.5-2) unstable; urgency=medium
 
   * Add support for recent FFmpeg/libav versions. Thanks to Michael Niedermayer
diff -Nru audacity-2.0.5/debian/control audacity-2.0.5/debian/control
--- audacity-2.0.5/debian/control   2014-05-31 20:26:20.0 +0200
+++ audacity-2.0.5/debian/control   2014-10-02 11:29:05.0 +0200
@@ -30,7 +30,7 @@
libsoxr-dev (= 0.0.5),
libtwolame-dev (= 0.3.9),
libvorbis-dev (= 1.0.0-3),
-   libwxgtk2.8-dev,
+   libwxgtk3.0-dev,
portaudio19-dev (= 19+svn20101113-3~),
vamp-plugin-sdk (= 2.0)
 Build-Conflicts: libwxbase2.6-dev, wx2.6-headers
diff -Nru audacity-2.0.5/debian/patches/autoreconf.patch 
audacity-2.0.5/debian/patches/autoreconf.patch
--- audacity-2.0.5/debian/patches/autoreconf.patch  1970-01-01 
01:00:00.0 +0100
+++ audacity-2.0.5/debian/patches/autoreconf.patch  2014-10-02 
11:29:05.0 +0200
@@ -0,0 +1,45 @@
+Description: Fix autotools errors and warnings
+ The backporting of fixes to enable autoreconf in all subdirectories
+ uncovered (already existing, but untriggered) problems with autotools
+ project files:
+ * Unexpected parameter enabled was passed to AM_MAINTAINER_MODE
+   (instead of the correct parameter enable).
+ * After dh_autoreconf_clean, the subsequent execution of
+   autoreconf failed to regenerate ltmain.sh, if AUX_DIR
+   is not set.
+ * Lots of warnings about source files in subdirectories without
+   the automake option subdir-objects.
+Author: Martin Steghöfer mar...@steghoefer.eu
+Bug-Debian: https://bugs.debian.org/749659
+
+--- a/lib-src/sbsms/configure.in
 b/lib-src/sbsms/configure.in
+@@ -5,6 +5,8 @@
+ dnl libtoolize --copy --force
+ AC_CONFIG_MACRO_DIR([m4])
+ 
++AC_CONFIG_AUX_DIR(autotools)
++
+ 
#
+ # Library's official release version:
+ 
+@@ -120,7 +122,7 @@
+ 
+ AM_INIT_AUTOMAKE([no-dependencies])
+ 
+-AM_MAINTAINER_MODE([enabled])
++AM_MAINTAINER_MODE([enable])
+ 
+ AC_CONFIG_FILES([Makefile src/Makefile libsbsms.spec sbsms.pc])
+ 
+--- a/lib-src/libnyquist/configure.ac
 b/lib-src/libnyquist/configure.ac
+@@ -25,7 +25,7 @@
+ # which also contains a subdir containing macros
+ AC_CONFIG_MACRO_DIR([autotools/m4])
+ dnl set up automake
+-AM_INIT_AUTOMAKE([-Wall foreign])