Revert "Add checking /opt partition is mounted" 64/325264/1 tizen_8.0
authorJacek Kryszyn <j.kryszyn@samsung.com>
Tue, 6 May 2025 06:59:48 +0000 (08:59 +0200)
committerJacek Kryszyn <j.kryszyn@samsung.com>
Wed, 4 Jun 2025 12:06:37 +0000 (14:06 +0200)
This reverts commit 27c402e9845488a0bb1e4ac297fceedf097d2a47.

/opt is mounted in init.sh so opt.mount is unnecessary. systemd reads
/proc/self/mountinfo durint startup, detects mounted filesystems and
creates corresponding mount units.

Moreover, sometimes (not always, it is some kind of a race condition)
systemd notifies that opt.mount is bound to inactive unit and
stops the unit. If there are filesystems mounted at /opt in init.sh,
they are unmounted as well which is unwanted behavior.

Change-Id: I4bb699f7674473051821a6780d8568343af69d9f

packaging/system-plugin.spec
units/opt.mount [deleted file]

index 8e66d7601af7f63d9fec023e12f8d206e90c52ee..ff16675f76cbafc5919b67e5a7ed9518b17566f8 100644 (file)
@@ -9,10 +9,9 @@ Source1:   %{name}.manifest
 
 Requires(post): /usr/bin/systemctl
 Requires(post): /usr/bin/udevadm
-Requires(post): /usr/bin/sed
-BuildRequires:  cmake
-BuildRequires:  pkgconfig(libsystemd)
-BuildRequires:  pkgconfig(libtzplatform-config)
+BuildRequires: cmake
+BuildRequires: pkgconfig(libsystemd)
+BuildRequires: pkgconfig(libtzplatform-config)
 
 %description
 This package provides target specific system configuration files.
@@ -187,11 +186,7 @@ ln -s ../opt-usr.mount %{buildroot}%{_unitdir}/local-fs.target.wants/opt-usr.mou
 ln -s ../wait-mount@.service %{buildroot}%{_unitdir}/local-fs.target.wants/wait-mount@opt-usr.service
 ln -s ../wait-mount@.service %{buildroot}%{_userunitdir}/basic.target.wants/wait-mount@opt-usr.service
 
-# check /opt partition
-mkdir -p %{buildroot}%{_unitdir}/local-fs.target.requires
-install -m 644 units/opt.mount %{buildroot}%{_unitdir}
 install -m 644 units/opt.mount.container %{buildroot}/opt/container_guest_plugin%{_unitdir}/opt.mount
-ln -s ../opt.mount %{buildroot}%{_unitdir}/local-fs.target.requires/opt.mount
 
 # namespace
 mkdir -p %{buildroot}%{_unitdir}/user@.service.d
@@ -215,17 +210,12 @@ rm -rf %{buildroot}
 
 %post
 systemctl daemon-reload
-%ifarch %{ix86} x86_64
-/usr/bin/sed -e 's/system-data/emulator-sysdata/g' -i /usr/lib/systemd/system/opt.mount
-%endif
 
 %files
 %manifest %{name}.manifest
 %license LICENSE.Apache-2.0
 %{_unitdir}/tizen-system-env.service
 %{_unitdir}/basic.target.wants/tizen-system-env.service
-%{_unitdir}/opt.mount
-%{_unitdir}/local-fs.target.requires/opt.mount
 
 %files device-spreadtrum
 %manifest %{name}.manifest
diff --git a/units/opt.mount b/units/opt.mount
deleted file mode 100644 (file)
index 405e697..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-[Unit]
-Before=local-fs.target
-ConditionPathIsMountPoint=!/opt
-
-# Tizen mounts /opt in initrd or init-wrapper
-# and fsck and resizefs are also executed.
-# So it is not necessary here.
-# If you don't use initrd or init-wrapper, just comment it out.
-#Requires=systemd-fsck@dev-disk-by\x2dlabel-system\x2ddata.service
-#After=systemd-fsck@dev-disk-by\x2dlabel-system\x2ddata.service
-
-[Mount]
-What=LABEL=system-data
-Where=/opt
-Type=ext4
-Options=defaults,relatime