diff --git a/modify-as-nestos-stream.patch b/0001-modify-as-nestos-stream.patch similarity index 65% rename from modify-as-nestos-stream.patch rename to 0001-modify-as-nestos-stream.patch index eb5ac5ec3332c93b2f265750d6908c0a2cc9437f..ff4c80dbdf1752b2d440857dddc6c167b8ad2e3a 100644 --- a/modify-as-nestos-stream.patch +++ b/0001-modify-as-nestos-stream.patch @@ -1,30 +1,46 @@ -diff -uprN zincati-0.0.24/docs/development/os-metadata.md zincati-0.0.24-new/docs/development/os-metadata.md ---- zincati-0.0.24/docs/development/os-metadata.md 1973-11-30 05:33:09.000000000 +0800 -+++ zincati-0.0.24-new/docs/development/os-metadata.md 2022-09-01 22:14:16.419124499 +0800 -@@ -31,7 +31,7 @@ Booted deployment must provide several m +From 67ce1b700372637050218715411984226b6ab9ef Mon Sep 17 00:00:00 2001 +From: jianli-97 +Date: Mon, 15 Apr 2024 13:30:27 +0800 +Subject: [PATCH] modify as nestos stream + +--- + docs/development/os-metadata.md | 2 +- + src/rpm_ostree/cli_status.rs | 2 +- + tests/fixtures/rpm-ostree-staged.json | 4 ++-- + tests/fixtures/rpm-ostree-status.json | 2 +- + tests/kola/server/test-stream.sh | 6 +++--- + 5 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/docs/development/os-metadata.md b/docs/development/os-metadata.md +index a99a48b..b6edc57 100644 +--- a/docs/development/os-metadata.md ++++ b/docs/development/os-metadata.md +@@ -30,7 +30,7 @@ Booted deployment must provide several mandatory metadata entries: + * `checksum`: OSTree commit revision * `version`: OS version * under `base-commit-meta`: - * `coreos-assembler.basearch`: base architecture - * `fedora-coreos.stream`: update stream + * `nestos.stream`: update stream All those metadata entries must exist with a non-empty string value. -diff -uprN zincati-0.0.24/src/rpm_ostree/cli_status.rs zincati-0.0.24-new/src/rpm_ostree/cli_status.rs ---- zincati-0.0.24/src/rpm_ostree/cli_status.rs 1973-11-30 05:33:09.000000000 +0800 -+++ zincati-0.0.24-new/src/rpm_ostree/cli_status.rs 2022-09-01 22:13:30.381509120 +0800 -@@ -63,7 +63,7 @@ pub struct DeploymentJson { - struct BaseCommitMetaJson { - #[serde(rename = "coreos-assembler.basearch")] - basearch: String, +diff --git a/src/rpm_ostree/cli_status.rs b/src/rpm_ostree/cli_status.rs +index 1be93e3..68682e8 100644 +--- a/src/rpm_ostree/cli_status.rs ++++ b/src/rpm_ostree/cli_status.rs +@@ -74,7 +74,7 @@ pub struct Deployment { + /// Metadata from base commit (only fields relevant to zincati). + #[derive(Clone, Debug, Deserialize)] + struct BaseCommitMeta { - #[serde(rename = "fedora-coreos.stream")] + #[serde(rename = "nestos.stream")] - stream: String, + stream: Option, } -diff -uprN zincati-0.0.24/tests/fixtures/rpm-ostree-staged.json zincati-0.0.24-new/tests/fixtures/rpm-ostree-staged.json ---- zincati-0.0.24/tests/fixtures/rpm-ostree-staged.json 1973-11-30 05:33:09.000000000 +0800 -+++ zincati-0.0.24-new/tests/fixtures/rpm-ostree-staged.json 2022-09-01 22:16:06.002212519 +0800 +diff --git a/tests/fixtures/rpm-ostree-staged.json b/tests/fixtures/rpm-ostree-staged.json +index 12bac6e..7e25bad 100644 +--- a/tests/fixtures/rpm-ostree-staged.json ++++ b/tests/fixtures/rpm-ostree-staged.json @@ -9,7 +9,7 @@ "coreos-assembler.config-dirty" : "false", "rpmostree.inputhash" : "77dbde3d9502f2f87757d2b68b93b52efa2c65fb7b1fc317e0ffc50b483a3a52", @@ -43,9 +59,10 @@ diff -uprN zincati-0.0.24/tests/fixtures/rpm-ostree-staged.json zincati-0.0.24-n "version" : "31.20200505.3.0", "rpmostree.initramfs-args" : [ "--add=ignition", -diff -uprN zincati-0.0.24/tests/fixtures/rpm-ostree-status.json zincati-0.0.24-new/tests/fixtures/rpm-ostree-status.json ---- zincati-0.0.24/tests/fixtures/rpm-ostree-status.json 1973-11-30 05:33:09.000000000 +0800 -+++ zincati-0.0.24-new/tests/fixtures/rpm-ostree-status.json 2022-09-01 22:14:39.301431354 +0800 +diff --git a/tests/fixtures/rpm-ostree-status.json b/tests/fixtures/rpm-ostree-status.json +index 6e62cc2..ed041cc 100644 +--- a/tests/fixtures/rpm-ostree-status.json ++++ b/tests/fixtures/rpm-ostree-status.json @@ -8,7 +8,7 @@ "coreos-assembler.config-dirty" : "true", "coreos-assembler.config-gitrev" : "e5ffda727170e124c7f7d8782e256b0462bf9869", @@ -55,9 +72,10 @@ diff -uprN zincati-0.0.24/tests/fixtures/rpm-ostree-status.json zincati-0.0.24-n "rpmostree.inputhash" : "0e2ba98bac847c8a8cc5ffd42822a41d53ef6719ccaf6a0094559768aa24da33", "version" : "30.1", "rpmostree.rpmmd-repos" : [ -diff -uprN zincati-0.0.24/tests/kola/server/test-stream.sh zincati-0.0.24-new/tests/kola/server/test-stream.sh ---- zincati-0.0.24/tests/kola/server/test-stream.sh 1973-11-30 05:33:09.000000000 +0800 -+++ zincati-0.0.24-new/tests/kola/server/test-stream.sh 2022-09-01 22:15:44.394996808 +0800 +diff --git a/tests/kola/server/test-stream.sh b/tests/kola/server/test-stream.sh +index 96b1d52..f45e913 100755 +--- a/tests/kola/server/test-stream.sh ++++ b/tests/kola/server/test-stream.sh @@ -66,7 +66,7 @@ EOF ostree --repo=/var/www pull-local /ostree/repo "$cur_payload" # Create a new branch `test-branch` by creating a dummy commit. @@ -85,3 +103,6 @@ diff -uprN zincati-0.0.24/tests/kola/server/test-stream.sh zincati-0.0.24-new/te --keep-metadata='coreos-assembler.basearch' --parent="$cur_payload")" jq \ +-- +2.33.0 + diff --git a/rust-zincati.spec b/rust-zincati.spec index 357bdfd1b38b17f5355ae2eb302fbea60c365341..bf8c1defffbd58b46070f9fc58451eab9d8be500 100644 --- a/rust-zincati.spec +++ b/rust-zincati.spec @@ -1,19 +1,17 @@ %bcond_without check %global __cargo_skip_build 0 %global crate zincati -%global zcuid 986 Name: rust-%{crate} -Version: 0.0.24 -Release: 8 +Version: 0.0.27 +Release: 1 Summary: Update agent for NestOS License: Apache-2.0 URL: https://crates.io/crates/%{crate} Source0: %{crate}-%{version}.crate Source1: https://github.com/coreos/%{crate}/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz -Source2: zincati-systemd-sysusers.conf -Patch1: modify-as-nestos-stream.patch -Patch2: 0001-modify-cincinnati-url-for-nestos.patch +Patch1: 0001-modify-as-nestos-stream.patch +Patch2: 0001-modify-cincinnati-url-for-nestos.patch BuildRequires: rust-packaging BuildRequires: systemd openssl-devel @@ -27,7 +25,7 @@ Update agent for NestOS.} %package -n %{crate} Summary: %{summary} -License: ASL 2.0 and BSD and MIT and MPLv2.0 and zlib +License: Apache-2.0 AND BSD-3-Clause AND MIT AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR BSD-2-Clause) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT) %description -n %{crate} %{_description} @@ -51,10 +49,7 @@ License: ASL 2.0 and BSD and MIT and MPLv2.0 and zlib %{_tmpfilesdir}/zincati.conf %{_datadir}/polkit-1/rules.d/zincati.rules %{_datadir}/polkit-1/actions/org.coreos.zincati.* -%{_sysusersdir}/zincati.conf - -%pre -n %{crate} -%sysusers_create_package %{crate} %{SOURCE2} +%{_datadir}/dbus-1/system.d/*.conf %post -n %{crate} %systemd_post zincati.service @@ -116,9 +111,10 @@ install -Dpm0644 -t %{buildroot}%{_datadir}/polkit-1/rules.d \ dist/polkit-1/rules.d/*.rules install -Dpm0644 -t %{buildroot}%{_datadir}/polkit-1/actions \ dist/polkit-1/actions/org.coreos.zincati.* -ln -snf /run/%{crate}/public/metrics.promsock %{buildroot}/run/%{crate}/private/metrics.promsock +install -Dpm0644 -t %{buildroot}%{_datadir}/dbus-1/system.d \ + dist/dbus-1/system.d/*.conf -install -Dpm644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysusersdir}/zincati.conf +ln -snf /run/%{crate}/public/metrics.promsock %{buildroot}/run/%{crate}/private/metrics.promsock %if %{with check} %check @@ -126,6 +122,10 @@ install -Dpm644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysusersdir}/zincati.conf %endif %changelog +* Mon Apr 15 2024 lijian - 0.0.27-1 +- update to 0.0.27 +- update all dependencies to latest versions + * Wed Sep 27 2023 lijian - 0.0.24-8 - add 0001-modify-cincinnati-url-for-nestos.patch diff --git a/zincati-0.0.24.crate b/zincati-0.0.24.crate deleted file mode 100644 index adc6b658109cd2769930a0d4eefa972e23374d20..0000000000000000000000000000000000000000 Binary files a/zincati-0.0.24.crate and /dev/null differ diff --git a/zincati-0.0.24-vendor.tar.gz b/zincati-0.0.27-vendor.tar.gz similarity index 61% rename from zincati-0.0.24-vendor.tar.gz rename to zincati-0.0.27-vendor.tar.gz index d464f8ec1b4aa2c6cfd0a695a27b22d36ba0df36..b06ad1ba4798c141ba60708afe77b45e7ac33673 100644 Binary files a/zincati-0.0.24-vendor.tar.gz and b/zincati-0.0.27-vendor.tar.gz differ diff --git a/zincati-0.0.27.crate b/zincati-0.0.27.crate new file mode 100644 index 0000000000000000000000000000000000000000..517379c413f15e1aaf1892c798680f1ed85027e7 Binary files /dev/null and b/zincati-0.0.27.crate differ diff --git a/zincati-fix-metadata.diff b/zincati-fix-metadata.diff deleted file mode 100644 index 4a2e06392a4fc4eea3f761faf101e6d22d5ee749..0000000000000000000000000000000000000000 --- a/zincati-fix-metadata.diff +++ /dev/null @@ -1,25 +0,0 @@ - ---- zincati-0.0.18/Cargo.toml -+++ zincati-0.0.18/Cargo.toml -@@ -89,7 +89,7 @@ version = "2.1" - features = ["serde"] - - [dependencies.prometheus] --version = "0.11" -+version = "0.10" - default-features = false - - [dependencies.rand] -@@ -128,10 +128,10 @@ features = ["serde"] - version = "0.2" - - [dev-dependencies.mockito] --version = "0.29" -+version = "0.28" - - [dev-dependencies.proptest] --version = "1.0" -+version = "0.10" - - [features] - failpoints = ["fail/failpoints"] diff --git a/zincati-systemd-sysusers.conf b/zincati-systemd-sysusers.conf deleted file mode 100644 index e702a45040f4628d7084f942a20f9416818f56f7..0000000000000000000000000000000000000000 --- a/zincati-systemd-sysusers.conf +++ /dev/null @@ -1 +0,0 @@ -u zincati - "Zincati user for auto-updates" /run/zincati