aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Sokolovsky <pmiscml@gmail.com>2006-09-12 16:01:09 +0000
committerPaul Sokolovsky <pmiscml@gmail.com>2006-09-12 16:01:09 +0000
commit6d54a192a79f5bbfe008b790e5a8f088ba496a91 (patch)
treee90f111961a59ed893fb0282ae14bea88fca0452
parentbb1352ba5f25781d237e20ad4e8bce6e46026abf (diff)
parent2794320ec9e9a4fb99a7e20c8bef15a06ed788b2 (diff)
downloadopenembedded-6d54a192a79f5bbfe008b790e5a8f088ba496a91.tar.gz
merge of '3585034766082dee6be36ed64f840eaeee7eb14e'
and 'c2682ec1dd418a696aa5cec3d278f7cfd4386443'
-rw-r--r--classes/icecc.bbclass2
-rw-r--r--classes/insane.bbclass70
-rwxr-xr-xcontrib/sanitize.py79
-rw-r--r--packages/e17/e-utils_20060501.bb2
-rw-r--r--packages/gnupg/gnupg-1.4.2.2/30_nm_always_check.patch21
-rw-r--r--packages/gnupg/gnupg.inc4
-rw-r--r--packages/gnupg/gnupg_1.4.2.2.bb5
-rw-r--r--packages/libgpg-error/libgpg-error_1.3.bb4
-rw-r--r--site/i486-linux8
-rw-r--r--site/i586-linux8
-rw-r--r--site/sh4-linux3
-rw-r--r--site/sh4-linux-uclibc3
12 files changed, 163 insertions, 46 deletions
diff --git a/classes/icecc.bbclass b/classes/icecc.bbclass
index 66a5bf79e3..2f34d408d2 100644
--- a/classes/icecc.bbclass
+++ b/classes/icecc.bbclass
@@ -10,7 +10,7 @@ def icc_determine_gcc_version(gcc):
'i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5363)'
"""
- return os.popen("%s --version" % gcc ).readline()[2]
+ return os.popen("%s --version" % gcc ).readline().split()[2]
def create_env(bb,d):
"""
diff --git a/classes/insane.bbclass b/classes/insane.bbclass
index 395f124572..ead718db7f 100644
--- a/classes/insane.bbclass
+++ b/classes/insane.bbclass
@@ -1,4 +1,3 @@
-#
# BB Class inspired by ebuild.sh
#
# This class will test files after installation for certain
@@ -23,18 +22,73 @@ inherit package
PACKAGE_DEPENDS += "pax-utils-native"
PACKAGEFUNCS += " do_package_qa "
-def package_qa_check_rpath(path):
+def package_qa_check_rpath(file,name,d):
+ """
+ Check for dangerous RPATHs
+ """
+ import bb, os
+ scanelf = os.path.join(bb.data.getVar('STAGING_BINDIR',d,True),'scanelf')
+ bad_dir = bb.data.getVar('TMPDIR', d, True) + "/work"
+ if not os.path.exists(scanelf):
+ bb.note("Can not check RPATH scanelf not found")
+ if not bad_dir in bb.data.getVar('WORKDIR', d, True):
+ bb.error("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check")
+
+ output = os.popen("%s -Byr %s" % (scanelf,file))
+ txt = output.readline().rsplit()
+ if bad_dir in txt:
+ bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, txt, file))
+
pass
-def package_qa_check_devdbg(path, name):
+def package_qa_check_devdbg(path, name,d):
+ """
+ Check for debug remains inside the binary or
+ non dev packages containing
+ """
+
+ import bb
+ if not "-dev" in name:
+ if path[-3:] == ".so":
+ bb.error("QA Issue: non dev package contains .so")
+
+ if not "-dbg" in name:
+ if path[-4:] == ".dbg":
+ bb.error("QA Issue: non debug package contains .dbg file")
+
+def package_qa_check_perm(path,name,d):
+ """
+ Check the permission of files
+ """
pass
-def package_qa_check_perm(path):
+def package_qa_check_arch(path,name,d):
+ """
+ Check if archs are compatible
+ """
pass
-def package_qa_check_staged(path):
+def package_qa_check_pcla(path,name,d):
+ """
+ .pc and .la files should not point
+ """
+
+def package_qa_check_staged(path,d):
+ """
+ Check staged la and pc files for sanity
+ -e.g. installed being false
+ """
pass
+# Walk over all files in a directory and call func
+def package_qa_walk(path, funcs, package,d):
+ import os
+ for root, dirs, files in os.walk(path):
+ for file in files:
+ path = os.path.join(root,file)
+ for func in funcs:
+ func(path, package,d)
+
# The PACKAGE FUNC to scan each package
python do_package_qa () {
@@ -49,9 +103,7 @@ python do_package_qa () {
for package in packages.split():
bb.note("Package: %s" % package)
path = "%s/install/%s" % (workdir, package)
- package_qa_check_rpath(path)
- package_qa_check_devdbg(path,package)
- package_qa_check_perm(path)
+ package_qa_walk(path, [package_qa_check_rpath, package_qa_check_devdbg, package_qa_check_perm, package_qa_check_arch], package, d)
}
@@ -59,4 +111,6 @@ python do_package_qa () {
addtask qa_staging after do_populate_staging before do_build
python do_qa_staging() {
bb.note("Staged!")
+
+ package_qa_check_staged(bb.data.getVar('STAGING_DIR',d,True), d)
}
diff --git a/contrib/sanitize.py b/contrib/sanitize.py
index 27ca6e3d8d..028b2cc535 100755
--- a/contrib/sanitize.py
+++ b/contrib/sanitize.py
@@ -24,7 +24,7 @@ import string
import re
__author__ = "Cyril Romain <cyril.romain@gmail.com>"
-__version__ = "$Revision: 0.4 $"
+__version__ = "$Revision: 0.5 $"
# The standard set of variables often found in .bb files in the preferred order
OE_vars = [
@@ -72,6 +72,8 @@ OE_vars = [
'includedir',
'python',
'qtopiadir',
+ 'pkg_preins',
+ 'pkg_prerm',
'pkg_postins',
'pkg_postrm',
'require',
@@ -79,9 +81,9 @@ OE_vars = [
'basesysconfdir',
'sysconfdir',
'ALLOW_EMPTY',
- 'ALTERNATIVE_LINK',
'ALTERNATIVE_NAME',
'ALTERNATIVE_PATH',
+ 'ALTERNATIVE_LINK',
'ALTERNATIVE_PRIORITY',
'ALTNAME',
'AMD_DRIVER_LABEL',
@@ -104,7 +106,6 @@ OE_vars = [
'BONOBO_HEADERS',
'BOOTSCRIPTS',
'BROKEN',
- 'BUILD_ALL_DEPS',
'BUILD_CPPFLAGS',
'CFLAGS',
'CCFLAGS',
@@ -133,8 +134,8 @@ OE_vars = [
'GNOME_VFS_HEADERS',
'HEADERS',
'INHIBIT_DEFAULT_DEPS',
- 'INITSCRIPT_NAME',
'INITSCRIPT_PACKAGES',
+ 'INITSCRIPT_NAME',
'INITSCRIPT_PARAMS',
'IPKG_INSTALL',
'KERNEL_IMAGETYPE',
@@ -158,13 +159,13 @@ OE_vars = [
'LIBTOOL',
'LIBBDB_EXTRA',
'LIBV',
- 'MACHINE',
'MACHINE_ESSENTIAL_EXTRA_RDEPENDS',
'MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS',
'MACHINE_EXTRA_RDEPENDS',
'MACHINE_EXTRA_RRECOMMENDS',
'MACHINE_FEATURES',
'MACHINE_TASKS',
+ 'MACHINE',
'MACHTYPE',
'MAKE_TARGETS',
'MESSAGEUSER',
@@ -178,6 +179,7 @@ OE_vars = [
'PAKCAGE_ARCH',
'PCMCIA_MANAGER',
'PKG_BASENAME',
+ 'PKG',
'QEMU',
'QMAKE_PROFILES',
'QPEDIR',
@@ -200,8 +202,8 @@ OE_vars = [
'others'
]
-varRegexp = r'^([A-Z_0-9]*)([ \t]*?)([+.:]?=[+.]?)([ \t]*?)("[^"]*["\\]?)'
-routineRegexp = r'^([a-zA-Z0-9_ -]+?)\('
+varRegexp = r'^([a-zA-Z_0-9${}-]*)([ \t]*)([+.:]?=[+.]?)([ \t]*)([^\t]+)'
+routineRegexp = r'^([a-zA-Z0-9_ ${}-]+?)\('
# Variables seen in the processed .bb
seen_vars = {}
@@ -245,11 +247,17 @@ def conformTo_rule3(line):
return line.lstrip()
# _Format guideline #4_:
-# Use quotes on the right hand side of assignments: FOO = "BAR"
+# Use quotes on the right hand side of assignments FOO = "BAR"
def respect_rule4(line):
- return re.match(varRegexp, line) is not None
+ r = re.search(varRegexp, line)
+ if r is not None:
+ r2 = re.search(r'("?)([^"\\]*)(["\\]?)', r.group(5))
+ # do not test for None it because always match
+ return r2.group(1)=='"' and r2.group(3)!=''
+ return False
def conformTo_rule4(line):
- return conformTo_rule5_(line)
+ r = re.search(varRegexp, line)
+ return ''.join([r.group(1), ' ', r.group(3), ' "', r.group(5), r.group(5).endswith('"') and '' or '"'])
# _Format guideline #5_:
# The correct spacing for a variable is FOO = "BAR".
@@ -279,7 +287,7 @@ rules = (
(respect_rule1, conformTo_rule1, "No spaces are allowed behind the line continuation symbol '\\'"),
(respect_rule2, conformTo_rule2, "Tabs should not be used (use spaces instead)"),
(respect_rule3, conformTo_rule3, "Comments inside bb files are allowed using the '#' character at the beginning of a line"),
- (respect_rule4, conformTo_rule4, "Use quotes on the right hand side of assignments: FOO = \"BAR\""),
+ (respect_rule4, conformTo_rule4, "Use quotes on the right hand side of assignments FOO = \"BAR\""),
(respect_rule5, conformTo_rule5, "The correct spacing for a variable is FOO = \"BAR\""),
(respect_rule6, conformTo_rule6, "Don't use spaces or tabs on empty lines"),
(respect_rule7, conformTo_rule7, "Indentation of multiline variables such as SRC_URI is desireable"),
@@ -296,7 +304,7 @@ def follow_rule(i, line):
# if the line still does not respect the rule
if not rules[i][0](line):
# this is a rule disgression
- print "## Disgression: ", rules[i][2], " in:", line
+ print "## Disgression: ", rules[i][2], " in:", oldline
else:
# just remind user about his/her errors
print "## Reminder: ", rules[i][2], " in :", oldline
@@ -327,6 +335,7 @@ if __name__ == "__main__":
commentBloc = []
olines = []
for line in lines:
+ originalLine = line
# rstrip line to remove line breaks characters
line = line.rstrip()
line = follow_rule(2, line)
@@ -340,7 +349,8 @@ if __name__ == "__main__":
commentBloc = []
continue
- if line.startswith('}'): in_routine=False
+ if line.startswith('}'):
+ in_routine=False
keep = line.endswith('\\') or in_routine
# handles commented lines
@@ -352,41 +362,46 @@ if __name__ == "__main__":
continue
if seen_vars.has_key(var):
- for c in commentBloc:
+ for c in commentBloc:
seen_vars[var].append(c)
commentBloc = []
seen_vars[var].append(line)
else:
- varexist = False
for k in OE_vars:
if line.startswith(k):
- line = follow_rule(0, line)
- varexist = True
- if re.match(routineRegexp, line) is not None:
- in_routine=True
- elif re.match(varRegexp, line) is not None:
- line = follow_rule(4, line)
- line = follow_rule(5, line)
- for c in commentBloc:
- seen_vars[k].append(c)
- commentBloc = []
- seen_vars[k].append(line)
- var = (keep==True or in_routine==True) and k or ""
+ var = k
break
- if not varexist:
+ if re.match(routineRegexp, line) is not None:
+ in_routine=True
+ line = follow_rule(0, line)
+ elif re.match(varRegexp, line) is not None:
+ line = follow_rule(0, line)
+ line = follow_rule(4, line)
+ line = follow_rule(5, line)
+ if var == "":
if not in_routine:
- print "## Warning: unknown variable/routine \"%s\"" % line
- seen_vars['others'].append(line)
+ print "## Warning: unknown variable/routine \"%s\"" % originalLine
+ var = 'others'
+ for c in commentBloc:
+ seen_vars[var].append(c)
+ commentBloc = []
+ seen_vars[var].append(line)
if not keep and not in_routine: var = ""
# -- dump the sanitized .bb file --
- #for k in OE_vars: print k, OE_vars[k]
addEmptyLine = False
+ # write comments that are not related to variables nor routines
+ for l in olines:
+ olines.append(l)
+ # write variables and routines
+ previourVarPrefix = "unknown"
for k in OE_vars:
if k=='SRC_URI': addEmptyLine = True
if seen_vars[k] != []:
- if addEmptyLine: olines.append("")
+ if addEmptyLine and not k.startswith(previourVarPrefix):
+ olines.append("")
for l in seen_vars[k]:
olines.append(l)
+ previourVarPrefix = k.split('_')[0]=='' and "unknown" or k.split('_')[0]
for line in olines: print line
diff --git a/packages/e17/e-utils_20060501.bb b/packages/e17/e-utils_20060501.bb
index 3f1af895ae..fc94cd106f 100644
--- a/packages/e17/e-utils_20060501.bb
+++ b/packages/e17/e-utils_20060501.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "Enlightenment Window Manager Utilities"
-DEPENDS = "virtual/ecore virtual/evas virtual/esmart edje eet ewl engrave virtual/imlib2 e epsilon"
+DEPENDS = "virtual/ecore virtual/evas virtual/esmart edje eet ewl engrave virtual/imlib2 epsilon"
LICENSE = "MIT"
PR = "r1"
diff --git a/packages/gnupg/gnupg-1.4.2.2/30_nm_always_check.patch b/packages/gnupg/gnupg-1.4.2.2/30_nm_always_check.patch
new file mode 100644
index 0000000000..914f1475b7
--- /dev/null
+++ b/packages/gnupg/gnupg-1.4.2.2/30_nm_always_check.patch
@@ -0,0 +1,21 @@
+Originally the test for _'s on symbols was not done when cross-compiling and
+it was assumed that the _'s were appended. The test does in fact work since
+it simply compiles a file and then run's nm on it. So patch this to enable.
+Without this x86 targets fail during linking since the assembler code has
+the _'s appended when it shouldn't.
+
+--- gnupg-1.4.2.2/acinclude.m4 2006/09/11 22:11:23 1.1
++++ gnupg-1.4.2.2/acinclude.m4 2006/09/11 22:17:25
+@@ -673,11 +673,7 @@
+ ac_cv_sys_symbol_underscore=yes
+ ;;
+ *)
+- if test "$cross_compiling" = yes; then
+- ac_cv_sys_symbol_underscore=yes
+- else
+- tmp_do_check="yes"
+- fi
++ tmp_do_check="yes"
+ ;;
+ esac
+
diff --git a/packages/gnupg/gnupg.inc b/packages/gnupg/gnupg.inc
index b4eb9bba65..2d8e37605f 100644
--- a/packages/gnupg/gnupg.inc
+++ b/packages/gnupg/gnupg.inc
@@ -70,3 +70,7 @@ do_install () {
mv ${D}${datadir}/${PN}/* ${D}/${docdir}/${PN}/ || :
mv ${D}${prefix}/doc/* ${D}/${docdir}/${PN}/ || :
}
+
+# Exclude debug files from the main packages
+FILES_${PN} = "${bindir}/* ${datadir}/${PN} ${libexecdir}/${PN}/*"
+FILES_${PN}-dbg += "${libexecdir}/${PN}/.debug"
diff --git a/packages/gnupg/gnupg_1.4.2.2.bb b/packages/gnupg/gnupg_1.4.2.2.bb
index 97c301cf97..b21eb88b91 100644
--- a/packages/gnupg/gnupg_1.4.2.2.bb
+++ b/packages/gnupg/gnupg_1.4.2.2.bb
@@ -6,8 +6,9 @@ EXTRA_OECONF += "--with-readline=${STAGING_LIBDIR}/.."
SRC_URI += "file://15_free_caps.patch;patch=1 \
file://16_min_privileges.patch;patch=1 \
- file://22_zero_length_mpi_fix.patch;patch=1 "
+ file://22_zero_length_mpi_fix.patch;patch=1 \
+ file://30_nm_always_check.patch;patch=1"
S = "${WORKDIR}/gnupg-${PV}"
-PR = "r1"
+PR = "r2"
diff --git a/packages/libgpg-error/libgpg-error_1.3.bb b/packages/libgpg-error/libgpg-error_1.3.bb
index c29053832b..a2a19b254c 100644
--- a/packages/libgpg-error/libgpg-error_1.3.bb
+++ b/packages/libgpg-error/libgpg-error_1.3.bb
@@ -1,4 +1,4 @@
-PR = "r0"
+PR = "r1"
DESCRIPTION = "GPG-Error library"
SECTION = "libs"
PRIORITY = "optional"
@@ -9,7 +9,7 @@ SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-${PV}.tar.gz \
# move libgpg-error-config into -dev package
FILES_${PN} = "${libdir}/lib*.so.*"
-FILES_${PN}-dev += "${bindir}"
+FILES_${PN}-dev += "${bindir}/*"
inherit autotools binconfig pkgconfig
diff --git a/site/i486-linux b/site/i486-linux
index c21dfcd365..2fc4c476af 100644
--- a/site/i486-linux
+++ b/site/i486-linux
@@ -125,6 +125,9 @@ jm_cv_func_working_readdir=yes
# cvs
cvs_cv_func_printf_ptr=${cvs_cv_func_printf_ptr=yes}
+# rp-pppoe
+rpppoe_cv_pack_bitfields=${rpppoe_cv_pack_bitfields=rev}
+
# gettext
am_cv_func_working_getline=${am_cv_func_working_getline=yes}
@@ -157,6 +160,11 @@ screen_cv_sys_sockets_nofs=${screen_cv_sys_sockets_nofs=no}
screen_cv_sys_sockets_usable=${screen_cv_sys_sockets_usable=yes}
screen_cv_sys_terminfo_used=${screen_cv_sys_terminfo_used=yes}
+# lftp
+ac_cv_need_trio=${ac_cv_need_trio=no}
+lftp_cv_va_copy=${lftp_cv_va_copy=no}
+lftp_cv___va_copy=${lftp_cv___va_copy=yes}
+
# slrn
slrn_cv___va_copy=${slrn_cv___va_copy=yes}
slrn_cv_va_copy=${slrn_cv_va_copy=no}
diff --git a/site/i586-linux b/site/i586-linux
index 1be379c993..b4fda09b81 100644
--- a/site/i586-linux
+++ b/site/i586-linux
@@ -107,6 +107,9 @@ ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=yes}
# samba
samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes}
+# rp-pppoe
+rpppoe_cv_pack_bitfields=${rpppoe_cv_pack_bitfields=rev}
+
# gettext
am_cv_func_working_getline=${am_cv_func_working_getline=yes}
@@ -132,6 +135,11 @@ ac_cv_va_copy=${ac_cv_va_copy=no}
ac_cv___va_copy=${ac_cv___va_copy=yes}
racoon_cv_bug_getaddrinfo=${racoon_cv_bug_getaddrinfo=no}
+# lftp
+ac_cv_need_trio=${ac_cv_need_trio=no}
+lftp_cv_va_copy=${lftp_cv_va_copy=no}
+lftp_cv___va_copy=${lftp_cv___va_copy=yes}
+
# slrn
slrn_cv___va_copy=${slrn_cv___va_copy=yes}
slrn_cv_va_copy=${slrn_cv_va_copy=no}
diff --git a/site/sh4-linux b/site/sh4-linux
index 8e25cad4a5..bb0bf09e6c 100644
--- a/site/sh4-linux
+++ b/site/sh4-linux
@@ -250,6 +250,9 @@ mysql_cv_func_atomic_sub=${mysql_cv_func_atomic_sub=no}
mysql_cv_func_atomic_add=${mysql_cv_func_atomic_add=no}
ac_cv_conv_longlong_to_float=${ac_cv_conv_longlong_to_float=yes}
+# rp-pppoe
+rpppoe_cv_pack_bitfields=${rpppoe_cv_pack_bitfields=rev}
+
# gettext
am_cv_func_working_getline=${am_cv_func_working_getline=yes}
diff --git a/site/sh4-linux-uclibc b/site/sh4-linux-uclibc
index 30054561f2..c083f418b5 100644
--- a/site/sh4-linux-uclibc
+++ b/site/sh4-linux-uclibc
@@ -3,6 +3,9 @@ ac_cv_func_realloc_0_nonnull=${ac_cv_func_realloc_0_nonnull=yes}
ac_cv_func_malloc_works=${ac_cv_func_malloc_works=yes}
ac_cv_func_malloc_0_nonnull=${ac_cv_func_malloc_0_nonnull=yes}
+# rp-pppoe
+rpppoe_cv_pack_bitfields=${rpppoe_cv_pack_bitfields=rev}
+
# gettext
am_cv_func_working_getline=${am_cv_func_working_getline=yes}