Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] bin_package.bbclass: binary package recipe class
@ 2012-09-02  4:15 Robert Yang
  2012-09-02  4:15 ` [PATCH 1/1] " Robert Yang
  2012-09-10 15:31 ` [PATCH 0/1] " Saul Wold
  0 siblings, 2 replies; 3+ messages in thread
From: Robert Yang @ 2012-09-02  4:15 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

The following changes since commit 9ba1e33e2d14362971d6441ee6142bcb0857df1a:

  sstate: Ensure master.list exists if it doesn't already (2012-08-30 22:45:56 -0700)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib robert/binary_package
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/binary_package

Robert Yang (1):
  bin_package.bbclass: binary package recipe class

 meta/classes/bin_package.bbclass | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 meta/classes/bin_package.bbclass

-- 
1.7.11.2




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] bin_package.bbclass: binary package recipe class
  2012-09-02  4:15 [PATCH 0/1] bin_package.bbclass: binary package recipe class Robert Yang
@ 2012-09-02  4:15 ` Robert Yang
  2012-09-10 15:31 ` [PATCH 0/1] " Saul Wold
  1 sibling, 0 replies; 3+ messages in thread
From: Robert Yang @ 2012-09-02  4:15 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

This is used for the binary package recipe, it's been suggested that it
would be a useful feature to be able to easily take an RPM or similar
containing a software binary from a 3rd party software vendor and
integrate it into an image created by the build system.

* Brief introduction
  - The binary pkg can be .rpm, .deb, .ipk and other formats which can
    be unpacked by bitbake fetcher.

  - Let bitbake unpack the bianry package, just like unpack the source
    package.

  - Skip the do_configure and do_compile.

  - Install the files to ${D}

  - Other steps are similar to the source package's recipe.

* Note:
  - The "subdir" parameter in the SRC_URI is useful for the binary
    package recipe, so I added an example in the comment.

  - I have sent a patch to bitbake-devel mailing list to support
    unpack the .rpm, .ipk, and .deb files.

[YOCTO #1592]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/bin_package.bbclass | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 meta/classes/bin_package.bbclass

diff --git a/meta/classes/bin_package.bbclass b/meta/classes/bin_package.bbclass
new file mode 100644
index 0000000..a52b75b
--- /dev/null
+++ b/meta/classes/bin_package.bbclass
@@ -0,0 +1,36 @@
+#
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# Common variable and task for the binary package recipe.
+# Basic principle:
+# * The files have been unpacked to ${S} by base.bbclass
+# * Skip do_configure and do_compile
+# * Use do_install to install the files to ${D}
+#
+# Note:
+# The "subdir" parameter in the SRC_URI is useful when the input package
+# is rpm, ipk, deb and so on, for example:
+#
+# SRC_URI = "http://foo.com/foo-1.0-r1.i586.rpm;subdir=foo-1.0"
+#
+# Then the files would be unpacked to ${WORKDIR}/foo-1.0, otherwise
+# they would be in ${WORKDIR}.
+#
+
+# Skip the unwanted steps
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+# Install the files to ${D}
+bin_package_do_install () {
+    # Do it carefully
+    [ -d "${S}" ] || exit 1
+    cd ${S} || exit 1
+    tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \
+        | tar --no-same-owner -xpf - -C ${D}
+}
+
+FILES_${PN} = "/"
+
+EXPORT_FUNCTIONS do_install
-- 
1.7.11.2




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/1] bin_package.bbclass: binary package recipe class
  2012-09-02  4:15 [PATCH 0/1] bin_package.bbclass: binary package recipe class Robert Yang
  2012-09-02  4:15 ` [PATCH 1/1] " Robert Yang
@ 2012-09-10 15:31 ` Saul Wold
  1 sibling, 0 replies; 3+ messages in thread
From: Saul Wold @ 2012-09-10 15:31 UTC (permalink / raw)
  To: Robert Yang; +Cc: Zhenfeng.Zhao, openembedded-core

On 09/01/2012 09:15 PM, Robert Yang wrote:
> The following changes since commit 9ba1e33e2d14362971d6441ee6142bcb0857df1a:
>
>    sstate: Ensure master.list exists if it doesn't already (2012-08-30 22:45:56 -0700)
>
> are available in the git repository at:
>
>    git://git.pokylinux.org/poky-contrib robert/binary_package
>    http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/binary_package
>
> Robert Yang (1):
>    bin_package.bbclass: binary package recipe class
>
>   meta/classes/bin_package.bbclass | 36 ++++++++++++++++++++++++++++++++++++
>   1 file changed, 36 insertions(+)
>   create mode 100644 meta/classes/bin_package.bbclass
>

Merged into OE-Core

Thanks
	Sau!




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-10 15:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-02  4:15 [PATCH 0/1] bin_package.bbclass: binary package recipe class Robert Yang
2012-09-02  4:15 ` [PATCH 1/1] " Robert Yang
2012-09-10 15:31 ` [PATCH 0/1] " Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox