!13 【NestOS】22.03-LTS-SP1选型升级

From: @duyiwei7w 
Reviewed-by: @fu-shanqing 
Signed-off-by: @fu-shanqing
This commit is contained in:
openeuler-ci-bot 2022-11-14 05:47:53 +00:00 committed by Gitee
commit 813c320afb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 106 additions and 1 deletions

View File

@ -0,0 +1,87 @@
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
* `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,
- #[serde(rename = "fedora-coreos.stream")]
+ #[serde(rename = "nestos.stream")]
stream: 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
@@ -9,7 +9,7 @@
"coreos-assembler.config-dirty" : "false",
"rpmostree.inputhash" : "77dbde3d9502f2f87757d2b68b93b52efa2c65fb7b1fc317e0ffc50b483a3a52",
"coreos-assembler.basearch" : "x86_64",
- "fedora-coreos.stream" : "stable",
+ "nestos.stream" : "stable",
"version" : "31.20200517.3.0",
"rpmostree.initramfs-args" : [
"--add=ignition",
@@ -79,7 +79,7 @@
"coreos-assembler.config-dirty" : "false",
"rpmostree.inputhash" : "3efbafd926cbd112d0049aaebf5c025812229ab23fc84bd6800d959ac919b03a",
"coreos-assembler.basearch" : "x86_64",
- "fedora-coreos.stream" : "stable",
+ "nestos.stream" : "stable",
"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
@@ -8,7 +8,7 @@
"coreos-assembler.config-dirty" : "true",
"coreos-assembler.config-gitrev" : "e5ffda727170e124c7f7d8782e256b0462bf9869",
"coreos-assembler.basearch" : "x86_64",
- "fedora-coreos.stream" : "testing-devel",
+ "nestos.stream" : "testing-devel",
"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
@@ -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.
ostree --repo=/var/www commit --branch='test-branch' --tree ref="$cur_payload" \
- --add-metadata-string version='dummy' --keep-metadata='fedora-coreos.stream' \
+ --add-metadata-string version='dummy' --keep-metadata='nestos.stream' \
--keep-metadata='coreos-assembler.basearch' --parent="$cur_payload"
# Add the OSTree repo at /var/www as a new `local` remote.
ostree remote add --no-gpg-verify local http://localhost test-branch
@@ -75,7 +75,7 @@ EOF
# Create a new commit on `test-branch` that has an unknown stream.
bad_version="$cur_version".bad-update
bad_payload="$(ostree --repo=/var/www commit --branch=test-branch --tree ref="$cur_payload" \
- --add-metadata-string version="$bad_version" --add-metadata-string fedora-coreos.stream='unknown-stream' \
+ --add-metadata-string version="$bad_version" --add-metadata-string nestos.stream='unknown-stream' \
--keep-metadata='coreos-assembler.basearch' --parent="$cur_payload")"
jq \
@@ -101,7 +101,7 @@ EOF
# Create a new commit on `test-branch` that's on the correct stream.
good_version="$cur_version".good-update
good_payload="$(ostree --repo=/var/www commit --branch=test-branch --tree ref="$cur_payload" \
- --add-metadata-string version="$good_version" --keep-metadata='fedora-coreos.stream' \
+ --add-metadata-string version="$good_version" --keep-metadata='nestos.stream' \
--keep-metadata='coreos-assembler.basearch' --parent="$cur_payload")"
jq \

View File

@ -2,16 +2,19 @@
%global __cargo_skip_build 0
%define debug_package %{nil}
%global crate zincati
%global zcuid 986
Name: rust-%{crate}
Version: 0.0.24
Release: 1
Release: 2
Summary: Update agent for NestOS
License: ASL 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: base-cincinnati-url-for-nestos.patch
Patch2: modify-as-nestos-stream.patch
BuildRequires: rust-packaging
BuildRequires: systemd openssl-devel
@ -49,6 +52,10 @@ 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}
%post -n %{crate}
%systemd_post zincati.service
@ -112,12 +119,17 @@ 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 -Dpm644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysusersdir}/zincati.conf
%if %{with check}
%check
%cargo_test
%endif
%changelog
* Thu Nov 10 2022 duyiwei <duyiwei@kylinos.cn> - 0.0.24-2
- sync master and fix some bug
* Wed Jun 08 2022 fushanqing <fushanqing@kylinos.cn> - 0.0.24-1
- update to 0.0.24

5
rust-zincati.yaml Normal file
View File

@ -0,0 +1,5 @@
version_control: github
src_repo: https://github.com/coreos/zincati.git
tag_prefix: "^v"
seperator: "."

View File

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