From 86163559ad4bef26a6f874bc4a0d91344ddce8bc Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 25 Jan 2017 13:16:58 +0900 Subject: [PATCH 01/16] Release version 0.3.0 Changes: - Split the packages - Fix versioning - Prevent SIGPIPE Change-Id: I044d588557b50c7b92cc9dd5fbf6d2ae9b89b754 Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index a986990..fc4b71e 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.2.3.14 +Version: 0.2.4 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From ca8232743d649980ab48a713d22f7c91ca21e469 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 25 Jan 2017 16:39:11 +0900 Subject: [PATCH 02/16] Remove adding the conformant object to the window object The launchpad-loader doesn't call the elm_win_resize_object_add() when creating the conformant object. Change-Id: I26476a248d7f2faceff9692e985e33a827714ac4 Signed-off-by: Hwankyu Jhun --- src/launchpad_loader.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/launchpad_loader.c b/src/launchpad_loader.c index 5dfe2e1..fdc60a5 100644 --- a/src/launchpad_loader.c +++ b/src/launchpad_loader.c @@ -113,7 +113,6 @@ static void __init_window(void) if (__conform) { evas_object_size_hint_weight_set(__conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_win_resize_object_add(__win, __conform); elm_conformant_precreated_object_set(__conform); } else { _E("elm_conformant_add() failed"); -- 2.7.4 From e85b65847a5904ebe3bebd1290b030066b02b5e1 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 2 Feb 2017 19:25:28 +0900 Subject: [PATCH 03/16] Add the pid to the environment When the application is launched by the debugger, the application is a child process of the debugger. The process group of the appliation is not equal to the process id of the debugger. If the process id is not equal to the process pid of the environment variable, the aul socket API will create the socket link to recevie the request. Requires: - https://review.tizen.org/gerrit/112668 Change-Id: I2f63a9cf74f13157b6cd39c8ad5d37489a37165a Signed-off-by: Hwankyu Jhun --- src/launchpad_common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/launchpad_common.c b/src/launchpad_common.c index 5e998c5..201c3d9 100644 --- a/src/launchpad_common.c +++ b/src/launchpad_common.c @@ -630,6 +630,7 @@ error: void _set_env(appinfo_t *menu_info, bundle *kb) { const char *str; + char buf[MAX_LOCAL_BUFSZ]; str = bundle_get_val(kb, AUL_K_STARTTIME); if (str != NULL) @@ -657,6 +658,9 @@ void _set_env(appinfo_t *menu_info, bundle *kb) str = bundle_get_val(kb, AUL_K_API_VERSION); if (str != NULL) setenv("TIZEN_API_VERSION", str, 1); + + snprintf(buf, sizeof(buf), "%d", getpid()); + setenv("AUL_PID", buf, 1); } char **_create_argc_argv(bundle *kb, int *margc) -- 2.7.4 From 392da6610fed92d659c31689ef5b1b6188e2fe57 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Fri, 3 Feb 2017 14:35:58 +0900 Subject: [PATCH 04/16] Release version 0.2.5 Changes: - Add the pid to the environment - Remove adding the conformant object to the window object Change-Id: Iba2f198373ab63ae3390ef404482630f8964d591 Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index fc4b71e..c75f4d5 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.2.4 +Version: 0.2.5 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From 70617d76413bc6f1451f36fc9023756d3b642f89 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Mon, 13 Feb 2017 17:34:06 +0900 Subject: [PATCH 05/16] Add an exception handling about overflow Change-Id: If173382502806a399ddfa1b5f6553a6601cb0bd1 Signed-off-by: Hwankyu Jhun --- inc/launchpad_common.h | 2 +- src/launchpad.c | 16 ++++++++-------- src/launchpad_common.c | 15 +++++++++++---- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/inc/launchpad_common.h b/inc/launchpad_common.h index 63a9de3..93ba100 100644 --- a/inc/launchpad_common.h +++ b/inc/launchpad_common.h @@ -105,7 +105,7 @@ void _appinfo_free(appinfo_t *menu_info); char *_appinfo_get_app_path(appinfo_t *menu_info); int _proc_get_attr_by_pid(int pid, char *buf, int size); int _close_all_fds(void); -void _get_cpu_idle(long long *total, long long *idle); +void _get_cpu_idle(unsigned long long *total, unsigned long long *idle); int _setup_stdio(const char *ident); #endif /* __LAUNCHPAD_COMMON_H__ */ diff --git a/src/launchpad.c b/src/launchpad.c index 9177a5f..2c38f2b 100755 --- a/src/launchpad.c +++ b/src/launchpad.c @@ -74,8 +74,8 @@ typedef struct { char *loader_extra; int detection_method; int timeout_val; - long long cpu_total_time; - long long cpu_idle_time; + unsigned long long cpu_total_time; + unsigned long long cpu_idle_time; guint idle_checker; } candidate_process_context_t; @@ -1082,8 +1082,8 @@ static gboolean __handle_label_monitor(gpointer data) static gboolean __handle_idle_checker(gpointer data) { - long long total = 0; - long long idle = 0; + unsigned long long total = 0; + unsigned long long idle = 0; int per; candidate_process_context_t *cpc = data; @@ -1109,8 +1109,8 @@ static int __dispatch_cmd_hint(bundle *kb, int detection_method) { candidate_process_context_t *cpc; GList *iter = candidate_slot_list; - long long total = 0; - long long idle = 0; + unsigned long long total = 0; + unsigned long long idle = 0; _W("cmd hint %d", detection_method); while (iter) { @@ -1575,8 +1575,8 @@ static void __add_slot_from_info(gpointer data, gpointer user_data) candidate_process_context_t *cpc; bundle_raw *extra = NULL; int len; - long long total = 0; - long long idle = 0; + unsigned long long total = 0; + unsigned long long idle = 0; if (!strcmp(info->exe, "null")) { cpc = __add_slot(LAUNCHPAD_TYPE_USER + user_slot_offset, diff --git a/src/launchpad_common.c b/src/launchpad_common.c index 201c3d9..d36c2e4 100644 --- a/src/launchpad_common.c +++ b/src/launchpad_common.c @@ -72,13 +72,13 @@ static int __read_proc(const char *path, char *buf, int size) return ret; } -void _get_cpu_idle(long long *total, long long *idle) +void _get_cpu_idle(unsigned long long *total, unsigned long long *idle) { FILE *fp; int i; - long long sum = 0; - long long val; - long long iv = 0; + unsigned long long sum = 0; + unsigned long long val; + unsigned long long iv = 0; char buf[4] = { 0, }; fp = fopen("/proc/stat", "rt"); @@ -96,6 +96,13 @@ void _get_cpu_idle(long long *total, long long *idle) fclose(fp); return; } + + if (sum + val < sum) { + _E("overflow"); + fclose(fp); + return; + } + sum += val; if (i == 3) /* idle */ iv = val; -- 2.7.4 From ebebc512974d74843ef4ffffe20933e138201dcf Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Mon, 13 Feb 2017 19:41:35 +0900 Subject: [PATCH 06/16] Release version 0.2.6 Changes: - Add an exception handling about overflow Change-Id: I79eadbf0ed086e965700d07ecc21a05dd8ab43ec Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index c75f4d5..1e4d914 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.2.5 +Version: 0.2.6 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From 9bebe3e581286246d57bc6261258a8a4f2a3293c Mon Sep 17 00:00:00 2001 From: Venkatesha Sarpangala Date: Mon, 20 Feb 2017 11:24:04 +0530 Subject: [PATCH 07/16] Re-adjust lauchpad logs Modify logs that create confusion to the developers while debugging issues Change-Id: Iae2ae992bd291de6d72c7377b7ca1596894a4c18 Signed-off-by: Venkatesha Sarpangala (cherry picked from commit 787579c82fd411ee74ee2c76472decf2f36d72db) --- src/launchpad.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/launchpad.c b/src/launchpad.c index 2c38f2b..06fa044 100755 --- a/src/launchpad.c +++ b/src/launchpad.c @@ -313,10 +313,9 @@ static int __get_loader_id(bundle *kb) const char *val; val = bundle_get_val(kb, AUL_K_LOADER_ID); - if (val == NULL) { - _W("failed to get loader_id"); + if (val == NULL) return -1; - } + _W("Requested loader id: %s", val); return atoi(val); } -- 2.7.4 From c14ef4804d320c26545f3ac28acc14bae69a375d Mon Sep 17 00:00:00 2001 From: Semun Lee Date: Sat, 4 Mar 2017 14:38:23 +0900 Subject: [PATCH 08/16] Handle large app_pkt_t properly in send/recv launchpad need to handle large data properly. This patch fixes to handle large data properly in send/recv. Change-Id: I3ca132bf82bbb389b6696e63ea53ebdc8d773131 Signed-off-by: Semun Lee (cherry picked from commit 709ec1fb8525a1cc0aff632b4af0efc17d1c6c3e) --- inc/launchpad_common.h | 3 +- src/launchpad.c | 2 +- src/launchpad_common.c | 96 +++++++++++++++++++++++++++++--------------------- src/launchpad_lib.c | 15 ++------ 4 files changed, 60 insertions(+), 56 deletions(-) diff --git a/inc/launchpad_common.h b/inc/launchpad_common.h index 93ba100..0d4ef6e 100644 --- a/inc/launchpad_common.h +++ b/inc/launchpad_common.h @@ -91,7 +91,8 @@ void _modify_bundle(bundle *kb, int caller_pid, appinfo_t *menu_info, int cmd); int _send_cmd_to_amd(int cmd); int _create_server_sock(const char *name); -app_pkt_t *_recv_pkt_raw(int fd, int *clifd, struct ucred *cr); +app_pkt_t *_recv_pkt_raw(int fd); +app_pkt_t *_accept_recv_pkt_raw(int fd, int *clifd, struct ucred *cr); int _send_pkt_raw(int client_fd, app_pkt_t *pkt); int _connect_to_launchpad(int type, int id); void _set_sock_option(int fd, int cli); diff --git a/src/launchpad.c b/src/launchpad.c index 06fa044..4087450 100755 --- a/src/launchpad.c +++ b/src/launchpad.c @@ -1264,7 +1264,7 @@ static gboolean __handle_launch_event(gpointer data) int ret; traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "LAUNCHPAD:LAUNCH"); - pkt = _recv_pkt_raw(fd, &clifd, &cr); + pkt = _accept_recv_pkt_raw(fd, &clifd, &cr); if (!pkt) { _E("packet is NULL"); goto end; diff --git a/src/launchpad_common.c b/src/launchpad_common.c index d36c2e4..e3d727e 100644 --- a/src/launchpad_common.c +++ b/src/launchpad_common.c @@ -313,48 +313,25 @@ int _create_server_sock(const char *name) return fd; } -app_pkt_t *_recv_pkt_raw(int fd, int *clifd, struct ucred *cr) +app_pkt_t *_recv_pkt_raw(int fd) { int len; int ret; - struct sockaddr_un aul_addr = { 0, }; - int sun_size; - app_pkt_t *pkt = NULL; - int cl = sizeof(struct ucred); unsigned char buf[AUL_SOCK_MAXBUFF]; + app_pkt_t *pkt; int cmd; int datalen; int opt; - sun_size = sizeof(struct sockaddr_un); - - *clifd = accept(fd, (struct sockaddr *)&aul_addr, - (socklen_t *) &sun_size); - if (*clifd == -1) { - if (errno != EINTR) - _E("accept error"); - return NULL; - } - - if (getsockopt(*clifd, SOL_SOCKET, SO_PEERCRED, cr, - (socklen_t *) &cl) < 0) { - _E("peer information error"); - close(*clifd); - return NULL; - } - - _set_sock_option(*clifd, 1); - retry_recv: /* receive header(cmd, datalen) */ - len = recv(*clifd, buf, AUL_PKT_HEADER_SIZE, 0); + len = recv(fd, buf, AUL_PKT_HEADER_SIZE, 0); if (len < 0) if (errno == EINTR) goto retry_recv; if (len < AUL_PKT_HEADER_SIZE) { _E("recv error"); - close(*clifd); return NULL; } memcpy(&cmd, buf, sizeof(int)); @@ -364,7 +341,7 @@ retry_recv: /* allocate for a null byte */ pkt = (app_pkt_t *)calloc(1, AUL_PKT_HEADER_SIZE + datalen + 1); if (pkt == NULL) { - close(*clifd); + _E("failed to alloc app_pkt_t"); return NULL; } pkt->cmd = cmd; @@ -373,11 +350,10 @@ retry_recv: len = 0; while (len != pkt->len) { - ret = recv(*clifd, pkt->data + len, pkt->len - len, 0); + ret = recv(fd, pkt->data + len, pkt->len - len, 0); if (ret < 0) { _E("recv error %d %d", len, pkt->len); free(pkt); - close(*clifd); return NULL; } len += ret; @@ -387,33 +363,71 @@ retry_recv: return pkt; } +app_pkt_t *_accept_recv_pkt_raw(int fd, int *clifd, struct ucred *cr) +{ + struct sockaddr_un aul_addr = { 0, }; + int sun_size; + app_pkt_t *pkt; + int newfd; + int cl = sizeof(struct ucred); + + sun_size = sizeof(struct sockaddr_un); + + newfd = accept(fd, (struct sockaddr *)&aul_addr, + (socklen_t *) &sun_size); + if (newfd == -1) { + if (errno != EINTR) + _E("accept error"); + return NULL; + } + + if (getsockopt(newfd, SOL_SOCKET, SO_PEERCRED, cr, + (socklen_t *) &cl) < 0) { + _E("peer information error"); + close(newfd); + return NULL; + } + + _set_sock_option(newfd, 1); + + pkt = _recv_pkt_raw(newfd); + if (pkt == NULL) { + _E("failed to receive pkt from client"); + close(newfd); + return NULL; + } + + *clifd = newfd; + return pkt; +} + int _send_pkt_raw(int client_fd, app_pkt_t *pkt) { int send_ret = 0; int pkt_size = 0; + int sent = 0; if (client_fd == -1 || pkt == NULL) { _E("arguments error!"); - goto error; + return -1; } pkt_size = AUL_PKT_HEADER_SIZE + pkt->len; - send_ret = send(client_fd, pkt, pkt_size, MSG_NOSIGNAL); - _D("send(%d) : %d / %d", client_fd, send_ret, pkt_size); + while (sent != pkt_size) { + send_ret = send(client_fd, (char *)pkt + sent, + pkt_size - sent, MSG_NOSIGNAL); + if (send_ret == -1) { + _E("send error! (%d)", errno); + return -1; + } - if (send_ret == -1) { - _E("send error!"); - goto error; - } else if (send_ret != pkt_size) { - _E("send byte fail!"); - goto error; + sent += send_ret; + _D("send(%d: ret: %d) : %d / %d", + client_fd, send_ret, sent, pkt_size); } return 0; - -error: - return -1; } appinfo_t *_appinfo_create(bundle *kb) diff --git a/src/launchpad_lib.c b/src/launchpad_lib.c index 17553ba..70a600e 100644 --- a/src/launchpad_lib.c +++ b/src/launchpad_lib.c @@ -266,25 +266,14 @@ static int __candidate_process_launchpad_main_loop(app_pkt_t *pkt, static void __receiver_cb(int fd) { int ret = -1; - int recv_ret; app_pkt_t *pkt; _D("[candidate] ECORE_FD_READ"); - pkt = (app_pkt_t *)malloc(sizeof(char) * AUL_SOCK_MAXBUFF); + pkt = _recv_pkt_raw(fd); if (!pkt) { - _D("[candidate] out of memory1"); + _D("[candidate] _recv_pkt_raw error!"); exit(-1); } - memset(pkt, 0, AUL_SOCK_MAXBUFF); - - recv_ret = recv(fd, pkt, AUL_SOCK_MAXBUFF, 0); - if (recv_ret == -1) { - _D("[condidate] recv error!"); - close(fd); - free(pkt); - exit(-1); - } - _D("[candidate] recv_ret: %d, pkt->len: %d", recv_ret, pkt->len); __loader_adapter->remove_fd(__loader_user_data, fd); close(fd); -- 2.7.4 From f0af93c0943bb451acb17fed285e49b1fadcea45 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Tue, 7 Mar 2017 13:25:26 +0900 Subject: [PATCH 09/16] Ignore SIGILL during OpenSSL initialization When debugging an application by using the gdbserver, SIGILL is occurred during OpenSSL initialization. After applying this patch, the launchpad will support to add the default option for the debug tools. While executing an application with the gdbserver, "--wrapper env OPENSSL_armcap=0 --" will be set by the launchpad. e.g. $ /usr/bin/gdbserver --wrapper env OPENSSL_armcap=0 -- : Change-Id: Id8141d2fd76daff50ad0bde9a6fbae903a3de869 Signed-off-by: Hwankyu Jhun --- inc/debugger_info.h | 1 + packaging/default.debugger.in | 4 ++++ src/debugger_info.c | 16 ++++++++++++++++ src/launchpad_debug.c | 13 ++++++++++++- 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/inc/debugger_info.h b/inc/debugger_info.h index 22bd253..ecaae3a 100644 --- a/inc/debugger_info.h +++ b/inc/debugger_info.h @@ -30,5 +30,6 @@ GList *_debugger_info_get_extra_env_list(debugger_info_h info); GList *_debugger_info_get_unlink_list(debugger_info_h info); const char *_debugger_info_get_attach(debugger_info_h info); GList *_debugger_info_get_last_extra_key_list(debugger_info_h info); +GList *_debugger_info_get_default_opt_list(debugger_info_h info); #endif /* __DEBUGGER_INFO_H__ */ diff --git a/packaging/default.debugger.in b/packaging/default.debugger.in index 7b8428d..cce288e 100644 --- a/packaging/default.debugger.in +++ b/packaging/default.debugger.in @@ -11,6 +11,10 @@ NAME DEBUG EXE /opt/usr/home/owner/share/tmp/sdk_tools/gdbserver/gdbserver APP_TYPE capp|c++app EXTRA_KEY __DLP_DEBUG_ARG__ +DEFAULT_OPT --wrapper +DEFAULT_OPT env +DEFAULT_OPT OPENSSL_armcap=0 +DEFAULT_OPT -- [DEBUGGER] NAME ATTACH diff --git a/src/debugger_info.c b/src/debugger_info.c index aa576ac..44bd1e9 100644 --- a/src/debugger_info.c +++ b/src/debugger_info.c @@ -34,6 +34,7 @@ #define TAG_UNLINK "UNLINK" #define TAG_ATTACH "ATTACH" #define TAG_LAST_EXTRA_KEY "LAST_EXTRA_KEY" +#define TAG_DEFAULT_OPT "DEFAULT_OPT" struct debugger_info_s { char *name; @@ -44,6 +45,7 @@ struct debugger_info_s { GList *unlink_list; char *attach; GList *last_extra_key_list; + GList *default_opt_list; }; static struct debugger_info_s *__create_debugger_info(void) @@ -66,6 +68,8 @@ static void __destroy_debugger_info(gpointer data) if (info == NULL) return; + if (info->default_opt_list) + g_list_free_full(info->default_opt_list, free); if (info->last_extra_key_list) g_list_free_full(info->last_extra_key_list, free); if (info->attach) @@ -183,6 +187,10 @@ static GList *__parse_file(GList *list, const char *path) info->last_extra_key_list = g_list_append( info->last_extra_key_list, strdup(tok2)); + } else if (strcasecmp(TAG_DEFAULT_OPT, tok1) == 0) { + info->default_opt_list = g_list_append( + info->default_opt_list, + strdup(tok2)); } } fclose(fp); @@ -308,3 +316,11 @@ GList *_debugger_info_get_last_extra_key_list(debugger_info_h info) return info->last_extra_key_list; } + +GList *_debugger_info_get_default_opt_list(debugger_info_h info) +{ + if (info == NULL) + return NULL; + + return info->default_opt_list; +} diff --git a/src/launchpad_debug.c b/src/launchpad_debug.c index 4ead375..da11576 100644 --- a/src/launchpad_debug.c +++ b/src/launchpad_debug.c @@ -88,6 +88,7 @@ int _debug_create_argv(int *argc, char ***argv, bool *attach) const char *debug_argv; const char *attach_str; GList *iter; + GList *list; int i; if (argc == NULL || argv == NULL || attach == NULL) { @@ -106,7 +107,8 @@ int _debug_create_argv(int *argc, char ***argv, bool *attach) if (attach_str && strcasecmp(attach_str, "true") == 0) *attach = true; - new_argc = g_list_length(debug_argv_list) + 1; + list = _debugger_info_get_default_opt_list(debugger_info); + new_argc = g_list_length(debug_argv_list) + g_list_length(list) + 1; new_argv = (char **)calloc(new_argc, sizeof(char *)); if (new_argv == NULL) { _E("out of memory"); @@ -116,6 +118,15 @@ int _debug_create_argv(int *argc, char ***argv, bool *attach) i = LOADER_ARG_PATH; new_argv[i++] = strdup(exe); + iter = g_list_first(list); + while (iter) { + debug_argv = (const char *)iter->data; + if (debug_argv) + new_argv[i++] = strdup(debug_argv); + + iter = g_list_next(iter); + } + iter = g_list_first(debug_argv_list); while (iter) { debug_argv = (const char *)iter->data; -- 2.7.4 From fee570d496b353842be37c2bc44c7bf7a055845b Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 8 Mar 2017 13:28:42 +0900 Subject: [PATCH 10/16] Release version 0.2.7 Changes: - Ignore SIGILL during OpenSSL initialization - Handle large app_pkt_t properly in send/recv - Re-adjust lauchpad logs Change-Id: I1c4e397dce1957b11d8c03fe7e3f95af08b304d6 Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index 1e4d914..42b60b4 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.2.6 +Version: 0.2.7 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From 25c7cbbd495bb790690a9442cefa8f15324c6fa2 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Tue, 21 Mar 2017 17:37:48 +0900 Subject: [PATCH 11/16] Fix a typing error Change-Id: Icaa9108e59e725cab731c64f37ba63f1a2240d24 Signed-off-by: Hwankyu Jhun --- src/launchpad_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/launchpad_debug.c b/src/launchpad_debug.c index da11576..5eacf14 100644 --- a/src/launchpad_debug.c +++ b/src/launchpad_debug.c @@ -321,7 +321,7 @@ static void __set_debug_env(gpointer data, gpointer user_data) break; strncat(buf, ",", sizeof(buf) - strlen(buf) - 1); - strncat(buf, str_arr[1], sizeof(buf) - strlen(buf) - 1); + strncat(buf, str_arr[i], sizeof(buf) - strlen(buf) - 1); } bundle_del(kb, key); -- 2.7.4 From 23e88cf7da0eb46fa410739f770beb23137589c4 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 22 Mar 2017 07:34:36 +0900 Subject: [PATCH 12/16] Release version 0.2.8 Changes: - Fix a typing error Change-Id: If9dc9e0f5d3e429ee4f737a4676621bfdf4eb4a8 Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index 42b60b4..65e7ad4 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.2.7 +Version: 0.2.8 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From 4968f2820305111f7c278f0282433613d5ee072e Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 23 Mar 2017 10:07:13 +0900 Subject: [PATCH 13/16] Use license macro Change-Id: I7fde276824ca6a89df24d1b969fa3102b58a78b2 Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index 65e7ad4..f191d89 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -80,14 +80,11 @@ install -m 0644 %SOURCE102 %{buildroot}%{_unitdir_user}/launchpad-process-pool.s ln -sf ../launchpad-process-pool.socket %{buildroot}%{_unitdir_user}/sockets.target.wants/launchpad-process-pool.socket ln -sf ../launchpad-process-pool.service %{buildroot}%{_unitdir_user}/basic.target.wants/launchpad-process-pool.service -mkdir -p %{buildroot}/usr/share/license -cp %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name} - %post %files %manifest launchpad.manifest -%{_prefix}/share/license/%{name} +%license LICENSE %{_prefix}/share/aul/default.debugger %{_unitdir_user}/launchpad-process-pool.service %{_unitdir_user}/launchpad-process-pool.socket @@ -103,5 +100,6 @@ cp %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{nam %files -n launchpad-loader %manifest %{name}.manifest +%license LICENSE %{_prefix}/share/aul/default.loader %caps(cap_setgid=ei) %{_bindir}/launchpad-loader -- 2.7.4 From ae5117b8845b510702ed4e2a81fe06f0fe156233 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 23 Mar 2017 11:04:30 +0900 Subject: [PATCH 14/16] Release version 0.2.9 Changes: - Use license macro Change-Id: I8af9438a0771e70ad393e03468acc4a8e19a5650 Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index f191d89..8b2b347 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.2.8 +Version: 0.2.9 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From fd8e1ee299d5a115e7362a659e8a147eed9c3df5 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 23 Mar 2017 17:39:02 +0900 Subject: [PATCH 15/16] Send app startup signal After calling security_manager_prepare_app(), the child process sends the app startup signal to the amd. This signal is for handling privacy popup. Change-Id: I46c51bb3ffc42c8f0271815fc8bf5e0f69f011ad Signed-off-by: Hwankyu Jhun --- inc/launchpad_common.h | 1 + src/launchpad.c | 1 + src/launchpad_lib.c | 1 + 3 files changed, 3 insertions(+) diff --git a/inc/launchpad_common.h b/inc/launchpad_common.h index 0d4ef6e..68b1e93 100644 --- a/inc/launchpad_common.h +++ b/inc/launchpad_common.h @@ -48,6 +48,7 @@ #define LAUNCHPAD_LAUNCH_SIGNAL 85 #define LAUNCHPAD_DEAD_SIGNAL 61 +#define APP_STARTUP_SIGNAL 91 #define PAD_LOADER_ID_STATIC 0 #define PAD_LOADER_ID_DIRECT 1 diff --git a/src/launchpad.c b/src/launchpad.c index 4087450..5cf71de 100755 --- a/src/launchpad.c +++ b/src/launchpad.c @@ -714,6 +714,7 @@ static int __prepare_exec(const char *appid, const char *app_path, return PAD_ERR_REJECTED; } + _send_cmd_to_amd(APP_STARTUP_SIGNAL); if (bundle_get_type(kb, AUL_K_SDK) == BUNDLE_TYPE_NONE) _setup_stdio(basename(app_path)); diff --git a/src/launchpad_lib.c b/src/launchpad_lib.c index 70a600e..927046e 100644 --- a/src/launchpad_lib.c +++ b/src/launchpad_lib.c @@ -77,6 +77,7 @@ static int __prepare_exec(const char *appid, const char *app_path, return -1; } + _send_cmd_to_amd(APP_STARTUP_SIGNAL); _setup_stdio(basename(app_path)); ret = buxton_open(&bxt_cli, NULL, NULL); -- 2.7.4 From a0819d0af100d7f615895e4c45871929a10800e6 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 30 Mar 2017 18:49:11 +0900 Subject: [PATCH 16/16] Release version 0.2.10 Changes: - Send app startup signal Change-Id: I28818cfc56ff95173665d5a07fe829b5d2efc17f Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index 8b2b347..e088168 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.2.9 +Version: 0.2.10 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4