Clearly mark version without resize2fs 89/325089/1
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Mon, 2 Jun 2025 11:17:04 +0000 (13:17 +0200)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Mon, 2 Jun 2025 13:42:31 +0000 (15:42 +0200)
Change-Id: I085239d177f54a8c3edce42276859047b9bcdd23

packaging/sessiond.spec
src/service/src/dir_backend_fixed_size.cpp

index efd367f5478b3840c752d7c045716565f5b65264..7d87146de6ddd5ccb3dc27d183513651024965a3 100644 (file)
@@ -1,7 +1,9 @@
 %define on_off() %{expand:%%{?with_%{1}:ON}%%{!?with_%{1}:OFF}}
 
 # resize2fs is needed for fast user add in fixed size (image) backend
+%if "%{?profile}" != "tv"
 %define _with_resize2fs on
+%endif
 %bcond_with resize2fs
 
 Name:       sessiond
@@ -92,6 +94,9 @@ pushd build
 popd
 
 %install_service multi-user.target.wants sessiond.service
+%if "%{?profile}" == "tv"
+sed -i -e 's,\(Description=.*\),\1 (no resize2fs),' %{buildroot}%{_unitdir}/sessiond.service
+%endif
 
 %files
 %manifest sessiond.manifest
index 5d64e2cc9754dd2ba07cf2615695fd456039231f..7cd97d43b9dca4a1efbd52e06c553ba2c04b9b9a 100644 (file)
@@ -97,8 +97,10 @@ static void umount_and_remove (const fs::path& path) try {
 
 bool DirBackendAddFixedSize::AddSubsessionPrepareFromTemplate (const std::string_view subsession_name, const fs::path& main_path, int uid, int gid) const
 {
-       if (!OS::have_resize2fs())
+       if (!OS::have_resize2fs()) {
+               LOGW("This version has been compiled without resize2fs - can not use fast image-based user addition");
                return false;
+       }
 
        const auto template_dir = main_path / TemplateName();
        const auto template_img = DirBackendFixedSize::GetImagePathFromSubsessionPath(template_dir);