-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
postgresql: security updates #27691
base: master
Are you sure you want to change the base?
postgresql: security updates #27691
Conversation
Notifying maintainers: |
@dgilman P. S. It seems from variant existence that |
I see that postgresql17 gained a requirement on perl 5.14 but don't see the same comment in postgresql16's docs https://www.postgresql.org/docs/16/install-requirements.html |
@dgilman As a matter of fact, it failed with the system perl 5.10. Possibly requirement is lower than 5.14, but if it is not higher than 5.10, then it is a bug, and it should be. |
postgresql16 has been in MacPorts for ~1.5 years, are you saying you see a regression with the 16.6 -> 16.7 change, or it has never worked on old macs? |
@dgilman I have no idea when this appeared, but configure script of 16.7 has this:
|
I see that, and I opened the bug for the docs in upstream. Honestly, if they're going to start requiring perl for even tarball builds, I'm not opposed to putting the dependency on perl for all versions of macOS. Perl 5.14 came out in 2011 so 10.7, possibly 10.8 needs it. But for everyone else, might as well use a still supported perl? |
Pre-16 versions build normally with system perl 5.10, perhaps on newer systems 16+ will also build with system perl (provided it is at least 5.14). At the same time, it is hard to imagine MacPorts installation without default perl, so perhaps overhead is negligible even if a dependency is added across the board. |
Looking at the configure script you quoted, it only prints a warning and nulls out the PERL variable. The part below it (not quoted) prints out a further warning if PERL is empty. The build does fail if |
@dgilman I am away from the hardware, so can’t check. This is supposed to be reproducible on x86, or if it is not by some miracle, no need to bother fixing it. Maybe perl is enabled by default? |
Can you confirm exactly versions of postgresql you test built on what versions of macos? Maybe it is reproducible on x86 but that doesn't matter, I don't have any old hardware. I am reliant on you and your feedback to make fixes for old systems. You said that postgresql16 doesn't build with old perl, can you provide more details? I had opened a ticket to upstream to address this issue based on your original feedback and now we need to sort out what's going on. |
@dgilman I was building your updates in a row starting from 13 up, doing a clean build (in a sense of deactivating all ports first), and 13–15 built normally, 16–17 failed with ”no perl found”. The failure looked similar or identical, and since it was straightforward, I did not dig into logs further. It is possible that only one failure explicitly mentioned 5.14 requirement, but both failed because of not finding a satisfactory perl. Once I activated perl5 port, both versions built normally. It was on 10.6.8 (ppc irrelevant, since perl version is identical with x86). |
When you have access to the build machines again can you provide the error from the logs? The current situation here is:
If upstream is right this PR is good as-is, if barracuda156 is right it needs the fix in MacPorts and possibly upstream |
Well, I do not really have any reason to fabricate a failure where there is none, and can’t see any alternative reason for it to happen with specific versions, but if somebody tests the build from scratch (with all ports deactivated) on 10.5 or 10.6 on Intel, that should presumably reproduce the failure (10.5 has 5.8.8 and 10.6 has 5.10, I think). Architecture cannot matter here as such; perhaps the only meaningful difference between my setup and what MacPorts has on 10.6 is gcc vs clang, which, hopefully, has no impact on perl detection. However, if on Intel P. S. To be clear, does upstream think that both postgresql16 and postgresql17 should build fine with perl < 5.14 or only postgresql16 should but not postgresql17? |
@dgilman Could you tag me there, please, or share a link? |
By the way, there is no need to delay a security update for the reason discussed. I would suggest adding a dependency on |
@dgilman If I read this correctly, this may mean that once sources are patched, perl becomes required, and there are patches applied: See: macports-ports/databases/postgresql16/Portfile Lines 41 to 44 in 40bf6c7
|
@dgilman On a side note, do you think the upstream will consider fixing back assembler code which was broken earlier? I.e. https://github.com/macports/macports-ports/blob/40bf6c7a44debbc0fea47c8cda5c44fc06be924d/databases/postgresql16/files/patch-fix-ppc-asm.diff |
And that goes back to one of my earliest comments. pg16 has been in macports for 1.5 years, this latest release didn't change the rebuild behavior, did it never work on these old systems? Per the one email discussion above, this postgresql commit was the one that added the requirement on new perl for postgresql 17+. The change is to not include certain files in the tarball and instead rely on Perl to generate them. The MacPorts patches aren't modifying any of those computed files so I don't know why they would be triggering the Perl stuff at compile time. My issue here is that none of this is adding up. What upstream is telling me, what the code is telling me, and what the history in MacPorts is telling me is that MacPorts didn't need new perl on these old systems for pg16 and before. Maybe my understanding of the build process is wrong here, but I'd appreciate logs or an explanation to point out what I'm missing. |
@dgilman The explanation why I never got the failure is trivial: I never deactivated all ports to build something until recent, when I started building ports which can be installable on other systems than my own. So I always had P. S. I will share logs once I have access to my hardware, which is expected to be in about a week. I only have Apple Silicon laptop now, so even 10.6.8 Rosetta won’t work. |
Description
Type(s)
Tested on
macOS 14.6.1 23G93 x86_64
Xcode 16.2 16C5032a
Verification
Have you
port lint
?sudo port test
?sudo port -vst install
?