Merge pull request #2563 from cgwalters/tmpfiles-run
tmpfiles: Create `/run/ostree`
This commit is contained in:
commit
2f11977da5
|
|
@ -13,5 +13,7 @@
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
# License along with this library. If not, see <https://www.gnu.org/licenses/>.
|
# License along with this library. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# ostree runtime configuration
|
||||||
|
d /run/ostree 0755 root root -
|
||||||
# https://github.com/ostreedev/ostree/issues/393
|
# https://github.com/ostreedev/ostree/issues/393
|
||||||
R! /var/tmp/ostree-unlock-ovl.*
|
R! /var/tmp/ostree-unlock-ovl.*
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
//! Tests that mostly use the API and access the booted sysroot read-only.
|
//! Tests that mostly use the API and access the booted sysroot read-only.
|
||||||
|
|
||||||
|
use std::os::unix::prelude::PermissionsExt;
|
||||||
|
use std::path::Path;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use ostree_ext::prelude::*;
|
use ostree_ext::prelude::*;
|
||||||
use ostree_ext::{gio, ostree};
|
use ostree_ext::{gio, ostree};
|
||||||
|
|
@ -45,3 +48,13 @@ fn test_immutable_bit() -> Result<()> {
|
||||||
cmd_has_output(sh_inline::bash_command!("lsattr -d /").unwrap(), "-i-")?;
|
cmd_has_output(sh_inline::bash_command!("lsattr -d /").unwrap(), "-i-")?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[itest]
|
||||||
|
fn test_tmpfiles() -> Result<()> {
|
||||||
|
if skip_non_ostree_host() {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
let metadata = Path::new("/run/ostree").metadata()?;
|
||||||
|
assert_eq!(metadata.permissions().mode() & !nix::libc::S_IFMT, 0o755);
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue