botan: Bugfix Python build; use Python 3.14; Change name to botan2 - #33643
botan: Bugfix Python build; use Python 3.14; Change name to botan2#33643essandess wants to merge 3 commits into
Conversation
|
Notifying maintainers: |
|
Can you be more elaborate and explain the changes?
|
Please see the commit string and diff. Currently, port
See #33642. I agree, but I don't know how to write |
|
On Tuesday July 21 2026 06:26:42 Steve Smith wrote:
Hmmm, I don't follow the py?-standard-distutils problem. I don't know that port yet, nor where it comes from or why it would be needed here, nor why it's missing for python 3.12 or why that would be an issue.
See #33642. I agree, but I don't know how to write `*_select` ports. Let's get an up-to-date `botan3` first and someone can add that capability later.
If botan3 breaks API and/or ABI and isn't designed to co-exist with v2, then the only proper solution IMHO is to do what has been done for many other ports including OpenSSL: installation in a sub-prefix. Botan2 appends a version to its pkgconfig file; assuming Botan3 does the same it can be exposed in $prefix/lib/pkgconfig so dependents do not even have to bother with search paths.
The `port select` mechanism is really not hard to understand but it's a convenience mechanism for users. It cannot be used in port dependency stuff, which is one of the reasons why IMHO there ought to be a mechanism (PortGroup) to select *a* sufficient Python install (so that users don't need to have to keep installing new Python versions.
FWIW, botan's configure.py seems to execute just fine with python 2.7.6 ...
That said, the port installs a python module. That could actually justify adding the usual python variants.
port:qca is one of those that were thrown into my lap when the principle maintainer withdrew. As I said elsewhere, I'm no longer interested in the overhead of doing PRs, esp. for those ports.
That said:
- I'd suggest changing the dependency to `path:lib/pkgconfig/botan-2.pc:botan2`. That's a transparent change which doesn't require a revbump or rebuild and will even work for installing new dependents as long as port:botan is already installed.
- I'll have to look into why I have my personal port:botan and see if I thus also need a personal port:botan3, which means I'll look into making these co-installable. I'll feed back what I found, so that dependents that are not (yet) compatible with botan3 can continue to be used - IF ANYONE IS INTEREST IN THAT.
|
|
BTW, when renaming a port, something like this will be needed for a while, to allow a smooth install transition:
```
subport "botan" {
replaced_by botan2
PortGroup obsolete 1.0
}
```
FWIW, here's how I'm preparing my own tree for the transition:
RJVB/macstrop@89e0cb5
As you see, I've introduced a shim port:botan2 which for now just pulls in port:botan . When the rename becomes effective, I will add the obsoleted botan subport as above.
|
|
Final remark for today: I see that botan3 requires C++20. That may justify some reflection on backwards compatibility with older Darwin versions!
|
Please see https://trac.macports.org/ticket/74244#ticket
Both ports create Thank you for your other comments, I've implemented the changes in the commits. |
Patches for older systems have already been added. See: #33642 (review) |
|
On Wednesday July 22 2026 06:31:57 Steve Smith wrote:
Both ports create `${prefix}/bin/botan` and a few other common files.
Those will all go away if you set the prefix to $prefix/libexec/botan2 (or 3). What common files there are that need to be exposed in the usual locations can be symlinked, with a 2 appended for the older versions (I think we can assume that the command line driver (`botan`) can always be at the latest version).
The simplest thing to do at first
So no, IMHO the simplest thing to do is the sub-prefix approach as this will allow figuring out compatibility problems at the leisure of the maintainers of the dependent ports (and on their own).
BTW, if indeed most or all dependents are compatible with botan3 then there is little reason to introduce 2 new ports. Instead, v2 might be provided (in a subprefix with just botan-2.pc symlinked in lib/pkgconfig) via port:botan2 for some period of time, while v3 can be provided via port:botan and installed normally. That's the normal way of updating libraries (esp. the ones not used by a boatload of dependents).
|
|
René J.V. Bertin wrote on 20260722::14:53:07 re: "Re: [macports/macports-ports] botan: Bugfix Python build; use Python 3.14; Change name to botan2 (PR #33643)"
Hmmm, I don't follow the py?-standard-distutils problem.
OK, looked into that, and am a bit flabbergasted. I only have python 3.11 and 3.13 installed ATM, but both have a working distutils package (the deadlib repo status that standard-distutils doesn't work for 3.13 BTW).
|
|
René J.V. Bertin wrote on 20260722::14:53:07 re: "Re: [macports/macports-ports] botan: Bugfix Python build; use Python 3.14; Change name to botan2 (PR #33643)"
- I'd suggest changing the dependency to `path:lib/pkgconfig/botan-2.pc:botan2`. That's a transparent change which doesn't require a revbump or rebuild and will even work for installing new dependents as long as port:botan is already installed.
I wasn't entirely right about the not requiring a revbump, of course. The proposed dependency change is not automagically applied to already installed ports. The rev-upgrade procedure should still find the botan-2 libraries in the location they're expected in, but it and other commands will probably still yell if and when port:botan has disappeared.
Now, I did test the proposed port:botan3 on OS X 10.9.5 as well as on Linux. On 10.9 (and earlier), the ccrandom feature has to be disabled, and I fixed the compiler patch so the build succeeds with GCC (the C++20 implementation in clang <17 is incomplete and even buggy!).
Apart from that, the build succeeded (with GCC13 and of course against libc++; I have yet to run the tests) and I can now confirm that there is only a SINGLE file installed in a common location that does NOT have a version appended to it.
IOW, I see NO NEED for a conflict between the botan v2 and v3 versions. The most logical thing to do would be to install the v2 `botan` driver as `botan2` or `botan-2` (to remain consistent with the naming used for the other port components). That's a simple change that can be done in the post-destroot.
For completeness: this is my version of the botan3 Portfile:
https://github.com/RJVB/macstrop/blob/master/security/botan3/Portfile
|
|
@RJVB I avoided a |
|
I'd have just renamed the executable from I see you get manpage. I missed that because it is in fact generated only if the configure step finds an |
@essandess Just to be clear: my patches fix some legacy macOS-related issues and allow a working build on powerpc, but they do not address C++ standard at all: we use the latest GCC on powerpc, there is no problem there with C++20 or C++23. However older x86 that use libc++ and clang may have issues with modern C++. |
|
barracuda156 left a comment (macports/macports-ports#33643)
However older x86 that use libc++ and clang may have issues with modern C++.
Exactly, and I already ran into that as I documented on the botan3 PR. C++20 requires a new enough clang version (17+ in principle, because there apparently were bugs in earlier LLVM C++20 implementations), and 10.12 and earlier also seem to require building against MacPorts' libc++ (should also be new enough) because the libc++ headers included in port:clang-xy behave like Apple want. Case in point: Botan3 uses features from C++20 `optional` that Apple only made available in 10.13, and (my build of) clang-17 follows that ... and fails on the incriminated files.
Thus, as noted in that companion PR, it will probably be a win-win for older Macs if ports upgraded to use Botan3 will maintain the option to build/run against Botan2 via a variant. Botan2 seems to be a lot faster, too.
BTW, I still think that it'll be smoother to *copy* the current port:botan into a port:botan2 and then upgrade it. That's how it was done with the upgrade from v1 to v2 and I see no advantage to changing that approach.
(Disclaimer: libc++ updated didn't happen fast enough in MacPorts so I took an advance in my ports tree, and the implementations have diverged.)
|
|
@essandess gcc needs this one-line patch now: https://github.com/macos-powerpc/powerpc-ports/blob/93ec4a2983f9f468f26120293eea5c635c0b84b7/security/botan/files/patch-cstdint.diff |
Added. |
|
essandess left a comment (macports/macports-ports#33643)
> @essandess gcc needs this one-line patch now: https://github.com/macos-powerpc/powerpc-ports/blob/93ec4a2983f9f468f26120293eea5c635c0b84b7/security/botan/files/patch-cstdint.diff
Not required in Botan-3?
EDIT: Nope, done in `botan/types.h`.
|
|
The commits from this PR have been incorporated into #33642. |
Description
Type(s)
Tested on
macOS x.y
Xcode x.y / Command Line Tools x.y.z
Verification
Have you
port lint?sudo port test?sudo port -vst install?