Re: [OE-core] [PATCH] Remove "SRC_URI_OVERRIDES_PACKAGE_ARCH = 0" from tslib.bb

2014-08-08 Thread Robert P. J. Day
On Fri, 8 Aug 2014, Saul Wold wrote:

> On 08/08/2014 12:31 PM, Robert P. J. Day wrote:
> >
> > Given that there are no machine-specific files for the tslib recipe
> > anymore, might as well remove this line.
> >
>
> Robert,
>
> Can you please review the commit guidelines
>
> http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
>
> The summary line should be in the form of
> tslib: Remove ...
>
> I know it's a trivial patch, but it would good to have the commit message
> correct.

  quite so, i'll resubmit properly.

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/2] gst-ffmpeg: add dependency on libpostproc

2014-08-08 Thread Tim Orling

> On Aug 6, 2014, at 7:42 AM, Paul Eggleton  
> wrote:
> 
>> On Wednesday 06 August 2014 16:37:34 Martin Jansa wrote:
>>> On Wed, Aug 06, 2014 at 01:41:58PM +0100, Paul Eggleton wrote:
 On Wednesday 06 August 2014 13:41:56 Martin Jansa wrote:
 * building with libav-9 fails with:
  | checking for POSTPROC... configure: error: Package requirements
  | (libpostproc libavcodec libavutil) were not met:
  | 
  | No package 'libpostproc' found
>>> 
>>> Does gst-ffmpeg actually work with libav > 0.8?
>> 
>> No, not yet (see world status e-mails), but at least this is step
>> in right direction IMHO and doesn't harm libav-0.8 users.
> 
> I'm just not sure gst-ffmpeg should be allowed to get past this at all if 
> it's 
> not currently expected to work. The known working configuration is either 
> gst-ffmpeg + libav 0.8.x, or gstreamer1.0-libav + libav > 0.8.x.
> 
I commented some time ago that 0.8/gst-ffmpeg should just go away... (Along 
with X but that's another subject). It just doesn't fit in the trend of 
multimedia FOSS anymore... Not that xbmc or vlc are ready for ffmpeg to go 
away... Sigh. Libpostproc is also an orphan in libav world, no activity since 
2012. Schisms suck. But we seem to be committed to the libav bus, so keep calm 
and ride on.

--Tim
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 35/35] wic: Bump the version to 2.0

2014-08-08 Thread Tom Zanussi
This represents a complete rework, and if we assume the previous
version should have been 1.0 (instead of a silly .1x version), then
this should be 2.0.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/wic/__version__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/__version__.py b/scripts/lib/wic/__version__.py
index 60d7626..5452a46 100644
--- a/scripts/lib/wic/__version__.py
+++ b/scripts/lib/wic/__version__.py
@@ -1 +1 @@
-VERSION = "0.14"
+VERSION = "2.00"
-- 
1.8.3.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 28/35] wic: Update cleanup/unmount-related code

2014-08-08 Thread Tom Zanussi
The wic code inherited a basic image-creation flow based on mounting
loop devices, but wic doesn't actually mount or unmount anything, so
get rid of unmount() and consolidate whatever it did do with
cleanup().

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/imager/baseimager.py | 28 ++--
 scripts/lib/mic/imager/direct.py |  2 +-
 2 files changed, 7 insertions(+), 23 deletions(-)

diff --git a/scripts/lib/mic/imager/baseimager.py 
b/scripts/lib/mic/imager/baseimager.py
index 7f32dd5..23919d4 100644
--- a/scripts/lib/mic/imager/baseimager.py
+++ b/scripts/lib/mic/imager/baseimager.py
@@ -109,12 +109,11 @@ class BaseImageCreator(object):
 """
 pass
 
-def _unmount_instroot(self):
-"""Undo anything performed in _mount_instroot().
+def _cleanup(self):
+"""Undo anything performed in _create().
 
-This is the hook where subclasses must undo anything which was done
-in _mount_instroot(). For example, if a filesystem image was mounted
-onto _instroot, it should be unmounted here.
+This is the hook where subclasses must undo anything which was
+done in _create().
 
 There is no default implementation.
 
@@ -161,23 +160,8 @@ class BaseImageCreator(object):
 
 self._create()
 
-def unmount(self):
-"""Unmounts the target filesystem.
-
-The ImageCreator class detaches the system from the install root, but
-other subclasses may also detach the loopback mounted filesystem image
-from the install root.
-
-"""
-self._unmount_instroot()
-
-
 def cleanup(self):
-"""Unmounts the target filesystem and deletes temporary files.
-
-This method calls unmount() and then deletes any temporary files and
-directories that were created on the host system while building the
-image.
+"""Undo anything performed in create().
 
 Note, make sure to call this method once finished with the creator
 instance in order to ensure no stale files are left on the host e.g.:
@@ -192,7 +176,7 @@ class BaseImageCreator(object):
 if not self.__builddir:
 return
 
-self.unmount()
+self._cleanup()
 
 shutil.rmtree(self.__builddir, ignore_errors = True)
 self.__builddir = None
diff --git a/scripts/lib/mic/imager/direct.py b/scripts/lib/mic/imager/direct.py
index b96740d..91f64d5 100644
--- a/scripts/lib/mic/imager/direct.py
+++ b/scripts/lib/mic/imager/direct.py
@@ -354,7 +354,7 @@ class DirectImageCreator(BaseImageCreator):
 
 return (rootdev, root_part_uuid)
 
-def _unmount_instroot(self):
+def _cleanup(self):
 if not self.__instimage is None:
 try:
 self.__instimage.cleanup()
-- 
1.8.3.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 26/35] wic: Remove Mount object

2014-08-08 Thread Tom Zanussi
It doesn't do anything we need, so remove it and fix up callers/base
classes.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/utils/fs_related.py| 16 
 scripts/lib/mic/utils/partitionedfs.py |  4 +---
 2 files changed, 1 insertion(+), 19 deletions(-)

diff --git a/scripts/lib/mic/utils/fs_related.py 
b/scripts/lib/mic/utils/fs_related.py
index e6e362d..07a5ff9 100644
--- a/scripts/lib/mic/utils/fs_related.py
+++ b/scripts/lib/mic/utils/fs_related.py
@@ -112,19 +112,3 @@ class DiskImage(Disk):
 exec_cmd(dd_cmd)
 
 self.device = self.image_file
-
-
-class Mount:
-"""A generic base class to deal with mounting things."""
-def __init__(self, mountdir):
-self.mountdir = mountdir
-
-def cleanup(self):
-self.unmount()
-
-def mount(self, options = None):
-pass
-
-def unmount(self):
-pass
-
diff --git a/scripts/lib/mic/utils/partitionedfs.py 
b/scripts/lib/mic/utils/partitionedfs.py
index ef92125..50536b4 100644
--- a/scripts/lib/mic/utils/partitionedfs.py
+++ b/scripts/lib/mic/utils/partitionedfs.py
@@ -32,9 +32,8 @@ MBR_OVERHEAD = 1
 # Size of a sector in bytes
 SECTOR_SIZE = 512
 
-class PartitionedMount(Mount):
+class PartitionedMount:
 def __init__(self, mountdir):
-Mount.__init__(self, mountdir)
 self.disks = {}
 self.partitions = []
 self.mountOrder = []
@@ -316,7 +315,6 @@ class PartitionedMount(Mount):
 self.unmountOrder.reverse()
 
 def cleanup(self):
-Mount.cleanup(self)
 if self.disks:
 for dev in self.disks.keys():
 d = self.disks[dev]
-- 
1.8.3.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 34/35] wic: Rename /mic to /wic

2014-08-08 Thread Tom Zanussi
As well as any other stray instances of mic in the codebase that can
be removed.

We don't really need to carry around legacy naming, and the history is
in git.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/image/engine.py  | 12 ++--
 scripts/lib/image/help.py|  8 
 .../{mic => wic}/3rdparty/pykickstart/__init__.py|  0
 .../lib/{mic => wic}/3rdparty/pykickstart/base.py|  0
 .../3rdparty/pykickstart/commands/__init__.py|  0
 .../3rdparty/pykickstart/commands/bootloader.py  |  0
 .../3rdparty/pykickstart/commands/partition.py   |  0
 .../{mic => wic}/3rdparty/pykickstart/constants.py   |  0
 .../lib/{mic => wic}/3rdparty/pykickstart/errors.py  |  0
 .../3rdparty/pykickstart/handlers/__init__.py|  0
 .../3rdparty/pykickstart/handlers/control.py |  0
 .../3rdparty/pykickstart/handlers/f16.py |  0
 scripts/lib/{mic => wic}/3rdparty/pykickstart/ko.py  |  0
 .../lib/{mic => wic}/3rdparty/pykickstart/options.py |  0
 .../lib/{mic => wic}/3rdparty/pykickstart/parser.py  |  0
 .../{mic => wic}/3rdparty/pykickstart/sections.py|  0
 .../lib/{mic => wic}/3rdparty/pykickstart/version.py |  0
 scripts/lib/{mic => wic}/__init__.py |  0
 scripts/lib/{mic => wic}/__version__.py  |  0
 scripts/lib/{mic => wic}/conf.py | 12 ++--
 scripts/lib/{mic => wic}/creator.py  | 12 ++--
 scripts/lib/{mic => wic}/imager/__init__.py  |  0
 scripts/lib/{mic => wic}/imager/baseimager.py| 10 +-
 scripts/lib/{mic => wic}/imager/direct.py| 17 -
 scripts/lib/{mic => wic}/kickstart/__init__.py   |  4 ++--
 .../kickstart/custom_commands/__init__.py|  0
 .../kickstart/custom_commands/micboot.py |  0
 .../kickstart/custom_commands/micpartition.py|  0
 .../kickstart/custom_commands/partition.py   |  6 +++---
 .../kickstart/custom_commands/wicboot.py |  2 +-
 scripts/lib/{mic => wic}/msger.py|  0
 scripts/lib/{mic => wic}/plugin.py   | 16 
 scripts/lib/{mic => wic}/pluginbase.py   | 20 ++--
 .../lib/{mic => wic}/plugins/imager/direct_plugin.py | 15 +++
 .../lib/{mic => wic}/plugins/source/bootimg-efi.py   | 16 
 .../{mic => wic}/plugins/source/bootimg-pcbios.py| 16 
 scripts/lib/{mic => wic}/plugins/source/rootfs.py| 16 
 scripts/lib/{mic => wic}/test|  0
 scripts/lib/{mic => wic}/utils/__init__.py   |  0
 scripts/lib/{mic => wic}/utils/cmdln.py  |  0
 scripts/lib/{mic => wic}/utils/errors.py |  0
 scripts/lib/{mic => wic}/utils/fs_related.py |  8 
 scripts/lib/{mic => wic}/utils/misc.py   |  0
 scripts/lib/{mic => wic}/utils/oe/__init__.py|  2 +-
 scripts/lib/{mic => wic}/utils/oe/misc.py|  6 +++---
 scripts/lib/{mic => wic}/utils/partitionedfs.py  | 10 +-
 scripts/lib/{mic => wic}/utils/runner.py |  2 +-
 47 files changed, 104 insertions(+), 106 deletions(-)
 rename scripts/lib/{mic => wic}/3rdparty/pykickstart/__init__.py (100%)
 rename scripts/lib/{mic => wic}/3rdparty/pykickstart/base.py (100%)
 rename scripts/lib/{mic => wic}/3rdparty/pykickstart/commands/__init__.py 
(100%)
 rename scripts/lib/{mic => wic}/3rdparty/pykickstart/commands/bootloader.py 
(100%)
 rename scripts/lib/{mic => wic}/3rdparty/pykickstart/commands/partition.py 
(100%)
 rename scripts/lib/{mic => wic}/3rdparty/pykickstart/constants.py (100%)
 rename scripts/lib/{mic => wic}/3rdparty/pykickstart/errors.py (100%)
 rename scripts/lib/{mic => wic}/3rdparty/pykickstart/handlers/__init__.py 
(100%)
 rename scripts/lib/{mic => wic}/3rdparty/pykickstart/handlers/control.py (100%)
 rename scripts/lib/{mic => wic}/3rdparty/pykickstart/handlers/f16.py (100%)
 rename scripts/lib/{mic => wic}/3rdparty/pykickstart/ko.py (100%)
 rename scripts/lib/{mic => wic}/3rdparty/pykickstart/options.py (100%)
 rename scripts/lib/{mic => wic}/3rdparty/pykickstart/parser.py (100%)
 rename scripts/lib/{mic => wic}/3rdparty/pykickstart/sections.py (100%)
 rename scripts/lib/{mic => wic}/3rdparty/pykickstart/version.py (100%)
 rename scripts/lib/{mic => wic}/__init__.py (100%)
 rename scripts/lib/{mic => wic}/__version__.py (100%)
 rename scripts/lib/{mic => wic}/conf.py (93%)
 rename scripts/lib/{mic => wic}/creator.py (96%)
 rename scripts/lib/{mic => wic}/imager/__init__.py (100%)
 rename scripts/lib/{mic => wic}/imager/baseimager.py (96%)
 rename scripts/lib/{mic => wic}/imager/direct.py (96%)
 rename scripts/lib/{mic => wic}/kickstart/__init__.py (98%)
 rename scripts/lib/{mic => wic}/kickstart/custom_commands/__init__.py (100%)
 rename scripts/lib/{mic => wic}/kickstart/custom_commands/micboot.py (100%)
 rename scripts/l

[OE-core] [PATCH 16/35] wic: Remove unused 3rdparty/commands

2014-08-08 Thread Tom Zanussi
wic doesn't use anything but partition and bootloader, so remove the
rest.

Signed-off-by: Tom Zanussi 
---
 .../mic/3rdparty/pykickstart/commands/__init__.py  |8 +-
 .../3rdparty/pykickstart/commands/authconfig.py|   40 -
 .../mic/3rdparty/pykickstart/commands/autopart.py  |  119 ---
 .../mic/3rdparty/pykickstart/commands/autostep.py  |   55 -
 .../mic/3rdparty/pykickstart/commands/clearpart.py |   86 --
 .../mic/3rdparty/pykickstart/commands/device.py|  125 ---
 .../3rdparty/pykickstart/commands/deviceprobe.py   |   40 -
 .../3rdparty/pykickstart/commands/displaymode.py   |   68 --
 .../mic/3rdparty/pykickstart/commands/dmraid.py|   91 --
 .../3rdparty/pykickstart/commands/driverdisk.py|  184 
 .../lib/mic/3rdparty/pykickstart/commands/fcoe.py  |  114 --
 .../mic/3rdparty/pykickstart/commands/firewall.py  |  193 
 .../mic/3rdparty/pykickstart/commands/firstboot.py |   62 --
 .../lib/mic/3rdparty/pykickstart/commands/group.py |   88 --
 .../3rdparty/pykickstart/commands/ignoredisk.py|  139 ---
 .../3rdparty/pykickstart/commands/interactive.py   |   58 --
 .../lib/mic/3rdparty/pykickstart/commands/iscsi.py |  133 ---
 .../mic/3rdparty/pykickstart/commands/iscsiname.py |   54 -
 .../lib/mic/3rdparty/pykickstart/commands/key.py   |   64 --
 .../mic/3rdparty/pykickstart/commands/keyboard.py  |   55 -
 .../lib/mic/3rdparty/pykickstart/commands/lang.py  |   60 --
 .../3rdparty/pykickstart/commands/langsupport.py   |   58 --
 .../mic/3rdparty/pykickstart/commands/lilocheck.py |   54 -
 .../mic/3rdparty/pykickstart/commands/logging.py   |   66 --
 .../mic/3rdparty/pykickstart/commands/logvol.py|  304 --
 .../3rdparty/pykickstart/commands/mediacheck.py|   53 -
 .../mic/3rdparty/pykickstart/commands/method.py|  186 
 .../mic/3rdparty/pykickstart/commands/monitor.py   |  106 --
 .../lib/mic/3rdparty/pykickstart/commands/mouse.py |   70 --
 .../mic/3rdparty/pykickstart/commands/multipath.py |  111 --
 .../mic/3rdparty/pykickstart/commands/network.py   |  363 ---
 .../lib/mic/3rdparty/pykickstart/commands/raid.py  |  365 ---
 .../mic/3rdparty/pykickstart/commands/reboot.py|   79 --
 .../lib/mic/3rdparty/pykickstart/commands/repo.py  |  249 -
 .../mic/3rdparty/pykickstart/commands/rescue.py|   68 --
 .../mic/3rdparty/pykickstart/commands/rootpw.py|   93 --
 .../mic/3rdparty/pykickstart/commands/selinux.py   |   64 --
 .../mic/3rdparty/pykickstart/commands/services.py  |   71 --
 .../lib/mic/3rdparty/pykickstart/commands/skipx.py |   54 -
 .../lib/mic/3rdparty/pykickstart/commands/sshpw.py |  105 --
 .../mic/3rdparty/pykickstart/commands/timezone.py  |   86 --
 .../mic/3rdparty/pykickstart/commands/updates.py   |   60 --
 .../mic/3rdparty/pykickstart/commands/upgrade.py   |  106 --
 .../lib/mic/3rdparty/pykickstart/commands/user.py  |  173 
 .../lib/mic/3rdparty/pykickstart/commands/vnc.py   |  114 --
 .../mic/3rdparty/pykickstart/commands/volgroup.py  |  102 --
 .../mic/3rdparty/pykickstart/commands/xconfig.py   |  184 
 .../mic/3rdparty/pykickstart/commands/zerombr.py   |   69 --
 .../lib/mic/3rdparty/pykickstart/commands/zfcp.py  |  134 ---
 .../mic/3rdparty/pykickstart/handlers/control.py   | 1092 
 50 files changed, 1 insertion(+), 6474 deletions(-)
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/authconfig.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/autopart.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/autostep.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/clearpart.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/device.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/deviceprobe.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/displaymode.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/dmraid.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/driverdisk.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/fcoe.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/firewall.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/firstboot.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/group.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/ignoredisk.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/interactive.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/iscsi.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/iscsiname.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/key.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/keyboard.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/lang.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/commands/langsupport.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/com

[OE-core] [PATCH 29/35] wic: Update/rename install-related code

2014-08-08 Thread Tom Zanussi
The wic code inherited a basic image-creation flow based on installing
packages, but wic doesn't actually install anything, so rename parts
of the code dealing with installing to something more appropriate.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/imager/direct.py| 50 -
 scripts/lib/mic/plugins/imager/direct_plugin.py |  2 +-
 scripts/lib/mic/utils/partitionedfs.py  | 16 
 3 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/scripts/lib/mic/imager/direct.py b/scripts/lib/mic/imager/direct.py
index 91f64d5..8d7b6ee 100644
--- a/scripts/lib/mic/imager/direct.py
+++ b/scripts/lib/mic/imager/direct.py
@@ -62,7 +62,7 @@ class DirectImageCreator(BaseImageCreator):
 """
 BaseImageCreator.__init__(self, creatoropts)
 
-self.__instimage = None
+self.__image = None
 self.__disks = {}
 self.__disk_format = "direct"
 self._disk_names = []
@@ -226,7 +226,7 @@ class DirectImageCreator(BaseImageCreator):
 """
 parts = self._get_parts()
 
-self.__instimage = PartitionedMount()
+self.__image = PartitionedMount()
 
 for p in parts:
 # as a convenience, set source to the boot partition source
@@ -250,39 +250,39 @@ class DirectImageCreator(BaseImageCreator):
 
 self._restore_fstab(fstab)
 
-self.__instimage.add_partition(int(p.size),
-   p.disk,
-   p.mountpoint,
-   p.source_file,
-   p.fstype,
-   p.label,
-   fsopts = p.fsopts,
-   boot = p.active,
-   align = p.align,
-   part_type = p.part_type)
+self.__image.add_partition(int(p.size),
+   p.disk,
+   p.mountpoint,
+   p.source_file,
+   p.fstype,
+   p.label,
+   fsopts = p.fsopts,
+   boot = p.active,
+   align = p.align,
+   part_type = p.part_type)
 
-self.__instimage.layout_partitions(self._ptable_format)
+self.__image.layout_partitions(self._ptable_format)
 
 self.__imgdir = self.workdir
-for disk_name, disk in self.__instimage.disks.items():
+for disk_name, disk in self.__image.disks.items():
 full_path = self._full_path(self.__imgdir, disk_name, "direct")
 msger.debug("Adding disk %s as %s with size %s bytes" \
 % (disk_name, full_path, disk['min_size']))
 disk_obj = fs_related.DiskImage(full_path, disk['min_size'])
 self.__disks[disk_name] = disk_obj
-self.__instimage.add_disk(disk_name, disk_obj)
+self.__image.add_disk(disk_name, disk_obj)
 
-self.__instimage.create()
+self.__image.create()
 
-def install(self):
+def assemble(self):
 """
-Install fs images into partitions
+Assemble partitions into disk image(s)
 """
-for disk_name, disk in self.__instimage.disks.items():
+for disk_name, disk in self.__image.disks.items():
 full_path = self._full_path(self.__imgdir, disk_name, "direct")
-msger.debug("Installing disk %s as %s with size %s bytes" \
+msger.debug("Assembling disk %s as %s with size %s bytes" \
 % (disk_name, full_path, disk['min_size']))
-self.__instimage.install(full_path)
+self.__image.assemble(full_path)
 
 def configure(self):
 """
@@ -294,7 +294,7 @@ class DirectImageCreator(BaseImageCreator):
 source_plugin = self.get_default_source_plugin()
 if source_plugin:
 self._source_methods = 
pluginmgr.get_source_plugin_methods(source_plugin, disk_methods)
-for disk_name, disk in self.__instimage.disks.items():
+for disk_name, disk in self.__image.disks.items():
 self._source_methods["do_install_disk"](disk, disk_name, self,
 self.workdir,
 self.oe_builddir,
@@ -310,7 +310,7 @@ class DirectImageCreator(BaseImageCreator):
 
 parts = self._get_parts()
 
-for disk_name, disk in self.__instimage.disks.items():
+for disk_name, disk in self.__image.disks.items():
 full_path = self._full_path(self.__imgdir, disk_name, "direct")
 msg += '  %s\n\n' % 

[OE-core] [PATCH 20/35] wic: Clean up DirectImageCreator

2014-08-08 Thread Tom Zanussi
Remove what wic doesn't use from DirectImageCreator.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/imager/direct.py| 8 +---
 scripts/lib/mic/plugins/imager/direct_plugin.py | 5 +
 2 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/scripts/lib/mic/imager/direct.py b/scripts/lib/mic/imager/direct.py
index 93f0cd9..92473b5 100644
--- a/scripts/lib/mic/imager/direct.py
+++ b/scripts/lib/mic/imager/direct.py
@@ -54,8 +54,7 @@ class DirectImageCreator(BaseImageCreator):
 
 def __init__(self, oe_builddir, image_output_dir, rootfs_dir, bootimg_dir,
  kernel_dir, native_sysroot, hdddir, staging_data_dir,
- creatoropts=None, compress_image=None,
- generate_bmap=None, fstab_entry="uuid"):
+ creatoropts=None):
 """
 Initialize a DirectImageCreator instance.
 
@@ -64,19 +63,14 @@ class DirectImageCreator(BaseImageCreator):
 BaseImageCreator.__init__(self, creatoropts)
 
 self.__instimage = None
-self.__imgdir = None
 self.__disks = {}
 self.__disk_format = "direct"
 self._disk_names = []
 self._ptable_format = self.ks.handler.bootloader.ptable
-self.use_uuid = fstab_entry == "uuid"
-self.compress_image = compress_image
-self.bmap_needed = generate_bmap
 
 self.oe_builddir = oe_builddir
 if image_output_dir:
 self.tmpdir = image_output_dir
-self.cachedir = "%s/cache" % image_output_dir
 self.rootfs_dir = rootfs_dir
 self.bootimg_dir = bootimg_dir
 self.kernel_dir = kernel_dir
diff --git a/scripts/lib/mic/plugins/imager/direct_plugin.py 
b/scripts/lib/mic/plugins/imager/direct_plugin.py
index d3a0ba7..877aaf6 100644
--- a/scripts/lib/mic/plugins/imager/direct_plugin.py
+++ b/scripts/lib/mic/plugins/imager/direct_plugin.py
@@ -88,10 +88,7 @@ class DirectPlugin(ImagerPlugin):
 native_sysroot,
 hdddir,
 staging_data_dir,
-creatoropts,
-None,
-None,
-None)
+creatoropts)
 
 try:
 creator.mount(None, creatoropts["cachedir"])
-- 
1.8.3.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 32/35] wic: Rename MountError

2014-08-08 Thread Tom Zanussi
wic doesn't mount anything, so can't have a mount error; rename it to
something more appropriate.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/imager/direct.py | 4 ++--
 scripts/lib/mic/plugins/source/bootimg-efi.py| 2 +-
 scripts/lib/mic/plugins/source/bootimg-pcbios.py | 4 ++--
 scripts/lib/mic/utils/errors.py  | 5 +
 scripts/lib/mic/utils/partitionedfs.py   | 8 
 5 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/scripts/lib/mic/imager/direct.py b/scripts/lib/mic/imager/direct.py
index a4f5691..2f2bd4e 100644
--- a/scripts/lib/mic/imager/direct.py
+++ b/scripts/lib/mic/imager/direct.py
@@ -32,7 +32,7 @@ import shutil
 from mic import kickstart, msger
 from mic.utils import fs_related, runner, misc
 from mic.utils.partitionedfs import Image
-from mic.utils.errors import CreatorError, MountError
+from mic.utils.errors import CreatorError, ImageError
 from mic.imager.baseimager import BaseImageCreator
 from mic.utils.oe.misc import *
 from mic.plugin import pluginmgr
@@ -358,6 +358,6 @@ class DirectImageCreator(BaseImageCreator):
 if not self.__image is None:
 try:
 self.__image.cleanup()
-except MountError, err:
+except ImageError, err:
 msger.warning("%s" % err)
 
diff --git a/scripts/lib/mic/plugins/source/bootimg-efi.py 
b/scripts/lib/mic/plugins/source/bootimg-efi.py
index e880358..5b1a533 100644
--- a/scripts/lib/mic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/mic/plugins/source/bootimg-efi.py
@@ -77,7 +77,7 @@ class BootimgEFIPlugin(SourcePlugin):
 if cr._ptable_format == 'msdos':
 rootstr = rootdev
 else:
-raise MountError("Unsupported partition table format found")
+raise ImageError("Unsupported partition table format found")
 
 grubefi_conf += "linux %s root=%s rootwait %s\n" \
 % (kernel, rootstr, options)
diff --git a/scripts/lib/mic/plugins/source/bootimg-pcbios.py 
b/scripts/lib/mic/plugins/source/bootimg-pcbios.py
index 53ed7c3..959cf41 100644
--- a/scripts/lib/mic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/mic/plugins/source/bootimg-pcbios.py
@@ -62,7 +62,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
 rc = runner.show(['dd', 'if=%s' % mbrfile,
   'of=%s' % full_path, 'conv=notrunc'])
 if rc != 0:
-raise MountError("Unable to set MBR to %s" % full_path)
+raise ImageError("Unable to set MBR to %s" % full_path)
 
 @classmethod
 def do_configure_partition(self, part, cr, cr_workdir, oe_builddir,
@@ -107,7 +107,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
 if cr._ptable_format == 'msdos':
 rootstr = rootdev
 else:
-raise MountError("Unsupported partition table format found")
+raise ImageError("Unsupported partition table format found")
 
 syslinux_conf += "APPEND label=boot root=%s %s\n" % (rootstr, options)
 
diff --git a/scripts/lib/mic/utils/errors.py b/scripts/lib/mic/utils/errors.py
index 38fda30..86e230a 100644
--- a/scripts/lib/mic/utils/errors.py
+++ b/scripts/lib/mic/utils/errors.py
@@ -40,11 +40,8 @@ class Usage(CreatorError):
 self.msg = str(self.msg)
 return self.keyword + self.msg + ', please use "--help" for more info'
 
-class Abort(CreatorError):
-keyword = ''
-
 class KsError(CreatorError):
 keyword = ''
 
-class MountError(CreatorError):
+class ImageError(CreatorError):
 keyword = ''
diff --git a/scripts/lib/mic/utils/partitionedfs.py 
b/scripts/lib/mic/utils/partitionedfs.py
index f4ce4a9..68e4cab 100644
--- a/scripts/lib/mic/utils/partitionedfs.py
+++ b/scripts/lib/mic/utils/partitionedfs.py
@@ -22,7 +22,7 @@ import os
 
 from mic import msger
 from mic.utils import runner
-from mic.utils.errors import MountError
+from mic.utils.errors import ImageError
 from mic.utils.fs_related import *
 from mic.utils.oe.misc import *
 
@@ -121,7 +121,7 @@ class Image:
 msger.debug("Assigning %s partitions to disks" % ptable_format)
 
 if ptable_format not in ('msdos'):
-raise MountError("Unknown partition table format '%s', supported " 
\
+raise ImageError("Unknown partition table format '%s', supported " 
\
  "formats are: 'msdos'" % ptable_format)
 
 if self._partitions_layed_out:
@@ -134,14 +134,14 @@ class Image:
 p = self.partitions[n]
 
 if not self.disks.has_key(p['disk_name']):
-raise MountError("No disk %s for partition %s" \
+raise ImageError("No disk %s for partition %s" \
  % (p['disk_name'], p['mountpoint']))
 
 if p['part_type']:
 # The --part-type can also be implemented for MBR partitions,
 # in which case it would map to the 1-byte "partition type"
 # filed at

[OE-core] [PATCH 31/35] wic: Rename PartitionedMount

2014-08-08 Thread Tom Zanussi
It's actually a container for disks and partitions, and wic doesn't
mount anything, so rename it to match what it really is.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/imager/direct.py | 15 +++
 scripts/lib/mic/plugins/imager/direct_plugin.py  |  1 -
 scripts/lib/mic/plugins/source/bootimg-efi.py|  1 -
 scripts/lib/mic/plugins/source/bootimg-pcbios.py |  1 -
 scripts/lib/mic/plugins/source/rootfs.py |  1 -
 scripts/lib/mic/utils/partitionedfs.py   |  8 +++-
 6 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/scripts/lib/mic/imager/direct.py b/scripts/lib/mic/imager/direct.py
index 17bfd01..a4f5691 100644
--- a/scripts/lib/mic/imager/direct.py
+++ b/scripts/lib/mic/imager/direct.py
@@ -31,7 +31,7 @@ import shutil
 
 from mic import kickstart, msger
 from mic.utils import fs_related, runner, misc
-from mic.utils.partitionedfs import PartitionedMount
+from mic.utils.partitionedfs import Image
 from mic.utils.errors import CreatorError, MountError
 from mic.imager.baseimager import BaseImageCreator
 from mic.utils.oe.misc import *
@@ -226,7 +226,7 @@ class DirectImageCreator(BaseImageCreator):
 """
 parts = self._get_parts()
 
-self.__image = PartitionedMount()
+self.__image = Image()
 
 for p in parts:
 # as a convenience, set source to the boot partition source
@@ -237,12 +237,11 @@ class DirectImageCreator(BaseImageCreator):
 for p in parts:
 # need to create the filesystems in order to get their
 # sizes before we can add them and do the layout.
-# PartitionedMount.create() actually calls __format_disks()
-# to create the disk images and carve out the partitions,
-# then self.install() calls PartitionedMount.install()
-# which calls __install_partitition() for each partition
-# to dd the fs into the partitions.
-
+# Image.create() actually calls __format_disks() to create
+# the disk images and carve out the partitions, then
+# self.assemble() calls Image.assemble() which calls
+# __write_partitition() for each partition to dd the fs
+# into the partitions.
 fstab = self.__write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
 
 p.prepare(self, self.workdir, self.oe_builddir, self.rootfs_dir,
diff --git a/scripts/lib/mic/plugins/imager/direct_plugin.py 
b/scripts/lib/mic/plugins/imager/direct_plugin.py
index ff30f09..c05a400 100644
--- a/scripts/lib/mic/plugins/imager/direct_plugin.py
+++ b/scripts/lib/mic/plugins/imager/direct_plugin.py
@@ -34,7 +34,6 @@ from mic import msger
 from mic.utils import misc, fs_related, errors, runner, cmdln
 from mic.conf import configmgr
 from mic.plugin import pluginmgr
-from mic.utils.partitionedfs import PartitionedMount
 
 import mic.imager.direct as direct
 from mic.pluginbase import ImagerPlugin
diff --git a/scripts/lib/mic/plugins/source/bootimg-efi.py 
b/scripts/lib/mic/plugins/source/bootimg-efi.py
index d4a7771..e880358 100644
--- a/scripts/lib/mic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/mic/plugins/source/bootimg-efi.py
@@ -33,7 +33,6 @@ from mic import kickstart, msger
 from mic.utils import misc, fs_related, errors, runner, cmdln
 from mic.conf import configmgr
 from mic.plugin import pluginmgr
-from mic.utils.partitionedfs import PartitionedMount
 import mic.imager.direct as direct
 from mic.pluginbase import SourcePlugin
 from mic.utils.oe.misc import *
diff --git a/scripts/lib/mic/plugins/source/bootimg-pcbios.py 
b/scripts/lib/mic/plugins/source/bootimg-pcbios.py
index 3434320..53ed7c3 100644
--- a/scripts/lib/mic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/mic/plugins/source/bootimg-pcbios.py
@@ -33,7 +33,6 @@ from mic import kickstart, msger
 from mic.utils import misc, fs_related, errors, runner, cmdln
 from mic.conf import configmgr
 from mic.plugin import pluginmgr
-from mic.utils.partitionedfs import PartitionedMount
 import mic.imager.direct as direct
 from mic.pluginbase import SourcePlugin
 from mic.utils.oe.misc import *
diff --git a/scripts/lib/mic/plugins/source/rootfs.py 
b/scripts/lib/mic/plugins/source/rootfs.py
index 8cb576d..8ebf62c 100644
--- a/scripts/lib/mic/plugins/source/rootfs.py
+++ b/scripts/lib/mic/plugins/source/rootfs.py
@@ -34,7 +34,6 @@ from mic import kickstart, msger
 from mic.utils import misc, fs_related, errors, runner, cmdln
 from mic.conf import configmgr
 from mic.plugin import pluginmgr
-from mic.utils.partitionedfs import PartitionedMount
 import mic.imager.direct as direct
 from mic.pluginbase import SourcePlugin
 from mic.utils.oe.misc import *
diff --git a/scripts/lib/mic/utils/partitionedfs.py 
b/scripts/lib/mic/utils/partitionedfs.py
index 2f950a6..f4ce4a9 100644
--- a/scripts/lib/mic/utils/partitionedfs.py
+++ b/scripts/lib/mic/utils/partitionedfs.py
@@ -32,7 +32,13 @@ MBR_OVERHEAD = 1
 # Size of a sector in 

[OE-core] [PATCH 25/35] wic: Remove unused conf support

2014-08-08 Thread Tom Zanussi
Also fix up users such as imager functions.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/image/config/wic.conf   |  1 -
 scripts/lib/mic/conf.py | 39 
 scripts/lib/mic/imager/baseimager.py| 13 ++-
 scripts/lib/mic/imager/direct.py|  6 ++--
 scripts/lib/mic/plugins/imager/direct_plugin.py |  4 +--
 scripts/lib/mic/utils/misc.py   | 48 +
 6 files changed, 8 insertions(+), 103 deletions(-)

diff --git a/scripts/lib/image/config/wic.conf 
b/scripts/lib/image/config/wic.conf
index e96d6ae..a51bcb5 100644
--- a/scripts/lib/image/config/wic.conf
+++ b/scripts/lib/image/config/wic.conf
@@ -4,4 +4,3 @@ distro_name = OpenEmbedded
 
 [create]
 ; settings for create subcommand
-runtime=native
diff --git a/scripts/lib/mic/conf.py b/scripts/lib/mic/conf.py
index 1fe6edd..a686e9c 100644
--- a/scripts/lib/mic/conf.py
+++ b/scripts/lib/mic/conf.py
@@ -31,45 +31,18 @@ def get_siteconf():
 return scripts_path + "/lib/image/config/wic.conf"
 
 class ConfigMgr(object):
-prefer_backends = ["zypp", "yum"]
-
 DEFAULTS = {'common': {
 "distro_name": "Default Distribution",
 "plugin_dir": "/usr/lib/wic/plugins", # TODO use prefix 
also?
 },
 'create': {
 "tmpdir": '/var/tmp/wic',
-"cachedir": '/var/tmp/wic/cache',
 "outdir": './wic-output',
 
-"arch": None, # None means auto-detect
-"pkgmgr": "auto",
-"name": "output",
-"ksfile": None,
-"ks": None,
-"repomd": None,
-"local_pkgs_path": None,
 "release": None,
 "logfile": None,
-"record_pkgs": [],
-"pack_to": None,
 "name_prefix": None,
 "name_suffix": None,
-"copy_kernel": False,
-"install_pkgs": None,
-"repourl": {},
-"localrepos": [],  # save localrepos
-"runtime": "bootstrap",
-},
-'chroot': {
-"saveto": None,
-},
-'convert': {
-"shell": False,
-},
-'bootstrap': {
-"rootdir": '/var/tmp/wic-bootstrap',
-"packages": [],
 },
}
 
@@ -116,10 +89,6 @@ class ConfigMgr(object):
 if not ksconf:
 return
 
-ksconf = misc.normalize_ksfile(ksconf,
-   self.create['release'],
-   self.create['arch'])
-
 ks = kickstart.read_kickstart(ksconf)
 
 self.create['ks'] = ks
@@ -130,12 +99,4 @@ class ConfigMgr(object):
   self.create['name_prefix'],
   self.create['name_suffix'])
 
-def set_runtime(self, runtime):
-if runtime not in ("bootstrap", "native"):
-msger.error("Invalid runtime mode: %s" % runtime)
-
-if misc.get_distro()[0] in ("tizen", "Tizen"):
-runtime = "native"
-self.create['runtime'] = runtime
-
 configmgr = ConfigMgr()
diff --git a/scripts/lib/mic/imager/baseimager.py 
b/scripts/lib/mic/imager/baseimager.py
index 55f2dea..0d591ea 100644
--- a/scripts/lib/mic/imager/baseimager.py
+++ b/scripts/lib/mic/imager/baseimager.py
@@ -176,7 +176,7 @@ class BaseImageCreator(object):
 
 runner.show('umount -l %s' % self.workdir)
 
-def mount(self, base_on = None, cachedir = None):
+def mount(self):
 """Setup the target filesystem in preparation for an install.
 
 This function sets up the filesystem which the ImageCreator will
@@ -184,20 +184,11 @@ class BaseImageCreator(object):
 install root directory, bind mounts some system directories (e.g. /dev)
 and writes out /etc/fstab. Other subclasses may also e.g. create a
 sparse file, format it and loopback mount it to the install root.
-
-base_on -- a previous install on which to base this install; defaults
-   to None, causing a new image to be created
-
-cachedir -- a directory in which to store the Yum cache; defaults to
-None, causing a new cache to be created; by setting this
-to another directory, the same cache can be reused across
-multiple installs.
-
 """
 self.__setup_tmpdir()
 self.__ensure_builddir()
 
-self._mount_instroot(base_on)
+self._mount_instroot()
 
 def unmount(self):
 """Unmounts the target filesystem.
diff --git a/scripts/lib/mic/imager/direct.py b/scri

[OE-core] [PATCH 30/35] wic: Update/rename configure-related code

2014-08-08 Thread Tom Zanussi
The wic code inherited a basic image-creation flow based on
image-configuration, but wic doesn't actually configure anything, so
rename parts of the code dealing with configuration to something more
appropriate.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/imager/direct.py| 7 ---
 scripts/lib/mic/plugins/imager/direct_plugin.py | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/scripts/lib/mic/imager/direct.py b/scripts/lib/mic/imager/direct.py
index 8d7b6ee..17bfd01 100644
--- a/scripts/lib/mic/imager/direct.py
+++ b/scripts/lib/mic/imager/direct.py
@@ -284,12 +284,13 @@ class DirectImageCreator(BaseImageCreator):
 % (disk_name, full_path, disk['min_size']))
 self.__image.assemble(full_path)
 
-def configure(self):
+def finalize(self):
 """
-Configure the system image according to kickstart.
+Finalize the disk image.
 
-For now, it just prepares the image to be bootable by e.g.
+For example, prepare the image to be bootable by e.g.
 creating and installing a bootloader configuration.
+
 """
 source_plugin = self.get_default_source_plugin()
 if source_plugin:
diff --git a/scripts/lib/mic/plugins/imager/direct_plugin.py 
b/scripts/lib/mic/plugins/imager/direct_plugin.py
index 2cbd5d1..ff30f09 100644
--- a/scripts/lib/mic/plugins/imager/direct_plugin.py
+++ b/scripts/lib/mic/plugins/imager/direct_plugin.py
@@ -93,7 +93,7 @@ class DirectPlugin(ImagerPlugin):
 try:
 creator.create()
 creator.assemble()
-creator.configure()
+creator.finalize()
 creator.print_outimage_info()
 
 except errors.CreatorError:
-- 
1.8.3.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 11/35] wic: Remove proxy support

2014-08-08 Thread Tom Zanussi
wic doesn't use proxy support, so remove it.

Also remove anything related to proxies in misc and conf, and while
we're at it, remove all the obviously unneeded code from those files -
it's easier to just remove it than to figure out the callchain to the
proxy code usages.

Basically the extra stuff relates to packaging, images, and config
files we don't use.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/conf.py|  58 +--
 scripts/lib/mic/utils/misc.py  | 782 -
 scripts/lib/mic/utils/proxy.py | 183 --
 3 files changed, 1 insertion(+), 1022 deletions(-)
 delete mode 100644 scripts/lib/mic/utils/proxy.py

diff --git a/scripts/lib/mic/conf.py b/scripts/lib/mic/conf.py
index b850d80..1fe6edd 100644
--- a/scripts/lib/mic/conf.py
+++ b/scripts/lib/mic/conf.py
@@ -20,7 +20,7 @@ import ConfigParser
 
 from mic import msger
 from mic import kickstart
-from mic.utils import misc, runner, proxy, errors
+from mic.utils import misc, runner, errors
 
 
 def get_siteconf():
@@ -55,8 +55,6 @@ class ConfigMgr(object):
 "pack_to": None,
 "name_prefix": None,
 "name_suffix": None,
-"proxy": None,
-"no_proxy": None,
 "copy_kernel": False,
 "install_pkgs": None,
 "repourl": {},
@@ -104,16 +102,6 @@ class ConfigMgr(object):
 for sec, vals in self.DEFAULTS.iteritems():
 setattr(self, sec, vals)
 
-def __set_siteconf(self, siteconf):
-try:
-self.__siteconf = siteconf
-self._parse_siteconf(siteconf)
-except ConfigParser.Error, error:
-raise errors.ConfigError("%s" % error)
-def __get_siteconf(self):
-return self.__siteconf
-_siteconf = property(__get_siteconf, __set_siteconf)
-
 def __set_ksconf(self, ksconf):
 if not os.path.isfile(ksconf):
 msger.error('Cannot find ks file: %s' % ksconf)
@@ -124,50 +112,6 @@ class ConfigMgr(object):
 return self.__ksconf
 _ksconf = property(__get_ksconf, __set_ksconf)
 
-def _parse_siteconf(self, siteconf):
-if not siteconf:
-return
-
-if not os.path.exists(siteconf):
-msger.warning("cannot read config file: %s" % siteconf)
-return
-
-parser = ConfigParser.SafeConfigParser()
-parser.read(siteconf)
-
-for section in parser.sections():
-if section in self.DEFAULTS:
-getattr(self, section).update(dict(parser.items(section)))
-
-# append common section items to other sections
-for section in self.DEFAULTS.keys():
-if section != "common":
-getattr(self, section).update(self.common)
-
-# check and normalize the scheme of proxy url
-if self.create['proxy']:
-m = re.match('^(\w+)://.*', self.create['proxy'])
-if m:
-scheme = m.group(1)
-if scheme not in ('http', 'https', 'ftp', 'socks'):
-msger.error("%s: proxy scheme is incorrect" % siteconf)
-else:
-msger.warning("%s: proxy url w/o scheme, use http as default"
-  % siteconf)
-self.create['proxy'] = "http://"; + self.create['proxy']
-
-proxy.set_proxies(self.create['proxy'], self.create['no_proxy'])
-
-# bootstrap option handling
-self.set_runtime(self.create['runtime'])
-if isinstance(self.bootstrap['packages'], basestring):
-packages = self.bootstrap['packages'].replace('\n', ' ')
-if packages.find(',') != -1:
-packages = packages.split(',')
-else:
-packages = packages.split()
-self.bootstrap['packages'] = packages
-
 def _parse_kickstart(self, ksconf=None):
 if not ksconf:
 return
diff --git a/scripts/lib/mic/utils/misc.py b/scripts/lib/mic/utils/misc.py
index 95241d7..8c1f016 100644
--- a/scripts/lib/mic/utils/misc.py
+++ b/scripts/lib/mic/utils/misc.py
@@ -42,15 +42,8 @@ xmlparse = cElementTree.parse
 from mic import msger
 from mic.utils.errors import CreatorError, SquashfsError
 from mic.utils.fs_related import find_binary_path, makedirs
-from mic.utils.proxy import get_proxy_for
 from mic.utils import runner
 
-
-RPM_RE  = re.compile("(.*)\.(.*) (.*)-(.*)")
-RPM_FMT = "%(name)s.%(arch)s %(version)s-%(release)s"
-SRPM_RE = re.compile("(.*)-(\d+.*)-(\d+\.\d+).src.rpm")
-
-
 def build_name(kscfg, release=None, prefix = None, suffix = None):
 """Construct and return an image name string.
 
@@ -123,136 +116,6 @@ def get_distro_str():
 
 _LOOP_RULE_PTH = None
 
-def hide_loopdev_presentation():
-udev_rules = "80-prevent-loop-present.rules"
-udev_rules_dir = [
-   '/usr/lib/udev/rules.d/',
-   '/lib/udev/rules.d/',
-

[OE-core] [PATCH 13/35] wic: Remove unused fs_related code

2014-08-08 Thread Tom Zanussi
wic doesn't use it, so remove it.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/utils/fs_related.py | 930 
 1 file changed, 930 deletions(-)

diff --git a/scripts/lib/mic/utils/fs_related.py 
b/scripts/lib/mic/utils/fs_related.py
index 182171f..e6e362d 100644
--- a/scripts/lib/mic/utils/fs_related.py
+++ b/scripts/lib/mic/utils/fs_related.py
@@ -31,19 +31,6 @@ from mic.utils import runner
 from mic.utils.errors import *
 from mic.utils.oe.misc import *
 
-def find_binary_inchroot(binary, chroot):
-paths = ["/usr/sbin",
- "/usr/bin",
- "/sbin",
- "/bin"
-]
-
-for path in paths:
-bin_path = "%s/%s" % (path, binary)
-if os.path.exists("%s/%s" % (chroot, bin_path)):
-return bin_path
-return None
-
 def find_binary_path(binary):
 if os.environ.has_key("PATH"):
 paths = os.environ["PATH"].split(":")
@@ -72,176 +59,6 @@ def makedirs(dirname):
 if err.errno != errno.EEXIST:
 raise
 
-def mksquashfs(in_img, out_img):
-fullpathmksquashfs = find_binary_path("mksquashfs")
-args = [fullpathmksquashfs, in_img, out_img]
-
-if not sys.stdout.isatty():
-args.append("-no-progress")
-
-ret = runner.show(args)
-if ret != 0:
-raise SquashfsError("'%s' exited with error (%d)" % (' '.join(args), 
ret))
-
-def resize2fs(fs, size):
-resize2fs = find_binary_path("resize2fs")
-if size == 0:
-# it means to minimalize it
-return runner.show([resize2fs, '-M', fs])
-else:
-return runner.show([resize2fs, fs, "%sK" % (size / 1024,)])
-
-def my_fuser(fp):
-fuser = find_binary_path("fuser")
-if not os.path.exists(fp):
-return False
-
-rc = runner.quiet([fuser, "-s", fp])
-if rc == 0:
-for pid in runner.outs([fuser, fp]).split():
-fd = open("/proc/%s/cmdline" % pid, "r")
-cmdline = fd.read()
-fd.close()
-if cmdline[:-1] == "/bin/bash":
-return True
-
-# not found
-return False
-
-class BindChrootMount:
-"""Represents a bind mount of a directory into a chroot."""
-def __init__(self, src, chroot, dest = None, option = None):
-self.root = os.path.abspath(os.path.expanduser(chroot))
-self.option = option
-
-self.orig_src = self.src = src
-if os.path.islink(src):
-self.src = os.readlink(src)
-if not self.src.startswith('/'):
-self.src = os.path.abspath(os.path.join(os.path.dirname(src),
-self.src))
-
-if not dest:
-dest = self.src
-self.dest = os.path.join(self.root, dest.lstrip('/'))
-
-self.mounted = False
-self.mountcmd = find_binary_path("mount")
-self.umountcmd = find_binary_path("umount")
-
-def ismounted(self):
-with open('/proc/mounts') as f:
-for line in f:
-if line.split()[1] == os.path.abspath(self.dest):
-return True
-
-return False
-
-def has_chroot_instance(self):
-lock = os.path.join(self.root, ".chroot.lock")
-return my_fuser(lock)
-
-def mount(self):
-if self.mounted or self.ismounted():
-return
-
-makedirs(self.dest)
-rc = runner.show([self.mountcmd, "--bind", self.src, self.dest])
-if rc != 0:
-raise MountError("Bind-mounting '%s' to '%s' failed" %
- (self.src, self.dest))
-if self.option:
-rc = runner.show([self.mountcmd, "--bind", "-o", "remount,%s" % 
self.option, self.dest])
-if rc != 0:
-raise MountError("Bind-remounting '%s' failed" % self.dest)
-
-self.mounted = True
-if os.path.islink(self.orig_src):
-dest = os.path.join(self.root, self.orig_src.lstrip('/'))
-if not os.path.exists(dest):
-os.symlink(self.src, dest)
-
-def unmount(self):
-if self.has_chroot_instance():
-return
-
-if self.ismounted():
-runner.show([self.umountcmd, "-l", self.dest])
-self.mounted = False
-
-class LoopbackMount:
-"""LoopbackMount  compatibility layer for old API"""
-def __init__(self, lofile, mountdir, fstype = None):
-self.diskmount = DiskMount(LoopbackDisk(lofile,size = 
0),mountdir,fstype,rmmountdir = True)
-self.losetup = False
-self.losetupcmd = find_binary_path("losetup")
-
-def cleanup(self):
-self.diskmount.cleanup()
-
-def unmount(self):
-self.diskmount.unmount()
-
-def lounsetup(self):
-if self.losetup:
-runner.show([self.losetupcmd, "-d", self.loopdev])
-self.losetup = False
-self.loopdev = None
-
-def loopsetup(self):
-if self.losetup:
-return
-
-self.loop

[OE-core] [PATCH 06/35] wic: Remove rt_util

2014-08-08 Thread Tom Zanussi
More package-related stuff we don't need.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/rt_util.py | 223 -
 1 file changed, 223 deletions(-)
 delete mode 100644 scripts/lib/mic/rt_util.py

diff --git a/scripts/lib/mic/rt_util.py b/scripts/lib/mic/rt_util.py
deleted file mode 100644
index 2a31f4a..000
--- a/scripts/lib/mic/rt_util.py
+++ /dev/null
@@ -1,223 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2009, 2010, 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from __future__ import with_statement
-import os
-import sys
-import glob
-import re
-import shutil
-import subprocess
-
-from mic import bootstrap, msger
-from mic.conf import configmgr
-from mic.utils import errors, proxy
-from mic.utils.fs_related import find_binary_path, makedirs
-from mic.chroot import setup_chrootenv, cleanup_chrootenv
-
-expath = lambda p: os.path.abspath(os.path.expanduser(p))
-
-def bootstrap_mic(argv=None):
-
-
-def mychroot():
-os.chroot(rootdir)
-os.chdir(cwd)
-
-# by default, sys.argv is used to run mic in bootstrap
-if not argv:
-argv = sys.argv
-if argv[0] not in ('/usr/bin/mic', 'mic'):
-argv[0] = '/usr/bin/mic'
-
-cropts = configmgr.create
-bsopts = configmgr.bootstrap
-distro = bsopts['distro_name'].lower()
-
-rootdir = bsopts['rootdir']
-pkglist = bsopts['packages']
-cwd = os.getcwd()
-
-# create bootstrap and run mic in bootstrap
-bsenv = bootstrap.Bootstrap(rootdir, distro, cropts['arch'])
-bsenv.logfile = cropts['logfile']
-# rootdir is regenerated as a temp dir
-rootdir = bsenv.rootdir
-
-if 'optional' in bsopts:
-optlist = bsopts['optional']
-else:
-optlist = []
-
-try:
-msger.info("Creating %s bootstrap ..." % distro)
-bsenv.create(cropts['repomd'], pkglist, optlist)
-
-# bootstrap is relocated under "bootstrap"
-if os.path.exists(os.path.join(rootdir, "bootstrap")):
-rootdir = os.path.join(rootdir, "bootstrap")
-
-bsenv.dirsetup(rootdir)
-sync_mic(rootdir)
-
-#FIXME: sync the ks file to bootstrap
-if "/" == os.path.dirname(os.path.abspath(configmgr._ksconf)):
-safecopy(configmgr._ksconf, rootdir)
-
-msger.info("Start mic in bootstrap: %s\n" % rootdir)
-bindmounts = get_bindmounts(cropts)
-ret = bsenv.run(argv, cwd, rootdir, bindmounts)
-
-except errors.BootstrapError, err:
-msger.warning('\n%s' % err)
-if msger.ask("Switch to native mode and continue?"):
-return
-raise
-except RuntimeError, err:
-#change exception type but keep the trace back
-value, tb = sys.exc_info()[1:]
-raise errors.BootstrapError, value, tb
-else:
-sys.exit(ret)
-finally:
-bsenv.cleanup()
-
-def get_bindmounts(cropts):
-binddirs =  [
-  os.getcwd(),
-  cropts['tmpdir'],
-  cropts['cachedir'],
-  cropts['outdir'],
-  cropts['local_pkgs_path'],
-]
-bindfiles = [
-  cropts['logfile'],
-  configmgr._ksconf,
-]
-
-for lrepo in cropts['localrepos']:
-binddirs.append(lrepo)
-
-bindlist = map(expath, filter(None, binddirs))
-bindlist += map(os.path.dirname, map(expath, filter(None, bindfiles)))
-bindlist = sorted(set(bindlist))
-bindmounts = ';'.join(bindlist)
-return bindmounts
-
-
-def get_mic_binpath():
-fp = None
-try:
-import pkg_resources # depends on 'setuptools'
-except ImportError:
-pass
-else:
-dist = pkg_resources.get_distribution('mic')
-# the real script is under EGG_INFO/scripts
-if dist.has_metadata('scripts/mic'):
-fp = os.path.join(dist.egg_info, "scripts/mic")
-
-if fp:
-return fp
-
-# not found script if 'flat' egg installed
-try:
-return find_binary_path('mic')
-except errors.CreatorError:
-raise errors.BootstrapError("Can't find mic binary in host OS")
-
-
-def get_mic_modpath():
-try:
-import mic
-except ImportError:
-raise errors.BootstrapError("Can't find mic module in host OS")
-path = os.path.abspath(mic

[OE-core] [PATCH 33/35] wic: Update Disk description

2014-08-08 Thread Tom Zanussi
Remove obsolete comment.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/utils/fs_related.py | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/scripts/lib/mic/utils/fs_related.py 
b/scripts/lib/mic/utils/fs_related.py
index 07a5ff9..cf2a759 100644
--- a/scripts/lib/mic/utils/fs_related.py
+++ b/scripts/lib/mic/utils/fs_related.py
@@ -60,11 +60,8 @@ def makedirs(dirname):
 raise
 
 class Disk:
-"""Generic base object for a disk
-
-The 'create' method must make the disk visible as a block device - eg
-by calling losetup. For RawDisk, this is obviously a no-op. The 'cleanup'
-method must undo the 'create' operation.
+"""
+Generic base object for a disk.
 """
 def __init__(self, size, device = None):
 self._device = device
-- 
1.8.3.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 15/35] wic: Remove 3rdparty/urlgrabber

2014-08-08 Thread Tom Zanussi
wic doesn't use it, so remove it.

Signed-off-by: Tom Zanussi 
---
 .../3rdparty/pykickstart/urlgrabber/__init__.py|   53 -
 .../3rdparty/pykickstart/urlgrabber/byterange.py   |  463 --
 .../mic/3rdparty/pykickstart/urlgrabber/grabber.py | 1477 
 .../3rdparty/pykickstart/urlgrabber/keepalive.py   |  617 
 .../mic/3rdparty/pykickstart/urlgrabber/mirror.py  |  458 --
 .../3rdparty/pykickstart/urlgrabber/progress.py|  530 ---
 .../3rdparty/pykickstart/urlgrabber/sslfactory.py  |   90 --
 7 files changed, 3688 deletions(-)
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/__init__.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/byterange.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/grabber.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/keepalive.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/mirror.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/urlgrabber/progress.py
 delete mode 100644 
scripts/lib/mic/3rdparty/pykickstart/urlgrabber/sslfactory.py

Patch too large to post - see git repository.

-- 
1.8.3.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 22/35] wic: Clean up Creator

2014-08-08 Thread Tom Zanussi
wic doesn't use a lot of Creator, so remove it.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/creator.py | 176 ++---
 1 file changed, 6 insertions(+), 170 deletions(-)

diff --git a/scripts/lib/mic/creator.py b/scripts/lib/mic/creator.py
index 267928f..7c9ca6f 100644
--- a/scripts/lib/mic/creator.py
+++ b/scripts/lib/mic/creator.py
@@ -44,7 +44,7 @@ class Creator(cmdln.Cmdln):
 # mix-in do_subcmd interface
 for subcmd, klass in pluginmgr.get_plugins('imager').iteritems():
 if not hasattr(klass, 'do_create'):
-msger.warning("Unsurpport subcmd: %s" % subcmd)
+msger.warning("Unsupported subcmd: %s" % subcmd)
 continue
 
 func = getattr(klass, 'do_create')
@@ -65,59 +65,12 @@ class Creator(cmdln.Cmdln):
 optparser.add_option('-c', '--config', type='string', dest='config',
  default=None,
  help='Specify config file for mic')
-optparser.add_option('-k', '--cachedir', type='string', action='store',
- dest='cachedir', default=None,
- help='Cache directory to store the downloaded')
 optparser.add_option('-o', '--outdir', type='string', action='store',
  dest='outdir', default=None,
  help='Output directory')
-optparser.add_option('-A', '--arch', type='string', dest='arch',
- default=None,
- help='Specify repo architecture')
-optparser.add_option('', '--release', type='string', dest='release',
- default=None, metavar='RID',
- help='Generate a release of RID with all 
necessary'
-  ' files, when @BUILD_ID@ is contained in '
-  'kickstart file, it will be replaced by RID')
-optparser.add_option("", "--record-pkgs", type="string",
- dest="record_pkgs", default=None,
- help='Record the info of installed packages, '
-  'multiple values can be specified which '
-  'joined by ",", valid values: "name", '
-  '"content", "license", "vcs"')
-optparser.add_option('', '--pkgmgr', type='string', dest='pkgmgr',
- default=None,
- help='Specify backend package manager')
-optparser.add_option('', '--local-pkgs-path', type='string',
- dest='local_pkgs_path', default=None,
- 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')
-# --taring-to is alias to --pack-to
-optparser.add_option('', '--taring-to', type='string',
- dest='pack_to', default=None,
- help=SUPPRESS_HELP)
-optparser.add_option('', '--pack-to', type='string',
- dest='pack_to', default=None,
- help='Pack the images together into the specified'
-  ' achive, extension supported: .zip, .tar, '
-  '.tar.gz, .tar.bz2, etc. by default, .tar '
-  'will be used')
-optparser.add_option('', '--copy-kernel', action='store_true',
- dest='copy_kernel',
- help='Copy kernel files from image /boot 
directory'
-  ' to the image output directory.')
-optparser.add_option('', '--install-pkgs', type='string', 
action='store',
- dest='install_pkgs', default=None,
- help='Specify what type of packages to be 
installed,'
-  ' valid: source, debuginfo, debugsource')
 optparser.add_option('', '--tmpfs', action='store_true', 
dest='enabletmpfs',
  help='Setup tmpdir as tmpfs to accelerate, 
experimental'
   ' feature, use it if you have more than 4G 
memory')
-optparser.add_option('', '--repourl', action='append',
- dest='repourl', default=[],
- help=SUPPRESS_HELP)
 return optparser
 
 def preoptparse(self, argv):
@@ -183,78 +136,16 @@ class Creator(cmdln.Cmdln):
 
 if self.options.outdir is not None:
 configmgr.create['outdir'] = abspath(self.options.outdir)
-if self.options.cachedir is not None:
-configmg

[OE-core] [PATCH 27/35] wic: Update/rename/delete mount-related code

2014-08-08 Thread Tom Zanussi
The wic code inherited a basic image-creation flow based on mounting
loop devices, but wic doesn't actually mount anything, so rename parts
of the code dealing with mounting to something more appropriate, and
remove related unused code.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/imager/baseimager.py| 47 +
 scripts/lib/mic/imager/direct.py| 42 ++
 scripts/lib/mic/plugins/imager/direct_plugin.py |  2 +-
 scripts/lib/mic/utils/partitionedfs.py  | 37 ++-
 4 files changed, 22 insertions(+), 106 deletions(-)

diff --git a/scripts/lib/mic/imager/baseimager.py 
b/scripts/lib/mic/imager/baseimager.py
index 0d591ea..7f32dd5 100644
--- a/scripts/lib/mic/imager/baseimager.py
+++ b/scripts/lib/mic/imager/baseimager.py
@@ -97,41 +97,15 @@ class BaseImageCreator(object):
 
 
 #
-# Properties
-#
-def __get_instroot(self):
-if self.__builddir is None:
-raise CreatorError("_instroot is not valid before calling mount()")
-return self.__builddir + "/install_root"
-_instroot = property(__get_instroot)
-"""The location of the install root directory.
-
-This is the directory into which the system is installed. Subclasses may
-mount a filesystem image here or copy files to/from here.
-
-Note, this directory does not exist before ImageCreator.mount() is called.
-
-Note also, this is a read-only attribute.
-
-"""
-
-
-#
 # Hooks for subclasses
 #
-def _mount_instroot(self, base_on = None):
-"""Mount or prepare the install root directory.
+def _create(self):
+"""Create partitions for the disk image(s)
 
-This is the hook where subclasses may prepare the install root by e.g.
-mounting creating and loopback mounting a filesystem image to
-_instroot.
+This is the hook where subclasses may create the partitions
+that will be assembled into disk image(s).
 
 There is no default implementation.
-
-base_on -- this is the value passed to mount() and can be interpreted
-   as the subclass wishes; it might e.g. be the location of
-   a previously created ISO containing a system image.
-
 """
 pass
 
@@ -176,19 +150,16 @@ class BaseImageCreator(object):
 
 runner.show('umount -l %s' % self.workdir)
 
-def mount(self):
-"""Setup the target filesystem in preparation for an install.
+def create(self):
+"""Create partitions for the disk image(s)
 
-This function sets up the filesystem which the ImageCreator will
-install into and configure. The ImageCreator class merely creates an
-install root directory, bind mounts some system directories (e.g. /dev)
-and writes out /etc/fstab. Other subclasses may also e.g. create a
-sparse file, format it and loopback mount it to the install root.
+Create the partitions that will be assembled into disk
+image(s).
 """
 self.__setup_tmpdir()
 self.__ensure_builddir()
 
-self._mount_instroot()
+self._create()
 
 def unmount(self):
 """Unmounts the target filesystem.
diff --git a/scripts/lib/mic/imager/direct.py b/scripts/lib/mic/imager/direct.py
index 2e6914b..b96740d 100644
--- a/scripts/lib/mic/imager/direct.py
+++ b/scripts/lib/mic/imager/direct.py
@@ -79,9 +79,10 @@ class DirectImageCreator(BaseImageCreator):
 self.staging_data_dir = staging_data_dir
 
 def __write_fstab(self, image_rootfs):
-"""overriden to generate fstab (temporarily) in rootfs. This
-is called from mount_instroot, make sure it doesn't get called
-from BaseImage.mount()"""
+"""overriden to generate fstab (temporarily) in rootfs. This is called
+from _create, make sure it doesn't get called from
+BaseImage.create()
+"""
 if image_rootfs is None:
 return None
 
@@ -217,29 +218,15 @@ class DirectImageCreator(BaseImageCreator):
 #
 # Actual implemention
 #
-def _mount_instroot(self):
+def _create(self):
 """
-For 'wic', we already have our build artifacts and don't want
-to loop mount anything to install into, we just create
+For 'wic', we already have our build artifacts - we just create
 filesystems from the artifacts directly and combine them into
 a partitioned image.
-
-We still want to reuse as much of the basic mic machinery
-though; despite the fact that we don't actually do loop or any
-other kind of mounting we still want to do many of the same
-things to prepare images, so we basically just adapt to the
-basic framework and reinterpret what 'mounting' means in our
-context.
-
-_instroot would normally be something like
-/var/tmp/wic/build/imgcreate-s_9AKQ/install_root, f

[OE-core] [PATCH 19/35] wic: Clean up BaseImageCreator

2014-08-08 Thread Tom Zanussi
wic doesn't use a lot of BaseImageCreator, so remove it.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/imager/baseimager.py | 1030 +-
 scripts/lib/mic/imager/direct.py |4 +-
 2 files changed, 9 insertions(+), 1025 deletions(-)

diff --git a/scripts/lib/mic/imager/baseimager.py 
b/scripts/lib/mic/imager/baseimager.py
index b721249..55f2dea 100644
--- a/scripts/lib/mic/imager/baseimager.py
+++ b/scripts/lib/mic/imager/baseimager.py
@@ -18,37 +18,31 @@
 
 from __future__ import with_statement
 import os, sys
-import stat
 import tempfile
 import shutil
-import subprocess
-import re
-import tarfile
-import glob
 
 from mic import kickstart
 from mic import msger
-from mic.utils.errors import CreatorError, Abort
+from mic.utils.errors import CreatorError
 from mic.utils import misc, runner, fs_related as fs
 
 class BaseImageCreator(object):
-"""Installs a system to a chroot directory.
+"""Base class for image creation.
 
-ImageCreator is the simplest creator class available; it will install and
-configure a system image according to the supplied kickstart file.
+BaseImageCreator is the simplest creator class available; it will
+create a system image according to the supplied kickstart file.
 
 e.g.
 
   import mic.imgcreate as imgcreate
   ks = imgcreate.read_kickstart("foo.ks")
   imgcreate.ImageCreator(ks, "foo").create()
-
 """
 
 def __del__(self):
 self.cleanup()
 
-def __init__(self, createopts = None, pkgmgr = None):
+def __init__(self, createopts = None):
 """Initialize an ImageCreator instance.
 
 ks -- a pykickstart.KickstartParser instance; this instance will be
@@ -59,36 +53,19 @@ class BaseImageCreator(object):
 filesystem labels
 """
 
-self.pkgmgr = pkgmgr
-
 self.__builddir = None
-self.__bindmounts = []
 
 self.ks = None
 self.name = "target"
 self.tmpdir = "/var/tmp/wic"
-self.cachedir = "/var/tmp/wic/cache"
 self.workdir = "/var/tmp/wic/build"
 
-self.destdir = "."
-self.installerfw_prefix = "INSTALLERFW_"
-self.target_arch = "noarch"
-self._local_pkgs_path = None
-self.pack_to = None
-self.repourl = {}
-
-# If the kernel is save to the destdir when copy_kernel cmd is called.
-self._need_copy_kernel = False
 # setup tmpfs tmpdir when enabletmpfs is True
 self.enabletmpfs = False
 
 if createopts:
 # Mapping table for variables that have different names.
-optmap = {"pkgmgr" : "pkgmgr_name",
-  "outdir" : "destdir",
-  "arch" : "target_arch",
-  "local_pkgs_path" : "_local_pkgs_path",
-  "copy_kernel" : "_need_copy_kernel",
+optmap = {"outdir" : "destdir",
  }
 
 # update setting from createopts
@@ -101,41 +78,11 @@ class BaseImageCreator(object):
 
 self.destdir = os.path.abspath(os.path.expanduser(self.destdir))
 
-if 'release' in createopts and createopts['release']:
-self.name = createopts['release'] + '_' + self.name
-
-if self.pack_to:
-if '@NAME@' in self.pack_to:
-self.pack_to = self.pack_to.replace('@NAME@', self.name)
-(tar, ext) = os.path.splitext(self.pack_to)
-if ext in (".gz", ".bz2") and tar.endswith(".tar"):
-ext = ".tar" + ext
-if ext not in misc.pack_formats:
-self.pack_to += ".tar"
-
-self._dep_checks = ["ls", "bash", "cp", "echo", "modprobe"]
+self._dep_checks = ["ls", "bash", "cp", "echo"]
 
 # Output image file names
 self.outimage = []
 
-# A flag to generate checksum
-self._genchecksum = False
-
-self._alt_initrd_name = None
-
-self._recording_pkgs = []
-
-# available size in root fs, init to 0
-self._root_fs_avail = 0
-
-# Name of the disk image file that is created.
-self._img_name = None
-
-self.image_format = None
-
-# Save qemu emulator file name in order to clean up it finally
-self.qemu_emulator = None
-
 # No ks provided when called by convertor, so skip the dependency check
 if self.ks:
 # If we have btrfs partition we need to check necessary tools
@@ -144,31 +91,9 @@ class BaseImageCreator(object):
 self._dep_checks.append("mkfs.btrfs")
 break
 
-if self.target_arch and self.target_arch.startswith("arm"):
-for dep in self._dep_checks:
-if dep == "extlinux":
-self._dep_checks.remove(dep)
-
-if not os.path.exists("/usr/bin/qemu-arm") or \
-   not misc.is_statically_linked("/usr/bin/qemu-

[OE-core] [PATCH 23/35] wic: Remove unused command versioning support

2014-08-08 Thread Tom Zanussi
The default is F16 and there's no reason to change that, so remove
everything else.

Signed-off-by: Tom Zanussi 
---
 .../3rdparty/pykickstart/commands/bootloader.py|  49 --
 .../mic/3rdparty/pykickstart/commands/partition.py |  39 -
 .../mic/3rdparty/pykickstart/handlers/control.py   | 169 -
 .../lib/mic/3rdparty/pykickstart/handlers/f10.py   |  24 ---
 .../lib/mic/3rdparty/pykickstart/handlers/f11.py   |  24 ---
 .../lib/mic/3rdparty/pykickstart/handlers/f12.py   |  24 ---
 .../lib/mic/3rdparty/pykickstart/handlers/f13.py   |  24 ---
 .../lib/mic/3rdparty/pykickstart/handlers/f14.py   |  24 ---
 .../lib/mic/3rdparty/pykickstart/handlers/f15.py   |  24 ---
 .../lib/mic/3rdparty/pykickstart/handlers/f7.py|  24 ---
 .../lib/mic/3rdparty/pykickstart/handlers/f8.py|  24 ---
 .../lib/mic/3rdparty/pykickstart/handlers/f9.py|  24 ---
 .../lib/mic/3rdparty/pykickstart/handlers/fc3.py   |  24 ---
 .../lib/mic/3rdparty/pykickstart/handlers/fc4.py   |  24 ---
 .../lib/mic/3rdparty/pykickstart/handlers/fc5.py   |  24 ---
 .../lib/mic/3rdparty/pykickstart/handlers/fc6.py   |  24 ---
 .../lib/mic/3rdparty/pykickstart/handlers/rhel3.py |  24 ---
 .../lib/mic/3rdparty/pykickstart/handlers/rhel4.py |  24 ---
 .../lib/mic/3rdparty/pykickstart/handlers/rhel5.py |  24 ---
 .../lib/mic/3rdparty/pykickstart/handlers/rhel6.py |  24 ---
 20 files changed, 665 deletions(-)
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f10.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f11.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f12.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f13.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f14.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f15.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f7.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f8.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/f9.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/fc3.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/fc4.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/fc5.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/fc6.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/rhel3.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/rhel4.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/rhel5.py
 delete mode 100644 scripts/lib/mic/3rdparty/pykickstart/handlers/rhel6.py

diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/bootloader.py 
b/scripts/lib/mic/3rdparty/pykickstart/commands/bootloader.py
index b227fac..c2b552f 100644
--- a/scripts/lib/mic/3rdparty/pykickstart/commands/bootloader.py
+++ b/scripts/lib/mic/3rdparty/pykickstart/commands/bootloader.py
@@ -214,52 +214,3 @@ class F15_Bootloader(F14_Bootloader):
 op.add_option("--iscrypted", dest="isCrypted", action="store_true", 
default=False)
 op.add_option("--md5pass", action="callback", callback=password_cb, 
nargs=1, type="string")
 return op
-
-class RHEL5_Bootloader(FC4_Bootloader):
-removedKeywords = FC4_Bootloader.removedKeywords
-removedAttrs = FC4_Bootloader.removedAttrs
-
-def __init__(self, writePriority=10, *args, **kwargs):
-FC4_Bootloader.__init__(self, writePriority, *args, **kwargs)
-
-self.hvArgs = kwargs.get("hvArgs", "")
-
-def _getArgsAsStr(self):
-ret = FC4_Bootloader._getArgsAsStr(self)
-
-if self.hvArgs:
-ret += " --hvargs=\"%s\"" %(self.hvArgs,)
-
-return ret
-
-def _getParser(self):
-op = FC4_Bootloader._getParser(self)
-op.add_option("--hvargs", dest="hvArgs", type="string")
-return op
-
-class RHEL6_Bootloader(F12_Bootloader):
-removedKeywords = F12_Bootloader.removedKeywords
-removedAttrs = F12_Bootloader.removedAttrs
-
-def __init__(self, writePriority=10, *args, **kwargs):
-F12_Bootloader.__init__(self, writePriority, *args, **kwargs)
-
-self.isCrypted = kwargs.get("isCrypted", False)
-
-def _getArgsAsStr(self):
-ret = F12_Bootloader._getArgsAsStr(self)
-
-if self.isCrypted:
-ret += " --iscrypted"
-
-return ret
-
-def _getParser(self):
-def password_cb(option, opt_str, value, parser):
-parser.values.isCrypted = True
-parser.values.password = value
-
-op = F12_Bootloader._getParser(self)
-op.add_option("--iscrypted", dest="isCrypted", action="store_true", 
default=False)
-op.add_option("--md5pass", action="callback", callback=password_cb, 
nargs=1, type="string")
-return op
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/partition.py 
b/scripts/lib/mic/3rdparty/pykickstart/commands/partition.py
index e65e012..

[OE-core] [PATCH 21/35] wic: Clean up PartitionedMount

2014-08-08 Thread Tom Zanussi
wic doesn't use a lot of ParitionedMount, so remove it.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/utils/partitionedfs.py | 355 +
 1 file changed, 2 insertions(+), 353 deletions(-)

diff --git a/scripts/lib/mic/utils/partitionedfs.py 
b/scripts/lib/mic/utils/partitionedfs.py
index 0c4c9ec..ef92125 100644
--- a/scripts/lib/mic/utils/partitionedfs.py
+++ b/scripts/lib/mic/utils/partitionedfs.py
@@ -33,18 +33,13 @@ MBR_OVERHEAD = 1
 SECTOR_SIZE = 512
 
 class PartitionedMount(Mount):
-def __init__(self, mountdir, skipformat = False):
+def __init__(self, mountdir):
 Mount.__init__(self, mountdir)
 self.disks = {}
 self.partitions = []
-self.subvolumes = []
-self.mapped = False
 self.mountOrder = []
 self.unmountOrder = []
 self.parted = find_binary_path("parted")
-self.btrfscmd=None
-self.skipformat = skipformat
-self.snapshot_created = self.skipformat
 # Size of a sector used in calculations
 self.sector_size = SECTOR_SIZE
 self._partitions_layed_out = False
@@ -62,7 +57,6 @@ class PartitionedMount(Mount):
 
 self.disks[disk_name] = \
 { 'disk': None, # Disk object
-  'mapped': False,  # True if kpartx mapping exists
   'numpart': 0, # Number of allocate partitions
   'partitions': [], # Indexes to self.partitions
   'offset': 0,  # Offset of next partition (in sectors)
@@ -98,40 +92,8 @@ class PartitionedMount(Mount):
 # Converting MB to sectors for parted
 size = size * 1024 * 1024 / self.sector_size
 
-# We need to handle subvolumes for btrfs
-if fstype == "btrfs" and fsopts and fsopts.find("subvol=") != -1:
-self.btrfscmd=find_binary_path("btrfs")
-subvol = None
-opts = fsopts.split(",")
-for opt in opts:
-if opt.find("subvol=") != -1:
-subvol = opt.replace("subvol=", "").strip()
-break
-if not subvol:
-raise MountError("No subvolume: %s" % fsopts)
-self.subvolumes.append({'size': size, # In sectors
-'mountpoint': mountpoint, # Mount relative 
to chroot
-'fstype': fstype, # Filesystem type
-'fsopts': fsopts, # Filesystem mount 
options
-'disk_name': disk_name, # physical disk 
name holding partition
-'device': None, # kpartx device node for 
partition
-'mount': None, # Mount object
-'subvol': subvol, # Subvolume name
-'boot': boot, # Bootable flag
-'mounted': False # Mount flag
-   })
-
 # We still need partition for "/" or non-subvolume
-if mountpoint == "/" or not fsopts or fsopts.find("subvol=") == -1:
-# Don't need subvolume for "/" because it will be set as default 
subvolume
-if fsopts and fsopts.find("subvol=") != -1:
-opts = fsopts.split(",")
-for opt in opts:
-if opt.strip().startswith("subvol="):
-opts.remove(opt)
-break
-fsopts = ",".join(opts)
-
+if mountpoint == "/" or not fsopts:
 part = { 'ks_pnum' : ks_pnum, # Partition number in the KS file
  'size': size, # In sectors
  'mountpoint': mountpoint, # Mount relative to chroot
@@ -283,10 +245,6 @@ class PartitionedMount(Mount):
 def __format_disks(self):
 self.layout_partitions()
 
-if self.skipformat:
-msger.debug("Skipping disk format, because skipformat flag is 
set.")
-return
-
 for dev in self.disks.keys():
 d = self.disks[dev]
 msger.debug("Initializing partition table for %s" % \
@@ -346,103 +304,6 @@ class PartitionedMount(Mount):
 self.__run_parted(["-s", d['disk'].device, "set",
"%d" % p['num'], "lba", "off"])
 
-
-def __map_partitions(self):
-"""Load it if dm_snapshot isn't loaded. """
-load_module("dm_snapshot")
-
-for dev in self.disks.keys():
-d = self.disks[dev]
-if d['mapped']:
-continue
-
-msger.debug("Running kpartx on %s" % d['disk'].device )
-rc, kpartxOutput = runner.runtool([self.kpartx, "-l", "-v", 
d['disk'].device])
-kpartxOutput = kpartxOutput.splitlines()
-
-if rc != 0:
-raise MountError("Failed to query partition mapping for '%s'" %
-   

[OE-core] [PATCH 24/35] wic: Update 'Background and Motivation' help section

2014-08-08 Thread Tom Zanussi
Remove help text regarding the source and future intentions of the wic
codebase, since the code prompting those comments has now been mostly
removed.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/image/help.py | 14 +-
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py
index 6e8e037..6503aaa 100644
--- a/scripts/lib/image/help.py
+++ b/scripts/lib/image/help.py
@@ -456,24 +456,12 @@ DESCRIPTION
 oe-core: directdisk.bbclass and mkefidisk.sh.  The difference
 between wic and those examples is that with wic the functionality
 of those scripts is implemented by a general-purpose partitioning
-'language' based on Redhat kickstart syntax (with the underlying
-code borrowed from Tizen mic, which in turn was borrowed from
-Meego mic, in turn borrowed from Fedora livecd, etc.).
+'language' based on Redhat kickstart syntax).
 
 The initial motivation and design considerations that lead to the
 current tool are described exhaustively in Yocto Bug #3847
 (https://bugzilla.yoctoproject.org/show_bug.cgi?id=3847).
 
-Though the current wic tool only uses the kickstart syntax related
-to partitioning and bootloaders and only for creating images,
-because the code is based on the mic/pykickstart code, future
-deployment efforts such as those partially described by Yocto Bug
-#4106 (https://bugzilla.yoctoproject.org/show_bug.cgi?id=4106),
-but also others including package selection (from e.g. binary
-feeds) and deployment configuration of users/network/services,
-etc, could be implemented under this framework, considering that
-all of those are implemented in some form by the base system.
-
   Implementation and Examples
 
 wic can be used in two different modes, depending on how much
-- 
1.8.3.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 04/35] wic: Remove mic bootstrap

2014-08-08 Thread Tom Zanussi
packaging bootstrap, not needed

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/bootstrap.py | 279 ---
 1 file changed, 279 deletions(-)
 delete mode 100644 scripts/lib/mic/bootstrap.py

diff --git a/scripts/lib/mic/bootstrap.py b/scripts/lib/mic/bootstrap.py
deleted file mode 100644
index 66c291b..000
--- a/scripts/lib/mic/bootstrap.py
+++ /dev/null
@@ -1,279 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2009, 2010, 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from __future__ import with_statement
-import os
-import sys
-import tempfile
-import shutil
-import subprocess
-import rpm
-from mic import msger
-from mic.utils import errors, proxy, misc
-from mic.utils.rpmmisc import readRpmHeader, RPMInstallCallback
-from mic.chroot import cleanup_mounts, setup_chrootenv, cleanup_chrootenv
-
-PATH_BOOTSTRAP = "/usr/sbin:/usr/bin:/sbin:/bin"
-
-RPMTRANS_FLAGS = [
-   rpm.RPMTRANS_FLAG_ALLFILES,
-   rpm.RPMTRANS_FLAG_NOSCRIPTS,
-   rpm.RPMTRANS_FLAG_NOTRIGGERS,
- ]
-
-RPMVSF_FLAGS = [
- rpm._RPMVSF_NOSIGNATURES,
- rpm._RPMVSF_NODIGESTS
-   ]
-
-RPMPROB_FLAGS = [
-  rpm.RPMPROB_FILTER_OLDPACKAGE,
-  rpm.RPMPROB_FILTER_REPLACEPKG,
-  rpm.RPMPROB_FILTER_IGNOREARCH
-]
-
-class MiniBackend(object):
-def __init__(self, rootdir, arch=None, repomd=None):
-self._ts = None
-self.rootdir = os.path.abspath(rootdir)
-self.arch = arch
-self.repomd = repomd
-self.dlpkgs = []
-self.localpkgs = {}
-self.optionals = []
-self.preins = {}
-self.postins = {}
-self.scriptlets = False
-
-def __del__(self):
-try:
-del self.ts
-except:
-pass
-
-def get_ts(self):
-if not self._ts:
-self._ts = rpm.TransactionSet(self.rootdir)
-self._ts.setFlags(reduce(lambda x, y: x|y, RPMTRANS_FLAGS))
-self._ts.setVSFlags(reduce(lambda x, y: x|y, RPMVSF_FLAGS))
-self._ts.setProbFilter(reduce(lambda x, y: x|y, RPMPROB_FLAGS))
-
-return self._ts
-
-def del_ts(self):
-if self._ts:
-self._ts.closeDB()
-self._ts = None
-
-ts = property(fget = lambda self: self.get_ts(),
-  fdel = lambda self: self.del_ts(),
-  doc="TransactionSet object")
-
-def selectPackage(self, pkg):
-if not pkg in self.dlpkgs:
-self.dlpkgs.append(pkg)
-
-def runInstall(self):
-# FIXME: check space
-self.downloadPkgs()
-self.installPkgs()
-
-if not self.scriptlets:
-return
-
-for pkg in self.preins.keys():
-prog, script = self.preins[pkg]
-self.run_pkg_script(pkg, prog, script, '0')
-for pkg in self.postins.keys():
-prog, script = self.postins[pkg]
-self.run_pkg_script(pkg, prog, script, '1')
-
-def downloadPkgs(self):
-nonexist = []
-for pkg in self.dlpkgs:
-localpth = misc.get_package(pkg, self.repomd, self.arch)
-if localpth:
-self.localpkgs[pkg] = localpth
-elif pkg in self.optionals:
-# skip optional rpm
-continue
-else:
-# mark nonexist rpm
-nonexist.append(pkg)
-
-if nonexist:
-raise errors.BootstrapError("Can't get rpm binary: %s" %
-','.join(nonexist))
-
-def installPkgs(self):
-for pkg in self.localpkgs.keys():
-rpmpath = self.localpkgs[pkg]
-
-hdr = readRpmHeader(self.ts, rpmpath)
-
-# save prein and postin scripts
-self.preins[pkg] = (hdr['PREINPROG'], hdr['PREIN'])
-self.postins[pkg] = (hdr['POSTINPROG'], hdr['POSTIN'])
-
-# mark pkg as install
-self.ts.addInstall(hdr, rpmpath, 'u')
-
-# run transaction
-self.ts.order()
-cb = RPMInstallCallback(self.ts)
-self.ts.run(cb.callback, '')
-
-def run_pkg_script(self, pkg, prog, script, arg):
-mychroot = lambda: os.chroot(self.rootdir)
-
-if

[OE-core] [PATCH 09/35] wic: Remove fiemap support

2014-08-08 Thread Tom Zanussi
wic doesn't use it, so remove it.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/utils/Fiemap.py | 252 
 1 file changed, 252 deletions(-)
 delete mode 100644 scripts/lib/mic/utils/Fiemap.py

diff --git a/scripts/lib/mic/utils/Fiemap.py b/scripts/lib/mic/utils/Fiemap.py
deleted file mode 100644
index f2db6ff..000
--- a/scripts/lib/mic/utils/Fiemap.py
+++ /dev/null
@@ -1,252 +0,0 @@
-""" This module implements python API for the FIEMAP ioctl. The FIEMAP ioctl
-allows to find holes and mapped areas in a file. """
-
-# Note, a lot of code in this module is not very readable, because it deals
-# with the rather complex FIEMAP ioctl. To understand the code, you need to
-# know the FIEMAP interface, which is documented in the
-# Documentation/filesystems/fiemap.txt file in the Linux kernel sources.
-
-# Disable the following pylint recommendations:
-#   * Too many instance attributes (R0902)
-# pylint: disable=R0902
-
-import os
-import struct
-import array
-import fcntl
-from mic.utils.misc import get_block_size
-
-# Format string for 'struct fiemap'
-_FIEMAP_FORMAT = "=QQ"
-# sizeof(struct fiemap)
-_FIEMAP_SIZE = struct.calcsize(_FIEMAP_FORMAT)
-# Format string for 'struct fiemap_extent'
-_FIEMAP_EXTENT_FORMAT = "=Q"
-# sizeof(struct fiemap_extent)
-_FIEMAP_EXTENT_SIZE = struct.calcsize(_FIEMAP_EXTENT_FORMAT)
-# The FIEMAP ioctl number
-_FIEMAP_IOCTL = 0xC020660B
-
-# Minimum buffer which is required for 'class Fiemap' to operate
-MIN_BUFFER_SIZE = _FIEMAP_SIZE + _FIEMAP_EXTENT_SIZE
-# The default buffer size for 'class Fiemap'
-DEFAULT_BUFFER_SIZE = 256 * 1024
-
-class Error(Exception):
-""" A class for exceptions generated by this module. We currently support
-only one type of exceptions, and we basically throw human-readable problem
-description in case of errors. """
-pass
-
-class Fiemap:
-""" This class provides API to the FIEMAP ioctl. Namely, it allows to
-iterate over all mapped blocks and over all holes. """
-
-def _open_image_file(self):
-""" Open the image file. """
-
-try:
-self._f_image = open(self._image_path, 'rb')
-except IOError as err:
-raise Error("cannot open image file '%s': %s" \
-% (self._image_path, err))
-
-self._f_image_needs_close = True
-
-def __init__(self, image, buf_size = DEFAULT_BUFFER_SIZE):
-""" Initialize a class instance. The 'image' argument is full path to
-the file to operate on, or a file object to operate on.
-
-The 'buf_size' argument is the size of the buffer for 'struct
-fiemap_extent' elements which will be used when invoking the FIEMAP
-ioctl. The larger is the buffer, the less times the FIEMAP ioctl will
-be invoked. """
-
-self._f_image_needs_close = False
-
-if hasattr(image, "fileno"):
-self._f_image = image
-self._image_path = image.name
-else:
-self._image_path = image
-self._open_image_file()
-
-# Validate 'buf_size'
-if buf_size < MIN_BUFFER_SIZE:
-raise Error("too small buffer (%d bytes), minimum is %d bytes" \
-% (buf_size, MIN_BUFFER_SIZE))
-
-# How many 'struct fiemap_extent' elements fit the buffer
-buf_size -= _FIEMAP_SIZE
-self._fiemap_extent_cnt = buf_size / _FIEMAP_EXTENT_SIZE
-self._buf_size = self._fiemap_extent_cnt * _FIEMAP_EXTENT_SIZE
-self._buf_size += _FIEMAP_SIZE
-
-# Allocate a mutable buffer for the FIEMAP ioctl
-self._buf = array.array('B', [0] * self._buf_size)
-
-self.image_size = os.fstat(self._f_image.fileno()).st_size
-
-try:
-self.block_size = get_block_size(self._f_image)
-except IOError as err:
-raise Error("cannot get block size for '%s': %s" \
-% (self._image_path, err))
-
-self.blocks_cnt = self.image_size + self.block_size - 1
-self.blocks_cnt /= self.block_size
-
-# Synchronize the image file to make sure FIEMAP returns correct values
-try:
-self._f_image.flush()
-except IOError as err:
-raise Error("cannot flush image file '%s': %s" \
-% (self._image_path, err))
-try:
-os.fsync(self._f_image.fileno()),
-except OSError as err:
-raise Error("cannot synchronize image file '%s': %s " \
-% (self._image_path, err.strerror))
-
-# Check if the FIEMAP ioctl is supported
-self.block_is_mapped(0)
-
-def __del__(self):
-""" The class destructor which closes the opened files. """
-
-if self._f_image_needs_close:
-self._f_image.close()
-
-def _invoke_fiemap(self, block, count):
-""" Invoke the FIEMAP ioctl for 'count' blocks of the file starting 
from
-block numb

[OE-core] [PATCH 03/35] wic: Remove packaging, config commands

2014-08-08 Thread Tom Zanussi
Remove commands related to repos, packaging, configuration

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/kickstart/__init__.py | 763 --
 1 file changed, 763 deletions(-)

diff --git a/scripts/lib/mic/kickstart/__init__.py 
b/scripts/lib/mic/kickstart/__init__.py
index 11cdf63..590bf47 100644
--- a/scripts/lib/mic/kickstart/__init__.py
+++ b/scripts/lib/mic/kickstart/__init__.py
@@ -34,54 +34,6 @@ from mic import msger
 from mic.utils import errors, misc, runner, fs_related as fs
 from custom_commands import wicboot, partition
 
-
-AUTH_URL_PTN = 
r"(?P.*)://(?P.*)(:?P.*)?@(?P.*)"
-
-
-class PrepackageSection(kssections.Section):
-sectionOpen = "%prepackages"
-
-def handleLine(self, line):
-if not self.handler:
-return
-
-(h, s, t) = line.partition('#')
-line = h.rstrip()
-
-self.handler.prepackages.add([line])
-
-def handleHeader(self, lineno, args):
-kssections.Section.handleHeader(self, lineno, args)
-
-class AttachmentSection(kssections.Section):
-sectionOpen = "%attachment"
-
-def handleLine(self, line):
-if not self.handler:
-return
-
-(h, s, t) = line.partition('#')
-line = h.rstrip()
-
-self.handler.attachment.add([line])
-
-def handleHeader(self, lineno, args):
-kssections.Section.handleHeader(self, lineno, args)
-
-def apply_wrapper(func):
-def wrapper(*kargs, **kwargs):
-try:
-func(*kargs, **kwargs)
-except (OSError, IOError, errors.KsError), err:
-cfgcls = kargs[0].__class__.__name__
-if msger.ask("Failed to apply %s, skip and continue?" % cfgcls):
-msger.warning("%s" % err)
-pass
-else:
-# just throw out the exception
-raise
-return wrapper
-
 def read_kickstart(path):
 """Parse a kickstart file and return a KickstartParser instance.
 
@@ -105,12 +57,8 @@ def read_kickstart(path):
 class KSHandlers(superclass):
 def __init__(self):
 superclass.__init__(self, mapping=commandMap[using_version])
-self.prepackages = ksparser.Packages()
-self.attachment = ksparser.Packages()
 
 ks = ksparser.KickstartParser(KSHandlers(), errorsAreFatal=False)
-ks.registerSection(PrepackageSection(ks.handler))
-ks.registerSection(AttachmentSection(ks.handler))
 
 try:
 ks.readKickstart(path)
@@ -123,526 +71,6 @@ def read_kickstart(path):
 
 return ks
 
-class KickstartConfig(object):
-"""A base class for applying kickstart configurations to a system."""
-def __init__(self, instroot):
-self.instroot = instroot
-
-def path(self, subpath):
-return self.instroot + subpath
-
-def _check_sysconfig(self):
-if not os.path.exists(self.path("/etc/sysconfig")):
-fs.makedirs(self.path("/etc/sysconfig"))
-
-def chroot(self):
-os.chroot(self.instroot)
-os.chdir("/")
-
-def call(self, args):
-if not os.path.exists("%s/%s" %(self.instroot, args[0])):
-raise errors.KsError("Can't find %s in chroot" % args[0])
-subprocess.call(args, preexec_fn = self.chroot)
-
-def apply(self):
-pass
-
-class LanguageConfig(KickstartConfig):
-"""A class to apply a kickstart language configuration to a system."""
-@apply_wrapper
-def apply(self, kslang):
-self._check_sysconfig()
-if kslang.lang:
-f = open(self.path("/etc/sysconfig/i18n"), "w+")
-f.write("LANG=\"" + kslang.lang + "\"\n")
-f.close()
-
-class KeyboardConfig(KickstartConfig):
-"""A class to apply a kickstart keyboard configuration to a system."""
-@apply_wrapper
-def apply(self, kskeyboard):
-#
-# FIXME:
-#   should this impact the X keyboard config too?
-#   or do we want to make X be able to do this mapping?
-#
-#k = rhpl.keyboard.Keyboard()
-#if kskeyboard.keyboard:
-#   k.set(kskeyboard.keyboard)
-#k.write(self.instroot)
-pass
-
-class TimezoneConfig(KickstartConfig):
-"""A class to apply a kickstart timezone configuration to a system."""
-@apply_wrapper
-def apply(self, kstimezone):
-self._check_sysconfig()
-tz = kstimezone.timezone or "America/New_York"
-utc = str(kstimezone.isUtc)
-
-f = open(self.path("/etc/sysconfig/clock"), "w+")
-f.write("ZONE=\"" + tz + "\"\n")
-f.write("UTC=" + utc + "\n")
-f.close()
-tz_source = "/usr/share/zoneinfo/%s" % (tz)
-tz_dest = "/etc/localtime"
-try:
-cpcmd = fs.find_binary_inchroot('cp', self.instroot)
-if cpcmd:
-self.call([cpcmd, "-f", tz_source, tz_dest])
-else:
-cpcmd = fs.find_binary_path('cp')
-subprocess.call([cpcmd, "-f",
- 

[OE-core] [PATCH 02/35] wic: Remove unused custom commands

2014-08-08 Thread Tom Zanussi
installer, repo, desktop-related stuff

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/kickstart/__init__.py  |   6 +-
 .../lib/mic/kickstart/custom_commands/__init__.py  |   7 --
 .../lib/mic/kickstart/custom_commands/desktop.py   |  95 ---
 .../mic/kickstart/custom_commands/installerfw.py   |  63 --
 .../lib/mic/kickstart/custom_commands/micrepo.py   | 127 -
 5 files changed, 1 insertion(+), 297 deletions(-)
 delete mode 100644 scripts/lib/mic/kickstart/custom_commands/desktop.py
 delete mode 100644 scripts/lib/mic/kickstart/custom_commands/installerfw.py
 delete mode 100644 scripts/lib/mic/kickstart/custom_commands/micrepo.py

diff --git a/scripts/lib/mic/kickstart/__init__.py 
b/scripts/lib/mic/kickstart/__init__.py
index 72f3ca6..11cdf63 100644
--- a/scripts/lib/mic/kickstart/__init__.py
+++ b/scripts/lib/mic/kickstart/__init__.py
@@ -32,7 +32,7 @@ from pykickstart.handlers.control import dataMap
 
 from mic import msger
 from mic.utils import errors, misc, runner, fs_related as fs
-from custom_commands import desktop, micrepo, wicboot, partition, installerfw
+from custom_commands import wicboot, partition
 
 
 AUTH_URL_PTN = 
r"(?P.*)://(?P.*)(:?P.*)?@(?P.*)"
@@ -96,13 +96,9 @@ def read_kickstart(path):
 #ks = ksparser.KickstartParser(version)
 
 using_version = ksversion.DEVEL
-commandMap[using_version]["desktop"] = desktop.Mic_Desktop
-commandMap[using_version]["repo"] = micrepo.Mic_Repo
 commandMap[using_version]["bootloader"] = wicboot.Wic_Bootloader
 commandMap[using_version]["part"] = partition.Wic_Partition
 commandMap[using_version]["partition"] = partition.Wic_Partition
-commandMap[using_version]["installerfw"] = installerfw.Mic_installerfw
-dataMap[using_version]["RepoData"] = micrepo.Mic_RepoData
 dataMap[using_version]["PartData"] = partition.Wic_PartData
 superclass = ksversion.returnClassForVersion(version=using_version)
 
diff --git a/scripts/lib/mic/kickstart/custom_commands/__init__.py 
b/scripts/lib/mic/kickstart/custom_commands/__init__.py
index 6aed0ff..f84c6d9 100644
--- a/scripts/lib/mic/kickstart/custom_commands/__init__.py
+++ b/scripts/lib/mic/kickstart/custom_commands/__init__.py
@@ -1,17 +1,10 @@
-from desktop import Mic_Desktop
-from micrepo import Mic_Repo, Mic_RepoData
 from micpartition import Mic_Partition
 from micpartition import Mic_PartData
-from installerfw import Mic_installerfw
 from partition import Wic_Partition
 
 __all__ = (
-"Mic_Desktop",
-"Mic_Repo",
-"Mic_RepoData",
 "Mic_Partition",
 "Mic_PartData",
-"Mic_installerfw",
 "Wic_Partition",
 "Wic_PartData",
 )
diff --git a/scripts/lib/mic/kickstart/custom_commands/desktop.py 
b/scripts/lib/mic/kickstart/custom_commands/desktop.py
deleted file mode 100644
index c8bd647..000
--- a/scripts/lib/mic/kickstart/custom_commands/desktop.py
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2008, 2009, 2010 Intel, Inc.
-#
-# Yi Yang 
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-class Mic_Desktop(KickstartCommand):
-def __init__(self, writePriority=0,
-   defaultdesktop=None,
-   defaultdm=None,
-   autologinuser=None,
-   session=None):
-
-KickstartCommand.__init__(self, writePriority)
-
-self.__new_version = False
-self.op = self._getParser()
-
-self.defaultdesktop = defaultdesktop
-self.autologinuser = autologinuser
-self.defaultdm = defaultdm
-self.session = session
-
-def __str__(self):
-retval = ""
-
-if self.defaultdesktop != None:
-retval += " --defaultdesktop=%s" % self.defaultdesktop
-if self.session != None:
-retval += " --session=\"%s\"" % self.session
-if self.autologinuser != None:
-retval += " --autologinuser=%s" % self.autologinuser
-if self.defaultdm != None:
-retval += " --defaultdm=%s" % self.defaultdm
-
-if retval != "":
-retval = "# Default Desktop Settings\ndesktop %s\n" % retval
-
-return retval
-
-def _getParser(self):
-try:
-op = KSOptionParser(li

[OE-core] [PATCH 08/35] wic: Remove bmap support

2014-08-08 Thread Tom Zanussi
wic doesn't use it, so remove it.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/utils/BmapCreate.py | 298 
 1 file changed, 298 deletions(-)
 delete mode 100644 scripts/lib/mic/utils/BmapCreate.py

diff --git a/scripts/lib/mic/utils/BmapCreate.py 
b/scripts/lib/mic/utils/BmapCreate.py
deleted file mode 100644
index 65b19a5..000
--- a/scripts/lib/mic/utils/BmapCreate.py
+++ /dev/null
@@ -1,298 +0,0 @@
-""" This module implements the block map (bmap) creation functionality and
-provides the corresponding API in form of the 'BmapCreate' class.
-
-The idea is that while images files may generally be very large (e.g., 4GiB),
-they may nevertheless contain only little real data, e.g., 512MiB. This data
-are files, directories, file-system meta-data, partition table, etc. When
-copying the image to the target device, you do not have to copy all the 4GiB of
-data, you can copy only 512MiB of it, which is 4 times less, so copying should
-presumably be 4 times faster.
-
-The block map file is an XML file which contains a list of blocks which have to
-be copied to the target device. The other blocks are not used and there is no
-need to copy them. The XML file also contains some additional information like
-block size, image size, count of mapped blocks, etc. There are also many
-commentaries, so it is human-readable.
-
-The image has to be a sparse file. Generally, this means that when you generate
-this image file, you should start with a huge sparse file which contains a
-single hole spanning the entire file. Then you should partition it, write all
-the data (probably by means of loop-back mounting the image or parts of it),
-etc. The end result should be a sparse file where mapped areas represent useful
-parts of the image and holes represent useless parts of the image, which do not
-have to be copied when copying the image to the target device.
-
-This module uses the FIBMAP ioctl to detect holes. """
-
-# Disable the following pylint recommendations:
-#   *  Too many instance attributes - R0902
-#   *  Too few public methods - R0903
-# pylint: disable=R0902,R0903
-
-import hashlib
-from mic.utils.misc import human_size
-from mic.utils import Fiemap
-
-# The bmap format version we generate
-SUPPORTED_BMAP_VERSION = "1.3"
-
-_BMAP_START_TEMPLATE = \
-"""
-
-
-
-
- %u 
-
-
- %u 
-
-
- %u 
-
-"""
-
-class Error(Exception):
-""" A class for exceptions generated by this module. We currently support
-only one type of exceptions, and we basically throw human-readable problem
-description in case of errors. """
-pass
-
-class BmapCreate:
-""" This class implements the bmap creation functionality. To generate a
-bmap for an image (which is supposedly a sparse file), you should first
-create an instance of 'BmapCreate' and provide:
-
-* full path or a file-like object of the image to create bmap for
-* full path or a file object to use for writing the results to
-
-Then you should invoke the 'generate()' method of this class. It will use
-the FIEMAP ioctl to generate the bmap. """
-
-def _open_image_file(self):
-""" Open the image file. """
-
-try:
-self._f_image = open(self._image_path, 'rb')
-except IOError as err:
-raise Error("cannot open image file '%s': %s" \
-% (self._image_path, err))
-
-self._f_image_needs_close = True
-
-def _open_bmap_file(self):
-""" Open the bmap file. """
-
-try:
-self._f_bmap = open(self._bmap_path, 'w+')
-except IOError as err:
-raise Error("cannot open bmap file '%s': %s" \
-% (self._bmap_path, err))
-
-self._f_bmap_needs_close = True
-
-def __init__(self, image, bmap):
-""" Initialize a class instance:
-* image - full path or a file-like object of the image to create bmap
-  for
-* bmap  - full path or a file object to use for writing the resulting
-  bmap to """
-
-self.image_size = None
-self.image_size_human = None
-self.block_size = None
-self.blocks_cnt = None
-self.mapped_cnt = None
-self.mapped_size = None
-self.mapped_size_human = None
-self.mapped_percent = None
-
-self._mapped_count_pos1 = None
-self._mapped_count_pos2 = None
-self._sha1_pos = None
-
-self._f_image_needs_close = False
-self._f_bmap_needs_close = False
-
-if hasattr(image, "read"):
-self._f_image = image
-self._image_path = image.name
-else:
-self._image_path = image
-self._open_image_file()
-
-if hasattr(bmap, "read"):
-self._f_bmap = bmap
-self._bmap_path = bmap.name
-else:
-self._bmap_path = bmap
-self._open_bmap_file()
-
-self.fiemap = Fie

[OE-core] [PATCH 14/35] wic: Remove unused misc code

2014-08-08 Thread Tom Zanussi
wic doesn't use it, so remove it.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/utils/misc.py | 180 +-
 1 file changed, 1 insertion(+), 179 deletions(-)

diff --git a/scripts/lib/mic/utils/misc.py b/scripts/lib/mic/utils/misc.py
index 8c1f016..010b16c 100644
--- a/scripts/lib/mic/utils/misc.py
+++ b/scripts/lib/mic/utils/misc.py
@@ -18,29 +18,9 @@
 import os
 import sys
 import time
-import tempfile
-import re
-import shutil
-import glob
-import hashlib
-import subprocess
-import platform
-import traceback
-
-
-try:
-import sqlite3 as sqlite
-except ImportError:
-import sqlite
-
-try:
-from xml.etree import cElementTree
-except ImportError:
-import cElementTree
-xmlparse = cElementTree.parse
 
 from mic import msger
-from mic.utils.errors import CreatorError, SquashfsError
+from mic.utils.errors import CreatorError
 from mic.utils.fs_related import find_binary_path, makedirs
 from mic.utils import runner
 
@@ -82,115 +62,6 @@ def build_name(kscfg, release=None, prefix = None, suffix = 
None):
 ret = prefix + name + suffix
 return ret
 
-def get_distro():
-"""Detect linux distribution, support "meego"
-"""
-
-support_dists = ('SuSE',
- 'debian',
- 'fedora',
- 'redhat',
- 'centos',
- 'meego',
- 'moblin',
- 'tizen')
-try:
-(dist, ver, id) = platform.linux_distribution( \
-  supported_dists = support_dists)
-except:
-(dist, ver, id) = platform.dist( \
-  supported_dists = support_dists)
-
-return (dist, ver, id)
-
-def get_distro_str():
-"""Get composited string for current linux distribution
-"""
-(dist, ver, id) = get_distro()
-
-if not dist:
-return 'Unknown Linux Distro'
-else:
-distro_str = ' '.join(map(str.strip, (dist, ver, id)))
-return distro_str.strip()
-
-_LOOP_RULE_PTH = None
-
-def human_size(size):
-"""Return human readable string for Bytes size
-"""
-
-if size <= 0:
-return "0M"
-import math
-measure = ['B', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y']
-expo = int(math.log(size, 1024))
-mant = float(size/math.pow(1024, expo))
-return "{0:.1f}{1:s}".format(mant, measure[expo])
-
-def get_block_size(file_obj):
-""" Returns block size for file object 'file_obj'. Errors are indicated by
-the 'IOError' exception. """
-
-from fcntl import ioctl
-import struct
-
-# Get the block size of the host file-system for the image file by calling
-# the FIGETBSZ ioctl (number 2).
-binary_data = ioctl(file_obj, 2, struct.pack('I', 0))
-return struct.unpack('I', binary_data)[0]
-
-def check_space_pre_cp(src, dst):
-"""Check whether disk space is enough before 'cp' like
-operations, else exception will be raised.
-"""
-
-srcsize  = get_file_size(src) * 1024 * 1024
-freesize = get_filesystem_avail(dst)
-if srcsize > freesize:
-raise CreatorError("space on %s(%s) is not enough for about %s files"
-   % (dst, human_size(freesize), human_size(srcsize)))
-
-def calc_hashes(file_path, hash_names, start = 0, end = None):
-""" Calculate hashes for a file. The 'file_path' argument is the file
-to calculate hash functions for, 'start' and 'end' are the starting and
-ending file offset to calculate the has functions for. The 'hash_names'
-argument is a list of hash names to calculate. Returns the the list
-of calculated hash values in the hexadecimal form in the same order
-as 'hash_names'.
-"""
-if end == None:
-end = os.path.getsize(file_path)
-
-chunk_size = 65536
-to_read = end - start
-read = 0
-
-hashes = []
-for hash_name in hash_names:
-hashes.append(hashlib.new(hash_name))
-
-with open(file_path, "rb") as f:
-f.seek(start)
-
-while read < to_read:
-if read + chunk_size > to_read:
-chunk_size = to_read - read
-chunk = f.read(chunk_size)
-for hash_obj in hashes:
-hash_obj.update(chunk)
-read += chunk_size
-
-result = []
-for hash_obj in hashes:
-result.append(hash_obj.hexdigest())
-
-return result
-
-def get_md5sum(fpath):
-return calc_hashes(fpath, ('md5', ))[0]
-
-
 def normalize_ksfile(ksconf, release, arch):
 '''
 Return the name of a normalized ks file in which macro variables
@@ -232,52 +103,3 @@ def normalize_ksfile(ksconf, release, arch):
 atexit.register(remove_temp_ks)
 
 return ksconf
-
-
-def selinux_check(arch, fstypes):
-try:
-getenforce = find_binary_path('getenforce')
-except CreatorError:
-return
-
-selinux_status = runner.outs([getenforce])
-if arch and arch.startswith("arm") and selinux_status == "Enfor

[OE-core] [PATCH 17/35] wic: Remove gpt_parser

2014-08-08 Thread Tom Zanussi
wic doesn't currently use it, so remove.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/plugins/source/bootimg-efi.py|   4 +-
 scripts/lib/mic/plugins/source/bootimg-pcbios.py |   8 +-
 scripts/lib/mic/utils/gpt_parser.py  | 331 ---
 scripts/lib/mic/utils/partitionedfs.py   |  58 +---
 4 files changed, 11 insertions(+), 390 deletions(-)
 delete mode 100644 scripts/lib/mic/utils/gpt_parser.py

diff --git a/scripts/lib/mic/plugins/source/bootimg-efi.py 
b/scripts/lib/mic/plugins/source/bootimg-efi.py
index 95e1c05..d4a7771 100644
--- a/scripts/lib/mic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/mic/plugins/source/bootimg-efi.py
@@ -78,9 +78,7 @@ class BootimgEFIPlugin(SourcePlugin):
 if cr._ptable_format == 'msdos':
 rootstr = rootdev
 else:
-if not root_part_uuid:
-raise MountError("Cannot find the root GPT partition UUID")
-rootstr = "PARTUUID=%s" % root_part_uuid
+raise MountError("Unsupported partition table format found")
 
 grubefi_conf += "linux %s root=%s rootwait %s\n" \
 % (kernel, rootstr, options)
diff --git a/scripts/lib/mic/plugins/source/bootimg-pcbios.py 
b/scripts/lib/mic/plugins/source/bootimg-pcbios.py
index 9959645..3434320 100644
--- a/scripts/lib/mic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/mic/plugins/source/bootimg-pcbios.py
@@ -50,9 +50,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
 disk image.  In this case, we install the MBR.
 """
 mbrfile = "%s/syslinux/" % bootimg_dir
-if cr._ptable_format == 'gpt':
-mbrfile += "gptmbr.bin"
-else:
+if cr._ptable_format == 'msdos':
 mbrfile += "mbr.bin"
 
 if not os.path.exists(mbrfile):
@@ -110,9 +108,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
 if cr._ptable_format == 'msdos':
 rootstr = rootdev
 else:
-if not root_part_uuid:
-raise MountError("Cannot find the root GPT partition UUID")
-rootstr = "PARTUUID=%s" % root_part_uuid
+raise MountError("Unsupported partition table format found")
 
 syslinux_conf += "APPEND label=boot root=%s %s\n" % (rootstr, options)
 
diff --git a/scripts/lib/mic/utils/gpt_parser.py 
b/scripts/lib/mic/utils/gpt_parser.py
deleted file mode 100644
index 5d43b70..000
--- a/scripts/lib/mic/utils/gpt_parser.py
+++ /dev/null
@@ -1,331 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2013 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-""" This module implements a simple GPT partitions parser which can read the
-GPT header and the GPT partition table. """
-
-import struct
-import uuid
-import binascii
-from mic.utils.errors import MountError
-
-_GPT_HEADER_FORMAT = "<8s4sIII16sQIII"
-_GPT_HEADER_SIZE = struct.calcsize(_GPT_HEADER_FORMAT)
-_GPT_ENTRY_FORMAT = "<16s16sQQQ72s"
-_GPT_ENTRY_SIZE = struct.calcsize(_GPT_ENTRY_FORMAT)
-_SUPPORTED_GPT_REVISION = '\x00\x00\x01\x00'
-
-def _stringify_uuid(binary_uuid):
-""" A small helper function to transform a binary UUID into a string
-format. """
-
-uuid_str = str(uuid.UUID(bytes_le = binary_uuid))
-
-return uuid_str.upper()
-
-def _calc_header_crc(raw_hdr):
-""" Calculate GPT header CRC32 checksum. The 'raw_hdr' parameter has to
-be a list or a tuple containing all the elements of the GPT header in a
-"raw" form, meaning that it should simply contain "unpacked" disk data.
-"""
-
-raw_hdr = list(raw_hdr)
-raw_hdr[3] = 0
-raw_hdr = struct.pack(_GPT_HEADER_FORMAT, *raw_hdr)
-
-return binascii.crc32(raw_hdr) & 0x
-
-def _validate_header(raw_hdr):
-""" Validate the GPT header. The 'raw_hdr' parameter has to be a list or a
-tuple containing all the elements of the GPT header in a "raw" form,
-meaning that it should simply contain "unpacked" disk data. """
-
-# Validate the signature
-if raw_hdr[0] != 'EFI PART':
-raise MountError("GPT partition table not found")
-
-# Validate the revision
-if raw_hdr[1] != _SUPPORTED_GPT_REVISION:
-raise MountError("Unsupported GPT revision '%s', supported revision " \
- "is '%s'" % \
-  (binascii.hexlify(raw_hdr[1]),
-   binas

[OE-core] [PATCH 00/35] wic: diet and refactor

2014-08-08 Thread Tom Zanussi
This patchset refactors wic to have the code better reflect what it
actually does, rather than look like something shoehorned into the
existing mic codebase, which is essentially what it was.

It also removes most of code inherited from mic but sitting
essentially unused; there's no reason to be carrying it around other
than some vague intention of reusing it, but that can still be done -
anything needed can always be added back.  As it stands, it's only
taking up space and obscuring a clear view of what's actually used.

Removing the bsp subdir from scripts/lib, and taking a size
measurement using 'du -bh lib', we get:

before:
  1.2M  lib

after:
  385K  lib

About half the code remaining after this exercise belongs to the
parser and related infrastructure, which could be drop-in replaced by
something lighter:

116Klib/wic/3rdparty
7.9Klib/wic/msger.py
3.2Klib/wic/conf.py
3.1Klib/wic/utils/runner.py
57K lib/wic/utils/cmdln.py
1.6Klib/wic/utils/errors.py

And about 50k of it is wic command boilerplate and help text patterned
after other tools in yocto such as yocto-bsp:

52K lib/image

That leaves about 150k related to the actual image creation
infrastructure, which should be much more easily digestible than the
previous code.

[NOTE: this patchset supersedes the 'phase1' patchset ('[PATCH 00/24]
wic: Remove unused code') from Aug 5.]

The following changes since commit 4a226369b7bb37a971c77d4abc88df81033f56c5:

  dev-manual: Updates for checksums and wic (2014-08-02 10:00:26 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib.git tzanussi/wic-diet-v1
  
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/wic-diet-v1

Tom Zanussi (35):
  wic: Make exec_cmd() error out instead of warn
  wic: Remove unused custom commands
  wic: Remove packaging, config commands
  wic: Remove mic bootstrap
  wic: Remove mic chroot
  wic: Remove rt_util
  wic: Remove mic package managers
  wic: Remove bmap support
  wic: Remove fiemap support
  wic: Remove grabber implementation
  wic: Remove proxy support
  wic: Remove rpmmisc
  wic: Remove unused fs_related code
  wic: Remove unused misc code
  wic: Remove 3rdparty/urlgrabber
  wic: Remove unused 3rdparty/commands
  wic: Remove gpt_parser
  wic: Remove unused plugin and error code
  wic: Clean up BaseImageCreator
  wic: Clean up DirectImageCreator
  wic: Clean up PartitionedMount
  wic: Clean up Creator
  wic: Remove unused command versioning support
  wic: Update 'Background and Motivation' help section
  wic: Remove unused conf support
  wic: Remove Mount object
  wic: Update/rename/delete mount-related code
  wic: Update cleanup/unmount-related code
  wic: Update/rename install-related code
  wic: Update/rename configure-related code
  wic: Rename PartitionedMount
  wic: Rename MountError
  wic: Update Disk description
  wic: Rename /mic to /wic
  wic: Bump the version to 2.0

 scripts/lib/image/config/wic.conf  |1 -
 scripts/lib/image/engine.py|   12 +-
 scripts/lib/image/help.py  |   22 +-
 .../mic/3rdparty/pykickstart/commands/__init__.py  |   26 -
 .../3rdparty/pykickstart/commands/authconfig.py|   40 -
 .../mic/3rdparty/pykickstart/commands/autopart.py  |  119 --
 .../mic/3rdparty/pykickstart/commands/autostep.py  |   55 -
 .../mic/3rdparty/pykickstart/commands/clearpart.py |   86 --
 .../mic/3rdparty/pykickstart/commands/device.py|  125 --
 .../3rdparty/pykickstart/commands/deviceprobe.py   |   40 -
 .../3rdparty/pykickstart/commands/displaymode.py   |   68 -
 .../mic/3rdparty/pykickstart/commands/dmraid.py|   91 --
 .../3rdparty/pykickstart/commands/driverdisk.py|  184 ---
 .../lib/mic/3rdparty/pykickstart/commands/fcoe.py  |  114 --
 .../mic/3rdparty/pykickstart/commands/firewall.py  |  193 ---
 .../mic/3rdparty/pykickstart/commands/firstboot.py |   62 -
 .../lib/mic/3rdparty/pykickstart/commands/group.py |   88 --
 .../3rdparty/pykickstart/commands/ignoredisk.py|  139 --
 .../3rdparty/pykickstart/commands/interactive.py   |   58 -
 .../lib/mic/3rdparty/pykickstart/commands/iscsi.py |  133 --
 .../mic/3rdparty/pykickstart/commands/iscsiname.py |   54 -
 .../lib/mic/3rdparty/pykickstart/commands/key.py   |   64 -
 .../mic/3rdparty/pykickstart/commands/keyboard.py  |   55 -
 .../lib/mic/3rdparty/pykickstart/commands/lang.py  |   60 -
 .../3rdparty/pykickstart/commands/langsupport.py   |   58 -
 .../mic/3rdparty/pykickstart/commands/lilocheck.py |   54 -
 .../mic/3rdparty/pykickstart/commands/logging.py   |   66 -
 .../mic/3rdparty/pykickstart/commands/logvol.py|  304 
 .../3rdparty/pykickstart/commands/mediacheck.py|   53 -
 .../mic/3rdparty/pykickstart/commands/method.py|  186 ---
 .../mic/3rdparty/pykickstart/commands/monitor.py   |  106 --
 .../lib/mic/3rdparty/pykickstart/commands/mouse.py |   70 -
 .../mic/3rdparty/pykickstart/commands/multipath

[OE-core] [PATCH 05/35] wic: Remove mic chroot

2014-08-08 Thread Tom Zanussi
mic chroot allows users to chroot into an existing mic image and isn't
used by wic, so remove it.

Removing chroot.py leads in turn to various plugin-loading failures
for a number of plugins that wic doesn't use either, so remove those
as well.

The existing source plugins refer to chroot but don't use it, so fix
those up.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/chroot.py| 343 ---
 scripts/lib/mic/imager/fs.py |  99 ---
 scripts/lib/mic/imager/livecd.py | 750 ---
 scripts/lib/mic/imager/liveusb.py| 308 --
 scripts/lib/mic/imager/loop.py   | 418 -
 scripts/lib/mic/imager/raw.py| 501 ---
 scripts/lib/mic/plugins/imager/direct_plugin.py  |   2 +-
 scripts/lib/mic/plugins/imager/fs_plugin.py  | 143 -
 scripts/lib/mic/plugins/imager/livecd_plugin.py  | 255 
 scripts/lib/mic/plugins/imager/liveusb_plugin.py | 260 
 scripts/lib/mic/plugins/imager/loop_plugin.py| 255 
 scripts/lib/mic/plugins/imager/raw_plugin.py | 275 -
 scripts/lib/mic/plugins/source/bootimg-efi.py|   2 +-
 scripts/lib/mic/plugins/source/bootimg-pcbios.py |   2 +-
 scripts/lib/mic/plugins/source/rootfs.py |   2 +-
 15 files changed, 4 insertions(+), 3611 deletions(-)
 delete mode 100644 scripts/lib/mic/chroot.py
 delete mode 100644 scripts/lib/mic/imager/fs.py
 delete mode 100644 scripts/lib/mic/imager/livecd.py
 delete mode 100644 scripts/lib/mic/imager/liveusb.py
 delete mode 100644 scripts/lib/mic/imager/loop.py
 delete mode 100644 scripts/lib/mic/imager/raw.py
 delete mode 100644 scripts/lib/mic/plugins/imager/fs_plugin.py
 delete mode 100644 scripts/lib/mic/plugins/imager/livecd_plugin.py
 delete mode 100644 scripts/lib/mic/plugins/imager/liveusb_plugin.py
 delete mode 100644 scripts/lib/mic/plugins/imager/loop_plugin.py
 delete mode 100644 scripts/lib/mic/plugins/imager/raw_plugin.py

Patch too large to post - see git repository.

-- 
1.8.3.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 18/35] wic: Remove unused plugin and error code

2014-08-08 Thread Tom Zanussi
wic doesn't use it, so remove it.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/plugin.py  |  2 +-
 scripts/lib/mic/pluginbase.py  | 45 ++
 scripts/lib/mic/plugins/hook/.py   |  0
 scripts/lib/mic/plugins/hook/empty_hook.py |  3 --
 scripts/lib/mic/utils/errors.py| 21 --
 5 files changed, 3 insertions(+), 68 deletions(-)
 delete mode 100644 scripts/lib/mic/plugins/hook/.py
 delete mode 100644 scripts/lib/mic/plugins/hook/empty_hook.py

diff --git a/scripts/lib/mic/plugin.py b/scripts/lib/mic/plugin.py
index f836950..43afdbc 100644
--- a/scripts/lib/mic/plugin.py
+++ b/scripts/lib/mic/plugin.py
@@ -24,7 +24,7 @@ from mic.utils.oe.misc import *
 
 __ALL__ = ['PluginMgr', 'pluginmgr']
 
-PLUGIN_TYPES = ["imager", "source"] # TODO  "hook"
+PLUGIN_TYPES = ["imager", "source"]
 
 PLUGIN_DIR = "/lib/mic/plugins" # relative to scripts
 SCRIPTS_PLUGIN_DIR = "scripts" + PLUGIN_DIR
diff --git a/scripts/lib/mic/pluginbase.py b/scripts/lib/mic/pluginbase.py
index 9cf4c62..46a4f4a 100644
--- a/scripts/lib/mic/pluginbase.py
+++ b/scripts/lib/mic/pluginbase.py
@@ -40,45 +40,10 @@ class _Plugin(object):
 def get_plugins(cls):
 return cls.plugins
 
+
 class ImagerPlugin(_Plugin):
 mic_plugin_type = "imager"
 
-@classmethod
-def check_image_exists(self, destdir, apacking=None,
-  images=(),
-  release=None):
-
-# if it's a packing file, reset images
-if apacking:
-images = [apacking]
-
-# release option will override images
-if release is not None:
-images = [os.path.basename(destdir.rstrip('/'))]
-destdir = os.path.dirname(destdir.rstrip('/'))
-
-for name in images:
-if not name:
-continue
-
-image = os.path.join(destdir, name)
-if not os.path.exists(image):
-continue
-
-if msger.ask("Target image/dir: %s already exists, "
- "clean up and continue?" % image):
-if os.path.isdir(image):
-shutil.rmtree(image)
-else:
-os.unlink(image)
-else:
-raise errors.Abort("Cancled")
-
-def do_create(self):
-pass
-
-def do_chroot(self):
-pass
 
 class SourcePlugin(_Plugin):
 mic_plugin_type = "source"
@@ -133,12 +98,6 @@ class SourcePlugin(_Plugin):
 """
 msger.debug("SourcePlugin: do_prepare_partition: part: %s" % part)
 
-class BackendPlugin(_Plugin):
-mic_plugin_type="backend"
-
-def addRepository(self):
-pass
-
 def get_plugins(typen):
 ps = ImagerPlugin.get_plugins()
 if typen in ps:
@@ -146,4 +105,4 @@ def get_plugins(typen):
 else:
 return None
 
-__all__ = ['ImagerPlugin', 'BackendPlugin', 'SourcePlugin', 'get_plugins']
+__all__ = ['ImagerPlugin', 'SourcePlugin', 'get_plugins']
diff --git a/scripts/lib/mic/plugins/hook/.py b/scripts/lib/mic/plugins/hook/.py
deleted file mode 100644
index e69de29..000
diff --git a/scripts/lib/mic/plugins/hook/empty_hook.py 
b/scripts/lib/mic/plugins/hook/empty_hook.py
deleted file mode 100644
index 397585d..000
--- a/scripts/lib/mic/plugins/hook/empty_hook.py
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/python
-
-# TODO: plugin base for hooks
diff --git a/scripts/lib/mic/utils/errors.py b/scripts/lib/mic/utils/errors.py
index 8d720f9..38fda30 100644
--- a/scripts/lib/mic/utils/errors.py
+++ b/scripts/lib/mic/utils/errors.py
@@ -43,29 +43,8 @@ class Usage(CreatorError):
 class Abort(CreatorError):
 keyword = ''
 
-class ConfigError(CreatorError):
-keyword = ''
-
 class KsError(CreatorError):
 keyword = ''
 
-class RepoError(CreatorError):
-keyword = ''
-
-class RpmError(CreatorError):
-keyword = ''
-
 class MountError(CreatorError):
 keyword = ''
-
-class SnapshotError(CreatorError):
-keyword = ''
-
-class SquashfsError(CreatorError):
-keyword = ''
-
-class BootstrapError(CreatorError):
-keyword = ''
-
-class RuntimeError(CreatorError):
-keyword = ''
-- 
1.8.3.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 01/35] wic: Make exec_cmd() error out instead of warn

2014-08-08 Thread Tom Zanussi
The reason exec_cmd() warns but doesn't error out (broken parted)
doesn't really make sense, since the parted invocations don't even use
exec_cmd().  It really should just fail since by not doing so it's
actually enabling invalid images in some cases.

Also, since the return code is now always zero, there's no point in
having a return code, so remove it.  This represents a change in the
API, so we also need to update all callers.

Signed-off-by: Tom Zanussi 
---
 .../lib/mic/kickstart/custom_commands/partition.py | 44 +++---
 scripts/lib/mic/plugins/source/bootimg-efi.py  |  8 ++--
 scripts/lib/mic/plugins/source/bootimg-pcbios.py   | 10 ++---
 scripts/lib/mic/utils/fs_related.py|  2 +-
 scripts/lib/mic/utils/oe/misc.py   | 33 +---
 scripts/lib/mic/utils/partitionedfs.py |  2 +-
 6 files changed, 53 insertions(+), 46 deletions(-)

diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py 
b/scripts/lib/mic/kickstart/custom_commands/partition.py
index 3b652b3..101b90e 100644
--- a/scripts/lib/mic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/mic/kickstart/custom_commands/partition.py
@@ -161,7 +161,7 @@ class Wic_PartData(Mic_PartData):
 """
 rootfs = oe_builddir
 du_cmd = "du -Lbms %s" % rootfs
-rc, out = exec_cmd(du_cmd)
+out = exec_cmd(du_cmd)
 rootfs_size = out.split()[0]
 
 self.size = rootfs_size
@@ -209,7 +209,7 @@ class Wic_PartData(Mic_PartData):
 rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label ,self.fstype)
 
 du_cmd = "du -ks %s" % image_rootfs
-rc, out = exec_cmd(du_cmd)
+out = exec_cmd(du_cmd)
 actual_rootfs_size = int(out.split()[0])
 
 extra_blocks = self.get_extra_block_count(actual_rootfs_size)
@@ -224,18 +224,18 @@ class Wic_PartData(Mic_PartData):
 
 dd_cmd = "dd if=/dev/zero of=%s bs=1024 seek=%d count=0 bs=1k" % \
 (rootfs, rootfs_size)
-rc, out = exec_cmd(dd_cmd)
+exec_cmd(dd_cmd)
 
 extra_imagecmd = "-i 8192"
 
 mkfs_cmd = "mkfs.%s -F %s %s -d %s" % \
 (self.fstype, extra_imagecmd, rootfs, image_rootfs)
-rc, out = exec_native_cmd(pseudo + mkfs_cmd, native_sysroot)
+exec_native_cmd(pseudo + mkfs_cmd, native_sysroot)
 
 
 # get the rootfs size in the right units for kickstart (Mb)
 du_cmd = "du -Lbms %s" % rootfs
-rc, out = exec_cmd(du_cmd)
+out = exec_cmd(du_cmd)
 rootfs_size = out.split()[0]
 
 self.size = rootfs_size
@@ -254,7 +254,7 @@ class Wic_PartData(Mic_PartData):
 rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label, self.fstype)
 
 du_cmd = "du -ks %s" % image_rootfs
-rc, out = exec_cmd(du_cmd)
+out = exec_cmd(du_cmd)
 actual_rootfs_size = int(out.split()[0])
 
 extra_blocks = self.get_extra_block_count(actual_rootfs_size)
@@ -269,15 +269,15 @@ class Wic_PartData(Mic_PartData):
 
 dd_cmd = "dd if=/dev/zero of=%s bs=1024 seek=%d count=0 bs=1k" % \
 (rootfs, rootfs_size)
-rc, out = exec_cmd(dd_cmd)
+exec_cmd(dd_cmd)
 
 mkfs_cmd = "mkfs.%s -b %d -r %s %s" % \
 (self.fstype, rootfs_size * 1024, image_rootfs, rootfs)
-rc, out = exec_native_cmd(pseudo + mkfs_cmd, native_sysroot)
+exec_native_cmd(pseudo + mkfs_cmd, native_sysroot)
 
 # get the rootfs size in the right units for kickstart (Mb)
 du_cmd = "du -Lbms %s" % rootfs
-rc, out = exec_cmd(du_cmd)
+out = exec_cmd(du_cmd)
 rootfs_size = out.split()[0]
 
 self.size = rootfs_size
@@ -292,7 +292,7 @@ class Wic_PartData(Mic_PartData):
 rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label, self.fstype)
 
 du_cmd = "du -bks %s" % image_rootfs
-rc, out = exec_cmd(du_cmd)
+out = exec_cmd(du_cmd)
 blocks = int(out.split()[0])
 
 extra_blocks = self.get_extra_block_count(blocks)
@@ -324,7 +324,7 @@ class Wic_PartData(Mic_PartData):
 
 # get the rootfs size in the right units for kickstart (Mb)
 du_cmd = "du -Lbms %s" % rootfs
-rc, out = exec_cmd(du_cmd)
+out = exec_cmd(du_cmd)
 rootfs_size = out.split()[0]
 
 self.set_size(rootfs_size)
@@ -340,11 +340,11 @@ class Wic_PartData(Mic_PartData):
 
 squashfs_cmd = "mksquashfs %s %s -noappend" % \
(image_rootfs, rootfs)
-rc, out = exec_native_cmd(pseudo + squashfs_cmd, native_sysroot)
+exec_native_cmd(pseudo + squashfs_cmd, native_sysroot)
 
 # get the rootfs size in the right units for kickstart (Mb)
 du_cmd = "du -Lbms %s" % rootfs
-rc, out = exec_cmd(du_cmd)
+out = exec_cmd(du_cmd)
 rootfs_size = out.split()[0]
 
 self.size = rootfs_size
@@ -378,12 +378,12 @@ class Wic_PartData(Mic_PartData):
 
 dd_cmd =

[OE-core] [PATCH 12/35] wic: Remove rpmmisc

2014-08-08 Thread Tom Zanussi
wic doesn't use it, so remove it.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/utils/rpmmisc.py | 600 ---
 1 file changed, 600 deletions(-)
 delete mode 100644 scripts/lib/mic/utils/rpmmisc.py

diff --git a/scripts/lib/mic/utils/rpmmisc.py b/scripts/lib/mic/utils/rpmmisc.py
deleted file mode 100644
index af15763..000
--- a/scripts/lib/mic/utils/rpmmisc.py
+++ /dev/null
@@ -1,600 +0,0 @@
-#!/usr/bin/python -tt
-#
-# Copyright (c) 2008, 2009, 2010, 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os
-import sys
-import re
-import rpm
-
-from mic import msger
-from mic.utils.errors import CreatorError
-from mic.utils.proxy import get_proxy_for
-from mic.utils import runner
-
-
-class RPMInstallCallback:
-""" Command line callback class for callbacks from the RPM library.
-"""
-
-def __init__(self, ts, output=1):
-self.output = output
-self.callbackfilehandles = {}
-self.total_actions = 0
-self.total_installed = 0
-self.installed_pkg_names = []
-self.total_removed = 0
-self.mark = "+"
-self.marks = 40
-self.lastmsg = None
-self.tsInfo = None # this needs to be set for anything else to work
-self.ts = ts
-self.filelog = False
-self.logString = []
-self.headmsg = "Installing"
-
-def _dopkgtup(self, hdr):
-tmpepoch = hdr['epoch']
-if tmpepoch is None: epoch = '0'
-else: epoch = str(tmpepoch)
-
-return (hdr['name'], hdr['arch'], epoch, hdr['version'], 
hdr['release'])
-
-def _makeHandle(self, hdr):
-handle = '%s:%s.%s-%s-%s' % (hdr['epoch'], hdr['name'], hdr['version'],
-  hdr['release'], hdr['arch'])
-
-return handle
-
-def _localprint(self, msg):
-if self.output:
-msger.info(msg)
-
-def _makefmt(self, percent, progress = True):
-l = len(str(self.total_actions))
-size = "%s.%s" % (l, l)
-fmt_done = "[%" + size + "s/%" + size + "s]"
-done = fmt_done % (self.total_installed + self.total_removed,
-   self.total_actions)
-marks = self.marks - (2 * l)
-width = "%s.%s" % (marks, marks)
-fmt_bar = "%-" + width + "s"
-if progress:
-bar = fmt_bar % (self.mark * int(marks * (percent / 100.0)), )
-fmt = "\r  %-10.10s: %-20.20s " + bar + " " + done
-else:
-bar = fmt_bar % (self.mark * marks, )
-fmt = "  %-10.10s: %-20.20s "  + bar + " " + done
-return fmt
-
-def _logPkgString(self, hdr):
-"""return nice representation of the package for the log"""
-(n,a,e,v,r) = self._dopkgtup(hdr)
-if e == '0':
-pkg = '%s.%s %s-%s' % (n, a, v, r)
-else:
-pkg = '%s.%s %s:%s-%s' % (n, a, e, v, r)
-
-return pkg
-
-def callback(self, what, bytes, total, h, user):
-if what == rpm.RPMCALLBACK_TRANS_START:
-if bytes == 6:
-self.total_actions = total
-
-elif what == rpm.RPMCALLBACK_TRANS_PROGRESS:
-pass
-
-elif what == rpm.RPMCALLBACK_TRANS_STOP:
-pass
-
-elif what == rpm.RPMCALLBACK_INST_OPEN_FILE:
-self.lastmsg = None
-hdr = None
-if h is not None:
-try:
-hdr, rpmloc = h
-except:
-rpmloc = h
-hdr = readRpmHeader(self.ts, h)
-
-handle = self._makeHandle(hdr)
-fd = os.open(rpmloc, os.O_RDONLY)
-self.callbackfilehandles[handle]=fd
-if hdr['name'] not in self.installed_pkg_names:
-self.installed_pkg_names.append(hdr['name'])
-self.total_installed += 1
-return fd
-else:
-self._localprint("No header - huh?")
-
-elif what == rpm.RPMCALLBACK_INST_CLOSE_FILE:
-hdr = None
-if h is not None:
-try:
-hdr, rpmloc = h
-except:
-rpmloc = h
-hdr = readRpmHeader(self.ts, h)
-
-handle = self._makeHandle(hdr)
-os.close(self.callbackfilehandles[handle])

[OE-core] [PATCH 07/35] wic: Remove mic package managers

2014-08-08 Thread Tom Zanussi
wic doesn't use the yum or zypp package managers, remove them.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/plugins/backend/yumpkgmgr.py  | 490 -
 scripts/lib/mic/plugins/backend/zypppkgmgr.py | 973 --
 2 files changed, 1463 deletions(-)
 delete mode 100644 scripts/lib/mic/plugins/backend/yumpkgmgr.py
 delete mode 100755 scripts/lib/mic/plugins/backend/zypppkgmgr.py

Patch too large to post - see git repository.

-- 
1.8.3.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 10/35] wic: Remove grabber implementation

2014-08-08 Thread Tom Zanussi
wic doesn't need to grab any urls, so remove it.

Signed-off-by: Tom Zanussi 
---
 scripts/lib/mic/utils/grabber.py | 97 
 1 file changed, 97 deletions(-)
 delete mode 100644 scripts/lib/mic/utils/grabber.py

diff --git a/scripts/lib/mic/utils/grabber.py b/scripts/lib/mic/utils/grabber.py
deleted file mode 100644
index 45e30b4..000
--- a/scripts/lib/mic/utils/grabber.py
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/usr/bin/python
-
-import os
-import sys
-import rpm
-import fcntl
-import struct
-import termios
-
-from mic import msger
-from mic.utils import runner
-from mic.utils.errors import CreatorError
-
-from urlgrabber import grabber
-from urlgrabber import __version__ as grabber_version
-
-if rpm.labelCompare(grabber_version.split('.'), '3.9.0'.split('.')) == -1:
-msger.warning("Version of python-urlgrabber is %s, lower than '3.9.0', "
-  "you may encounter some network issues" % grabber_version)
-
-def myurlgrab(url, filename, proxies, progress_obj = None):
-g = grabber.URLGrabber()
-if progress_obj is None:
-progress_obj = TextProgress()
-
-if url.startswith("file:/"):
-filepath = "/%s" % url.replace("file:", "").lstrip('/')
-if not os.path.exists(filepath):
-raise CreatorError("URLGrabber error: can't find file %s" % url)
-if url.endswith('.rpm'):
-return filepath
-else:
-# untouch repometadata in source path
-runner.show(['cp', '-f', filepath, filename])
-
-else:
-try:
-filename = g.urlgrab(url=str(url),
- filename=filename,
- ssl_verify_host=False,
- ssl_verify_peer=False,
- proxies=proxies,
- http_headers=(('Pragma', 'no-cache'),),
- quote=0,
- progress_obj=progress_obj)
-except grabber.URLGrabError, err:
-msg = str(err)
-if msg.find(url) < 0:
-msg += ' on %s' % url
-raise CreatorError(msg)
-
-return filename
-
-def terminal_width(fd=1):
-""" Get the real terminal width """
-try:
-buf = 'abcdefgh'
-buf = fcntl.ioctl(fd, termios.TIOCGWINSZ, buf)
-return struct.unpack('', buf)[1]
-except: # IOError
-return 80
-
-def truncate_url(url, width):
-return os.path.basename(url)[0:width]
-
-class TextProgress(object):
-# make the class as singleton
-_instance = None
-def __new__(cls, *args, **kwargs):
-if not cls._instance:
-cls._instance = super(TextProgress, cls).__new__(cls, *args, 
**kwargs)
-
-return cls._instance
-
-def __init__(self, totalnum = None):
-self.total = totalnum
-self.counter = 1
-
-def start(self, filename, url, *args, **kwargs):
-self.url = url
-self.termwidth = terminal_width()
-msger.info("\r%-*s" % (self.termwidth, " "))
-if self.total is None:
-msger.info("\rRetrieving %s ..." % truncate_url(self.url, 
self.termwidth - 15))
-else:
-msger.info("\rRetrieving %s [%d/%d] ..." % (truncate_url(self.url, 
self.termwidth - 25), self.counter, self.total))
-
-def update(self, *args):
-pass
-
-def end(self, *args):
-if self.counter == self.total:
-msger.raw("\n")
-
-if self.total is not None:
-self.counter += 1
-
-- 
1.8.3.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] Remove "SRC_URI_OVERRIDES_PACKAGE_ARCH = 0" from tslib.bb

2014-08-08 Thread Saul Wold

On 08/08/2014 12:31 PM, Robert P. J. Day wrote:


Given that there are no machine-specific files for the tslib recipe
anymore, might as well remove this line.



Robert,

Can you please review the commit guidelines

http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines

The summary line should be in the form of
tslib: Remove ...

I know it's a trivial patch, but it would good to have the commit 
message correct.


Thanks
Sau!


Signed-off-by: Robert P. J. Day 

---

   still not totally sure i know what i'm doing here, but git history
shows that any machine-specific tslib files vanished long ago, so
there's little reason to hang onto this. i'm willing to be corrected.

diff --git a/meta/recipes-graphics/tslib/tslib_1.1.bb 
b/meta/recipes-graphics/tslib/tslib_1.1.bb
index 05d58b6..6d8c7dd 100644
--- a/meta/recipes-graphics/tslib/tslib_1.1.bb
+++ b/meta/recipes-graphics/tslib/tslib_1.1.bb
@@ -32,8 +32,6 @@ do_install_append() {
install -m 0755 ${WORKDIR}/tslib.sh ${D}${sysconfdir}/profile.d/
  }

-SRC_URI_OVERRIDES_PACKAGE_ARCH = "0"
-
  # People should consider using udev's /dev/input/touchscreen0 symlink
  # instead of detect-stylus
  #RDEPENDS_tslib-conf_weird-machine = "detect-stylus"


--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] Remove "SRC_URI_OVERRIDES_PACKAGE_ARCH = 0" from tslib.bb

2014-08-08 Thread Robert P. J. Day

Given that there are no machine-specific files for the tslib recipe
anymore, might as well remove this line.

Signed-off-by: Robert P. J. Day 

---

  still not totally sure i know what i'm doing here, but git history
shows that any machine-specific tslib files vanished long ago, so
there's little reason to hang onto this. i'm willing to be corrected.

diff --git a/meta/recipes-graphics/tslib/tslib_1.1.bb 
b/meta/recipes-graphics/tslib/tslib_1.1.bb
index 05d58b6..6d8c7dd 100644
--- a/meta/recipes-graphics/tslib/tslib_1.1.bb
+++ b/meta/recipes-graphics/tslib/tslib_1.1.bb
@@ -32,8 +32,6 @@ do_install_append() {
install -m 0755 ${WORKDIR}/tslib.sh ${D}${sysconfdir}/profile.d/
 }

-SRC_URI_OVERRIDES_PACKAGE_ARCH = "0"
-
 # People should consider using udev's /dev/input/touchscreen0 symlink
 # instead of detect-stylus
 #RDEPENDS_tslib-conf_weird-machine = "detect-stylus"

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] opkg-utils: allow disabling update-alternatives

2014-08-08 Thread Saul Wold

On 08/08/2014 02:37 AM, Sujith H wrote:

From: Sujith H 

This is needed to deal with the situation where we're using ipk packaging, so
opkg-utils must be built regardless of what update-alternatives provider we
prefer. The downside to the current implementation is the need to adjust
PACKAGECONFIG as well as PREFERRED_PROVIDER, but it is more explicit that way.

Signed-off-by: Christopher Larson 
Signed-off-by: Sujith H 
---
  meta/recipes-devtools/opkg-utils/opkg-utils_git.bb | 6 +-
  1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb 
b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
index 693c216..287bf53 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -19,11 +19,15 @@ TARGET_CC_ARCH += "${LDFLAGS}"
  PYTHONRDEPS = "python python-shell python-io python-math python-crypt 
python-logging python-fcntl python-subprocess python-pickle python-compression 
python-textutils python-stringold"
  PYTHONRDEPS_class-native = ""

-PACKAGECONFIG = "python"
+PACKAGECONFIG = "python update-alternatives"
  PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
+PACKAGECONFIG[update-alternatives] = ",,,"

  do_install() {
oe_runmake PREFIX=${prefix} DESTDIR=${D} install
+if ${@'true' if 'update-alternatives' not in PACKAGECONFIG.split() 
else 'false'}; then
+rm -f "${D}${bindir}/update-alternatives"
+fi
Would @bb.utils.contains() be better here?  I think that is the correct 
thing to use.


Sau!


  }

  PACKAGES =+ "update-alternatives-opkg"


--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] psplash: Adding support for systemd service files

2014-08-08 Thread Saul Wold

On 08/08/2014 02:09 AM, Sujith H wrote:

From: Sujith H 

If the DISTRO_FEATURES has systemd, then its better
to have corresponding service files associated with
the psplash. This change will help to do the same.

Can you propose a patch to the psplash upstream which is part of the 
Yocto Project (send the patch to yo...@yoctoproject.org) and then we can 
do a psplash upgrade to include these files directly?


Thanks
Sau!


Signed-off-by: Muzaffar Mahmood 
Signed-off-by: Sujith H 
---
  meta/recipes-core/psplash/files/psplash-quit.service  | 11 +++
  meta/recipes-core/psplash/files/psplash-start.service | 11 +++
  meta/recipes-core/psplash/psplash_git.bb  | 12 +++-
  3 files changed, 33 insertions(+), 1 deletion(-)
  create mode 100644 meta/recipes-core/psplash/files/psplash-quit.service
  create mode 100644 meta/recipes-core/psplash/files/psplash-start.service

diff --git a/meta/recipes-core/psplash/files/psplash-quit.service 
b/meta/recipes-core/psplash/files/psplash-quit.service
new file mode 100644
index 000..14bd499
--- /dev/null
+++ b/meta/recipes-core/psplash/files/psplash-quit.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Terminate Psplash Boot Screen
+After=psplash-start.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/psplash-write QUIT
+TimeoutSec=20
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-core/psplash/files/psplash-start.service 
b/meta/recipes-core/psplash/files/psplash-start.service
new file mode 100644
index 000..502b150
--- /dev/null
+++ b/meta/recipes-core/psplash/files/psplash-start.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Starts Psplash Boot screen
+Wants=systemd-vconsole-setup.service
+After=systemd-vconsole-setup.service systemd-udev-trigger.service 
systemd-udevd.service
+DefaultDependencies=no
+
+[Service]
+ExecStart=/usr/bin/psplash
+
+[Install]
+WantedBy=sysinit.target
diff --git a/meta/recipes-core/psplash/psplash_git.bb 
b/meta/recipes-core/psplash/psplash_git.bb
index 628ced4..16fa0ae 100644
--- a/meta/recipes-core/psplash/psplash_git.bb
+++ b/meta/recipes-core/psplash/psplash_git.bb
@@ -11,6 +11,8 @@ PR = "r15"

  SRC_URI = "git://git.yoctoproject.org/${BPN} \
 file://psplash-init \
+   file://psplash-start.service \
+   file://psplash-quit.service \
 ${SPLASH_IMAGES}"

  SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"
@@ -65,11 +67,14 @@ python __anonymous() {

  S = "${WORKDIR}/git"

-inherit autotools pkgconfig update-rc.d update-alternatives
+inherit autotools pkgconfig update-rc.d update-alternatives systemd

  ALTERNATIVE_PRIORITY = "100"
  ALTERNATIVE_LINK_NAME[psplash] = "${bindir}/psplash"

+SYSTEMD_PACKAGES = 
"${@base_contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
+SYSTEMD_SERVICE_${PN} = 
"${@base_contains('DISTRO_FEATURES','systemd','psplash-start.service 
psplash-quit.service','',d)}"
+
  python do_compile () {
  import shutil

@@ -103,6 +108,11 @@ do_install_append() {
install -m 0755 $i ${D}${bindir}/$i
done
rm -f ${D}${bindir}/psplash
+
+   if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+install -d ${D}${systemd_unitdir}/system
+install -m 644 ${WORKDIR}/*.service 
${D}/${systemd_unitdir}/system
+fi
  }

  FILES_${PN} += "/mnt/.psplash"


--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [yocto] RFC: Improving the developer workflow

2014-08-08 Thread Alex J Lennon
Hi Paul,
> Personally with how fragile package management can end up being, I'm 
> convinced 
> that full-image updates are the way to go for a lot of cases, but ideally 
> with 
> some intelligence so that you only ship the changes (at a filesystem level 
> rather than a package or file level). This ensures that an upgraded image on 
> one device ends up exactly identical to any other device including a newly 
> deployed one. Of course it does assume that you have a read-only rootfs and 
> keep your configuration data / logs / other writeable data on a separate 
> partition or storage medium. However, beyond improvements to support for 
> having a read-only rootfs we haven't really achieved anything in terms of out-
> of-the-box support for this, mainly due to lack of resources.
>
> However, whilst I haven't had a chance to look at it closely, there has been 
> some work on this within the community:
>
> http://sbabic.github.io/swupdate/swupdate.html
> https://github.com/sbabic/swupdate
> https://github.com/sbabic/meta-swupdate/
>  
>

I had a quick look at this. It's interesting. If I am reading this
correctly it's based on the old

-> Bootloader runs Partition A
-> Update Partition B, set Bootloader to run Partition B
->   On failure stay on partition A and retry update.
-> Bootloader runs Partition B
-> Update Partition A, set Bootloader to run Partition A
->  etc.

We've done this type of thing before and it works well. Of course the
drawback is the amount
of flash you need to achieve it but it is a good robust system.

I'd be interested to see how this could work with filesystem deltas say.
I don't _think_ that is
documented here?

...

Thinking a little further what would also really interest me would be to
consider using the
transactionality of the underlying file-system or block-management layer
for the update process.

Given nowadays journalling and log-structure file-systems are already
designed to fail-back when
file/meta-data modifications are interrupted surely we should be able to
start a macro-transaction
point at the start of the  partition update,  and if that update doesn't
complete with a macro-commit
then the f/s layer should be able to automatically roll itself back?
Perhaps the same could be done at
a block management layer?

Cheers,

Alex

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] trace-cmd: Update to version 2.3.2

2014-08-08 Thread Yasir Khan
From: Yasir-Khan 

Current trace-cmd version 1.2 throws "recorder error in
splice input" error while recording a trace on kernel
version 3.10. Update the trace-cmd version to latest 2.3.2
to resolve this error and drop the redundant patches.

* patches dropped - not needed anymore
 - trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch - backport
 - trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch - backport
 - trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch - backport
 - trace-cmd-fix-syntax-error-of-shell.patch - backport

Signed-off-by: Yasir-Khan 
---
 ...dd-checks-for-invalid-pointers-to-fix-seg.patch |   61 -
 ...o-not-call-stop_threads-if-doing-latency-.patch |   38 
 ...etting-plugin-to-nop-clears-data-before-i.patch |   96 
 .../trace-cmd-fix-syntax-error-of-shell.patch  |   30 --
 .../{trace-cmd_1.2.bb => trace-cmd_2.3.2.bb}   |   29 --
 5 files changed, 21 insertions(+), 233 deletions(-)
 delete mode 100644 
meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch
 delete mode 100644 
meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch
 delete mode 100644 
meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch
 delete mode 100644 
meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-fix-syntax-error-of-shell.patch
 rename meta/recipes-kernel/trace-cmd/{trace-cmd_1.2.bb => trace-cmd_2.3.2.bb} 
(38%)

diff --git 
a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch
 
b/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch
deleted file mode 100644
index 8fdeedb..000
--- 
a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From a6e259b2cd43db3c0f69441f627a8cf214f88506 Mon Sep 17 00:00:00 2001
-From: Mark Asselstine 
-Date: Thu, 5 Apr 2012 15:19:44 -0400
-Subject: [PATCH] trace-cmd: Add checks for invalid pointers to fix segfaults
-
-Upstream-Status: Backport
-
-Running 'trace-cmd report' after running latency tracers will cause a
-segfault due to invalid pointers. Adding checks to ensure
-pointers/lists are initialized before attempting to use them prevents
-these segfaults.
-
-Link: 
http://lkml.kernel.org/r/1333653586-3379-2-git-send-email-mark.asselst...@windriver.com
-
-Signed-off-by: Mark Asselstine 
-Signed-off-by: Steven Rostedt 

- trace-input.c |   12 +---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/trace-input.c b/trace-input.c
-index b6af1e6..5151c1e 100644
 a/trace-input.c
-+++ b/trace-input.c
-@@ -695,7 +695,8 @@ static void __free_page(struct tracecmd_input *handle, 
struct page *page)
- 
- static void free_page(struct tracecmd_input *handle, int cpu)
- {
--  if (!handle->cpu_data[cpu].page)
-+  if (!handle->cpu_data || cpu >= handle->cpus ||
-+  !handle->cpu_data[cpu].page)
-   return;
- 
-   __free_page(handle, handle->cpu_data[cpu].page);
-@@ -746,8 +747,12 @@ void tracecmd_record_ref(struct record *record)
- 
- static void free_next(struct tracecmd_input *handle, int cpu)
- {
--  struct record *record = handle->cpu_data[cpu].next;
-+  struct record *record;
-+
-+  if (!handle->cpu_data || cpu >= handle->cpus)
-+  return;
- 
-+  record = handle->cpu_data[cpu].next;
-   if (!record)
-   return;
- 
-@@ -2337,7 +2342,8 @@ void tracecmd_close(struct tracecmd_input *handle)
-   /* The tracecmd_peek_data may have cached a record */
-   free_next(handle, cpu);
-   free_page(handle, cpu);
--  if (!list_empty(&handle->cpu_data[cpu].pages))
-+  if (handle->cpu_data &&
-+  !list_empty(&handle->cpu_data[cpu].pages))
-   warning("pages still allocated on cpu %d%s",
-   cpu, 
show_records(&handle->cpu_data[cpu].pages));
-   }
--- 
-1.7.10.4
-
diff --git 
a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch
 
b/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch
deleted file mode 100644
index 4c00c51..000
--- 
a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 356dee73d9ced3e019dea2883a7f357fd4664b3e Mon Sep 17 00:00:00 2001
-From: Mark Asselstine 
-Date: Thu, 5 Apr 2012 15:19:45 -0400
-Subject: [PATCH] trace-cmd: Do not call stop_threads() if doing latency
- tracing
-
-Upstream-Status: Backport
-
-If we are using a latency tracer we do not call start_threads() we
-should therefore not call stop_threads() if 'latency'. Attempting
-to call stop_threads() without first calling start_threads() wil

Re: [OE-core] how does SCR_URI_OVERRIDES_PACKAGE_ARCH affect building tslib?

2014-08-08 Thread Robert P. J. Day
On Fri, 8 Aug 2014, Christopher Larson wrote:

>
> On Fri, Aug 8, 2014 at 3:35 AM, Robert P. J. Day  
> wrote:
>
>   looking at SRC_URI_OVERRIDES_PACKAGE_ARCH variable, and i notice
> first that there is only one usage of it in all of oe-core (tslib),
> but i'm confused as to what value it has.
>
>   the ref manual reads:
>
> "By default, the OpenEmbedded build system automatically detects
> whether SRC_URI contains files that are machine-specific. If so, the
> build system automatically changes PACKAGE_ARCH. Setting this variable
> to "0" disables this behavior."
>
>   first, i'm not sure what about the tslib SRC_URI appears to be
> machine-specific. also, just for fun, i commented out that line in the
> tslib .bb file, and did a global "bb show" to see what difference it
> made, and i saw no difference at all. so what exactly is the purpose
> of that line in that recipe? what difference should i be able to see
> with versus without it? thanks.
>
> Any file:// file in an SRC_URI can become machine specific if placed
> in a machine subdir in the search path. That said, I don't know why
> the automatic behavior of setting package_arch in that case is
> something that needs to be disabled for tslib. I'd suggest using
> git-blame to examine the commits which added this variable.

  should have done that first thing ... "git blame" shows that line
goes all the way back to 2006, when tslib *did* have machine-specific
files under tslib/. now that that's no longer true, i suspect that
line can be tossed.

  pity ... i was just looking for a single recipe that used
SRC_URI_OVERRIDES_PACKAGE_ARCH, and now i have none. i haz a sad.

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [RFC][PATCH] libav: drop older 0.8.11 and use libav-9 by default

2014-08-08 Thread Martin Jansa
On Fri, Aug 08, 2014 at 03:08:06PM +0100, Paul Eggleton wrote:
> On Friday 08 August 2014 16:06:27 Martin Jansa wrote:
> > Signed-off-by: Martin Jansa 
> > ---
> >  .../gstreamer/gst-ffmpeg_0.10.13.bb|  3 +--
> >  meta/recipes-multimedia/libav/libav.inc|  8 
> >  .../0001-configure-enable-pic-for-AArch64.patch| 23
> > -- meta/recipes-multimedia/libav/libav_0.8.11.bb  |
> > 20 --- meta/recipes-multimedia/libav/libav_9.13.bb|
> > 12 --- 5 files changed, 9 insertions(+), 57 deletions(-)
> >  delete mode 100644
> > meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.p
> > atch delete mode 100644 meta/recipes-multimedia/libav/libav_0.8.11.bb
> > 
> > diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
> > b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb index
> > bd7b8ce..04c08cc 100644
> > --- a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
> > +++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
> > @@ -53,7 +53,7 @@ SRC_URI =
> > "http://gstreamer.freedesktop.org/src/${BPN}/${BPN}-${PV}.tar.bz2 \
> > file://0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch \
> > file://0001-lavf-compute-probe-buffer-size-more-reliably.patch \
> > file://0001-ffserver-set-oformat.patch \
> > -   ${@bb.utils.contains('PACKAGECONFIG', 'libav9',
> > 'file://libav-9.patch', '', d)} \ +   file://libav-9.patch \
> >  "
> > 
> >  SRC_URI[md5sum] = "7f5beacaf1312db2db30a026b36888c4"
> > @@ -80,7 +80,6 @@ EXTRA_OECONF = "${FFMPEG_EXTRA_CONFIGURE_COMMON}"
> >  PACKAGECONFIG ??= "external-libav"
> >  PACKAGECONFIG[external-libav] = "--with-system-ffmpeg,,libav"
> >  PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc"
> > -PACKAGECONFIG[libav9] = ",,,"
> > 
> >  FILES_${PN} += "${libdir}/gstreamer-0.10/*.so"
> >  FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
> > diff --git a/meta/recipes-multimedia/libav/libav.inc
> > b/meta/recipes-multimedia/libav/libav.inc index 8b470c1..21c29fc 100644
> > --- a/meta/recipes-multimedia/libav/libav.inc
> > +++ b/meta/recipes-multimedia/libav/libav.inc
> > @@ -10,6 +10,13 @@ SECTION = "libs"
> >  LICENSE = "GPLv2+"
> >  LICENSE_FLAGS = "commercial"
> > 
> > +LIC_FILES_CHKSUM =
> > "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + 
> >   file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ +
> >file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ +
> >   
> > file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" +
> > +SRC_URI = "http://libav.org/releases/${BP}.tar.xz";
> > +
> >  # Provides ffmpeg compat, see http://libav.org/about.html
> >  PROVIDES = "ffmpeg"
> > 
> > @@ -86,6 +93,7 @@ do_install_append() {
> >  }
> > 
> >  PACKAGES += "${PN}-vhook-dbg ${PN}-vhook ffmpeg-x264-presets"
> > +PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|swscale).*"
> > 
> >  RSUGGESTS_${PN} = "mplayer"
> >  FILES_${PN} = "${bindir}"
> > diff --git
> > a/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64
> > .patch
> > b/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64
> > .patch deleted file mode 100644
> > index d9b22b9..000
> > ---
> > a/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64
> > .patch +++ /dev/null
> > @@ -1,23 +0,0 @@
> > -From 58db99e98f615d79ea90cac8f4bcf11c94e3e7c7 Mon Sep 17 00:00:00 2001
> > -From: Marcin Juszkiewicz 
> > -Date: Thu, 10 Jan 2013 12:42:19 +0100
> > -Subject: [PATCH] configure: enable pic for AArch64
> > -
> > -Signed-off-by: Marcin Juszkiewicz 
> > -
> > -Upstream-Status: Backport
> > 
> > - configure |2 +-
> > - 1 file changed, 1 insertion(+), 1 deletion(-)
> > -
> >  git.orig/configure
> > -+++ git/configure
> > -@@ -2393,7 +2393,7 @@ check_host_cflags -std=c99
> > - check_host_cflags -Wall
> > -
> > - case "$arch" in
> > --alpha|ia64|mips|parisc|ppc|sparc)
> > -+alpha|ia64|mips|parisc|ppc|sparc|aarch64)
> > - spic=$shared
> > - ;;
> > - x86)
> > diff --git a/meta/recipes-multimedia/libav/libav_0.8.11.bb
> > b/meta/recipes-multimedia/libav/libav_0.8.11.bb deleted file mode 100644
> > index 1344a2a..000
> > --- a/meta/recipes-multimedia/libav/libav_0.8.11.bb
> > +++ /dev/null
> > @@ -1,20 +0,0 @@
> > -require libav.inc
> > -
> > -SRC_URI = "http://libav.org/releases/${BP}.tar.xz \
> > -   file://0001-configure-enable-pic-for-AArch64.patch"
> > -
> > -SRC_URI[md5sum] = "cdc9b53c56a375baf73ea38cf7ade4f9"
> > -SRC_URI[sha256sum] =
> > "5934e4f0dbf6e0fc4987de86cdd079f1d11a1410ae275e9f46472af17f05155a" -
> > -LIC_FILES_CHKSUM =
> > "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - 
> >   file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ -
> >file://COPYING.LGPLv2.1;md5=e344c8fa836c3a41c4cbd79d7bd3a379 \ -
> 

[OE-core] [PATCH] perl-rdepends: add CPAN, CPAN::Meta requirements

2014-08-08 Thread Tim Orling
While testing libmodule-build-tiny-perl, it was discovered that
perl-module-cpan is missing some RDEPENDS.

* Run "perl -mCPAN::Meta" on a target, the following is missing:
  -- perl-module-parse-cpan-meta (Parse::CPAN::Meta)

* Run "perl -mCPAN" on a target, the following (and others) are
  missing:
  -- perl-module-file-glob (File::Glob)
  -- perl-module-config-git (Config_git)

* Also added missing modules from runtime-requires in
  https://metacpan.org/source/ANDK/CPAN-2.05/META.json

This patch adds them to perl-rdepends for  ${PN}-module-cpan

Signed-off-by: Tim Orling 
---
 meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc | 20 
 1 file changed, 20 insertions(+)

diff --git a/meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc 
b/meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc
index 9bd2e39..041471a 100644
--- a/meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc
+++ b/meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc
@@ -347,36 +347,56 @@ RDEPENDS_${PN}-module-corelist += "${PN}-module-strict"
 RDEPENDS_${PN}-module-corelist += "${PN}-module-vars"
 RDEPENDS_${PN}-module-corelist += "${PN}-module-version"
 RDEPENDS_${PN}-module-corelist += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-archive-tar"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-b"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-build"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-carp"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-config"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-config-git"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-compress-zlib"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-cpan"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-cwd"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-data-dumper"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-digest-md5"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-digest-sha"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-dirhandle"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-cbuilder"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-makemaker"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-manifest"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-mm"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-mm-unix"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-fcntl"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-file-basename"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-file-copy"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-file-find"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-file-glob"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-filehandle"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-file-path"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-file-temp"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-http-tiny"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-io-compress-base"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-json-pp"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-lib"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-list-util"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-mime-base64"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-net-ftp"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-net-ping"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-overload"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-parse-cpan-meta"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-posix"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-safe"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-scalar-util"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-strict"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-sys-hostname"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-term-readline"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-test-harness"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-test-more"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-text-parsewords"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-text-wrap"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-time-local"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-unicore"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-vars"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-version"
 RDEPENDS_${PN}-module-cpan += "${PN}-module-warnings"
-- 
1.9.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] how does SCR_URI_OVERRIDES_PACKAGE_ARCH affect building tslib?

2014-08-08 Thread Christopher Larson
On Fri, Aug 8, 2014 at 3:35 AM, Robert P. J. Day 
wrote:

>
>   looking at SRC_URI_OVERRIDES_PACKAGE_ARCH variable, and i notice
> first that there is only one usage of it in all of oe-core (tslib),
> but i'm confused as to what value it has.
>
>   the ref manual reads:
>
> "By default, the OpenEmbedded build system automatically detects
> whether SRC_URI contains files that are machine-specific. If so, the
> build system automatically changes PACKAGE_ARCH. Setting this variable
> to "0" disables this behavior."
>
>   first, i'm not sure what about the tslib SRC_URI appears to be
> machine-specific. also, just for fun, i commented out that line in the
> tslib .bb file, and did a global "bb show" to see what difference it
> made, and i saw no difference at all. so what exactly is the purpose
> of that line in that recipe? what difference should i be able to see
> with versus without it? thanks.


Any file:// file in an SRC_URI can become machine specific if placed in a
machine subdir in the search path. That said, I don't know why the
automatic behavior of setting package_arch in that case is something that
needs to be disabled for tslib. I'd suggest using git-blame to examine the
commits which added this variable.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [RFC][PATCH] libav: drop older 0.8.11 and use libav-9 by default

2014-08-08 Thread Paul Eggleton
On Friday 08 August 2014 16:06:27 Martin Jansa wrote:
> Signed-off-by: Martin Jansa 
> ---
>  .../gstreamer/gst-ffmpeg_0.10.13.bb|  3 +--
>  meta/recipes-multimedia/libav/libav.inc|  8 
>  .../0001-configure-enable-pic-for-AArch64.patch| 23
> -- meta/recipes-multimedia/libav/libav_0.8.11.bb  |
> 20 --- meta/recipes-multimedia/libav/libav_9.13.bb|
> 12 --- 5 files changed, 9 insertions(+), 57 deletions(-)
>  delete mode 100644
> meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.p
> atch delete mode 100644 meta/recipes-multimedia/libav/libav_0.8.11.bb
> 
> diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
> b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb index
> bd7b8ce..04c08cc 100644
> --- a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
> +++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
> @@ -53,7 +53,7 @@ SRC_URI =
> "http://gstreamer.freedesktop.org/src/${BPN}/${BPN}-${PV}.tar.bz2 \
> file://0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch \
> file://0001-lavf-compute-probe-buffer-size-more-reliably.patch \
> file://0001-ffserver-set-oformat.patch \
> -   ${@bb.utils.contains('PACKAGECONFIG', 'libav9',
> 'file://libav-9.patch', '', d)} \ +   file://libav-9.patch \
>  "
> 
>  SRC_URI[md5sum] = "7f5beacaf1312db2db30a026b36888c4"
> @@ -80,7 +80,6 @@ EXTRA_OECONF = "${FFMPEG_EXTRA_CONFIGURE_COMMON}"
>  PACKAGECONFIG ??= "external-libav"
>  PACKAGECONFIG[external-libav] = "--with-system-ffmpeg,,libav"
>  PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc"
> -PACKAGECONFIG[libav9] = ",,,"
> 
>  FILES_${PN} += "${libdir}/gstreamer-0.10/*.so"
>  FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
> diff --git a/meta/recipes-multimedia/libav/libav.inc
> b/meta/recipes-multimedia/libav/libav.inc index 8b470c1..21c29fc 100644
> --- a/meta/recipes-multimedia/libav/libav.inc
> +++ b/meta/recipes-multimedia/libav/libav.inc
> @@ -10,6 +10,13 @@ SECTION = "libs"
>  LICENSE = "GPLv2+"
>  LICENSE_FLAGS = "commercial"
> 
> +LIC_FILES_CHKSUM =
> "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + 
>   file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ +
>file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ +
>   
> file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" +
> +SRC_URI = "http://libav.org/releases/${BP}.tar.xz";
> +
>  # Provides ffmpeg compat, see http://libav.org/about.html
>  PROVIDES = "ffmpeg"
> 
> @@ -86,6 +93,7 @@ do_install_append() {
>  }
> 
>  PACKAGES += "${PN}-vhook-dbg ${PN}-vhook ffmpeg-x264-presets"
> +PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|swscale).*"
> 
>  RSUGGESTS_${PN} = "mplayer"
>  FILES_${PN} = "${bindir}"
> diff --git
> a/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64
> .patch
> b/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64
> .patch deleted file mode 100644
> index d9b22b9..000
> ---
> a/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64
> .patch +++ /dev/null
> @@ -1,23 +0,0 @@
> -From 58db99e98f615d79ea90cac8f4bcf11c94e3e7c7 Mon Sep 17 00:00:00 2001
> -From: Marcin Juszkiewicz 
> -Date: Thu, 10 Jan 2013 12:42:19 +0100
> -Subject: [PATCH] configure: enable pic for AArch64
> -
> -Signed-off-by: Marcin Juszkiewicz 
> -
> -Upstream-Status: Backport
> 
> - configure |2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
>  git.orig/configure
> -+++ git/configure
> -@@ -2393,7 +2393,7 @@ check_host_cflags -std=c99
> - check_host_cflags -Wall
> -
> - case "$arch" in
> --alpha|ia64|mips|parisc|ppc|sparc)
> -+alpha|ia64|mips|parisc|ppc|sparc|aarch64)
> - spic=$shared
> - ;;
> - x86)
> diff --git a/meta/recipes-multimedia/libav/libav_0.8.11.bb
> b/meta/recipes-multimedia/libav/libav_0.8.11.bb deleted file mode 100644
> index 1344a2a..000
> --- a/meta/recipes-multimedia/libav/libav_0.8.11.bb
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -require libav.inc
> -
> -SRC_URI = "http://libav.org/releases/${BP}.tar.xz \
> -   file://0001-configure-enable-pic-for-AArch64.patch"
> -
> -SRC_URI[md5sum] = "cdc9b53c56a375baf73ea38cf7ade4f9"
> -SRC_URI[sha256sum] =
> "5934e4f0dbf6e0fc4987de86cdd079f1d11a1410ae275e9f46472af17f05155a" -
> -LIC_FILES_CHKSUM =
> "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - 
>   file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ -
>file://COPYING.LGPLv2.1;md5=e344c8fa836c3a41c4cbd79d7bd3a379 \ -
>   
> file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" -
> -PROVIDES += "libpostproc"
> -
> -EXTRA_OECONF += " \
> ---enable-postproc \
> -"
> -
> -PACKAGES_DYNAMIC +=
> "^lib(av(codec|device|filter|format|util)|postproc|swscale).*" diff --git
> a/meta/recipes-

Re: [OE-core] [RFC][PATCH] libav: drop older 0.8.11 and use libav-9 by default

2014-08-08 Thread Martin Jansa
On Fri, Aug 08, 2014 at 04:06:27PM +0200, Martin Jansa wrote:
> Signed-off-by: Martin Jansa 
> ---
>  .../gstreamer/gst-ffmpeg_0.10.13.bb|  3 +--
>  meta/recipes-multimedia/libav/libav.inc|  8 
>  .../0001-configure-enable-pic-for-AArch64.patch| 23 
> --
>  meta/recipes-multimedia/libav/libav_0.8.11.bb  | 20 ---
>  meta/recipes-multimedia/libav/libav_9.13.bb| 12 ---
>  5 files changed, 9 insertions(+), 57 deletions(-)
>  delete mode 100644 
> meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch
>  delete mode 100644 meta/recipes-multimedia/libav/libav_0.8.11.bb

There is at least one missing piece:

gst-ffmpeg_0.10.13.bb:DEPENDS = "gstreamer gst-plugins-base zlib bzip2 
yasm-native libpostproc"

so libpostproc recipe from meta-oe would need to be imported to oe-core

> diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb 
> b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
> index bd7b8ce..04c08cc 100644
> --- a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
> +++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
> @@ -53,7 +53,7 @@ SRC_URI = 
> "http://gstreamer.freedesktop.org/src/${BPN}/${BPN}-${PV}.tar.bz2 \
> 
> file://0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch \
> file://0001-lavf-compute-probe-buffer-size-more-reliably.patch \
> file://0001-ffserver-set-oformat.patch \
> -   ${@bb.utils.contains('PACKAGECONFIG', 'libav9', 
> 'file://libav-9.patch', '', d)} \ 
> +   file://libav-9.patch \
>  "
>  
>  SRC_URI[md5sum] = "7f5beacaf1312db2db30a026b36888c4"
> @@ -80,7 +80,6 @@ EXTRA_OECONF = "${FFMPEG_EXTRA_CONFIGURE_COMMON}"
>  PACKAGECONFIG ??= "external-libav"
>  PACKAGECONFIG[external-libav] = "--with-system-ffmpeg,,libav"
>  PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc"
> -PACKAGECONFIG[libav9] = ",,,"
>  
>  FILES_${PN} += "${libdir}/gstreamer-0.10/*.so"
>  FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
> diff --git a/meta/recipes-multimedia/libav/libav.inc 
> b/meta/recipes-multimedia/libav/libav.inc
> index 8b470c1..21c29fc 100644
> --- a/meta/recipes-multimedia/libav/libav.inc
> +++ b/meta/recipes-multimedia/libav/libav.inc
> @@ -10,6 +10,13 @@ SECTION = "libs"
>  LICENSE = "GPLv2+"
>  LICENSE_FLAGS = "commercial"
>  
> +LIC_FILES_CHKSUM = 
> "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
> +
> file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
> +
> file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
> +
> file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
> +
> +SRC_URI = "http://libav.org/releases/${BP}.tar.xz";
> +
>  # Provides ffmpeg compat, see http://libav.org/about.html
>  PROVIDES = "ffmpeg"
>  
> @@ -86,6 +93,7 @@ do_install_append() {
>  }
>  
>  PACKAGES += "${PN}-vhook-dbg ${PN}-vhook ffmpeg-x264-presets"
> +PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|swscale).*"
>  
>  RSUGGESTS_${PN} = "mplayer"
>  FILES_${PN} = "${bindir}"
> diff --git 
> a/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch
>  
> b/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch
> deleted file mode 100644
> index d9b22b9..000
> --- 
> a/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -From 58db99e98f615d79ea90cac8f4bcf11c94e3e7c7 Mon Sep 17 00:00:00 2001
> -From: Marcin Juszkiewicz 
> -Date: Thu, 10 Jan 2013 12:42:19 +0100
> -Subject: [PATCH] configure: enable pic for AArch64
> -
> -Signed-off-by: Marcin Juszkiewicz 
> -
> -Upstream-Status: Backport
> 
> - configure |2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
>  git.orig/configure
> -+++ git/configure
> -@@ -2393,7 +2393,7 @@ check_host_cflags -std=c99
> - check_host_cflags -Wall
> - 
> - case "$arch" in
> --alpha|ia64|mips|parisc|ppc|sparc)
> -+alpha|ia64|mips|parisc|ppc|sparc|aarch64)
> - spic=$shared
> - ;;
> - x86)
> diff --git a/meta/recipes-multimedia/libav/libav_0.8.11.bb 
> b/meta/recipes-multimedia/libav/libav_0.8.11.bb
> deleted file mode 100644
> index 1344a2a..000
> --- a/meta/recipes-multimedia/libav/libav_0.8.11.bb
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -require libav.inc
> -
> -SRC_URI = "http://libav.org/releases/${BP}.tar.xz \
> -   file://0001-configure-enable-pic-for-AArch64.patch"
> -
> -SRC_URI[md5sum] = "cdc9b53c56a375baf73ea38cf7ade4f9"
> -SRC_URI[sha256sum] = 
> "5934e4f0dbf6e0fc4987de86cdd079f1d11a1410ae275e9f46472af17f05155a"
> -
> -LIC_FILES_CHKSUM = 
> "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
> -
> file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
> -
> file://COPYING.LGPLv2.1;md5=e344c8fa836c3a41c4cbd79d7bd3a

[OE-core] [RFC][PATCH] libav: drop older 0.8.11 and use libav-9 by default

2014-08-08 Thread Martin Jansa
Signed-off-by: Martin Jansa 
---
 .../gstreamer/gst-ffmpeg_0.10.13.bb|  3 +--
 meta/recipes-multimedia/libav/libav.inc|  8 
 .../0001-configure-enable-pic-for-AArch64.patch| 23 --
 meta/recipes-multimedia/libav/libav_0.8.11.bb  | 20 ---
 meta/recipes-multimedia/libav/libav_9.13.bb| 12 ---
 5 files changed, 9 insertions(+), 57 deletions(-)
 delete mode 100644 
meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch
 delete mode 100644 meta/recipes-multimedia/libav/libav_0.8.11.bb

diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb 
b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
index bd7b8ce..04c08cc 100644
--- a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
@@ -53,7 +53,7 @@ SRC_URI = 
"http://gstreamer.freedesktop.org/src/${BPN}/${BPN}-${PV}.tar.bz2 \

file://0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch \
file://0001-lavf-compute-probe-buffer-size-more-reliably.patch \
file://0001-ffserver-set-oformat.patch \
-   ${@bb.utils.contains('PACKAGECONFIG', 'libav9', 
'file://libav-9.patch', '', d)} \ 
+   file://libav-9.patch \
 "
 
 SRC_URI[md5sum] = "7f5beacaf1312db2db30a026b36888c4"
@@ -80,7 +80,6 @@ EXTRA_OECONF = "${FFMPEG_EXTRA_CONFIGURE_COMMON}"
 PACKAGECONFIG ??= "external-libav"
 PACKAGECONFIG[external-libav] = "--with-system-ffmpeg,,libav"
 PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc"
-PACKAGECONFIG[libav9] = ",,,"
 
 FILES_${PN} += "${libdir}/gstreamer-0.10/*.so"
 FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
diff --git a/meta/recipes-multimedia/libav/libav.inc 
b/meta/recipes-multimedia/libav/libav.inc
index 8b470c1..21c29fc 100644
--- a/meta/recipes-multimedia/libav/libav.inc
+++ b/meta/recipes-multimedia/libav/libav.inc
@@ -10,6 +10,13 @@ SECTION = "libs"
 LICENSE = "GPLv2+"
 LICENSE_FLAGS = "commercial"
 
+LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+
file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
+file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
+
+SRC_URI = "http://libav.org/releases/${BP}.tar.xz";
+
 # Provides ffmpeg compat, see http://libav.org/about.html
 PROVIDES = "ffmpeg"
 
@@ -86,6 +93,7 @@ do_install_append() {
 }
 
 PACKAGES += "${PN}-vhook-dbg ${PN}-vhook ffmpeg-x264-presets"
+PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|swscale).*"
 
 RSUGGESTS_${PN} = "mplayer"
 FILES_${PN} = "${bindir}"
diff --git 
a/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch
 
b/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch
deleted file mode 100644
index d9b22b9..000
--- 
a/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 58db99e98f615d79ea90cac8f4bcf11c94e3e7c7 Mon Sep 17 00:00:00 2001
-From: Marcin Juszkiewicz 
-Date: Thu, 10 Jan 2013 12:42:19 +0100
-Subject: [PATCH] configure: enable pic for AArch64
-
-Signed-off-by: Marcin Juszkiewicz 
-
-Upstream-Status: Backport

- configure |2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
 git.orig/configure
-+++ git/configure
-@@ -2393,7 +2393,7 @@ check_host_cflags -std=c99
- check_host_cflags -Wall
- 
- case "$arch" in
--alpha|ia64|mips|parisc|ppc|sparc)
-+alpha|ia64|mips|parisc|ppc|sparc|aarch64)
- spic=$shared
- ;;
- x86)
diff --git a/meta/recipes-multimedia/libav/libav_0.8.11.bb 
b/meta/recipes-multimedia/libav/libav_0.8.11.bb
deleted file mode 100644
index 1344a2a..000
--- a/meta/recipes-multimedia/libav/libav_0.8.11.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require libav.inc
-
-SRC_URI = "http://libav.org/releases/${BP}.tar.xz \
-   file://0001-configure-enable-pic-for-AArch64.patch"
-
-SRC_URI[md5sum] = "cdc9b53c56a375baf73ea38cf7ade4f9"
-SRC_URI[sha256sum] = 
"5934e4f0dbf6e0fc4987de86cdd079f1d11a1410ae275e9f46472af17f05155a"
-
-LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
-
file://COPYING.LGPLv2.1;md5=e344c8fa836c3a41c4cbd79d7bd3a379 \
-file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-PROVIDES += "libpostproc"
-
-EXTRA_OECONF += " \
---enable-postproc \
-"
-
-PACKAGES_DYNAMIC += 
"^lib(av(codec|device|filter|format|util)|postproc|swscale).*"
diff --git a/meta/recipes-multimedia/libav/libav_9.13.bb 
b/meta/recipes-multimedia/libav/libav_9.13.bb
index f9c413f..e922403 100644
--- a/meta/recipes-multimedia/libav/libav_9.13.bb
+++ b/meta/recipes-multimedia/libav/libav_9.13.bb
@@ -1,16 +1,4 @@
 require libav.inc

Re: [OE-core] RFC: Improving the developer workflow

2014-08-08 Thread Mike Looijmans

On 08/07/2014 11:10 AM, Paul Eggleton wrote:
...


* Provide tools to allow modifying software for which a recipe already exists.
If the user has an external source tree we use that, otherwise we can fetch
the source, apply any patches and place the result in an external source tree,
possibly managed with git. (It's fair to say this is perhaps less of an
application developer type task, but still an important one and fairly simple
to add once we have the rest of the tooling.)


This has been the most awkard of all OE uses so far. It hasn't improved 
over the years either.


In general, people (both external customers and internal colleages) have 
no objection whatsoever to cloning the OE repos and running bitbake 
themselves.


I haven't been able to come up with a good solution. I always try to 
test and develop my software on a regular PC, but for some things (e.g. 
access to the FPGA, or optimizing inner loop code with NEON 
instructions) you can't do without actual on-target deployment.


So I usually end up with a mix of manual commands and special-purpose 
shell scripts that work for just one package. For small packages, I tend 
to commit locally, and then re-run the package up to the "install" 
phase. For big things that take several minutes to compile I'm usually 
manually moving files around and struggling to keep the files in my 
repository and what the build will see in sync.


Any small step forward in this area will be a giant leap for the 
developers...




* Provide tools to get your changes onto the target in order to test them.
With access to the build system, rebuilding the image with changes to a target
component is fairly trivial; but we can go further - assuming a network
connection to the target is available we can provide tools to simply deploy
the files installed by the changed recipe onto the running device (using an
"sstate-like" mechanism - remove the old list of files and then install the new
ones).


If it's possible to run the "install" target, this may be as simple as 
making a tar from the installed "image" directory and unpack it on the 
target.

I tend to do this in a one-liner if I have ssh access:

tar -cf - -C tmp.../${P}/image . | ssh target tar xf - -C /

I think that covers 99% of the use cases I can come up with...


* Provide tools to get your changes to the code or the metadata into a form
that you can submit somewhere.


If you have git in the "modify recipe" stage, this should be a breeze. 
Just use git push/bundle/send-email/format-patch/... to send them where 
they need to go.


Mike.
--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] Yocto: Install full set of python modules in Qt SDK toolchain

2014-08-08 Thread Marek Vasut
On Friday, August 08, 2014 at 07:22:04 AM, Koen Kooi wrote:
> Since 'yocto' is a project like freedesktop.org your commit message doesn't
> make sense, it should be something like:
> 
> meta-toolchain-qt:  Install full set of python modules

Got it, Saul also told me so. I will wait a bit for some more feedback and 
repost with corrections, OK ? Is this approach I took here even correct please ?

Best regards,
Marek Vasut
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 2/2] opkg: Add runtime dep on gnupg if 'gpg' is in PACAKGECONFIG

2014-08-08 Thread Paul Barker
On Fri, Aug 08, 2014 at 02:13:46PM +0200, Martin Jansa wrote:
> On Fri, Aug 08, 2014 at 11:37:09AM +, Paul Barker wrote:
> > The 'opkg-key' utility requires gpg to manage the list of trusted keys. The
> > ability to verify package signatures is not much use without the ability to 
> > add
> > keys to the trusted list...
> > 
> > Signed-off-by: Paul Barker 
> > ---
> >  meta/recipes-devtools/opkg/opkg.inc | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/meta/recipes-devtools/opkg/opkg.inc 
> > b/meta/recipes-devtools/opkg/opkg.inc
> > index ba21d84..56c54b6 100644
> > --- a/meta/recipes-devtools/opkg/opkg.inc
> > +++ b/meta/recipes-devtools/opkg/opkg.inc
> > @@ -27,7 +27,7 @@ OPKGLIBDIR = "${target_localstatedir}/lib"
> >  
> >  PACKAGECONFIG ??= ""
> >  
> > -PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error"
> > +PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg"
> 
> Shouldn't this be gpgme?
> 

Which bit? The PACKAGECONFIG name or one of the comma separated fields?

Thanks,

-- 
Paul Barker

Email: p...@paulbarker.me.uk
http://www.paulbarker.me.uk


pgpfwmrfJh52I.pgp
Description: PGP signature
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 2/2] opkg: Add runtime dep on gnupg if 'gpg' is in PACAKGECONFIG

2014-08-08 Thread Martin Jansa
On Fri, Aug 08, 2014 at 11:37:09AM +, Paul Barker wrote:
> The 'opkg-key' utility requires gpg to manage the list of trusted keys. The
> ability to verify package signatures is not much use without the ability to 
> add
> keys to the trusted list...
> 
> Signed-off-by: Paul Barker 
> ---
>  meta/recipes-devtools/opkg/opkg.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/opkg/opkg.inc 
> b/meta/recipes-devtools/opkg/opkg.inc
> index ba21d84..56c54b6 100644
> --- a/meta/recipes-devtools/opkg/opkg.inc
> +++ b/meta/recipes-devtools/opkg/opkg.inc
> @@ -27,7 +27,7 @@ OPKGLIBDIR = "${target_localstatedir}/lib"
>  
>  PACKAGECONFIG ??= ""
>  
> -PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error"
> +PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg"

Shouldn't this be gpgme?

>  PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
>  PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
>  PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
> -- 
> 2.0.3
> 
> -- 
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa jabber: martin.ja...@gmail.com


signature.asc
Description: Digital signature
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/2] opkg: Add runtime dep on gnupg if 'gpg' is in PACAKGECONFIG

2014-08-08 Thread Paul Barker
The 'opkg-key' utility requires gpg to manage the list of trusted keys. The
ability to verify package signatures is not much use without the ability to add
keys to the trusted list...

Signed-off-by: Paul Barker 
---
 meta/recipes-devtools/opkg/opkg.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/opkg/opkg.inc 
b/meta/recipes-devtools/opkg/opkg.inc
index ba21d84..56c54b6 100644
--- a/meta/recipes-devtools/opkg/opkg.inc
+++ b/meta/recipes-devtools/opkg/opkg.inc
@@ -27,7 +27,7 @@ OPKGLIBDIR = "${target_localstatedir}/lib"
 
 PACKAGECONFIG ??= ""
 
-PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error"
+PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg"
 PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
 PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
 PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
-- 
2.0.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/2] gpgme: Add pkg-config file

2014-08-08 Thread Paul Barker
A basic gpgme.pc file is installed with gpgme which should allow the library to
be found and used using pkg-config rather than gpgme-config.

Signed-off-by: Paul Barker 
---
 meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc | 10 ++
 meta/recipes-support/gpgme/gpgme_1.4.3.bb   |  8 +++-
 2 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc

diff --git a/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc 
b/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc
new file mode 100644
index 000..30a4d56
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc
@@ -0,0 +1,10 @@
+prefix=/usr
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: gpgme
+Description: GNU Privacy Guard Made Easy
+Version: 1.4.3
+Requires:
+Libs: -L${libdir} -lgpgme -lassuan -lgpg-error
+Cflags: -I${includedir}
diff --git a/meta/recipes-support/gpgme/gpgme_1.4.3.bb 
b/meta/recipes-support/gpgme/gpgme_1.4.3.bb
index ef08d4f..ca1e5f9 100644
--- a/meta/recipes-support/gpgme/gpgme_1.4.3.bb
+++ b/meta/recipes-support/gpgme/gpgme_1.4.3.bb
@@ -10,7 +10,8 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
 
file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
 
 SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-${PV}.tar.bz2 \
-   file://disable_gpgconf_check.patch"
+   file://disable_gpgconf_check.patch \
+   file://gpgme.pc"
 
 SRC_URI[md5sum] = "334e524cffa8af4e2f43ae8afe585672"
 SRC_URI[sha256sum] = 
"2d1cc12411753752d9c5b9037e6fd3fd363517af720154768cc7b46b60120496"
@@ -32,3 +33,8 @@ do_configure_prepend () {
rm -f ${S}/m4/gpg-error.m4
rm -f ${S}/m4/libassuan.m4
 }
+
+do_install_append () {
+install -d ${D}${libdir}/pkgconfig
+install -m 0644 ${WORKDIR}/gpgme.pc ${D}${libdir}/pkgconfig/
+}
-- 
2.0.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/2] Fix gpg support in opkg

2014-08-08 Thread Paul Barker
After recent changes to disable binconfig programs, 'gpgme-config' is no longer
installed with gpgme. This prevents opkg from finding gpgme which is needed when
'gpg' is added to PACKAGECONFIG. This is fixed in two stages:

  - A 'gpgme.pc' file was created and added to openembedded-core to be installed
with gpgme. The Cflags and Libs values for this file were found by running
'gpgme-config' on my development machine. This patch is included here.

  - Changes were made to 'configure.ac' in opkg to use pkg-config to find gpgme
instead of using 'gpgme-config'. These changes could be added as a patch in
openembedded-core but I don't think there's much point. opkg-0.2.3 should be
released in the next couple of weeks and I'll include the relevant changes
in that.

Additionally, I found that gpg itself wasn't installed when opkg was installed
with gpg support. The 'opkg-key' program uses gpg to manage the list of trusted
keys so without gpg it isn't possible to set up package feed verification on a
device. Therefore, I've added 'gnupg' to RDEPENDS when 'gpg' is in
PACKAGECONFIG.

Paul Barker (2):
  gpgme: Add pkg-config file
  opkg: Add runtime dep on gnupg if 'gpg' is in PACAKGECONFIG

 meta/recipes-devtools/opkg/opkg.inc |  2 +-
 meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc | 10 ++
 meta/recipes-support/gpgme/gpgme_1.4.3.bb   |  8 +++-
 3 files changed, 18 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc

-- 
2.0.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] gpgme-config

2014-08-08 Thread Paul Barker
On Wed, Jul 23, 2014 at 04:49:52PM +0200, Martin Jansa wrote:
> On Wed, Jul 23, 2014 at 01:51:23PM +, Paul Barker wrote:
> > Hi all,
> > 
> > I'm trying to build opkg with 'gpg' added to PACKAGECONFIG on the master 
> > branch
> > of OE. The gpg support for opkg is provided by gpgme, which uses 
> > 'gpgme-config'
> > to determine CFLAGS and LIBS when building. After recent changes, the
> > gpgme-config script is now just a dummy and doesn't do anything.
> > 
> > Upstream gpgme do not provide a pkg-config file and an upstream issue about 
> > this
> > raised in 2012 was resolved WONTFIX 
> > (https://bugs.g10code.com/gnupg/issue1414).
> > 
> > Our options are:
> > 
> > 1) Add a .pc file to gpgme and maintain it within OE as it is very unlikely 
> > to
> >be accepted upstream. Then I need to modify configure.ac in opkg to 
> > support
> >both this pkg-config file (for OE) and the gpgme-config utility (for all
> >other users of opkg).
> 
> This comment in original issue:
> The gpgme-config scripts goes along with the gpgme.m4 code.  A .pc file
> won't be able to do what we can do with this combination.
> 
> Makes me think that if we implement .pc.in which generates correct .pc
> from gpgme.m4 he won't be against accepting such patch upstream.
> 
> I think that biggest reason against -config scripts was that they aren't
> cross-compile friendly (not sysroot-aware) so you either have whole path
> to sysroot hardcoded in -config file and then have to mangle it for
> target -dev package or vice versa and you need to prefix returned values
> (like -I -L flags with sysroot).
>  
> > 2) Make an exception to the policy on -config scripts for gpgme.
> > 
> > I haven't really followed the discussion on why -config scripts needed to be
> > removed so I'll put this question to other OE developers. Would option (2) 
> > cause
> > more problems in the long run? If so, is it worth the extra effort to follow
> > option (1)?
> > 
> > I'll probably need someone to bounce a few autoconf and pkg-config 
> > questions off
> > if I implement option (1) as I'm not very familiar with either system.
> 
> I'm no expert in this as well, but there are some examples we can copy.
> 

I think I've got this now. I've created a 'gpgme.pc' file by adapting 'lua.pc'
from meta-openembedded. The Libs and Cflags were found by running 'gpgme-config'
on my development machine and they seem fairly sensible. I've then used
PKG_CHECK_MODULES() in 'configure.ac' within opkg to find gpgme using that
pkg-config file.

I'll send in a couple of patches but I'll delay the changes to 'configure.ac' in
opkg. I should be releasing opkg-0.2.3 in the next few weeks and that will
include the necessary changes.

Thanks,

-- 
Paul Barker

Email: p...@paulbarker.me.uk
http://www.paulbarker.me.uk


pgpnapGt3zwwx.pgp
Description: PGP signature
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] how does SCR_URI_OVERRIDES_PACKAGE_ARCH affect building tslib?

2014-08-08 Thread Robert P. J. Day

  looking at SRC_URI_OVERRIDES_PACKAGE_ARCH variable, and i notice
first that there is only one usage of it in all of oe-core (tslib),
but i'm confused as to what value it has.

  the ref manual reads:

"By default, the OpenEmbedded build system automatically detects
whether SRC_URI contains files that are machine-specific. If so, the
build system automatically changes PACKAGE_ARCH. Setting this variable
to "0" disables this behavior."

  first, i'm not sure what about the tslib SRC_URI appears to be
machine-specific. also, just for fun, i commented out that line in the
tslib .bb file, and did a global "bb show" to see what difference it
made, and i saw no difference at all. so what exactly is the purpose
of that line in that recipe? what difference should i be able to see
with versus without it? thanks.

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/2] gst-ffmpeg: add dependency on libpostproc

2014-08-08 Thread Martin Jansa
On Wed, Aug 06, 2014 at 03:42:38PM +0100, Paul Eggleton wrote:
> On Wednesday 06 August 2014 16:37:34 Martin Jansa wrote:
> > On Wed, Aug 06, 2014 at 01:41:58PM +0100, Paul Eggleton wrote:
> > > On Wednesday 06 August 2014 13:41:56 Martin Jansa wrote:
> > > > * building with libav-9 fails with:
> > > >   | checking for POSTPROC... configure: error: Package requirements
> > > >   | (libpostproc libavcodec libavutil) were not met:
> > > >   | 
> > > >   | No package 'libpostproc' found
> > > 
> > > Does gst-ffmpeg actually work with libav > 0.8?
> > 
> > No, not yet (see world status e-mails), but at least this is step
> > in right direction IMHO and doesn't harm libav-0.8 users.
> 
> I'm just not sure gst-ffmpeg should be allowed to get past this at all if 
> it's 

It gets past this when libpostproc is built before gst-ffmpeg, adding
the dependency only makes the failure with libav-9 to be deterministic
(always in the same piece of code).

> not currently expected to work. The known working configuration is either 
> gst-ffmpeg + libav 0.8.x, or gstreamer1.0-libav + libav > 0.8.x.

FWIW here is patchset used by gentoo to make gst-ffmpeg-0.10.13
compatible with libav-9:

http://dev.gentoo.org/~tetromino/distfiles/gst-plugins-ffmpeg/gst-ffmpeg-0.10.13_p2012.11-libav-9-patches.tar.xz

-- 
Martin 'JaMa' Jansa jabber: martin.ja...@gmail.com


signature.asc
Description: Digital signature
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] opkg-utils: allow disabling update-alternatives

2014-08-08 Thread Sujith H
From: Sujith H 

This is needed to deal with the situation where we're using ipk packaging, so
opkg-utils must be built regardless of what update-alternatives provider we
prefer. The downside to the current implementation is the need to adjust
PACKAGECONFIG as well as PREFERRED_PROVIDER, but it is more explicit that way.

Signed-off-by: Christopher Larson 
Signed-off-by: Sujith H 
---
 meta/recipes-devtools/opkg-utils/opkg-utils_git.bb | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb 
b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
index 693c216..287bf53 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -19,11 +19,15 @@ TARGET_CC_ARCH += "${LDFLAGS}"
 PYTHONRDEPS = "python python-shell python-io python-math python-crypt 
python-logging python-fcntl python-subprocess python-pickle python-compression 
python-textutils python-stringold"
 PYTHONRDEPS_class-native = ""
 
-PACKAGECONFIG = "python"
+PACKAGECONFIG = "python update-alternatives"
 PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
+PACKAGECONFIG[update-alternatives] = ",,,"
 
 do_install() {
oe_runmake PREFIX=${prefix} DESTDIR=${D} install
+if ${@'true' if 'update-alternatives' not in PACKAGECONFIG.split() 
else 'false'}; then
+rm -f "${D}${bindir}/update-alternatives"
+fi
 }
 
 PACKAGES =+ "update-alternatives-opkg"
-- 
1.8.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] psplash: Adding support for systemd service files

2014-08-08 Thread Sujith H
From: Sujith H 

If the DISTRO_FEATURES has systemd, then its better
to have corresponding service files associated with
the psplash. This change will help to do the same.

Signed-off-by: Muzaffar Mahmood 
Signed-off-by: Sujith H 
---
 meta/recipes-core/psplash/files/psplash-quit.service  | 11 +++
 meta/recipes-core/psplash/files/psplash-start.service | 11 +++
 meta/recipes-core/psplash/psplash_git.bb  | 12 +++-
 3 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/psplash/files/psplash-quit.service
 create mode 100644 meta/recipes-core/psplash/files/psplash-start.service

diff --git a/meta/recipes-core/psplash/files/psplash-quit.service 
b/meta/recipes-core/psplash/files/psplash-quit.service
new file mode 100644
index 000..14bd499
--- /dev/null
+++ b/meta/recipes-core/psplash/files/psplash-quit.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Terminate Psplash Boot Screen
+After=psplash-start.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/psplash-write QUIT
+TimeoutSec=20
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-core/psplash/files/psplash-start.service 
b/meta/recipes-core/psplash/files/psplash-start.service
new file mode 100644
index 000..502b150
--- /dev/null
+++ b/meta/recipes-core/psplash/files/psplash-start.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Starts Psplash Boot screen
+Wants=systemd-vconsole-setup.service
+After=systemd-vconsole-setup.service systemd-udev-trigger.service 
systemd-udevd.service
+DefaultDependencies=no
+
+[Service]
+ExecStart=/usr/bin/psplash
+
+[Install]
+WantedBy=sysinit.target
diff --git a/meta/recipes-core/psplash/psplash_git.bb 
b/meta/recipes-core/psplash/psplash_git.bb
index 628ced4..16fa0ae 100644
--- a/meta/recipes-core/psplash/psplash_git.bb
+++ b/meta/recipes-core/psplash/psplash_git.bb
@@ -11,6 +11,8 @@ PR = "r15"
 
 SRC_URI = "git://git.yoctoproject.org/${BPN} \
file://psplash-init \
+   file://psplash-start.service \
+   file://psplash-quit.service \
${SPLASH_IMAGES}"
 
 SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"
@@ -65,11 +67,14 @@ python __anonymous() {
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig update-rc.d update-alternatives
+inherit autotools pkgconfig update-rc.d update-alternatives systemd
 
 ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE_LINK_NAME[psplash] = "${bindir}/psplash"
 
+SYSTEMD_PACKAGES = 
"${@base_contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
+SYSTEMD_SERVICE_${PN} = 
"${@base_contains('DISTRO_FEATURES','systemd','psplash-start.service 
psplash-quit.service','',d)}"
+
 python do_compile () {
 import shutil
 
@@ -103,6 +108,11 @@ do_install_append() {
install -m 0755 $i ${D}${bindir}/$i
done
rm -f ${D}${bindir}/psplash
+
+   if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+install -d ${D}${systemd_unitdir}/system
+install -m 644 ${WORKDIR}/*.service 
${D}/${systemd_unitdir}/system
+fi
 }
 
 FILES_${PN} += "/mnt/.psplash"
-- 
1.8.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] RFC: Improving the developer workflow

2014-08-08 Thread Nicolas Dechesne
On Thu, Aug 7, 2014 at 11:10 AM, Paul Eggleton
 wrote:
> Example workflow
> 
>
> I won't give a workflow for every possible usage, but just to give a basic
> example - let's assume you want to build a "new" piece of software for which
> you have your own source tree on your machine. The rough set of steps required
> would be something like this (rough, e.g. the command names given shouldn't be
> read as final):
>
> 1. Install the SDK
>
> 2. Run a setup script to make the SDK tools available
>
> 3. Add a new recipe with "sdktool add " - interactive process. The
> tool records that  is being worked on, creates a recipe that can
> be used to build the software using your external source tree, and places the
> recipe where it will be used automatically by other steps.
>
> 4. Build the recipe with "sdktool build ". This probably only goes
> as far as do_install or possibly do_package_qa; in any case the QA process
> would be less stringent than with the standard build system however in order
> to avoid putting too many barriers in the way of testing on the target.
>
> 5. Fix any failures and repeat from the previous step as necessary.
>
> 6. Deploy changes to target with "sdktool deploy-target " assuming
> SSH is available on the target. Alternatively "sdktool build-image
> " can be used to regenerate an image with the changes in it;
> "sdktool runqemu" could do that (if necessary) and then run the result within
> QEMU with the appropriate options set.

coincidentally, i was giving an OE workshop this week, and when I
explained about the OE SDK, someone immediately brought up that it was
quite limited because:

 1- SDK cannot be used to generate deployable packages, e.g.  using
the SDK to create ipk/deb/rpm that can be delivered to
targets/clients, not just for debugging, but also for production when
production system has package management support.
 2- SDK cannot be used to regenerate updated images. e.g. Company A
delivers a SDK + board, Company B is making a product using the SDK
(adding content) and wants to be able to make new images with the new
content in order to sell/deploy it.
 3- SDK itself cannot be upgraded when the 'base image' and SDK are updated
 4- SDK users cannot add content to the SDK. e.g. I am a SDK user I
create a library and I want that library to be in the SDK now.
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [yocto] RFC: Improving the developer workflow

2014-08-08 Thread Nicolas Dechesne
On Thu, Aug 7, 2014 at 3:05 PM, Paul Eggleton
 wrote:
> Personally with how fragile package management can end up being, I'm convinced
> that full-image updates are the way to go for a lot of cases, but ideally with
> some intelligence so that you only ship the changes (at a filesystem level
> rather than a package or file level). This ensures that an upgraded image on
> one device ends up exactly identical to any other device including a newly
> deployed one. Of course it does assume that you have a read-only rootfs and
> keep your configuration data / logs / other writeable data on a separate
> partition or storage medium. However, beyond improvements to support for
> having a read-only rootfs we haven't really achieved anything in terms of out-
> of-the-box support for this, mainly due to lack of resources.
>
> However, whilst I haven't had a chance to look at it closely, there has been
> some work on this within the community:
>
> http://sbabic.github.io/swupdate/swupdate.html
> https://github.com/sbabic/swupdate
> https://github.com/sbabic/meta-swupdate/
>

fwiw, Ubuntu has started to do something like that for their phone images, see

https://wiki.ubuntu.com/ImageBasedUpgrades

I haven't used nor looked into the details... i just had heard about
it, and thought it was worth mentioning it here. however the main
design idea from that wiki page is exactly what we are discussing
here. e.g. build images on the 'server' side using our regular tools,
but deploy binary differences on targets.
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core