archive/tools/sc-image-utils.git
10 years agoUpdates to image building procedure 42/24042/1 tizen
Lukasz Kostyra [Tue, 1 Jul 2014 09:59:26 +0000 (11:59 +0200)]
Updates to image building procedure

[Feature]       a) Image builder will now use MIC directly instead of GBS.
                b) Updates to .ks files.
                c) Remove old images when rebuilding is turned on in conf.xml.
[Cause]         a) GBS had less options (ex. user couldn't include local packages when building an
                image).
                b) .ks files outdated.
                c) Existence of old images required user interaction when launching MIC.
[Solution]      Added features as in [Feature] section.
[Verification]  Install with sudo make install, build image and flash on target. Image should work.

Change-Id: I7fd1e96fe36edef238df5ee28e4ef179696b40ea
Signed-off-by: Lukasz Kostyra <l.kostyra@samsung.com>
10 years agoStop build when GBS fails to finish. 41/24041/1
Lukasz Kostyra [Tue, 1 Jul 2014 09:26:04 +0000 (11:26 +0200)]
Stop build when GBS fails to finish.

[Feature]       Image build will be stopped when GBS fails to build an image.
[Cause]         There is no need to complete an image when one of the base images fails to create.
[Solution]      Raise an exception when GBS returns other value than 0. Capture that exception in
                main create_image script.
[Verification]  Install with sudo make install, run image build which will fail. Script should end
                its execution when an error occurs

Change-Id: Ib357b2bfbfb4dc0cda8932312850e591b9591ce4
Signed-off-by: Lukasz Kostyra <l.kostyra@samsung.com>
10 years agoMove image names to conf.xml file 40/24040/1
Lukasz Kostyra [Tue, 1 Jul 2014 09:15:51 +0000 (11:15 +0200)]
Move image names to conf.xml file

[Feature]       Image names are taken from conf.xml file.
[Cause]         Need for easy way to change image names without altering the code.
[Solution]      Image names are provided through conf.xml file used when launching script.
[Verification]  Install on host PC and successfully build an image.

Change-Id: I90df60cad65b4f559333f9e84e7f78da58d06e62
Signed-off-by: Lukasz Kostyra <l.kostyra@samsung.com>
10 years agoRename package to sc-image-utils 39/24039/1
Lukasz Kostyra [Wed, 2 Jul 2014 06:49:10 +0000 (08:49 +0200)]
Rename package to sc-image-utils

[Feature]       Package name changed to a new one - sc-image-utils.
[Cause]         sc-image-utils package was earlier developed on other repo with other name.
[Solution]      Rename everything.
[Verification]  After this commit all tools should work as they worked before.

Change-Id: Ie9255bfeb484a31bfdcc1041ec2b20da33de919d

10 years agoEnhancements to Image Builder 56/23756/1
Lukasz Kostyra [Thu, 5 Jun 2014 10:30:04 +0000 (12:30 +0200)]
Enhancements to Image Builder

[Feature]       - Force using bash on some commands. On some systems commands from subprocess were
                  launched using sh not bash. This caused errors and weird behavior, causing the
                  script to fail.
                - Globalize names of image parts created by MIC.
                - Change names of image parts to correct ones.
                - Update .ks files.
[Cause]         N/A
[Solution]      N/A
[Verification]  Install with sudo make install, build an image with containers and flash
                target with such image. Image should work.

Change-Id: I52231fe3c84d92600e536d6e995f5e6ccb060b5d
Signed-off-by: Lukasz Kostyra <l.kostyra@samsung.com>
10 years agoChange "domains" directory name to "containers" 55/23755/1
Michal Witanowski [Mon, 28 Apr 2014 14:43:06 +0000 (16:43 +0200)]
Change "domains" directory name to "containers"

[Bug/Feature]   N/A
[Cause]         Security-containers-server uses /opt/usr/containers/ path.
[Solution]      Change temporary directories names.
[Verification]  Install, build image, check if containers file systems
                are located in /opt/usr/containers/, run SCS without
                any paths modiffications.

Change-Id: I1f0aea4d5fcd1cdfd3ccb7e566c1f79d6d2a248e
Signed-off-by: Lukasz Kostyra <l.kostyra@samsung.com>
10 years agoAdd scripts to migrate data between devices 54/23754/1
Lukasz Kostyra [Thu, 3 Apr 2014 08:26:18 +0000 (10:26 +0200)]
Add scripts to migrate data between devices

[Feature]       Scripts migrating data between target devices
[Cause]         User might want to backup data from his phone for various reasons (e.g. due to an
                update to system with containers).
[Solution]      Scripts which download user's files and apps to host, and then upload them on a
                freshly flashed device.
[Verification]  Install scripts with sudo make install, then download data from device:
                  1. Set data which you want to download by creating a config XML (see
                     data/migrator_default.xml for reference)
                  2. Run download_data -c <PATH_TO_XML>
                  3. Data should be saved in ./migrator_output/<DEVICE_ID>_<CURRENT_DATE_AND_TIME>.
                     Additionally script should generate result.xml file with data for uploading
                     script.

                Upload data to device:
                  1. When device is connected, run upload_data -c <PATH_TO_RESULT_XML_FILE>
                     Script will upload data according to result XML file and install TPK apps.
                  2. Additionally data can be saved according to different root directory by
                     specifying option --root <PATH_TO_NEW_ROOT>. All data will be uploaded to
                     <PATH_TO_NEW_ROOT>/...

Change-Id: I3525e624c3a194ee1b0848e7b4616ccbc56bc3d4
Signed-off-by: Lukasz Kostyra <l.kostyra@samsung.com>
10 years agoFix python commands used in Makefile and .spec 53/23753/1
Pawel Broda [Fri, 18 Apr 2014 08:12:52 +0000 (10:12 +0200)]
Fix python commands used in Makefile and .spec

[Bug/Feature]   Fix python commands used in Makefile and .spec
                in order to make it working with python3.3.
[Cause]         N/A
[Solution]      N/A
[Verification]  Install and run on a host PC (follow README).

Change-Id: I4c718ca8101b96ae72c29d63b8360a7ced3f8122
Signed-off-by: Lukasz Kostyra <l.kostyra@samsung.com>
10 years agoBuild repo as an RPM package. 52/23752/1
Pawel Broda [Thu, 10 Apr 2014 09:29:16 +0000 (11:29 +0200)]
Build repo as an RPM package.

[Bug/Feature]   Add .spec file to build this repo as an RPM package.
                Add Makefile to make installation possible on OSes
                different that Tizen.
                Reorganize dirs/files structure.
                Provide compatibility with python3.3.
                Add README.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build and install on host PC. Run installed scripts.

Change-Id: Iab93d028ce1a9e7223e823ad9d406b9bce74b98b
Signed-off-by: Lukasz Kostyra <l.kostyra@samsung.com>
10 years agoFix setup.py script to allow calling it from different localizations 51/23751/1
Pawel Broda [Wed, 9 Apr 2014 13:34:24 +0000 (15:34 +0200)]
Fix setup.py script to allow calling it from different localizations

[Bug/Feature]   N/A
[Cause]         it was possible to call setup.py script only
                from the dir where it was placed.
[Solution]      modify setup.py script.
[Verification]  run script setup.py from few different
                localizations (even on your host PC).

Change-Id: If23bc006e6169bf06c721303f37314101794599e
Signed-off-by: Lukasz Kostyra <l.kostyra@samsung.com>
10 years agoRepo cleaning up 50/23750/1
Pawel Broda [Fri, 4 Apr 2014 11:52:57 +0000 (13:52 +0200)]
Repo cleaning up

[Bug/Feature]  Cleaning up .xml config files.
               Updating .ks files.
               Removing unused tests directory.
[Cause]        N/A
[Solution]     N/A
[Verification] Build complete image using image_creator.
               Flash target with it.

Change-Id: I77da1ee953eab77f6cfe190487b4fc16be728ce1
Signed-off-by: Lukasz Kostyra <l.kostyra@samsung.com>
10 years agoShifting uid/gid values of files in given directory 49/23749/1
Pawel Broda [Fri, 4 Apr 2014 08:24:06 +0000 (10:24 +0200)]
Shifting uid/gid values of files in given directory

[Feature]       Script for shifting uid/gid values.
[Cause]         Required by user namespace (i.e. without it
                it is not possible to use security containers
                with user namespace turned on).
[Solution]      N/A
[Verification]  Run create_image.py script and check, if uid/gid
                of the files within containers directories are shifted.
                Run pep8 with '--ignore=E501'

Change-Id: Ia6fb6a21e9f37656221caab49bf57f3182fbbfa8
Signed-off-by: Lukasz Kostyra <l.kostyra@samsung.com>
10 years agoReorganize domain-image-utils repository 48/23748/1
Lukasz Kostyra [Tue, 1 Apr 2014 09:27:59 +0000 (11:27 +0200)]
Reorganize domain-image-utils repository

[Feature]       * Add packaging with Python
                * Create image_utils_common package
                * Move code which will be reused often to avoid code duplication
[Cause]         N/A
[Solution]      N/A
[Verification]  Already existing utils should work as they worked before.

Change-Id: If4ac8613fe973dc757428b0fa6bb50ecfb4aa1ed
Signed-off-by: Lukasz Kostyra <l.kostyra@samsung.com>
10 years agoIntroducing Domain Image Creator 47/23747/1
Pawel Broda [Fri, 28 Mar 2014 09:35:07 +0000 (10:35 +0100)]
Introducing Domain Image Creator

[Feature]      Initial version of Domain Image Creator. It allows building
               custom images (combination of host and guest(s)) based on .xml
               configuration files (using 'mic'as backend).
[Cause]        N/A
[Solution]     N/A
[Verification] Run create_image.py script to get tizen image. Flash
               a target with it. Check code with pep8 (with --ignore=E501)

Change-Id: I6655090459295dcd53f48c0c403c2c58c7b2a9ea
Signed-off-by: Lukasz Kostyra <l.kostyra@samsung.com>
10 years agoInitial commit
Łukasz Stelmach [Tue, 1 Jul 2014 15:46:02 +0000 (17:46 +0200)]
Initial commit

Change-Id: I48bd9e516a93960a743e38bd0629cb35674877ae