fix: Enable sysroot ro migration on installation

Added check to start service only for rpm-ostree build

Resolves: rhbz#2167344

Signed-off-by: Sayan Paul <saypaul@redhat.com>
This commit is contained in:
Sayan Paul 2023-02-08 15:45:43 +05:30
parent b63fd9483b
commit b56ecb6717
2 changed files with 8 additions and 1 deletions

View File

@ -2,6 +2,7 @@
Description=Read-Only Sysroot Migration
Documentation=https://ostreedev.github.io/ostree
ConditionPathExists=!/var/lib/.ostree-readonly-sysroot
ConditionPathExists=/run/ostree-booted
RequiresMountsFor=/sysroot /boot
ConditionPathIsReadWrite=/sysroot

View File

@ -8,7 +8,7 @@
Summary: Tool for managing bootable, immutable filesystem trees
Name: ostree
Version: 2022.6
Release: 2%{?dist}
Release: 3%{?dist}
Source0: https://github.com/ostreedev/%{name}/releases/download/v%{version}/libostree-%{version}.tar.xz
Source1: ostree-readonly-sysroot-migration
Source2: ostree-readonly-sysroot-migration.service
@ -114,6 +114,8 @@ env NOCONFIGURE=1 ./autogen.sh
%install
install -m 644 -D %{SOURCE2} %{buildroot}/usr/lib/systemd/system/ostree-readonly-sysroot-migration.service
install -m 755 -D %{SOURCE1} %{buildroot}/usr/libexec/ostree-readonly-sysroot-migration
install -dm0755 %{buildroot}%{_unitdir}/multi-user.target.wants/
ln -sf ../ostree-readonly-sysroot-migration.service %{buildroot}%{_unitdir}/multi-user.target.wants/
%make_install INSTALL="install -p -c"
find %{buildroot} -name '*.la' -delete
@ -146,6 +148,7 @@ find %{buildroot} -name '*.la' -delete
%{_libexecdir}/libostree/*
%{_prefix}/lib/systemd/system/ostree-readonly-sysroot-migration.service
%{_libexecdir}/ostree-readonly-sysroot-migration
%{_unitdir}/multi-user.target.wants/ostree-readonly-sysroot-migration.service
%files libs
%{_sysconfdir}/ostree
@ -175,6 +178,9 @@ find %{buildroot} -name '*.la' -delete
%endif
%changelog
* Thu Feb 9 2023 Sayan Paul <saypaul@redhat.com> - 2022.6-3
- Resolves: rhbz#2167344
* Wed Dec 14 2022 Sayan Paul <saypaul@redhat.com> - 2022.6-2
- Resolves: rhbz#2060976