diff --git a/rust/src/composepost.rs b/rust/src/composepost.rs index ddd4a4c088..5f2e3229e5 100644 --- a/rust/src/composepost.rs +++ b/rust/src/composepost.rs @@ -381,6 +381,8 @@ fn postprocess_subs_dist(rootfs_dfd: &Dir) -> Result<()> { writeln!(w, "/home /var/home")?; writeln!(w, "# https://github.com/coreos/rpm-ostree/pull/4640")?; writeln!(w, "/usr/etc /etc")?; + writeln!(w, "# https://github.com/coreos/rpm-ostree/pull/1795")?; + writeln!(w, "/usr/lib/opt /opt")?; Ok(()) })?; } diff --git a/tests/kolainst/destructive/state-overlays b/tests/kolainst/destructive/state-overlays index c2aac0d1c5..468b96b871 100755 --- a/tests/kolainst/destructive/state-overlays +++ b/tests/kolainst/destructive/state-overlays @@ -68,6 +68,7 @@ EOF /tmp/autopkgtest-reboot 1 ;; 1) + test -f /opt/bin/test-opt test -f /opt/megacorp/bin/test-opt test -f /opt/megacorp/lib/mylib test -d /opt/megacorp/state @@ -76,6 +77,11 @@ EOF assert_file_has_content /tmp/out.txt 'test-opt' assert_file_has_content /opt/megacorp/lib/mylib 'lib1' + stat -c '%C' /opt/bin/test-opt > /tmp/out.txt + assert_file_has_content /tmp/out.txt ':bin_t:' + stat -c '%C' /opt/megacorp > /tmp/out.txt + assert_file_has_content /tmp/out.txt ':usr_t:' + # add some state files echo 'foobar' > /opt/megacorp/state/mystate diff --git a/tests/kolainst/kolainst-build.sh b/tests/kolainst/kolainst-build.sh index 8ed020f163..fed0f8655d 100755 --- a/tests/kolainst/kolainst-build.sh +++ b/tests/kolainst/kolainst-build.sh @@ -98,10 +98,12 @@ build_rpm zincati version 99.99 release 3 # An RPM that installs in /opt build_rpm test-opt \ - install "mkdir -p %{buildroot}/opt/megacorp/{bin,lib,state} + install "mkdir -p %{buildroot}/opt/megacorp/{bin,lib,state} %{buildroot}/opt/bin + install %{name} %{buildroot}/opt/bin install %{name} %{buildroot}/opt/megacorp/bin echo lib1 > %{buildroot}/opt/megacorp/lib/mylib" \ - files "/opt/megacorp" + files "/opt/megacorp + /opt/bin/test-opt" mv ${test_tmpdir}/yumrepo/* ${test_tmpdir}/rpm-repos/${repover}