Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/update-ci-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
python-version: "3.12"

- name: Install pip-tools
run: pip install "pip-tools==8.3.0" "requests==2.33.1"
run: pip install "pip-tools==7.5.3" "requests==2.33.1"

- name: Update pip lock files
id: check
Expand Down
12 changes: 12 additions & 0 deletions build-scripts/hack/patchelf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ def main():
print(f"Failed to parse ELF: {e}")
sys.exit(1)

# Skip patching if the binary has no PT_DYNAMIC segment.
# Attempting to add rpath or interpreter to such a binary (e.g. a statically
# linked binary) creates an inconsistent ELF (has PT_INTERP but no PT_DYNAMIC),
# which breaks the snap classic linter and may cause runtime issues.
if (args.set_rpath or args.set_interpreter) and not binary.has(
lief.ELF.Segment.TYPE.DYNAMIC
):
print(
f"Binary {args.elf_path} has no PT_DYNAMIC segment, skipping RPATH/interpreter patching."
)
sys.exit(0)

did_modify = False

if args.set_rpath:
Expand Down
8 changes: 8 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ architectures:
- build-on: [ppc64el]
- build-on: [s390x]

lint:
ignore:
- classic:
# containerd-shim-runc-v2 may be statically linked (e.g. when built with
# Go FIPS that provides static OpenSSL). Static binaries have no .dynamic
# section, so the classic linter's patchelf rpath check is not applicable.
- bin/containerd-shim-runc-v2

parts:
build-deps:
plugin: nil
Expand Down