Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [PATCH 8/8] xz: add xz package
Date: Sat, 13 Feb 2010 13:51:46 +0100	[thread overview]
Message-ID: <20100213125146.GJ10632@mx.loc> (raw)
In-Reply-To: <1265892781.3777.1050.camel@mill.internal.reciva.com>

[-- Attachment #1: Type: text/plain, Size: 3590 bytes --]

On Thu, Feb 11, 2010 at 12:53:01PM +0000, Phil Blundell wrote:
>On Wed, 2010-02-10 at 21:13 +0100, Bernhard Reutner-Fischer wrote:
>> xz is the lzma successor
>> tested with automake-1.11.1, autoconf-2.65
>
>Thanks for the patch.  I think this could use a little cleanup before it
>is committed, though; please see below.

I flagged it as RFC in the summary, so yes, like the summary said, still
needs love..
>
>> index 0000000..bc5e9ff
>> --- /dev/null
>> +++ b/recipes/xz/xz-native.inc
>> @@ -0,0 +1,2 @@
>> +inherit native
>> +require xz_${PV}.bb
>
>You could consider using BBCLASSEXTEND to eliminate the need for this
>separate recipe.

Thanks for that, good thing. This will trim down alot on the number of
recipes in the tree!
>
>> diff --git a/recipes/xz/xz-native_4.999.9beta.bb b/recipes/xz/xz-native_4.999.9beta.bb
>> new file mode 100644
>> index 0000000..c4f0da9
>> --- /dev/null
>> +++ b/recipes/xz/xz-native_4.999.9beta.bb
>> @@ -0,0 +1,3 @@
>> +PV = "4.999.9beta"
>> +
>> +require xz-native.inc
>
>Is it necessary to set PV here?  I would have thought base.bbclass would
>infer that same value from the filename.

It was needed since above xz-native.inc had
require xz_${PV}.inc
in it, and if i didn't set PV before it, it defaulted to 1.0, breaking
horribly for obvious reasons. BBCLASSEXTEND nullifies this. Ditched.
>
>> diff --git a/recipes/xz/xz-native_git.bb b/recipes/xz/xz-native_git.bb
>> new file mode 100644
>> index 0000000..006b9d7
>> --- /dev/null
>> +++ b/recipes/xz/xz-native_git.bb
>> @@ -0,0 +1,7 @@
>> +# XZ_BASE should be the latest released version of xz.
>> +# It can be set in the distro file.
>> +#XZ_BASE ?= "4.999.9"
>> +#SRCREV = "HEAD"
>> +#PV = "${XZ_BASE}+gitr${SRCREV}"
>
>Please don't leave this sort of stuff commented out in the file.  If
>it's not needed, just delete those lines.

dropped.
>
>> +#FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/xz-${PV}"
>
>Likewise for that.

ditto (RFC..)
>
>> --- /dev/null
>> +++ b/recipes/xz/xz_4.999.9beta.bb
>> @@ -0,0 +1,8 @@
>> +PV = "4.999.9beta"
>
>See above regarding PV.
>
>> +
>> +require xz.inc
>> +PR = "${INC_PR}.0"
>> +SRC_URI = "http://tukaani.org/xz/xz-${PV}.tar.bz2;name=xz"
>
>Wouldn't that SRC_URI be better in the .inc file?  Presumably this is
>the correct URI for everything except the _git version.

It would indeed. Can i somehow say
file1: SRC="http:://one.ext/one.tar.xz"
       SRC[md5sum]=md5
       SRC[sha256sum]=sha256
       or, perhaps it's the basename if there was no ;name=
       SRC[one.tar.xz.md5sum]=md5
       SRC[one.tar.xz.sha256sum]=sha256
file2: SRC="git://two"
inc: FOO_SRC ?= SRC
     SRC_URI += FOO_SRC

?
>
>> +SRC_URI[xz.md5sum] = "cc4044fcc073b8bcf3164d1d0df82161"
>> +SRC_URI[xz.sha256sum] = "330312c4397608d8b7be362cc7edbfeafa6101614bc2164d816ea767656aa15c"
>> +EXTRA_OECONF = "--enable-shared"
>
>Likewise for that EXTRA_OECONF, I would have thought that would also
>belong in the .inc really.

the EXTRA_OECONF can. Done.
Revised patch is attached, but:
it works for the 4.999beta9 version (literally, since that's how
upstream calls the tarball; Is this a problem with the version-naming
like Koon indicates?) but not if you
PREFERRED_VERSION_xz = "git"
PREFERRED_VERSION_xz-native = "git"
and then bake xz-native:
NOTE: Task failed: Fetch failed: [snip]; git read-tree 1 failed with
signal 128, output:
fatal: Not a valid object name 1

since: $ ls -a ../sources/git/ctrl.tukaani.org.xz.git/
.  ..  1  .git

"1" ?!

[-- Attachment #2: 0007-xz-add-xz-package.00b.patch --]
[-- Type: text/x-diff, Size: 1265 bytes --]

diff --git a/recipes/xz/xz.inc b/recipes/xz/xz.inc
new file mode 100644
index 0000000..cc4f966
--- /dev/null
+++ b/recipes/xz/xz.inc
@@ -0,0 +1,9 @@
+DESCRIPTION = "XZ Utils is free general-purpose data compression software with high compression ratio.  XZ Utils are the successor to LZMA Utils."
+SECTION = "console/utils"
+LICENSE = "Public Domain"
+INC_PR = "r0"
+S ?= "${WORKDIR}/xz-${PV}"
+EXTRA_OECONF = "--enable-shared"
+BBCLASSEXTEND = "native"
+
+inherit autotools
diff --git a/recipes/xz/xz_4.999.9beta.bb b/recipes/xz/xz_4.999.9beta.bb
new file mode 100644
index 0000000..8733023
--- /dev/null
+++ b/recipes/xz/xz_4.999.9beta.bb
@@ -0,0 +1,5 @@
+require xz.inc
+PR = "${INC_PR}.0"
+SRC_URI = "http://tukaani.org/xz/xz-${PV}.tar.bz2;name=xz"
+SRC_URI[xz.md5sum] = "cc4044fcc073b8bcf3164d1d0df82161"
+SRC_URI[xz.sha256sum] = "330312c4397608d8b7be362cc7edbfeafa6101614bc2164d816ea767656aa15c"
diff --git a/recipes/xz/xz_git.bb b/recipes/xz/xz_git.bb
new file mode 100644
index 0000000..8950a08
--- /dev/null
+++ b/recipes/xz/xz_git.bb
@@ -0,0 +1,6 @@
+S = "${WORKDIR}/git"
+require xz.inc
+PV = "git"
+PR = "${INC_PR}.0"
+SRC_URI = "git://ctrl.tukaani.org/xz.git;branch=master;protocol=git"
+DEFAULT_PREFERENCE = "-1"

  reply	other threads:[~2010-02-13 12:51 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-10 20:12 [PATCH 0/8] minor trivia; [RFC] add xz Bernhard Reutner-Fischer
2010-02-10 20:12 ` [PATCH 1/8] hwclock.sh: some more !getopt_long fixes Bernhard Reutner-Fischer
2010-02-10 20:12   ` [PATCH 2/8] autoconf: set SRC_URI name Bernhard Reutner-Fischer
2010-02-10 20:12     ` [PATCH 3/8] gmp: " Bernhard Reutner-Fischer
2010-02-10 20:12       ` [PATCH 4/8] handle xz compressed files and tarballs Bernhard Reutner-Fischer
2010-02-10 20:12         ` [PATCH 5/8] busybox: use .tar.bz2 Bernhard Reutner-Fischer
2010-02-10 20:12           ` [PATCH 6/8] busybox: remove orphaned patch checksums Bernhard Reutner-Fischer
2010-02-10 20:12             ` [PATCH 7/8] autoconf: add 2.65 Bernhard Reutner-Fischer
2010-02-10 20:13               ` [PATCH 8/8] xz: add xz package Bernhard Reutner-Fischer
2010-02-11 12:53                 ` Phil Blundell
2010-02-13 12:51                   ` Bernhard Reutner-Fischer [this message]
2010-02-13 13:19                     ` Phil Blundell
2010-02-13 14:37                       ` Bernhard Reutner-Fischer
2010-02-13 18:46                         ` Phil Blundell
2010-02-13 16:14                     ` BBCLASSEXTEND canadian? Bernhard Reutner-Fischer
2010-02-25  0:49                       ` Tom Rini
2010-02-25  7:41                         ` Bernhard Reutner-Fischer
2010-02-25 10:40                           ` Richard Purdie
2010-02-25 10:39                         ` Richard Purdie
2010-02-25 17:21                           ` Tom Rini
2010-02-25 18:18                             ` C Michael Sundius
2010-02-25 20:16                             ` Richard Purdie
2010-05-28  8:37                               ` Bernhard Reutner-Fischer
2010-06-01 18:41                                 ` Tom Rini
2010-02-11 14:06                 ` [PATCH 8/8] xz: add xz package Koen Kooi
2010-02-13 12:55                   ` Bernhard Reutner-Fischer
2010-02-13 13:11                     ` Bernhard Reutner-Fischer
2010-03-04 14:32               ` [PATCH 7/8] autoconf: add 2.65 Marcin Juszkiewicz
2010-02-14 21:33             ` [PATCH 6/8] busybox: remove orphaned patch checksums Phil Blundell
2010-02-14 21:32           ` [PATCH 5/8] busybox: use .tar.bz2 Phil Blundell
2010-02-11 12:27         ` [PATCH 4/8] handle xz compressed files and tarballs Phil Blundell
2010-02-14 20:16       ` [PATCH 3/8] gmp: set SRC_URI name Phil Blundell
2010-02-14 21:35     ` [PATCH 2/8] autoconf: " Phil Blundell
2010-02-14 21:34   ` [PATCH 1/8] hwclock.sh: some more !getopt_long fixes Phil Blundell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100213125146.GJ10632@mx.loc \
    --to=rep.dot.nop@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox