Bug 279954 - security/libpki: Fails to build with libxml2 2.31.1
Summary: security/libpki: Fails to build with libxml2 2.31.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Daniel Engberg
URL:
Keywords:
Depends on:
Blocks: 279705
  Show dependency treegraph
 
Reported: 2024-06-24 17:48 UTC by Daniel Engberg
Modified: 2024-08-25 13:16 UTC (History)
2 users (show)

See Also:
bruno: maintainer-feedback+


Attachments
patch for libpki (628 bytes, patch)
2024-08-12 06:24 UTC, Bruno Damour
no flags Details | Diff
Patch (git diff) against ports tree (1.22 KB, patch)
2024-08-12 08:35 UTC, Bruno Damour
no flags Details | Diff
Patch against current ports tree (5.47 KB, patch)
2024-08-13 23:07 UTC, Bruno Damour
no flags Details | Diff
Patch against current ports tree (5.68 KB, patch)
2024-08-14 13:28 UTC, Bruno Damour
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Bruno Damour 2024-08-12 06:24:22 UTC
Created attachment 252702 [details]
patch for libpki
Comment 2 Bruno Damour 2024-08-12 06:25:18 UTC
This should fix compilation against libxml2 >= 2.12
Comment 3 Bruno Damour 2024-08-12 08:35:25 UTC
Created attachment 252703 [details]
Patch (git diff) against ports tree

Patch for security/libpki against current ports tree
- bumps PORTSVERSION to 6
- adds a small patch to allow compiling with libxml2 > 2.12
Comment 4 Bruno Damour 2024-08-12 10:28:27 UTC
Patch submitted upstream :
https://github.com/openca/libpki/pull/90
Comment 5 Bruno Damour 2024-08-13 23:07:26 UTC
Created attachment 252750 [details]
Patch against current ports tree

Well it seems my last version of the port ended up incomplete... I guess no one really tried to use it on FreeBSD 14.

Here is a new version which should :
- really fix the segfault which PORTREVISION 5 was supposed to fix (complementing the final incomplete patch with fixes to src/pki_x509.c which were discarded in the final version)
- allowing build against libxml2-2.12+ (patching src/pki_config.c)

Sorry for the mess...
Comment 6 Daniel Engberg freebsd_committer freebsd_triage 2024-08-14 00:22:05 UTC
Hi,

So this should work on all supported versions incl 13.3?

Thanks for having a look at this!

Best regards,
Daniel
Comment 7 Daniel Engberg freebsd_committer freebsd_triage 2024-08-14 02:27:13 UTC
..also, can you update upstream PR so we can pull it from there?

Best regards,
Daniel
Comment 8 Bruno Damour 2024-08-14 13:28:43 UTC
Created attachment 252754 [details]
Patch against current ports tree

Hello,

Unfortunately I haven't the setup to check that it runs properly on 13.3 but it should... the changes introduced to adapt to openssl3 are only activated if version matches, and the previous versions did work on 13.2.

As for referring to an upstream PR, it would be tricky as a lot of changes have occurred in master since v0.9.2. The patch is in deed a modified cherry-pick from an upstream commit applied to a significantly modified master.

Also I reviewed my patch and corrected it, new version attached. Tell me if you can figure a better way forward...

Thanks

Bruno
Comment 9 Bruno Damour 2024-08-14 20:12:39 UTC
I checked that it does build and work om¨n 13.3, both with libxml2-2.11 and libxml2-2.13
Comment 10 Daniel Engberg freebsd_committer freebsd_triage 2024-08-15 16:57:50 UTC
Ok, thanks!
Can you also update your PR on GitHub?
Comment 11 Bruno Damour 2024-08-15 17:10:56 UTC
What do you mean ?
As I explained above, I don't know how to craft a PR for the cherry-picked backported parts...
Comment 12 Daniel Engberg freebsd_committer freebsd_triage 2024-08-15 17:16:01 UTC
Ahh sorry, I'll have a look at this early next week. Thanks again!
Comment 13 commit-hook freebsd_committer freebsd_triage 2024-08-25 13:15:47 UTC
A commit in branch main references this bug:

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

commit db203a9d7a6ddbf29c75006f6126e5e6274e85fa
Author:     Bruno Damour <bruno@ruomad.net>
AuthorDate: 2024-08-25 13:13:07 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2024-08-25 13:13:22 +0000

    security/libpki: Fix build with libxml2 2.13

    Backports from upstream repo and adapted to current release

    PR:             279954

 security/libpki/Makefile                           |   2 +-
 .../libpki/files/patch-src_pki__config.c (new)     |  22 +++
 security/libpki/files/patch-src_pki__x509.c (new)  | 181 +++++++++++++++++++++
 3 files changed, 204 insertions(+), 1 deletion(-)
Comment 14 Daniel Engberg freebsd_committer freebsd_triage 2024-08-25 13:16:06 UTC
Committed, thanks!