-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3103 from cgwalters/tmpfiles-factory-var
tmpfiles: Copy `/usr/share/factory/var` to `/var`
- Loading branch information
Showing
3 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
set -xeuo pipefail | ||
|
||
. ${KOLA_EXT_DATA}/libinsttest.sh | ||
|
||
require_writable_sysroot | ||
prepare_tmpdir | ||
|
||
case "${AUTOPKGTEST_REBOOT_MARK:-}" in | ||
"") | ||
factory_var=rootfs/usr/share/factory/var | ||
mkdir -p ${factory_var} | ||
cd "${factory_var}" | ||
mkdir -p home/someuser | ||
echo bashrc > home/someuser/.bashrc | ||
chown -R 1000:1000 home/someuser | ||
mkdir -m 01777 -p tmp | ||
cd - | ||
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_not_file_has_content err.txt 'contains content in /var' | ||
|
||
/tmp/autopkgtest-reboot "2" | ||
;; | ||
2) | ||
assert_file_has_content /home/someuser/.bashrc bashrc | ||
;; | ||
*) fatal "Unexpected AUTOPKGTEST_REBOOT_MARK=${AUTOPKGTEST_REBOOT_MARK}" ;; | ||
esac |