build: deprecate UPnP support #22644

pull fanquake wants to merge 3 commits into bitcoin:master from fanquake:miniupnpc_pkg_config changing 5 files +19 −47
  1. fanquake commented at 0:06 am on August 6, 2021: member

    #18077 introduced support for NAT-PMP, but didn’t present any sort of deprecation plan for moving away from UPNP. This means we are supporting both. I don’t think Bitcoin Core should be actively supporting two different mechanisms (and thus two different dependencies) to essentially achieve the same outcome (NAT traversal); especially given our history with miniupnpc.

    Using UPPp by default has been disabled since 0.11.1, which was released with an updated version of miniupnp, to fix a buffer overflow in its XML parsing. At the same time, using UPnP was disabled by default to prevent future vulnerabilities from potentially effecting the network at large. Note that even recent versions of miniupnpc contain (public) bugs that could be used to detrimentally effect a Bitcoin Core node.

    miniupnp - implementation of UPnP (Universal Plug and Play)

    • NAT traversal implemented via IGD (Internet Gateway Device Standardised Control Protocol)
    • Not only does UPnP in have many issues in general, IGD has some issues of it’s own.

    libnatpmp - implementation of NAT-PMP (alternative to IGD)

    • NAT traversal
    • Maintained by the same author as miniupnp.

    NAT-PMP has been succeeded by PCP (Port Control Protocol). However the two protocols share similar semantics, and thus, devices that implement PCP are interoperable with devices using NAT-PMP. See NAT-PMP Transition.

    It’s an unfortunate combination of how distros work, and the upstream maintainership of libnatpmp, that most distros are using a version of the source released in 2015, which is missing a number of bug fixes and improvements, and they may actually be using an even earlier version of the source, unknowingly, due to tarball mis-naming (see #21209).

  2. DrahtBot added the label Build system on Aug 6, 2021
  3. practicalswift commented at 3:46 am on August 6, 2021: contributor
    Concept ACK on not supporting older potentially insecure versions of dependencies
  4. DrahtBot commented at 9:39 am on August 6, 2021: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept NACK luke-jr
    Concept ACK practicalswift, hebasto

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    No conflicts as of last run.

  5. luke-jr commented at 4:33 pm on September 14, 2021: member
    Concept NACK. UPnP and NAT-PMP are different protocols, and routers don’t always support both.
  6. DrahtBot added the label Needs rebase on Dec 13, 2021
  7. fanquake force-pushed on Mar 21, 2022
  8. fanquake commented at 4:01 pm on March 21, 2022: member
    Rebased, modified the changes slightly, updated the PR description.
  9. DrahtBot removed the label Needs rebase on Mar 21, 2022
  10. DrahtBot added the label Needs rebase on Apr 21, 2022
  11. fanquake force-pushed on Apr 21, 2022
  12. DrahtBot removed the label Needs rebase on Apr 21, 2022
  13. hebasto commented at 11:08 am on April 24, 2022: member

    Concept ACK on using pkg-config for miniupnpc package detection.

    Why not move on with non-controversial build system only stuff, and leave a controversial deprecation part for another PR/time?

  14. DrahtBot added the label Needs rebase on Apr 28, 2022
  15. fanquake referenced this in commit f083605562 on Jul 15, 2022
  16. fanquake referenced this in commit 3afc765661 on Jul 15, 2022
  17. fanquake force-pushed on Aug 1, 2022
  18. fanquake commented at 10:24 am on August 1, 2022: member

    Why not move on with non-controversial build system only stuff,

    I’ll split some changes out of here.

  19. DrahtBot removed the label Needs rebase on Aug 1, 2022
  20. fanquake referenced this in commit 15424ae99b on Aug 24, 2022
  21. fanquake referenced this in commit 3d1e52f901 on Aug 24, 2022
  22. fanquake referenced this in commit 65471008e0 on Aug 24, 2022
  23. fanquake referenced this in commit 74e54cc2a3 on Sep 21, 2022
  24. DrahtBot added the label Needs rebase on Sep 21, 2022
  25. DrahtBot commented at 5:51 pm on September 21, 2022: contributor

    🐙 This pull request conflicts with the target branch and needs rebase.

    Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a “draft”.

  26. sidhujag referenced this in commit d85d27cde3 on Sep 23, 2022
  27. fanquake force-pushed on Nov 28, 2022
  28. fanquake removed the label Needs rebase on Nov 28, 2022
  29. fanquake force-pushed on Feb 2, 2023
  30. fanquake commented at 2:40 pm on February 2, 2023: member

    Rebased and somewhat changed the approach here. This is now based on #27016, and includes a bump to miniupnpc 2.2.4 (which removes the need to include patches I’ve upstreamed).

    Will rewrite the PR description shortly. Windows will need at least one more change, and something in configure for the arm macOS brew builds.

  31. fanquake referenced this in commit 1ad0711d7c on Feb 13, 2023
  32. fanquake force-pushed on Feb 13, 2023
  33. fanquake renamed this:
    Deprecate UPnP support, require 2.1 or later
    build: deprecate UPnP support
    on Feb 13, 2023
  34. sidhujag referenced this in commit 5182c4efae on Feb 14, 2023
  35. maflcko added the label DrahtBot Guix build requested on Apr 6, 2023
  36. fanquake force-pushed on Apr 6, 2023
  37. DrahtBot commented at 3:34 pm on April 6, 2023: contributor

    Guix builds

    File commit 04595484d97100a50c146e5fc080319d9e0f5ca4(master) commit a8c5dba3759dab97416b80d2c3c3624bc0159cc1(master and this pull)
    SHA256SUMS.part 3b21459f399dc1ea... 9c40933ea3b0eacf...
    *-aarch64-linux-gnu-debug.tar.gz 4fff85f0c784be03... 2829dff3d78623f6...
    *-aarch64-linux-gnu.tar.gz 302a7296fa09024c... 71fb1ab0eb5b0f9a...
    *-arm-linux-gnueabihf-debug.tar.gz 26ef559dfe85ff36... bed43de4565808d0...
    *-arm-linux-gnueabihf.tar.gz c7c400b449bcbc25... 74dd1bcbd5e03a3a...
    *-powerpc64-linux-gnu-debug.tar.gz dbb0dab1769348dd... 8bd945b6e6939c57...
    *-powerpc64-linux-gnu.tar.gz 29a49889d6a4b726... 5b2845e6606ae41a...
    *-powerpc64le-linux-gnu-debug.tar.gz 0b55f161d313f183... b1b326859906c9d2...
    *-powerpc64le-linux-gnu.tar.gz 3470a917fac98913... 0d5c45e035c11683...
    *-riscv64-linux-gnu-debug.tar.gz bd0586823316a3bb... 5403aaeaf5b85b49...
    *-riscv64-linux-gnu.tar.gz 066f0cd363c9cc8b... 9e2f2136d7ae628a...
    *-x86_64-linux-gnu-debug.tar.gz 251d02a968fcc021... 242c49f07ab3c4e9...
    *-x86_64-linux-gnu.tar.gz 47b6ba3557239b83... fd8e309df6f3606c...
    *.tar.gz dc8ec0b33bd6e206... c99020aaeb2cc8e1...
    guix_build.log 5d15543628c9c161... aac88d5c971efa20...
    guix_build.log.diff 0344f7d16fad41b6...
  38. DrahtBot removed the label DrahtBot Guix build requested on Apr 6, 2023
  39. fanquake force-pushed on Jun 30, 2023
  40. DrahtBot added the label CI failed on Jun 30, 2023
  41. depends: miniupnpc 2.2.5 3fbac1f606
  42. build: use pkg-config to check for miniupnpc availability 5f8467ff09
  43. doc: mark UPnP usage as deprecated 78f8a7b217
  44. fanquake force-pushed on Aug 23, 2023
  45. maflcko commented at 9:23 am on August 24, 2023: member
     0Extracting miniupnpc...
     1/ci_container_base/depends/sources/miniupnpc-2.2.5.tar.gz: OK
     2Preprocessing miniupnpc...
     3Configuring miniupnpc...
     4Building miniupnpc...
     5patching file src/minisoap.c
     6patching file src/miniwget.c
     7make[1]: Entering directory '/ci_container_base/depends/work/build/x86_64-w64-mingw32/miniupnpc/2.2.5-c290993a88e'
     8fatal: not a git repository (or any parent up to mount point /ci_container_base)
     9Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
    10make[1]: *** No rule to make target 'build/libminiupnpc.a'.  Stop.
    11make[1]: Leaving directory '/ci_container_base/depends/work/build/x86_64-w64-mingw32/miniupnpc/2.2.5-c290993a88e'
    12make: *** [funcs.mk:291: /ci_container_base/depends/work/build/x86_64-w64-mingw32/miniupnpc/2.2.5-c290993a88e/./.stamp_built] Error 1
    13make: Leaving directory '/ci_container_base/depends'
    14
    15Exit status: 2
    
  46. fanquake commented at 9:25 am on August 24, 2023: member

    I can’t see how that is related to the changes here, looks like a github/CI bug? Especially given:

    fatal: not a git repository (or any parent up to mount point /ci_container_base) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

  47. maflcko commented at 1:50 pm on August 25, 2023: member
    I can reproduce locally on 3fbac1f6066b66c07ff2811b25c66fa0d96a11bd
  48. fanquake commented at 2:18 pm on August 25, 2023: member
    Ok. When upstream re-arranged it’s sources/how it builds, it didn’t bother to update it’s Windows makefile. Might send a patch
  49. fanquake commented at 11:01 am on September 7, 2023: member
    I would still like to see this done, as I think the current upnp code / additional of natpmp was a bit of a mess, with no plan going forward, however probably not going to maintain this PR.
  50. fanquake closed this on Sep 7, 2023

  51. hebasto added the label Up for grabs on Sep 7, 2023
  52. fanquake deleted the branch on Apr 4, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-21 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me