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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
Artem Bityutskiy [Mon, 30 Sep 2013 07:33:15 +0000 (10:33 +0300)]
BmapCreate: update to the latest version
Use the latest version of BmapCreate. This version generates bmap format 1.4
which is flexible about the checksum algorighm we use. And the default is now
sha256 instead of sha1.
Change-Id: I7aabdab9747d913368a7890be1bde407009b5cca
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Gui Chen [Wed, 16 Oct 2013 05:45:00 +0000 (01:45 -0400)]
work around to correct counter number of installing packages
when two packages are required by each other, their rpm files
are both opened, but they both enter install progress together,
then they use the same counter number
Change-Id: If0632a485afb6c24ed24c2fb9d839ebb15f6fc57
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Mon, 14 Oct 2013 13:38:37 +0000 (09:38 -0400)]
adapt logfile handler for bootstrap mode
if bootstrap enabled, logfile will append the records
Change-Id: Ic080e5cf9357f41c7dd4d1a2ce8f8c605a3d55e1
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Tue, 24 Sep 2013 08:28:15 +0000 (04:28 -0400)]
rewrite msger module based on logging
this new logging module is fully compatible with the old msger module,
it supports interactive mode, logs the messages with specified levels
to specified stream, can also catch all error messages including the
involved 3rd party modules to the logger, and supports colorized level
name
besides, disable some test suites to pass the Tester
Change-Id: Icecbcd5e6848477a7a6c213f5a95e41396e1fbb0
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Thu, 10 Oct 2013 02:29:41 +0000 (22:29 -0400)]
don't close file handlers as rpm will handle it
as new version of rpm can handle file handlers correctly in most time,
we don't repeat it in mic itself
Change-Id: I48b413e2a3aaf823f306c35e66dcfca7e002306e
Signed-off-by: Gui Chen <gui.chen@intel.com>
Artem Bityutskiy [Fri, 27 Sep 2013 07:37:47 +0000 (10:37 +0300)]
raw.py: remove unused variable
Change-Id: Ic704651421e50958c2b4977081c1ddb1096ccdf4
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
lihuanhuan [Fri, 8 Mar 2013 23:51:16 +0000 (07:51 +0800)]
tools/mic: rename variable
Get ride of these pylint warnings:
C: 82,8:MicCmd.help_create: Invalid name "cr" for type variable (should match [a-z_][a-z0-9_]{2,30}$)
C:220,8: Invalid name "mic" for type constant (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C:227,20: Invalid name "e" for type variable (should match [a-z_][a-z0-9_]{2,30}$)
Change-Id: Ic5cf5de9ca253a2725d7dcff0ecb9aba84eaf587
Gui Chen [Wed, 25 Sep 2013 04:00:37 +0000 (00:00 -0400)]
use sync mode in kpartx command
see kpartx man page:
-s sync mode. Don't return until the partitions are created
this should be the wanted option for current kpartx use
Change-Id: I99ba7d6413a54e9845c5a9f0654bef4d434e9c52
Signed-off-by: Gui Chen <gui.chen@intel.com>
Sun Lihong [Thu, 12 Sep 2013 13:36:09 +0000 (21:36 +0800)]
Add mic zsh tab completion support
Fixes: #1187
Change-Id: I6a668990556431c5df8304a830a12943cef975a0
Gui Chen [Tue, 24 Sep 2013 08:30:32 +0000 (04:30 -0400)]
fix typo
Change-Id: I4380c6076233079869b4563d93f5619cc54a990c
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Mon, 16 Sep 2013 06:29:13 +0000 (02:29 -0400)]
prefer to use 'pbzip2'/'pgzip' than 'bzip2'/'gzip'
Fixes: #1281
Change-Id: I72c996fde9689c7c684848dade4add8b76b00b07
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Fri, 13 Sep 2013 08:51:50 +0000 (04:51 -0400)]
setup.py: correct project url
Change-Id: I037b517cb7b6ac89bd07f98150c8bc9bc97337c9
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Thu, 12 Sep 2013 09:42:23 +0000 (05:42 -0400)]
better handling for installing config file in virtualenv
in this handling, mic will check 'real_prefix' which is
not existed in real python env but in virtualenv to
determine the config file location
Change-Id: Iaa67ba1d78395470bc20dd7682c29ec4c933fd56
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Thu, 12 Sep 2013 08:17:22 +0000 (04:17 -0400)]
update Makefile
update handling of TAGVER
drop bz2 compress
add new target 'release' to track taring release tag
Change-Id: Ief896cec98a5b36c96d7a481db88fa720d7c1c1c
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Wed, 28 Aug 2013 09:43:31 +0000 (05:43 -0400)]
drop VERSION file, use __version__ directly in mic module
Change-Id: I0f0ea1a93d8bbc924f5853c0d161c286251eb670
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Tue, 10 Sep 2013 08:34:27 +0000 (04:34 -0400)]
avoid IndexError for loopdev assigning
when 'losetup -f' returns '' output,
out.split()[0] will raise IndexError
Fixes: #1094
Change-Id: Iad310d70defc3c8a83c221951f0d3f8e6dc5a8a6
Signed-off-by: Gui Chen <gui.chen@intel.com>
lihuanhuan [Wed, 17 Apr 2013 05:05:24 +0000 (13:05 +0800)]
fix redundant whitespace in logging info
Change-Id: I7e8103e802dcf7c473ec45681f075108a48597ca
Xiaoning Zhu [Fri, 23 Aug 2013 09:31:54 +0000 (17:31 +0800)]
Add mic bash tab completion support
Change-Id: I6374f93b456ae4789ea79e6eaede8485dd6562dd
Signed-off-by: Xiaoning Zhu <xiaoning.zhu@intel.com>
lihuanhuan [Sun, 14 Apr 2013 06:01:36 +0000 (14:01 +0800)]
clear output like 'close failed in file object'
Change-Id: I0b07b0dd708fd163ba37863ec550f94d06190903
Fixes: #1192
lihuanhuan [Sat, 13 Apr 2013 06:22:37 +0000 (14:22 +0800)]
Fix native and bootstrap mode switch automatically
Fixes: #1242
MIC should not fallback to native mode if bootstrap package can not be found
Change-Id: Ia682572aaaf9e028ea8e15f2d8082d0b6f1a781c
Sun Lihong [Thu, 5 Sep 2013 10:24:57 +0000 (18:24 +0800)]
Confirm user from pwd.getpwuid to avoid compress failure
In case mic compresses the image by tarfile module,it might fail
by pwd.getpwuid blocking; to avoid this,mic takes a comfirm for
user id from pwd.getpwuid after comfirming root permission.
Fixes: #1207
Change-Id: Iaa6a886936d5d6d60ba3b21608fa81d9f4c1a238
Sun Lihong [Tue, 3 Sep 2013 08:56:02 +0000 (16:56 +0800)]
Ensure MIC works well when "/etc/mic/mic.conf" does not exist
when "/etc/mic/mic.conf" does not exist, ensure MIC works in
native mode, and when requring bootstrap mode, MIC switches to
native mode to work,because bootstrap mode needs the existence
of "/etc/mic/mic.conf".
Fixes: #1196
Change-Id: Idf16cbb4da7748665f466eb3f2045a853821915e
Sun Lihong [Tue, 3 Sep 2013 09:50:50 +0000 (17:50 +0800)]
Change "Warning: Failed to load plugin" to verbose info
Fixes: #1191.
Change-Id: If0fede7c1fec739a29d81ff02f5b6b4816fad78a
Xiaoning Zhu [Thu, 22 Aug 2013 06:29:46 +0000 (14:29 +0800)]
make customized setting of plugin_dir work in bootstrap mode
copy plugin_dir into bootstrap in bootstrap mode
Patrick McCarty [Mon, 26 Aug 2013 17:45:45 +0000 (10:45 -0700)]
Remove several CR chars in log messages
When msger functions are called in an environment where the TTY supports
color, and the log messages begin with a carriage return (CR), then
message headers are formatted differently than they would be without the
CR.
For msger Info messages, it looks like:
\033[2K\033[32m\rInfo:\033[0m
and is interpreted as:
1. Clear the entire line
2. Change color code to 32
3. Print "\rInfo:"
4. Reset color code
This logic makes sense for messages that begin with a CR but do not end
with a newline, since TTYs on Linux will expect either a '\n' or a
'\r\n' combination. However, I don't see a situation where MIC needs to
log messages with the leading CR.
To avoid the above logic, remove the CR characters from existing log
messages so that newlines are always added when the messages are
printed.
Change-Id: Ib98ad1a7217033aeb1644098fea5b907d4f4729d
Gui Chen [Wed, 28 Aug 2013 07:15:10 +0000 (03:15 -0400)]
bump up to release 0.21
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Wed, 28 Aug 2013 07:14:09 +0000 (03:14 -0400)]
update changelog and release notes
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Tue, 27 Aug 2013 10:39:38 +0000 (06:39 -0400)]
bump up to version 0.21-0.rc4
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Tue, 27 Aug 2013 10:18:59 +0000 (06:18 -0400)]
don't exit if parted returns non-zero
parted actually returns non-zero even if set
'boot' flag succeeded, to be compatible with
all the case, mic is better to give warning
than to exit immediately
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Tue, 27 Aug 2013 02:33:30 +0000 (22:33 -0400)]
bump up to version 0.21-0.rc3
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Tue, 27 Aug 2013 02:31:19 +0000 (22:31 -0400)]
raise error if load mapper device failed
if calling 'dmsetup mknodes' doesn't take effect, mic
should raise error to avoid user
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Mon, 26 Aug 2013 07:06:02 +0000 (03:06 -0400)]
fix uuid KeyError
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Mon, 26 Aug 2013 05:52:27 +0000 (01:52 -0400)]
fix kpartx device delay
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Mon, 26 Aug 2013 04:11:10 +0000 (00:11 -0400)]
bump up to version 0.21-0.rc2
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Mon, 26 Aug 2013 04:08:34 +0000 (00:08 -0400)]
fix umount issue
if mount dest is updated during mount, self.ismounted() won't
check it out, self.mounted flag is valid all the way
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Thu, 22 Aug 2013 09:00:05 +0000 (05:00 -0400)]
fix syslinux requires
syslinux is lower than 4.05 in centos, but it works
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Thu, 22 Aug 2013 08:07:08 +0000 (04:07 -0400)]
bump up to version 0.21-0.rc1
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Thu, 22 Aug 2013 07:32:00 +0000 (03:32 -0400)]
fix requires
syslinux 4.05 or later fixed the gpt issue
dosfstools has a misused release number
Signed-off-by: Gui Chen <gui.chen@intel.com>
Huang Hao [Wed, 14 Aug 2013 06:57:03 +0000 (14:57 +0800)]
Exit if partition is marked as active but boot flag can't be set.
If partition is marked with --active in ks file, mic should set
'boot' flag for MBR or 'legacy_boot' flag for GPT.
parted 2.3 doesn't support 'legacy_boot' flag, so this operation
may fail and when it happens the image will be unbootable.
Fixes: #1067
Change-Id: I8e0a5e901522cfed6af8e7dd892372d3649f2b77
Huang Hao [Tue, 20 Aug 2013 06:56:51 +0000 (14:56 +0800)]
Fix typo in comments and message
Change-Id: I7224bb5c500702c032b8a7c9c1dfbe91e7ae73ed
Gui Chen [Fri, 16 Aug 2013 03:04:38 +0000 (23:04 -0400)]
refine SimpleLockfile with closing lockf immediately
close the lock file immediately after create and open it,
it doesn't block the O_EXCL working because the file already
exists
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Fri, 16 Aug 2013 03:22:02 +0000 (23:22 -0400)]
don't need to clean up extra mounts present
cleanup_mount would clean up the chrootdir, which
will block the locking mechanism
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Thu, 15 Aug 2013 08:02:23 +0000 (04:02 -0400)]
setup_qemu_emulator: replace open/close with with_statement
to avoid unexpected IOError caused by open/close
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Thu, 15 Aug 2013 07:47:01 +0000 (03:47 -0400)]
bind mount /lib/modules with 'ro' option
to keep the /lib/modules untouch as expected, we must
use 'ro' option when mounting it
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Thu, 15 Aug 2013 02:06:01 +0000 (22:06 -0400)]
fix chroot_lock reference
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Wed, 14 Aug 2013 08:35:13 +0000 (04:35 -0400)]
initialize installerfw.features
this varialbe is not initialized, so mic will throw
traceback: no attribute "features"
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Wed, 14 Aug 2013 09:03:05 +0000 (02:03 -0700)]
Merge "remove unused code and check chroot_lock before release" into devel
Gui Chen [Wed, 14 Aug 2013 08:40:19 +0000 (04:40 -0400)]
remove unused code and check chroot_lock before release
the open of chroot lock file is unneccessary, remove it;
if chroot_lock is None, release is invalid, check it.
Signed-off-by: Gui Chen <gui.chen@intel.com>
Zhang Qiang [Thu, 8 Aug 2013 13:20:47 +0000 (21:20 +0800)]
Disable using proxy from /etc/sysconfig/proxy
Always set 'proxy' query paramer to disable using proxy from
/etc/sysconfig/proxy.
Fixes: #1093
Change-Id: I6a75c9e61bb2b2142c8401036ddd21b85886fa28
Gui Chen [Wed, 14 Aug 2013 07:38:19 +0000 (03:38 -0400)]
typo fix
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Wed, 14 Aug 2013 03:47:00 +0000 (23:47 -0400)]
fix bootloader options omitted
when extra option is more than 1, the 1st will be
saved, but the others will be omitted, this patch
is fixing it
Fixes: #607
Signed-off-by: Gui Chen <gui.chen@intel.com>
Artem Bityutskiy [Thu, 8 Aug 2013 12:01:59 +0000 (15:01 +0300)]
kickstart: add an alias for installerfw
In commit "d52080c kickstart: add the installerfw KS command" we introduced the
"installerfw" option. However, the later feed-back was that the name is very
confusing and non-intuitive, and we agreed to re-name this option to
"installerfw_plugins". With this name it is more obvious that this command
enables a list of plugins.
The name of the "extlinux" option of this command was also criticized, and we
agreed to rename it to more generic "bootloader" name.
We agreed that we do the following.
1. Add "installerfw_plugins" alias for "installerfw"
2. Add "bootloader" alias for "extlinux"
3. When users use the old "installerfw" and "extlinux" names, accept this,
but print a warning which says that these obsolete names will be removed in
future releases
4. Remove the old keywords later, after a couple releases.
This patch implements just that - introduces the aliases, prints warnings, makes
sure that internally we only use the new names, amends commentaries.
Base on suggestions and the initial patch from Alexander Kanevskiy.
Change-Id: I4646d437833f5252061cb963385269dc240f5792
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Artem Bityutskiy [Thu, 8 Aug 2013 12:48:01 +0000 (15:48 +0300)]
raw.py: print a message when compressing the image
Image compression may take very long time. The last message on the screen
before compression starts is "Generating map file(s)", and then a very long
delay, so that it looks like it takes so long to generate map files, but it is
not, it is actually the compression which is slow.
Let's inform users that we start compressing the image to make it obvious what
causes the delay.
Change-Id: Ie547451519aae7be5173c05bcfab1aca6c165148
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Gui Chen [Fri, 9 Aug 2013 08:42:53 +0000 (04:42 -0400)]
remove myfuser to detect the instance
the detection of .chroot.lock is not so correct in logic,
if the .chroot.lock is used by another process, it works;
if it is used by this process, it faults. so fuser is not
working as expected here. also removing fuser will break
a dependency of 'fuser' command
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Fri, 9 Aug 2013 06:45:28 +0000 (02:45 -0400)]
fix pylint
W: 50,0:elf_arch: Dangerous default value ['/bin/bash', '/sbin/init'] as argument
C: 76,4:global_mounts.totuple: Missing docstring
C:126,8:bind_mount: Invalid name "b" for type variable (should match [a-z_][a-z0-9_]{2,30}$)
W:134,4:setup_resolv: No exception type(s) specified
C:168,8:bind_unmount: Invalid name "b" for type variable (should match [a-z_][a-z0-9_]{2,30}$)
W:178,4:cleanup_resolv: No exception type(s) specified
C:175,8:cleanup_resolv: Invalid name "fd" for type variable (should match [a-z_][a-z0-9_]{2,30}$)
C:184,8:kill_processes: Invalid name "fp" for type variable (should match [a-z_][a-z0-9_]{2,30}$)
W:189,8:kill_processes: No exception type(s) specified
C:283,4:chroot.mychroot: Missing docstring
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Fri, 9 Aug 2013 06:29:35 +0000 (02:29 -0400)]
add docstring for functions
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Fri, 9 Aug 2013 03:58:40 +0000 (23:58 -0400)]
add lockfile support for mic/chroot.py module
a simple lockfile implementation is added,
and it is supposed to provide an exclusive
locking in the chroot dir
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Thu, 8 Aug 2013 05:50:58 +0000 (01:50 -0400)]
kill processes inside instroot chroot
when processes forked inside chroot is alive,
mic should kill it first before umount
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Wed, 7 Aug 2013 08:50:51 +0000 (04:50 -0400)]
split save fs code to savefs_before_chroot
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Wed, 7 Aug 2013 08:00:44 +0000 (04:00 -0400)]
rewrite chroot arch detecting
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Wed, 7 Aug 2013 03:18:13 +0000 (23:18 -0400)]
refactor mic/chroot.py:global_mounts
describe more clear logic in this function
refine the /lib/modules handling
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Wed, 7 Aug 2013 02:58:56 +0000 (22:58 -0400)]
refactor mic/chroot.py
put inner function outside to be api of
the chroot module
correct logic in setup_chrootenv and
cleanup_chrootenv
remove unused dev_null code
Signed-off-by: Gui Chen <gui.chen@intel.com>
Zhang Qiang [Wed, 7 Aug 2013 08:27:58 +0000 (16:27 +0800)]
Support user/password in proxy
If password contains special char ':' which should be replaced with
its' quoted char '%3A'.
Fixes: #541
Change-Id: I12575208c7c337f0bad3a40bac0988e17b160819
Gui Chen [Tue, 23 Jul 2013 02:56:05 +0000 (22:56 -0400)]
adjust some requires for suse and tizen
rpm-python is called as python-rpm in tizen
isomd5sum is not provided in tizen, livecd will be not supported in tizen
change qemu requires for suse and tizen to file requires
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Tue, 23 Jul 2013 02:56:30 +0000 (22:56 -0400)]
remove record file to fix duplicated manifest
Signed-off-by: Gui Chen <gui.chen@intel.com>
Ed Bartosh [Fri, 19 Jul 2013 15:42:57 +0000 (18:42 +0300)]
Added psmisc runtime dependency
Mic users fuser utility from psmisc package, but doesn't depend on
psmic. This causes crash on the system without psmisc installed:
Error <creator>: Command 'fuser' is not available.
Exception mic.utils.errors.CreatorError: CreatorError() in <bound method
LiveUSBImageCreator.__del__ of <mic.imager.liveusb.LiveUSBImageCreator
object at 0x15a9fd0>> ignored
Warning: Can't cleanup loop device /dev/loop1
Info: mic instance shutdown
Warning: No image and other files in output dir, mic failed?
Change-Id: Id6026d0cc4a805397dc6c206e93f645ff669f7ce
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Gui Chen [Mon, 8 Jul 2013 06:06:32 +0000 (02:06 -0400)]
update release notes
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Fri, 5 Jul 2013 10:51:36 +0000 (06:51 -0400)]
bump up to 0.20
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Thu, 4 Jul 2013 02:15:12 +0000 (22:15 -0400)]
bump up to 0.20-0.rc1
Signed-off-by: Gui Chen <gui.chen@intel.com>
Artem Bityutskiy [Mon, 1 Jul 2013 12:25:41 +0000 (15:25 +0300)]
liveusb: fix vfat UUID
Commit '
3577b518715c29175c5f517c6f3cf7a70b0e3d39' fixed the UUID string for
raw images, but broke it for liveusb images. And this patch fixes the issue by
making the liveusb code stop adding a dash to the UUID, because now the dash is
there, just like in UUID of ext4.
Change-Id: Ibfccdf204b301808ef63589dbc3934e517a0212d
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Gui Chen [Mon, 1 Jul 2013 09:50:52 +0000 (05:50 -0400)]
bump up to 0.20-0.rc0
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Thu, 27 Jun 2013 07:41:59 +0000 (03:41 -0400)]
implement '--check-pkgs' to check if packages included in image
check the given package list, if it will be installed, remove it
from the checking list. when check done, it proves some given
packages won't be installed to the image, mic should abort
Signed-off-by: Gui Chen <gui.chen@intel.com>
Gui Chen [Thu, 27 Jun 2013 07:04:27 +0000 (03:04 -0400)]
introduce '--check-pkgs' to check packages included
in some situation like pre-release image, they expect mic
not going on if there are some packages not going to include
in the image
Example: --check-pkgs=eglibc,bash
if either of eglibc and bash will not be present in the image,
mic should not go on the image creation
Signed-off-by: Gui Chen <gui.chen@intel.com>
Artem Bityutskiy [Thu, 27 Jun 2013 04:35:55 +0000 (07:35 +0300)]
raw: support the 'fstab' installerfw attribute
Similarly to the 'extlinux' attribute of the 'installerfw' KS command, start
supporitng the 'fstab' attribute. This means, for example, if the KS file has
this command:
installerfw "extlinux,fstab"
then MIC will not install/configure extlinux, and it will not generate
/etc/fstab. Instead, installer framework scripts will do that.
I've added the support only to raw images, since installerfw "extlinux" is
allso supported only by raw images. The liveusb support can be added later. I
do not do this because I cannot test liveusb images at this point, so I am
afraid of breaking it.
Change-Id: Ic6bb7241783aeff571956762a42665fcd8881e3f
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Artem Bityutskiy [Thu, 27 Jun 2013 03:56:29 +0000 (06:56 +0300)]
baseimager: export partition device node
Also export the device node name for each partition. This will be helpful when
we start generating fstab entries in the installer framework scripts.
In MIC environment, the device node name is easily constructed from the disk
name. The disk name compes from the KS file from the --ondisk option of the
'part' command. And --ondisk is a mandatory argument.
In other installer environments, the disk names may be very different.
Change-Id: Idafce950e511f4a7693e17be10e69fbb1e7d00d8
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Artem Bityutskiy [Thu, 27 Jun 2013 03:49:41 +0000 (06:49 +0300)]
raw: export file-system UUIDs
This will be useful when we want to create fstab entries ourselfs by using the
installer framework.
Change-Id: Ibc425517888d45a86b73e8c73abba5639eb7e093
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Artem Bityutskiy [Wed, 26 Jun 2013 14:28:13 +0000 (17:28 +0300)]
VfatDiskMount: fix vfat UUID string
The right format for the UUID string for vfat in Linux is 'XXXX-XXXX'. This is
how it can be used in fstab, for example (UUID='XXXX-XXXX'). Also, Linux udev
creates /dev/disk/by-uuid/XXXX-XXXX entries for vfat volumes.
The problem in VfatDiskMount is that it provides it in the 'XXXXXXXX' form
(without dash). However, mkfs.vfat does not like the dash, and this is why we
did not have it, I guess.
This patch fixes the situation and makes VfatDiskMount class expose UUID in a
fstab-friendly format. This makes --fstab-entry=uuid option also work for VFAT
volumes (I tested this).
Change-Id: I1d676e3707ef1777df910273381fe4437b415f41
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Artem Bityutskiy [Wed, 26 Jun 2013 14:21:54 +0000 (17:21 +0300)]
Revert "VfatDiskMount: do not initialize uuid"
This reverts commit
83410bc120b1f214401517f00da86c53e9f3d1b2.
This patch is actually wrong. I discovered that FATFS actually _does_ support
UUID, it is just shorted - it is a 32-bit integer, but has to have the
'XXXX-XXXX' format for fstab.
Let's revert this patch and fix the problem properly.
Change-Id: I1d2019f2f93094d8e222b926ac2519e8e9b9c0b5
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Artem Bityutskiy [Wed, 26 Jun 2013 09:15:28 +0000 (12:15 +0300)]
baseimager: export INSTALLERFW_MOUNT_PREFIX
The installer framework scripts sometimes need to know the real current path
where the partitions are mounted. In MIC environment, the real path is the same
as the mountpoint, except when we are not in chroot, in which case the real
path has a prefix. Export this information in the 'INSTALLERFW_MOUNT_PREFIX'
variable.
In other environments, like pc-installer, the current path may be different,
and pc-installer will export it in 'INSTALLERFW_MOUNT_PREFIX'.
This will allow us writing configuration scripts which will work in both MIC
and pc-installer environments.
Change-Id: Ia867685acb43836c7086b062e2f34908f378f355
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Artem Bityutskiy [Wed, 26 Jun 2013 09:08:49 +0000 (12:08 +0300)]
baseimager: move environment variable definitions
It is cleaner to have a single place where we define all the environement
variables. Move a couple of historical variables to the
'_get_post_scripts_env()' function.
Change-Id: I58e5d2dbe4477effccf254c48a1f74ccad484c8c
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Artem Bityutskiy [Wed, 26 Jun 2013 08:36:27 +0000 (11:36 +0300)]
Revert "baseimager: add a couple of more installer FW variables"
A better solution is invented.
This reverts commit
be0a53342bec78025413dbbd0bf4de5d9c8b454f.
Artem Bityutskiy [Wed, 26 Jun 2013 05:25:38 +0000 (08:25 +0300)]
baseimager: add a couple of more installer FW variables
Add two more installer framework variables:
INSTALLERFW_ROOT_PART_NUM and INSTALLERFW_BOOT_PART_NUM
which define the boot and root parition numbers.
Change-Id: I6b717d3051faa23edb58b44265b3eae3aab2a63e
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Gui Chen [Tue, 25 Jun 2013 09:19:54 +0000 (05:19 -0400)]
fix rpm header not including 'VCS' tag
Signed-off-by: Gui Chen <gui.chen@intel.com>
Artem Bityutskiy [Mon, 24 Jun 2013 10:12:42 +0000 (13:12 +0300)]
ExtDiskMount: fix the UUID feature for extX
The current implementation of ExtDiskMount is strange. Instead of generating a
random UUID and then ask mkfs.extX to use that UUID, it run mkfs.extX without
-U, let's mkfs.extX generate a random UUID, and then uses e2fsdump and parses
its output.
This is not very logical, and this also does not work with the version of
mkfs that we use at the moment.
Change the logic and simply use mkfs.extX -U.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Artem Bityutskiy [Mon, 24 Jun 2013 08:30:31 +0000 (11:30 +0300)]
VfatDiskMount: do not initialize uuid
Do not try to be too smart and initialize UUID to a time-stamp. This UUID is
later on used form mounting in /etc/fstab (UUID=...), and of course this fails
for VFAT because VfatDiskMount provides a fake UUID.
Instead, make VfatDiskMount provide no UUID at all.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Artem Bityutskiy [Fri, 21 Jun 2013 06:02:04 +0000 (09:02 +0300)]
baseimager: export a number of helful environment variables
Make the MIC export a number of environment variables for the %post section of
the KickStart file.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>