update to 0.0.27

This commit is contained in:
jianli-97 2024-04-18 11:33:29 +08:00
parent 65d241fbdb
commit 90834df7bf
7 changed files with 56 additions and 61 deletions

View File

@ -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 <lijian2@kylinos.cn>
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<String>,
}
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

View File

@ -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 <lijian2@kylinos.cn> - 0.0.27-1
- update to 0.0.27
- update all dependencies to latest versions
* Wed Sep 27 2023 lijian <lijian2@kylinos.cn> - 0.0.24-8
- add 0001-modify-cincinnati-url-for-nestos.patch

Binary file not shown.

BIN
zincati-0.0.27.crate Normal file

Binary file not shown.

View File

@ -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"]

View File

@ -1 +0,0 @@
u zincati - "Zincati user for auto-updates" /run/zincati