Skip to content

Commit a2d48f7

Browse files
committed
Switch to Heliosv3
1 parent 6d7c6e7 commit a2d48f7

File tree

8 files changed

+28
-9
lines changed

8 files changed

+28
-9
lines changed

.github/buildomat/jobs/a4x2-prepare.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#:
33
#: name = "a4x2-prepare"
44
#: variety = "basic"
5-
#: target = "helios-2.0"
5+
#: target = "helios-3.0"
66
#: rust_toolchain = true
77
#: output_rules = [
88
#: "=/out/cargo-bay-ce.tgz",

.github/buildomat/jobs/build-and-test-helios.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#:
33
#: name = "build-and-test (helios)"
44
#: variety = "basic"
5-
#: target = "helios-2.0"
5+
#: target = "helios-3.0"
66
#: rust_toolchain = true
77
#: output_rules = [
88
#: "%/work/*",

.github/buildomat/jobs/check-features.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#:
33
#: name = "check-features (helios)"
44
#: variety = "basic"
5-
#: target = "helios-2.0"
5+
#: target = "helios-3.0"
66
#: rust_toolchain = true
77
#: output_rules = [
88
#: "/out/*",

.github/buildomat/jobs/clippy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#:
33
#: name = "clippy (helios)"
44
#: variety = "basic"
5-
#: target = "helios-2.0"
5+
#: target = "helios-3.0"
66
#: rust_toolchain = true
77
#: output_rules = []
88

.github/buildomat/jobs/omicron-common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#:
33
#: name = "omicron-common (helios)"
44
#: variety = "basic"
5-
#: target = "helios-2.0"
5+
#: target = "helios-3.0"
66
#: rust_toolchain = true
77
#: output_rules = []
88

.github/buildomat/jobs/package.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#:
33
#: name = "helios / package"
44
#: variety = "basic"
5-
#: target = "helios-2.0"
5+
#: target = "helios-3.0"
66
#: rust_toolchain = true
77
#: output_rules = [
88
#: "=/work/package.tar.gz",

.github/buildomat/jobs/tuf-repo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#:
33
#: name = "helios / build TUF repo"
44
#: variety = "basic"
5-
#: target = "helios-2.0"
5+
#: target = "helios-3.0"
66
#: rust_toolchain = true
77
#: output_rules = [
88
#: "=/work/manifest.toml",

dev-tools/releng/src/helios.rs

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const MANIFEST_PATH: &str = "incorporation.p5m";
2323
const REPO_PATH: &str = "incorporation";
2424
pub const ARCHIVE_PATH: &str = "incorporation.p5p";
2525

26-
pub const PUBLISHER: &str = "helios-dev";
26+
pub const PUBLISHER: &str = "helios";
2727

2828
pub(crate) enum Action {
2929
Generate { version: String },
@@ -109,6 +109,23 @@ pub(crate) async fn push_incorporation_jobs(
109109
Ok(())
110110
}
111111

112+
fn parse_version_id<P: AsRef<Path>>(path: P) -> io::Result<u32> {
113+
let contents = fs::read_to_string(path)?;
114+
115+
let value = contents
116+
.lines()
117+
.find_map(|line| {
118+
line.strip_prefix("VERSION_ID=").map(|v| v.trim_matches('"'))
119+
})
120+
.ok_or_else(|| {
121+
io::Error::new(io::ErrorKind::InvalidData, "VERSION_ID not found")
122+
})?;
123+
124+
value
125+
.parse::<u32>()
126+
.map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))
127+
}
128+
112129
async fn generate_incorporation_manifest(
113130
logger: Logger,
114131
path: Utf8PathBuf,
@@ -119,9 +136,11 @@ async fn generate_incorporation_manifest(
119136
fmri: String,
120137
}
121138

139+
let dashrev = parse_version_id("/etc/os-release")?;
140+
122141
let mut manifest = BufWriter::new(File::create(path).await?);
123142
let preamble = format!(
124-
r#"set name=pkg.fmri value=pkg://{PUBLISHER}/{INCORP_NAME}@{version},5.11
143+
r#"set name=pkg.fmri value=pkg://{PUBLISHER}/{INCORP_NAME}@{version}-{dashrev}.0,5.11
125144
set name=pkg.summary value="Incorporation to constrain software delivered in Omicron Release V{version} images"
126145
set name=info.classification value="org.opensolaris.category.2008:Meta Packages/Incorporations"
127146
set name=variant.opensolaris.zone value=global value=nonglobal

0 commit comments

Comments
 (0)