summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Michalski <a.michalski2@partner.samsung.com>2023-06-07 10:01:34 +0200
committerAdam Michalski <a.michalski2@partner.samsung.com>2023-09-08 13:28:06 +0200
commit5357f03efad7e696862cf8692cf305a4cdee8b7f (patch)
tree5b7a10fce55b93b7b2c69dfcf41d36652f84b3d1
parentf1d92a10ada80d2bc3aed2c9f396c8a169535ee0 (diff)
downloadconnman-5357f03efad7e696862cf8692cf305a4cdee8b7f.tar.gz
connman-5357f03efad7e696862cf8692cf305a4cdee8b7f.tar.bz2
connman-5357f03efad7e696862cf8692cf305a4cdee8b7f.zip
Add connman ISU package
This commit adds Individual Service Upgrade (ISU) feature to connman package. When installed it will allow to upgrade this service using the ISU mechanism, without the need to perform a full OS Upgrade. This commit adds necessary configuration to create upgrade packages of the needed format. ISU framework itself is maintained and installed separately. Change-Id: I75eb0fa2592b2d2541f1d0df05fce96ce6c0cc62
-rw-r--r--Makefile.am5
-rw-r--r--isu/isu.cfg8
-rw-r--r--isu/system-services/connman.service24
-rw-r--r--packaging/connman.spec10
4 files changed, 47 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index e8662e48..60653d97 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -633,5 +633,10 @@ include/connman/%.h: $(abs_top_srcdir)/include/%.h
$(AM_V_at)$(MKDIR_P) include/connman
$(AM_V_GEN)$(LN_S) $< $@
+isudir = /etc/isu/connman
+isu_DATA = isu/isu.cfg
+isusystemservicedir = /etc/isu/connman/system-services/
+isusystemservice_DATA = isu/system-services/connman.service
+
clean-local:
@$(RM) -rf include/connman $(MANUAL_PAGES)
diff --git a/isu/isu.cfg b/isu/isu.cfg
new file mode 100644
index 00000000..ebfaa2dd
--- /dev/null
+++ b/isu/isu.cfg
@@ -0,0 +1,8 @@
+[isu]
+name=#NAME#
+version=#VERSION#
+system_service=connman.service
+
+[files]
+/usr/bin/connmand
+/etc/connman/main.conf
diff --git a/isu/system-services/connman.service b/isu/system-services/connman.service
new file mode 100644
index 00000000..78abb6e7
--- /dev/null
+++ b/isu/system-services/connman.service
@@ -0,0 +1,24 @@
+[Unit]
+Description=Connection service
+Conflicts=shutdown.target
+RequiresMountsFor=/var/lib/connman
+After=dbus.service network-pre.target systemd-sysusers.service net-config.service
+Before=network.target multi-user.target shutdown.target
+Wants=network.target
+
+[Service]
+Type=dbus
+User=network_fw
+Group=network_fw
+BusName=net.connman
+Restart=on-failure
+SmackProcessLabel=System
+BindReadOnlyPaths=#ISU_RUN_PATH#/connman/rootfs/etc/connman:/etc/connman
+BindPaths=#ISU_RUN_PATH#/connman/rootfs/usr/bin/connmand:/usr/bin/connmand
+ExecStart=/usr/bin/connmand -n --nobacktrace --noplugin vpn
+Capabilities=cap_setgid,cap_net_admin,cap_net_bind_service,cap_net_broadcast,cap_net_raw,cap_dac_override=i
+StandardOutput=null
+SecureBits=keep-caps
+
+[Install]
+WantedBy=multi-user.target
diff --git a/packaging/connman.spec b/packaging/connman.spec
index a07fab64..9ef738ad 100644
--- a/packaging/connman.spec
+++ b/packaging/connman.spec
@@ -153,6 +153,12 @@ Requires: %{name} = %{version}-%{release}
%description profile_robot
connman extension for Tizen robot profile
+%package isu
+Summary: connman ISU pacakge
+Group: Network & Connectivity/Connection Management
+%description isu
+Configuration files to generate the ISU (Individual Service Upgrade) package
+
%prep
%setup -q
@@ -350,3 +356,7 @@ mv -f %{_sysconfdir}/connman/main.conf.robot %{_sysconfdir}/connman/main.conf
%manifest %{name}.manifest
%attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/connman-robot.conf
%attr(644,network_fw,network_fw) %{_sysconfdir}/connman/main.conf.robot
+
+%files isu
+/etc/isu/connman/isu.cfg
+/etc/isu/connman/system-services/connman.service