Merge "Revert "tizen: Add additional unit for "unified" user session"" into tizen accepted/tizen/unified/20190905.232214 submit/tizen/20190828.061756 submit/tizen/20190829.043227 submit/tizen/20190829.094028 submit/tizen/20190830.023608 submit/tizen/20190830.034707 submit/tizen/20190905.064609
authorJongmin Lee <jm105.lee@samsung.com>
Thu, 22 Aug 2019 21:27:46 +0000 (21:27 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Thu, 22 Aug 2019 21:27:46 +0000 (21:27 +0000)
bus/at-spi-bus-launcher.c
meson.build
packaging/at-spi2-core.spec
test/meson.build

index e42a26d..b15345b 100644 (file)
@@ -349,7 +349,11 @@ ensure_a11y_bus_daemon (A11yBusLauncher *app, char *config_path)
   argv[1] = (char*)config_path;
 
   if (pipe (app->pipefd) < 0)
-    g_error ("Failed to create pipe: %s", strerror (errno));
+    {
+      char buf[4096] = { 0 };
+      strerror_r (errno, buf, sizeof(buf));
+      g_error ("Failed to create pipe: %s", buf);
+    }
 
   g_clear_pointer (&app->a11y_launch_error_message, g_free);
 
@@ -378,7 +382,9 @@ ensure_a11y_bus_daemon (A11yBusLauncher *app, char *config_path)
   LOGD("Launched a11y bus, child is %ld", (long) pid);
   if (!unix_read_all_fd_to_string (app->pipefd[0], addr_buf, sizeof (addr_buf)))
     {
-      app->a11y_launch_error_message = g_strdup_printf ("Failed to read address: %s", strerror (errno));
+      char buf[4096] = { 0 };
+      strerror_r (errno, buf, sizeof(buf));
+      app->a11y_launch_error_message = g_strdup_printf ("Failed to read address: %s", buf);
       kill (app->a11y_bus_pid, SIGTERM);
       goto error;
     }
@@ -387,6 +393,7 @@ ensure_a11y_bus_daemon (A11yBusLauncher *app, char *config_path)
   app->state = A11Y_BUS_STATE_RUNNING;
 
   /* Trim the trailing newline */
+  if (app->a11y_bus_address) g_free(app->a11y_bus_address);
   app->a11y_bus_address = g_strchomp (g_strdup (addr_buf));
   LOGD("a11y bus address: %s", app->a11y_bus_address);
 
@@ -437,16 +444,32 @@ ensure_a11y_bus_broker (A11yBusLauncher *app, char *config_path)
   GError *error = NULL;
 
   if ((app->listenfd = socket (PF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0)) < 0)
-    g_error ("Failed to create listening socket: %s", strerror (errno));
+    {
+      char buf[4096] = { 0 };
+      strerror_r (errno, buf, sizeof(buf));
+      g_error ("Failed to create listening socket: %s", buf);
+    }
 
   if (bind (app->listenfd, (struct sockaddr *)&addr, sizeof(sa_family_t)) < 0)
-    g_error ("Failed to bind listening socket: %s", strerror (errno));
+    {
+      char buf[4096] = { 0 };
+      strerror_r (errno, buf, sizeof(buf));
+      g_error ("Failed to bind listening socket: %s", buf);
+    }
 
   if (getsockname (app->listenfd, (struct sockaddr *)&addr, &addr_len) < 0)
-    g_error ("Failed to get socket name for listening socket: %s", strerror(errno));
+    {
+      char buf[4096] = { 0 };
+      strerror_r (errno, buf, sizeof(buf));
+      g_error ("Failed to get socket name for listening socket: %s", buf);
+    }
 
   if (listen (app->listenfd, 1024) < 0)
-    g_error ("Failed to listen on socket: %s", strerror(errno));
+    {
+      char buf[4096] = { 0 };
+      strerror_r (errno, buf, sizeof(buf));
+      g_error ("Failed to listen on socket: %s", buf);
+    }
 
   g_clear_pointer (&app->a11y_launch_error_message, g_free);
 
@@ -870,7 +893,11 @@ init_sigterm_handling (A11yBusLauncher *app)
   GIOChannel *sigterm_channel;
 
   if (pipe (sigterm_pipefd) < 0)
-    g_error ("Failed to create pipe: %s", strerror (errno));
+    {
+      char buf[4096] = { 0 };
+      strerror_r (errno, buf, sizeof(buf));
+      g_error ("Failed to create pipe: %s", buf);
+    }
   signal (SIGTERM, sigterm_handler);
 
   sigterm_channel = g_io_channel_unix_new (sigterm_pipefd[0]);
index ab48912..777f821 100644 (file)
@@ -28,6 +28,7 @@ atspi_datadir = join_paths(atspi_prefix, get_option('datadir'))
 atspi_libexecdir = join_paths(atspi_prefix, get_option('libexecdir'))
 atspi_sysconfdir = join_paths(atspi_prefix, get_option('sysconfdir'))
 atspi_libdir = join_paths(atspi_prefix, get_option('libdir'))
+atspi_bindir = join_paths(atspi_prefix, get_option('bindir'))
 atspi_includedir = join_paths(atspi_prefix, get_option('includedir'))
 
 if get_option('dbus_services_dir') != 'default'
index 7981bc8..c2db81e 100644 (file)
@@ -73,7 +73,7 @@ to develop applications that require these.
 cp %{SOURCE1001} .
 
 %build
-meson --prefix /usr/ build -Dwith-dbus-daemondir=%{_bindir} -Ddbus_daemon=/usr/bin/dbus-daemon \
+meson --prefix /usr --libdir %{_libdir} build -Dwith-dbus-daemondir=%{_bindir} -Ddbus_daemon=/usr/bin/dbus-daemon \
 %if !%{with x}
         -Denable-x11=no \
 %else
@@ -101,7 +101,7 @@ rm -fr %{buildroot}
 %files -f %{name}.lang
 %manifest %{name}.manifest
 %defattr(-,root,root)
-%{_libexecdir}/at_spi2_tool
+%{_bindir}/at_spi2_tool
 
 %doc AUTHORS README
 %license COPYING
index e564e2a..3f469c0 100644 (file)
@@ -12,5 +12,5 @@ executable('at_spi2_tool', at_spi2_tool_sources,
            c_args: '-fPIE',
            link_args: '-pie',
            install: true,
-           install_dir: atspi_libexecdir)
+           install_dir: atspi_bindir)