Bug 271094 - audio/audacity: Upgrade to 3.3.1
Summary: audio/audacity: Upgrade to 3.3.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Matthew Seaman
URL: https://github.com/audacity/audacity/...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-27 08:53 UTC by Jack
Modified: 2023-05-07 02:23 UTC (History)
3 users (show)

See Also:


Attachments
Patch to upgrade audacity to 3.3.0 (105.30 KB, patch)
2023-04-27 08:53 UTC, Jack
xxjack12xx: maintainer-approval+
Details | Diff
Patch to upgrade audacity to 3.3.0 (103.89 KB, patch)
2023-04-28 00:27 UTC, Jack
xxjack12xx: maintainer-approval+
Details | Diff
Patch to upgrade audacity to 3.3.0 (105.79 KB, patch)
2023-04-29 00:38 UTC, Jack
xxjack12xx: maintainer-approval+
Details | Diff
Patch to upgrade audacity to 3.3.1 (106.22 KB, patch)
2023-04-30 06:48 UTC, Jack
xxjack12xx: maintainer-approval+
Details | Diff
Patch to upgrade audacity to 3.3.1 (106.00 KB, patch)
2023-04-30 06:53 UTC, Jack
xxjack12xx: maintainer-approval+
Details | Diff
Patch to upgrade audacity to 3.3.1 (106.00 KB, patch)
2023-04-30 09:58 UTC, Jack
xxjack12xx: maintainer-approval+
Details | Diff
Patch to upgrade audacity to 3.3.1 (106.45 KB, patch)
2023-04-30 09:59 UTC, Jack
no flags Details | Diff
Patch to upgrade audacity to 3.3.1 (106.00 KB, patch)
2023-04-30 10:03 UTC, Jack
xxjack12xx: maintainer-approval+
Details | Diff
Patch to upgrade audacity to 3.3.1 (104.50 KB, patch)
2023-04-30 10:08 UTC, Jack
xxjack12xx: maintainer-approval+
Details | Diff
Patch to upgrade audacity to 3.3.1 (105.14 KB, patch)
2023-04-30 10:19 UTC, Jack
xxjack12xx: maintainer-approval+
Details | Diff
patch-src_ListNavigationPanel.h (682 bytes, patch)
2023-04-30 10:31 UTC, Jack
xxjack12xx: maintainer-approval+
Details | Diff
Patch to upgrade to audacity-3.3.1 (106.14 KB, patch)
2023-05-01 02:16 UTC, Jack
xxjack12xx: maintainer-approval+
Details | Diff
Upgrade audacity to 3.3.1 (105.35 KB, patch)
2023-05-01 02:20 UTC, Jack
xxjack12xx: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jack 2023-04-27 08:53:31 UTC
Created attachment 241786 [details]
Patch to upgrade audacity to 3.3.0

Changes

    Some of the built-in effects are now realtime capable (Bass & Treble, Distortion, Phaser, Reverb and Wahwah).
    #4352 Added a new effect: Shelf Filter.
    Added an initial (beta) version of Beats and Measures.
    #4414 Reworked the bottom toolbar dock:
        Project Sample Rate is now found in Audio Setup -> Audio Settings (formerly known as Project Rate).
        The Snapping Toolbar (formerly known as Snap-To) is now independent of the Selection Toolbar.
        Added a new Time Signature Toolbar (beta). It is hidden by default.
    #4212 Improved Zooming behavior slightly (more to come in the future).
    #4393 Added a new ruler, Linear (dB). This ruler goes from 0 dBFS to -∞ dBFS and better reflects the volume as shown in the recording/playback meters.
    #3820 When copying clips between projects, you now can choose between whether to copy smart clips or just the visible portion.
    #4133 Added a delete button to the Cut/Copy/Paste toolbar.

Bugfixes

    #1584 Audacity no longer dithers tracks unnecessarily.
    #2427 Linux playback now handles output latency better (less stutters).
    #3796 The EQ effect no longer resets clip names.
    #3801 Audacity no longer crashes when trying to load projects with plugins that since have been deleted.
    #4417 Resampling a track no longer trims it.

Libraries

    FFmpeg 6 (avformat 60) is now supported.
    Moved from Breakpad to Crashpad.
    Extracted various libraries from within Audacity.
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2023-04-27 21:14:00 UTC
Please set "maintainer-approval" on your patches if you wish for them to be committed.
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2023-04-27 21:28:39 UTC
I see that your updated port no longer installs the manual despite the option still being present.  Is this intentional?
Comment 3 Jack 2023-04-27 21:34:30 UTC
(In reply to Robert Clausecker from comment #2)
I thought it was odd that the man stuff vanished from the make makeplist despite having man selected. Will look into that.
Comment 4 Jack 2023-04-27 21:37:36 UTC
I checked the gui and it appears the manual still gets installed and option is still valid. Clicking on the manual in audacity results in opening a web manual now.
Comment 5 Robert Clausecker freebsd_committer freebsd_triage 2023-04-27 21:41:35 UTC
If the manual still gets installed it needs to show up in the plist.

If you are 100% sure this patch is correct I can commit it.  But please check carefully!
Comment 6 Jack 2023-04-27 21:43:05 UTC
(In reply to Robert Clausecker from comment #5)
I'll do another clean build and confirm
Comment 7 Jack 2023-04-28 00:27:11 UTC
Created attachment 241802 [details]
Patch to upgrade audacity to 3.3.0

Updated with DOCS fixed and verified man plist is correct.

pkg-plist:share/man/man1/audacity.1.gz
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2023-04-28 08:53:49 UTC
If the port no longer installs any manual files, is the MANUAL option still needed?
Comment 9 Jack 2023-04-28 19:41:51 UTC
(In reply to Robert Clausecker from comment #8)
It is still a configure option so still valid.
Comment 10 Robert Clausecker freebsd_committer freebsd_triage 2023-04-28 22:50:46 UTC
Your patch fails in the patch phase:

===>  Patching for audacity-3.3.0
===>  Applying FreeBSD patches for audacity-3.3.0 from /usr/home/main.ports/audio/audacity/files
No such line 130 in input file, ignoring
1 out of 1 hunks failed--saving rejects to cmake-proxies/CMakeLists.txt.rej
===>  FAILED Applying FreeBSD patch-cmake-proxies_CMakeLists.txt
===> FAILED to apply cleanly FreeBSD patch(es)  patch-cmake-proxies_CMakeLists.txt
*** Error code 1

Stop.
make[1]: stopped in /usr/home/main.ports/audio/audacity


Please check and resubmit.
Comment 11 Jack 2023-04-29 00:27:12 UTC
(In reply to Robert Clausecker from comment #10)
It must be those dos line endings again... Still can't figure out why local patch works but when I upload it, it develops bad line endings. I'll try dos2unix on it and upload again.
Comment 12 Jack 2023-04-29 00:30:51 UTC
(In reply to Robert Clausecker from comment #10)
Are you sure the patch fails?

root@vbox:/usr/ports/audio/audacity # fetch -o audacity.txt 'https://bz-attachments.freebsd.org/attachment.cgi?id=241802'
fetch: https://bz-attachments.freebsd.org/attachment.cgi?id=241802: size of remote file is not known
audacity.txt                                           103 kB  306 kBps    00s
root@vbox:/usr/ports/audio/audacity # patch -C < audacity.txt
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -u audacity/Makefile audacity-new/Makefile
|--- audacity/Makefile  2023-04-27 12:42:37.359837000 -0700
|+++ audacity-new/Makefile      2023-04-27 17:23:57.667624000 -0700
--------------------------
Patching file Makefile using Plan A...
Hunk #1 succeeded at 1.
Hunk #2 succeeded at 14.
Hunk #3 succeeded at 35.
Hunk #4 succeeded at 50.
Hunk #5 succeeded at 165.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -u audacity/distinfo audacity-new/distinfo
|--- audacity/distinfo  2023-04-27 01:49:54.457430000 -0700
|+++ audacity-new/distinfo      2023-04-26 16:09:47.539853000 -0700
--------------------------
Patching file distinfo using Plan A...
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Common subdirectories: audacity/files and audacity-new/files
|diff -u audacity/pkg-plist audacity-new/pkg-plist
|--- audacity/pkg-plist 2023-03-02 12:41:15.358205000 -0800
|+++ audacity-new/pkg-plist     2023-04-27 17:23:38.339126000 -0700
--------------------------
Patching file pkg-plist using Plan A...
Hunk #1 succeeded at 1.
Hunk #2 succeeded at 13.
Hunk #3 succeeded at 89.
Hunk #4 succeeded at 119.
done
root@vbox:/usr/ports/audio/audacity #
Comment 13 Jack 2023-04-29 00:33:07 UTC
Nevermind, I see the problem, the patch was created with diff -u instead of diff -urN
Comment 14 Jack 2023-04-29 00:38:40 UTC
Created attachment 241843 [details]
Patch to upgrade audacity to 3.3.0

Previous patch was missing -N, new patch created with diff -urN
Comment 15 Matthew Seaman freebsd_committer freebsd_triage 2023-04-29 08:28:44 UTC
Verb. Sap. The best and easiest way to create patches is to use `git diff`
Comment 16 Matthew Seaman freebsd_committer freebsd_triage 2023-04-29 08:41:03 UTC
Your patch has removed all of the optional %%MANUAL%% lines from pkg-plist.  That doesn't look correct to me.  Enabling the MANUAL option now will not actually install any of the manual.
Comment 17 Matthew Seaman freebsd_committer freebsd_triage 2023-04-29 08:58:52 UTC
Looks like upstream released 3.3.1 with some important bugfixes yesterday.  Do you want me to hold off updating the port to 3.3.0 so you can update your patches to that version?

https://github.com/audacity/audacity/blob/Audacity-3.3.1/CHANGELOG.txt
Comment 18 Robert Clausecker freebsd_committer freebsd_triage 2023-04-29 12:15:44 UTC
(In reply to Jack from comment #12)

I have applied your patch with "git apply."  Try to use git for the ports collection and submit patches with "git format-patch."  Makes things a whole lot easier!
Comment 19 Jack 2023-04-29 12:23:11 UTC
I'll try updating the patch with 3.3.1 with git diff
Comment 20 Jack 2023-04-30 06:48:28 UTC
Created attachment 241871 [details]
Patch to upgrade audacity to 3.3.1
Comment 21 Jack 2023-04-30 06:53:37 UTC
Created attachment 241872 [details]
Patch to upgrade audacity to 3.3.1

git diff was missing files I deleted and added. Back to diff -urN created until I can figure out how to git diff with my added/deleted files.
Comment 22 Jack 2023-04-30 09:58:10 UTC
Created attachment 241875 [details]
Patch to upgrade audacity to 3.3.1

The ^Ms are back, trying again.
Comment 23 Jack 2023-04-30 09:59:57 UTC
Created attachment 241876 [details]
Patch to upgrade audacity to 3.3.1

The new upload still has ^M's trying copy/paste the patch.
Comment 24 Jack 2023-04-30 10:03:15 UTC
Created attachment 241877 [details]
Patch to upgrade audacity to 3.3.1

Uploading using a windows laptop is so frustrating, keeps adding ^Ms to my patches re-uploading hopefully without the ^Ms
Comment 25 Jack 2023-04-30 10:05:08 UTC
Sorry for all the patch re-uploads, it seems every time I copy the patch from my FreeBSD machine to my windows laptop, it keeps messing up the patch. I'm going to try again using the FreeBSD machine to upload the patch.
Comment 26 Jack 2023-04-30 10:08:41 UTC
Created attachment 241878 [details]
Patch to upgrade audacity to 3.3.1

Hopefully this one doesn't contain ^Ms
Comment 27 Jack 2023-04-30 10:11:56 UTC
Finally got the patch uploaded properly with the FreeBSD machine as the source of the patch.
Comment 28 Matthew Seaman freebsd_committer freebsd_triage 2023-04-30 10:17:18 UTC
(In reply to Jack from comment #21)

When adding or removing files, a good trick is to `git rm` the files that need to be removed, `git add` any new files, and any changed files -- ie. as if you were going to commit all your changes.  Then do `git diff --staged`

Or, indeed, you could just create a new branch, commit your changes on it, and then do `git diff main`
Comment 29 Jack 2023-04-30 10:19:13 UTC
Created attachment 241879 [details]
Patch to upgrade audacity to 3.3.1

Previously patch was created with an unclean git checkout.
Comment 30 Jack 2023-04-30 10:21:13 UTC
(In reply to Matthew Seaman from comment #28)
I did the git add and git rm but looks like git diff --staged was what I was needing to do instead of git diff. I'm new to git, still used to using svn/cvs. Thanks for the tip.
Comment 31 Jack 2023-04-30 10:31:40 UTC
Created attachment 241880 [details]
patch-src_ListNavigationPanel.h

audacity/files/patch-src_ListNavigationPanel.h is missing from the main patch. Adding as a 2nd patch.
Comment 32 Jack 2023-04-30 10:34:01 UTC
Comment on attachment 241880 [details]
patch-src_ListNavigationPanel.h

diff -urN audacity/files/patch-src_ListNavigationPanel.h audacity-new/files/patch-src_ListNavigationPanel.h
--- audacity/files/patch-src_ListNavigationPanel.h      1969-12-31 16:00:00.000000000 -0800
+++ audacity-new/files/patch-src_ListNavigationPanel.h  2023-04-29 23:34:31.924431000 -0700
@@ -0,0 +1,11 @@
+--- src/ListNavigationPanel.h.orig     2023-04-27 07:55:48 UTC
++++ src/ListNavigationPanel.h
+@@ -13,7 +13,7 @@
+ #include <wx/window.h>
+ #include <wx/containr.h>
+
+-extern template class WXDLLIMPEXP_CORE wxNavigationEnabled<wxWindow>;
++//extern template class WXDLLIMPEXP_CORE wxNavigationEnabled<wxWindow>;
+
+ #include "ListNavigationEnabled.h"         
+
Comment 33 Jack 2023-04-30 10:35:33 UTC
Arg, I'm having so much trouble with this garbage windows laptop adding ^Ms to my patches, can you please help me add this files/patch-src_ListNavigationPanel.h patch to the tree after the main patch.
Comment 34 Jack 2023-04-30 10:37:10 UTC
Comment on attachment 241880 [details]
patch-src_ListNavigationPanel.h

This patch needs a dos2unix ^M removal before adding.
Comment 35 Robert Clausecker freebsd_committer freebsd_triage 2023-04-30 10:57:18 UTC
My recommendation: prepare a full commit such that the work tree is clean once you committed.  Then use "git format-patch" to turn the commit into a patch.  This has the big advantage of preserving your author name and commit message, making it a bit easier for the committer to apply your patch.
Comment 36 Jack 2023-05-01 02:16:57 UTC
Created attachment 241890 [details]
Patch to upgrade to audacity-3.3.1

Created single patch with `git diff main`. Please let me know if that looks good and will know for the future. Thanks.
Comment 37 Jack 2023-05-01 02:20:30 UTC
Created attachment 241891 [details]
Upgrade audacity to 3.3.1

Fixed patch-src_ListNavigationPanel.h in this one, previous one created a patch inside the patch.
Comment 38 Matthew Seaman freebsd_committer freebsd_triage 2023-05-01 07:29:14 UTC
I'm getting build failures with latest patch:
```
ld: error: undefined symbol: typeinfo for wxNavigationEnabled<wxWindow>
>>> referenced by ListNavigationPanel.cpp
>>>               src/CMakeFiles/Audacity.dir/ListNavigationPanel.cpp.o:(typeinfo for ListNavigationEnabled<wxWindow>)
c++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
```
Comment 39 Jack 2023-05-01 07:37:24 UTC
(In reply to Matthew Seaman from comment #38)
Arg, that files/patch-src_ListNavigationPanel.h is missing from the patch, can't seem to get git diff to put that patch inside. Can you add https://bugs.freebsd.org/bugzilla/attachment.cgi?id=241880 with dos2unix run on it. This git diff is giving me so much trouble
Comment 40 Matthew Seaman freebsd_committer freebsd_triage 2023-05-01 08:37:27 UTC
Well, getting there slowly.  The software builds now, but packaging fails:
```
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: %%DOCSDIR%%/README.md
===> Error: Plist issues found.
*** Error code 1

Stop.
make: stopped in /usr/ports/audio/audacity
=>> Error: check-plist failures detected
=>> Checking for staging violations... done
=======================<phase: package        >============================
===== env: DEVELOPER_MODE=yes 'PKG_NOTES=build_timestamp built_by' 'PKG_NOTE_build_timestamp=2023-05-01T08:17:14+0000' 'PKG_NOTE_built_by=poudriere-git-3.3.99.20220831' STRICT_DEPENDS=yes USER=nobody UID=65534 GID=65534
===>  Building package for audacity-3.3.1
pkg-static: duplicate file listing: /usr/local/share/doc/audacity/README.md, fatal (developer mode)
*** Error code 1

```

You're listing the README.md file both in PORTDOCS and in pkg-plist:
```
pkg:~...ports/audio/audacity:% grep -R README.md .
./Makefile:PORTDOCS=	README.md
./pkg-plist:%%PORTDOCS%%%%DOCSDIR%%/README.md
```

I'll delete the line from pkg-plist and try again.
Comment 41 Jack 2023-05-01 08:41:38 UTC
(In reply to Matthew Seaman from comment #40)
Thank you so much for the help, hopefully the next version I will have learned how to use git diff properly (and make makeplist) and it won't be so painful.
Comment 42 commit-hook freebsd_committer freebsd_triage 2023-05-01 16:08:58 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0eb3ec48ff45145e4e5d4c0b90478ea792afa1a4

commit 0eb3ec48ff45145e4e5d4c0b90478ea792afa1a4
Author:     Jack <xxjack12xx@gmail.com>
AuthorDate: 2023-05-01 15:56:37 +0000
Commit:     Matthew Seaman <matthew@FreeBSD.org>
CommitDate: 2023-05-01 16:07:23 +0000

    audio/audacity: update to 3.3.1

    Changes:        https://github.com/audacity/audacity/releases/tag/Audacity-3.3.1
    Changes:        https://github.com/audacity/audacity/releases/tag/Audacity-3.3.0

        Some of the built-in effects are now realtime capable (Bass & Treble, Distortion, Phaser, Reverb and Wahwah).
        #4352 Added a new effect: Shelf Filter.
        Added an initial (beta) version of Beats and Measures.
        #4414 Reworked the bottom toolbar dock:
            Project Sample Rate is now found in Audio Setup -> Audio Settings (formerly known as Project Rate).
            The Snapping Toolbar (formerly known as Snap-To) is now independent of the Selection Toolbar.
            Added a new Time Signature Toolbar (beta). It is hidden by default.
        #4212 Improved Zooming behavior slightly (more to come in the future).
        #4393 Added a new ruler, Linear (dB). This ruler goes from 0 dBFS to -∞ dBFS and better reflects the volume as shown in the recording/playback meters.
        #3820 When copying clips between projects, you now can choose between whether to copy smart clips or just the visible portion.
        #4133 Added a delete button to the Cut/Copy/Paste toolbar.

    Bugfixes

        #1584 Audacity no longer dithers tracks unnecessarily.
        #2427 Linux playback now handles output latency better (less stutters).
        #3796 The EQ effect no longer resets clip names.
        #3801 Audacity no longer crashes when trying to load projects with plugins that since have been deleted.
        #4417 Resampling a track no longer trims it.

    Libraries

        FFmpeg 6 (avformat 60) is now supported.
        Moved from Breakpad to Crashpad.
        Extracted various libraries from within Audacity.

    PR:             271094

    Approved by:    jack (maintainer)

 audio/audacity/Makefile                            |   11 +-
 audio/audacity/distinfo                            |    6 +-
 .../patch-cmake-proxies_CMakeLists.txt (gone)      |   11 -
 audio/audacity/files/patch-src_AboutDialog.cpp     |    2 +-
 .../files/patch-src_ListNavigationPanel.h (new)    |   11 +
 audio/audacity/pkg-plist                           | 1407 +-------------------
 6 files changed, 38 insertions(+), 1410 deletions(-)
Comment 43 Matthew Seaman freebsd_committer freebsd_triage 2023-05-01 16:11:40 UTC
Committed, thanks!
Comment 44 Matthew Seaman freebsd_committer freebsd_triage 2023-05-01 16:15:53 UTC
I did test the 'MANUAL' option, and the poudriere build didn't complain.  However I still not entirely convinced that option is doing what was intended.
Comment 45 Jack 2023-05-01 19:56:51 UTC
I'll dig into the source code to see what that option is actually doing.
Comment 46 Jack 2023-05-06 10:05:02 UTC
The MANUAL option according to the developers is supposed to download the manual from audacity-manual repo and installs it with Audacity.
Comment 47 Robert Clausecker freebsd_committer freebsd_triage 2023-05-06 10:23:45 UTC
(In reply to Jack from comment #46)

If so, we need to download said manual in the fetch phase and install it with the other files.
Comment 48 Jack 2023-05-07 02:23:14 UTC
(In reply to Robert Clausecker from comment #47)
Talking with upstream about how the whole process works currently.