Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 11 additions & 5 deletions maintainers/upload-debug-info-to-sentry.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env nix
#!nix shell --inputs-from . nixpkgs#sentry-cli nixpkgs#python3 nixpkgs#binutils --command python3
#!nix shell --inputs-from . nixpkgs#sentry-cli nixpkgs#python3 nixpkgs#binutils nixpkgs#xz nixpkgs#zstd --command python3

import argparse
import json
Expand Down Expand Up @@ -65,21 +65,27 @@ def download_nar(build_id: str, archive: str) -> str:


def extract_debug_symbols(nar_path: str, member: str, build_id: str) -> str:
"""Extract a member from a .nar.xz into /tmp/debug-info/<build_id>.debug. Returns the output path."""
"""Extract a member from a compressed NAR into /tmp/debug-info/<build_id>.debug. Returns the output path."""
out_path = os.path.join(DEBUG_INFO_DIR, f"{build_id}.debug")
if os.path.exists(out_path):
print(f" already extracted {out_path}", file=sys.stderr)
return out_path
os.makedirs(DEBUG_INFO_DIR, exist_ok=True)
print(f" extracting {member} -> {out_path} ...", file=sys.stderr)
xz = subprocess.Popen(["xz", "-d"], stdin=open(nar_path, "rb"), stdout=subprocess.PIPE)
if nar_path.endswith(".zst"):
decompress_cmd = ["zstd", "-d", "-c"]
elif nar_path.endswith(".xz"):
decompress_cmd = ["xz", "-d"]
else:
raise Exception(f"unknown NAR compression format: {nar_path}")
decompress = subprocess.Popen(decompress_cmd, stdin=open(nar_path, "rb"), stdout=subprocess.PIPE)
nar_cat = subprocess.run(
["nix", "nar", "cat", "/dev/stdin", member],
stdin=xz.stdout,
stdin=decompress.stdout,
capture_output=True,
check=True,
)
xz.wait()
decompress.wait()
Comment thread
edolstra marked this conversation as resolved.
with open(out_path, "wb") as f:
f.write(nar_cat.stdout)
return out_path
Expand Down
3 changes: 0 additions & 3 deletions packaging/dependencies.nix
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,6 @@ scope: {
"--with-url"
"--with-thread"
];
patches = [
./patches/0001-Fix-uncaught_exceptions-not-accounting-for-forced_un.patch
];
enableIcu = false;
inherit stdenv;
}).overrideAttrs
Expand Down

This file was deleted.

10 changes: 5 additions & 5 deletions packaging/secure-packages/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading