platform/upstream/mic.git
8 years agoduplicate locale setting under /etc/locale.conf
Gui Chen [Thu, 8 May 2014 06:21:07 +0000 (02:21 -0400)]
duplicate locale setting under /etc/locale.conf

to be compatible with systemd and system V, /etc/sysconfig/i18n and /etc/locale.conf are both existed

Fixes: #1745

Change-Id: I4d508d506161371765cfab6821da9a61223493ef
Signed-off-by: Gui Chen <gui.chen@intel.com>
8 years agoRaise exception if fail to extract archived file
Huanhuan Li [Wed, 7 May 2014 06:47:36 +0000 (14:47 +0800)]
Raise exception if fail to extract archived file

It's meaningless to return the value if the source archive name exists

Change-Id: Ifc06a09243c56d6035ef233debd9267f053669e0

8 years agomore check before extracting archive
Huanhuan Li [Wed, 7 May 2014 05:38:00 +0000 (13:38 +0800)]
more check before extracting archive

Change-Id: Ieca43aa54cd384392b288aadd66c3e443eaca701

8 years agomore check before making archive
Gui Chen [Tue, 6 May 2014 10:43:08 +0000 (06:43 -0400)]
more check before making archive

Change-Id: I5a205a06d354e559e7c62767661738a59585788b
Signed-off-by: Gui Chen <gui.chen@intel.com>
8 years agoAdd two output info to avoid duplicat "Checking filesystem"
Sun Lihong [Tue, 6 May 2014 10:08:44 +0000 (18:08 +0800)]
Add two output info to avoid duplicat "Checking filesystem"

"loop", "liveusb", "livecd" image creation logs all have duplicate
info of "Checking filesystem", add more info to avoid misunderstanding.

Change-Id: I416e71cd312ae5cad23468bb2d7d191358bf4309

8 years agoFix pylint tips
Huanhuan Li [Mon, 21 Apr 2014 06:52:55 +0000 (14:52 +0800)]
Fix pylint tips

Change-Id: Ic0805cc13abc16afd1881c7513edf2f9f980d0fc
C: 58,0: Line too long (87/80)
W: 20,24: Redefining built-in 'id'
C:  1,0: Missing docstring
C: 11,4: Invalid name "version" for type constant (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 13,4: Invalid name "version" for type constant (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
W: 26,8: No exception type(s) specified
C: 20,13: Invalid name "dist" for type constant (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 20,19: Invalid name "ver" for type constant (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 20,24: Invalid name "id" for type constant (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 43,0: Invalid name "prefix" for type constant (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 45,0: Invalid name "root" for type constant (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 47,0: Invalid name "conffile" for type constant (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 49,0: Invalid name "conf_str" for type constant (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 50,0: Invalid name "conf_str" for type constant (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)

8 years agotypo fix
Gui Chen [Tue, 6 May 2014 07:06:43 +0000 (03:06 -0400)]
typo fix

Change-Id: I0bc9288562694f3a12bb6cf46ffa5c0cadebd236
Signed-off-by: Gui Chen <gui.chen@intel.com>
8 years agoarchive.py: refine extract_archive to extract tarball file
Gui Chen [Sat, 26 Apr 2014 04:23:30 +0000 (00:23 -0400)]
archive.py: refine extract_archive to extract tarball file

Change-Id: I5af9f17de9d1ac5d12bf1706ce7609ea4c4e201f
Signed-off-by: Gui Chen <gui.chen@intel.com>
8 years agoarchive.py: auto detect format in decompression and refine get_xxx_formats/get_xxx_su...
Gui Chen [Sat, 26 Apr 2014 04:03:35 +0000 (00:03 -0400)]
archive.py: auto detect format in decompression and refine get_xxx_formats/get_xxx_suffixes

it will detect the format automatically when decompressing
add get_compress_suffixes to list all supported suffixes in compression
clear get_compress_formats
clear get_archive_formats

Change-Id: I1fb2117e4b04c382836b81760bb423cc62f2fd5e
Signed-off-by: Gui Chen <gui.chen@intel.com>
8 years agoavoid to compress/decompress a non-file object
Gui Chen [Fri, 25 Apr 2014 06:13:28 +0000 (02:13 -0400)]
avoid to compress/decompress a non-file object

Change-Id: I0c43f449175325ba9314e56151a822b3aee0ec21
Signed-off-by: Gui Chen <gui.chen@intel.com>
8 years agoPylint warnings.
Sun Lihong [Wed, 30 Apr 2014 07:01:31 +0000 (15:01 +0800)]
Pylint warnings.

C:139,8:Zypp._zyppQueryPackage: Comma not followed by a space
        query.addAttribute(zypp.SolvAttr.name,pkg)
                                             ^^
C:146,8:Zypp._splitPkgString: Comma not followed by a space
        sp = pkg.rsplit(".",1)
                           ^^
C:213,12:Zypp.selectPackage: Comma not followed by a space
            q.addAttribute(zypp.SolvAttr.name,pattern)
                                             ^^
C:217,12:Zypp.selectPackage: Comma not followed by a space
            q.addAttribute(zypp.SolvAttr.name,name)
                                             ^^
C:221,12:Zypp.selectPackage: Comma not followed by a space
            q.addAttribute(zypp.SolvAttr.name,pkg)
                                             ^^
W: 19,0: Unused import sys
W: 35,0: Unused import BaseImageCreator
W: 20,0: Unused import re

Change-Id: Ie6bdff4de495e93b0dd534c276cb77d5270db114

Conflicts:
plugins/imager/raw_plugin.py

8 years agoPylint error of partitionedfs.py and proxy.py
Sun Lihong [Fri, 18 Apr 2014 09:04:52 +0000 (17:04 +0800)]
Pylint error of partitionedfs.py and proxy.py

C: 44,8:unset_proxy_environ: Operator not preceded by a space
        ENV=env.upper()
           ^
C: 44,8:unset_proxy_environ: Invalid name "ENV" (should match [a-z_][a-z0-9_]{2,30}$)
C: 77,4:_ip_to_int: Operator not preceded by a space
    ipint=0
         ^
C: 78,4:_ip_to_int: Operator not preceded by a space
    shift=24
C: 85,4:_int_to_ip: Operator not preceded by a space
    ipaddr=""
          ^
C: 86,4:_int_to_ip: Operator not preceded by a space
    shift=0
         ^
C:111,12:_set_noproxy_list: Comma not followed by a space
            _my_noproxy_list.append({"match":0,"needle":item})
                                              ^^
C:115,12:_set_noproxy_list: Comma not followed by a space
            _my_noproxy_list.append({"match":1,"needle":item})
                                              ^^
C:127,16:_set_noproxy_list: Invalid name "ip" (should match [a-z_][a-z0-9_]{2,30}$)
C:129,16:_set_noproxy_list: Operator not preceded by a space
                shift=24
                     ^
C:130,16:_set_noproxy_list: Operator not preceded by a space
                netmask=0
                       ^
C:136,12:_set_noproxy_list: Comma not followed by a space
            _my_noproxy_list.append({"match":2,"needle":ip,"netmask":netmask})

Change-Id: Iaf24729b3231b9f313af333fe58096d234d3e515

8 years agoadd _do_tar and _do_untar to utilize 'tar' command
Gui Chen [Fri, 25 Apr 2014 06:04:46 +0000 (02:04 -0400)]
add _do_tar and _do_untar to utilize 'tar' command

Change-Id: Iefc0ca78636e07ffe125560c3336031c5be4f9fb
Signed-off-by: Gui Chen <gui.chen@intel.com>
8 years agoclean up unused code
Gui Chen [Wed, 23 Apr 2014 08:43:41 +0000 (04:43 -0400)]
clean up unused code

Change-Id: I483e4253437a3fa9905ff354f7739b15f71ec2c2
Signed-off-by: Gui Chen <gui.chen@intel.com>
Conflicts:
mic/utils/misc.py

8 years agoadd rewritten moudle archive to handle archiving and compressing
Gui Chen [Wed, 23 Apr 2014 08:33:06 +0000 (04:33 -0400)]
add rewritten moudle archive to handle archiving and compressing

Change-Id: I9fd94ca3b3d3460ecb2af618baa329f04a6a3bfb
Signed-off-by: Gui Chen <gui.chen@intel.com>
8 years agoswitch to use new archive module
Gui Chen [Wed, 23 Apr 2014 08:37:30 +0000 (04:37 -0400)]
switch to use new archive module

Change-Id: Ibe1f956b178952f150b4d2285d3642dc73a06bb5
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agotypo fix
Huanhuan Li [Mon, 31 Mar 2014 06:31:22 +0000 (14:31 +0800)]
typo fix

Change-Id: Id8a274534f299381453dda400308a1073c6f4b99

10 years agoGenerate manifest file
Huanhuan Li [Fri, 21 Mar 2014 09:51:49 +0000 (17:51 +0800)]
Generate manifest file

The manifest file stores important infomation such as image file name,
package format, compress format, partitions or disks. So when another program
want to parse image files, it can get the infomation more easily by reading
manifest file. There are two important kinds of format, see bellow:
loop:
   {
       "format": "loop",
       "version": "0.24",
       "loop": {
           "image_files": [
               "whole_rd_210-201403211800.tar.gz"
           ],
           "pack": ".tar.gz",
           "partitions": {
              "/opt": "data",
              "/opt/usr": "ums",
              "/": "platform"
          }
      },
      "created": "2014-03-21 18:02:07"
  }
raw:
   {
       "raw": {
          "image_files": [
               "ivi-201403211803-sda.raw.bz2",
               "ivi-201403211803-sdb.raw.bz2"
           ],
           "disks": [
               "sda",
               "sdb"
          ],
          "compress": "bz2",
          "sda": {
              "image": "ivi-201403211803-sda.raw.bz2",
              "bmap": "ivi-201403211803-sda.bmap"
          },
          "sdb": {
              "image": "ivi-201403211803-sdb.raw.bz2",
              "bmap": "ivi-201403211803-sdb.bmap"
          }
      },
      "format": "raw",
      "version": "0.24",
      "created": "2014-03-21 18:06:10"
  }
Change-Id: Ie9682bad79337319d1c1e6534b3cd4db25271124
Fixes: #1583

10 years agohandle not found exception
Gui Chen [Thu, 6 Mar 2014 06:12:53 +0000 (01:12 -0500)]
handle not found exception

Change-Id: Id4a3d99da61bac50be02bee1213d38ea70b4c4ec
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoremove dash in debian version
Gui Chen [Wed, 12 Mar 2014 06:18:09 +0000 (02:18 -0400)]
remove dash in debian version

Change-Id: I41d35391cf292abf0537833bce200a786b18fad5
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agobump up to 0.24
Gui Chen [Wed, 12 Mar 2014 02:19:11 +0000 (22:19 -0400)]
bump up to 0.24

Change-Id: I83e7b595fb6e0895d1c54569e30510d3a15192ea
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agobump up to 0.24-rc1
Gui Chen [Tue, 11 Mar 2014 10:00:37 +0000 (06:00 -0400)]
bump up to 0.24-rc1

Change-Id: Ia819fc5e63b69b5e4b0b7f2d174cd95f1243e9a1
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agofix ssl conection caused by wrong paramter in zypp query
Gui Chen [Thu, 6 Mar 2014 06:27:45 +0000 (01:27 -0500)]
fix ssl conection caused by wrong paramter in zypp query

Change-Id: If3e17df6c15e81827e69e36c3409d1b03dada946
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agofix includepkgs and excludepkgs lost during translating
Gui Chen [Thu, 6 Mar 2014 03:38:25 +0000 (22:38 -0500)]
fix includepkgs and excludepkgs lost during translating

Change-Id: Ia34191428f3dd99cd596aa4520e18a29a839edfc
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoAdd unit test for proxy
Huanhuan Li [Thu, 22 Aug 2013 23:11:09 +0000 (07:11 +0800)]
Add unit test for proxy

Change-Id: Ic3f5567df03125ef28ca96e16b23869996a6d6ed

10 years agofix obsoletes ignored version issue
Gui Chen [Wed, 5 Mar 2014 05:32:31 +0000 (00:32 -0500)]
fix obsoletes ignored version issue

Fixes: #1382

Change-Id: I663a80703ba02091f87fa9aca23be9ec5ba0d1b9
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agofix local repository failed to perform urlgrabber
Gui Chen [Wed, 5 Mar 2014 05:58:56 +0000 (00:58 -0500)]
fix local repository failed to perform urlgrabber

Change-Id: I80873c643d207b348c77057c600ce20c6797b3d7
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoRaise exception if fail to install mic-bootstrap
Huanhuan Li [Thu, 27 Feb 2014 07:08:36 +0000 (15:08 +0800)]
Raise exception if fail to install mic-bootstrap

When installing rpm, only None means install rpm successfully,
so raise exception if not
Fixes: #1564

Change-Id: I09bbb39f68eff72a4769e9732c5ab505cdef8313

10 years agochange tizen-python-zypp to python-zypp-tizen
Gui Chen [Tue, 4 Mar 2014 07:46:10 +0000 (02:46 -0500)]
change tizen-python-zypp to python-zypp-tizen

Change-Id: I78c8c9f3bdadd4cb49b4dd6cecf8ccfb8e34a36c
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoimplement '--repo' option and '--ignore-ksrepo'
Gui Chen [Thu, 13 Feb 2014 05:12:12 +0000 (00:12 -0500)]
implement '--repo' option and '--ignore-ksrepo'

option '--repo' is to append a new repo to repo pool, like
  --repo "name=main;baseurl=http://repo"
option '--ignoe-ksrepo' is to ignore repos in ks file, only valid when '--repo' used

Change-Id: I38586f2e587904e0f4fe2d901597f7231a248b97
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoadd two new options '--repo' and '--ignore-ksrepo'
Gui Chen [Thu, 13 Feb 2014 04:06:18 +0000 (23:06 -0500)]
add two new options '--repo' and '--ignore-ksrepo'

option '--repo' is to append a new repo to repo pool
option '--ignore-ksrepo' is to ignore repos in ks file

Change-Id: I10280f0c3f40b2f68186240f3694d2eb14104e10
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agosleep earlier to prepare loop device creation
Gui Chen [Tue, 4 Mar 2014 06:33:06 +0000 (01:33 -0500)]
sleep earlier to prepare loop device creation

Fixes: #1646

Change-Id: If8e4fbe27e9320abf203eca82de6666271b00f86
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoFix zypp fail to download packages
Huanhuan Li [Mon, 3 Mar 2014 07:03:11 +0000 (15:03 +0800)]
Fix zypp fail to download packages

If we changed all configuration in '/etc/mic/mic.conf' to other dirs
like '/home/build/xx' instead of '/var/tmp/xx', mic wouldn't mount
or create '/var/tmp' any more, then it would result in zypp can't download
packages, becuase zypp will use '/var/tmp' to build cache as default

Fixes: #1623

Change-Id: I6f69c4a6f9655f70d3cbfa6670756255bca171a4

10 years agopackaging: use gbp packaging service
Gui Chen [Thu, 27 Feb 2014 05:51:03 +0000 (00:51 -0500)]
packaging: use gbp packaging service

Change version in debian/changelog to Debian source package format "1.0
native".

Change-Id: I6a4017a814cb04a808389e9b11851ce49e8765e0
Signed-off-by: Gui Chen <gui.chen@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agouse nametuple to represent repo info
Gui Chen [Thu, 13 Feb 2014 06:54:47 +0000 (01:54 -0500)]
use nametuple to represent repo info

Change-Id: I9e3268ce91bd60739172520756790712085e0e04
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoFix duplicate log shows when run mic with 'yum'
Huanhuan Li [Wed, 25 Sep 2013 05:38:41 +0000 (13:38 +0800)]
Fix duplicate log shows when run mic with 'yum'

Fixes: #1585

Change-Id: Ie5b39b055198b3f023819993b56a4dfc6c92e8dc

10 years agoShow hostname in log
Sun Lihong [Thu, 27 Feb 2014 02:17:24 +0000 (10:17 +0800)]
Show hostname in log

Show hostname before distro info in log.

Fixes: #1644

Change-Id: Ibb9bdfa8bd1920084fbcdcec7a233102aeda0762

10 years agoBmap: sync with the latest bmap-tools
Artem Bityutskiy [Wed, 22 Jan 2014 08:04:06 +0000 (10:04 +0200)]
Bmap: sync with the latest bmap-tools

This patch syncs MIC's copy of BmapCreate with the latest contents of the
bmap-tools project. The reason for syncing is to fix DEVT-139. The bugreport
tells that MIC cannot generate the bmap file when the image resides on tmpfs.
And now this is fixed.

We also re-named the Fiemap module to Filemap, because now this module supports
both FIEMAP ioctl and the SEEK_HOLE method. Here is some more description from
the bmap-tools release notes.

"
Make 'bmaptool create' (and hence, the BmapCreate module) work with the
"tmpfs" file-system. This file-system does not, unfortunately, support the
"FIEMAP" ioctl, but it supports the "SEEK_HOLE" option of the "lseek" system
call, which can also be used to find where the holes are. In this release we
have implemented support for "SEEK_HOLE" to cover tmpfs. Generally, FIEMAP
is faster than "SEEK_HOLE" for large files, so we always try to start with
using FIEMAP, and if it is not supported, we fall-back to using "SEEK_HOLE".
Therefore, the "Fiemap" module was re-named to "Filemap", since it is now
supports more than just the FIEMAP ioctl.

Unfortunately, the SEEK_HOLE method requires the directory where the image
resides to be accessible for writing, because in current implementation we
need to create a temporary file there for a short time. The temporary file
is used to detect whether SEEK_HOLE is really implemented, or the system
just fakes it by always returning EOF.
"

Change-Id: I75522cab3c32c9b0879967f8fa2587c71bae0395
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
10 years agoFix chroot failure caused by out-of-disk-space error.
Xiaoning Zhu [Wed, 15 Jan 2014 05:39:30 +0000 (13:39 +0800)]
Fix chroot failure caused by out-of-disk-space error.

If there is no space left on loop device, creation of mount points
will fail. In this case, mic will catch and ignore this failure.
Mic make its best effort to chroot.

Fix: #701

Change-Id: Ifb7666ec27f8bdb560983a9966ef171cb2a8a14b
Signed-off-by: Xiaoning Zhu <xiaoning.zhu@intel.com>
10 years agoFix a bug that raise AttributeError.
Huang Hao [Tue, 14 Jan 2014 04:43:14 +0000 (12:43 +0800)]
Fix a bug that raise AttributeError.

When download attachment packages by using yum pkgmgr, the url
variable below is a unicode instead of SafeURL object.

Traceback (most recent call last):
......
  File "/home/huanghao/workspace/mic/plugins/imager/loop_plugin.py", line 127, in do_create
    creator.install()
  File "/usr/local/lib/python2.7/dist-packages/mic/imager/baseimager.py", line 1051, in install
    self.__attachment_packages(pkg_manager)
  File "/usr/local/lib/python2.7/dist-packages/mic/imager/baseimager.py", line 966, in __attachment_packages
    fpath = grabber.myurlgrab(url.full, fpath, proxies, None)
AttributeError: 'unicode' object has no attribute 'full'

Change-Id: Ib5c03ef053b8cf22f1b8ef1868ad244427df7cc6

10 years agokickstart: remove old installerfw keywords
Artem Bityutskiy [Wed, 15 Jan 2014 11:45:05 +0000 (13:45 +0200)]
kickstart: remove old installerfw keywords

The story: the installer framework keyword in KS files originally was
"installerfw", and the keyword for the first plugin was "extlinux". However,
we realized that this is bad naming, and commit changed the names in commit
'0bafaa1b31a0 kickstart: add an alias for installerfw'. That commit preserved
the old name as aliases for compatibility reasons. And added scary warnings
which are printed when the old names are used.

The only user user of the old names was Tizen IVI, and it stopped using them
very long time ago. Now it uses the new 'installerfw_plugins' and 'bootloader'
keywords instead.

So it is time to kill the old keywords completely and clean the code up. And
this is exactly what this patch does.

Change-Id: I23ef6c5850744734816974233229cf99fca05f38
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
10 years agofix single ip ignored in no proxy setting
Gui Chen [Tue, 14 Jan 2014 05:44:04 +0000 (00:44 -0500)]
fix single ip ignored in no proxy setting

Fixes: #1569

Change-Id: Ic40c32ceaed78e59947af7f185e00e84ccbb30b8
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoFix --pkgmgr=yum does not use cached download packages
Huanhuan Li [Tue, 20 Aug 2013 23:49:12 +0000 (07:49 +0800)]
Fix --pkgmgr=yum does not use cached download packages

Change-Id: I81fba9c393a7fd13b0ce22c5c9e8027fa14bf315
Fixes: #1547

10 years agobaseimager: do not add noatime mount option
Artem Bityutskiy [Mon, 30 Dec 2013 16:07:51 +0000 (18:07 +0200)]
baseimager: do not add noatime mount option

Stop adding "noatime" to the INSTALLERFW_PARTx_FSOPTS installer framework
variable, because it is up to the plugin to decide which mount options to add.
MIC should not try to add own.

Change-Id: I4b9e8f0f61b2777e0ee6bdcd96728b21913eaf0c
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
10 years agoRewrite SafeURL class without using zypp.Url
Huang Hao [Tue, 31 Dec 2013 04:19:53 +0000 (12:19 +0800)]
Rewrite SafeURL class without using zypp.Url

Since SafeURL implementation depends on lib zypp which provided
by python-zypp package. This package will not be installed when
only install "mic" package instead of "mic-native". Then import
zypp will raise exception of "No module named _zypp".

Change-Id: If8232b0ee77166eadc04f016cd2cda722c7ff23e
Fixed: 1568

10 years agoAdd --user/--passwd to repo command in KS.
Huang Hao [Tue, 17 Dec 2013 06:05:17 +0000 (14:05 +0800)]
Add --user/--passwd to repo command in KS.

If there are special characters like '@' in repo url, it can be
set by --passwd option in plain text format.

Also refactor MicRepo_data and MicRepo classes to extend from
F14_Repo, so we don't have to add --proxy ourself.

Fix: 1542

Change-Id: Ic9078a7313e14bd0959fd1676994cf5761e04c44

10 years agoSupport encode form of baseurl for repo directive.
Huang Hao [Thu, 5 Dec 2013 05:25:51 +0000 (13:25 +0800)]
Support encode form of baseurl for repo directive.

If user has special characters like '@' in his/her password, it
can be write as encode form embeded into url. By using zypp.Url
class which is already support encoded password, it by default
hide password part, so we also gain the feature that password
won't be printed to console.

Fix: 1499

Change-Id: I4243f36df491cb6eb80f04334962a2ed6030acbe

10 years agobaseimager: remove INSTALLERFW_DISTRO_NAME
Artem Bityutskiy [Sat, 21 Dec 2013 12:27:15 +0000 (14:27 +0200)]
baseimager: remove INSTALLERFW_DISTRO_NAME

Stop exporting the INSTALLERFW_DISTRO_NAME because it is harful if installer
framework plugins start using it instead of taking the data from
/etc/os-release.

Change-Id: Ibcedbe4c35416087a0edf64b128fef9942524a67
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
10 years agoMerge "try to wait mapper device setting up" into devel
Gui Chen [Wed, 18 Dec 2013 05:25:54 +0000 (07:25 +0200)]
Merge "try to wait mapper device setting up" into devel

10 years agotry to wait mapper device setting up
Gui Chen [Wed, 18 Dec 2013 03:04:18 +0000 (22:04 -0500)]
try to wait mapper device setting up

Change-Id: I512f10e2437b0023db2112854f57e621e26eaf20
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agofix qemu depends for ubuntu
Gui Chen [Fri, 13 Dec 2013 08:30:40 +0000 (03:30 -0500)]
fix qemu depends for ubuntu

Change-Id: I92657bc67e7aa393bacf712b84962b9becf2223d
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agofix inconsistent qemu emulator path and qemu handler
Zhang Qiang [Tue, 17 Dec 2013 02:04:55 +0000 (10:04 +0800)]
fix inconsistent qemu emulator path and qemu handler

Change-Id: I4d3a36312702622191bb188665cfe0e157a56d05

10 years agoremove EULA check
Gui Chen [Mon, 16 Dec 2013 06:12:09 +0000 (01:12 -0500)]
remove EULA check

this EULA (End User Licence Agreemnt) is not neccessary now,
remove it to clean up the code

Change-Id: I300e494992e355c1bff811fba3dd7744733fab67
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agobump up to version 0.23-0.rc1
Gui Chen [Fri, 13 Dec 2013 07:50:52 +0000 (02:50 -0500)]
bump up to version 0.23-0.rc1

Change-Id: I2010025d7711c198c7169617badf1b857f84fc84
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoclean up and refine all the docs in git
JF Ding [Tue, 19 Nov 2013 02:09:06 +0000 (10:09 +0800)]
clean up and refine all the docs in git

Break the long lines, remove the deprecated content, etc.

BTW, other minor changes include:
* move the cmdln completion scripts to more proper places
* file permission checking

Change-Id: I063d99119156b45279a387c24280723ae70f4eb2
Signed-off-by: Jianfeng Ding <jian-feng.ding@intel.com>
10 years agoupdate known issues
Gui Chen [Thu, 12 Dec 2013 10:32:51 +0000 (05:32 -0500)]
update known issues

Change-Id: If85301290cfec73685e428af3dddc79bccedcc6e
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agouse different qemu handler for arm and aarch64
Zhang Qiang [Fri, 13 Dec 2013 04:48:21 +0000 (12:48 +0800)]
use different qemu handler for arm and aarch64

Change-Id: Ida55fa669d464a452ee822705dc9813aa8b71629

10 years agodepend on new version of python-zypp to support aarch64
Zhang Qiang [Thu, 12 Dec 2013 09:58:27 +0000 (17:58 +0800)]
depend on new version of python-zypp to support aarch64

Change-Id: I99082b6c41495c1f4a1078f5dde29171d0a30223

10 years agoMerge "AArch64(arm64) support" into devel
Gui Chen [Thu, 12 Dec 2013 10:29:05 +0000 (12:29 +0200)]
Merge "AArch64(arm64) support" into devel

10 years agoMerge "fix debian packaging" into devel
Gui Chen [Thu, 12 Dec 2013 10:28:48 +0000 (12:28 +0200)]
Merge "fix debian packaging" into devel

10 years agoAArch64(arm64) support
Gui Chen [Wed, 11 Dec 2013 08:24:15 +0000 (03:24 -0500)]
AArch64(arm64) support

Change-Id: I059b8423b47c67d054c4c78ce507fffd159bd14e
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agofix debian packaging
Gui Chen [Thu, 12 Dec 2013 02:28:36 +0000 (21:28 -0500)]
fix debian packaging

Change-Id: Ie8e467621e0648144488e5ee62f283f0d1b37483
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoMerge "check if mic-native installed when running native mode" into devel
Gui Chen [Wed, 11 Dec 2013 08:30:24 +0000 (10:30 +0200)]
Merge "check if mic-native installed when running native mode" into devel

10 years agoMerge "fix right install location in debian packaging" into devel
Gui Chen [Wed, 11 Dec 2013 08:03:45 +0000 (10:03 +0200)]
Merge "fix right install location in debian packaging" into devel

10 years agocheck if mic-native installed when running native mode
Gui Chen [Thu, 5 Dec 2013 07:57:34 +0000 (02:57 -0500)]
check if mic-native installed when running native mode

Change-Id: I48500314b2f7de0187beb92b7ec8877d9874dc36
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoMerge "show more details for mounting failure" into devel
Gui Chen [Wed, 11 Dec 2013 07:58:23 +0000 (09:58 +0200)]
Merge "show more details for mounting failure" into devel

10 years agofix right install location in debian packaging
Gui Chen [Thu, 5 Dec 2013 08:45:56 +0000 (03:45 -0500)]
fix right install location in debian packaging

Change-Id: If6a75da2e5b838fd384c460745438c7d289e6f08
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoutils/gpt_parser.py: fix partitions names
Artem Bityutskiy [Mon, 9 Dec 2013 10:23:36 +0000 (12:23 +0200)]
utils/gpt_parser.py: fix partitions names

This patch fixes https://bugs.tizen.org/jira/browse/TIVI-1727.

The problem is that we are using 'UTF-16' encoder name, and it adds BOM
(http://en.wikipedia.org/wiki/Byte_order_mark#UTF-16), and BOM breaks
tools like parted.

The GPT spec says that the partition name is UCS-16 Little Endian, so fix this
by using 'UTF-16LE' instead, which will not add BOM.

I've verified that this fixes TIVI-1727 indeed.

Change-Id: If2fff219177bed877873512457b6355dd0118011
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
10 years agoshow more details for mounting failure
Gui Chen [Thu, 5 Dec 2013 05:33:32 +0000 (00:33 -0500)]
show more details for mounting failure

Fixes: #1440

Change-Id: Ib1b809f36db6b29997a67002442b47c3901843be
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoadd options --interactive/--non-interactive
Gui Chen [Thu, 5 Dec 2013 02:47:58 +0000 (21:47 -0500)]
add options --interactive/--non-interactive

this option pair can enable/disable interactive output

Fixes: #1243

Change-Id: I57f63aed8406133f9e67c7261fe01975d34195c0
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agofix conflict name
Gui Chen [Thu, 5 Dec 2013 02:09:40 +0000 (21:09 -0500)]
fix conflict name

Change-Id: I9f6c08977f91fff458efd7bec754599671e456d5
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoraise error if failed to download or run bootstrap
Gui Chen [Fri, 29 Nov 2013 06:25:34 +0000 (01:25 -0500)]
raise error if failed to download or run bootstrap

Change-Id: I71eac5ae3b84e66b76a94b29cac79c969129928b
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoraise error if failed to install bootstrap
Gui Chen [Tue, 26 Nov 2013 07:16:44 +0000 (02:16 -0500)]
raise error if failed to install bootstrap

Fixes: #1467

Change-Id: I78d0a207d7902f0c2ae16b31dc33bc2c893da1f7
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agosplit native requirements to native-mic package
Gui Chen [Tue, 26 Nov 2013 06:52:26 +0000 (01:52 -0500)]
split native requirements to native-mic package

Change-Id: I3dda824ac750573b4403e087fff31bc78a3ad29a
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agofix KeyError 'plugin_dir' in conf.create
Gui Chen [Mon, 25 Nov 2013 05:41:15 +0000 (00:41 -0500)]
fix KeyError 'plugin_dir' in conf.create

Change-Id: Ic4ad13938a43540cd934f2b2c48c65433b9b1049
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoCheck for installerfw fstab plugin in BaseImageCreator
Łukasz Stelmach [Thu, 14 Nov 2013 14:13:58 +0000 (15:13 +0100)]
Check for installerfw fstab plugin in BaseImageCreator

Change-Id: I3d2bb9cbcf93f5c3a1974205ee70123b6319f882
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
10 years agoProvide default value for INSTALLERFW_PARTx_FSOPTS
Łukasz Stelmach [Thu, 14 Nov 2013 14:12:13 +0000 (15:12 +0100)]
Provide default value for INSTALLERFW_PARTx_FSOPTS

Change-Id: Ib9b93dc04db41242ed3c4b78425c5ee6c2de2754
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
10 years agoProvide PATH environment variable for scripts
Łukasz Stelmach [Thu, 14 Nov 2013 11:13:01 +0000 (12:13 +0100)]
Provide PATH environment variable for scripts

The default value of PATH environment variable in bash does not comprise
"sbin" directories.

Change-Id: I7a55cf2bc25a7ab3ce067df4161e87a83ad82987
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
10 years agoPut filesystem uuids to parsed ks structures
Łukasz Stelmach [Thu, 14 Nov 2013 14:15:35 +0000 (15:15 +0100)]
Put filesystem uuids to parsed ks structures

Take the uuids generated upon initialisation of DiskMount subclasses
and make them accessible via the parsed ks structure and as
INSTALLERFW_PARTx_UUID variables.

Change-Id: Iea38a403cdd365ef54979073f9a9f53d2b60038d
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
10 years agoAdd an option to pass filesystem uuid
Łukasz Stelmach [Thu, 14 Nov 2013 11:06:19 +0000 (12:06 +0100)]
Add an option to pass filesystem uuid

Introduce a new option for the "part" command to set the filesystem uuid.

Change-Id: I20fcc0dfde2c56d03433c37d905cf52c98f4254d
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
10 years agoConfigure paths with MIC_LIBRARY_PATH and MIC_PLUGIN_DIR
Łukasz Stelmach [Tue, 12 Nov 2013 09:29:58 +0000 (10:29 +0100)]
Configure paths with MIC_LIBRARY_PATH and MIC_PLUGIN_DIR

Enable passing location of mic files via environment variables:
MIC_LIBRARY_PATH and MIC_PLUGIN_DIR to override values that are either
hardcoded (MIC_LIBRARY_PATH) or set in the global configuration file.

Change-Id: I601b06ba0e7953ba3882511af811a6f8cefa3585
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
10 years agofix not defined 'errors' in runner.py
Gui Chen [Thu, 21 Nov 2013 02:59:19 +0000 (21:59 -0500)]
fix not defined 'errors' in runner.py

Change-Id: I19199611a80ddde3dde63d1821712f0a7a5e45d1
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agointernal setarch according to bootstrap environment
Gui Chen [Tue, 19 Nov 2013 02:25:32 +0000 (21:25 -0500)]
internal setarch according to bootstrap environment

when using 'uname -m' in bootstrap, it always shows
the arch from the physical host. but what needs is
the internal arch, so mic needs detect the binary
arch first, then setarch properly

Change-Id: I907f5442b11690dc624c7d3ae23c858804c802f0
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agomore check for commit 9f5f5cfc38e735b7abcf9e11e0969fc4554ebcdc
Gui Chen [Mon, 4 Nov 2013 05:48:05 +0000 (00:48 -0500)]
more check for commit 9f5f5cfc38e735b7abcf9e11e0969fc4554ebcdc

Change-Id: Id61d09a4740719cb9ae1d5d167eaede63eb99ae9
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoraw.py: create device nodes to access own disk
Artem Bityutskiy [Fri, 27 Sep 2013 12:59:44 +0000 (15:59 +0300)]
raw.py: create device nodes to access own disk

This patch creates loop-back devices in /dev of the image so that it would be
possible to access own disk from within chroot environment. This makes it
possible to install extlinux from chroot, not outside of chroot, as it is done
now. This also allows to do extlinux installation in an installer framework
plugin.

I do realize that this is not the most beautiful thing to do, but it works - I
have a script which installs extlinux when I run it from %post.

Change-Id: I2b14962a37524a15c5dc493572ae8e91ca8523ae
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
10 years agoadd 'device_mapper' key for partition to store real dm node
Gui Chen [Mon, 4 Nov 2013 05:40:09 +0000 (00:40 -0500)]
add 'device_mapper' key for partition to store real dm node

key 'device' for partition is for the link device, like /dev/loop01
key 'device_mapper' for partition is for the real device, like /dev/mapper/loop0p1

Change-Id: I6a5962cbe98cc111b942fd6e314de719324b6f04
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoupdate faq
Gui Chen [Wed, 30 Oct 2013 03:07:08 +0000 (23:07 -0400)]
update faq

Change-Id: I284710520f7d00fcd0f0978ff89313f14411d471
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agofix requires: python-urlgrabber
Gui Chen [Fri, 1 Nov 2013 05:48:26 +0000 (01:48 -0400)]
fix requires: python-urlgrabber

Change-Id: Id17c71ec1b05234db1c625d13f64b8954a3ff9de
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agomic/msger.py: fix pylint
Gui Chen [Tue, 22 Oct 2013 06:55:40 +0000 (02:55 -0400)]
mic/msger.py: fix pylint

Change-Id: I4c19dd78b1f3187452b8cfa79191a942f48d01d7
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoraise error instead of msger.error
Gui Chen [Tue, 22 Oct 2013 03:43:42 +0000 (23:43 -0400)]
raise error instead of msger.error

mic uses too many msger.error to exit the program directly,
it's not safe, except main loop, other logic should raise
error as possible

Change-Id: I4fa0c05998b78c3bb9b12148e7dfd6c04bad8251
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agotypo fix
Gui Chen [Tue, 22 Oct 2013 03:46:38 +0000 (23:46 -0400)]
typo fix

Change-Id: Iaebc1aa3ca03c954e5652383468bf14aa7caa010
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoRevert "raw.py: create device nodes to access own disk"
Gui Chen [Wed, 23 Oct 2013 02:45:43 +0000 (22:45 -0400)]
Revert "raw.py: create device nodes to access own disk"

This reverts commit 9f5f5cfc38e735b7abcf9e11e0969fc4554ebcdc.

10 years agobump up to release 0.22
Gui Chen [Tue, 22 Oct 2013 03:02:20 +0000 (23:02 -0400)]
bump up to release 0.22

Change-Id: I2b334d12d225ac9eba572fe02cef022f428ec408
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agobump up version to 0.22-0.rc1
Gui Chen [Mon, 21 Oct 2013 08:30:30 +0000 (04:30 -0400)]
bump up version to 0.22-0.rc1

Change-Id: Iaa4ac83dc7299aef66065f7091646e2da66ca28a
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoraw.py: create device nodes to access own disk
Artem Bityutskiy [Fri, 27 Sep 2013 12:59:44 +0000 (15:59 +0300)]
raw.py: create device nodes to access own disk

This patch creates loop-back devices in /dev of the image so that it would be
possible to access own disk from within chroot environment. This makes it
possible to install extlinux from chroot, not outside of chroot, as it is done
now. This also allows to do extlinux installation in an installer framework
plugin.

I do realize that this is not the most beautiful thing to do, but it works - I
have a script which installs extlinux when I run it from %post.

Change-Id: I911103e2b109d7300611abdc50be873031da8b30
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
10 years agoraw / baseimager: export more installer fw variables
Artem Bityutskiy [Fri, 27 Sep 2013 07:35:44 +0000 (10:35 +0300)]
raw / baseimager: export more installer fw variables

Currently we export the following installer framework variables:

o INSTALLERFW_PARTX_DEVNODE - device nodes for each partition, e.g.,
                              /dev/sdb1

This is the device node corresponding to the partition when the image is run on
the real device.

This patch also adds the following:

o INSTALLERFW_PARTX_DISK_DEVNODE - similar to INSTALLERFW_PARTX_DEVNODE, but
  specifies disk the partition resides on, e.g., /dev/sdb
o INSTALLERFW_PARTX_DEVNODE_NOW - device nodes in the current environment which
  can be used to access the partition from within the current chroot
  environment. E.g., /dev/mapper/loop0p1.
o INSTALLERFW_PARTX_DISK_DEVNODE_NOW - similar to
  INSTALLERFW_PARTX_DEVNODE_NOW, but for the whole disk, e.f., /dev/loop0

The user of these variables is an installer framework plugin which installs
extlinux. It needs to access the whole image to install MBR and the boot
partition disk image to modify the ADV (extlinux does the latter when executed
with -i).

Change-Id: I1808c48f30174f09bb32d59ff4abe26ac6739880
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
10 years agopartitionedfs: save the mapper device path
Artem Bityutskiy [Fri, 27 Sep 2013 07:40:34 +0000 (10:40 +0300)]
partitionedfs: save the mapper device path

For some legacy reasons related to grub, which we do not use, MIC creates
/dev/loopXpY files which are symlinks to the real /dev/mapper/loopXpY device
node files. Then MIC saves the /dev/loopXpY path in the internal data
structure, and drps the mapper device path.

This patch makes MIC also save the /dev/mapper/loopXpY in the internal data
structures for firther use. We'll use it later for creating a copy of device
nodes in the target image. Thede device nodes will be later used by installer
framework plugins.

Change-Id: Ia928669ffd40a8fbda472d2f9d9890053aa94f67
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
10 years agodon't close file description in widely
Gui Chen [Thu, 17 Oct 2013 09:51:45 +0000 (05:51 -0400)]
don't close file description in widely

Change-Id: I30b3986421c86c6b2a427f463f6362f937347bcb
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agoset owner of cachedir and outdir to SUDO_USER
Gui Chen [Wed, 16 Oct 2013 08:56:20 +0000 (04:56 -0400)]
set owner of cachedir and outdir to SUDO_USER

Change-Id: I95236292fad8d4593631e2defc53fb42a08840c0
Signed-off-by: Gui Chen <gui.chen@intel.com>
10 years agorefine the error class module
Gui Chen [Wed, 16 Oct 2013 07:59:03 +0000 (03:59 -0400)]
refine the error class module

Change-Id: I1f619a4bb22d28e3d4c2fead7bf4d28bcce7baf5
Signed-off-by: Gui Chen <gui.chen@intel.com>