Skip to content

[Bug]: outdated savannah URL in subprojects/freetype-2.6.1.wrap #31340

Closed

Description

@Corin-EU

Bug summary

When building from source of matplotlib v3.10.8 downloaded from PyPi, the following message is observed

         Downloading freetype-2.6.1 source from https://download.savannah.gnu.org/releases/freetype/freetype-old/freetype-2.6.1.tar.gz
          HTTP Error 502: Bad Gateway
          WARNING: failed to download with error: could not get https://download.savannah.gnu.org/releases/freetype/freetype-old/freetype-2.6.1.tar.gz; is the internet available?. Trying after a delay...
           HTTP Error 502: Bad Gateway

This is because there is an outdated URL in subprojects/freetype-2.6.1.wrap

The line in freetype-2.6.1.wrap should be changed from

      source_url = https://download.savannah.gnu.org/releases/freetype/freetype-old/freetype-2.6.1.tar.gz

to

     source_url=https://download.savannah.nongnu.org/releases/freetype/freetype-old/freetype-2.6.1.tar.gz

To show that this updated URL works, here is the output from wget.
Please note that downloads from savannah get redirected to a third party site, so that should raise security concerns.

       wget  https://download.savannah.nongnu.org/releases/freetype/freetype-old/freetype-2.6.1.tar.gz
       --2026-03-20 18:10:33--  https://download.savannah.nongnu.org/releases/freetype/freetype-old/freetype-2.6.1.tar.gz
      Resolving download.savannah.nongnu.org... 2001:470:142:5::200, 209.51.188.200
      Connecting to download.savannah.nongnu.org|2001:470:142:5::200|:443... connected.
      HTTP request sent, awaiting response... 302 Moved Temporarily
      Location: https://fosszone.csd.auth.gr/nongnu/freetype/freetype-old/freetype-2.6.1.tar.gz [following]
     --2026-03-20 18:10:36--  https://fosszone.csd.auth.gr/nongnu/freetype/freetype-old/freetype-2.6.1.tar.gz
     Resolving fosszone.csd.auth.gr... 155.207.200.222
     Connecting to fosszone.csd.auth.gr|155.207.200.222|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 2302080 (2.2M) [application/x-gzip]
    Saving to: ‘freetype-2.6.1.tar.gz.1’

    freetype-2.6.1.tar.gz.1                         100%[====================================================================================================>]   2.20M  5.57MB/s    in 0.4s    

    2026-03-20 18:10:37 (5.57 MB/s) - ‘freetype-2.6.1.tar.gz.1’ saved [2302080/2302080]

Code for reproduction

/usr/local/bin/pip3.12 install /usr/src/build/matplotlib-3.10.8/ --no-binary all --no-build-isolation --no-cache-dir --no-deps --no-index --no-warn-script-location --progress-bar off --root "/usr/local/stow/Languages/Python_312/matplotlib_312-3.10.8" --verbose

Actual outcome

Downloading freetype-2.6.1 source from https://download.savannah.gnu.org/releases/freetype/freetype-old/freetype-2.6.1.tar.gz
HTTP Error 502: Bad Gateway

Expected outcome

The file freetype-2.6.1.tar.gz should be downloaded.

Additional information

No response

Operating system

No response

Matplotlib Version

3.10.8

Matplotlib Backend

No response

Python version

Python 3.12

Jupyter version

No response

Installation

from source (.tar.gz)

Activity

  1. ShubhamS2005 commented on Mar 20, 2026

    @ShubhamS2005

    Hi! I was able to reproduce and analyze the issue.
    The current freetype source URL can intermittently return HTTP 502 errors, as mentioned. While it may occasionally work depending on the mirror, it is not consistently reliable.
    The alternative URL (savannah.nongnu.org) works correctly and provides a more stable download source.
    I’d like to fix this by updating the source_url in the wrap file. Please let me know if this approach looks good.

  2. ShubhamS2005 commented on Mar 20, 2026

    @ShubhamS2005

    Hi, I’ve submitted a PR to fix this issue: #31341

    Please let me know if any changes are required. Thanks!

  3. Donj63000 commented on Mar 20, 2026

    @Donj63000

    HII ! I think the reliability issue is real, but I don’t think the root cause is that download.savannah.gnu.org is simply “outdated”.
    Savannah documents download.savannah.{gnu,nongnu}.org as the same public-facing redirector for the Savannah download area, and recommends download-mirror.savannah.gnu.org/releases/ when a download without redirections is desired. Since that redirector picks a mirror, changing .gnu.org to .nongnu.org may work in practice only because it lands on a different mirror, but it does not remove the fragile redirect layer.
    So the more robust fix seems to be changing the primary URL to:

    https://download-mirror.savannah.gnu.org/releases/freetype/freetype-old/freetype-2.6.1.tar.gz
    

    while keeping the existing source_fallback_url to SourceForge and the current source_hash.
    The tarball is present at that Savannah path, so this should be a minimal change that avoids the extra redirect hop.
    Also, I would slightly reframe the security concern: mirror redirection is not ideal for availability/privacy, but it is not really an integrity problem here because Meson verifies source_hash before unpacking.
    As immediate workarounds, Matplotlib already documents either building against a system FreeType (-Dsystem-freetype=true) or pre-seeding subprojects/packagecache / MESON_PACKAGE_CACHE_DIR with the tarball.
    If that sounds reasonable, I can open a small PR for the download-mirror change!

  4. ShubhamS2005 commented on Mar 20, 2026

    @ShubhamS2005

    Thanks for the detailed explanation — that makes sense.
    I agree that switching to download-mirror.savannah.gnu.org is a cleaner approach than changing to .nongnu.org, since it avoids the redirect layer while still aligning with Savannah’s recommended usage.

    I’ll update the patch to:

    • use the download-mirror.savannah.gnu.org URL
    • keep the existing fallback URL and source_hash unchanged

    I’ll push an update shortly. Please let me know if there’s anything else I should adjust.

  5. ShubhamS2005 commented on Mar 20, 2026

    @ShubhamS2005

    Updated the URL to use download-mirror.savannah.gnu.org as suggested.

  6. scottshambaugh commented on Mar 25, 2026

    @scottshambaugh
    Contributor

    As discussed in #31287, any changes to downloaded source code URLs needs to be supported by external documentation showing that URL as an official mirror.

  7. added a commit that references this issue on Mar 26, 2026
    b4a3d36
  8. added this to the v3.10.9 milestone on Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions