Name: net-config
Summary: TIZEN Network Configuration service
-Version: 1.1.32
+Version: 1.1.93
Release: 2
Group: System/Network
License: Apache-2.0
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(capi-network-wifi-direct)
+BuildRequires: pkgconfig(capi-vpnsvc)
BuildRequires: cmake
+BuildRequires: pkgconfig(sqlite3)
+BuildRequires: pkgconfig(libtzplatform-config)
Requires: vconf
Requires: connman
Requires: systemd
Requires(post): systemd
-Requires(post): vconf
Requires(preun): systemd
Requires(postun): systemd
+%define upgrade_script_path /usr/share/upgrade/scripts
+
%description
TIZEN Network Configuration service
%build
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DTIZEN_WLAN_PASSPOINT=1 \
+ -DTIZEN_WLAN_USE_P2P_INTERFACE=1 \
%if 0%{?model_build_feature_wlan_concurrent_mode}
-DWLAN_CONCURRENT_MODE=1 \
%endif
%if ! 0%{?model_build_feature_network_tethering_disable}
-DTIZEN_TETHERING_ENABLE=1 \
%endif
-%if "%{?tizen_profile_name}" == "tv"
+%if "%{profile}" == "mobile"
+ -DTIZEN_TELEPHONY_ENABLE=1 \
+ -DTIZEN_WLAN_BOARD_SPRD=1 \
+%else
+%if "%{profile}" == "tv"
-DTIZEN_TV=1 \
%endif
+%endif
%if 0%{?model_build_feature_wlan_wearable} == 1
-DTIZEN_WEARABLE=1 \
-DTIZEN_CAPTIVE_PORTAL=1 \
mkdir -p %{buildroot}%{_unitdir}
%endif
-%if "%{?tizen_profile_name}" == "tv"
+%if "%{profile}" == "tv"
cp resources/usr/lib/systemd/system/net-config_tv.service %{buildroot}%{_libdir}/systemd/system/net-config.service
mkdir -p %{buildroot}%{_libdir}/udev/rules.d/
cp resources/usr/lib/udev/rules.d/99-wifiusb-dev.rules %{buildroot}%{_libdir}/udev/rules.d/99-wifiusb-dev.rules
mkdir -p %{buildroot}%{_sysconfdir}/
cp resources/etc/resolv.conf %{buildroot}%{_sysconfdir}/resolv.conf
-mkdir -p %{buildroot}%{_sbindir}/
-cp resources/usr/sbin/net-config.service %{buildroot}%{_sbindir}/net-config.service
-
-mkdir -p %{buildroot}/usr/dbspace
-sqlite3 %{buildroot}/usr/dbspace/.wifi_offload.db < resources/usr/share/wifi_offloading.sql
-
#DBus DAC (net-config.manifest enables DBus SMACK)
mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
cp resources/etc/dbus-1/system.d/net-config.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/net-config.conf
-#log dump
-mkdir -p %{buildroot}/opt/etc/dump.d/module.d/
-cp resources/opt/etc/dump.d/module.d/network_log_dump.sh %{buildroot}/opt/etc/dump.d/module.d/network_log_dump.sh
-mkdir -p %{buildroot}/opt/var/lib/net-config/
-cp resources/opt/etc/dump.d/module.d/network_log_dump.sh %{buildroot}/opt/var/lib/net-config/network_log_dump.sh
-cp resources/opt/etc/dump.d/module.d/network_dump.sh %{buildroot}/opt/var/lib/net-config/network_dump.sh
-
%if 0%{?model_build_feature_wlan_wearable} == 1
#softreset scripts
mkdir -p %{buildroot}/usr/system/RestoreDir/softreset
mkdir -p %{buildroot}%{_datadir}/license
cp LICENSE %{buildroot}%{_datadir}/license/net-config
-%post
-
-%if "%{?tizen_profile_name}" == "tv"
-vconftool set -t string db/dnet/mac_address "" -s system::vconf_network
-%endif
-
-#Wi-Fi statistics
-vconftool set -t int db/dnet/statistics/wifi/totalsnt 0 -s tizen::vconf::network
-vconftool set -t int db/dnet/statistics/wifi/totalrcv 0 -s tizen::vconf::network
-vconftool set -t int db/dnet/statistics/wifi/lastsnt 0 -s tizen::vconf::network
-vconftool set -t int db/dnet/statistics/wifi/lastrcv 0 -s tizen::vconf::network
-
-#Wi-Fi last power state
-vconftool set -t int file/private/wifi/last_power_state 0 -s system::vconf_network
+#OS Upgrade
+mkdir -p %{buildroot}%{upgrade_script_path}
+cp -f scripts/netconfig_upgrade.sh %{buildroot}%{upgrade_script_path}
-#Wi-Fi power state due to airplane mode
-vconftool set -t int file/private/wifi/wifi_off_by_airplane 0 -s system::vconf_network
-
-#Wi-Fi power state due to restricted mode
-vconftool set -t int file/private/wifi/wifi_off_by_restricted 0 -s system::vconf_network
-
-#Wi-Fi power state due to emergency mode
-vconftool set -t int file/private/wifi/wifi_off_by_emergency 0 -s system::vconf_network
-
-#Wi-Fi sleep policy
-vconftool set -t int file/private/wifi/sleep_policy 0 -g 6519 -s system::vconf_setting
-
-%if 0%{?model_build_feature_wlan_wearable} == 1
-#Wearable use Wi-Fi
-vconftool set -t int db/private/wifi/wearable_wifi_use 0 -g 6519 -s net-config
-%endif
-
-#Wi-Fi Network Frequency for Wi-Fi Direct
-vconftool set -t int memory/private/wifi/frequency 0 -i -s tizen::vconf::platform::r
+%post
+chsmack -a 'System::Shared' %{_sysconfdir}/resolv.conf
#Network logs
-mkdir -p /opt/usr/data/network
-chmod 755 /opt/usr/data/network
+#mkdir -p /opt/usr/data/network
+#chmod 755 /opt/usr/data/network
+#chsmack -a 'System' /opt/usr/data/network
#Add net-config.service to systemd extra default dependency ignore list
mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
%attr(644,root,root) %{_unitdir}/multi-user.target.wants/net-config.service
%endif
%{_datadir}/license/net-config
-%attr(660,root,root) /usr/dbspace/.wifi_offload.db
-%attr(664,root,root) /usr/dbspace/.wifi_offload.db-journal
-%attr(500,root,root) /opt/etc/dump.d/module.d/network_log_dump.sh
-%attr(500,root,root) /opt/var/lib/net-config/network_log_dump.sh
-%attr(500,root,root) /opt/var/lib/net-config/network_dump.sh
-%if "%{?tizen_profile_name}" == "tv"
+%if "%{profile}" == "tv"
%attr(644,root,root) %{_libdir}/udev/rules.d/99-wifiusb-dev.rules
%endif
%if 0%{?model_build_feature_wlan_wearable} == 1
%attr(700,root,root) /usr/system/RestoreDir/softreset/network_softreset.sh
-
%endif
+%{upgrade_script_path}/netconfig_upgrade.sh
+