-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
libpq: init at 17.2 #359659
libpq: init at 17.2 #359659
Conversation
d97ea3c
to
ca6dc81
Compare
1eb5366
to
862bd30
Compare
862bd30
to
10eca45
Compare
I promise, I haven't forgotten about that, I'll do my best to schedule a review soon! :)) |
7ab2b37
to
bc79bc4
Compare
Since psqlodbc is an official upstream project, we should take ownership of it.
The latest version is not available from odbc/versions.old/.., thus move to fetchFromGitHub. No changelog found anywhere.
bc79bc4
to
cfc0545
Compare
FYI pushed a fix for pdo_pgsql/pgsql exts in PHP. |
Seems like that needs some nixfmt, I don't get why, though. |
f54d73e
to
448a13d
Compare
Fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change itself looks good to me.
After re-reading #294504 (comment) I'm not sure if I consider the status quo that bad: packages like psycopg or pdo_pgsql only depend on the lib output at runtime which is effectively libpq already. The static build seems to produce static libraries successfully as well nowadays. Regarding dependency concerns, one may still work with outputChecks
.
OTOH with another postgresql package that's then used for the test hook we could allow shipping all server updates to master directly. But then again, we could also ship security updates to staging-next directly to speed things up a bit.
I'm not sure.
I'm slightly leaning towards this solution, but figured it'd make sense to share my thoughts from review before merging (hoping that we didn't discuss this before and I just didn't find the thread again), not after.
Apologies, misclicked 😅 |
Dependencies come into play whenever we need to (re-)build. For us the most relevant case is the one inside nixpkgs - where we discuss how to speed up merging to master etc. However, there's more: Yes, postgresql builds in pkgsStatic now. But it still carries more dependencies. All of which might need to be rebuild when you're trying to actually cross-compile libpq. The whole cross-compilation thing was brought up repeatedly, e.g. in #61580 (comment).
Essentially most of the discussion in #61580 is exactly about this. I'd summarize this as: many are for a split, few are for no split. Although, to be fair those numbers are certainly without considering the facts that the outputs are now split and pkgsStatic actually builds.... ... that is, it builds on Linux. One example why Try building * which in itself is quite a 🥳 moment for me! |
Resolves NixOS#61580
448a13d
to
546ece5
Compare
I squashed that into the main libpq commit. |
Addition: The same happens for me on |
So was I, when I started my comment above. Finding out about darwin and freebsd and the actual practical consequences, I convinced myself. Thus: Merging! |
After sleeping one night over it and reading your comment, I also agree (just ftr). Thanks a lot for your work here! |
This creates a separate libpq package as discussed in #61580 (comment).
This brings down the number of rebuilds after updating
postgresql
to about 1.2k darwin and 2.5k linux. Before, they were ~ around 5k, IIRC.Unfortunately, we are still not anywhere low enough to be able to merge
postgresql
updates directly into master. I think the nr. 1 reason for that ispostgresqlTestHook
- and the fact that many packages use a very simple postgresql server in their build dependencies for the check phase.The only way to get the number of rebuilds lower would be to package
postgresqlTestHook
as a separate postgresql derivation. The idea would be, that security related issues are irrelevant for the check phase of other packages - and thus updating this separately could easily go through staging with a certain delay. This derivation could also be one that is built with the minimal feature set, making it slimmer overall.I still think that introducing
libpq
is a good thing on it's own, thus this PR.Closes #61580 and #191920
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.