Skip to content

Commit e415110

Browse files
committed
install: Define GUIDs globally
To ensure we build without the to-disk feature. Signed-off-by: Colin Walters <[email protected]>
1 parent 9e54c3e commit e415110

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

crates/lib/src/install.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ use std::sync::Arc;
2626
use std::time::Duration;
2727

2828
use anyhow::{anyhow, ensure, Context, Result};
29-
use baseline::{DPS_UUID, ESP_GUID};
3029
use bootc_blockdev::{find_parent_devices, PartitionTable};
3130
use bootc_utils::CommandRunExt;
3231
use camino::Utf8Path;
@@ -104,6 +103,8 @@ const SELINUXFS: &str = "/sys/fs/selinux";
104103
/// The mount path for uefi
105104
const EFIVARFS: &str = "/sys/firmware/efi/efivars";
106105
pub(crate) const ARCH_USES_EFI: bool = cfg!(any(target_arch = "x86_64", target_arch = "aarch64"));
106+
pub(crate) const ESP_GUID: &str = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B";
107+
pub(crate) const DPS_UUID: &str = "6523f8ae-3eb1-4e2a-a05a-18b695ae656f";
107108

108109
const DEFAULT_REPO_CONFIG: &[(&str, &str)] = &[
109110
// Default to avoiding grub2-mkconfig etc.
@@ -615,6 +616,7 @@ impl FromStr for MountSpec {
615616
}
616617
}
617618

619+
#[cfg(feature = "install-to-disk")]
618620
impl InstallToDiskOpts {
619621
pub(crate) fn validate(&self) -> Result<()> {
620622
if !self.composefs_native {

crates/lib/src/install/baseline.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ pub(crate) const LINUX_PARTTYPE: &str = "0FC63DAF-8483-4772-8E79-3D69D8477DE4";
4242
pub(crate) const PREPBOOT_GUID: &str = "9E1A2D38-C612-4316-AA26-8B49521E5A8B";
4343
#[cfg(feature = "install-to-disk")]
4444
pub(crate) const PREPBOOT_LABEL: &str = "PowerPC-PReP-boot";
45-
#[cfg(feature = "install-to-disk")]
46-
pub(crate) const ESP_GUID: &str = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B";
47-
pub(crate) const DPS_UUID: &str = "6523f8ae-3eb1-4e2a-a05a-18b695ae656f";
4845

4946
#[derive(clap::ValueEnum, Default, Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
5047
#[serde(rename_all = "kebab-case")]
@@ -281,7 +278,7 @@ pub(crate) fn install_create_rootfs(
281278
}
282279

283280
let esp_partno = if super::ARCH_USES_EFI {
284-
let esp_guid = ESP_GUID;
281+
let esp_guid = crate::install::ESP_GUID;
285282
partno += 1;
286283
writeln!(
287284
&mut partitioning_buf,
@@ -411,7 +408,7 @@ pub(crate) fn install_create_rootfs(
411408
opts.wipe,
412409
mkfs_options.iter().copied(),
413410
// TODO: Add cli option for this
414-
Some(uuid::uuid!(DPS_UUID)),
411+
Some(uuid::uuid!(crate::install::DPS_UUID)),
415412
)?;
416413
let rootarg = format!("root=UUID={root_uuid}");
417414
let bootsrc = boot_uuid.as_ref().map(|uuid| format!("UUID={uuid}"));

0 commit comments

Comments
 (0)