deploy: Warn if we find content in the deployment's /var
This will be ignored, so let's make it very clear people are doing something wrong. Motivated by a bug in a build pipeline that injected `/var/lib/rpm` into an ostree commit which ended up crashing rpm-ostree because it was an empty db which it wasn't expecting. It *also* turns out rpm-ostree is incorrectly dumping content in the deployment `/var` today, which is another bug.
This commit is contained in:
1 parent
3d66db2bae
commit
edf7477ee9
2 files changed
+49
No files matched your search
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
set -xeuo pipefail
|
||||
|
||||
. ${KOLA_EXT_DATA}/libinsttest.sh
|
||||
|
||||
require_writable_sysroot
|
||||
prepare_tmpdir
|
||||
|
||||
mkdir -p rootfs/var/shouldntdothis/subdir
|
||||
ostree commit -b testlint --no-bindings --selinux-policy-from-base --tree=ref="${host_refspec}" --consume --tree=dir=rootfs
|
||||
ostree admin deploy testlint 2>err.txt
|
||||
assert_file_has_content err.txt 'Deploying commit.*which contains content in /var/shouldntdothis'
|
||||
echo "ok content in /var"
|
||||
Reference in new issue
Block a user