You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
csmock does not work well with systemd-nspawn on RHEL-8 because systemd-239-78.e8 does not include a systemd hack which mockuses internally and which csmock relies on. If the environment variable is ignored by systemd-nspawn, /tmp is over-mounted by a fresh tmpfs file system on each invocation of mock --chroot or mock --shell, and whatever we put into /tmp is missing in the next steps. For example:
>>> 2023-11-30 14:42:13 "tar -cP '/usr/share/csmock/scripts' '/tmp/csmockpvtw2ssw/cloud-init-21.1-15.el8_6.1.src.rpm' '/tmp/csmockpvtw2ssw/gitleaks' | '/usr/bin/mock' '-r' 'rhel-8.7.0.z-x86_64' '--plugin-option=tmpfs:keep_mounted=True' '--config-opts=print_main_output=True' '--quiet' '--shell' 'tar -xC/'"
tar: Removing leading `/' from member names
>>> 2023-11-30 14:42:15 "/usr/bin/mock" "-r" "rhel-8.7.0.z-x86_64" "--plugin-option=tmpfs:keep_mounted=True" "--config-opts=print_main_output=True" "--quiet" "--chroot" "rpm -Uvh --nodeps '/tmp/csmockpvtw2ssw/cloud-init-21.1-15.el8_6.1.src.rpm'"
error: open of /tmp/csmockpvtw2ssw/cloud-init-21.1-15.el8_6.1.src.rpm failed: No such file or directory
[...]
>>> 2023-11-30 14:42:30 "/usr/bin/mock" "-r" "rhel-8.7.0.z-x86_64" "--plugin-option=tmpfs:keep_mounted=True" "--config-opts=print_main_output=True" "--quiet" "--chroot" "/tmp/csmockpvtw2ssw/gitleaks detect --no-git cmd --source=/builddir/build/BUILD --report-path=/builddir/gitleaks-capture.sarif --report-format=sarif 2>/builddir/gitleaks-capture.log"
>>> 2023-11-30 14:42:32 "'/usr/bin/mock' '-r' 'rhel-8.7.0.z-x86_64' '--plugin-option=tmpfs:keep_mounted=True' '--config-opts=print_main_output=True' '--quiet' '--shell' 'tar -c --remove-files '/builddir/gitleaks-capture.sarif' '/builddir/gitleaks-capture.log'' | tar -xC '/tmp/csmockpvtw2ssw/cloud-init-21.1-15.el8_6.1/debug/raw-results'"
tar: Removing leading `/' from member names
tar: /builddir/gitleaks-capture.sarif: Cannot stat: No such file or directory
tar: Removing leading `/' from hard link targets
tar: Exiting with failure status due to previous errors
>>> 2023-11-30 14:42:34 "csgrep '/tmp/csmockpvtw2ssw/cloud-init-21.1-15.el8_6.1/debug/raw-results/builddir/gitleaks-capture.sarif' --mode=json --warning-rate-limit=1024 --limit-msg-len=512 > '/tmp/csmockpvtw2ssw/cloud-init-21.1-15.el8_6.1/debug/uni-results/gitleaks-capture.js'"
/tmp/csmockpvtw2ssw/cloud-init-21.1-15.el8_6.1/debug/raw-results/builddir/gitleaks-capture.sarif: failed to open input file
!!! 2023-11-30 14:42:34 error: post-process hook failed
The text was updated successfully, but these errors were encountered:
csmock
does not work well withsystemd-nspawn
on RHEL-8 becausesystemd-239-78.e8
does not include a systemd hack whichmock
uses internally and whichcsmock
relies on. If the environment variable is ignored bysystemd-nspawn
,/tmp
is over-mounted by a freshtmpfs
file system on each invocation ofmock --chroot
ormock --shell
, and whatever we put into/tmp
is missing in the next steps. For example:The text was updated successfully, but these errors were encountered: