platform/core/api/system-info.git
4 days agoinit_db: Terminate db creation on detecting invalid enumerator 39/310439/2 tizen
Youngjae Cho [Mon, 29 Apr 2024 04:12:51 +0000 (13:12 +0900)]
init_db: Terminate db creation on detecting invalid enumerator

To detect invalid modification on feature of enum type, the init_db
reports error by return code, let mic make use of it, aborting the
whole mic process.

Change-Id: Ic45e1e6949a6912203ce10bd85a8dcb8bb69b0b2
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
7 weeks agoinit_db: Change origin of value from text to attribute 53/308153/1
Youngjae Cho [Thu, 14 Mar 2024 09:12:52 +0000 (18:12 +0900)]
init_db: Change origin of value from text to attribute

A <key> element of model-config.xml has changed to have attribute @value
and it replaces the role of the text node.
 - As-is: <key name="tizen.org/feature/nlp" type="bool">false</key>
 - To-be: <key name="tizen.org/feature/nlp" type="bool" value="false"/>

This is because, it looks better when the <key> has @type="enum". Such
a <key> should have a child <enum> element. And if the change had not
made, the text value of <key> would have followed the </enum>, which
looks bad.

Change-Id: I227d9271a6fbfb77308fb197b503edb87c2f332c
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
7 weeks agosystem_info_generated: Print boilerplate for API description 52/308152/1
Youngjae Cho [Thu, 14 Mar 2024 09:00:44 +0000 (18:00 +0900)]
system_info_generated: Print boilerplate for API description

The generated header now contains boilerplate describing the generated
getter or enum declaration. For this purpose, the SystemInfoGenerator
now understands the below scheme of model-config.xml.

 .//key[@since_tizen]
   : The attribute 'since_tizen' appear as @since_tizen at the
     getter description

 .//enumerator[@since_tizen]
   : The attribute 'since_tizen' appear as @since_tizen at the
    enumerator description

 .//enumerator[@desc]
   : The attribute 'desc' appear as a string following @since_tizen
     of enumerator

Change-Id: I0769e9f0dabda151e930b5374420d36df785191a
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
7 weeks agosystem_info_generated: Rearrange <enum> be a child of <key> 51/308151/1
Youngjae Cho [Thu, 14 Mar 2024 06:46:52 +0000 (15:46 +0900)]
system_info_generated: Rearrange <enum> be a child of <key>

Previously, the <key> and <enum> are at the same level. Changed it so
that the <key> now adopts an <enum> as a child only when its @type="enum".
The implementation follows the concept that the <enum> is subordinate
to the <key>. That is, the operations of the class 'TizenFeatureEnum'
are controlled by its parent, the class 'TizenFeature'.
  - Parsing 'TizenFeature' is followed by parsing 'TizenFeatureEnum'
  - Printing 'TizenFeature' is followed by printing 'TizenFeatureEnum'

Change-Id: I683c84823f67fce91c8f5703a037f4bf7c24adbf
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
7 weeks agoAdd include in util.h of test for libxml 2.12.5 10/307810/1 accepted/tizen_unified accepted/tizen_unified_x accepted/tizen/unified/20240328.043630 accepted/tizen/unified/x/20240328.090626
JinWang An [Wed, 13 Mar 2024 09:15:27 +0000 (18:15 +0900)]
Add include in util.h of test for libxml 2.12.5

Change-Id: If356bb6e4ba9dd26e0173c6820b3ec9ec9313664
Signed-off-by: JinWang An <jinwang.an@samsung.com>
7 weeks agosystem-info-generated: Fix inclusion guard to __TIZEN_SYSTEM_SYSTEM_INFO_GENERATED_H__ 84/307484/1
Youngjae Cho [Mon, 11 Mar 2024 02:51:03 +0000 (11:51 +0900)]
system-info-generated: Fix inclusion guard to __TIZEN_SYSTEM_SYSTEM_INFO_GENERATED_H__

Tizen native API recommends using guard phrase for inclusion in the
form of __TIZEN_<MODULE>_<SUBMODULE>_<FILE_BASENAME>_H__.

Change-Id: Iec8eee92762670f0c3b569828cd03935463dea20
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
8 weeks agoinit_db: Apply system-info-generated enum type when constructing db 62/307162/5
Youngjae Cho [Tue, 5 Mar 2024 08:08:56 +0000 (17:08 +0900)]
init_db: Apply system-info-generated enum type when constructing db

To convert enumerator into integer, it is necessary to have mapping
table. The mapping table is generated dynamically by SystemInfoGenerator
with option --output-util-source, --output-util-header.

For example, a model-config.xml might have declared an enum like below.
 | <enum typename="test_enum_e">
 |  <enumerator value="10">TEST_ENUM_0</enumerator>
 |  <enumerator>TEST_ENUM_1</enumerator>
 |  <enumerator>TEST_ENUM_2</enumerator>
 |  <enumerator>TEST_ENUM_3</enumerator>
 |  <enumerator>TEST_ENUM_4</enumerator>
 | </enum>

From SystemInfoGenerator with option --output-util-source, it generates
function below that contains mapping of all declared enumerator symbol
to an integer value.
 | int system_info_util_get_enumerator_value(const char *symbol, int *value);

With help of the mapping function, one can get integer value of enumerator.
 | int value;
 | system_info_util_get_enumerator_value("TEST_ENUM_3", &value); // value = 13

The system-info internally treats enum type same as integer type.

Change-Id: I6fea66879ec205513830630491a10902aa6c8ee1
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
8 weeks agosystem-info-generated: Introudce system-info-generated 61/307161/3
Youngjae Cho [Wed, 14 Feb 2024 11:18:13 +0000 (20:18 +0900)]
system-info-generated: Introudce system-info-generated

The new system-info API has been introduced. We call it
'system-info-generated' as it is automatically generated out of
model-config.xml.

There are 3 main features:
 1. As aformentioned, and its name is saying, the new API comprises
    fully auto-generated code and header.
 2. The new API provides full set of exclusive getter functions for
    each single feature, which has specified getter attribute, in
    model-config.xml.
 3. The new API can understand <enum> scheme in model-config.xml.
    And the generated API contains enum declaration derived out of it.

Details:
 1. Fully auto-generated API
    To this end, SystemInfoGenerator has been introduced. Try running it
    at the top directory.
      $) python3 -m SystemInfoGenerator --help
    The python package provides several options specifying behavior or
    output file path it will generate.

 2. Generate getter functions for each feature
    With help of SystemInfoGenerator, the new API code and header are
    generated out of the model-config.xml at build time. It is processed
    before building library, generating code, making them be a part of
    the library.

    For example, if a model-config.xml might have defined features like below,
      | <key name="tizen.org/feature/AAA"
      |      getter="foo" type="string">new.string.feature</key>
      | <key name="tizen.org/feature/BBB"
      |      getter="bar" type="int">3</key>
      | <key name="tizen.org/feature/CCC"
      |      getter="baz" type="bool">True</key>

    then, getter functions, one by one for each feature, are generated from
    the attribute @getter with prefix 'system_info_get_' before building
    capi-system-info library. Here are prototypes of generated getter.
      | int system_info_get_foo(char **value);
      | int system_info_get_bar(int *value);
      | int system_info_get_baz(bool *value);

    Calling those getters fetch the feature value.
      | #include <system_info_generated.h>
      |
      | char *s;
      | int i;
      | bool b;
      |
      | system_info_get_foo(&s); // s = "new.feature.value"
      | system_info_get_bar(&i); // i = 3
      | system_info_get_baz(&b); // b = True

    Their behavior is totally identical to the previous API.
      | #include <system_info.h>
      |
      | ...
      | system_info_get_platform_string("tizen.org/feature/AAA", &s);
      | system_info_get_platform_int("tizen.org/feature/BBB", &i);
      | system_info_get_platform_bool("tizen.org/feature/CCC", &b);

 3. Generate enum declaration
    model-config.xml can now declare enum that is a enumeration of
    integer, which is in form of C-style enum. For example,
    a model-config.xml can declare two types of enum, "some_enum_e"
    and "another_enum_e".
      | <enum typename="some_enum_e">
      |      <enumerator>SOME_ENUM_0</enumerator>
      |      <enumerator>SOME_ENUM_1</enumerator>
      |      <enumerator>SOME_ENUM_2</enumerator>
      |      <enumerator>SOME_ENUM_3</enumerator>
      |      <enumerator>SOME_ENUM_4</enumerator>
      | </enum>
      | <enum typename="another_enum_e">
      |      <enumerator value=100>ANOTHER_ENUM_0</enumerator>
      |      <enumerator>ANOTHER_ENUM_1</enumerator>
      |      <enumerator>ANOTHER_ENUM_2</enumerator>
      |      <enumerator>ANOTHER_ENUM_3</enumerator>
      |      <enumerator>ANOTHER_ENUM_4</enumerator>
      | </enum>

    The @typename can be used as a @type of feature, and enumerator
    value can be used as a feature value. For example, below declaration
    is possible.
      | <key name="tizen.org/feature/DDD"
      |      getter="qux" type="some_enum_e">SOME_ENUM_0</key>
      | <key name="tizen.org/feature/EEE"
      |      getter="quux" type="another_enum_e">ANOTHER_ENUM_3</key>

    From the above declarations, SystemInfoGenerator generates enum declarations
    in header file. (Header file can be specified with option --ouptut-header)
      | typedef enum {
      |     SOME_ENUM_0 = 0,
      |     SOME_ENUM_1 = 1,
      |     SOME_ENUM_2 = 2,
      |     SOME_ENUM_3 = 3,
      |     SOME_ENUM_4 = 4,
      | } some_enum_e;
      |
      | typedef enum {
      |     ANOTHER_ENUM_0 = 100,
      |     ANOTHER_ENUM_1 = 101,
      |     ANOTHER_ENUM_2 = 102,
      |     ANOTHER_ENUM_3 = 103,
      |     ANOTHER_ENUM_4 = 104,
      | } another_enum_e;

    And getter will be generated in the same way how those normal types
    have been.
      | int system_info_get_qux(some_enum_e *value);
      | int system_info_get_quux(another_enum_e *value);

    Calling those getters fetch the feature value.
      | #include <system_info_generated.h>
      |
      | some_enum_e some;
      | another_enum_e another;
      |
      | system_info_get_qux(&some); // some = SOME_ENUM_0, 0
      | system_info_get_quux(&another); // another = ANOTHER_ENUM_3, 103

SystemInfoGenerator component:
  ├── __init__.py
  ├── __main__.py
  │     : See 'python -m SystemInfoGenerator --help'.
  ├── ModelConfigParser.py
  │     : Parser for deserializing model-config.xml. It takes list of
  │       model-config.xml, deserializes and returns list of TizenFeature
  │       and TizenFeatureEnum.
  ├── SystemInfoBoilerplate.py
  │     : Boilerplate generator.
  ├── SystemInfoCommon.py
  │     : Common code for SystemInfoGenerator package.
  ├── SystemInfoGenerator.py
  │     : Generator for source and header of system-info-generated API.
  ├── SystemInfoUtilityGenerator.py
  │     : Generator for utility source and header of system-info-generated API.
  │       Currently, it only contains convertor that converts enumerator
  │       name into corresponding integer.
  └── TizenFeature.py
        : There are two classes, TizenFeature and TizenFeatureEnum. The
          TizenFeature represents <key> element of model-config.xml, and
          TizenFeatureEnum represents <enum> element.

Change-Id: I4027ac73c6258976bbad413acf359d3727c882f8
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
5 months agosystem_info_extenal: Make non-exported function as internal 62/301962/4 accepted/tizen_unified_riscv accepted/tizen/unified/20231211.095401 accepted/tizen/unified/riscv/20231215.050329
Chanwoo Choi [Tue, 28 Nov 2023 10:10:22 +0000 (19:10 +0900)]
system_info_extenal: Make non-exported function as internal

Make non-exported function as internal function and then
remove 'external_' prefix to show the difference between
exported and non-exported function for improving the readability.

Change-Id: Id16cd63cff2e97c7e17bbacf3f66c80a1e36f311
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 months agotool: Fix typo 32/299332/1
Youngjae Cho [Tue, 26 Sep 2023 06:36:07 +0000 (15:36 +0900)]
tool: Fix typo

Change-Id: Ib9b92ac0dd3e017e36896114b2a654d683fef211
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
8 months agocoverage: Exclude unnecessary lines for line coverage 64/297964/1 accepted/tizen_8.0_unified accepted/tizen/8.0/unified/20231005.092854 accepted/tizen/unified/20230830.170557 tizen_8.0_m2_release
Youngjae Cho [Tue, 29 Aug 2023 03:03:31 +0000 (12:03 +0900)]
coverage: Exclude unnecessary lines for line coverage

1. Exclude lines related to custom feature. It is because the
   whole system_info_external.c code already has been excluded from the
   line coverage.
2. Exclude system_info_get_platform_type()/system_info_get_custom_type()
   and its subroutine as they are not exported as public API.
3. Exclude the whole init_db related source code.

Change-Id: I6321bed4191cd5914a12c3e082a1981613d9a95b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
21 months agoinit_db: exclude hal-release information from database 02/278302/2 accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.063529 accepted/tizen/7.0/unified/hotfix/20221116.104839 accepted/tizen/unified/20220720.064020 submit/tizen/20220719.051932 tizen_7.0_m2_release
Youngjae Cho [Tue, 19 Jul 2022 00:53:11 +0000 (09:53 +0900)]
init_db: exclude hal-release information from database

For fota, platform-release information is only required. However the
current system-info have two kinds of release information, platform
and hal, and the hal-release information overwrites the platform-release
information. Therefore, do not include hal-release information into
system-info database so that there is only platform-release information
in the database.

Change-Id: I5fc381a3de5d2f13095645d880730531de56d1f0
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
22 months agoApply requirement for gcov automation 20/276120/3 accepted/tizen/unified/20220613.161620 submit/tizen/20220610.020359
Youngjae Cho [Fri, 10 Jun 2022 00:21:58 +0000 (09:21 +0900)]
Apply requirement for gcov automation

Change-Id: Ib739cf74ee7cf1949b0721b2623a09e2ef6902a9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoRemove dependency to libsyscommon and add .gitignore 28/273728/2 accepted/tizen/unified/20220526.144355 accepted/tizen/unified/20220530.140615 submit/tizen/20220525.001052 submit/tizen/20220528.014654
Hyotaek Shim [Wed, 13 Apr 2022 05:47:46 +0000 (14:47 +0900)]
Remove dependency to libsyscommon and add .gitignore

Change-Id: I7be05f4c6b225786fa9d66f9cbd5fa5c8b4a2bcf
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoFix typo 88/270488/1
Youngjae Cho [Thu, 3 Feb 2022 08:58:57 +0000 (17:58 +0900)]
Fix typo

Change-Id: Ie18506860de0ac81c5066cdbf300a5cd48f9eb21
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoChange gcov object install path 42/270142/1 accepted/tizen/unified/20220128.144454 submit/tizen/20220127.011830
Youngjae Cho [Wed, 26 Jan 2022 05:45:08 +0000 (21:45 -0800)]
Change gcov object install path

Change-Id: I42bcdea47e21803dd822b826e2f68971f4c3aefe
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoComplete bool string when joining it 94/267894/1 accepted/tizen/unified/20211216.155840 submit/tizen/20211213.045725 submit/tizen/20211215.053304
Youngjae Cho [Mon, 13 Dec 2021 04:26:21 +0000 (13:26 +0900)]
Complete bool string when joining it

Change-Id: I203742d0bbcaa734871ea045a1b26e3c82f6a81c
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoFix ASAN issue 42/267842/1 submit/tizen/20211210.105007
Hyotaek Shim [Fri, 10 Dec 2021 10:47:52 +0000 (19:47 +0900)]
Fix ASAN issue

stack-buffer-overflow on address 0xbed7cb70 at pc 0xb6a2c22b bp 0xbed7c90c sp 0xbed7c4d8
READ of size 29 at 0xbed7cb70 thread T0
    #0 0xb6a2c228 in strdup (/usr/lib/libasan.so+0x35228)
    #1 0xb4da64d8  (/lib/libcapi-system-info.so.0+0x24d8)
    #2 0xb4da66fe  (/lib/libcapi-system-info.so.0+0x26fe)
    #3 0xb65a096a  (/lib/libcapi-system-device.so.0+0x496a)
    #4 0xb6f601b8 in call_init /usr/src/debug/glibc-2.30-2.9.arm/elf/dl-init.c:72
    #5 0xbed7cfb4  ([stack]+0x20fb4)

Address 0xbed7cb70 is located in stack of thread T0 at offset 80 in frame
    #0 0xb4da6664  (/lib/libcapi-system-info.so.0+0x2664)

  This frame has 2 object(s):
    [48, 52) 'valp' (line 271)
    [64, 80) 'val' (line 270) <== Memory access at offset 80 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)

Change-Id: I122980ff762983bc9646afd84d9e659766edf9a9
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
2 years agotool: fix --set description to clarify bool value 84/263484/1 accepted/tizen/unified/20211105.130521 submit/tizen/20211103.072537 submit/tizen/20211104.031932 submit/tizen/20211104.080231
Youngjae Cho [Fri, 3 Sep 2021 07:55:54 +0000 (16:55 +0900)]
tool: fix --set description to clarify bool value

Change-Id: I3d7c2c3745447ea242ec70e8a3bf5744d238d958
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoSuppress ENOENT as database might not exist 85/262485/3 accepted/tizen/6.5/unified/20211028.101144 accepted/tizen/unified/20210818.124631 submit/tizen/20210816.072111 submit/tizen_6.5/20211028.161801 tizen_6.5.m2_release
Youngjae Cho [Thu, 12 Aug 2021 02:06:58 +0000 (19:06 -0700)]
Suppress ENOENT as database might not exist

Change-Id: Idd24ccbc799bf42723801c2bd760990f18c6350c
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoFix gbs build home creation with incorrect permissions 57/262457/1 accepted/tizen/unified/20210817.123212 submit/tizen/20210812.054845
Yunmi Ha [Wed, 11 Aug 2021 07:37:23 +0000 (16:37 +0900)]
Fix gbs build home creation with incorrect permissions

A gcda file is created when binary system_info_init_db is executed.
At this time, the home directory is not created yet,
so the home directory is created and the gcda file is created under it.
But home directory with wrong permissions due to umask set to 0222 in the binary
So, when build with gcov, set the home directory to the correct permissions

Change-Id: Id7bac84bbfcd284e55f294ecc41ec826e904616c
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
2 years agotool: make result be aligned 58/262158/1 submit/tizen/20210805.103313
Youngjae Cho [Tue, 3 Aug 2021 06:25:14 +0000 (15:25 +0900)]
tool: make result be aligned

Change-Id: Ic56d0f96b1337b00987e04c3092e7d4ad96fd2e6
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agotool: allow prefix "http://" for get/set/clear key 72/262072/2
Youngjae Cho [Mon, 2 Aug 2021 08:51:59 +0000 (17:51 +0900)]
tool: allow prefix "http://" for get/set/clear key

Change-Id: Ie4c504706d1de818dbf1b84878cb57e95009ea0f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agotest: remove api test 87/261787/1
Youngjae Cho [Mon, 26 Jul 2021 08:54:07 +0000 (17:54 +0900)]
test: remove api test

This is replaced by system-info-tool

Change-Id: I9230cf8a3afadb42b8d81a4e6cf2e58a4a6fbc25
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agotool: add command line tool for managing system-info 12/261712/5 accepted/tizen/unified/20210728.090615 submit/tizen/20210726.084601
Youngjae Cho [Fri, 23 Jul 2021 06:06:46 +0000 (15:06 +0900)]
tool: add command line tool for managing system-info

USAGE
  system-into-tool [OPTION]

OPTION
  -l|--list-all                  List all system-info database entries
  -g|--get KEY [-v|--verbose]    Get value of feature KEY
                                 If -v option is given, shows result in detail
                                 ex) system-info-tool -g tizen.org/feature/display
                                     system-info-tool -g tizen.org/system/manufacturer -v
  -s|--set KEY TYPE VALUE        Add or update user-defined KEY
                                 Available TYPE: bool, int, double, string
                                 ex) system-info-tool -a tizen.org/feature/display bool 1
                                     system-info-tool -a tizen.org/system/manufacturer string Tizen
  -c|--clear KEY                 Clear user-defined KEY. This cannot clear read-only system key
  -C|--clear-all                 Clear all user-defined keys
  -h|--help                      Show this help

Change-Id: Id2f72ee242e12d90edc82797a21fdb8b097e2bc6
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoFix to search RO database if RW database is not found 33/261433/3
Youngjae Cho [Mon, 19 Jul 2021 02:42:51 +0000 (19:42 -0700)]
Fix to search RO database if RW database is not found

Change-Id: I2931e3929e75c0fa8e911fc9dd679e51a13e9b4d
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoRemove tab indentation 83/260683/1 accepted/tizen/unified/20210701.055747 submit/tizen/20210701.055415
Youngjae Cho [Thu, 1 Jul 2021 05:31:49 +0000 (14:31 +0900)]
Remove tab indentation

Change-Id: I0165e72ae40f5d81c27ce39ec7ce8b697a310257
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoFix hal dbpath 34/260634/1 submit/tizen/20210630.053411
Youngjae Cho [Wed, 30 Jun 2021 05:05:37 +0000 (14:05 +0900)]
Fix hal dbpath

Change-Id: I29b62955b6bf5928cf16a47b6d7079c8ef9655de
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoFix boolean join considering language property 14/260414/5 accepted/tizen/unified/20210629.130213 submit/tizen/20210628.062452
Youngjae Cho [Thu, 24 Jun 2021 07:37:39 +0000 (16:37 +0900)]
Fix boolean join considering language property

Boolean value is a string of length LANG_MAX. Each character in the
value denotes viability of feature for a specific language. Therefore
for joining boolean value, compare each character one by one.

Change-Id: Ib9f0256073b731b853b4b3ff6555fbe42507c48d
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoMake filepath for release info configurable 23/260223/6
Youngjae Cho [Tue, 22 Jun 2021 07:25:03 +0000 (16:25 +0900)]
Make filepath for release info configurable

system_info_init_db now receives new argument -r(--release) in addition
to -i(--input) and -o(--output). It designates release information file
path which was fixed to /etc/info.ini.

For example, in mic %post script
 #) system_info_init_db --input=/hal/etc/config/model-config.xml
  --release=/hal/etc/hal-info.ini
  --output=/hal/system_info_db
will creates system info database in /hal/system_info_db from
system configuration file(model-config.xml) and system release
file(hal-info.ini).

Change-Id: I1d18b32cb214f4bc44c94414d3944a0299b5af3d
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoSupport database search for HAL system-info 29/260329/5
Youngjae Cho [Wed, 23 Jun 2021 08:39:15 +0000 (17:39 +0900)]
Support database search for HAL system-info

In addition to platform system-info database(/etc/system_info_db),
system-info of HAL(/hal/system_info_db) can be searched for a requested
key.
 If a key exists only in one database, use it.
 If a key exists in both of the databases,
   - if value of key is type of bool, the two value are ANDed.
   - if value of key is type of other than bool, the value of HAL is
     used.

Change-Id: If36a4b7a4143107ec550bb1311dafb470f492167
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agotest : update CMakeFile.txt 48/255448/1 accepted/tizen/unified/20210321.225633 submit/tizen/20210319.035222
Jongmin Lee [Thu, 18 Mar 2021 11:01:06 +0000 (20:01 +0900)]
test : update CMakeFile.txt

pkgconfig does not provide CXXFlags, and it causes build errors in some environments

Change-Id: I698cfeb7af211a1a87bfa063131b78b87f16dcc6

3 years agotest : fix minor issues 98/249598/1 accepted/tizen/unified/20201216.215923 submit/tizen/20201215.102704
Kichan Kwon [Tue, 15 Dec 2020 07:39:08 +0000 (16:39 +0900)]
test : fix minor issues

- Set the initial value
- Use "free" for the memory allocated by "malloc"

Change-Id: I76d716f74942f6c2c2480ee50aa48596dbdba02d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoMerge "Add Requires=local-fs.target dependency to tizenid.service" into tizen accepted/tizen/unified/20201109.123535 submit/tizen/20201105.053335
Kwon [Thu, 5 Nov 2020 05:32:17 +0000 (05:32 +0000)]
Merge "Add Requires=local-fs.target dependency to tizenid.service" into tizen

3 years agoAdd Requires=local-fs.target dependency to tizenid.service 16/245416/1
INSUN PYO [Thu, 8 Oct 2020 08:49:09 +0000 (17:49 +0900)]
Add Requires=local-fs.target dependency to tizenid.service

In emergency mode, local-fs.target always fails.
So, you have to check if local-fs.target is successful.

Change-Id: Ic353d30a7ed7c058d0e05f890c96274d539d48b8

3 years agotest : test custom feature 70/240270/3 accepted/tizen/unified/20201103.051931 submit/tizen/20201102.030555
Kichan Kwon [Wed, 5 Aug 2020 03:13:34 +0000 (12:13 +0900)]
test : test custom feature

Change-Id: Ic7ee68772d6185602c95fab1824b7b8455566087
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agotest : separate RW DB test to verify 29/238429/3
Kichan Kwon [Tue, 14 Jul 2020 01:55:24 +0000 (10:55 +0900)]
test : separate RW DB test to verify

- system-info stores a key/value pair in the hashtable
  when it reads from DB
- So, we can't test same key twice
- Instead, we will test RO/RW DB with different argument
  - 'o' option : test RO DB
  - 'w' option : test RW DB

Change-Id: I721b5d9b1b97fb9de54b0a6efd1a92a90b31ec79
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agotest : test runtime property 85/238385/3
Kichan Kwon [Mon, 13 Jul 2020 07:27:24 +0000 (16:27 +0900)]
test : test runtime property

Change-Id: Id44f7917aa7e546071afd43d300dbb8e769326c0
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agotest : compare values with template function 42/238342/2
Kichan Kwon [Mon, 13 Jul 2020 03:15:36 +0000 (12:15 +0900)]
test : compare values with template function

- To remove duplicated source code

Change-Id: Ifb7c1df91228a07cecedbc066c6d9414c8052db5
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agotest : apply CPP style log 29/238329/3
Kichan Kwon [Mon, 13 Jul 2020 01:11:51 +0000 (10:11 +0900)]
test : apply CPP style log

Change-Id: I6b009479663a9ba89909e3092bd28f5898615623
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agotest : add system_info_init_db_test 44/238244/6
Kichan Kwon [Tue, 7 Jul 2020 10:20:51 +0000 (19:20 +0900)]
test : add system_info_init_db_test

Change-Id: I8f02ab2d6df029e50309ca1a10d3cb3e690d8be9
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoIntegrate system-info-testplugin with system-info-test 57/237957/4
Kichan Kwon [Tue, 7 Jul 2020 02:50:27 +0000 (11:50 +0900)]
Integrate system-info-testplugin with system-info-test

- src/test -> test/api
- src/testplugin -> test/plugin

Change-Id: I315479656b8cf2a32394fd35380f2fcb1cbc9a51
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoSet the plugin directory factoring in architecture 77/240877/1 accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.122313 accepted/tizen/6.0/unified/hotfix/20201103.004628 accepted/tizen/6.0/unified/hotfix/20201103.051817 accepted/tizen/unified/20200818.130022 submit/tizen/20200813.083528 submit/tizen_6.0/20201029.205102 submit/tizen_6.0_hotfix/20201102.192502 submit/tizen_6.0_hotfix/20201103.114802 tizen_6.0.m2_release
Kichan Kwon [Wed, 12 Aug 2020 09:11:03 +0000 (18:11 +0900)]
Set the plugin directory factoring in architecture

- armv7l  : /usr/lib
- aarch64 : /usr/lib64

Change-Id: I07804cb9dd9e996710a5d11f84772d4bc2fa9432
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoPrevent buffer overflow on reading value 66/236766/2 accepted/tizen/unified/20200623.124137 submit/tizen/20200622.055706
Kichan Kwon [Mon, 22 Jun 2020 03:30:38 +0000 (12:30 +0900)]
Prevent buffer overflow on reading value

Change-Id: I4a6d5abce72c4f2165a0d190068ef75157cf4c35
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoIntegrate files into N files to reduce total file size 22/236622/5 submit/tizen/20200619.070358
Kichan Kwon [Thu, 18 Jun 2020 06:47:20 +0000 (15:47 +0900)]
Integrate files into N files to reduce total file size

- Although the size of value is small, each key file takes a file block
  - Block size is 4kB
  - 270 model-config keys takes 1.5MB
- To reduce file size, store many keys into the same file
  - To find file name, use hash function
  - In current, store 10 files

Change-Id: I7140e732d7dde1e6c6ad65b28f5f7a064502d9f5
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoCheck the type by special function for conditions 71/236271/1 accepted/tizen/unified/20200617.055839 submit/tizen/20200616.085030
Kichan Kwon [Tue, 16 Jun 2020 04:51:02 +0000 (13:51 +0900)]
Check the type by special function for conditions

- In current, only tizenid use it

Change-Id: I3c985a7d848f40fcacbfd5c5846c7dd082478188
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoRead value from per-key file 52/236152/3 submit/tizen/20200615.100201
Kichan Kwon [Mon, 15 Jun 2020 05:14:47 +0000 (14:14 +0900)]
Read value from per-key file

Change-Id: I0cb6e0607961fe7660b8234f5ae32f90e5294530
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
4 years agochange version to 0.5.2 46/223746/2 accepted/tizen/unified/20200205.125300 submit/tizen/20200204.171703
Wiktor Gerstenstein [Wed, 22 Jan 2020 14:39:38 +0000 (15:39 +0100)]
change version to 0.5.2

Change-Id: If7ee54ab008c66b7e195c97a665be5e9c0073e9b

4 years agoadd multi-plugin functionality 68/221468/26
Wiktor Gerstenstein [Wed, 22 Jan 2020 14:39:38 +0000 (15:39 +0100)]
add multi-plugin functionality

Change-Id: Iacef58acb8b2e9dae93a7f2bd63813c82a1ce992

4 years agobugfix: fix type mismatch for custom key 79/223079/3
Wiktor Gerstenstein [Wed, 22 Jan 2020 14:35:22 +0000 (15:35 +0100)]
bugfix: fix type mismatch for custom key

Change-Id: Iacef58acb8b2e9dae93a7f2bd63813c82a1ce993

4 years agoFix: Do not use source argument length in strncpy() 36/221536/2 accepted/tizen/unified/20200108.131426 submit/tizen/20200107.112721
Karol Lewandowski [Fri, 3 Jan 2020 11:02:33 +0000 (12:02 +0100)]
Fix: Do not use source argument length in strncpy()

This fixes issue found by gcc 9.x, where strncpy's length
argument was based on source argument length.  This commit
fixes possible bufer overflow.

Change-Id: I933e999d4919e1dbce2834138a612c9f97f916a4

4 years agoExplict type cast according to iniparser 4.1 API change 18/221018/1 accepted/tizen/unified/20200102.220917 submit/tizen/20191226.100939
Kunhoon Baik [Thu, 26 Dec 2019 09:37:42 +0000 (18:37 +0900)]
Explict type cast according to iniparser 4.1 API change

From iniparser 4.1, iniparser_getstring retrun "const char*" instead of "char *"
To support the new API, explict type cast was added.
Although system_info_db_init requires "const char*", original codes was kept to minimize modification.

Change-Id: I3c0ee077500160b38a80c0257ba1b77585a81187

4 years agoUpdate guide URL 95/219595/1
Kichan Kwon [Fri, 6 Dec 2019 08:12:37 +0000 (17:12 +0900)]
Update guide URL

Change-Id: I82fe9e57f395e00e979d25b76e70a15c41653a01
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
4 years agoRename gcov package 08/209608/1 accepted/tizen_5.5_unified_mobile_hotfix tizen_5.5_mobile_hotfix tizen_5.5_tv accepted/tizen/5.5/unified/20191031.031028 accepted/tizen/5.5/unified/mobile/hotfix/20201027.065549 accepted/tizen/unified/20190710.103504 submit/tizen/20190710.014924 submit/tizen_5.5/20191031.000002 submit/tizen_5.5_mobile_hotfix/20201026.185102 tizen_5.5.m2_release
Kichan Kwon [Tue, 9 Jul 2019 08:47:00 +0000 (17:47 +0900)]
Rename gcov package

Change-Id: I596e69f5d457254ea1b58f6afa6ecbfeab25464a
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
4 years agoMake gcov package 43/208743/1 accepted/tizen/unified/20190708.052536 submit/tizen/20190705.014352
Kichan Kwon [Fri, 28 Jun 2019 01:01:21 +0000 (10:01 +0900)]
Make gcov package

- To make, use "gcov" build option

Change-Id: Ic6cf306d62d48f187c97c8c327059755ff4c2d31
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
4 years agoCreate system-info-test 49/203249/4
Kichan Kwon [Thu, 11 Apr 2019 05:18:06 +0000 (14:18 +0900)]
Create system-info-test

- Input key information, then prints value

Change-Id: I0dac252d8fb3d518508113978def523d4987cca1
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
5 years agoWrite debug log when the key isn't stored in DB 34/202134/1
Kichan Kwon [Mon, 25 Mar 2019 06:51:33 +0000 (15:51 +0900)]
Write debug log when the key isn't stored in DB

- The keys supported by system-info plugin aren't stored in the DB
- In this case, system-info always write error log though
  it returns right value (with ERROR_NONE)
- To prevent misunderstanding, change the log level
  - In real failure case, you can check the "Invalid key" log

Change-Id: Ia78cb2e87c5ee06cf20f3718694d262c7df6da90
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
5 years agotizenid.service: Add RemainAfterExit=yes 37/198837/1
INSUN PYO [Wed, 30 Jan 2019 07:21:35 +0000 (16:21 +0900)]
tizenid.service: Add RemainAfterExit=yes

tizenid.service should be run only once at boot time.

Change-Id: I9390f63fedf25624bab3ad3090ce2362cd6b7dbd

5 years agoAdd LCOV comment for not used function 04/185404/1
Kichan Kwon [Mon, 30 Jul 2018 08:03:04 +0000 (17:03 +0900)]
Add LCOV comment for not used function

- destroy_key_value is called when hashtable is removed
- However, there is no scenario that this hashtable is removed

Change-Id: I7356d46b9bf84e083e8cf371854b4b5a54afa2f4
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
5 years agorelease : 0.5.1 07/179007/1 accepted/tizen/5.0/unified/20181102.014226 accepted/tizen/unified/20180516.065552 submit/tizen/20180515.082614 submit/tizen_5.0/20181101.000002
Kichan Kwon [Tue, 15 May 2018 08:12:34 +0000 (17:12 +0900)]
release : 0.5.1

Change-Id: Iab7ad9b9bc5651330329c901b0a831b8bdc5bc83
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
5 years agoRemove deprecated notice file 06/179006/2
Kichan Kwon [Tue, 15 May 2018 08:07:09 +0000 (17:07 +0900)]
Remove deprecated notice file

- format_uuid_v3orv5 is deprecated since Tizen 3.0

Change-Id: I40489026c193543e32553fb23109bfa3975e7d77
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
5 years agoMake some macros consistent 05/179005/1
Kichan Kwon [Tue, 15 May 2018 08:05:28 +0000 (17:05 +0900)]
Make some macros consistent

- Related with model-config and DB

Change-Id: I12b8b9629d7993a7d11a55bfcbd21342c278d570
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
5 years agoMerge remote-tracking branch 'origin/tizen_4.0' into tizen 00/179000/1
Kichan Kwon [Tue, 15 May 2018 07:38:53 +0000 (16:38 +0900)]
Merge remote-tracking branch 'origin/tizen_4.0' into tizen

Change-Id: I9c6e9bfaca6cc3ac897e8210e8926abc8f9e3809
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoFix model_config directory discretionary access control 46/174946/1 accepted/tizen/4.0/unified/20180417.174503 submit/tizen_4.0/20180412.111446
Donghwan Jeong [Thu, 5 Apr 2018 08:27:39 +0000 (17:27 +0900)]
Fix model_config directory discretionary access control

Basically, directory DAC should be haven execute option.
So model_config directory will have it.

Change-Id: Iab3ff32c19f4b4015aebbf1546cd2b99bb40cb67
Signed-off-by: Donghwan Jeong <dh.jeong@samsung.com>
6 years agoinit_db: add system_info_db parameter for make new db by another path 10/169910/2 accepted/tizen/4.0/unified/20180328.140008 submit/tizen_4.0/20180323.050904
Donghwan Jeong [Mon, 12 Feb 2018 05:31:41 +0000 (14:31 +0900)]
init_db: add system_info_db parameter for make new db by another path

It will be supported that the content can be chagned in system info at run-time.
So, system_info_db can make new system-info-db file by another path.

system_info_init_db -i --input=PATH   Make System info db by the PATH
ex) system_info_init_db -i /etc/config/model-config.xml

The new db file will be saved to '/opt/system/model_conf/system_info_db' path

Change-Id: I2ddde7e313ff5cc547b3592109fe1cf29ddbdd7b
Signed-off-by: Donghwan Jeong <dh.jeong@samsung.com>
6 years agoWrite RUNTIME_TYPE log with debug level 25/165825/1
Kichan Kwon [Thu, 4 Jan 2018 07:54:19 +0000 (16:54 +0900)]
Write RUNTIME_TYPE log with debug level

- If app launcher doesn't set RUNTIME_TYPE, this log will be written
  whenever system-info API is called for getting boolean value

- For developer to give control, modify this log's level

Change-Id: I2d393efaf73d0c7243cc321753825a684c00231e
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoMerge remote-tracking branch 'origin/tizen_4.0' into tizen 02/158902/1 accepted/tizen/unified/20171108.063601 submit/tizen/20171108.015642
Kichan Kwon [Mon, 6 Nov 2017 01:46:34 +0000 (10:46 +0900)]
Merge remote-tracking branch 'origin/tizen_4.0' into tizen

Change-Id: I75d6c2cf7a89051293838f20e440a0049790975d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoFix memory issue about the value read by GDBM 26/154226/1 accepted/tizen/4.0/unified/20171010.162930 submit/tizen_4.0/20171010.010314 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m2_release
Kichan Kwon [Fri, 1 Sep 2017 07:20:32 +0000 (16:20 +0900)]
Fix memory issue about the value read by GDBM

- Limit duplicated size
- Free after using

Change-Id: I530683f386bb64d402c8277824051c91aa003330
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoFix memory issues 29/152429/3 accepted/tizen/4.0/unified/20170927.045608 submit/tizen_4.0/20170926.084004
Kichan Kwon [Tue, 26 Sep 2017 06:39:23 +0000 (15:39 +0900)]
Fix memory issues

- Prevent accessing out of array
- Free before exit

Change-Id: Ifbe15353753438efb1b0f79951121d717cd57038
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoFix memory issue about the value read by GDBM 54/147154/3 accepted/tizen/unified/20170905.184201 submit/tizen/20170904.073650
Kichan Kwon [Fri, 1 Sep 2017 07:20:32 +0000 (16:20 +0900)]
Fix memory issue about the value read by GDBM

- Limit duplicated size
- Free after using

Change-Id: I530683f386bb64d402c8277824051c91aa003330
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoinit_db : allocate one more byte to boolean value 53/146853/2
Kichan Kwon [Thu, 31 Aug 2017 01:32:07 +0000 (10:32 +0900)]
init_db : allocate one more byte to boolean value

- For null character, write (len + 1) bytes to the DB
- However, only len bytes are allocated for boolean value
- To prevent buffer over-read, give a spare byte

Change-Id: I5582e0ac5c1d5837ce9ac1b295762814011133f0
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoRemove build option related with upgrade script 32/144032/1 accepted/tizen/4.0/unified/20170828.223937 accepted/tizen/unified/20170818.000010 submit/tizen/20170816.021143 submit/tizen_4.0/20170828.100002
Kichan Kwon [Mon, 14 Aug 2017 10:10:41 +0000 (19:10 +0900)]
Remove build option related with upgrade script

Change-Id: Ie1e01c0bb0ab7354c9dc32fee4f5a6a5e1b3a218
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoscript : remove upgrade script 86/143486/1 submit/tizen/20170811.083904
Kichan Kwon [Thu, 10 Aug 2017 06:14:54 +0000 (15:14 +0900)]
script : remove upgrade script

- No more support 2.4 -> 3.0 upgrade

Change-Id: Ifb2024a432fa5593f27d7d154f5ba4bcb5300cef
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoupdate_db : remove system_info_update_db 28/143428/2
Kichan Kwon [Thu, 10 Aug 2017 01:54:56 +0000 (10:54 +0900)]
update_db : remove system_info_update_db

- It is for emulator to chroot before system_info_init_db
- But, with using busybox, we can use chroot in the initramfs
- To apply with emulator, the prerun patch should be applied first
  - https://review.tizen.org/gerrit/#/c/143420/

Change-Id: I49f12420005ef8860fbb65efb45c57179eadfc0d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoMerge "Use memcpy to prevent buffer over-reading by snprintf" into tizen accepted/tizen/unified/20170807.150403 submit/tizen/20170804.012803
Kichan Kwon [Wed, 2 Aug 2017 09:53:00 +0000 (09:53 +0000)]
Merge "Use memcpy to prevent buffer over-reading by snprintf" into tizen

6 years agoUse memcpy to prevent buffer over-reading by snprintf 80/141880/3
Kichan Kwon [Wed, 2 Aug 2017 01:15:09 +0000 (10:15 +0900)]
Use memcpy to prevent buffer over-reading by snprintf

- snprintf calculates return value by checking the length of format string
- Therefore, if format string is non-terminated, snprintf can over-read
- To prevent, use memcpy and write null character

Change-Id: I9ba837d8e22313be6e34ba39e4ccaf7743166d89
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoMake version information for update at imaging 36/141936/1 accepted/tizen/4.0/unified/20170816.012513 accepted/tizen/unified/20170803.075310 submit/tizen/20170802.054958 submit/tizen_4.0/20170811.094300
Sunmin Lee [Wed, 2 Aug 2017 05:04:25 +0000 (14:04 +0900)]
Make version information for update at imaging

make_info_file.sh constructs platform info file during imaging.
Platform update needs formatted version information which also
could be constructed at imaging time.

Change-Id: Ibee71bef3a5811fc725d1648ea69b88be384a8bd
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoEnhancement system-init-db for updating specific lang feature 74/140074/6 accepted/tizen/unified/20170725.173416 submit/tizen/20170724.024950
Kunhoon Baik [Sat, 22 Jul 2017 01:20:01 +0000 (10:20 +0900)]
Enhancement system-init-db for updating specific lang feature

Now, system init db tool can update bool value for specific runtime.

The feature will be updated according to following command.

Whole runtime feature update : -k KEY -t bool -v VALUE
C# runtime feature update : -k KEY -t bool -v VALUE -l csapi
C runtime feature update : -k KEY -t bool -v VALUE -l capi
Web runtime feature update : -k KEY -t bool -v VALUE -l webapi

Change-Id: Iad562a040778b4b1b76492ad6f06e6043edee234

6 years agoinit_db : update boolean to modified value 15/139515/3 accepted/tizen/unified/20170721.024513 submit/tizen/20170720.062337
Kichan Kwon [Wed, 19 Jul 2017 07:49:38 +0000 (16:49 +0900)]
init_db : update boolean to modified value

- The lang option of update is removed because of the lack of default value

Change-Id: I8568e369a4ddd140b070256c1a4d199090cd58aa
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoinit_db : write boolean to 'T' or 'F' instead of 0x1 or 0x0 96/137396/1 accepted/tizen/unified/20170706.193736 submit/tizen/20170706.010921
Kichan Kwon [Wed, 5 Jul 2017 12:21:45 +0000 (21:21 +0900)]
init_db : write boolean to 'T' or 'F' instead of 0x1 or 0x0

- To prevent misunderstanding false as the end of string
- In addition, we can get the readbility

Change-Id: If94ec9337f4360f696c242664e5d32401da5f934
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoVersion up 23/137223/1 submit/tizen/20170705.023006
Kichan Kwon [Wed, 5 Jul 2017 02:25:10 +0000 (11:25 +0900)]
Version up

Change-Id: I45c65e0d5645a881dfa009eda96fbde83614129c
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoFix a bug of buffer-size using when checking tizen-id validation 36/136936/1
Kunhoon Baik [Mon, 3 Jul 2017 23:33:26 +0000 (08:33 +0900)]
Fix a bug of buffer-size using when checking tizen-id validation

It should be ID_LEN(28)+4 because 32 byte is maximum.

Change-Id: I0a877b9b01c7fa1184308598f0ce21c03f1707d9

6 years agoGenerate tizenID with libuuid instead of openssl 69/132069/7
Kichan Kwon [Thu, 1 Jun 2017 02:44:48 +0000 (11:44 +0900)]
Generate tizenID with libuuid instead of openssl

- To detach openssl

Change-Id: I55a6cbbd686857a94d0ff7cb9806759db4c40f03
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoSupport language runtime property for boolean feature 44/133344/6 submit/tizen/20170703.030310
Kichan Kwon [Fri, 9 Jun 2017 08:03:20 +0000 (17:03 +0900)]
Support language runtime property for boolean feature

- Some keys are needed to have different value depend on runtime
- To support different value, model-config will have runtime property
  - e.g. < ... capi="on" webapi="off" csapi="on">VALUE</key>

- init_db stores the value for all runtimes with default value
- Before system-info reads key, it check RUNTIME_TYPE
  - If RUNTIME_TYPE is invalid or NULL, return default value

Change-Id: I247245270ddf58ae2da5254a23b0fa2188e77899
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoSwitch off UBSan for update_db 82/134982/1
Denis Khalikov [Tue, 20 Jun 2017 11:19:18 +0000 (14:19 +0300)]
Switch off UBSan for update_db

Change-Id: I6ffd4ce833bd72c1ee66cdc77f8139b63ce618a0
Signed-off-by: Denis Khalikov <d.khalikov@partner.samsung.com>
6 years agoSwitch off ASan for update_db 35/127735/5
Slava Barinov [Fri, 16 Sep 2016 14:24:28 +0000 (17:24 +0300)]
Switch off ASan for update_db

Sanitized binary cannot be built with '-static' since Address Sanitizer intercepts function calls from libraries.

Thus, system-info is built in both Address Sanitizer On environment and Address Sanitizer Off environment. Then, system-info-update-db built without sanitized build option is installed.

Change-Id: I16a09d0555252cac0d717068560d99f06d0c12d3
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
6 years agoCorrect broken link 36/130436/1 accepted/tizen/unified/20170523.050829 submit/tizen/20170523.013149 tizen_4.0.m1_release
Kichan Kwon [Mon, 22 May 2017 09:21:46 +0000 (18:21 +0900)]
Correct broken link

Change-Id: I6fc657e9a22bd9d2e4f9aa35933de3b697536aeb
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoFix invalid type specifier 65/125965/1 accepted/tizen/unified/20170420.054422 submit/tizen/20170419.094909
Kichan Kwon [Wed, 19 Apr 2017 12:03:04 +0000 (21:03 +0900)]
Fix invalid type specifier

Change-Id: I5ef279c47e01468417c347faf19573dc27bee1ad
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoupdate_db : do chdir after chroot 98/125798/1 submit/tizen/20170419.094553
Kichan Kwon [Wed, 19 Apr 2017 02:17:30 +0000 (11:17 +0900)]
update_db : do chdir after chroot

- To prevent from accessing outside of chroot directory

Change-Id: Ia951443f9a0f4da12596640361288519b94a38c6
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoremove the dependency of model-config 19/124719/1 accepted/tizen/unified/20170412.153421 submit/tizen/20170412.074047
Youngjae Shin [Wed, 12 Apr 2017 07:36:37 +0000 (16:36 +0900)]
remove the dependency of model-config

   It will be handled by ks file.

Change-Id: I0f3bdbf34e0734725621dd614aa3ab439d6221d5

7 years agoadd Recommends for model-config 10/124610/1 submit/tizen/20170412.014838
Youngjae Shin [Wed, 12 Apr 2017 02:22:56 +0000 (11:22 +0900)]
add Recommends for model-config

Change-Id: Iae9ab03093e7e248901bfb81111f59e5f3749223

7 years agorevise packaging for unified build 88/124588/1
Youngjae Shin [Wed, 12 Apr 2017 01:29:25 +0000 (10:29 +0900)]
revise packaging for unified build

Change-Id: Idcc56926fbbb07840d25da2117f49eb42d293517

7 years agoFix spec file and add manifest file for extension-emulator 53/124053/1 accepted/tizen/unified/20170410.155854 submit/tizen/20170410.052157
Kichan Kwon [Mon, 10 Apr 2017 05:12:19 +0000 (14:12 +0900)]
Fix spec file and add manifest file for extension-emulator

Change-Id: I01f72716a252b840e81a7266c64ccfc18524f1ab
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoAdd LCOV comment for not supported API 24/123424/1 accepted/tizen/unified/20170406.055641 submit/tizen/20170406.011106
Kichan Kwon [Wed, 5 Apr 2017 11:34:10 +0000 (20:34 +0900)]
Add LCOV comment for not supported API

Change-Id: Ieda1db7075020d61bd6cb7d11c57263ad318cc90
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years ago[Tizen] Remove emulator build dependencies 93/122093/2
hk57.kim [Thu, 30 Mar 2017 07:15:39 +0000 (16:15 +0900)]
[Tizen] Remove emulator build dependencies

- This is for Tizen 4.0.
- Added backward-compatibility that does not deteriorate 4.0 Configurability

- When you SR this, you need to create JIRA-TRE issue of:
  : add capi-system-info-extension-emulator for all(common/mobile/wearable/ivi/tv) emulator

(It's add, not replace.)

Change-Id: I8fcbd4760846ba03d9ea2adfbbb6117ab73e714e
Signed-off-by: hk57.kim <hk57.kim@samsung.com>
[Fix build error]
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoModify uid/gid of tizenid 02/122602/1 accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable accepted/tizen/common/20170404.142200 accepted/tizen/ivi/20170403.125359 accepted/tizen/mobile/20170403.125310 accepted/tizen/tv/20170403.125325 accepted/tizen/unified/20170403.125414 accepted/tizen/wearable/20170403.125339 submit/tizen/20170403.050246
Kichan Kwon [Mon, 3 Apr 2017 04:58:32 +0000 (13:58 +0900)]
Modify uid/gid of tizenid

- system_share will be deprecated

Change-Id: I92e20ba86c81b08358fee1829c6ceed2f43c2ca0
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoMerge branch 'tizen_3.0' into tizen 30/117330/1 accepted/tizen/common/20170306.164523 accepted/tizen/ivi/20170305.223714 accepted/tizen/mobile/20170305.223625 accepted/tizen/tv/20170305.223639 accepted/tizen/unified/20170309.032309 accepted/tizen/wearable/20170305.223655 submit/tizen/20170304.065436 submit/tizen_unified/20170308.100405
taeyoung [Sat, 4 Mar 2017 06:45:06 +0000 (15:45 +0900)]
Merge branch 'tizen_3.0' into tizen

Signed-off-by: taeyoung <ty317.kim@samsung.com>
Change-Id: I3a8911f1c70b5657555513c669151d0aa0d9c76c

7 years agopc: add prefix for the pc file 29/117329/1 accepted/tizen/3.0/common/20170306.135538 accepted/tizen/3.0/ivi/20170306.064315 accepted/tizen/3.0/mobile/20170306.064248 accepted/tizen/3.0/tv/20170306.064258 accepted/tizen/3.0/wearable/20170306.064302 submit/tizen_3.0/20170304.065450
taeyoung [Sat, 4 Mar 2017 06:38:15 +0000 (15:38 +0900)]
pc: add prefix for the pc file

Pc file uses PREFIX macro, but there was no place to define the macro.
Now, The macro is defined in the CMakeLists.txt file.

Change-Id: I3ea9ca72bf6a4db4cd1e36f573600b38c5ff13bc
Signed-off-by: taeyoung <ty317.kim@samsung.com>
7 years agoMerge branch 'tizen_3.0' into tizen 04/117104/1 accepted/tizen/common/20170303.090751 accepted/tizen/ivi/20170303.065741 accepted/tizen/mobile/20170303.065653 accepted/tizen/tv/20170303.065714 accepted/tizen/wearable/20170303.065726 submit/tizen/20170303.012436
taeyoung [Fri, 3 Mar 2017 00:55:47 +0000 (09:55 +0900)]
Merge branch 'tizen_3.0' into tizen

Signed-off-by: taeyoung <ty317.kim@samsung.com>
Change-Id: Ie52144c8631d9885deea1ce7a6cafa0e32bc2d0b

7 years agopc: add prefix information 78/115678/1 accepted/tizen/3.0/common/20170223.121231 accepted/tizen/3.0/ivi/20170223.040408 accepted/tizen/3.0/mobile/20170223.040327 accepted/tizen/3.0/tv/20170223.040350 accepted/tizen/3.0/wearable/20170223.040359 submit/tizen_3.0/20170221.035828
taeyoung [Tue, 21 Feb 2017 05:04:26 +0000 (14:04 +0900)]
pc: add prefix information

prefix information is not the necessary information.
But the information is used in other place, and thus
the information is added.

Change-Id: I1bf5556eda7b3aae6fdda25d4ed419229193f5a8
Signed-off-by: taeyoung <ty317.kim@samsung.com>