summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang zhengguang <zhengguang.zhang@intel.com>2013-06-26 13:09:22 +0800
committerZhang zhengguang <zhengguang.zhang@intel.com>2013-08-05 13:16:44 +0800
commit6f8eff092409c87722f8447f5157a42c6b750b08 (patch)
treeed5cbad9e8df99db2610125918480442040285dd
parent3b36a77dee59a11d7b6b0ba2a38e284aa64daba3 (diff)
downloadconnman-submit/tizen/20130805.055949.tar.gz
connman-submit/tizen/20130805.055949.tar.bz2
connman-submit/tizen/20130805.055949.zip
Add build and configure filesubmit/tizen/20130805.055949
-rw-r--r--packaging/connman.manifest18
-rw-r--r--packaging/connman.spec24
-rw-r--r--packaging/settings15
-rw-r--r--src/connman.service.in3
-rw-r--r--src/main.conf6
5 files changed, 61 insertions, 5 deletions
diff --git a/packaging/connman.manifest b/packaging/connman.manifest
index 017d22d3..4377e6f9 100644
--- a/packaging/connman.manifest
+++ b/packaging/connman.manifest
@@ -1,5 +1,17 @@
<manifest>
- <request>
- <domain name="_"/>
- </request>
+ <define>
+ <domain name="connman"/>
+ <request>
+ <smack request="system::use_internet" type="w"/>
+ </request>
+ </define>
+ <assign>
+ <filesystem path="/etc/dbus-1/system.d/connman.conf" label="_"/>
+ <filesystem path="/usr/lib/systemd/system/connman.service" label="_"/>
+ <filesystem path="/usr/lib/systemd/system/network.target.wants/connman.service" label="_"/>
+ <filesystem path="/usr/share/dbus-1/services/net.connman.service" label="_"/>
+ </assign>
+ <request>
+ <domain name="connman"/>
+ </request>
</manifest>
diff --git a/packaging/connman.spec b/packaging/connman.spec
index 32340acc..3ebb4905 100644
--- a/packaging/connman.spec
+++ b/packaging/connman.spec
@@ -9,6 +9,7 @@ Summary: Connection Manager
Url: http://connman.net
Group: Connectivity/Connection Management
Source0: %{name}-%{version}.tar.xz
+Source1: settings
Source10: 40-connman-ntp.list
Source11: connman-ntp.service
Source1001: connman.manifest
@@ -60,6 +61,8 @@ Header files and development files for connman.
cp %{SOURCE1001} .
%build
+CFLAGS+=" -DTIZEN_EXT"
+
./bootstrap
%configure \
--enable-threads \
@@ -70,6 +73,9 @@ cp %{SOURCE1001} .
--enable-openconnect \
%endif
--enable-test \
+ --enable-loopback \
+ --enable-ethernet \
+ --disable-linklocaladdr \
--with-systemdunitdir=%{_unitdir}
make %{?_smp_mflags}
@@ -85,9 +91,24 @@ install -m644 %{SOURCE11} %{buildroot}%{_unitdir}
%install_service multi-user.target.wants connman-ntp.service
%endif
+mkdir -p %{buildroot}%{_localstatedir}/lib/connman
+cp %{SOURCE1} %{buildroot}%{_localstatedir}/lib/connman/settings
+mkdir -p %{buildroot}%{_sysconfdir}/connman
+cp src/main.conf %{buildroot}%{_sysconfdir}/connman/main.conf
+
%install_service network.target.wants connman.service
%install_service multi-user.target.wants connman.service
+%post
+systemctl daemon-reload
+systemctl restart connman.service
+
+%preun
+systemctl stop connman.service
+
+%postun
+systemctl daemon-reload
+
%docs_package
%files
@@ -96,6 +117,9 @@ install -m644 %{SOURCE11} %{buildroot}%{_unitdir}
%manifest connman.manifest
%{_sbindir}/*
%{_libdir}/connman/plugins/*.so
+%{_datadir}/man/*
+%config %{_sysconfdir}/connman/main.conf
+%attr(600,root,root) %{_localstatedir}/lib/connman/settings
%config %{_sysconfdir}/dbus-1/system.d/*
%{_unitdir}/connman.service
%{_unitdir}/network.target.wants/connman.service
diff --git a/packaging/settings b/packaging/settings
new file mode 100644
index 00000000..ba476b5d
--- /dev/null
+++ b/packaging/settings
@@ -0,0 +1,15 @@
+
+[global]
+OfflineMode=false
+
+[WiFi]
+Enable=false
+
+[Bluetooth]
+Enable=true
+
+[Wired]
+Enable=true
+
+[Cellular]
+Enable=true
diff --git a/src/connman.service.in b/src/connman.service.in
index 2e9e4d53..b35815af 100644
--- a/src/connman.service.in
+++ b/src/connman.service.in
@@ -3,10 +3,11 @@ Description=Connection service
After=syslog.target
[Service]
+EnvironmentFile=-/etc/sysconfig/connman
Type=dbus
BusName=net.connman
Restart=on-failure
-ExecStart=@prefix@/sbin/connmand -n
+ExecStart=@prefix@/sbin/connmand -n $OPTIONS
StandardOutput=null
[Install]
diff --git a/src/main.conf b/src/main.conf
index e4748fa5..981ad9c3 100644
--- a/src/main.conf
+++ b/src/main.conf
@@ -19,6 +19,7 @@
# the scan list is empty. In that case, a simple backoff
# mechanism starting from 10s up to 5 minutes will run.
# BackgroundScanning = true
+BackgroundScanning = false
# List of Fallback timeservers separated by ",".
# These timeservers are used for NTP sync when there are
@@ -26,6 +27,7 @@
# These can contain mixed combination of fully qualified
# domain names, IPv4 and IPv6 addresses.
# FallbackTimeservers =
+FallbackTimeservers = pool.ntp.org
# List of fallback nameservers separated by "," appended
# to the list of nameservers given by the service. The
@@ -52,6 +54,7 @@
# the default route when compared to either a non-preferred
# type or a preferred type further down in the list.
# PreferredTechnologies =
+PreferredTechnologies = ethernet,wifi
# List of blacklisted network interfaces separated by ",".
# Found interfaces will be compared to the list and will
@@ -59,6 +62,7 @@
# match any of the list entries. Default value is
# vmnet,vboxnet,virbr.
# NetworkInterfaceBlacklist = vmnet,vboxnet,virbr
+NetworkInterfaceBlacklist = vmnet,vboxnet,virbr,usb
# Allow connman to change the system hostname. This can
# happen for example if we receive DHCP hostname option.
@@ -89,7 +93,7 @@
# normal operation of these networks. Due to this ethernet is not
# tethered by default. Do not activate ethernet tethering unless you
# really know what you are doing.
- TetheringTechnologies = wifi,bluetooth,gadget
+TetheringTechnologies = wifi,bluetooth,gadget
# Restore earlier tethering status when returning from offline mode,
# re-enabling a technology, and after restarts and reboots.