Skip to content

Commit

Permalink
install: Drop default config
Browse files Browse the repository at this point in the history
Let's require the OS/distro to inject the defaults they want.

Signed-off-by: Colin Walters <[email protected]>
  • Loading branch information
cgwalters committed Oct 20, 2023
1 parent 083c1af commit 5cfe99d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ all-test:

install:
install -D -m 0755 -t $(DESTDIR)$(prefix)/bin target/release/bootc
install -D -m 0644 -t $(DESTDIR)$(prefix)/lib/bootc/install lib/src/install/*.toml
install -d $(DESTDIR)$(prefix)/lib/bootc/install
if test -d man; then install -D -m 0644 -t $(DESTDIR)$(prefix)/share/man/man8 man/*.8; fi

bin-archive: all
Expand Down
9 changes: 7 additions & 2 deletions lib/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,13 @@ pub(crate) mod config {
/// Verify that we can parse our default config file
fn test_parse_config() {
use super::baseline::Filesystem;
let buf = include_str!("install/00-defaults.toml");
let c: InstallConfigurationToplevel = toml::from_str(buf).unwrap();

let c: InstallConfigurationToplevel = toml::from_str(
r##"[install]
root-fs-type = "xfs"
"##,
)
.unwrap();
let mut install = c.install.unwrap();
assert_eq!(install.root_fs_type.unwrap(), Filesystem::Xfs);
let other = InstallConfigurationToplevel {
Expand Down
3 changes: 0 additions & 3 deletions lib/src/install/00-defaults.toml

This file was deleted.

0 comments on commit 5cfe99d

Please sign in to comment.