summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangyoon Jang <s89.jang@samsung.com>2014-01-13 18:39:32 +0900
committerLubomir Rintel <lkundrak@v3.sk>2015-02-11 11:55:33 +0100
commit1d75b3ecaaf286a43c6afd0d5460840a2c0254cd (patch)
treeeb846ccefb322cfe4cd1ea26d313919d9c33968b
parent2b90bf4fe2e0a5bff4d55eb8234386f90155c509 (diff)
Add kdbus-switch script and modified service files
Add optional flag --enable-kdbus-for-sbb allowing to compile with or without sbb support Change-Id: I3e060783b51a6b220c8671bf96c54315842666fc
-rw-r--r--configure.ac20
-rw-r--r--packaging/com.samsung.dbus.spec15
-rw-r--r--packaging/conf_dbus.tar.gzbin0 -> 2608 bytes
-rw-r--r--packaging/conf_kdbus.tar.gzbin0 -> 3377 bytes
-rwxr-xr-xpackaging/switch-to-dbus.sh18
-rwxr-xr-xpackaging/switch-to-kdbus.sh14
6 files changed, 64 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index e07367f9..426f2985 100644
--- a/configure.ac
+++ b/configure.ac
@@ -159,6 +159,7 @@ AC_ARG_ENABLE(console-owner-file, AS_HELP_STRING([--enable-console-owner-file],[
AC_ARG_ENABLE(launchd, AS_HELP_STRING([--enable-launchd],[build with launchd auto-launch support]),enable_launchd=$enableval,enable_launchd=auto)
AC_ARG_ENABLE(systemd, AS_HELP_STRING([--enable-systemd],[build with systemd at_console support]),enable_systemd=$enableval,enable_systemd=auto)
AC_ARG_ENABLE(kdbus-transport, AS_HELP_STRING([--enable-kdbus-transport],[build with kdbus transport support]),enable_kdbus_transport=$enableval,enable_kdbus_transport=no)
+AC_ARG_ENABLE(kdbus-for-sbb, AS_HELP_STRING([--enable-kdbus-for-sbb],[build with kdbus sbb support]),enable_kdbus_for_sbb=$enableval,enable_kdbus_for_sbb=no)
AC_ARG_WITH(init-scripts, AS_HELP_STRING([--with-init-scripts=[redhat]],[Style of init scripts to install]))
AC_ARG_WITH(session-socket-dir, AS_HELP_STRING([--with-session-socket-dir=[dirname]],[Where to put sockets for the per-login-session message bus]))
@@ -1255,6 +1256,18 @@ fi
AM_CONDITIONAL([ENABLE_KDBUS_TRANSPORT], [test x$enable_kdbus_transport = xyes])
+### sbb support
+if test x$enable_kdbus_for_sbb = xyes; then
+ KDBUS_LIBS=
+ #"-lcrypto"
+ #AC_SUBST([KDBUS_LIBS])
+ AC_DEFINE(KDBUS_FOR_SBB,1,[Enable SBB support])
+else
+ KDBUS_LIBS=
+fi
+
+AM_CONDITIONAL([ENABLE_KDBUS_FOR_SBB], [test x$enable_kdbus_for_sbb = xyes])
+
#### Set up final flags
LIBDBUS_LIBS="$THREAD_LIBS $NETWORK_libs $KDBUS_LIBS"
AC_SUBST([LIBDBUS_LIBS])
@@ -1847,7 +1860,8 @@ echo "
Building Doxygen docs: ${enable_doxygen_docs}
Building XML docs: ${enable_xml_docs}
Building launchd support: ${have_launchd}
- Building kdbus support: ${enable_kdbus_transport}
+ Building kdbus support: ${enable_kdbus_transport}
+ Building kdbus for sbb: ${enable_kdbus_for_sbb}
Init scripts style: ${with_init_scripts}
Abstract socket names: ${ac_cv_have_abstract_sockets}
System bus socket: ${DBUS_SYSTEM_SOCKET}
@@ -1858,8 +1872,8 @@ echo "
Console auth dir: ${DBUS_CONSOLE_AUTH_DIR}
Console owner file: ${have_console_owner_file}
Console owner file path: ${DBUS_CONSOLE_OWNER_FILE}
- System bus user: ${DBUS_USER}
- Session bus services dir: ${EXPANDED_DATADIR}/dbus-1/services
+ System bus user: ${DBUS_USER}
+ Session bus services dir: ${EXPANDED_DATADIR}/dbus-1/services
'make check' socket dir: ${TEST_SOCKET_DIR}
"
if test x$have_launchd = xyes; then
diff --git a/packaging/com.samsung.dbus.spec b/packaging/com.samsung.dbus.spec
index eedc959d..f9253623 100644
--- a/packaging/com.samsung.dbus.spec
+++ b/packaging/com.samsung.dbus.spec
@@ -8,6 +8,10 @@ Source0: %{name}-%{version}.tar.gz
Source2: dbus-user.socket
Source3: dbus-user.service
Source4: system.conf
+Source5: switch-to-dbus.sh
+Source6: switch-to-kdbus.sh
+Source7: conf_dbus.tar.gz
+Source8: conf_kdbus.tar.gz
BuildRequires: which
BuildRequires: expat-devel
BuildRequires: libtool
@@ -43,6 +47,7 @@ Headers and static libraries for D-Bus.
%build
./autogen.sh --enable-abstract-sockets --enable-x11-autolaunch --with-x \
--enable-kdbus-transport \
+ --enable-kdbus-for-sbb \
--disable-static \
--exec-prefix=/ \
--bindir=%{_bindir} \
@@ -90,6 +95,12 @@ mkdir -p %{buildroot}%{_libdir}/systemd/user
install -m0644 %{SOURCE2} %{buildroot}%{_libdir}/systemd/user/dbus.socket
install -m0644 %{SOURCE3} %{buildroot}%{_libdir}/systemd/user/dbus.service
+install -m0755 %{SOURCE5} %{buildroot}%{_bindir}/switch-to-dbus.sh
+install -m0755 %{SOURCE6} %{buildroot}%{_bindir}/switch-to-kdbus.sh
+
+tar -xvzf %{SOURCE7} -C %{buildroot}/etc/dbus-1
+tar -xvzf %{SOURCE8} -C %{buildroot}/etc/dbus-1
+
%post
mkdir -p /opt/var/lib/dbus
@@ -117,6 +128,10 @@ mkdir -p /opt/var/lib/dbus
%{_libdir}/systemd/user/*
%dir %{_datadir}/dbus-1
%{_datadir}/dbus-1/interfaces
+%{_bindir}/switch-to-dbus.sh
+%{_bindir}/switch-to-kdbus.sh
+%{_sysconfdir}/dbus-1/conf_dbus
+%{_sysconfdir}/dbus-1/conf_kdbus
%files libs
%{_libdir}/libdbus-1.so.3*
diff --git a/packaging/conf_dbus.tar.gz b/packaging/conf_dbus.tar.gz
new file mode 100644
index 00000000..45ddebc9
--- /dev/null
+++ b/packaging/conf_dbus.tar.gz
Binary files differ
diff --git a/packaging/conf_kdbus.tar.gz b/packaging/conf_kdbus.tar.gz
new file mode 100644
index 00000000..6cdbd2c4
--- /dev/null
+++ b/packaging/conf_kdbus.tar.gz
Binary files differ
diff --git a/packaging/switch-to-dbus.sh b/packaging/switch-to-dbus.sh
new file mode 100755
index 00000000..8fd5f8e4
--- /dev/null
+++ b/packaging/switch-to-dbus.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+CONF_DIR_PATH="/etc/dbus-1/conf_dbus"
+
+echo "copying legacy dbus modified service files..."
+rm /usr/lib/systemd/system/graphical.target.wants/xorg.target 2>/dev/null
+rm -rf /usr/lib/systemd/system/xorg* 2>/dev/null
+rm /usr/lib/systemd/user/tizen-middleware.target.wants/dbus.service 2>/dev/null
+ln -s /usr/lib/systemd/user/xorg.service /usr/lib/systemd/user/xorg.target.wants/
+ln -s /usr/lib/systemd/user/xorg_done.service /usr/lib/systemd/user/xorg.target.wants/
+cp -a $CONF_DIR_PATH/* /
+if [ "$?" -ne 0 ]; then
+ echo "error occured on copying!"
+else
+ echo "syncing..."
+ sync
+ echo "now reset and flash the kernel not using kdbus"
+fi
diff --git a/packaging/switch-to-kdbus.sh b/packaging/switch-to-kdbus.sh
new file mode 100755
index 00000000..0b5694e7
--- /dev/null
+++ b/packaging/switch-to-kdbus.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+CONF_DIR_PATH="/etc/dbus-1/conf_kdbus"
+
+echo "copying kdbus-modified service files..."
+rm /usr/lib/systemd/user/xorg.target.wants/* 2>/dev/null
+cp -a $CONF_DIR_PATH/* /
+if [ "$?" -ne 0 ]; then
+ echo "error occured on copying!"
+else
+ echo "syncing..."
+ sync
+ echo "now reset and flash the kernel using kdbus"
+fi