; settings for chroot subcommand
[bootstrap1]
-; This bootstrap can be used to create image with rpm 4.8.x
-name=meego-1.2.0
-1.2.0-oss=http://repo.meego.com/MeeGo/releases/1.2.0/repos/oss/ia32/packages/
-1.2.0-tools=http://download.meego.com/live/devel:/tools:/building/MeeGo_1.2.0/
-; 1.2.0-oss_proxy=http://proxy.yourcompany.com:port
-; 1.2.0-tools_proxy=http://proxy.yourcompany.com:port
-
-[bootstrap2]
-; This bootstrap can be used to create image with rpm 4.9.x
-name=meego-trunk
-trunk-oss=http://repo.meego.com/MeeGo/builds/trunk/latest/repos/oss/ia32/packages/
-trunk-tools=http://download.meego.com/live/devel:/tools:/building/Trunk/
-; trunk-oss_proxy=http://proxy.yourcompany.com:port
-; trunk-tools_proxy=http://proxy.yourcompany.com:port
+name=micbootstrap
+bootstrap=http://download.tizen.org/tools/micbootstrap/
+; bootstrap_proxy=http://proxy.yourcompany.com:port
from mic.utils import misc
from mic.utils import errors
-minibase_pkgs = [ "kernel", "rpm", "setup", "filesystem", "basesystem",
- "tzdata", "libgcc", "ncurses-base", "ncurses", "glibc",
- "glibc-common", "ncurses-libs", "nss-softokn-freebl",
- "bash", "zlib", "info", "cpio", "coreutils", "zypper" ]
-
-required_pkgs = [ "pam", "passwd", "meego-release", "nss", "genisoimage",
- "bzip2", "gzip", "perl", "make", "file", "psmisc", "wget",
- "syslinux-extlinux", "btrfs-progs", "satsolver-tools",
- "isomd5sum", "mtd-utils", "mtd-utils-ubi", "libzypp",
- "python-zypp", "grep", "sed", "qemu-arm-static", "mic" ]
+minibase_grps = [ "tizen-bootstrap" ]
+minibase_pkgs = [ ]
+required_pkgs = [ "syslinux", "syslinux-extlinux", "satsolver-tools",
+ "libzypp", "python-zypp", "qemu-arm-static", "mic" ]
def query_package_rpmdb(root='/', tag='name', pattern=None):
rpm.addMacro("_dbpath", "/var/lib/rpm")
rpm.addMacro("__file_context_path", "%{nil}")
+ for grp in minibase_grps:
+ pkg_manager.selectGroup(grp)
for pkg in minibase_pkgs:
pkg_manager.selectPackage(pkg)
for pkg in required_pkgs:
destdir= "%s/etc/zypp/repos.d/" % os.path.abspath(self.rootdir)
shutil.rmtree(destdir, ignore_errors = True)
shutil.copytree(srcdir, destdir)
+ # create '/tmp' in chroot
+ if not os.path.exists(os.path.join(os.path.abspath(self.rootdir), "tmp")):
+ os.makedirs(os.path.join(os.path.abspath(self.rootdir), "tmp"))
msger.info("Bootstrap created.")
help='Path for local pkgs(rpms) to be installed')
optparser.add_option('', '--runtime', type='string',
dest='runtime', default=None,
- help='Specify runtime mode, avaiable: bootstrap')
+ #help='Specify runtime mode, avaiable: bootstrap')
+ help=SUPPRESS_HELP)
# --taring-to is alias to --pack-to
optparser.add_option('', '--taring-to', type='string',
dest='pack_to', default=None,
if self.options.pkgmgr is not None:
configmgr.create['pkgmgr'] = self.options.pkgmgr
+ if self.options.runtime:
+ configmgr.create['runtime'] = self.options.runtime
+
if self.options.pack_to is not None:
configmgr.create['pack_to'] = self.options.pack_to
from mic.conf import configmgr
from mic.utils import errors
import mic.utils.misc as misc
+from mic.utils.proxy import get_proxy_for
+
+BOOTSTRAP_URL="http://download.tizen.org/tools/micbootstrap"
def runmic_in_runtime(runmode, opts, ksfile, argv=None):
- if not runmode or "MeeGo" == linux_distribution()[0]:
+ dist = misc.get_distro()[0]
+ if not runmode or not dist or "MeeGo" == dist:
return
if not argv:
if runmode == 'bootstrap':
msger.info("Use bootstrap runtime environment")
- (name, repostrs) = select_bootstrap(opts['repomd'], opts['cachedir'], opts['bootstrapdir'])
+ name = "micbootstrap"
+ try:
+ repostrs = configmgr.bootstraps[name]
+ except:
+ repostrs = "name:%s,baseurl:%s," (name, BOOTSTRAP_URL)
+ proxy = get_proxy_for(BOOTSTRAP_URL)
+ if proxy:
+ repostrs += "proxy:%s" % proxy
+
repolist = []
if not name:
# use ks repo to create bootstrap
# the hard code path is prepared for bootstrap
def copy_mic(bootstrap_pth, bin_pth = '/usr/bin', lib_pth='/usr/lib', \
- pylib_pth = '/usr/lib/python2.6/site-packages'):
+ pylib_pth = '/usr/lib/python2.7/site-packages'):
# copy python lib files
mic_pylib = get_mic_modpath()
bs_mic_pylib = bootstrap_pth + os.path.join(pylib_pth, 'mic')
os.makedirs(os.path.dirname(bs_mic_cfgpth))
shutil.copy2(mic_cfgpth, bs_mic_cfgpth)
+ # remove yum backend
+ try:
+ yumpth = "/usr/lib/mic/plugins/backend/yumpkgmgr.py"
+ os.unlink(bootstrap_pth + yumpth)
+ except:
+ pass
+
def clean_files(pattern, dir):
if not os.path.exists(dir):
return