diff --git a/.github/workflows/build-austin-dist.yml b/.github/workflows/build-austin-dist.yml index 98c80d028420..9daee908dd65 100644 --- a/.github/workflows/build-austin-dist.yml +++ b/.github/workflows/build-austin-dist.yml @@ -185,10 +185,16 @@ jobs: sudo apt-get install -y -qq --no-install-recommends gdb echo "core.%p" | sudo tee /proc/sys/kernel/core_pattern + # test_native_wall_time and test_native_interleaved (austin -n) need native + # frames from austinp; the wheel ships austin alone (see "Build austin and + # package the wheel" above: austinp's native unwinding segfaults on riscv64), + # so those samples carry no frames at all. - name: Run upstream's tests run: | ulimit -c unlimited - python -m pytest -svr a test/functional test/integrity + python -m pytest -svr a test/functional test/integrity \ + --deselect test/functional/test_native.py::test_native_wall_time \ + --deselect test/functional/test_native.py::test_native_interleaved # test_where_multiprocess asserts that a single -w snapshot catches both # children inside fact(); upstream marks it flaky and these runners are @@ -197,7 +203,9 @@ jobs: run: | ulimit -c unlimited sudo -E env PATH="$PATH" python -m pytest -svr a test/functional test/integrity \ - --deselect test/functional/test_attach.py::test_where_multiprocess + --deselect test/functional/test_attach.py::test_where_multiprocess \ + --deselect test/functional/test_native.py::test_native_wall_time \ + --deselect test/functional/test_native.py::test_native_interleaved gpl_sources: needs: [setup] diff --git a/docs/packages/austin-dist.yaml b/docs/packages/austin-dist.yaml index 9af5e4e5d4f5..cf38d96b762d 100644 --- a/docs/packages/austin-dist.yaml +++ b/docs/packages/austin-dist.yaml @@ -17,3 +17,4 @@ versions: gpl-sources: filename: gpl-sources.tar description: gcc +- version: 4.1.0 diff --git a/patches/austin-dist/4.1.0/0001-build-wheel-ship-the-licence-files-in-the-wheel.patch b/patches/austin-dist/4.1.0/0001-build-wheel-ship-the-licence-files-in-the-wheel.patch new file mode 100644 index 000000000000..d22c0029308e --- /dev/null +++ b/patches/austin-dist/4.1.0/0001-build-wheel-ship-the-licence-files-in-the-wheel.patch @@ -0,0 +1,93 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Mon, 21 Sep 2026 00:00:00 +0000 +Subject: [PATCH] build-wheel: ship the licence files in the wheel + +The wheels ship the austin and austinp binaries, and austin is GPL-3.0, but +no copy of the licence travels with them: the only trace of it is the +"License: GPLv3+" metadata field. Section 4 of the GPL asks whoever +distributes the program to hand out the licence text with it, and the +binaries also carry statically linked third-party code (libunwind, and +binutils' libbfd, libiberty and libsframe for austinp) whose licences belong +in the wheel too. + +Write every file named by the new --licenses option into +/licenses/ and declare it with License-File, which needs +Metadata-Version 2.4 (PEP 639). The default keeps the project's own +LICENSE.md in every wheel. + +Upstream-Status: To upstream [not yet submitted] + +Signed-off-by: Ludovic Henry +--- +diff --git a/scripts/build-wheel.py b/scripts/build-wheel.py +--- a/scripts/build-wheel.py ++++ b/scripts/build-wheel.py +@@ -95,7 +95,13 @@ def make_message(headers, payload=None): + + + def write_austin_wheel( +- out_dir, *, version, platform, austin_bin_data, free_threaded=True ++ out_dir, ++ *, ++ version, ++ platform, ++ austin_bin_data, ++ license_files, ++ free_threaded=True, + ): + package_name = "austin-dist" + # All Python version tags covered by this wheel: the generic py3 tag plus, +@@ -120,10 +126,11 @@ def write_austin_wheel( + + contents[f"{dist_info}/METADATA"] = make_message( + { +- "Metadata-Version": "2.1", ++ "Metadata-Version": "2.4", + "Name": package_name, + "Version": version, + **METADATA, ++ "License-File": [_.name for _ in license_files], + }, + Path("README.md") + .read_text("utf-8") +@@ -132,6 +139,9 @@ def write_austin_wheel( + 'img src="https://raw.githubusercontent.com/P403n1x87/austin/refs/heads/master/art', + ), + ) ++ for license_file in license_files: ++ contents[f"{dist_info}/licenses/{license_file.name}"] = license_file.read_bytes() ++ + contents[f"{dist_info}/WHEEL"] = make_message( + { + "Wheel-Version": "1.0", +@@ -203,6 +213,14 @@ if __name__ == "__main__": + default=None, + ) + ++ argp.add_argument( ++ "--licenses", ++ help="Licence files to ship in the wheel", ++ nargs="+", ++ type=Path, ++ default=[Path("LICENSE.md")], ++ ) ++ + argp.add_argument( + "--files", + help="The variant to binary file mapping (e.g. austin:src/austin)", +@@ -239,6 +257,7 @@ if __name__ == "__main__": + (file_name, Path(bin_path).read_bytes()) + for file_name, bin_path in (file.split(":") for file in args.files) + ], ++ license_files=args.licenses, + free_threaded=free_threaded, + ) + else: +@@ -254,5 +273,6 @@ if __name__ == "__main__": + download_release(version, suffix, variant_name=variant) + for variant in variants + ], ++ license_files=args.licenses, + free_threaded=free_threaded, + ) diff --git a/patches/austin-dist/4.1.0/0002-test-tolerate-a-host-with-no-var-log-syslog.patch b/patches/austin-dist/4.1.0/0002-test-tolerate-a-host-with-no-var-log-syslog.patch new file mode 100644 index 000000000000..d1c655694807 --- /dev/null +++ b/patches/austin-dist/4.1.0/0002-test-tolerate-a-host-with-no-var-log-syslog.patch @@ -0,0 +1,42 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Mon, 21 Sep 2026 00:00:00 +0000 +Subject: [PATCH] test: tolerate a host with no /var/log/syslog + +collect_logs() is called from Variant.prepare_result() after every single +austin invocation, and on Linux it opens /var/log/syslog unconditionally. That +file is an rsyslog artefact: a journald-only host (Fedora, RHEL, Rocky, Arch, +or a minimal Ubuntu image like the self-hosted riscv64 runners) has none, so +the helper raises before the test under it can assert anything: + + test/utils.py:154: in collect_logs + with Path("/var/log/syslog").open(errors="replace") as logfile: + E FileNotFoundError: [Errno 2] No such file or directory: '/var/log/syslog' + + ================== 40 failed, 27 skipped in 512.75s (0:08:32) ================== + +Every failure in that run was this line; nothing about austin was exercised. +Return no logs when the file is absent, which is what the macOS branch below +already does, and leave the diagnostics untouched where rsyslog is installed. + +Upstream-Status: To upstream [not yet submitted] + +Signed-off-by: Ludovic Henry +--- +diff --git a/test/utils.py b/test/utils.py +--- a/test/utils.py ++++ b/test/utils.py +@@ -151,7 +151,12 @@ def collect_logs(variant: str, pid: int) -> List[str]: + needles: tuple[str, ...] + match platform.system(): + case "Linux": +- with Path("/var/log/syslog").open(errors="replace") as logfile: ++ syslog = Path("/var/log/syslog") ++ if not syslog.is_file(): ++ # Not every Linux host has rsyslog; on a journald-only system ++ # there is no file to grep for austin's messages. ++ return [] ++ with syslog.open(errors="replace") as logfile: + needles = (f"{variant}[{pid}]", f"systemd-coredump[{pid}]") + return [ + f" logs for {variant}[{pid}] ".center(80, "="),