Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 00/10] Pending patches
@ 2012-12-14 23:40 Martin Jansa
  2012-12-14 23:40 ` [PATCH 01/10] scripts/sstate-diff-machines.sh: add simple script to compare sstate checksums between MACHINEs Martin Jansa
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Martin Jansa @ 2012-12-14 23:40 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit a24a5e5c9ede4275f7188935a9410b84d406ed19:

  libacpi: Remove QA warning: No GNU_HASH in the elf binary (2012-12-13 14:48:13 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib jansa/pull
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=jansa/pull

Martin Jansa (9):
  scripts/sstate-diff-machines.sh: add simple script to compare sstate
    checksums between MACHINEs
  scripts/sstate-sysroot-cruft.sh: add simple script to find files in
    sysroots not tracked by sstate
  rootfs_*.bbclass: exclude BUILDNAME var dependency from do_rootfs
  bitbake.conf: exclude DATETIME var dependency from IMAGE_NAME
  kernel.bbclass: include PE in KERNEL_IMAGE_BASE_NAME
  kernel.bbclass: use the same versioning schema for modules.tgz and
    provide link to latest
  autotools: copy also remove-potcdate.sin from
    ${STAGING_DATADIR_NATIVE}/gettext/po
  gettext: move remove-potcdate.sin from gettext-native to
    gettext-minimal-native
  iptables: include /usr/share/xtables/pf.os in PN if it's build

Phil Blundell (1):
  kernel.bbclass: Allow modules*.tar.gz generation to be inhibited

 meta/classes/autotools.bbclass                     |   3 +
 meta/classes/kernel.bbclass                        |  12 ++-
 meta/classes/rootfs_deb.bbclass                    |   1 +
 meta/classes/rootfs_ipk.bbclass                    |   1 +
 meta/classes/rootfs_rpm.bbclass                    |   1 +
 meta/conf/bitbake.conf                             |   1 +
 .../gettext-minimal-0.18.1.1/remove-potcdate.sin   |  19 ++++
 .../gettext/gettext-minimal-native_0.18.1.1.bb     |   4 +-
 meta/recipes-core/gettext/gettext_0.18.1.1.bb      |   3 +-
 meta/recipes-extended/iptables/iptables_1.4.15.bb  |   4 +-
 scripts/sstate-diff-machines.sh                    | 107 +++++++++++++++++++++
 scripts/sstate-sysroot-cruft.sh                    |  78 +++++++++++++++
 12 files changed, 227 insertions(+), 7 deletions(-)
 create mode 100644 meta/recipes-core/gettext/gettext-minimal-0.18.1.1/remove-potcdate.sin
 create mode 100755 scripts/sstate-diff-machines.sh
 create mode 100755 scripts/sstate-sysroot-cruft.sh

-- 
1.8.0.2




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

* [PATCH 01/10] scripts/sstate-diff-machines.sh: add simple script to compare sstate checksums between MACHINEs
  2012-12-14 23:40 [PATCH 00/10] Pending patches Martin Jansa
@ 2012-12-14 23:40 ` Martin Jansa
  2012-12-14 23:40 ` [PATCH 02/10] scripts/sstate-sysroot-cruft.sh: add simple script to find files in sysroots not tracked by sstate Martin Jansa
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Martin Jansa @ 2012-12-14 23:40 UTC (permalink / raw)
  To: openembedded-core

* takes tmpdir, machines and targets from command arguments or env variables

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 scripts/sstate-diff-machines.sh | 107 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 107 insertions(+)
 create mode 100755 scripts/sstate-diff-machines.sh

diff --git a/scripts/sstate-diff-machines.sh b/scripts/sstate-diff-machines.sh
new file mode 100755
index 0000000..931f9d7
--- /dev/null
+++ b/scripts/sstate-diff-machines.sh
@@ -0,0 +1,107 @@
+#!/bin/sh
+
+# Used to compare sstate checksums between MACHINES
+# Execute script and compare generated list.M files
+
+# It's also usefull to keep older sstate checksums
+# to be able to find out why something is rebuilding
+# after updating metadata
+
+# $ diff \
+#     sstate-diff/1349348392/fake-cortexa8/list.M \
+#     sstate-diff/1349348392/fake-cortexa9/list.M \
+#     | wc -l
+# 538
+
+# Then to compare sigdata use something like:
+# $ ls sstate-diff/1349348392/*/armv7a-vfp-neon*/linux-libc-headers/*do_configure*sigdata*
+#   sstate-diff/1349348392/fake-cortexa8/armv7a-vfp-neon-oe-linux-gnueabi/linux-libc-headers/3.4.3-r0.do_configure.sigdata.cb73b3630a7b8191e72fc469c5137025
+#   sstate-diff/1349348392/fake-cortexa9/armv7a-vfp-neon-oe-linux-gnueabi/linux-libc-headers/3.4.3-r0.do_configure.sigdata.f37ada177bf99ce8af85914df22b5a0b
+# $ bitbake-diffsigs stamps.1349348392/*/armv7a-vfp-neon*/linux-libc-headers/*do_configure*sigdata*
+#   basehash changed from 8d0bd67bb1da6f68717760fc3ef43171 to e869fa61426e88e9c30726ba88a1216a
+#   Variable TUNE_CCARGS value changed from  -march=armv7-a     -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 to  -march=armv7-a     -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a9
+
+# Global vars
+tmpdir=
+machines=
+targets=
+default_machines="qemuarm qemux86 qemux86-64"
+default_targets="core-image-base"
+
+usage () {
+  cat << EOF
+Welcome to utility to compare sstate checksums between different MACHINEs.
+$0 <OPTION>
+
+Options:
+  -h, --help
+        Display this help and exit.
+
+  --tmpdir=<tmpdir>
+        Specify tmpdir, will use the environment variable TMPDIR if it is not specified.
+        Something like /OE/oe-core/tmp-eglibc (no / at the end).
+
+  --machines=<machines>
+        List of MACHINEs separated by space, will use the environment variable MACHINES if it is not specified.
+        Default value is "qemuarm qemux86 qemux86-64".
+
+  --targets=<targets>
+        List of targets separated by space, will use the environment variable TARGETS if it is not specified.
+        Default value is "core-image-base".
+EOF
+}
+
+# Print error information and exit.
+echo_error () {
+  echo "ERROR: $1" >&2
+  exit 1
+}
+
+while [ -n "$1" ]; do
+  case $1 in
+    --tmpdir=*)
+      tmpdir=`echo $1 | sed -e 's#^--tmpdir=##' | xargs readlink -e`
+      [ -d "$tmpdir" ] || echo_error "Invalid argument to --tmpdir"
+      shift
+        ;;
+    --machines=*)
+      machines=`echo $1 | sed -e 's#^--machines="*\([^"]*\)"*#\1#'`
+      shift
+        ;;
+    --targets=*)
+      targets=`echo $1 | sed -e 's#^--targets="*\([^"]*\)"*#\1#'`
+      shift
+        ;;
+    --help|-h)
+      usage
+      exit 0
+        ;;
+    *)
+      echo "Invalid arguments $*"
+      echo_error "Try '$0 -h' for more information."
+        ;;
+  esac
+done
+
+# tmpdir directory, use environment variable TMPDIR
+# if it was not specified, otherwise, error.
+[ -n "$tmpdir" ] || tmpdir=$TMPDIR
+[ -n "$tmpdir" ] || echo_error "No tmpdir found!"
+[ -d "$tmpdir" ] || echo_error "Invalid tmpdir \"$tmpdir\""
+[ -n "$machines" ] || machines=$MACHINES
+[ -n "$machines" ] || machines=$default_machines
+[ -n "$targets" ] || targets=$TARGETS
+[ -n "$targets" ] || targets=$default_targets
+
+OUTPUT=${tmpdir}/sstate-diff/`date "+%s"`
+
+for M in ${machines}; do
+  find ${tmpdir}/stamps/ -name \*sigdata\* | xargs rm -f
+  mkdir -p ${OUTPUT}/${M}
+  export MACHINE=${M}; bitbake -S ${targets} | tee -a ${OUTPUT}/${M}/log;
+  cp -ra ${tmpdir}/stamps/* ${OUTPUT}/${M}
+  find ${OUTPUT}/${M} -name \*sigdata\* | sed "s#${OUTPUT}/${M}/##g" | sort > ${OUTPUT}/${M}/list
+  M_UNDERSCORE=`echo ${M} | sed 's/-/_/g'`
+  sed "s/${M_UNDERSCORE}/MACHINE/g; s/${M}/MACHINE/g" ${OUTPUT}/${M}/list | sort > ${OUTPUT}/${M}/list.M
+  find ${tmpdir}/stamps/ -name \*sigdata\* | xargs rm -f
+done
-- 
1.8.0.2




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

* [PATCH 02/10] scripts/sstate-sysroot-cruft.sh: add simple script to find files in sysroots not tracked by sstate
  2012-12-14 23:40 [PATCH 00/10] Pending patches Martin Jansa
  2012-12-14 23:40 ` [PATCH 01/10] scripts/sstate-diff-machines.sh: add simple script to compare sstate checksums between MACHINEs Martin Jansa
@ 2012-12-14 23:40 ` Martin Jansa
  2012-12-14 23:40 ` [PATCH 03/10] rootfs_*.bbclass: exclude BUILDNAME var dependency from do_rootfs Martin Jansa
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Martin Jansa @ 2012-12-14 23:40 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 scripts/sstate-sysroot-cruft.sh | 78 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)
 create mode 100755 scripts/sstate-sysroot-cruft.sh

diff --git a/scripts/sstate-sysroot-cruft.sh b/scripts/sstate-sysroot-cruft.sh
new file mode 100755
index 0000000..ca2316c
--- /dev/null
+++ b/scripts/sstate-sysroot-cruft.sh
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+# Used to find files installed in sysroot which are not tracked by sstate manifest
+
+# Global vars
+tmpdir=
+
+usage () {
+  cat << EOF
+Welcome to sysroot cruft finding utility.
+$0 <OPTION>
+
+Options:
+  -h, --help
+        Display this help and exit.
+
+  --tmpdir=<tmpdir>
+        Specify tmpdir, will use the environment variable TMPDIR if it is not specified.
+	Something like /OE/oe-core/tmp-eglibc (no / at the end).
+EOF
+}
+
+# Print error information and exit.
+echo_error () {
+  echo "ERROR: $1" >&2
+  exit 1
+}
+
+while [ -n "$1" ]; do
+  case $1 in
+    --tmpdir=*)
+      tmpdir=`echo $1 | sed -e 's#^--tmpdir=##' | xargs readlink -e`
+      [ -d "$tmpdir" ] || echo_error "Invalid argument to --tmpdir"
+      shift
+        ;;
+    --help|-h)
+      usage
+      exit 0
+        ;;
+    *)
+      echo "Invalid arguments $*"
+      echo_error "Try '$0 -h' for more information."
+        ;;
+  esac
+done
+
+# sstate cache directory, use environment variable TMPDIR
+# if it was not specified, otherwise, error.
+[ -n "$tmpdir" ] || tmpdir=$TMPDIR
+[ -n "$tmpdir" ] || echo_error "No tmpdir found!"
+[ -d "$tmpdir" ] || echo_error "Invalid tmpdir \"$tmpdir\""
+
+OUTPUT=${tmpdir}/sysroot.cruft.`date "+%s"`
+WHITELIST="\/var\/pseudo\($\|\/[^\/]*$\) \/shlibs$ \.pyc$ \.pyo$"
+
+mkdir ${OUTPUT}
+find ${tmpdir}/sstate-control -name \*.populate-sysroot\* -o -name \*.package\* | xargs cat | grep sysroots | \
+  sed 's#/$##g; s#///*#/#g' | \
+  # work around for paths ending with / for directories and multiplied // (e.g. paths to native sysroot)
+  sort > ${OUTPUT}/master.list.all
+sort -u ${OUTPUT}/master.list.all > ${OUTPUT}/master.list # -u because some directories are listed for more recipes
+find ${tmpdir}/sysroots/ | \
+  sort > ${OUTPUT}/sysroot.list
+
+diff ${OUTPUT}/master.list.all ${OUTPUT}/master.list > ${OUTPUT}/duplicates
+diff ${OUTPUT}/master.list ${OUTPUT}/sysroot.list > ${OUTPUT}/diff.all
+
+cp ${OUTPUT}/diff.all ${OUTPUT}/diff
+for item in ${WHITELIST}; do
+  sed -i "/${item}/d" ${OUTPUT}/diff;
+done
+
+# too many false positives for directories
+# echo "Following files are installed in sysroot at least twice"
+# cat ${OUTPUT}/duplicates
+
+echo "Following files are installed in sysroot, but not tracked by sstate"
+cat ${OUTPUT}/diff
-- 
1.8.0.2




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

* [PATCH 03/10] rootfs_*.bbclass: exclude BUILDNAME var dependency from do_rootfs
  2012-12-14 23:40 [PATCH 00/10] Pending patches Martin Jansa
  2012-12-14 23:40 ` [PATCH 01/10] scripts/sstate-diff-machines.sh: add simple script to compare sstate checksums between MACHINEs Martin Jansa
  2012-12-14 23:40 ` [PATCH 02/10] scripts/sstate-sysroot-cruft.sh: add simple script to find files in sysroots not tracked by sstate Martin Jansa
@ 2012-12-14 23:40 ` Martin Jansa
  2012-12-14 23:40 ` [PATCH 04/10] bitbake.conf: exclude DATETIME var dependency from IMAGE_NAME Martin Jansa
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Martin Jansa @ 2012-12-14 23:40 UTC (permalink / raw)
  To: openembedded-core

* I have kernel recipe which depends on other recipe to build tiny initramfs
  image, without this change it rebuilds not only that initramfs image
  but also whole kernel when DATE or TIME is changed and OEBasicHash enabled
* also resolves ERROR shown when bitbake -S is used for image:
  ERROR: Bitbake's cached basehash does not match the one we just generated
  (/OE/oe-core/openembedded-core/meta/recipes-core/images/core-image-minimal.bb.do_rootfs)!
  ERROR: The mismatched hashes were 8c35cdf8a5d09c03941f081dd9f6d8dc and b5d6e2e5952770557c48c5779ddb73fc

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/rootfs_deb.bbclass | 1 +
 meta/classes/rootfs_ipk.bbclass | 1 +
 meta/classes/rootfs_rpm.bbclass | 1 +
 3 files changed, 3 insertions(+)

diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index 955382f..293953d 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -7,6 +7,7 @@ ROOTFS_PKGMANAGE_BOOTSTRAP  = "run-postinsts"
 
 do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot"
 do_rootfs[recrdeptask] += "do_package_write_deb"
+do_rootfs[vardepsexclude] += "BUILDNAME"
 
 do_rootfs[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
 
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 02b1d57..5c962de 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -11,6 +11,7 @@ ROOTFS_PKGMANAGE_BOOTSTRAP  = "run-postinsts"
 
 do_rootfs[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
 do_rootfs[recrdeptask] += "do_package_write_ipk"
+do_rootfs[vardepsexclude] += "BUILDNAME"
 
 do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock"
 
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 2bb1b08..91bf108 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -20,6 +20,7 @@ do_rootfs[depends] += "opkg-native:do_populate_sysroot"
 do_rootfs[depends] += "createrepo-native:do_populate_sysroot"
 
 do_rootfs[recrdeptask] += "do_package_write_rpm"
+do_rootfs[vardepsexclude] += "BUILDNAME"
 
 RPM_PREPROCESS_COMMANDS = "package_update_index_rpm; package_generate_rpm_conf; "
 RPM_POSTPROCESS_COMMANDS = ""
-- 
1.8.0.2




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

* [PATCH 04/10] bitbake.conf: exclude DATETIME var dependency from IMAGE_NAME
  2012-12-14 23:40 [PATCH 00/10] Pending patches Martin Jansa
                   ` (2 preceding siblings ...)
  2012-12-14 23:40 ` [PATCH 03/10] rootfs_*.bbclass: exclude BUILDNAME var dependency from do_rootfs Martin Jansa
@ 2012-12-14 23:40 ` Martin Jansa
  2012-12-14 23:40 ` [PATCH 05/10] kernel.bbclass: include PE in KERNEL_IMAGE_BASE_NAME Martin Jansa
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Martin Jansa @ 2012-12-14 23:40 UTC (permalink / raw)
  To: openembedded-core

* resolves ERROR shown when bitbake -S is used for image:
  ERROR: Bitbake's cached basehash does not match the one we just generated
  (/OE/oe-core/openembedded-core/meta/recipes-core/images/core-image-minimal.bb.do_rootfs)!
  ERROR: The mismatched hashes were 8c35cdf8a5d09c03941f081dd9f6d8dc and b5d6e2e5952770557c48c5779ddb73fc

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/conf/bitbake.conf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index be3bfc2..578c29f 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -407,6 +407,7 @@ STAGING_KERNEL_DIR = "${STAGING_DIR_HOST}/usr/src/kernel"
 IMAGE_ROOTFS = "${WORKDIR}/rootfs"
 IMAGE_BASENAME = "${PN}"
 IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
+IMAGE_NAME[vardepsexclude] += "DATETIME"
 IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}"
 
 # This option allows for a percentage overage of the actual image size rather than a
-- 
1.8.0.2




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

* [PATCH 05/10] kernel.bbclass: include PE in KERNEL_IMAGE_BASE_NAME
  2012-12-14 23:40 [PATCH 00/10] Pending patches Martin Jansa
                   ` (3 preceding siblings ...)
  2012-12-14 23:40 ` [PATCH 04/10] bitbake.conf: exclude DATETIME var dependency from IMAGE_NAME Martin Jansa
@ 2012-12-14 23:40 ` Martin Jansa
  2012-12-14 23:40 ` [PATCH 06/10] kernel.bbclass: use the same versioning schema for modules.tgz and provide link to latest Martin Jansa
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Martin Jansa @ 2012-12-14 23:40 UTC (permalink / raw)
  To: openembedded-core

* without this you it's harder to see which kernel is newer version
  e.g. after branch change LOCALCOUNT in SRCPV is reset to 0, so it needs PE bump for upgrade path
  but then it's clear why gitr1+HASH has newer DATETIME then gitrN+HASH, so include PE in name
* it will sort alphabetically wrong in deploy dir for a while until old images are removed

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/kernel.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 8e13662..ee59aaf 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -493,7 +493,7 @@ do_sizecheck() {
 
 addtask sizecheck before do_install after do_compile
 
-KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
+KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
 # Don't include the DATETIME variable in the sstate package signatures
 KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
 KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
-- 
1.8.0.2




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

* [PATCH 06/10] kernel.bbclass: use the same versioning schema for modules.tgz and provide link to latest
  2012-12-14 23:40 [PATCH 00/10] Pending patches Martin Jansa
                   ` (4 preceding siblings ...)
  2012-12-14 23:40 ` [PATCH 05/10] kernel.bbclass: include PE in KERNEL_IMAGE_BASE_NAME Martin Jansa
@ 2012-12-14 23:40 ` Martin Jansa
  2012-12-15  1:15   ` Bruce Ashfield
  2012-12-14 23:40 ` [PATCH 07/10] kernel.bbclass: Allow modules*.tar.gz generation to be inhibited Martin Jansa
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 12+ messages in thread
From: Martin Jansa @ 2012-12-14 23:40 UTC (permalink / raw)
  To: openembedded-core

* so it will work look KERNEL_IMAGE
* also we were recreating modules.tgz with every kernel build, but
  overwritting the same output file

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/kernel.bbclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index ee59aaf..9c70e70 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -497,6 +497,10 @@ KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DA
 # Don't include the DATETIME variable in the sstate package signatures
 KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
 KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
+MODULE_TARBALL_BASE_NAME ?= "modules-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}.tgz"
+# Don't include the DATETIME variable in the sstate package signatures
+MODULE_TARBALL_BASE_NAME[vardepsexclude] = "DATETIME"
+MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz"
 
 do_uboot_mkimage() {
 	if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then 
@@ -526,7 +530,8 @@ addtask uboot_mkimage before do_install after do_compile
 kernel_do_deploy() {
 	install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
 	if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
-		tar -cvzf ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
+		tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib
+		ln -sf ${MODULE_TARBALL_BASE_NAME}.bin ${MODULE_TARBALL_SYMLINK_NAME}
 	fi
 
 	cd ${DEPLOYDIR}
-- 
1.8.0.2




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

* [PATCH 07/10] kernel.bbclass: Allow modules*.tar.gz generation to be inhibited
  2012-12-14 23:40 [PATCH 00/10] Pending patches Martin Jansa
                   ` (5 preceding siblings ...)
  2012-12-14 23:40 ` [PATCH 06/10] kernel.bbclass: use the same versioning schema for modules.tgz and provide link to latest Martin Jansa
@ 2012-12-14 23:40 ` Martin Jansa
  2012-12-14 23:40 ` [PATCH 08/10] autotools: copy also remove-potcdate.sin from ${STAGING_DATADIR_NATIVE}/gettext/po Martin Jansa
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Martin Jansa @ 2012-12-14 23:40 UTC (permalink / raw)
  To: openembedded-core

From: Phil Blundell <philb@gnu.org>

The modules.tar.gz archive is sometimes of no value and it can take
a noticeable time to build if many modules were enabled in the kernel
configuration.  The extraneous file also contributes to deploy/ clutter
and is a waste of disk space.

Allow it to be suppressed by setting MODULE_TARBALL_DEPLOY="0".

Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/kernel.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 9c70e70..96b23bc 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -501,6 +501,7 @@ MODULE_TARBALL_BASE_NAME ?= "modules-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}.tg
 # Don't include the DATETIME variable in the sstate package signatures
 MODULE_TARBALL_BASE_NAME[vardepsexclude] = "DATETIME"
 MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz"
+MODULE_TARBALL_DEPLOY ?= "1"
 
 do_uboot_mkimage() {
 	if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then 
@@ -529,7 +530,7 @@ addtask uboot_mkimage before do_install after do_compile
 
 kernel_do_deploy() {
 	install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
-	if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
+	if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
 		tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib
 		ln -sf ${MODULE_TARBALL_BASE_NAME}.bin ${MODULE_TARBALL_SYMLINK_NAME}
 	fi
-- 
1.8.0.2




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

* [PATCH 08/10] autotools: copy also remove-potcdate.sin from ${STAGING_DATADIR_NATIVE}/gettext/po
  2012-12-14 23:40 [PATCH 00/10] Pending patches Martin Jansa
                   ` (6 preceding siblings ...)
  2012-12-14 23:40 ` [PATCH 07/10] kernel.bbclass: Allow modules*.tar.gz generation to be inhibited Martin Jansa
@ 2012-12-14 23:40 ` Martin Jansa
  2012-12-14 23:40 ` [PATCH 09/10] gettext: move remove-potcdate.sin from gettext-native to gettext-minimal-native Martin Jansa
  2012-12-14 23:40 ` [PATCH 10/10] iptables: include /usr/share/xtables/pf.os in PN if it's build Martin Jansa
  9 siblings, 0 replies; 12+ messages in thread
From: Martin Jansa @ 2012-12-14 23:40 UTC (permalink / raw)
  To: openembedded-core

* some packages (e.g. uptime, cpu, forecasts, news from meta-efl)
  don't have remove-potcdate.sin in po subdirectory, but Makefile.in.in
  supplied by autotools.bbclass depends on it and fails without like this:
  | make[3]: Entering directory `/OE/shr-core/tmp-eglibc/work/x86_64-oe-linux/uptime/0.0.2+svnr80477-r0.0/E-MODULES-EXTRA/uptime/po'
  | make[3]: *** No rule to make target `remove-potcdate.sin', needed by `remove-potcdate.sed'.  Stop.
  | make[3]: Leaving directory `/OE/shr-core/tmp-eglibc/work/x86_64-oe-linux/uptime/0.0.2+svnr80477-r0.0/E-MODULES-EXTRA/uptime/po'
  | make[2]: *** [uptime.pot] Error 2

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/autotools.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index ca981ec..9d1a299 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -193,6 +193,9 @@ autotools_do_configure() {
 				cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
 				if [ -d ${S}/po/ ]; then
 					cp ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/
+					if [ ! -e ${S}/po/remove-potcdate.sin ]; then
+						cp ${STAGING_DATADIR_NATIVE}/gettext/po/remove-potcdate.sin ${S}/po/
+					fi
 				fi
 				for i in gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4; do
 					for j in `find ${S} -name $i | grep -v aclocal-copy`; do
-- 
1.8.0.2




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

* [PATCH 09/10] gettext: move remove-potcdate.sin from gettext-native to gettext-minimal-native
  2012-12-14 23:40 [PATCH 00/10] Pending patches Martin Jansa
                   ` (7 preceding siblings ...)
  2012-12-14 23:40 ` [PATCH 08/10] autotools: copy also remove-potcdate.sin from ${STAGING_DATADIR_NATIVE}/gettext/po Martin Jansa
@ 2012-12-14 23:40 ` Martin Jansa
  2012-12-14 23:40 ` [PATCH 10/10] iptables: include /usr/share/xtables/pf.os in PN if it's build Martin Jansa
  9 siblings, 0 replies; 12+ messages in thread
From: Martin Jansa @ 2012-12-14 23:40 UTC (permalink / raw)
  To: openembedded-core

* now autotools.bbclass are copying not only Makefile.in.in but also
  remove-potcdate.sin which is used by Makefile.in.in, so we need to
  provide this file already in gettext-minimal-native otherwise build
  can fail, when autotools.bbclass is used before gettext-native (full)
  is built.

* Please be aware that this needs one manual step.
  clean gettext-native before upgrading gettext-minimal-native
  or
  clean gettext-minimal-native after gettext-native was rebuilt

  Without this manual step it will cause missing remove-potcdate.sin in
  native sysroot, because

  1) gettext-minimal-native_0.18.1.1.bb installs it with warning:
     WARNING: The recipe gettext-minimal-native is trying to install files
     into a shared area when those files already exist. Those files and their
     manifest location are:
        /OE/oe-core/tmp-eglibc/sysroots/x86_64-linux/usr/share/gettext/po/remove-potcdate.sin
        Matched in manifest-x86_64-gettext-native
     Please verify which package should provide the above files.

  2) building gettext-native will clean its own sstate data from sysroot
     including remove-potcdate.sin because it was part of gettext-native
     before, then installs without error, but also without remove-potcdate.sin

  It's the same problem as with config.rpath before:
  http://lists.linuxtogo.org/pipermail/openembedded-core/2012-October/031120.html

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 .../gettext-minimal-0.18.1.1/remove-potcdate.sin      | 19 +++++++++++++++++++
 .../gettext/gettext-minimal-native_0.18.1.1.bb        |  4 +++-
 meta/recipes-core/gettext/gettext_0.18.1.1.bb         |  3 ++-
 3 files changed, 24 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/gettext/gettext-minimal-0.18.1.1/remove-potcdate.sin

diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.1.1/remove-potcdate.sin b/meta/recipes-core/gettext/gettext-minimal-0.18.1.1/remove-potcdate.sin
new file mode 100644
index 0000000..2436c49
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.18.1.1/remove-potcdate.sin
@@ -0,0 +1,19 @@
+# Sed script that remove the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/meta/recipes-core/gettext/gettext-minimal-native_0.18.1.1.bb b/meta/recipes-core/gettext/gettext-minimal-native_0.18.1.1.bb
index a46a40d..f008a79 100644
--- a/meta/recipes-core/gettext/gettext-minimal-native_0.18.1.1.bb
+++ b/meta/recipes-core/gettext/gettext-minimal-native_0.18.1.1.bb
@@ -1,6 +1,7 @@
 SRC_URI = "file://aclocal.tgz \
            file://config.rpath \
            file://Makefile.in.in \
+           file://remove-potcdate.sin \
            file://COPYING"
 
 INHIBIT_DEFAULT_DEPS = "1"
@@ -11,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0854da868a929923087141d9d7aba7d5"
 
 inherit native
 
-PR = "r4"
+PR = "r5"
 
 S = "${WORKDIR}"
 
@@ -21,4 +22,5 @@ do_install () {
 	install -d ${D}${datadir}/gettext/po/
 	cp ${WORKDIR}/config.rpath ${D}${datadir}/gettext/
 	cp ${WORKDIR}/Makefile.in.in ${D}${datadir}/gettext/po/
+	cp ${WORKDIR}/remove-potcdate.sin ${D}${datadir}/gettext/po/
 }
diff --git a/meta/recipes-core/gettext/gettext_0.18.1.1.bb b/meta/recipes-core/gettext/gettext_0.18.1.1.bb
index c3265e1..4639481 100644
--- a/meta/recipes-core/gettext/gettext_0.18.1.1.bb
+++ b/meta/recipes-core/gettext/gettext_0.18.1.1.bb
@@ -5,7 +5,7 @@ SECTION = "libs"
 LICENSE = "GPLv3+ & LGPL-2.1+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
-PR = "r18"
+PR = "r19"
 DEPENDS = "gettext-native virtual/libiconv ncurses expat"
 DEPENDS_class-native = "gettext-minimal-native"
 PROVIDES = "virtual/libintl virtual/gettext"
@@ -104,6 +104,7 @@ do_install_append_class-native () {
 	rm ${D}${datadir}/aclocal/*
 	rm ${D}${datadir}/gettext/config.rpath
 	rm ${D}${datadir}/gettext/po/Makefile.in.in
+	rm ${D}${datadir}/gettext/po/remove-potcdate.sin
 }
 
 BBCLASSEXTEND = "native nativesdk"
-- 
1.8.0.2




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

* [PATCH 10/10] iptables: include /usr/share/xtables/pf.os in PN if it's build
  2012-12-14 23:40 [PATCH 00/10] Pending patches Martin Jansa
                   ` (8 preceding siblings ...)
  2012-12-14 23:40 ` [PATCH 09/10] gettext: move remove-potcdate.sin from gettext-native to gettext-minimal-native Martin Jansa
@ 2012-12-14 23:40 ` Martin Jansa
  9 siblings, 0 replies; 12+ messages in thread
From: Martin Jansa @ 2012-12-14 23:40 UTC (permalink / raw)
  To: openembedded-core

* when libnfnetlink is available (provided by
  meta-networking/recipes-filter/libnfnetlink/libnfnetlink_1.0.1.bb
  it's autodetected and utils subdirectory with pf.os is used.
* unfortunately there isn't configure switch to explicitly disable
  libnfnetlink and it's also in different layer so we cannot add it to
  DEPENDS
* it's undeterminitic, but pf.os is the only difference AFAIK, so not
  worth patching configure switch
* fixes:
  iptables-1.4.15: iptables: Files/directories were installed but not
  shipped
    /usr/share/xtables
    /usr/share/xtables/pf.os

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-extended/iptables/iptables_1.4.15.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/iptables/iptables_1.4.15.bb b/meta/recipes-extended/iptables/iptables_1.4.15.bb
index a6297f3..d556c77 100644
--- a/meta/recipes-extended/iptables/iptables_1.4.15.bb
+++ b/meta/recipes-extended/iptables/iptables_1.4.15.bb
@@ -7,7 +7,7 @@ LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\
                     file://iptables/iptables.c;firstline=13;endline=25;md5=f1028f2401da1c120df27594b2be50ef"
 
-PR = "r0"
+PR = "r1"
 
 RRECOMMENDS_${PN} = "kernel-module-x-tables \
                      kernel-module-ip-tables \
@@ -18,7 +18,7 @@ RRECOMMENDS_${PN} = "kernel-module-x-tables \
                      kernel-module-nf-conntrack-ipv4 \
                      kernel-module-nf-nat \
                      kernel-module-ipt-masquerade"
-FILES_${PN} =+ "${libdir}/xtables/"
+FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables"
 FILES_${PN}-dbg =+ "${libdir}/xtables/.debug"
 
 SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
-- 
1.8.0.2




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

* Re: [PATCH 06/10] kernel.bbclass: use the same versioning schema for modules.tgz and provide link to latest
  2012-12-14 23:40 ` [PATCH 06/10] kernel.bbclass: use the same versioning schema for modules.tgz and provide link to latest Martin Jansa
@ 2012-12-15  1:15   ` Bruce Ashfield
  0 siblings, 0 replies; 12+ messages in thread
From: Bruce Ashfield @ 2012-12-15  1:15 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

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

On Fri, Dec 14, 2012 at 6:40 PM, Martin Jansa <martin.jansa@gmail.com>wrote:

> * so it will work look KERNEL_IMAGE
> * also we were recreating modules.tgz with every kernel build, but
>   overwritting the same output file
>

And I recall that no one ever showed a strong preference for keeping the old
name around via a symlink. So I know that I don't have any objections to
changing
the naming.

Cheers,

Bruce


>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta/classes/kernel.bbclass | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index ee59aaf..9c70e70 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -497,6 +497,10 @@ KERNEL_IMAGE_BASE_NAME ?=
> "${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DA
>  # Don't include the DATETIME variable in the sstate package signatures
>  KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
>  KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
> +MODULE_TARBALL_BASE_NAME ?=
> "modules-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}.tgz"
> +# Don't include the DATETIME variable in the sstate package signatures
> +MODULE_TARBALL_BASE_NAME[vardepsexclude] = "DATETIME"
> +MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz"
>
>  do_uboot_mkimage() {
>         if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
> @@ -526,7 +530,8 @@ addtask uboot_mkimage before do_install after
> do_compile
>  kernel_do_deploy() {
>         install -m 0644 ${KERNEL_OUTPUT}
> ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
>         if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
> -               tar -cvzf
> ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
> +               tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D}
> lib
> +               ln -sf ${MODULE_TARBALL_BASE_NAME}.bin
> ${MODULE_TARBALL_SYMLINK_NAME}
>         fi
>
>         cd ${DEPLOYDIR}
> --
> 1.8.0.2
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"

[-- Attachment #2: Type: text/html, Size: 3331 bytes --]

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

end of thread, other threads:[~2012-12-15  1:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-14 23:40 [PATCH 00/10] Pending patches Martin Jansa
2012-12-14 23:40 ` [PATCH 01/10] scripts/sstate-diff-machines.sh: add simple script to compare sstate checksums between MACHINEs Martin Jansa
2012-12-14 23:40 ` [PATCH 02/10] scripts/sstate-sysroot-cruft.sh: add simple script to find files in sysroots not tracked by sstate Martin Jansa
2012-12-14 23:40 ` [PATCH 03/10] rootfs_*.bbclass: exclude BUILDNAME var dependency from do_rootfs Martin Jansa
2012-12-14 23:40 ` [PATCH 04/10] bitbake.conf: exclude DATETIME var dependency from IMAGE_NAME Martin Jansa
2012-12-14 23:40 ` [PATCH 05/10] kernel.bbclass: include PE in KERNEL_IMAGE_BASE_NAME Martin Jansa
2012-12-14 23:40 ` [PATCH 06/10] kernel.bbclass: use the same versioning schema for modules.tgz and provide link to latest Martin Jansa
2012-12-15  1:15   ` Bruce Ashfield
2012-12-14 23:40 ` [PATCH 07/10] kernel.bbclass: Allow modules*.tar.gz generation to be inhibited Martin Jansa
2012-12-14 23:40 ` [PATCH 08/10] autotools: copy also remove-potcdate.sin from ${STAGING_DATADIR_NATIVE}/gettext/po Martin Jansa
2012-12-14 23:40 ` [PATCH 09/10] gettext: move remove-potcdate.sin from gettext-native to gettext-minimal-native Martin Jansa
2012-12-14 23:40 ` [PATCH 10/10] iptables: include /usr/share/xtables/pf.os in PN if it's build Martin Jansa

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