From c94c1e39e6dd19a545fb1060c7ee69af971977f5 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Mon, 14 Nov 2016 17:23:55 +0900 Subject: [PATCH 01/16] Adjust dlog level Change-Id: I1992d143170bf3e5ac38215bd3198b3d44e1d847 Signed-off-by: Hwankyu Jhun --- src/launchpad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/launchpad.c b/src/launchpad.c index 55c6288..4cf0919 100755 --- a/src/launchpad.c +++ b/src/launchpad.c @@ -314,7 +314,7 @@ static int __get_loader_id(bundle *kb) val = bundle_get_val(kb, AUL_K_LOADER_ID); if (val == NULL) { - _E("failed to get loader_id"); + _W("failed to get loader_id"); return -1; } -- 2.7.4 From 0319d8fdfb07f3bd23a40fd257b5e97198f6aa58 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Fri, 25 Nov 2016 11:09:59 +0900 Subject: [PATCH 02/16] Shut down elementary Change-Id: I4d81a9ab14d07f6e7aaff9601d3bb9fbe8576daf Signed-off-by: Hwankyu Jhun --- src/launchpad_loader.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/launchpad_loader.c b/src/launchpad_loader.c index 8559b73..35850a9 100644 --- a/src/launchpad_loader.c +++ b/src/launchpad_loader.c @@ -321,6 +321,7 @@ do_dlopen: free(libdir); res = dl_main(argc, argv); dlclose(handle); + elm_shutdown(); return res; -- 2.7.4 From c6dfe10089afcc9962c72efd8ae01f5fa2a369f6 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Tue, 29 Nov 2016 16:15:32 +0900 Subject: [PATCH 03/16] Adjust stdout/stderr redirection Change-Id: I26cce4cc82cb6a2f35f7e60669b51c64c039bdf4 Signed-off-by: Hwankyu Jhun --- src/launchpad_debug.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/launchpad_debug.c b/src/launchpad_debug.c index 10afec8..0065f1f 100644 --- a/src/launchpad_debug.c +++ b/src/launchpad_debug.c @@ -266,15 +266,15 @@ void _debug_prepare_debugger(bundle *kb) if (debugger == NULL) return; + ret = __redirect_std_fds(kb); + if (ret < 0) + _E("[DEBUG] Failed to redirect standard fds"); + _D("[DEBUG] debugger: %s", debugger); debugger_info = _debugger_info_find(debugger_info_list, debugger); if (debugger_info == NULL) return; - ret = __redirect_std_fds(kb); - if (ret < 0) - _E("[DEBUG] Failed to redirect standard fds"); - list = _debugger_info_get_unlink_list(debugger_info); g_list_foreach(list, __remove_file, NULL); -- 2.7.4 From f328e4d82111555c4b00a90a8b9ed60b5ed607fa Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Fri, 2 Dec 2016 14:02:04 +0900 Subject: [PATCH 04/16] Support unit test tool - Add extra data on debugger option Change-Id: I511302dea6a999e8154a84ee73affe3c1c0b2269 Signed-off-by: Hwankyu Jhun --- inc/debugger_info.h | 1 + inc/launchpad_debug.h | 1 + packaging/default.debugger.in | 6 +++ src/debugger_info.c | 32 +++++++++++---- src/launchpad.c | 17 +++++++- src/launchpad_debug.c | 96 +++++++++++++++++++++++++++++++++++++++---- 6 files changed, 137 insertions(+), 16 deletions(-) diff --git a/inc/debugger_info.h b/inc/debugger_info.h index 7f61846..22bd253 100644 --- a/inc/debugger_info.h +++ b/inc/debugger_info.h @@ -29,5 +29,6 @@ GList *_debugger_info_get_extra_key_list(debugger_info_h info); 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); #endif /* __DEBUGGER_INFO_H__ */ diff --git a/inc/launchpad_debug.h b/inc/launchpad_debug.h index 8bdb6ef..a866270 100644 --- a/inc/launchpad_debug.h +++ b/inc/launchpad_debug.h @@ -20,6 +20,7 @@ #include #include +int _debug_create_extra_argv(int *arg, char ***argv); int _debug_create_argv(int *argc, char ***argv, bool *attach); void _debug_destroy_argv(int argc, char **argv); int _debug_get_caller_pid(bundle *kb); diff --git a/packaging/default.debugger.in b/packaging/default.debugger.in index ee2e717..7b8428d 100644 --- a/packaging/default.debugger.in +++ b/packaging/default.debugger.in @@ -18,3 +18,9 @@ EXE /opt/usr/home/owner/share/tmp/sdk_tools/gdbserver/gdbserver APP_TYPE capp|c++app EXTRA_KEY __DLP_ATTACH_ARG__ ATTACH true + +[DEBUGGER] +NAME UNIT_TEST +APP_TYPE capp|c++app +LAST_EXTRA_KEY __DLP_UNIT_TEST_ARG__ + diff --git a/src/debugger_info.c b/src/debugger_info.c index 4af4a2d..8e7d446 100644 --- a/src/debugger_info.c +++ b/src/debugger_info.c @@ -25,14 +25,15 @@ #include "launchpad_common.h" #include "debugger_info.h" -#define TAG_DEBUGGER "[DEBUGGER]" -#define TAG_NAME "NAME" -#define TAG_EXE "EXE" -#define TAG_APP_TYPE "APP_TYPE" -#define TAG_EXTRA_KEY "EXTRA_KEY" -#define TAG_EXTRA_ENV "EXTRA_ENV" -#define TAG_UNLINK "UNLINK" -#define TAG_ATTACH "ATTACH" +#define TAG_DEBUGGER "[DEBUGGER]" +#define TAG_NAME "NAME" +#define TAG_EXE "EXE" +#define TAG_APP_TYPE "APP_TYPE" +#define TAG_EXTRA_KEY "EXTRA_KEY" +#define TAG_EXTRA_ENV "EXTRA_ENV" +#define TAG_UNLINK "UNLINK" +#define TAG_ATTACH "ATTACH" +#define TAG_LAST_EXTRA_KEY "LAST_EXTRA_KEY" struct debugger_info_s { char *name; @@ -42,6 +43,7 @@ struct debugger_info_s { GList *extra_env_list; GList *unlink_list; char *attach; + GList *last_extra_key_list; }; static struct debugger_info_s *__create_debugger_info(void) @@ -64,6 +66,8 @@ static void __destroy_debugger_info(gpointer data) if (info == NULL) return; + if (info->last_extra_key_list) + g_list_free_full(info->last_extra_key_list, free); if (info->attach) free(info->attach); if (info->unlink_list) @@ -175,6 +179,10 @@ static GList *__parse_file(GList *list, const char *path) info = NULL; break; } + } else if (strcasecmp(TAG_LAST_EXTRA_KEY, tok1) == 0) { + info->last_extra_key_list = g_list_append( + info->last_extra_key_list, + strdup(tok2)); } } fclose(fp); @@ -293,3 +301,11 @@ const char *_debugger_info_get_attach(debugger_info_h info) return info->attach; } + +GList *_debugger_info_get_last_extra_key_list(debugger_info_h info) +{ + if (info == NULL) + return NULL; + + return info->last_extra_key_list; +} diff --git a/src/launchpad.c b/src/launchpad.c index 4cf0919..a1d4618 100755 --- a/src/launchpad.c +++ b/src/launchpad.c @@ -590,6 +590,7 @@ static int __create_app_argv(int *argc, char ***argv, const char *app_path, struct app_arg debug_arg = {0,}; struct app_arg launcher_arg = {0,}; struct app_arg arg = {0,}; + struct app_arg debug_extra_arg = {0,}; int ret; int i; int c; @@ -606,10 +607,19 @@ static int __create_app_argv(int *argc, char ***argv, const char *app_path, return 0; } + ret = _debug_create_extra_argv(&debug_extra_arg.argc, + &debug_extra_arg.argv); + if (ret < 0) { + _E("Failed to create debugger extra argv"); + _debug_destroy_argv(debug_arg.argc, debug_arg.argv); + return -1; + } + ret = __create_launcher_argv(&launcher_arg.argc, &launcher_arg.argv, app_type); if (ret < 0) { _E("Failed to create launcher argv"); + _debug_destroy_argv(debug_extra_arg.argc, debug_extra_arg.argv); _debug_destroy_argv(debug_arg.argc, debug_arg.argv); return -1; } @@ -618,12 +628,14 @@ static int __create_app_argv(int *argc, char ***argv, const char *app_path, if (arg.argc <= 0) { _E("Failed to export bundle"); __destroy_launcher_argv(launcher_arg.argc, launcher_arg.argv); + _debug_destroy_argv(debug_extra_arg.argc, debug_extra_arg.argv); _debug_destroy_argv(debug_arg.argc, debug_arg.argv); return -1; } arg.argv[LOADER_ARG_PATH] = strdup(app_path); - new_argc = debug_arg.argc + launcher_arg.argc + arg.argc; + new_argc = debug_arg.argc + launcher_arg.argc + arg.argc + + debug_extra_arg.argc; if (new_argc == arg.argc) { *argc = arg.argc; *argv = arg.argv; @@ -636,6 +648,7 @@ static int __create_app_argv(int *argc, char ***argv, const char *app_path, free(arg.argv[LOADER_ARG_PATH]); bundle_free_exported_argv(arg.argc, &arg.argv); __destroy_launcher_argv(launcher_arg.argc, launcher_arg.argv); + _debug_destroy_argv(debug_extra_arg.argc, debug_extra_arg.argv); _debug_destroy_argv(debug_arg.argc, debug_arg.argv); return -1; } @@ -647,6 +660,8 @@ static int __create_app_argv(int *argc, char ***argv, const char *app_path, new_argv[c++] = launcher_arg.argv[i]; for (i = 0; i < arg.argc; i++) new_argv[c++] = arg.argv[i]; + for (i = 0; i < debug_extra_arg.argc; i++) + new_argv[c++] = debug_extra_arg.argv[i]; *argc = new_argc; *argv = new_argv; diff --git a/src/launchpad_debug.c b/src/launchpad_debug.c index 0065f1f..4ead375 100644 --- a/src/launchpad_debug.c +++ b/src/launchpad_debug.c @@ -34,14 +34,58 @@ static int debug_initialized; static GList *debugger_info_list; static debugger_info_h debugger_info; +static GList *debug_argv_list; static GList *extra_argv_list; +int _debug_create_extra_argv(int *argc, char ***argv) +{ + int new_argc; + char **new_argv; + const char *extra_argv; + GList *iter; + int i; + + if (argc == NULL || argv == NULL) { + _E("[DEBUG] Invalid parameter"); + return -1; + } + + if (debugger_info == NULL) + return 0; + + new_argc = g_list_length(extra_argv_list); + if (new_argc == 0) + return 0; + + new_argv = (char **)calloc(new_argc, sizeof(char *)); + if (new_argv == NULL) { + _E("out of memory"); + return -1; + } + + i = LOADER_ARG_PATH; + iter = g_list_first(extra_argv_list); + while (iter) { + extra_argv = (const char *)iter->data; + if (extra_argv) + new_argv[i++] = strdup(extra_argv); + + iter = g_list_next(iter); + } + + *argc = new_argc; + *argv = new_argv; + _D("[DEBUG] argc: %d, i: %d", argc, i); + + return 0; +} + int _debug_create_argv(int *argc, char ***argv, bool *attach) { int new_argc; char **new_argv; const char *exe; - const char *extra_argv; + const char *debug_argv; const char *attach_str; GList *iter; int i; @@ -56,13 +100,13 @@ int _debug_create_argv(int *argc, char ***argv, bool *attach) exe = _debugger_info_get_exe(debugger_info); if (exe == NULL) - return -1; + return 0; attach_str = _debugger_info_get_attach(debugger_info); if (attach_str && strcasecmp(attach_str, "true") == 0) *attach = true; - new_argc = g_list_length(extra_argv_list) + 1; + new_argc = g_list_length(debug_argv_list) + 1; new_argv = (char **)calloc(new_argc, sizeof(char *)); if (new_argv == NULL) { _E("out of memory"); @@ -72,11 +116,11 @@ int _debug_create_argv(int *argc, char ***argv, bool *attach) i = LOADER_ARG_PATH; new_argv[i++] = strdup(exe); - iter = g_list_first(extra_argv_list); + iter = g_list_first(debug_argv_list); while (iter) { - extra_argv = (const char *)iter->data; - if (extra_argv) - new_argv[i++] = strdup(extra_argv); + debug_argv = (const char *)iter->data; + if (debug_argv) + new_argv[i++] = strdup(debug_argv); iter = g_list_next(iter); } @@ -198,6 +242,41 @@ static void __add_extra_argv(gpointer data, gpointer user_data) bundle_del(kb, key); } +static void __add_debug_argv(gpointer data, gpointer user_data) +{ + const char *key = (const char *)data; + bundle *kb = (bundle *)user_data; + const char *str; + const char **str_arr = NULL; + int len = 0; + int i; + + if (key == NULL || kb == NULL) + return; + + _D("[DEBUG] key: %s", key); + if (bundle_get_type(kb, key) & BUNDLE_TYPE_ARRAY) { + str_arr = bundle_get_str_array(kb, key, &len); + } else { + str = bundle_get_val(kb, key); + if (str) { + str_arr = &str; + len = 1; + } + } + + for (i = 0; i < len; i++) { + if (str_arr[i] == NULL) + break; + + debug_argv_list = g_list_append(debug_argv_list, + strdup(str_arr[i])); + } + + if (str_arr) + bundle_del(kb, key); +} + static void __set_debug_env(gpointer data, gpointer user_data) { const char *key = (const char *)data; @@ -282,6 +361,9 @@ void _debug_prepare_debugger(bundle *kb) g_list_foreach(list, __set_debug_env, kb); list = _debugger_info_get_extra_key_list(debugger_info); + g_list_foreach(list, __add_debug_argv, kb); + + list = _debugger_info_get_last_extra_key_list(debugger_info); g_list_foreach(list, __add_extra_argv, kb); } -- 2.7.4 From 41eace5928ed3f152f4886130d642906a1284c02 Mon Sep 17 00:00:00 2001 From: Junghoon Park Date: Wed, 14 Dec 2016 19:11:25 +0900 Subject: [PATCH 05/16] Add exception for web widget Change-Id: If81203bbb86ca059d1edcc773fe9927947cfea2a Signed-off-by: Junghoon Park --- src/launchpad.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/launchpad.c b/src/launchpad.c index a1d4618..6416bc1 100755 --- a/src/launchpad.c +++ b/src/launchpad.c @@ -1355,6 +1355,10 @@ static gboolean __handle_launch_event(gpointer data) if (menu_info->comp_type && strcmp(menu_info->comp_type, "svcapp") == 0) { loader_id = PAD_LOADER_ID_DIRECT; + } else if (menu_info->comp_type && menu_info->app_type && + strcmp(menu_info->comp_type, "widgetapp") == 0 && + strcmp(menu_info->app_type, "webapp") == 0) { + loader_id = PAD_LOADER_ID_DIRECT; } else { loader_id = __get_loader_id(kb); if (loader_id <= PAD_LOADER_ID_STATIC) { -- 2.7.4 From 2855afa7f8aa9315fbffc3629cb1fa4624843672 Mon Sep 17 00:00:00 2001 From: Inkyun Kil Date: Thu, 15 Dec 2016 09:24:06 +0900 Subject: [PATCH 06/16] Replace 'readdir_r' with 'readdir' 'readdir_r' is deprecated since version 2.24 glibc. By upgrading TOOLCHAIN for platform, it should be replaced by 'readdir' Change-Id: I54ad1b8291f5148e2e294cb8219ce11b32f1db6c Signed-off-by: Inkyun Kil --- src/debugger_info.c | 11 +++++------ src/launcher_info.c | 11 +++++------ src/launchpad_common.c | 18 ++++++++---------- src/launchpad_signal.c | 2 +- src/loader_info.c | 11 +++++------ 5 files changed, 24 insertions(+), 29 deletions(-) diff --git a/src/debugger_info.c b/src/debugger_info.c index 4af4a2d..1ba596b 100644 --- a/src/debugger_info.c +++ b/src/debugger_info.c @@ -190,8 +190,7 @@ static GList *__parse_file(GList *list, const char *path) GList *_debugger_info_load(const char *path) { DIR *dp; - struct dirent dentry; - struct dirent *result = NULL; + struct dirent *dentry = NULL; GList *list = NULL; char buf[PATH_MAX]; char *ext; @@ -203,14 +202,14 @@ GList *_debugger_info_load(const char *path) if (dp == NULL) return NULL; - while (readdir_r(dp, &dentry, &result) == 0 && result != NULL) { - if (dentry.d_name[0] == '.') + while ((dentry = readdir(dp)) != NULL) { + if (dentry->d_name[0] == '.') continue; - ext = strrchr(dentry.d_name, '.'); + ext = strrchr(dentry->d_name, '.'); if (ext && strcmp(ext, ".debugger") == 0) { snprintf(buf, sizeof(buf), "%s/%s", - path, dentry.d_name); + path, dentry->d_name); list = __parse_file(list, buf); } } diff --git a/src/launcher_info.c b/src/launcher_info.c index 06b46ab..bff7a12 100644 --- a/src/launcher_info.c +++ b/src/launcher_info.c @@ -169,8 +169,7 @@ static GList *__parse_file(GList *list, const char *path) GList *_launcher_info_load(const char *path) { DIR *dp; - struct dirent dentry; - struct dirent *result = NULL; + struct dirent *dentry = NULL; GList *list = NULL; char buf[PATH_MAX]; char *ext; @@ -182,14 +181,14 @@ GList *_launcher_info_load(const char *path) if (dp == NULL) return NULL; - while (readdir_r(dp, &dentry, &result) == 0 && result != NULL) { - if (dentry.d_name[0] == '.') + while ((dentry = readdir(dp)) != NULL) { + if (dentry->d_name[0] == '.') continue; - ext = strrchr(dentry.d_name, '.'); + ext = strrchr(dentry->d_name, '.'); if (ext && strcmp(ext, ".launcher") == 0) { snprintf(buf, sizeof(buf), "%s/%s", - path, dentry.d_name); + path, dentry->d_name); list = __parse_file(list, buf); } } diff --git a/src/launchpad_common.c b/src/launchpad_common.c index aa4b909..dbfbee4 100644 --- a/src/launchpad_common.c +++ b/src/launchpad_common.c @@ -659,8 +659,7 @@ int _proc_get_attr_by_pid(int pid, char *buf, int size) static int __delete_dir(const char *path) { DIR *dp; - struct dirent dentry; - struct dirent *result = NULL; + struct dirent *dentry = NULL; char buf[PATH_MAX]; struct stat statbuf; int ret; @@ -672,11 +671,11 @@ static int __delete_dir(const char *path) if (dp == NULL) return -1; - while (readdir_r(dp, &dentry, &result) == 0 && result) { - if (!strcmp(dentry.d_name, ".") || !strcmp(dentry.d_name, "..")) + while ((dentry = readdir(dp)) != NULL) { + if (!strcmp(dentry->d_name, ".") || !strcmp(dentry->d_name, "..")) continue; - snprintf(buf, sizeof(buf), "%s/%s", path, dentry.d_name); + snprintf(buf, sizeof(buf), "%s/%s", path, dentry->d_name); ret = stat(buf, &statbuf); if (ret == 0) { if (S_ISDIR(statbuf.st_mode)) @@ -709,8 +708,7 @@ int _delete_sock_path(int pid, uid_t uid) int _close_all_fds(void) { DIR *dp; - struct dirent dentry; - struct dirent *result = NULL; + struct dirent *dentry = NULL; int fd; int max_fd; @@ -724,11 +722,11 @@ int _close_all_fds(void) return 0; } - while (readdir_r(dp, &dentry, &result) == 0 && result) { - if (!isdigit(dentry.d_name[0])) + while ((dentry = readdir(dp)) != NULL) { + if (!isdigit(dentry->d_name[0])) continue; - fd = atoi(dentry.d_name); + fd = atoi(dentry->d_name); if (fd < 3) continue; diff --git a/src/launchpad_signal.c b/src/launchpad_signal.c index e802ca4..1742dcf 100644 --- a/src/launchpad_signal.c +++ b/src/launchpad_signal.c @@ -127,7 +127,7 @@ static gboolean __flush_pending_signal(gpointer data) static void __socket_garbage_collector(void) { DIR *dp; - struct dirent *dentry; + struct dirent *dentry = NULL; char tmp[MAX_LOCAL_BUFSZ]; snprintf(tmp, sizeof(tmp), "/run/aul/apps/%d", getuid()); diff --git a/src/loader_info.c b/src/loader_info.c index c0ded9f..c4ac48c 100644 --- a/src/loader_info.c +++ b/src/loader_info.c @@ -225,8 +225,7 @@ static GList *__parse_file(GList *list, const char *path) GList *_loader_info_load(const char *path) { DIR *dir_info; - struct dirent entry; - struct dirent *result = NULL; + struct dirent *entry = NULL; GList *list = NULL; char buf[PATH_MAX]; char *ext; @@ -235,12 +234,12 @@ GList *_loader_info_load(const char *path) if (dir_info == NULL) return NULL; - while (readdir_r(dir_info, &entry, &result) == 0 && result != NULL) { - if (entry.d_name[0] == '.') + while ((entry = readdir(dir_info)) != NULL) { + if (entry->d_name[0] == '.') continue; - ext = strrchr(entry.d_name, '.'); + ext = strrchr(entry->d_name, '.'); if (ext && !strcmp(ext, ".loader")) { - snprintf(buf, sizeof(buf), "%s/%s", path, entry.d_name); + snprintf(buf, sizeof(buf), "%s/%s", path, entry->d_name); list = __parse_file(list, buf); } } -- 2.7.4 From c60f9c884a7832f1a29ee1deb38d04ed0174c48b Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Fri, 16 Dec 2016 17:05:03 +0900 Subject: [PATCH 07/16] Remove calling dlclose Change-Id: Ic7c086f9f1d517e9c3d0c672951ba4713d299981 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 35850a9..9e6d08c 100644 --- a/src/launchpad_loader.c +++ b/src/launchpad_loader.c @@ -320,7 +320,6 @@ do_dlopen: free(libdir); res = dl_main(argc, argv); - dlclose(handle); elm_shutdown(); return res; -- 2.7.4 From 10fff8d425c3fd1296cd023b8a365d17e1d614b2 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Fri, 16 Dec 2016 18:48:22 +0900 Subject: [PATCH 08/16] Add AUL_LOADER_INIT to the environment - Requires https://review.tizen.org/gerrit/105374 Change-Id: If6a483c333f13b163b8a22b49defe1d848c4632e Signed-off-by: Hwankyu Jhun --- src/launchpad_loader.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/launchpad_loader.c b/src/launchpad_loader.c index 9e6d08c..5dfe2e1 100644 --- a/src/launchpad_loader.c +++ b/src/launchpad_loader.c @@ -195,6 +195,7 @@ static void __loader_create_cb(bundle *extra, int type, void *user_data) elm_init_cnt = elm_init(__argc, __argv); _D("[candidate] elm init, returned: %d", elm_init_cnt); + setenv("AUL_LOADER_INIT", "1", 1); switch (__type) { case TYPE_SW: @@ -270,7 +271,6 @@ static int __loader_launch_cb(int argc, char **argv, const char *app_path, static int __loader_terminate_cb(int argc, char **argv, void *user_data) { void *handle; - int res; int (*dl_main)(int, char **); char err_str[MAX_LOCAL_BUFSZ]; char old_cwd[PATH_MAX]; @@ -319,10 +319,7 @@ do_dlopen: } free(libdir); - res = dl_main(argc, argv); - elm_shutdown(); - - return res; + return dl_main(argc, argv); do_exec: if (access(argv[LOADER_ARG_PATH], F_OK | R_OK)) { @@ -336,6 +333,7 @@ do_exec: if (libdir) setenv("LD_LIBRARY_PATH", libdir, 1); free(libdir); + unsetenv("AUL_LOADER_INIT"); if (execv(argv[LOADER_ARG_PATH], argv) < 0) { SECURE_LOGE("execv() failed for file: \"%s\", " \ "error: %d (%s)", argv[LOADER_ARG_PATH], errno, -- 2.7.4 From 93341bd35b6537e83e1335a70deddbf6a0efc9cd Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Mon, 5 Dec 2016 22:59:05 +0900 Subject: [PATCH 09/16] AMD moves to system session - Make aul directories - Send launch/dead signal to amd - Make default slots by cpu usage Change-Id: Ie41fbeb3155a14b5c382d79cad53b5c4c7393934 Signed-off-by: Hwankyu Jhun --- inc/launchpad_common.h | 5 +++ packaging/launchpad-process-pool.service | 4 ++ src/launchpad.c | 25 +++++++++--- src/launchpad_common.c | 67 ++++++++++++++++++++++++++++++++ 4 files changed, 95 insertions(+), 6 deletions(-) diff --git a/inc/launchpad_common.h b/inc/launchpad_common.h index f1907c1..8016469 100644 --- a/inc/launchpad_common.h +++ b/inc/launchpad_common.h @@ -44,6 +44,10 @@ #define PAD_CMD_REMOVE_LOADER 12 #define PAD_CMD_MAKE_DEFAULT_SLOTS 13 #define PAD_CMD_DEMAND 14 +#define PAD_CMD_PING 15 + +#define LAUNCHPAD_LAUNCH_SIGNAL 85 +#define LAUNCHPAD_DEAD_SIGNAL 61 #define PAD_LOADER_ID_STATIC 0 #define PAD_LOADER_ID_DIRECT 1 @@ -85,6 +89,7 @@ typedef struct { 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); int _send_pkt_raw(int client_fd, app_pkt_t *pkt); diff --git a/packaging/launchpad-process-pool.service b/packaging/launchpad-process-pool.service index 2d633ec..c890e2d 100644 --- a/packaging/launchpad-process-pool.service +++ b/packaging/launchpad-process-pool.service @@ -5,11 +5,15 @@ [Unit] Description=Start the USER Access Control Agent DefaultDependencies=false +Requires=enlightenment-user.service +After=enlightenment-user.service [Service] ExecStartPre=-/usr/bin/mkdir -p /run/aul/daemons/%U ExecStartPre=-/usr/bin/chmod 0777 /run/aul/daemons/%U ExecStartPre=-/usr/bin/mkdir -p /run/aul/apps/%U ExecStartPre=-/usr/bin/chmod 0700 /run/aul/apps/%U +ExecStartPre=-/usr/bin/mkdir -p /run/aul/dbspace/%U +ExecStartPre=-/usr/bin/chmod 0700 /run/aul/dbspace/%U ExecStart=/bin/sh -l -c "/usr/bin/launchpad-process-pool" Sockets=launchpad-process-pool.socket diff --git a/src/launchpad.c b/src/launchpad.c index 6416bc1..5305dc6 100755 --- a/src/launchpad.c +++ b/src/launchpad.c @@ -1319,6 +1319,10 @@ static gboolean __handle_launch_event(gpointer data) __real_send(clifd, ret); clifd = -1; goto end; + case PAD_CMD_PING: + __real_send(clifd, 0); + clifd = -1; + goto end; } INIT_PERF(kb); @@ -1575,7 +1579,8 @@ static void __add_slot_from_info(gpointer data, gpointer user_data) candidate_process_context_t *cpc; bundle_raw *extra = NULL; int len; - int ret; + long long total = 0; + long long idle = 0; if (!strcmp(info->exe, "null")) { cpc = __add_slot(LAUNCHPAD_TYPE_USER + user_slot_offset, @@ -1600,11 +1605,11 @@ static void __add_slot_from_info(gpointer data, gpointer user_data) if (cpc == NULL) return; - ret = __prepare_candidate_process( - LAUNCHPAD_TYPE_USER + user_slot_offset, - PAD_LOADER_ID_STATIC); - if (ret != 0) - return; + _get_cpu_idle(&total, &idle); + cpc->cpu_idle_time = idle; + cpc->cpu_total_time = total; + cpc->idle_checker = g_timeout_add(CPU_CHECKER_TIMEOUT, + __handle_idle_checker, cpc); info->type = LAUNCHPAD_TYPE_USER + user_slot_offset; user_slot_offset++; @@ -1672,13 +1677,21 @@ static int __before_loop(int argc, char **argv) VCONFKEY_SETAPPL_APP_HW_ACCELERATION); } + __add_default_slots(); launcher_info_list = _launcher_info_load(LAUNCHER_INFO_PATH); + ret = _send_cmd_to_amd(LAUNCHPAD_LAUNCH_SIGNAL); + if (ret < 0) + _W("Failed to send cmd(%d) to amd", LAUNCHPAD_LAUNCH_SIGNAL); + return 0; } static void __after_loop(void) { + if (_send_cmd_to_amd(LAUNCHPAD_DEAD_SIGNAL) < 0) + _W("Failed to send cmd(%d) to amd", LAUNCHPAD_DEAD_SIGNAL); + _debug_fini(); _launcher_info_unload(launcher_info_list); diff --git a/src/launchpad_common.c b/src/launchpad_common.c index aa4b909..ddb4432 100644 --- a/src/launchpad_common.c +++ b/src/launchpad_common.c @@ -43,6 +43,7 @@ #define CONNECT_RETRY_TIME (100 * 1000) #define CONNECT_RETRY_COUNT 3 #define AUL_PKT_HEADER_SIZE (sizeof(int) + sizeof(int) + sizeof(int)) +#define PATH_AMD_SOCK "/run/aul/daemons/.amd-sock" static int __read_proc(const char *path, char *buf, int size) { @@ -208,6 +209,72 @@ static int __parse_app_path(const char *arg, char *out, int out_size) return -2; } +int _send_cmd_to_amd(int cmd) +{ + struct sockaddr_un addr = {0,}; + int fd; + int ret; + int res; + int retry = CONNECT_RETRY_COUNT; + app_pkt_t pkt = {0,}; + + fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); + /* support above version 2.6.27*/ + if (fd < 0) { + if (errno == EINVAL) { + fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (fd < 0) { + _E("second chance - socket create error"); + return -1; + } + } else { + _E("socket error"); + return -1; + } + } + + addr.sun_family = AF_UNIX; + snprintf(addr.sun_path, sizeof(addr.sun_path), "%s", PATH_AMD_SOCK); + while (connect(fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { + if (errno != ETIMEDOUT || retry <= 0) { + _E("Failed to connect error(%d)", errno); + close(fd); + return -1; + } + + usleep(CONNECT_RETRY_TIME); + --retry; + _D("re-connect to %s (%d)", addr.sun_path, retry); + } + + pkt.cmd = cmd; + ret = send(fd, &pkt, sizeof(app_pkt_t), 0); + if (ret <= 0) { + _E("Failed to send cmd(%d), errno(%d)", cmd, errno); + close(fd); + return -ECOMM; + } + +retry_recv: + ret = recv(fd, &res, sizeof(int), 0); + if (ret <= 0) { + if (errno == EAGAIN) { + _E("recv timeout"); + res = -EAGAIN; + } else if (errno == EINTR) { + _D("Interrupted system call"); + goto retry_recv; + } else { + _E("recv error(%d)", errno); + res = -ECOMM; + } + } + + close(fd); + + return res; +} + int _create_server_sock(const char *name) { struct sockaddr_un saddr; -- 2.7.4 From 1a09eaea16b76ca953793e77a3a0f1b18f647720 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 15 Dec 2016 16:02:42 +0900 Subject: [PATCH 10/16] Redirect std fds before exec stdin -> /dev/null stdout -> journal fd or /dev/null stderr -> journal fd or /dev/null Change-Id: I7346df00a668c2cb08098a93ad15db97a1e8d2f7 Signed-off-by: Hwankyu Jhun --- CMakeLists.txt | 1 + inc/launchpad_common.h | 1 + src/launchpad.c | 3 +++ src/launchpad_common.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/launchpad_lib.c | 2 ++ 5 files changed, 60 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2989bb8..15735c7 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,7 @@ PKG_CHECK_MODULES(${this_target_loader} REQUIRED aul vconf buxton2 + libsystemd-daemon ) FOREACH(flag ${${this_target_loader}_CFLAGS}) diff --git a/inc/launchpad_common.h b/inc/launchpad_common.h index 8016469..63a9de3 100644 --- a/inc/launchpad_common.h +++ b/inc/launchpad_common.h @@ -106,6 +106,7 @@ 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); +int _setup_stdio(const char *ident); #endif /* __LAUNCHPAD_COMMON_H__ */ diff --git a/src/launchpad.c b/src/launchpad.c index 5305dc6..0ccd9f9 100755 --- a/src/launchpad.c +++ b/src/launchpad.c @@ -34,6 +34,7 @@ #include #include #include +#include #include "perf.h" #include "launchpad_common.h" @@ -387,6 +388,7 @@ static int __exec_loader_process(void *arg) _signal_fini(); _close_all_fds(); + _setup_stdio(basename(argv[LOADER_ARG_PATH])); if (execv(argv[LOADER_ARG_PATH], argv) < 0) _E("Failed to prepare candidate_process"); @@ -507,6 +509,7 @@ static int __normal_fork_exec(int argc, char **argv, const char *app_path) } _close_all_fds(); + _setup_stdio(basename(argv[LOADER_ARG_PATH])); if (execv(argv[LOADER_ARG_PATH], argv) < 0) { /* Flawfinder: ignore */ if (errno == EACCES) { _E("such a file is no executable - %s", diff --git a/src/launchpad_common.c b/src/launchpad_common.c index ddb4432..a0f6c3b 100644 --- a/src/launchpad_common.c +++ b/src/launchpad_common.c @@ -32,6 +32,8 @@ #include #include #include +#include +#include #include "launchpad_common.h" #include "key.h" @@ -44,6 +46,7 @@ #define CONNECT_RETRY_COUNT 3 #define AUL_PKT_HEADER_SIZE (sizeof(int) + sizeof(int) + sizeof(int)) #define PATH_AMD_SOCK "/run/aul/daemons/.amd-sock" +#define PATH_DEV_NULL "/dev/null" static int __read_proc(const char *path, char *buf, int size) { @@ -809,3 +812,53 @@ int _close_all_fds(void) return 0; } +int _setup_stdio(const char *ident) +{ + int fd; + + /* stdin */ + fd = open(PATH_DEV_NULL, O_RDONLY | O_NOCTTY); + if (fd < 0) { + _W("Failed to open /dev/null - err(%d)", errno); + return -1; + } + if (dup2(fd, STDIN_FILENO) < 0) { + _W("Failed to duplicate fd - oldfd(%d), newfd(%d)", + fd, STDIN_FILENO); + } + close(fd); + + /* stdout */ + fd = sd_journal_stream_fd(ident, LOG_INFO, false); + if (fd < 0) { + _W("Failed to connect journal socket - err(%d)", errno); + fd = open(PATH_DEV_NULL, O_WRONLY | O_NOCTTY); + if (fd < 0) { + _W("Failed to open /dev/null - err(%d)", errno); + return -1; + } + } + if (dup2(fd, STDOUT_FILENO) < 0) { + _W("Failed to duplicate fd - oldfd(%d), newfd(%d)", + fd, STDOUT_FILENO); + } + close(fd); + + /* stderr */ + fd = sd_journal_stream_fd(ident, LOG_INFO, false); + if (fd < 0) { + _W("Failed to connect journal socket - err(%d)", errno); + fd = open(PATH_DEV_NULL, O_WRONLY | O_NOCTTY); + if (fd < 0) { + _W("Failed to open /dev/null - err(%d)", errno); + return -1; + } + } + if (dup2(fd, STDERR_FILENO) < 0) { + _W("Failed to duplicate fd - oldfd(%d), newfd(%d)", + fd, STDERR_FILENO); + } + close(fd); + + return 0; +} diff --git a/src/launchpad_lib.c b/src/launchpad_lib.c index 6336a19..17553ba 100644 --- a/src/launchpad_lib.c +++ b/src/launchpad_lib.c @@ -77,6 +77,8 @@ static int __prepare_exec(const char *appid, const char *app_path, return -1; } + _setup_stdio(basename(app_path)); + ret = buxton_open(&bxt_cli, NULL, NULL); if (ret != 0) { _E("buxton_open() failed"); -- 2.7.4 From 7f7bbff6dc60f4a92997a71fbfd9166539058e8b Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 21 Dec 2016 16:36:01 +0900 Subject: [PATCH 11/16] Fix standard I/O redirection - The child process doesn't redirect std fds when the launch request is for debugging. Change-Id: I10958679eda3ab88dd515bc6025074a5cffd0598 Signed-off-by: Hwankyu Jhun --- src/launchpad.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/launchpad.c b/src/launchpad.c index 0ccd9f9..f1c8011 100755 --- a/src/launchpad.c +++ b/src/launchpad.c @@ -34,7 +34,6 @@ #include #include #include -#include #include "perf.h" #include "launchpad_common.h" @@ -509,7 +508,7 @@ static int __normal_fork_exec(int argc, char **argv, const char *app_path) } _close_all_fds(); - _setup_stdio(basename(argv[LOADER_ARG_PATH])); + if (execv(argv[LOADER_ARG_PATH], argv) < 0) { /* Flawfinder: ignore */ if (errno == EACCES) { _E("such a file is no executable - %s", @@ -716,6 +715,9 @@ static int __prepare_exec(const char *appid, const char *app_path, return PAD_ERR_REJECTED; } + if (bundle_get_type(kb, AUL_K_SDK) == BUNDLE_TYPE_NONE) + _setup_stdio(basename(app_path)); + /* SET DUMPABLE - for coredump*/ prctl(PR_SET_DUMPABLE, 1); -- 2.7.4 From 6f59e47b0770f4ce5cd0a3ef3475d00b4047b4e9 Mon Sep 17 00:00:00 2001 From: Semun Lee Date: Wed, 28 Dec 2016 19:15:16 +0900 Subject: [PATCH 12/16] Do not wait response from amd for launch/dead command We don't need to wait response from amd. It may lead deadlock between launchpad and amd. Change-Id: I75767b69d404fb28ce0059385026c5107a13cc71 Signed-off-by: Semun Lee --- src/launchpad_common.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/launchpad_common.c b/src/launchpad_common.c index a0f6c3b..a440731 100644 --- a/src/launchpad_common.c +++ b/src/launchpad_common.c @@ -217,7 +217,6 @@ int _send_cmd_to_amd(int cmd) struct sockaddr_un addr = {0,}; int fd; int ret; - int res; int retry = CONNECT_RETRY_COUNT; app_pkt_t pkt = {0,}; @@ -258,24 +257,8 @@ int _send_cmd_to_amd(int cmd) return -ECOMM; } -retry_recv: - ret = recv(fd, &res, sizeof(int), 0); - if (ret <= 0) { - if (errno == EAGAIN) { - _E("recv timeout"); - res = -EAGAIN; - } else if (errno == EINTR) { - _D("Interrupted system call"); - goto retry_recv; - } else { - _E("recv error(%d)", errno); - res = -ECOMM; - } - } - close(fd); - - return res; + return 0; } int _create_server_sock(const char *name) -- 2.7.4 From 40d1b92e64809e7e9f3fae483957c6ce070ee936 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 4 Jan 2017 19:08:56 +0900 Subject: [PATCH 13/16] Remove permission check This patch removes the permission check for executing an application with the debug tool. Change-Id: I66a86012d197edaf120e87e6d455eca72f88c5b9 Signed-off-by: Hwankyu Jhun --- src/launchpad.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/launchpad.c b/src/launchpad.c index f1c8011..9177a5f 100755 --- a/src/launchpad.c +++ b/src/launchpad.c @@ -1263,7 +1263,6 @@ static gboolean __handle_launch_event(gpointer data) int type = -1; int loader_id; int ret; - int caller_pid; traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "LAUNCHPAD:LAUNCH"); pkt = _recv_pkt_raw(fd, &clifd, &cr); @@ -1285,16 +1284,8 @@ static gboolean __handle_launch_event(gpointer data) goto end; } - if (bundle_get_type(kb, AUL_K_SDK) != BUNDLE_TYPE_NONE) { - caller_pid = _debug_get_caller_pid(kb); - if (caller_pid > 0) { - if (__check_caller_by_pid(caller_pid) < 0) { - _E("Invalid caller pid"); - goto end; - } - } + if (bundle_get_type(kb, AUL_K_SDK) != BUNDLE_TYPE_NONE) _debug_init(); - } switch (pkt->cmd) { case PAD_CMD_VISIBILITY: -- 2.7.4 From 51a5f2cc0d9b1b07cda190e787fc61b37139222d Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Fri, 20 Jan 2017 07:51:15 +0900 Subject: [PATCH 14/16] Prevent SIGPIPE - Use MSG_NOSIGNAL option Change-Id: I62cbf54ca004b65e022f3365ee6930a92674b165 Signed-off-by: Hwankyu Jhun --- src/launchpad_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/launchpad_common.c b/src/launchpad_common.c index 8d6c001..5e998c5 100644 --- a/src/launchpad_common.c +++ b/src/launchpad_common.c @@ -250,7 +250,7 @@ int _send_cmd_to_amd(int cmd) } pkt.cmd = cmd; - ret = send(fd, &pkt, sizeof(app_pkt_t), 0); + ret = send(fd, &pkt, sizeof(app_pkt_t), MSG_NOSIGNAL); if (ret <= 0) { _E("Failed to send cmd(%d), errno(%d)", cmd, errno); close(fd); @@ -392,7 +392,7 @@ int _send_pkt_raw(int client_fd, app_pkt_t *pkt) pkt_size = AUL_PKT_HEADER_SIZE + pkt->len; - send_ret = send(client_fd, pkt, pkt_size, 0); + send_ret = send(client_fd, pkt, pkt_size, MSG_NOSIGNAL); _D("send(%d) : %d / %d", client_fd, send_ret, pkt_size); if (send_ret == -1) { @@ -609,7 +609,7 @@ int _connect_to_launchpad(int type, int id) _D("re-connect to %s (%d)", addr.sun_path, retry); } - send_ret = send(fd, &client_pid, sizeof(client_pid), 0); + send_ret = send(fd, &client_pid, sizeof(client_pid), MSG_NOSIGNAL); _D("send(%d) : %d", client_pid, send_ret); if (send_ret == -1) { -- 2.7.4 From 546a36fb7b3153e33484621c5e95a4e4ba31859e Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Tue, 24 Jan 2017 07:58:10 +0900 Subject: [PATCH 15/16] Fix versioning Change-Id: I5acf92bcbb9d94d415cbe5f2f09f701503d11d53 Signed-off-by: Hwankyu Jhun --- CMakeLists.txt | 3 +-- packaging/launchpad.spec | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 15735c7..e0c208f 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) SET (this_target_pool launchpad_pool) SET (this_target_loader launchpad_loader) SET (this_target_lib launchpad) -SET (VERSION_MAJOR 0) INCLUDE(FindPkgConfig) PKG_CHECK_MODULES(${this_target_pool} REQUIRED @@ -126,7 +125,7 @@ ADD_LIBRARY(${LAUNCHPAD_LIB} SHARED src/launchpad_lib.c src/launchpad_common.c ) -SET_TARGET_PROPERTIES(${LAUNCHPAD_LIB} PROPERTIES SOVERSION ${VERSION_MAJOR}) +SET_TARGET_PROPERTIES(${LAUNCHPAD_LIB} PROPERTIES SOVERSION ${MAJORVER}) SET_TARGET_PROPERTIES(${LAUNCHPAD_LIB} PROPERTIES VERSION ${VERSION}) SET_TARGET_PROPERTIES(${LAUNCHPAD_LIB} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_lib}) TARGET_LINK_LIBRARIES(${LAUNCHPAD_LIB} ${${this_target_lib}_LDFLAGS} "-ldl") diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index 7c50db3..b3da97e 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -55,7 +55,9 @@ export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE" _APPFW_FEATURE_PRIORITY_CHANGE=ON %endif +MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` %cmake -DVERSION=%{version} \ + -DMAJORVER=${MAJORVER} \ -D_APPFW_FEATURE_PRIORITY_CHANGE:BOOL=${_APPFW_FEATURE_PRIORITY_CHANGE} \ . %__make %{?_smp_mflags} -- 2.7.4 From 4611c50ea1b10aa68fe374b17bd57996305ec71f Mon Sep 17 00:00:00 2001 From: Hawnkyu Jhun Date: Sun, 22 Jan 2017 09:43:11 +0900 Subject: [PATCH 16/16] Split the packages This patch is to remove the dependency of UI libraries. Change-Id: Ie2009fe7c35b4cb8fa3150765218350d7b5d1188 Signed-off-by: Hawnkyu Jhun --- packaging/launchpad.spec | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index b3da97e..a986990 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -42,6 +42,13 @@ Requires: %{name} = %{version}-%{release} %description devel Launchpad for launching applications (devel) +%package -n launchpad-loader +Summary: Launchpad-Loader for launching applications +Group: Application Framework/Application Launcher + +%description -n launchpad-loader +Launchpad-Loader for launching applications + %prep %setup -q @@ -81,17 +88,20 @@ cp %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{nam %files %manifest launchpad.manifest %{_prefix}/share/license/%{name} -%{_prefix}/share/aul/default.loader %{_prefix}/share/aul/default.debugger %{_unitdir_user}/launchpad-process-pool.service %{_unitdir_user}/launchpad-process-pool.socket %{_unitdir_user}/sockets.target.wants/launchpad-process-pool.socket %{_unitdir_user}/basic.target.wants/launchpad-process-pool.service %caps(cap_mac_admin,cap_dac_override,cap_setgid=ei) %{_bindir}/launchpad-process-pool -%caps(cap_setgid=ei) %{_bindir}/launchpad-loader %attr(0644,root,root) %{_libdir}/liblaunchpad.so.* %files devel %{_includedir}/launchpad/*.h %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc + +%files -n launchpad-loader +%manifest %{name}.manifest +%{_prefix}/share/aul/default.loader +%caps(cap_setgid=ei) %{_bindir}/launchpad-loader -- 2.7.4