From 7d6e243e1000bf0be2c8f07be54b7a69e6421e67 Mon Sep 17 00:00:00 2001 From: Lihong Sun Date: Tue, 24 Mar 2015 22:53:24 -0400 Subject: [PATCH] Drop mic native support mic option --runtime=native has been broken for more than one year, maintain this mode requires more effort for new distribution support, so drop this mode without risk. Fixes: #DEVT-248 Change-Id: Iaee916889fabfe62f6a507781f9ca1c3d01ee5a2 --- debian/control | 28 ---------------------- debian/mic-native.install | 1 - debian/rules | 1 - doc/man.rst | 2 +- doc/usage.rst | 7 +++--- etc/bash_completion.d/mic.sh | 1 - etc/zsh_completion.d/_mic | 4 ++-- mic/conf.py | 4 ++-- mic/creator.py | 2 +- packaging/mic.spec | 57 -------------------------------------------- 10 files changed, 9 insertions(+), 98 deletions(-) delete mode 100644 debian/mic-native.install diff --git a/debian/control b/debian/control index b48673c..8d921f5 100644 --- a/debian/control +++ b/debian/control @@ -24,31 +24,3 @@ Description: image creator for Linux distributions convert an image to a specified type; subcommand chroot is used to chroot into an image. -Package: mic-native -Architecture: all -Depends: ${misc:Depends}, ${python:Depends}, - util-linux, - coreutils, - psmisc, - e2fsprogs (>= 1.41), - dosfstools, - isomd5sum, - genisoimage, - dmsetup, - kpartx, - parted, - squashfs-tools (>= 4.0), - yum (>= 3.2), - syslinux (>= 2:4.05), - extlinux (>= 2:4.05), - python-zypp-tizen, - python-m2crypto, - mic, -Recommends: - qemu-arm-static | qemu-user-static, - binfmt-support, - btrfs-tools, - udisks | hal -Description: Native support for mic - The native support package for mic, it includes all requirements - for mic native running. diff --git a/debian/mic-native.install b/debian/mic-native.install deleted file mode 100644 index 29caf35..0000000 --- a/debian/mic-native.install +++ /dev/null @@ -1 +0,0 @@ -usr/bin/mic-native diff --git a/debian/rules b/debian/rules index c9f50ec..41a13a9 100755 --- a/debian/rules +++ b/debian/rules @@ -32,7 +32,6 @@ install: build install -m644 doc/mic.1 $(CURDIR)/debian/tmp/usr/share/man/man1 install -m755 etc/bash_completion.d/mic.sh $(CURDIR)/debian/tmp/etc/bash_completion.d/ install -m755 etc/zsh_completion.d/_mic $(CURDIR)/debian/tmp/etc/zsh_completion.d/_mic - install -m755 tools/mic $(CURDIR)/debian/tmp/usr/bin/mic-native python setup.py install --root=$(CURDIR)/debian/tmp --prefix=/usr binary-indep: build install diff --git a/doc/man.rst b/doc/man.rst index c0a1330..fd75fd4 100644 --- a/doc/man.rst +++ b/doc/man.rst @@ -50,7 +50,7 @@ Options: --pack-to=PACK_TO pack the images together into the specified achive, extension supported: .zip, .tar, .tar.gz, .tar.bz2, etc. by default, .tar will be used --release=RID generate a release of RID with all necessary files, when @BUILD_ID@ is contained in kickstart file, it will be replaced by RID. sample values: "latest", "tizen_20120101.1" --copy-kernel copy kernel files from image /boot directory to the image output directory - --runtime=RUNTIME Specify runtime mode, avaiable: bootstrap, native + --runtime=RUNTIME Specify runtime mode, avaiable: bootstrap --install-pkgs=INSTALL_PKGS Specify what type of packages to be installed, valid: source, debuginfo, debugsource --check-pkgs=CHECK_PKGS Check if given packages would be installed, packages should be separated by comma --tmpfs Setup tmpdir as tmpfs to accelerate, experimental feature, use it if you have more than 4G memory diff --git a/doc/usage.rst b/doc/usage.rst index 803dbe2..dbd4c21 100644 --- a/doc/usage.rst +++ b/doc/usage.rst @@ -112,13 +112,12 @@ In Tizen, the released image will have a ks file along with image. For example, - Other options: -:: +:: --runtime=RUNTIME_MODE Sets runtime mode, the default is bootstrap mode, valid - values: "native", "bootstrap". "native" means mic uses - localhost environment to create image, while "bootstrap" - means mic uses one tizen chroot environment to create image. + values: "bootstrap". "bootstrap" means mic uses one + tizen chroot environment to create image. --compress-image=COMPRESS_IMAGE (for loop & raw) Sets the disk image compression. Note: The available values might depend on the used filesystem type. diff --git a/etc/bash_completion.d/mic.sh b/etc/bash_completion.d/mic.sh index d7a4fa6..4f467ca 100644 --- a/etc/bash_completion.d/mic.sh +++ b/etc/bash_completion.d/mic.sh @@ -119,7 +119,6 @@ __mic_complete_val() latest " runtime_values=" - native bootstrap " record_pkgs_values=" diff --git a/etc/zsh_completion.d/_mic b/etc/zsh_completion.d/_mic index 46867a8..8615572 100644 --- a/etc/zsh_completion.d/_mic +++ b/etc/zsh_completion.d/_mic @@ -60,7 +60,7 @@ _mic() { '--record-pkgs=[Record the info of installed packages, multiple values can be specified which joined by \",\", valid values: \"name\", \"content\", \"license\", \"vcs\"]: :_mic_create_filters -s ,' \ '--pkgmgr=[Specify backend package manager]:parameter' \ '--local-pkgs-path=[Path for local pkgs(rpms) to be installed]:path' \ - '--runtime=[Specify runtime mode, avaiable: bootstrap, native]: :(bootstrap native)' \ + '--runtime=[Specify runtime mode, avaiable: bootstrap]: :(bootstrap)' \ '--pack-to=[Pack the images together into the specified achive, extension supported: .zip, .tar, .tar.gz, .tar.bz2, etc. by default, .tar will be used]:parameter' \ '--copy-kernel[Copy kernel files from image /boot directory to the image output directory.]' \ '--install-pkgs=[Specify what type of packages to be installed, valid: source, debuginfo, debugsource]: :(source debuginfo debugsource)' \ @@ -84,7 +84,7 @@ _mic() { '--record-pkgs=[Record the info of installed packages, multiple values can be specified which joined by \",\", valid values: \"name\", \"content\", \"license\", \"vcs\"]: :_mic_create_filters -s ,' \ '--pkgmgr=[Specify backend package manager]:parameter' \ '--local-pkgs-path=[Path for local pkgs(rpms) to be installed]:path' \ - '--runtime=[Specify runtime mode, avaiable: bootstrap, native]: :(bootstrap native)' \ + '--runtime=[Specify runtime mode, avaiable: bootstrap]: :(bootstrap)' \ '--pack-to=[Pack the images together into the specified achive, extension supported: .zip, .tar, .tar.gz, .tar.bz2, etc. by default, .tar will be used]:parameter' \ '--copy-kernel[Copy kernel files from image /boot directory to the image output directory.]' \ '--install-pkgs=[Specify what type of packages to be installed, valid: source, debuginfo, debugsource]: :(source debuginfo debugsource)' \ diff --git a/mic/conf.py b/mic/conf.py index 67d6d0c..d844c65 100644 --- a/mic/conf.py +++ b/mic/conf.py @@ -277,8 +277,8 @@ class ConfigMgr(object): msger.set_logfile(self.create['logfile'], mode) def set_runtime(self, runtime): - if runtime not in ("bootstrap", "native"): - raise errors.CreatorError("Invalid runtime mode: %s" % runtime) + if runtime != "bootstrap": + raise errors.CreatorError("Invalid runtime mode: %s, only 'bootstrap' mode is allowed." % runtime) if misc.get_distro()[0] in ("tizen", "Tizen"): runtime = "native" diff --git a/mic/creator.py b/mic/creator.py index 0052ceb..e7c6633 100644 --- a/mic/creator.py +++ b/mic/creator.py @@ -94,7 +94,7 @@ class Creator(cmdln.Cmdln): 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, native') + help='Specify runtime mode, avaiable: bootstrap') # --taring-to is alias to --pack-to optparser.add_option('', '--taring-to', type='string', dest='pack_to', default=None, diff --git a/packaging/mic.spec b/packaging/mic.spec index 0d62f5e..1c7ffac 100644 --- a/packaging/mic.spec +++ b/packaging/mic.spec @@ -49,59 +49,6 @@ is used to create images with different types; subcommand convert is used to convert an image to a specified type; subcommand chroot is used to chroot into an image. -%package native -Summary: Native support for mic -Requires: util-linux -Requires: coreutils -Requires: psmisc -Requires: e2fsprogs -Requires: dosfstools >= 2.11 -Requires: kpartx -Requires: parted -Requires: device-mapper -Requires: syslinux >= 3.82 -%if ! 0%{?suse_version} -Requires: syslinux-extlinux >= 3.82 -%endif - -%if 0%{?suse_version} || 0%{?tizen_version:1} -Requires: squashfs >= 4.0 -Requires: python-m2crypto -%else -Requires: python-libs -Requires: squashfs-tools >= 4.0 -Requires: m2crypto -%endif - -%if 0%{?suse_version} || 0%{?tizen_version:1} -Requires: /usr/bin/qemu-arm -%else -Requires: qemu-arm-static -%endif - -%if ! 0%{?tizen_version:1} -Requires: isomd5sum -Requires: /usr/bin/genisoimage -%endif - -Requires: yum >= 3.2.24 -%if 0%{?tizen_version:1} -Requires: python-zypp -%else -Requires: python-zypp-tizen -%endif - -Requires: mic - -#%if 0%{?suse_version} -#Requires: btrfsprogs -#%else -#Requires: btrfs-progs -#%endif - -%description native -The native support package for mic, it includes all requirements -for mic native running. %prep %setup -q -n %{name}-%{version} @@ -130,8 +77,6 @@ install -Dp -m0755 etc/bash_completion.d/%{name}.sh %{buildroot}/%{_sysconfdir}/ install -d -m0755 %{buildroot}/%{_sysconfdir}/zsh_completion.d/ install -Dp -m0755 etc/zsh_completion.d/_%{name} %{buildroot}/%{_sysconfdir}/zsh_completion.d/ -install -Dp -m0755 tools/mic %{buildroot}/%{_bindir}/mic-native - %files %defattr(-,root,root,-) %doc doc/* @@ -148,5 +93,3 @@ install -Dp -m0755 tools/mic %{buildroot}/%{_bindir}/mic-native %{_sysconfdir}/bash_completion.d %{_sysconfdir}/zsh_completion.d -%files native -%{_bindir}/mic-native -- 2.7.4