Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
705284d
ci: fail nix package builds that exceed glibc 2.31 floor
brainrake Sep 8, 2026
e77bbbd
ci: report offending file path in glibc floor check
brainrake Sep 8, 2026
d4127ea
style: shfmt check-glibc-floor.sh
brainrake Sep 8, 2026
1a8820e
ci: move glibc floor check into nix flake check
brainrake Sep 13, 2026
19a5573
ci: rewrite glibc-floor check logic in nushell
brainrake Sep 13, 2026
06ebba7
ci: list every offending file in glibc-floor check
brainrake Sep 13, 2026
e657889
ci: idiomatic nushell refactor for glibc-floor check
brainrake Sep 13, 2026
c5d724d
ci: scan both legacyPackages and packages in glibc-floor check
brainrake Sep 13, 2026
897948d
ci: filter to real ELF files before running objdump
brainrake Sep 13, 2026
7f22b52
ci: fold file-type check into is-elf, add a return type
brainrake Sep 13, 2026
9ba8779
ci: simplify is-elf to a single short-circuit expression
brainrake Sep 13, 2026
2c45b74
ci: make is-elf consume \$in for point-free where usage
brainrake Sep 13, 2026
2e2af84
ci: drop if/else + compact for a single filter
brainrake Sep 13, 2026
696473b
ci: rewrite glibc floor check as glibc-version-check, idiomatic nushell
brainrake Sep 14, 2026
3da01aa
Merge branch 'develop' into claude/glic-reporting-workflow-60e746
brainrake Sep 14, 2026
5a17d85
Merge branch 'develop' into claude/glic-reporting-workflow-60e746
brainrake Sep 14, 2026
e2dfd61
Merge branch 'develop' into claude/glic-reporting-workflow-60e746
brainrake Sep 17, 2026
8f85071
ci: drop makeWrapper for glibc-version-check's objdump dependency
brainrake Sep 18, 2026
6224414
Merge remote-tracking branch 'origin/develop' into HEAD
brainrake Sep 30, 2026
faa658a
fix: force table width in glibc-version-check for headless nix sandbox
brainrake Oct 1, 2026
0a57dda
Merge branch 'develop' into claude/glic-reporting-workflow-60e746
brainrake Oct 1, 2026
4fb284d
Merge branch 'develop' into claude/glic-reporting-workflow-60e746
brainrake Oct 1, 2026
4da7c25
Merge branch 'develop' into claude/glic-reporting-workflow-60e746
brainrake Oct 2, 2026
e35562c
fix(nix): raise glibc floor target to 2.40
brainrake Oct 5, 2026
de1d022
fix(nix): split glibc targets, 2.40 postgres core only
brainrake Oct 5, 2026
89a2ba9
fix(nix): classify pg_regress/pg_isolation_regress/psql_17_cli_portab…
brainrake Oct 5, 2026
e76ad99
fix(nix): collapse glibc floor to core everywhere except supautils/ga…
brainrake Oct 5, 2026
95175bd
fix(nix): drop core glibc floor, add declared-collation-drift check
brainrake Oct 5, 2026
16c799e
fix(nix): shorten glibc-version-check comment
brainrake Oct 5, 2026
9f48fe8
Merge branch 'develop' into claude/glic-reporting-workflow-60e746
brainrake Oct 5, 2026
3ec76bb
fix(nix): format glibc version as dotted string in check output
brainrake Oct 5, 2026
811e834
Merge remote-tracking branch 'origin/claude/glic-reporting-workflow-6…
brainrake Oct 5, 2026
e1bc6a1
fix(nix): clarify glibc-version-check comment
brainrake Oct 5, 2026
3d96f64
fix(nix): inline collation-version-check baseline
brainrake Oct 6, 2026
47dfc5b
fix(nix): make collation-version-check an eval-time assertion
brainrake Oct 6, 2026
18fa03f
fix(nix): lib.collect doesn't traverse plain lists, legacyPaths was e…
brainrake Oct 6, 2026
8e15e5a
fix(nix): drop gatekeeper from the legacy glibc floor
brainrake Oct 6, 2026
97e789c
fix(nix): pin gatekeeper to the 2.40 floor explicitly
brainrake Oct 6, 2026
5e238b6
Merge remote-tracking branch 'origin/develop' into claude/glic-report…
brainrake Oct 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions nix/checks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,45 @@
postgresql_17_src
;
psql_orioledb-17_exts_orioledb_debug = self'.legacyPackages.psql_orioledb-17.exts.orioledb.debug;
glibc-version-check =
let
checkScript = pkgs.writers.writeNuBin "check-glibc-version" (
builtins.readFile ./tools/check-glibc-version.nu
);
# supautils is dlopened into already-running legacy pre-nix postgres, so it needs a lower floor than an AMI build.
legacyPaths = [
self'.legacyPackages.psql_15.exts.supautils
self'.legacyPackages.psql_17.exts.supautils
self'.legacyPackages."psql_orioledb-17".exts.supautils
];
# gatekeeper is dlopened by the base AMI's own system PAM stack, not postgres's nix
# closure, so it isn't covered by "core and extensions share one glibc" — pin it
# explicitly so a future nixpkgs glibc bump can't silently outrun the base image.
pamPaths = [ self'.packages.gatekeeper ];
in
pkgs.runCommand "glibc-version-check"
{
nativeBuildInputs = [ pkgs.binutils ];
inherit legacyPaths pamPaths;
}
''
# 2.31: Ubuntu 20.04's glibc.
${lib.getExe checkScript} 2.31 $legacyPaths
# 2.40: current core floor.
${lib.getExe checkScript} 2.40 $pamPaths
touch $out
'';
collation-version-check =
let
baseline = "glibc-2.40-66";
actual = pkgs.glibc.name;
in
assert lib.assertMsg (actual == baseline) ''
glibc collation data changed: baseline is ${baseline}, build has ${actual}.
This can change collation versions and require a reindex.
If this bump has been reviewed for collation safety, update the baseline in nix/checks.nix to match.
'';
pkgs.runCommand "collation-version-check" { } "touch $out";
};
};
}
38 changes: 38 additions & 0 deletions nix/tools/check-glibc-version.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env nu

def parse-version [] {
split row "." | each { into int }
}

def is-elf []: path -> bool {
(open --raw $in | bytes at 0..<4) == ("\u{7f}ELF" | into binary)
}

def max-glibc-version [path: path] {
^objdump -T $path | complete | get stdout
| parse -r 'GLIBC_(?<ver>[0-9.]+)' | get ver
| each { parse-version }
| sort
| last
}

# Fails if any file under the given paths requires a newer glibc than max_version.
def main [max_version: string, ...paths: path] {
let offenders = (
$paths
| each { glob $"($in)/**/*" } | flatten
| where { ($in | path type) == file }
| where { is-elf }
| par-each { |f| { file: $f, version: (max-glibc-version $f) } }
| compact version
| where version > ($max_version | parse-version)
)

if ($offenders | is-empty) {
print $"glibc version OK \(<= ($max_version)\)"
exit 0
}

print ($offenders | update version { str join "." } | table --width 200)
exit 1
}
Loading