Compare commits

...

2 Commits
rawhide ... f36

Author SHA1 Message Date
Fabio Valentini 9f659f6a8a
Stop using long-deprecated __global_rustflags_toml macro 2023-02-21 21:30:43 +01:00
Luca BRUNO 8d27d4d765 Add explicit service unit ordering, after multi-user.target
Backports: https://github.com/coreos/zincati/pull/831
2022-09-20 08:58:50 +00:00
2 changed files with 41 additions and 2 deletions

View File

@ -0,0 +1,32 @@
commit 6eefd62822b8dd767a9902cd20eca7d8976ff2a1
Author: Luca BRUNO <luca.bruno@coreos.com>
Date: Mon Sep 19 09:26:32 2022 +0000
dist/systemd: add explicit ordering, after multi-user.target
This tweaks the service unit ordering, adding explicit configuration
for running after `multi-user.target`.
The service unit is currently pulled in by `multi-user.target`, which
results in a implicit `Before` ordering being added by systemd.
Unfortunately this may result in a dependency loop between
`multi-user.target` and `boot-complete.target`, as the latter may need
to start after the former.
Adding an explicit `After` statement here makes sure that both targets
can be properly started in the relevant order, with Zincati queuing
after both of them.
Ref: https://lists.freedesktop.org/archives/systemd-devel/2022-September/048330.html
diff --git a/dist/systemd/system/zincati.service b/dist/systemd/system/zincati.service
index ef1173d..1837a09 100644
--- a/dist/systemd/system/zincati.service
+++ b/dist/systemd/system/zincati.service
@@ -7,7 +7,7 @@ After=network.target
# Wait for the boot to be marked as successful. In cluster contexts,
# this prevents rolling out broken updates to all nodes in the fleet.
Requires=boot-complete.target
-After=boot-complete.target
+After=multi-user.target boot-complete.target
# Make sure we don't inadvertently reboot the system before a machine-id is
# created so that we don't cause ConditionFirstBoot=true units to run twice
# See discussions in https://github.com/systemd/systemd/issues/4511.

View File

@ -11,7 +11,7 @@
Name: rust-%{crate}
Version: 0.0.24
Release: 3%{?dist}
Release: 5%{?dist}
Summary: Update agent for Fedora CoreOS
# Upstream license specification: Apache-2.0
@ -24,6 +24,7 @@ Source1: https://github.com/coreos/%{crate}/releases/download/v%{version}
# git diff --no-prefix zincati-*/Cargo.toml
#Patch0: fedora-zincati-cargo-manifest-overrides.diff
%endif
Patch0001: 0001-after-multi-user.target.patch
ExclusiveArch: %{rust_arches}
# Skip 32 bits architectures, see
@ -320,7 +321,6 @@ cat >.cargo/config << EOF
[build]
rustc = "%{__rustc}"
rustdoc = "%{__rustdoc}"
rustflags = %{__global_rustflags_toml}
[install]
root = "%{buildroot}%{_prefix}"
@ -373,6 +373,13 @@ install -Dpm0644 -t %{buildroot}%{_datadir}/dbus-1/system.d \
%endif
%changelog
* Fri Feb 10 2023 Fabio Valentini <decathorpe@gmail.com> - 0.0.24-5
- Stop using long-deprecated __global_rustflags_toml macro.
* Tue Sep 20 2022 Luca BRUNO <lucab@lucabruno.net> - 0.0.24-4
- Add explicit service unit ordering, after multi-user.target
Backports: https://github.com/coreos/zincati/pull/831
* Thu Jan 27 2022 Luca BRUNO <lucab@lucabruno.net> - 0.0.24-3
- Stop building on 32 bits architectures
Resolves: #2046993