Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions SPECS/systemd/stop-journal-flush.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Stop systemd-journal-flush before shutdown
DefaultDependencies=no
Before=shutdown.target reboot.target

[Service]
Type=oneshot
ExecStart=/usr/lib/systemd/system/stop-journal-flush.sh
StandardOutput=journal
StandardError=journal
RemainAfterExit=yes

[Install]
WantedBy=shutdown.target reboot.target
4 changes: 4 additions & 0 deletions SPECS/systemd/stop-journal-flush.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
if [ -x /usr/bin/systemctl ]; then
/usr/bin/systemctl stop systemd-journal-flush.service >/dev/null 2>&1 || :
fi
4 changes: 3 additions & 1 deletion SPECS/systemd/systemd.signatures.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"sysusers.generate-pre.sh": "6d503de2db2374125cb5c3b6034636514b58a38dcff193550768c3c49c6d7419",
"sysusers.prov": "0dcc4b699030c11eccedb850d4d2c097ebdc725766e17db56f942ee445b93cf6",
"triggers.systemd": "ee7398bec872cc3717d396d201c0a9d4239b883d5f43cb609ab83b229119ceb6",
"yum-protect-systemd.conf": "5a5aa0a6cdfb432f890351ebd1f62d05f9a04d5aa58f57d0758686afaa8d3617"
"yum-protect-systemd.conf": "5a5aa0a6cdfb432f890351ebd1f62d05f9a04d5aa58f57d0758686afaa8d3617",
"stop-journal-flush.service": "005b20eff19b00155dbe0419bc0273fc879d4f87a4f2a296b163c18a73bc4b86",
"stop-journal-flush.sh": "8c0c1293bb3fa5a324689deb97e651e4c3e19bd621eecea2179eacd007f8d210"
}
}
18 changes: 16 additions & 2 deletions SPECS/systemd/systemd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Version: 255
# determine the build information from local checkout
Version: %(tools/meson-vcs-tag.sh . error | sed -r 's/-([0-9])/.^\1/; s/-g/_g/')
%endif
Release: 29%{?dist}
Release: 30%{?dist}

# FIXME - hardcode to 'stable' for now as that's what we have in our blobstore
%global stable 1
Expand Down Expand Up @@ -110,6 +110,8 @@ Source28: 99-yama-ptrace.conf
Source29: 99-net-core-bpf-jit-harden.conf
Source30: 99-kernel.conf
Source31: 99-tcp-timestamps.conf
Source32: stop-journal-flush.service
Source33: stop-journal-flush.sh

%if 0
GIT_DIR=../../src/systemd/.git git format-patch-ab --no-signature -M -N v235..v235-stable
Expand Down Expand Up @@ -871,6 +873,7 @@ install -Dm0644 -t %{buildroot}%{_pkgdocdir}/ %{SOURCE28}

# https://bugzilla.redhat.com/show_bug.cgi?id=1378974
install -Dm0644 -t %{buildroot}%{system_unit_dir}/systemd-udev-trigger.service.d/ %{SOURCE10}
install -Dm0777 -t %{buildroot}%{_unitdir} %{SOURCE33}

# systemd-oomd default configuration
install -Dm0644 -t %{buildroot}%{_prefix}/lib/systemd/oomd.conf.d/ %{SOURCE14}
Expand All @@ -885,6 +888,7 @@ install -Dm0644 -t %{buildroot}%{_prefix}/lib/sysctl.d/ %{SOURCE17}

# Install TCP timestamp setting
install -Dm0644 -t %{buildroot}%{_prefix}/lib/sysctl.d/ %{SOURCE31}
install -Dpm 644 %{SOURCE32} %{buildroot}%{_unitdir}/stop-journal-flush.service

%if 0%{?emt}
install -Dm0644 -t %{buildroot}%{_prefix}/lib/sysctl.d/ %{SOURCE18}
Expand Down Expand Up @@ -975,14 +979,16 @@ systemd-tmpfiles --create &>/dev/null || :
# https://fedoraproject.org/wiki/Changes/Systemd_presets_for_user_units.
systemctl preset-all &>/dev/null || :
systemctl --global preset-all &>/dev/null || :
systemctl enable stop-journal-flush.service
systemctl daemon-reload

%postun
if [ $1 -eq 1 ]; then
[ -w %{_localstatedir} ] && journalctl --update-catalog || :
systemd-tmpfiles --create &>/dev/null || :
fi

%systemd_postun_with_restart systemd-timedated.service systemd-hostnamed.service systemd-journald.service systemd-localed.service systemd-userdbd.service
%systemd_postun_with_restart systemd-timedated.service systemd-hostnamed.service systemd-journald.service systemd-localed.service systemd-userdbd.service stop-journal-flush.service

# FIXME: systemd-logind.service is excluded (https://github.com/systemd/systemd/pull/17558)

Expand Down Expand Up @@ -1051,6 +1057,9 @@ grep -q -E '^KEYMAP="?fi-latin[19]"?' /etc/vconsole.conf 2>/dev/null &&
%preun udev
%systemd_preun %udev_services

%preun
%systemd_preun stop-journal-flush.service

%postun udev
# Restart some services.
# Others are either oneshot services, or sockets, and restarting them causes issues (#1378974)
Expand Down Expand Up @@ -1237,6 +1246,11 @@ rm -f %{name}.lang
# %autochangelog. So we need to continue manually maintaining the
# changelog here.
%changelog

* Thu Oct 16 2025 Basavaraj unniche <[email protected]> - 255-30
- Add new service to stop systemd-journal-flush.service which is
- umount issues during reboot

* Fri May 30 2025 Ranjan Dutta <[email protected]> - 255-29
- merge from Azure Linux 3.0.20250521-3.0
- Bumping 'Release' tag to match the 'signed' version of the spec.
Expand Down
Loading