Skip to content

libxml2: 2.13.8 -> 2.14.3#396195

Merged
vcunat merged 1 commit intoNixOS:stagingfrom
MisileLab:libxml
May 28, 2025
Merged

libxml2: 2.13.8 -> 2.14.3#396195
vcunat merged 1 commit intoNixOS:stagingfrom
MisileLab:libxml

Conversation

@MisileLab
Copy link
Contributor

@MisileLab MisileLab commented Apr 5, 2025

previous pr: #394517
I was removing branches that merged, and I just deleted this branch.

https://discourse.gnome.org/t/libxml2-2-14-0-released/28025
https://discourse.gnome.org/t/libxml2-2-14-1-released/28170
https://discourse.gnome.org/t/libxml2-2-14-2-released/28426
https://discourse.gnome.org/t/libxml2-2-14-3-released/28862

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels Apr 5, 2025
@nix-owners nix-owners bot requested a review from jtojnar April 5, 2025 04:20
@MisileLab
Copy link
Contributor Author

MisileLab commented Apr 5, 2025

image

pkgs/test/buildFHSEnv/default.nix
83:      (getSharedObjectFromDebian "libxml2.so.2.9.14" (fetchurl {

pkgs/applications/editors/vscode/extensions/ms-dotnettools.csdevkit/default.nix
45:    (lib.getLib libxml2) # libxml2.so.2

pkgs/development/libraries/gobject-introspection/absolute_shlib_path.patch
161:+            libxml2.so.2 => @nixStoreDir@/72mxkk74cv266snkjpz1kwl1i2rg8rpc-libxml2-2.9.8/lib/libxml2.so.2 (0x00007f0ee119c000)

quick search for breaking change
How can we solve this?

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Apr 6, 2025
@LordGrimmauld
Copy link
Contributor

https://gitlab.gnome.org/GNOME/libxml2/-/issues/889
https://gitlab.gnome.org/GNOME/libxml2/-/issues/890

Please consider updating this to 2.14.2.

In the meantime, i opened #399595 so we are not suck on a vulnerable version. The 2.13.8 update is non-breaking. I am happy to get 2.14.x versions, but didn't feel confident pushing that yet.

@mweinelt mweinelt marked this pull request as draft April 17, 2025 21:29
@MisileLab MisileLab changed the title libxml2: 2.13.6 -> 2.14.0 libxml2: 2.13.6 -> 2.14.2 Apr 18, 2025
@MisileLab MisileLab marked this pull request as ready for review April 18, 2025 05:58
@LordGrimmauld LordGrimmauld mentioned this pull request Apr 18, 2025
13 tasks
@MisileLab MisileLab changed the title libxml2: 2.13.6 -> 2.14.2 libxml2: 2.13.8 -> 2.14.2 May 1, 2025
@LordGrimmauld
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 396195 --package libxslt --package docbook2x --package python3Packages.lxml --package clang --package libarchive --package libxml2


x86_64-linux

✅ 18 packages built:
  • clang
  • docbook2x
  • libarchive
  • libarchive.dev (libarchive.dev.dev, libarchive.dev.lib)
  • libarchive.lib (libarchive.lib.dev, libarchive.lib.lib)
  • libxml2
  • libxml2.bin (libxml2.bin.bin, libxml2.bin.dev, libxml2.bin.devdoc, libxml2.bin.py)
  • libxml2.dev (libxml2.dev.bin, libxml2.dev.dev, libxml2.dev.devdoc, libxml2.dev.py)
  • libxml2.devdoc (libxml2.devdoc.bin, libxml2.devdoc.dev, libxml2.devdoc.devdoc, libxml2.devdoc.py)
  • libxml2.py (libxml2.py.bin, libxml2.py.dev, libxml2.py.devdoc, libxml2.py.py)
  • libxslt
  • libxslt.bin (libxslt.bin.bin, libxslt.bin.dev, libxslt.bin.devdoc, libxslt.bin.doc, libxslt.bin.py)
  • libxslt.dev (libxslt.dev.bin, libxslt.dev.dev, libxslt.dev.devdoc, libxslt.dev.doc, libxslt.dev.py)
  • libxslt.devdoc (libxslt.devdoc.bin, libxslt.devdoc.dev, libxslt.devdoc.devdoc, libxslt.devdoc.doc, libxslt.devdoc.py)
  • libxslt.doc (libxslt.doc.bin, libxslt.doc.dev, libxslt.doc.devdoc, libxslt.doc.doc, libxslt.doc.py)
  • libxslt.py (libxslt.py.bin, libxslt.py.dev, libxslt.py.devdoc, libxslt.py.doc, libxslt.py.py)
  • python3Packages.lxml
  • python3Packages.lxml.dist (python3Packages.lxml.dist.dist)

Copy link
Contributor

@LordGrimmauld LordGrimmauld left a comment

Choose a reason for hiding this comment

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

The nixpkgs diff itself is trivial, and the packages with >1500 reverse dependencies do still build. This looks good to me, though i did not review upstream code changes.

@wegank wegank added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels May 2, 2025
@MisileLab MisileLab changed the title libxml2: 2.13.8 -> 2.14.2 libxml2: 2.13.8 -> 2.14.3 May 14, 2025
@jtojnar
Copy link
Member

jtojnar commented May 14, 2025

pkgs/test/buildFHSEnv/default.nix
83:      (getSharedObjectFromDebian "libxml2.so.2.9.14" (fetchurl {

This is refering to a Debian package, no need to do anything.

pkgs/applications/editors/vscode/extensions/ms-dotnettools.csdevkit/default.nix
45:    (lib.getLib libxml2) # libxml2.so.2

If I comment out the line, vscode-extensions.ms-dotnettools.csdevkit will fail to build so it probably will not work with the new version:

auto-patchelf: 1 dependencies could not be satisfied
error: auto-patchelf could not satisfy dependency libxml2.so.2 wanted by /nix/store/vjbxkh0xs0vmwmay3flqdhrfjh8zcsx8-vscode-extension-ms-dotnettools-csdevkit-1.18.25/share/vscode/extensions/ms-dotnettools.csdevkit/components/vs-code-coverage/platforms/linux-x64/node_modules/@microsoft/coverage-services.linux-x64/ubuntu/x64/libInstrumentationEngine.so

The comment should be updated and vscode-extensions.ms-dotnettools.csdevkit needs to be bumped (if there is a newer version compatible with libxml2.so.16), or marked as broken. cc @GGG-KILLER

pkgs/development/libraries/gobject-introspection/absolute_shlib_path.patch
161:+            libxml2.so.2 => @nixStoreDir@/72mxkk74cv266snkjpz1kwl1i2rg8rpc-libxml2-2.9.8/lib/libxml2.so.2 (0x00007f0ee119c000)

This is just a test, no need to change it.

@GGG-KILLER
Copy link
Contributor

The comment should be updated and vscode-extensions.ms-dotnettools.csdevkit needs to be bumped (if there is a newer version compatible with libxml2.so.16), or marked as broken. cc @GGG-KILLER

If possible I'd prefer that the previous libxml version is kept, as this is a very critical extension for all .NET developers in NixOS and the impact of marking it as broken would be huge.

There is no new version afaik since @r-ryantm has already updated the package to the latest version.

@jtojnar
Copy link
Member

jtojnar commented May 14, 2025

That is unfortunately not feasible since security vulnerabilities are regularly discovered in libxml2. So even if we kept an older version, it would be shortly marked as insecure.

Do you think upstream would be willing to update to a newer version?

@GGG-KILLER
Copy link
Contributor

That is unfortunately not feasible since security vulnerabilities are regularly discovered in libxml2. So even if we kept an older version, it would be shortly marked as insecure.

I see, that's very unfortunate indeed. Guess there's no choice.

Do you think upstream would be willing to update to a newer version?

I'll open an issue in their repo referencing this PR, but in the meantime, I think I'll let autoPatchelf ignore that dependency and have this specific feature be broken, since it seems to be only related to code coverage and not other more critical features.

@MisileLab
Copy link
Contributor Author

MisileLab commented May 14, 2025

That is unfortunately not feasible since security vulnerabilities are regularly discovered in libxml2. So even if we kept an older version, it would be shortly marked as insecure.

Do you think upstream would be willing to update to a newer version?

I guess the vulnerability was fixed at 2.13.8.

edit: I didn't see 'regularly', sorry.

@jtojnar
Copy link
Member

jtojnar commented May 14, 2025

Reading https://gitlab.gnome.org/GNOME/libxml2/-/issues/751, it might be the case that the ABI breakage is not relevant, so we could create a hack like:

(runCommand "libxml2-fake-old-abi" {} ''
  mkdir -p "$out/lib"
  ln -s "${lib.getLib libxml2}/lib/libxml2.so" "$out/lib/libxml2.so.2"
'')

Not sure if it that will work, might be worth a try.

@GGG-KILLER
Copy link
Contributor

I won't be able to do anything about this until next week, but if that solution works (builds, no need to actually check if the extension itself works) then I'm okay with it being added to this PR or in another PR if you prefer.

LordGrimmauld added a commit to LordGrimmauld/nixpkgs that referenced this pull request May 31, 2025
Broken in NixOS#396195, no new upstream release that is fixing these issues yet.
peterbecich pushed a commit to peterbecich/nixpkgs that referenced this pull request May 31, 2025
Broken in NixOS#396195, no new upstream release that is fixing these issues yet.
@Prince213
Copy link
Member

Broke ldc: #414928

@griffi-gh
Copy link
Member

griffi-gh commented Jun 21, 2025

Regression in binaryninja-free (#418655) and ciscoPacketTracer8 (#418660)

@vcunat
Copy link
Member

vcunat commented Jun 21, 2025

They bumped soname, so most things using our libxml2 that aren't built from source by us will have issues. We might consider adding older libxml2 for these cases, though it might become rather complicated to juggle the versions.

EDIT: the references above are very often the same – patchelf attempt with libxml2.so.2

@aabizri
Copy link

aabizri commented Jun 25, 2025

Regression in unityhub (#419634)

@griffi-gh
Copy link
Member

griffi-gh commented Jun 25, 2025

Yea, i agree on keeping the older version (as a separate package, e.g. libxml2_2 for compat reasons.

@jtojnar
Copy link
Member

jtojnar commented Jun 25, 2025

See above

@MisileLab
Copy link
Contributor Author

Reading gitlab.gnome.org/GNOME/libxml2/-/issues/751, it might be the case that the ABI breakage is not relevant, so we could create a hack like:

(runCommand "libxml2-fake-old-abi" {} ''
  mkdir -p "$out/lib"
  ln -s "${lib.getLib libxml2}/lib/libxml2.so" "$out/lib/libxml2.so.2"
'')

Not sure if it that will work, might be worth a try.

Maybe we can implement this instead of keeping the old version.

@vcunat
Copy link
Member

vcunat commented Jun 26, 2025

I'd say that's asking for unpleasant surprises during runtime.

@aabizri
Copy link

aabizri commented Jun 26, 2025

For what it's worth, Arch did create a libxml2-legacy for these binary packages that can't be recompiled for the new ABI (see link)

@Soveu Soveu mentioned this pull request Jun 30, 2025
13 tasks
N0tExisting added a commit to N0tExisting/nixpkgs that referenced this pull request Jun 30, 2025
bacchanalia pushed a commit to awakesecurity/nixpkgs that referenced this pull request Jul 14, 2025
Broken in NixOS#396195, no new upstream release that is fixing these issues yet.
@de11n
Copy link

de11n commented Sep 24, 2025

It looks like we might be able to build libxml2 with --with-legacy to significantly reduce the ABI breakage. We could consider doing that in libxml2 itself and adding the symlink hack. Or we could introduce a new "legacy" package that does it to protect most users from the edge cases.

@alyssais
Copy link
Member

We already did. It's libxml2_13.

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

Labels

10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 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. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.