aboutsummaryrefslogtreecommitdiffstats
path: root/meta-application-manager/recipes-application-framework
diff options
context:
space:
mode:
Diffstat (limited to 'meta-application-manager/recipes-application-framework')
-rw-r--r--meta-application-manager/recipes-application-framework/ail/ail.inc4
-rw-r--r--meta-application-manager/recipes-application-framework/ail/files/ail_journal_perm_check.patch138
-rw-r--r--meta-application-manager/recipes-application-framework/pkgmgr-info/pkgmgr-info.inc5
-rw-r--r--meta-application-manager/recipes-application-framework/pkgmgr-info/pkgmgr-info/0002-pkgmgr-info-journal-perser-db.patch26
-rw-r--r--meta-application-manager/recipes-application-framework/pkgmgr/files/0002-pkgmgr-initdb.patch65
-rw-r--r--meta-application-manager/recipes-application-framework/pkgmgr/files/pkgmgr-journaldb.patch52
-rw-r--r--meta-application-manager/recipes-application-framework/pkgmgr/pkgmgr.inc6
-rw-r--r--meta-application-manager/recipes-application-framework/pkgmgr/pkgmgr_%.bbappend1
8 files changed, 293 insertions, 4 deletions
diff --git a/meta-application-manager/recipes-application-framework/ail/ail.inc b/meta-application-manager/recipes-application-framework/ail/ail.inc
index f946869..c5b254d 100644
--- a/meta-application-manager/recipes-application-framework/ail/ail.inc
+++ b/meta-application-manager/recipes-application-framework/ail/ail.inc
@@ -4,7 +4,9 @@ SECTION = "Application Framework/Libraries"
LICENSE = "Apache-2.0"
PV = "0.2.80"
-SRC_URI = ""
+SRC_URI = " \
+ file://ail_journal_perm_check.patch \
+ "
S = "${WORKDIR}/git"
diff --git a/meta-application-manager/recipes-application-framework/ail/files/ail_journal_perm_check.patch b/meta-application-manager/recipes-application-framework/ail/files/ail_journal_perm_check.patch
new file mode 100644
index 0000000..46ad215
--- /dev/null
+++ b/meta-application-manager/recipes-application-framework/ail/files/ail_journal_perm_check.patch
@@ -0,0 +1,138 @@
+diff --git a/src/ail_db.c b/src/ail_db.c
+index 462c545..5c6bb5e 100755
+--- a/src/ail_db.c
++++ b/src/ail_db.c
+@@ -100,15 +100,19 @@ static int ail_db_change_perm(const char *db_file, uid_t uid)
+ ret = chown(files[i], uid, userinfo->pw_gid);
+ SET_SMACK_LABEL(files[i],uid)
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chown %s %d.%d, because %s", db_file, uid, userinfo->pw_gid, buf);
++ _E("FAIL : chown %s %d.%d, because %s", files[i], uid, userinfo->pw_gid, buf);
+ return AIL_ERROR_FAIL;
+ }
+
+ ret = chmod(files[i], S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chmod %s 0664, because %s", db_file, buf);
++ _E("FAIL : chmod %s 0664, because %s", files[i], buf);
+ return AIL_ERROR_FAIL;
+ }
+ }
+diff --git a/tool/src/ail_fota.c b/tool/src/ail_fota.c
+index 20d17c5..c523588 100644
+--- a/tool/src/ail_fota.c
++++ b/tool/src/ail_fota.c
+@@ -176,15 +176,19 @@ static int initdb_change_perm(const char *db_file)
+ for (i = 0; files[i]; i++) {
+ ret = chown(files[i], OWNER_ROOT, OWNER_ROOT);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chown %s %d.%d, because %s", db_file, OWNER_ROOT, OWNER_ROOT, buf);
++ _E("FAIL : chown %s %d.%d, because %s", files[i], OWNER_ROOT, OWNER_ROOT, buf);
+ return AIL_ERROR_FAIL;
+ }
+
+ ret = chmod(files[i], S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chmod %s 0664, because %s", db_file, buf);
++ _E("FAIL : chmod %s 0664, because %s", files[i], buf);
+ return AIL_ERROR_FAIL;
+ }
+ }
+diff --git a/tool/src/createdb.c b/tool/src/createdb.c
+index f203c74..05d101d 100644
+--- a/tool/src/createdb.c
++++ b/tool/src/createdb.c
+@@ -97,15 +97,19 @@ static int createdb_change_perm(const char *db_file)
+ for (i = 0; files[i]; i++) {
+ ret = chown(files[i], GLOBAL_USER, OWNER_ROOT);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chown %s %d.%d, because %s", db_file, OWNER_ROOT, OWNER_ROOT, buf);
++ _E("FAIL : chown %s %d.%d, because %s", files[i], OWNER_ROOT, OWNER_ROOT, buf);
+ return AIL_ERROR_FAIL;
+ }
+
+ ret = chmod(files[i], S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chmod %s 0664, because %s", db_file, buf);
++ _E("FAIL : chmod %s 0664, because %s", files[i], buf);
+ return AIL_ERROR_FAIL;
+ }
+ }
+@@ -173,7 +177,6 @@ int main(int argc, char *argv[])
+ _E(" %s is not removed",APP_INFO_DB_FILE);
+ if(remove(APP_INFO_DB_FILE_JOURNAL))
+ _E(" %s is not removed",APP_INFO_DB_FILE_JOURNAL);
+- return -1;
+ }
+ ret = setenv("AIL_INITDB", "1", 1);
+ _D("AIL_INITDB : %d", ret);
+diff --git a/tool/src/initdb.c b/tool/src/initdb.c
+index 75d5788..79df936 100755
+--- a/tool/src/initdb.c
++++ b/tool/src/initdb.c
+@@ -174,15 +174,19 @@ static int initdb_change_perm(const char *db_file)
+ for (i = 0; files[i]; i++) {
+ ret = chown(files[i], GLOBAL_USER, OWNER_ROOT);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chown %s %d.%d, because %s", db_file, OWNER_ROOT, OWNER_ROOT, buf);
++ _E("FAIL : chown %s %d.%d, because %s", files[i], OWNER_ROOT, OWNER_ROOT, buf);
+ return AIL_ERROR_FAIL;
+ }
+
+ ret = chmod(files[i], S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chmod %s 0664, because %s", db_file, buf);
++ _E("FAIL : chmod %s 0664, because %s", files[i], buf);
+ return AIL_ERROR_FAIL;
+ }
+ }
+diff --git a/tool/src/syncdb.c b/tool/src/syncdb.c
+index 247602b..1ba2490 100644
+--- a/tool/src/syncdb.c
++++ b/tool/src/syncdb.c
+@@ -176,15 +176,19 @@ static int syncdb_change_perm(const char *db_file)
+ for (i = 0; files[i]; i++) {
+ ret = chown(files[i], GLOBAL_USER, OWNER_ROOT);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chown %s %d.%d, because %s", db_file, OWNER_ROOT, OWNER_ROOT, buf);
++ _E("FAIL : chown %s %d.%d, because %s", files[i], OWNER_ROOT, OWNER_ROOT, buf);
+ return AIL_ERROR_FAIL;
+ }
+
+ ret = chmod(files[i], S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chmod %s 0664, because %s", db_file, buf);
++ _E("FAIL : chmod %s 0664, because %s", files[i], buf);
+ return AIL_ERROR_FAIL;
+ }
+ }
diff --git a/meta-application-manager/recipes-application-framework/pkgmgr-info/pkgmgr-info.inc b/meta-application-manager/recipes-application-framework/pkgmgr-info/pkgmgr-info.inc
index be9193a..eb01947 100644
--- a/meta-application-manager/recipes-application-framework/pkgmgr-info/pkgmgr-info.inc
+++ b/meta-application-manager/recipes-application-framework/pkgmgr-info/pkgmgr-info.inc
@@ -4,7 +4,10 @@ SECTION = "Application Framework/Package Management"
LICENSE = "Apache-2.0"
PV = "0.0.134"
-SRC_URI = " file://TizenCommonCMakeMacro.patch "
+SRC_URI = " \
+ file://TizenCommonCMakeMacro.patch \
+ file://0002-pkgmgr-info-journal-perser-db.patch \
+ "
S = "${WORKDIR}/git"
diff --git a/meta-application-manager/recipes-application-framework/pkgmgr-info/pkgmgr-info/0002-pkgmgr-info-journal-perser-db.patch b/meta-application-manager/recipes-application-framework/pkgmgr-info/pkgmgr-info/0002-pkgmgr-info-journal-perser-db.patch
new file mode 100644
index 0000000..87fb4a5
--- /dev/null
+++ b/meta-application-manager/recipes-application-framework/pkgmgr-info/pkgmgr-info/0002-pkgmgr-info-journal-perser-db.patch
@@ -0,0 +1,26 @@
+--- a/parser/pkgmgr_parser_db.c
++++ b/parser/pkgmgr_parser_db.c
+@@ -2198,15 +2198,21 @@
+ ret = chown(files[i], uid, userinfo->pw_gid);
+ SET_SMACK_LABEL(files[i],uid)
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _LOGD("FAIL : chown %s %d.%d, because %s", db_file, uid, userinfo->pw_gid, buf);
++ //_LOGD("FAIL : chown %s %d.%d, because %s", db_file, uid, userinfo->pw_gid, buf);
++ _LOGD("FAIL : chown %s %d.%d, because %s", files[i], uid, userinfo->pw_gid, buf);
+ return -1;
+ }
+
+ ret = chmod(files[i], S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _LOGD("FAIL : chmod %s 0664, because %s", db_file, buf);
++ //_LOGD("FAIL : chmod %s 0664, because %s", db_file, buf);
++ _LOGD("FAIL : chmod %s 0664, because %s", files[i], buf);
+ return -1;
+ }
+ }
diff --git a/meta-application-manager/recipes-application-framework/pkgmgr/files/0002-pkgmgr-initdb.patch b/meta-application-manager/recipes-application-framework/pkgmgr/files/0002-pkgmgr-initdb.patch
new file mode 100644
index 0000000..6dfa9e6
--- /dev/null
+++ b/meta-application-manager/recipes-application-framework/pkgmgr/files/0002-pkgmgr-initdb.patch
@@ -0,0 +1,65 @@
+--- a/tool/pkg_createdb.c
++++ b/tool/pkg_createdb.c
+@@ -261,15 +261,21 @@
+ for (i = 0; files[i]; i++) {
+ ret = chown(files[i], GLOBAL_USER, OWNER_ROOT);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chown %s %d.%d, because %s", db_file, GLOBAL_USER, OWNER_ROOT, buf);
++ //_E("FAIL : chown %s %d.%d, because %s", db_file, GLOBAL_USER, OWNER_ROOT, buf);
++ _E("FAIL : chown %s %d.%d, because %s", files[i], GLOBAL_USER, OWNER_ROOT, buf);
+ return -1;
+ }
+
+ ret = chmod(files[i], S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chmod %s 0664, because %s", db_file, buf);
++ //_E("FAIL : chmod %s 0664, because %s", db_file, buf);
++ _E("FAIL : chmod %s 0664, because %s", files[i], buf);
+ return -1;
+ }
+ }
+@@ -357,7 +363,10 @@
+ return -1;
+ }
+
+- setuid(OWNER_ROOT);
++ ret=setuid(OWNER_ROOT);
++ if(ret!=0){
++ printf("@%d__setuid err = %d\n",__LINE__,errno);
++ }
+ ret = createdb_change_perm(PACKAGE_INFO_DB_FILE);
+ if (ret == -1) {
+ _E("cannot chown.");
+
+--- a/tool/pkg_initdb.c
++++ b/tool/pkg_initdb.c
+@@ -208,15 +208,21 @@
+ for (i = 0; files[i]; i++) {
+ ret = chown(files[i], GLOBAL_USER, OWNER_ROOT);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chown %s %d.%d, because %s", db_file, GLOBAL_USER, OWNER_ROOT, buf);
++ //_E("FAIL : chown %s %d.%d, because %s", db_file, GLOBAL_USER, OWNER_ROOT, buf);
++ _E("FAIL : chown %s %d.%d, because %s", files[i], GLOBAL_USER, OWNER_ROOT, buf);
+ return -1;
+ }
+
+ ret = chmod(files[i], S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chmod %s 0664, because %s", db_file, buf);
++ //_E("FAIL : chmod %s 0664, because %s", db_file, buf);
++ _E("FAIL : chmod %s 0664, because %s", files[i], buf);
+ return -1;
+ }
+ }
diff --git a/meta-application-manager/recipes-application-framework/pkgmgr/files/pkgmgr-journaldb.patch b/meta-application-manager/recipes-application-framework/pkgmgr/files/pkgmgr-journaldb.patch
new file mode 100644
index 0000000..4773426
--- /dev/null
+++ b/meta-application-manager/recipes-application-framework/pkgmgr/files/pkgmgr-journaldb.patch
@@ -0,0 +1,52 @@
+diff --git a/tool/pkg_createdb.c b/tool/pkg_createdb.c
+--- a/tool/pkg_createdb.c
++++ b/tool/pkg_createdb.c
+@@ -261,15 +261,21 @@
+ for (i = 0; files[i]; i++) {
+ ret = chown(files[i], GLOBAL_USER, OWNER_ROOT);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chown %s %d.%d, because %s", db_file, GLOBAL_USER, OWNER_ROOT, buf);
++ _E("FAIL : chown %s %d.%d, because %s", files[i], GLOBAL_USER, OWNER_ROOT, buf);
+ return -1;
+ }
+
+ ret = chmod(files[i], S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chmod %s 0664, because %s", db_file, buf);
++ _E("FAIL : chmod %s 0664, because %s", files[i], buf);
+ return -1;
+ }
+ }
+
+--- a/tool/pkg_initdb.c
++++ b/tool/pkg_initdb.c
+@@ -208,15 +208,21 @@
+ for (i = 0; files[i]; i++) {
+ ret = chown(files[i], GLOBAL_USER, OWNER_ROOT);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chown %s %d.%d, because %s", db_file, GLOBAL_USER, OWNER_ROOT, buf);
++ _E("FAIL : chown %s %d.%d, because %s", files[i], GLOBAL_USER, OWNER_ROOT, buf);
+ return -1;
+ }
+
+ ret = chmod(files[i], S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
+ if (ret == -1) {
++ if (files[i] == journal_file && errno == ENOENT)
++ continue;
+ strerror_r(errno, buf, sizeof(buf));
+- _E("FAIL : chmod %s 0664, because %s", db_file, buf);
++ _E("FAIL : chmod %s 0664, because %s", files[i], buf);
+ return -1;
+ }
+ }
+
+
diff --git a/meta-application-manager/recipes-application-framework/pkgmgr/pkgmgr.inc b/meta-application-manager/recipes-application-framework/pkgmgr/pkgmgr.inc
index 144d882..19035ec 100644
--- a/meta-application-manager/recipes-application-framework/pkgmgr/pkgmgr.inc
+++ b/meta-application-manager/recipes-application-framework/pkgmgr/pkgmgr.inc
@@ -5,7 +5,11 @@ LICENSE = "Apache-2.0"
PV = "0.2.89"
PR = "r1"
-SRC_URI = " file://0001-remove-TizenConfig.patch "
+SRC_URI = " \
+ file://0001_change-tzglobalapp-to-aglglobalapp.patch \
+ file://0001-remove-TizenConfig.patch \
+ file://0002-pkgmgr-initdb.patch \
+ "
S = "${WORKDIR}/git"
diff --git a/meta-application-manager/recipes-application-framework/pkgmgr/pkgmgr_%.bbappend b/meta-application-manager/recipes-application-framework/pkgmgr/pkgmgr_%.bbappend
deleted file mode 100644
index 1d47580..0000000
--- a/meta-application-manager/recipes-application-framework/pkgmgr/pkgmgr_%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-SRC_URI += "file://0001_change-tzglobalapp-to-aglglobalapp.patch"