Skip to content

spandsp: fix url and patch UB on ppc64be - #499147

Open
amaanq wants to merge 3 commits into
NixOS:stagingfrom
amaanq:spandsp-fix-url-and-ub
Open

spandsp: fix url and patch UB on ppc64be#499147
amaanq wants to merge 3 commits into
NixOS:stagingfrom
amaanq:spandsp-fix-url-and-ub

Conversation

@amaanq

@amaanq amaanq commented Mar 12, 2026

Copy link
Copy Markdown
Member

Things done

The upstream source at soft-switch.org is permanently down. This PR switches to the Fedora lookaside cache mirror, which should hopefully never go down.

This PR also adds a patch fixing undefined behavior in bit_operations_tests where 1U << -1, which caused spurious test failures on ppc64be. I've submitted the fix upstream as freeswitch/spandsp#116.

Lastly, lpc10_tests is disabled on ppc64, since it compares decoded LPC-10 audio against an x86-generated reference file, and (assumingly) POWER's FPU produces different enough float intermediates that the output diverges after a few hundred frames, even though the codec works correctly.

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
    • ppc64be-linux
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@amaanq
amaanq force-pushed the spandsp-fix-url-and-ub branch from 9b3d560 to 7dbd640 Compare March 12, 2026 04:52
github-actions[bot]

This comment was marked as outdated.

@amaanq
amaanq changed the base branch from master to staging March 12, 2026 04:57
@amaanq

This comment was marked as resolved.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Mar 12, 2026
The LPC-10 test checks decoded audio against a reference WAV generated
on x86. On POWER, small float rounding differences in the encoder
accumulate over hundreds of frames and eventually produce different
output, even though the codec itself works correctly.
@OPNA2608 OPNA2608 added the 6.topic: exotic Exotic hardware or software platform label Mar 12, 2026
@@ -7,7 +7,7 @@
(callPackage ./common.nix { }) rec {
version = "0.0.6";
src = fetchurl {
url = "https://www.soft-switch.org/downloads/spandsp/spandsp-${version}.tar.gz";
url = "https://src.fedoraproject.org/lookaside/pkgs/spandsp/spandsp-${version}.tar.gz/897d839516a6d4edb20397d4757a7ca3/spandsp-${version}.tar.gz";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not the Internet Archive? There's a capture from Feb 2026: https://web.archive.org/web/20260205180948/https://www.soft-switch.org/downloads/spandsp/spandsp-0.0.6.tar.gz

As an aside, finding the commit that corresponds to that version and fetching it from GitHub would be nice, but upstream doesn't believe in Git tags :(. 7b6d33a is dated Sep 2, 2014, so that might help with digging through the history to find the commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: exotic Exotic hardware or software platform 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants