perl: honour DISTRO_FEATURE largefile
PATCH 1/3 perl: honour DISTRO_FEATURE largefile
--- recipes/perl/perl-native_5.8.8.bb | 4 ++-- recipes/perl/perl_5.8.8.bb | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-)
recipes/perl/perl-native_5.8.8.bb +2 -2
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.perl.org/" SECTION = "libs" LICENSE = "Artistic|GPL" DEPENDS = "virtual/db-native gdbm-native" -PR = "r20" +PR = "r21" NATIVE_INSTALL_WORKS = "1" FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/perl-${PV}"
@@ -44,7 +44,7 @@ do_configure () { -Duseshrplib \ -Dusethreads \ -Duseithreads \ - -Duselargefiles \ + ${@base_contains("DISTRO_FEATURES", "largefile", "-Duselargefiles", "-Uuselargefiles", d)} \ -Dnoextensions=ODBM_File \ -Ud_dosuid \ -Ui_db \
recipes/perl/perl_5.8.8.bb +4 -2
@@ -5,7 +5,7 @@ LICENSE = "Artistic|GPL" PRIORITY = "optional" # We need gnugrep (for -I) DEPENDS = "virtual/db perl-native grep-native" -PR = "r35" +PR = "r36" # Major part of version PVM = "5.8"
@@ -66,7 +66,9 @@ do_configure() { ${WORKDIR}/config.sh-${SITEINFO_BITS}-${SITEINFO_ENDIANNESS}; do cat $i >> config.sh-${TARGET_ARCH}-${TARGET_OS} done - + uselargefiles="${@base_contains("DISTRO_FEATURES", "largefile", "define", "undef", d)}" + sed -i -e "s,^\(uselargefiles=\).*,\1'$uselargefiles',g" \ + config.sh-${TARGET_ARCH}-${TARGET_OS} # Fixups for uclibc if [ "${TARGET_OS}" = "linux-uclibc" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then sed -i -e "s,\(d_crypt_r=\)'define',\1'undef',g" \
Signature · 1 line
1.7.1
PATCH 2/3 perl: use only one method all_perl_packages
.. to avoid
ERROR: Error Method already seen: all_perl_packages in' perl_5.8.8.bb' now in 'perl_5.10.1.bb'
TODO: error() already prints "ERROR:" so the "Error" in above msg is redundant
--- recipes/perl/perl_5.10.1.bb | 7 +------ recipes/perl/perl_5.8.8.bb | 7 +------ recipes/perl/perl_helper.inc | 8 ++++++++ 3 files changed, 10 insertions(+), 12 deletions(-) create mode 100644 recipes/perl/perl_helper.inc
recipes/perl/perl_5.10.1.bb +1 -6
@@ -210,12 +210,7 @@ FILES_${PN}-doc = "${datadir}/perl/${PV}/*/*.txt \ RPROVIDES_perl-lib = "perl-lib" -def all_perl_packages(d): - depchains = (d.getVar("DEPCHAIN_POST", True) or "").split() - blacklist = ["perl-modules", "perl-misc", "perl-pod", "perl-doc"] - for pkg in d.getVar("PACKAGES", True).split(): - if not pkg in blacklist and not any(pkg.endswith(post) for post in depchains): - yield pkg +require perl_helper.inc # Create a perl-modules package recommending all the other perl # packages (actually the non modules packages and not created too)
recipes/perl/perl_5.8.8.bb +1 -6
@@ -212,12 +212,7 @@ FILES_${PN}-doc = "${datadir}/perl/${PV}/*/*.txt \ RPROVIDES_perl-lib = "perl-lib" -def all_perl_packages(d): - depchains = (d.getVar("DEPCHAIN_POST", True) or "").split() - blacklist = ["perl-modules", "perl-misc", "perl-pod", "perl-doc"] - for pkg in d.getVar("PACKAGES", True).split(): - if not pkg in blacklist and not any(pkg.endswith(post) for post in depchains): - yield pkg +require perl_helper.inc # Create a perl-modules package recommending all the other perl # packages (actually the non modules packages and not created too)
recipes/perl/perl_helper.inc new file +8 -0
@@ -0,0 +1,8 @@ +# helper functions for perl +def all_perl_packages(d): + depchains = (d.getVar("DEPCHAIN_POST", True) or "").split() + blacklist = ["perl-modules", "perl-misc", "perl-pod", "perl-doc"] + for pkg in d.getVar("PACKAGES", True).split(): + if not pkg in blacklist and not any(pkg.endswith(post) for post in depchains): + yield pkg +
Signature · 1 line
1.7.1
Re: [PATCH 2/3] perl: use only one method all_perl_packages
В сообщении от Среда 04 августа 2010 17:51:57 автор Bernhard Reutner-Fischer написал:
Quoted 8 lines
.. to avoid
ERROR: Error Method already seen:all_perl_packagesin' perl_5.8.8.bb' now in 'perl_5.10.1.bb'TODO:
error()already prints "ERROR:" so the "Error" in above msg is redundantSigned-off-by Bernhard Reutner-Fischer <[email protected]>
What kind of configuration gives you such an error? Never seen that.
Although the change itself looks good, I'd only probably rename perl_helper.inc to plain perl.inc, we can merge more common things between different perl versions later.
Re: [PATCH 2/3] perl: use only one method all_perl_packages
Quoted 6 lines · Roman I Khimov
В сообщении от Среда 04 августа 2010 17:51:57 автор Bernhard Reutner-Fischer написал:
Quoted 4 lines
.. to avoid
ERROR: Error Method already seen:all_perl_packagesin' perl_5.8.8.bb' now in 'perl_5.10.1.bb'
Quoted 6 lines
Quoted 4 lines
TODO:
error()already prints "ERROR:" so the "Error" in above msg is redundantSigned-off-by Bernhard Reutner-Fischer <[email protected]>What kind of configuration gives you such an error? Never seen that.
It was applied by Chris as a5dee57033f7d9987858d2c0514f4e687ece2874
Quoted 4 lines
Although the change itself looks good, I'd only probably rename perl_helper.inc to plain perl.inc, we can merge more common things between different perl versions later.
fine with me, sure.
Quoted 2 lines
Acked-by Roman I Khimov <[email protected]>
Re: [PATCH 2/3] perl: use only one method all_perl_packages
В сообщении от Среда 04 августа 2010 18:21:47 автор Bernhard Reutner-Fischer написал:
Quoted 9 lines · Roman I Khimov
Quoted 8 lines
В сообщении от Среда 04 августа 2010 17:51:57 автор Bernhard Reutner-Fischer
написал:
Quoted 4 lines
.. to avoid
ERROR: Error Method already seen:all_perl_packagesin' perl_5.8.8.bb' now in 'perl_5.10.1.bb'
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
TODO:
error()already prints "ERROR:" so the "Error" in above msg is redundantSigned-off-by Bernhard Reutner-Fischer <[email protected]>What kind of configuration gives you such an error? Never seen that.
It was applied by Chris as
a5dee57033f7d9987858d2c0514f4e687ece2874
Probably d67c4e5ba499a054f67d665733d29f873e426db9? Very recent change, got it, OK.
Re: [PATCH 2/3] perl: use only one method all_perl_packages
In reply to Bernhard Reutner-FischerQuoted 15 lines · Bernhard Reutner-Fischer
Quoted 1 line · Roman I Khimov
В сообщении от Среда 04 августа 2010 17:51:57 автор Bernhard
Reutner-Fischer
Quoted 11 lines
написал:
Quoted 8 lines
.. to avoid
ERROR: Error Method already seen:all_perl_packagesin' perl_5.8.8.bb' now in 'perl_5.10.1.bb'TODO:
error()already prints "ERROR:" so the "Error" in above msg is redundantSigned-off-by Bernhard Reutner-Fischer <[email protected]>What kind of configuration gives you such an error? Never seen that.
Quoted 7 lines
It was applied by Chris as
a5dee57033f7d9987858d2c0514f4e687ece2874Quoted 4 lines
Although the change itself looks good, I'd only probably rename perl_helper.inc to plain perl.inc, we can merge more common things between different perl versions later.
fine with me, sure.
Thanks for the fix, appreciate it -- I was really surprised to see no perl.inc existed yet.
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Re: [PATCH 2/3] perl: use only one method all_perl_packages
Quoted 24 lines · Chris Larson
Quoted 21 lines · Bernhard Reutner-Fischer
Quoted 1 line · Roman I Khimov
В сообщении от Среда 04 августа 2010 17:51:57 автор Bernhard
Reutner-Fischer
Quoted 11 lines
написал:
Quoted 8 lines
.. to avoid
ERROR: Error Method already seen:all_perl_packagesin' perl_5.8.8.bb' now in 'perl_5.10.1.bb'TODO:
error()already prints "ERROR:" so the "Error" in above msg is redundantSigned-off-by Bernhard Reutner-Fischer <[email protected]>What kind of configuration gives you such an error? Never seen that.
It was applied by Chris as
a5dee57033f7d9987858d2c0514f4e687ece2874Quoted 4 lines
Although the change itself looks good, I'd only probably rename perl_helper.inc to plain perl.inc, we can merge more common things between different perl versions later.
Quoted 5 lines
Quoted 1 line
fine with me, sure.
Thanks for the fix, appreciate it -- I was really surprised to see no perl.inc existed yet.
It would be way cool if somebody with write-access could move the function into some perl.inc and push that change....
Let me know if i'm supposed to send a patch with the correct .inc name instead.
thanks,
Re: [PATCH 2/3] perl: use only one method all_perl_packages
Quoted 33 lines · Bernhard Reutner-Fischer
Quoted 9 lines · Chris Larson
Quoted 6 lines · Bernhard Reutner-Fischer
Quoted 1 line · Roman I Khimov
В сообщении от Среда 04 августа 2010 17:51:57 автор Bernhard
Reutner-Fischer
Quoted 3 lines
написал:
Quoted 2 lines
.. to avoid
ERROR: Error Method already seen:all_perl_packagesin'perl_5.8.8.bb'
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
now in 'perl_5.10.1.bb'
TODO:
error()already prints "ERROR:" so the "Error" in above msg is redundantQuoted 8 lines
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Bernhard Reutner-Fischer <[email protected]>What kind of configuration gives you such an error? Never seen that.
It was applied by Chris as
a5dee57033f7d9987858d2c0514f4e687ece2874Quoted 3 lines
Although the change itself looks good, I'd only probably rename perl_helper.inc to plain perl.inc, we can merge more common things
between
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
different perl versions later.
fine with me, sure.
Thanks for the fix, appreciate it -- I was really surprised to see no perl.inc existed yet.
Quoted 6 lines
It would be way cool if somebody with write-access could move the function into some perl.inc and push that change....
Let me know if i'm supposed to send a patch with the correct .inc name instead.thanks,
Done
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
PATCH 3/3 openssl: properly handle ipv6 and largefile
In reply to Bernhard Reutner-Fischer--- recipes/openssl/openssl-0.9.8m/ipv6.patch | 34 +++++++++++++++++++++++ recipes/openssl/openssl-0.9.8m/uclibc-lfs.patch | 24 ++++++++++++++++ recipes/openssl/openssl-1.0.0/uclibc-lfs.patch | 25 +++++++++++++++++ recipes/openssl/openssl-native_0.9.8m.bb | 3 +- recipes/openssl/openssl-native_1.0.0.bb | 1 + recipes/openssl/openssl_0.9.8m.bb | 4 ++- recipes/openssl/openssl_1.0.0.bb | 1 + 7 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 recipes/openssl/openssl-0.9.8m/ipv6.patch create mode 100644 recipes/openssl/openssl-0.9.8m/uclibc-lfs.patch create mode 100644 recipes/openssl/openssl-1.0.0/uclibc-lfs.patch
recipes/openssl/openssl-0.9.8m/ipv6.patch new file +34 -0
@@ -0,0 +1,34 @@ +diff -rdup openssl-0.9.8m.old1/crypto/bio/bss_dgram.c openssl-0.9.8m/crypto/bio/bss_dgram.c +--- openssl-0.9.8m.old1/crypto/bio/bss_dgram.c 2009-09-22 13:33:58.000000000 +0200 ++++ openssl-0.9.8m/crypto/bio/bss_dgram.c 2010-08-03 10:04:03.716585233 +0200 +@@ -429,12 +429,14 @@ static long dgram_ctrl(BIO *b, int cmd, + &sockopt_val, sizeof(sockopt_val))) < 0) + perror("setsockopt"); + break; ++#if defined _POSIX_IPV6 + case AF_INET6: + sockopt_val = IPV6_PMTUDISC_DO; + if ((ret = setsockopt(b->num, IPPROTO_IPV6, IPV6_MTU_DISCOVER, + &sockopt_val, sizeof(sockopt_val))) < 0) + perror("setsockopt"); + break; ++#endif + default: + ret = -1; + break; +@@ -470,6 +472,7 @@ static long dgram_ctrl(BIO *b, int cmd, + ret = data->mtu; + } + break; ++#if defined _POSIX_IPV6 + case AF_INET6: + if ((ret = getsockopt(b->num, IPPROTO_IPV6, IPV6_MTU, (void *)&sockopt_val, + &sockopt_len)) < 0 || sockopt_val < 0) +@@ -485,6 +488,7 @@ static long dgram_ctrl(BIO *b, int cmd, + ret = data->mtu; + } + break; ++#endif + default: + ret = 0; + break;
recipes/openssl/openssl-0.9.8m/uclibc-lfs.patch new file +24 -0
@@ -0,0 +1,24 @@ +diff -rdup openssl-0.9.8m.old/crypto/bio/bss_file.c openssl-0.9.8m/crypto/bio/bss_file.c +--- openssl-0.9.8m.old/crypto/bio/bss_file.c 2009-10-04 16:04:36.000000000 +0200 ++++ openssl-0.9.8m/crypto/bio/bss_file.c 2010-07-30 15:21:51.436093098 +0200 +@@ -65,6 +65,7 @@ + #ifndef HEADER_BSS_FILE_C + #define HEADER_BSS_FILE_C + ++#include <features.h> + #if defined(__linux) || defined(__sun) || defined(__hpux) + /* Following definition aliases fopen to fopen64 on above mentioned + * platforms. This makes it possible to open and sequentially access +@@ -78,10 +79,12 @@ + * sequential access of large files without extra "magic" comprise *BSD, + * Darwin, IRIX... + */ ++#if (defined __UCLIBC__ && defined __UCLIBC_HAS_LFS__) || !defined __UCLIBC__ + #ifndef _FILE_OFFSET_BITS + #define _FILE_OFFSET_BITS 64 + #endif + #endif ++#endif + + #include <stdio.h> + #include <errno.h>
recipes/openssl/openssl-1.0.0/uclibc-lfs.patch new file +25 -0
@@ -0,0 +1,25 @@ +diff -rdup openssl-1.0.0.orig/crypto/bio/bss_file.c openssl-1.0.0/crypto/bio/bss_file.c +--- openssl-1.0.0.orig/crypto/bio/bss_file.c 2010-03-22 23:39:46.000000000 +0100 ++++ openssl-1.0.0/crypto/bio/bss_file.c 2010-08-02 19:17:26.642347341 +0200 +@@ -65,6 +65,8 @@ + #ifndef HEADER_BSS_FILE_C + #define HEADER_BSS_FILE_C + ++#include <features.h> ++ + #if defined(__linux) || defined(__sun) || defined(__hpux) + /* Following definition aliases fopen to fopen64 on above mentioned + * platforms. This makes it possible to open and sequentially access +@@ -78,10 +80,12 @@ + * sequential access of large files without extra "magic" comprise *BSD, + * Darwin, IRIX... + */ ++#if (defined __UCLIBC__ && defined __UCLIBC_HAS_LFS__) || !defined __UCLIBC__ + #ifndef _FILE_OFFSET_BITS + #define _FILE_OFFSET_BITS 64 + #endif + #endif ++#endif + + #include <stdio.h> + #include <errno.h>
recipes/openssl/openssl-native_0.9.8m.bb +2 -1
@@ -12,7 +12,8 @@ export BUILD_OPTIMIZATION = " " SRC_URI += "file://configure-targets.patch \ file://shared-libs.patch \ - file://debian.patch" + file://debian.patch \ + file://uclibc-lfs.patch" PARALLEL_MAKE = ""
recipes/openssl/openssl-native_1.0.0.bb +1 -0
@@ -18,6 +18,7 @@ SRC_URI += "file://configure-targets.patch \ file://shared-libs.patch \ file://debian.patch \ file://libdeps-first.patch \ + file://uclibc-lfs.patch \ " PARALLEL_MAKE = ""
recipes/openssl/openssl_0.9.8m.bb +3 -1
@@ -11,6 +11,8 @@ export OE_LDFLAGS="${LDFLAGS}" SRC_URI += "file://configure-targets.patch \ file://shared-libs.patch \ file://debian.patch \ - file://oe-ldflags.patch" + file://oe-ldflags.patch \ + file://uclibc-lfs.patch \ + file://ipv6.patch" PARALLEL_MAKE = ""
recipes/openssl/openssl_1.0.0.bb +1 -0
@@ -17,6 +17,7 @@ SRC_URI += "file://configure-targets.patch \ file://oe-ldflags.patch \ file://libdeps-first.patch \ file://engines-install-in-libdir-ssl.patch \ + file://uclibc-lfs.patch \ " PARALLEL_MAKE = ""
Signature · 1 line
1.7.1
В сообщении от Среда 04 августа 2010 17:51:56 автор Bernhard Reutner-Fischer написал:
Quoted 5 lines
Signed-off-by Bernhard Reutner-Fischer <[email protected]>--- recipes/perl/perl-native_5.8.8.bb | 4 ++-- recipes/perl/perl_5.8.8.bb | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-)
Is it really appropriate for -native? And how about Perl 5.10.1?
Quoted 9 lines · Roman I Khimov
В сообщении от Среда 04 августа 2010 17:51:56 автор Bernhard Reutner-Fischer написал:
Quoted 5 lines
Signed-off-by Bernhard Reutner-Fischer <[email protected]>--- recipes/perl/perl-native_5.8.8.bb | 4 ++-- recipes/perl/perl_5.8.8.bb | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-)Is it really appropriate for -native? And how about Perl 5.10.1?
it's perfectly fine to build on a uclibc-based host with LFS off. Dunno about 5.10.1, it has a default preference of -1
oh sorry, i just see that this needs even more munging so better disregard this for now.
В сообщении от Среда 04 августа 2010 18:17:48 автор Bernhard Reutner-Fischer написал:
Quoted 11 lines · Roman I Khimov
Quoted 10 lines
В сообщении от Среда 04 августа 2010 17:51:56 автор Bernhard Reutner-Fischer
написал:
Quoted 5 lines
Signed-off-by Bernhard Reutner-Fischer <[email protected]>--- recipes/perl/perl-native_5.8.8.bb | 4 ++-- recipes/perl/perl_5.8.8.bb | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-)
Quoted 3 lines
Quoted 1 line
Is it really appropriate for -native? And how about Perl 5.10.1?
it's perfectly fine to build on a uclibc-based host with LFS off.
Well, that's _build machine_ characteristic anyway, that's what I'm concerned about. DISTRO_FEATURES on the other hand characterize what we want to get on _target_ machine. So you might be building on uclibc-based no-LFS system for uclibc-based LFS-enabled target or more common case with glibc-based build system and uclibc no-LFS target. I'm very unsure about what kind of result that might give.
Quoted 1 line
Dunno about 5.10.1, it has a default preference of -1
I think we should try to keep two versions in sync wrt to such changes, I can test on 5.10.1.
PATCH v2 1/1 perl: honour DISTRO_FEATURE largefile
--- recipes/perl/perl-native_5.8.8.bb | 3 +-- recipes/perl/perl_5.8.8.bb | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-)
recipes/perl/perl-native_5.8.8.bb +1 -2
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.perl.org/" SECTION = "libs" LICENSE = "Artistic|GPL" DEPENDS = "virtual/db-native gdbm-native" -PR = "r20" +PR = "r21" NATIVE_INSTALL_WORKS = "1" FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/perl-${PV}"
@@ -44,7 +44,6 @@ do_configure () { -Duseshrplib \ -Dusethreads \ -Duseithreads \ - -Duselargefiles \ -Dnoextensions=ODBM_File \ -Ud_dosuid \ -Ui_db \
recipes/perl/perl_5.8.8.bb +14 -4
@@ -5,7 +5,7 @@ LICENSE = "Artistic|GPL" PRIORITY = "optional" # We need gnugrep (for -I) DEPENDS = "virtual/db perl-native grep-native" -PR = "r35" +PR = "r36" # Major part of version PVM = "5.8"
@@ -60,12 +60,22 @@ do_configure() { cd Cross # Generate configuration - rm -f config.sh-${TARGET_ARCH}-${TARGET_OS} for i in ${WORKDIR}/config.sh \ ${WORKDIR}/config.sh-${SITEINFO_BITS} \ ${WORKDIR}/config.sh-${SITEINFO_BITS}-${SITEINFO_ENDIANNESS}; do - cat $i >> config.sh-${TARGET_ARCH}-${TARGET_OS} - done + cat $i + done > config.sh-${TARGET_ARCH}-${TARGET_OS} + uselargefiles="${@base_contains('DISTRO_FEATURES', 'largefile', 'define', 'undef', d)}" + flaglfs="${@base_contains('DISTRO_FEATURES', 'largefile', '-D', '-U', d)}" + sed -i -e "s,^\(optimize=\).*,\1'',g" \ + -e "s,^\(uselargefiles=\).*,\1'$uselargefiles',g" \ + -e "s,^\(d_readdir64_r=\).*,\1'$uselargefiles',g" \ + -e "s,-[DU]\(uselargefiles\),$flaglfs\1,g" \ + config.sh-${TARGET_ARCH}-${TARGET_OS} + if [ "$uselargefiles" = "undef" ]; then + sed -i -e 's/\([[:space:]]\|__USE\|-D\|-U\)\(_LARGEFILE_SOURCE\|_LARGEFILE64_SOURCE\|_\(FILE_OFFSET_BITS\|FILE_OFFSET64\|LARGEFILE\|LARGEFILE64\)=[[:digit:]]*\)//g' \ + config.sh-${TARGET_ARCH}-${TARGET_OS} + fi # Fixups for uclibc if [ "${TARGET_OS}" = "linux-uclibc" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then
Signature · 1 line
1.7.1