-
Notifications
You must be signed in to change notification settings - Fork 386
Open
Description
- Build crun from git main branch (git commit 96e9b99) and install the binary to ~/crun/crun
- Create hooks dir
mkdir $HOME/hooks.d - Create policy file
$HOME/hooks.d/foobar.jsoncontaining{ "version": "1.0.0", "hook": { "path": "/bin/non-existent" }, "when": { "annotations": { "^myannotation$": "yes" } }, "stages": ["poststop"] } - Create file
$HOME/test.bashcontaining#!/bin/bash set -o nounset runtime=$1 podman \ --runtime $runtime \ --hooks-dir ~/hooks.d \ run \ --pull never \ --rm \ --annotation myannotation=yes \ docker.io/library/alpine \ sh -c "echo hello" echo return value = $? - Run
bash test.bash ~/crun/cruna few timesresult: There is no warning printed. Compare this result to the result in the issue Warning is not always printed when using a poststop hook with$ bash test.bash ~/crun/crun hello return value = 0 $ bash test.bash ~/crun/crun hello return value = 0 $ bash test.bash ~/crun/crun hello return value = 0 $ bash test.bash ~/crun/crun hello return value = 0 $/bin/false#1945
discussion
The configured executable path /bin/non-existent does not exist
$ ls /bin/non-existent
ls: cannot access '/bin/non-existent': No such file or directory
Should a warning be printed?
Compare this result to the result in issue #1945 where a warning sometimes is printed when using /bin/false
side note:
I tried the same with runc but got similar results.
about the system
crun built from git main branch (git commit 96e9b99)
runc version 1.4.0
podman version 5.7.1
$ ~/crun/crun --version
crun version 1.26.0.0.0.1-96e9b
commit: 96e9b992c6839c84c83327d51b1808b7719e8c4d
rundir: /run/user/1005/crun
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
$ podman --version
podman version 5.7.1
$ runc --version
runc version 1.4.0
spec: 1.3.0
go: go1.25.4 X:nodwarf5
libseccomp: 2.6.0
$ rpm-ostree status
State: idle
warning: Failed to query journal: couldn't find current boot in journal
Deployments:
● ostree-image-signed:docker://quay.io/fedora/fedora-coreos:rawhide
Digest: sha256:32e07fd28e5fa8a9417334ed11b227670c95321eaf8194e2451410438e424502
Version: 44.20251219.91.0 (2025-12-19T07:37:08Z)
LayeredPackages: docker-buildkit docker-buildx emacs-nox golang make
ostree-image-signed:docker://quay.io/fedora/fedora-coreos:rawhide
Digest: sha256:32e07fd28e5fa8a9417334ed11b227670c95321eaf8194e2451410438e424502
Version: 44.20251219.91.0 (2025-12-19T07:37:08Z)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels