All of lore.kernel.org
 help / color / mirror / Atom feed
* [CONSOLIDATED PULL 0/5] final items for M2 RC1
@ 2012-01-11  7:36 Saul Wold
  2012-01-11  7:36 ` [CONSOLIDATED PULL 1/5] hdparm: upgrade to 9.37 Saul Wold
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Saul Wold @ 2012-01-11  7:36 UTC (permalink / raw)
  To: openembedded-core

Richard,

Here are the final items we discussed yesterday, a succesful
build finished, and we seem to be in good shape, please pull 
these early in your day and fire up AB Master is you can.


Thanks
	Sau!


The following changes since commit 9b944ae2f0e4dbac5a8f1f235f60730e56b26516:

  Revert "site/common-uclibc: Cache gl_cv_func_wcwidth_works" (2012-01-10 18:32:16 +0000)

are available in the git repository at:
  git://git.openembedded.org/openembedded-core-contrib sgw/stage
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=sgw/stage

Lianhao Lu (2):
  meta/PRService: Added export/import fuctions.
  package.bbclass: per recipe PRSERV_HOST support

Robert Yang (2):
  Incremental rpm image generation
  Incremental rpm image generation(Add config sample)

Shane Wang (1):
  hdparm: upgrade to 9.37

 meta/classes/image.bbclass                         |   11 ++-
 meta/classes/package.bbclass                       |   21 +++-
 meta/classes/package_rpm.bbclass                   |   73 +++++++++++--
 meta/classes/prexport.bbclass                      |   45 ++++++++
 meta/classes/primport.bbclass                      |   17 +++
 meta/classes/prserv.bbclass                        |   36 +++----
 meta/classes/rootfs_rpm.bbclass                    |    6 +-
 meta/conf/bitbake.conf                             |    4 +-
 meta/conf/local.conf.sample.extended               |    7 ++
 meta/conf/prexport.conf                            |    1 +
 meta/conf/primport.conf                            |    1 +
 meta/lib/oe/prservice.py                           |  113 ++++++++++++++++++++
 .../recipes-extended/hdparm/hdparm-6.3/bswap.patch |   37 -------
 .../hdparm/hdparm-6.3/uclibc.patch                 |   34 ------
 meta/recipes-extended/hdparm/hdparm_6.3.bb         |   18 ---
 meta/recipes-extended/hdparm/hdparm_9.37.bb        |   36 ++++++
 meta/recipes-extended/stat/stat_3.3.bb             |   27 +++++
 scripts/bitbake-prserv-tool                        |   57 ++++++++++
 18 files changed, 415 insertions(+), 129 deletions(-)
 create mode 100644 meta/classes/prexport.bbclass
 create mode 100644 meta/classes/primport.bbclass
 create mode 100644 meta/conf/prexport.conf
 create mode 100644 meta/conf/primport.conf
 create mode 100644 meta/lib/oe/prservice.py
 delete mode 100644 meta/recipes-extended/hdparm/hdparm-6.3/bswap.patch
 delete mode 100644 meta/recipes-extended/hdparm/hdparm-6.3/uclibc.patch
 delete mode 100644 meta/recipes-extended/hdparm/hdparm_6.3.bb
 create mode 100644 meta/recipes-extended/hdparm/hdparm_9.37.bb
 create mode 100644 meta/recipes-extended/stat/stat_3.3.bb
 create mode 100755 scripts/bitbake-prserv-tool

-- 
1.7.6.5




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

* [CONSOLIDATED PULL 1/5] hdparm: upgrade to 9.37
  2012-01-11  7:36 [CONSOLIDATED PULL 0/5] final items for M2 RC1 Saul Wold
@ 2012-01-11  7:36 ` Saul Wold
  2012-01-11  9:38   ` Paul Menzel
  2012-01-11  7:36 ` [CONSOLIDATED PULL 2/5] Incremental rpm image generation Saul Wold
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Saul Wold @ 2012-01-11  7:36 UTC (permalink / raw)
  To: openembedded-core

From: Shane Wang <shane.wang@intel.com>

Because hdparm depends on stat, stat is brought into Yocto, and it is a new dependency.

Part of this patch comes from oe
http://git.openembedded.org/openembedded/tree/recipes/hdparm, and
http://git.openembedded.org/openembedded/tree/recipes/stat.
But, changes include:
   - upgrade to the latest version 9.37 from 9.35.
   - added license checksum for both recipes.
   - for hdparm, the license for wiper which is in hdparm is GPLv2.

Signed-off-by: Shane Wang <shane.wang@intel.com>
---
 .../recipes-extended/hdparm/hdparm-6.3/bswap.patch |   37 --------------------
 .../hdparm/hdparm-6.3/uclibc.patch                 |   34 ------------------
 meta/recipes-extended/hdparm/hdparm_6.3.bb         |   18 ---------
 meta/recipes-extended/hdparm/hdparm_9.37.bb        |   36 +++++++++++++++++++
 meta/recipes-extended/stat/stat_3.3.bb             |   27 ++++++++++++++
 5 files changed, 63 insertions(+), 89 deletions(-)
 delete mode 100644 meta/recipes-extended/hdparm/hdparm-6.3/bswap.patch
 delete mode 100644 meta/recipes-extended/hdparm/hdparm-6.3/uclibc.patch
 delete mode 100644 meta/recipes-extended/hdparm/hdparm_6.3.bb
 create mode 100644 meta/recipes-extended/hdparm/hdparm_9.37.bb
 create mode 100644 meta/recipes-extended/stat/stat_3.3.bb

diff --git a/meta/recipes-extended/hdparm/hdparm-6.3/bswap.patch b/meta/recipes-extended/hdparm/hdparm-6.3/bswap.patch
deleted file mode 100644
index 715886a..0000000
--- a/meta/recipes-extended/hdparm/hdparm-6.3/bswap.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Upstream-Status: Backport
-
-#
-# Patch managed by http://www.holgerschurig.de/patcher.html
-#
-
---- hdparm-5.8/hdparm.c~bswap
-+++ hdparm-5.8/hdparm.c
-@@ -20,7 +20,9 @@
- #include <linux/types.h>
- #include <linux/hdreg.h>
- #include <linux/major.h>
--#include <asm/byteorder.h>
-+#include <byteswap.h>
-+
-+#define le16_to_cpus(x) bswap_16(htons(x))
- 
- #include "hdparm.h"
- 
-@@ -1160,7 +1162,7 @@
- 			}
- 		} else {
- 			for(i = 0; i < 0x100; ++i) {
--				__le16_to_cpus(&id[i]);
-+				le16_to_cpus(&id[i]);
- 			}
- 			identify((void *)id, NULL);
- 		}
-@@ -1380,7 +1382,7 @@
- 	}
- 	for (i = 0; count >= 4; ++i) {
- 		sbuf[i] = (fromhex(b[0]) << 12) | (fromhex(b[1]) << 8) | (fromhex(b[2]) << 4) | fromhex(b[3]);
--		__le16_to_cpus((__u16 *)(&sbuf[i]));
-+		le16_to_cpus((__u16 *)(&sbuf[i]));
- 		b += 5;
- 		count -= 5;
- 	}
diff --git a/meta/recipes-extended/hdparm/hdparm-6.3/uclibc.patch b/meta/recipes-extended/hdparm/hdparm-6.3/uclibc.patch
deleted file mode 100644
index d5f9298..0000000
--- a/meta/recipes-extended/hdparm/hdparm-6.3/uclibc.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
---- hdparm-5.8/hdparm.c.ark	2005-05-22 19:48:34.000000000 +0000
-+++ hdparm-5.8/hdparm.c	2005-05-22 19:52:18.000000000 +0000
-@@ -17,7 +17,9 @@
- #include <sys/times.h>
- #include <sys/types.h>
- #include <sys/mount.h>
-+#ifndef __UCLIBC__
- #include <linux/types.h>
-+#endif
- #include <linux/hdreg.h>
- #include <linux/major.h>
- #include <byteswap.h>
---- hdparm-5.8/hdparm.h.ark	2005-05-22 19:51:49.000000000 +0000
-+++ hdparm-5.8/hdparm.h	2005-05-22 19:54:54.000000000 +0000
-@@ -1,6 +1,6 @@
- /* Some prototypes for extern functions. */
- 
--#include <linux/types.h>	/* for __u16 */
-+#include <stdint.h>
- 
- #if !defined(__GNUC__) && !defined(__attribute__)
- #define __attribute__(x)	/* if not using GCC, turn off the __attribute__
-@@ -11,7 +11,7 @@
-    others, though, were declared in hdparm.c with global scope; since other
-    functions in that file have static (file) scope, I assume the difference is
-    intentional. */
--extern void identify (__u16 *id_supplied, const char *devname);
-+extern void identify (uint16_t *id_supplied, const char *devname);
- 
- extern void usage_error(int out)    __attribute__((noreturn));
- extern int main(int argc, char **argv) __attribute__((noreturn));
-
diff --git a/meta/recipes-extended/hdparm/hdparm_6.3.bb b/meta/recipes-extended/hdparm/hdparm_6.3.bb
deleted file mode 100644
index 62ae4c0..0000000
--- a/meta/recipes-extended/hdparm/hdparm_6.3.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "Utility for displaying and setting hard disk parameters"
-DESCRIPTION = "hdparm is a system utility for viewing \
-and manipulating various IDE drive and driver parameters."
-SECTION = "console/utils"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=910a8a42c962d238619c75fdb78bdb24"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/hdparm-${PV}.tar.gz \
-	   file://bswap.patch \
-	   file://uclibc.patch"
-
-SRC_URI[md5sum] = "0c12672f3a09c14ad0b0882f15fc9389"
-SRC_URI[sha256sum] = "08688a6a46ba495494bf838f8f26103e797584c1888eca94e43a171e1b37246d"
-
-do_install () {
-	install -d ${D}/${sbindir} ${D}/${mandir}/man8
-	oe_runmake 'DESTDIR=${D}' install
-}
diff --git a/meta/recipes-extended/hdparm/hdparm_9.37.bb b/meta/recipes-extended/hdparm/hdparm_9.37.bb
new file mode 100644
index 0000000..bfc64e7
--- /dev/null
+++ b/meta/recipes-extended/hdparm/hdparm_9.37.bb
@@ -0,0 +1,36 @@
+DESCRIPTION = "hdparm is a Linux shell utility for viewing \
+and manipulating various IDE drive and driver parameters."
+SECTION = "console/utils"
+PRIORITY = "optional"
+LICENSE = "BSD"
+LICENSE_wiper = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=910a8a42c962d238619c75fdb78bdb24 \
+                    file://debian/copyright;md5=a82d7ba3ade9e8ec902749db98c592f3 \
+                    file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \
+                    file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09"
+
+PACKAGES += "wiper"
+
+FILES_wiper = "${bindir}/wiper.sh"
+FILES_${PN} = "${base_sbindir} ${mandir}"
+
+RDEPENDS_wiper = "bash gawk stat"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/hdparm-${PV}.tar.gz "
+SRC_URI[md5sum] = "0bb94ddd1bedd5c02b1ca62f1caaf6de"
+SRC_URI[sha256sum] = "87ede0a7cb5b4de500748232e9d251b75acfccce078e1d42c8d125b9e5b4ccd3"
+
+do_install () {
+	install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir}
+	oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install
+	mv ${D}${base_sbindir}/hdparm ${D}${base_sbindir}/hdparm.${PN}
+	cp ${S}/wiper/wiper.sh ${D}/${bindir}
+}
+
+pkg_postinst_${PN} () {
+	update-alternatives --install ${base_sbindir}/hdparm hdparm hdparm.${PN} 100
+}
+
+pkg_prerm_${PN} () {
+	update-alternatives --remove hdparm hdparm.${PN}
+}
diff --git a/meta/recipes-extended/stat/stat_3.3.bb b/meta/recipes-extended/stat/stat_3.3.bb
new file mode 100644
index 0000000..aa21e75
--- /dev/null
+++ b/meta/recipes-extended/stat/stat_3.3.bb
@@ -0,0 +1,27 @@
+SECTION = "console/utils"
+DESCRIPTION = "Display all information about a file that the stat() call provides and all information a filesystem that statfs() provides."
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=39886b077fd072e876e5c4c16310b631 \
+                    file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+BBCLASSEXTEND = "native"
+
+PR = "r1"
+
+SRC_URI = "ftp://metalab.unc.edu/pub/Linux/utils/file/stat-3.3.tar.gz"
+SRC_URI[md5sum] = "37e247e8e400ad9205f1b0500b728fd3"
+SRC_URI[sha256sum] = "7071f0384a423a938dd542c1f08547a02824f6359acd3ef3f944b2c4c2d1ee09"
+
+do_install() {
+	install -d ${D}${bindir} ${D}${mandir}/man1
+	install -m 755 stat ${D}${bindir}
+	install -m 644 stat.1 ${D}${mandir}/man1
+}
+
+#do_install_virtclass-native() {
+#	install -d ${D}${bindir}
+#	install -m 755 stat ${D}${bindir}
+#}
+
+NATIVE_INSTALL_WORKS = "1"
+
-- 
1.7.6.5




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

* [CONSOLIDATED PULL 2/5] Incremental rpm image generation
  2012-01-11  7:36 [CONSOLIDATED PULL 0/5] final items for M2 RC1 Saul Wold
  2012-01-11  7:36 ` [CONSOLIDATED PULL 1/5] hdparm: upgrade to 9.37 Saul Wold
@ 2012-01-11  7:36 ` Saul Wold
  2012-01-11  7:36 ` [CONSOLIDATED PULL 3/5] Incremental rpm image generation(Add config sample) Saul Wold
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Saul Wold @ 2012-01-11  7:36 UTC (permalink / raw)
  To: openembedded-core

From: Robert Yang <liezhi.yang@windriver.com>

Incremental rpm image generation, the rootfs would be totally removed and
re-created in the second generation by default, but with
INC_RPM_IMAGE_GEN = "1", the rpm based rootfs would be kept, and will do
update(remove/add some pkgs) on it.

NOTE: This is not suggested when you want to create a productive rootfs

For example:
  1) Add the follow config option to a conf file:
     INC_RPM_IMAGE_GEN = "1"

  2) bitbake core-image-sato
     modify a package
     bitbake core-image-sato

The rootfs would not be totally removed and re-created in the second
generation, it would be simply updated based on the "package".

Implatation:
1) Figure out the pkg which need to be removed or re-installed, then use
'rpm -e to remove the old one. Use the rpm's BUILDTIME to determine
which pkg has been rebuilt.

2) Figure out the pkg which is newly added, and use 'rpm -U' to install
it.

This only for the rpm based rootfs, the deb and ipk based rootfs would
be done later.

[YOCTO #1651]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/image.bbclass       |   11 +++++-
 meta/classes/package_rpm.bbclass |   73 ++++++++++++++++++++++++++++++++-----
 meta/classes/rootfs_rpm.bbclass  |    6 +++-
 3 files changed, 77 insertions(+), 13 deletions(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 295b653..3034725 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -134,15 +134,22 @@ do_rootfs[umask] = 022
 
 fakeroot do_rootfs () {
 	#set -x
-	rm -rf ${IMAGE_ROOTFS}
+    # When use the rpm incremental image generation, don't remove the rootfs
+    if [ "${INC_RPM_IMAGE_GEN}" != "1" -o "${IMAGE_PKGTYPE}" != "rpm" ]; then
+        rm -rf ${IMAGE_ROOTFS}
+    fi
 	rm -rf ${MULTILIB_TEMP_ROOTFS}
 	mkdir -p ${IMAGE_ROOTFS}
 	mkdir -p ${DEPLOY_DIR_IMAGE}
 
 	cp ${COREBASE}/meta/files/deploydir_readme.txt ${DEPLOY_DIR_IMAGE}/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
 
-	if [ "${USE_DEVFS}" != "1" ]; then
+    # If "${IMAGE_ROOTFS}/dev" exists, then the device had been made by
+    # the previous build
+	if [ "${USE_DEVFS}" != "1" -a ! -r "${IMAGE_ROOTFS}/dev" ]; then
 		for devtable in ${@get_devtable_list(d)}; do
+            # Always return ture since there maybe already one when use the
+            # incremental image generation
 			makedevs -r ${IMAGE_ROOTFS} -D $devtable
 		done
 	fi
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index d03dc3f..2d92efe 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -147,6 +147,67 @@ resolve_package_rpm () {
 	echo $pkg_name
 }
 
+# rpm common command and options
+rpm_common_comand () {
+
+    local target_rootfs="${INSTALL_ROOTFS_RPM}"
+    local extra_args="$@"
+
+    ${RPM} --root ${target_rootfs} \
+        --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
+        --predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
+        -D "_var ${localstatedir}" \
+        -D "_dbpath ${rpmlibdir}" \
+        --noparentdirs --nolinktos \
+        -D "__dbi_txn create nofsync private" \
+        -D "_cross_scriptlet_wrapper ${WORKDIR}/scriptlet_wrapper" $extra_args
+}
+
+# install or remove the pkg
+rpm_update_pkg () {
+
+    local target_rootfs="${INSTALL_ROOTFS_RPM}"
+
+    # Save the rpm's build time for incremental image generation, and the file
+    # would be moved to ${T}
+    rm -f ${target_rootfs}/install/total_solution_bt.manifest
+    for i in `cat ${target_rootfs}/install/total_solution.manifest`; do
+        # Use "rpm" rather than "${RPM}" here, since we don't need the
+        # '--dbpath' option
+        echo "$i `rpm -qp --qf '%{BUILDTIME}\n' $i`" >> \
+            ${target_rootfs}/install/total_solution_bt.manifest
+    done
+
+    # Only install the different pkgs if incremental image generation is set
+    if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f ${T}/total_solution_bt.manifest -a \
+        "${IMAGE_PKGTYPE}" = "rpm" ]; then
+        cur_list="${target_rootfs}/install/total_solution_bt.manifest"
+        pre_list="${T}/total_solution_bt.manifest"
+        sort -u $cur_list -o $cur_list
+        sort -u $pre_list -o $pre_list
+        comm -1 -3 $cur_list $pre_list | sed 's#.*/\(.*\)\.rpm .*#\1#' > \
+            ${target_rootfs}/install/remove.manifest
+        comm -2 -3 $cur_list $pre_list | awk '{print $1}' > \
+            ${target_rootfs}/install/incremental.manifest
+
+        # Attempt to remove unwanted pkgs, the scripts(pre, post, etc.) has not
+        # been run by now, so don't have to run them(preun, postun, etc.) when
+        # erase the pkg
+        if [ -s ${target_rootfs}/install/remove.manifest ]; then
+            rpm_common_comand --noscripts --nodeps \
+                -e `cat ${target_rootfs}/install/remove.manifest`
+        fi
+
+        # Attempt to install the incremental pkgs
+        rpm_common_comand --nodeps --replacefiles --replacepkgs \
+            -Uvh ${target_rootfs}/install/incremental.manifest
+    else
+        # Attempt to install
+        rpm_common_comand --replacepkgs \
+            -Uhv ${target_rootfs}/install/total_solution.manifest
+    fi
+}
+
 #
 # install a bunch of packages using rpm
 # the following shell variables needs to be set before calling this func:
@@ -406,16 +467,8 @@ EOF
 
 	chmod 0755 ${WORKDIR}/scriptlet_wrapper
 
-	# Attempt install
-	${RPM} --root ${target_rootfs} \
-		--predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
-		--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
-		-D "_var ${localstatedir}" \
-		-D "_dbpath ${rpmlibdir}" \
-		--noparentdirs --nolinktos --replacepkgs \
-		-D "__dbi_txn create nofsync private" \
-		-D "_cross_scriptlet_wrapper ${WORKDIR}/scriptlet_wrapper" \
-		-Uhv ${target_rootfs}/install/total_solution.manifest
+    rpm_update_pkg
+
 }
 
 python write_specfile () {
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 999b8a6..48133f0 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -201,11 +201,15 @@ rootfs_check_package_exists() {
 }
 
 rootfs_install_packages() {
+    # The pkg to be installed here is not controlled by the
+    # package_install_internal_rpm, so it may have already been
+    # installed(e.g, installed in the first time when generate the
+    # rootfs), use '--replacepkgs' to always install them
 	for pkg in $@; do
 		${RPM} --root ${IMAGE_ROOTFS} -D "_dbpath ${rpmlibdir}" \
 			-D "__dbi_txn create nofsync private" \
 			--noscripts --notriggers --noparentdirs --nolinktos \
-			-Uhv $pkg || true
+			--replacepkgs -Uhv $pkg || true
 	done
 }
 
-- 
1.7.6.5




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

* [CONSOLIDATED PULL 3/5] Incremental rpm image generation(Add config sample)
  2012-01-11  7:36 [CONSOLIDATED PULL 0/5] final items for M2 RC1 Saul Wold
  2012-01-11  7:36 ` [CONSOLIDATED PULL 1/5] hdparm: upgrade to 9.37 Saul Wold
  2012-01-11  7:36 ` [CONSOLIDATED PULL 2/5] Incremental rpm image generation Saul Wold
@ 2012-01-11  7:36 ` Saul Wold
  2012-01-11  7:36 ` [CONSOLIDATED PULL 4/5] meta/PRService: Added export/import fuctions Saul Wold
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Saul Wold @ 2012-01-11  7:36 UTC (permalink / raw)
  To: openembedded-core

From: Robert Yang <liezhi.yang@windriver.com>

Add the config sample for incremental image generation to
meta-yocto/conf/local.conf.sample.extended

[YOCTO #1651]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/conf/local.conf.sample.extended |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/meta/conf/local.conf.sample.extended b/meta/conf/local.conf.sample.extended
index 7c26572..b901c5b 100644
--- a/meta/conf/local.conf.sample.extended
+++ b/meta/conf/local.conf.sample.extended
@@ -123,3 +123,10 @@
 # The following is a list of classes to import to use in the generation of images
 # currently an example class is image_types_uboot
 # IMAGE_CLASSES = " image_types_uboot"
+
+# Incremental rpm image generation, the rootfs would be totally removed
+# and re-created in the second generation by default, but with
+# INC_RPM_IMAGE_GEN = "1", the rpm based rootfs would be kept, and will
+# do update(remove/add some pkgs) on it.  NOTE: This is not suggested
+# when you want to create a productive rootfs
+#INC_RPM_IMAGE_GEN = "1"
-- 
1.7.6.5




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

* [CONSOLIDATED PULL 4/5] meta/PRService: Added export/import fuctions.
  2012-01-11  7:36 [CONSOLIDATED PULL 0/5] final items for M2 RC1 Saul Wold
                   ` (2 preceding siblings ...)
  2012-01-11  7:36 ` [CONSOLIDATED PULL 3/5] Incremental rpm image generation(Add config sample) Saul Wold
@ 2012-01-11  7:36 ` Saul Wold
  2012-01-11  7:36 ` [CONSOLIDATED PULL 5/5] package.bbclass: per recipe PRSERV_HOST support Saul Wold
  2012-01-11 10:40 ` [CONSOLIDATED PULL 0/5] final items for M2 RC1 Richard Purdie
  5 siblings, 0 replies; 10+ messages in thread
From: Saul Wold @ 2012-01-11  7:36 UTC (permalink / raw)
  To: openembedded-core

From: Lianhao Lu <lianhao.lu@intel.com>

[YOCTO #1556]
- Modified meta/class/package.bbclass and prserv.bbclass according to
the change in PR service by adding PACKAGE_ARCH into the query tuple.

- Added prexport.bbclass, primport.bbclass to export/import AUTOPR
  values from/to PRService.

- Move PR service related common code to lib/oe/prservice.py.

- Supported reading the AUTOPR values from the exported .inc file
instead of reading it from remote PR service.

- Created a new script bitbake-prserv-tool to export/import the AUTOPR
values from/to the PR service.

Typical usage scenario of the export/import is:
1. bitbake-prserv-tool export <file> to export the AUTOPR values from
the current PR service into an exported .inc file.

2. Others may use that exported .inc file(to be included in the
local.conf) to lockdown and reproduce the same AUTOPR when generating
package feeds.

3. Others may "bitbake-prserv-tool import <file>" to import the AUTOPR
values into their own PR service and the AUTOPR values will be
incremented from there.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
---
 meta/classes/package.bbclass  |   13 ++++-
 meta/classes/prexport.bbclass |   45 ++++++++++++++++
 meta/classes/primport.bbclass |   17 ++++++
 meta/classes/prserv.bbclass   |   36 +++++--------
 meta/conf/bitbake.conf        |    4 +-
 meta/conf/prexport.conf       |    1 +
 meta/conf/primport.conf       |    1 +
 meta/lib/oe/prservice.py      |  113 +++++++++++++++++++++++++++++++++++++++++
 scripts/bitbake-prserv-tool   |   57 +++++++++++++++++++++
 9 files changed, 260 insertions(+), 27 deletions(-)
 create mode 100644 meta/classes/prexport.bbclass
 create mode 100644 meta/classes/primport.bbclass
 create mode 100644 meta/conf/prexport.conf
 create mode 100644 meta/conf/primport.conf
 create mode 100644 meta/lib/oe/prservice.py
 create mode 100755 scripts/bitbake-prserv-tool

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 9040eb4..65e6571 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -351,10 +351,17 @@ def runtime_mapping_rename (varname, d):
 
 python package_get_auto_pr() {
 	if d.getVar('USE_PR_SERV', True) != "0":
-		auto_pr=prserv_get_pr_auto(d)
-		if auto_pr is None:
-			bb.fatal("Can NOT get auto PR revision from remote PR service")
+		try:
+			auto_pr=prserv_get_pr_auto(d)
+		except Exception as e:
+			bb.fatal("Can NOT get PRAUTO, exception %s" %  str(e))
 			return
+		if auto_pr is None:
+			if d.getVar('PRSERV_LOCKDOWN', True):
+				bb.fatal("Can NOT get PRAUTO from lockdown exported file")
+			else:
+				bb.fatal("Can NOT get PRAUTO from remote PR service")
+			return 
 		d.setVar('PRAUTO',str(auto_pr))
 }
 
diff --git a/meta/classes/prexport.bbclass b/meta/classes/prexport.bbclass
new file mode 100644
index 0000000..5b5b707
--- /dev/null
+++ b/meta/classes/prexport.bbclass
@@ -0,0 +1,45 @@
+PRSERV_DUMPOPT_VERSION = "${PRAUTOINX}"
+PRSERV_DUMPOPT_PKGARCH  = ""
+PRSERV_DUMPOPT_CHECKSUM = ""
+PRSERV_DUMPOPT_COL = "0"
+
+PRSERV_DUMPDIR ??= "${LOG_DIR}/db"
+PRSERV_DUMPFILE ??= "${PRSERV_DUMPDIR}/prserv.inc"
+
+python prexport_handler () {
+    import bb.event
+    if not e.data:
+        return
+
+    if isinstance(e, bb.event.RecipeParsed):
+        import oe.prservice
+        #get all PR values for the current PRAUTOINX
+        ver = e.data.getVar('PRSERV_DUMPOPT_VERSION', True)
+        ver = ver.replace('%','-')
+        retval = oe.prservice.prserv_dump_db(e.data)
+        if not retval:
+            bb.fatal("prexport_handler: export failed!")
+        (metainfo, datainfo) = retval
+        if not datainfo:
+            bb.error("prexport_handler: No AUROPR values found for %s" % ver)
+            return
+        oe.prservice.prserv_export_tofile(e.data, None, datainfo, False)
+    elif isinstance(e, bb.event.ParseStarted):
+        import bb.utils
+        #remove dumpfile
+        bb.utils.remove(e.data.getVar('PRSERV_DUMPFILE', True))
+    elif isinstance(e, bb.event.ParseCompleted):
+        import oe.prservice
+        #dump meta info of tables
+        d = e.data.createCopy()
+        d.setVar('PRSERV_DUMPOPT_COL', "1")
+        retval = oe.prservice.prserv_dump_db(d)
+        if not retval:
+            bb.error("prexport_handler: export failed!")
+            return
+        (metainfo, datainfo) = retval
+        oe.prservice.prserv_export_tofile(d, metainfo, None, True)
+
+}
+
+addhandler prexport_handler
diff --git a/meta/classes/primport.bbclass b/meta/classes/primport.bbclass
new file mode 100644
index 0000000..08e5a8f
--- /dev/null
+++ b/meta/classes/primport.bbclass
@@ -0,0 +1,17 @@
+python primport_handler () {
+    import bb.event
+    if not e.data:
+        return
+
+    if isinstance(e, bb.event.ParseCompleted):
+        import oe.prservice
+        #import all exported AUTOPR values
+        imported = oe.prservice.prserv_import_db(e.data)
+        if imported is None:
+            bb.fatal("import failed!")
+
+        for (version, pkgarch, checksum, value) in imported:
+            bb.note("imported (%s,%s,%s,%d)" % (version, pkgarch, checksum, value))
+}
+
+addhandler primport_handler
diff --git a/meta/classes/prserv.bbclass b/meta/classes/prserv.bbclass
index 18b8589..0825306 100644
--- a/meta/classes/prserv.bbclass
+++ b/meta/classes/prserv.bbclass
@@ -1,29 +1,21 @@
-def prserv_make_conn(d):
-    import prserv.serv
-    host=d.getVar("PRSERV_HOST",True)
-    port=d.getVar("PRSERV_PORT",True)
-    try:
-        conn=None
-        conn=prserv.serv.PRServerConnection(host,int(port))
-        d.setVar("__PRSERV_CONN",conn)
-    except Exception, exc:
-        bb.fatal("Connecting to PR service %s:%s failed: %s" % (host, port, str(exc)))
-
-    return conn
-
 def prserv_get_pr_auto(d):
-    if d.getVar('USE_PR_SERV', True) != "0":
+    import oe.prservice
+    if d.getVar('USE_PR_SERV', True) != "1":
         bb.warn("Not using network based PR service")
         return None
 
-    conn=d.getVar("__PRSERV_CONN", True)
-    if conn is None:
-        conn=prserv_make_conn(d)
+    version = d.getVar("PRAUTOINX", True)
+    pkgarch = d.getVar("PACKAGE_ARCH", True)
+    checksum = d.getVar("BB_TASKHASH", True)
+
+    if d.getVar('PRSERV_LOCKDOWN', True):
+        auto_rev = d.getVar('PRAUTO_' + version + '_' + pkgarch, True) or d.getVar('PRAUTO_' + version, True) or None
+    else:
+        conn = d.getVar("__PRSERV_CONN", True)
         if conn is None:
-            return None
+            conn = oe.prservice.prserv_make_conn(d)
+            if conn is None:
+                return None
+        auto_rev = conn.getPR(version, pkgarch, checksum)
 
-    version=d.getVar("PF", True)
-    checksum=d.getVar("BB_TASKHASH", True)
-    auto_rev=conn.getPR(version,checksum)
-    bb.debug(1,"prserv_get_pr_auto: version: %s checksum: %s result %d" % (version, checksum, auto_rev))
     return auto_rev
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 336b1d7..43eedad 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -190,7 +190,7 @@ BP = "${BPN}-${PV}"
 #
 # network based PR service
 #
-USE_PR_SERV = "${@[1,0][(d.getVar('PRSERV_HOST',1) is None) or (d.getVar('PRSERV_PORT',1) is None)]}"
+USE_PR_SERV = "${@[1,0][((not d.getVar('PRSERV_HOST', True)) or (not d.getVar('PRSERV_PORT', True))) and (not d.getVar('PRSERV_LOCKDOWN', True))]}"
 
 # Package info.
 
@@ -732,7 +732,7 @@ BB_CONSOLELOG = "${TMPDIR}/cooker.log.${DATETIME}"
 # Setup our default hash policy
 BB_SIGNATURE_HANDLER ?= "basic"
 BB_HASHTASK_WHITELIST ?= "(.*-cross$|.*-native$|.*-cross-initial$|.*-cross-intermediate$|^virtual:native:.*|^virtual:nativesdk:.*)"
-BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE"
+BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN"
 
 MLPREFIX ??= ""
 MULTILIB_VARIANTS ??= ""
diff --git a/meta/conf/prexport.conf b/meta/conf/prexport.conf
new file mode 100644
index 0000000..12f3acb
--- /dev/null
+++ b/meta/conf/prexport.conf
@@ -0,0 +1 @@
+INHERIT += "prexport"
diff --git a/meta/conf/primport.conf b/meta/conf/primport.conf
new file mode 100644
index 0000000..d94ea1b
--- /dev/null
+++ b/meta/conf/primport.conf
@@ -0,0 +1 @@
+INHERIT += "primport"
diff --git a/meta/lib/oe/prservice.py b/meta/lib/oe/prservice.py
new file mode 100644
index 0000000..fa6718e
--- /dev/null
+++ b/meta/lib/oe/prservice.py
@@ -0,0 +1,113 @@
+import bb
+
+def prserv_make_conn(d):
+    import prserv.serv
+    host = d.getVar("PRSERV_HOST",True)
+    port = d.getVar("PRSERV_PORT",True)
+    try:
+        conn = None
+        conn = prserv.serv.PRServerConnection(host,int(port))
+        d.setVar("__PRSERV_CONN",conn)
+    except Exception, exc:
+        bb.fatal("Connecting to PR service %s:%s failed: %s" % (host, port, str(exc)))
+
+    return conn
+
+def prserv_dump_db(d):
+    if d.getVar('USE_PR_SERV', True) != "1":
+        bb.error("Not using network based PR service")
+        return None
+
+    conn = d.getVar("__PRSERV_CONN", True)
+    if conn is None:
+        conn = prserv_make_conn(d)
+        if conn is None:
+            bb.error("Making connection failed to remote PR service")
+            return None
+
+    #dump db
+    opt_version = d.getVar('PRSERV_DUMPOPT_VERSION', True)
+    opt_pkgarch = d.getVar('PRSERV_DUMPOPT_PKGARCH', True)
+    opt_checksum = d.getVar('PRSERV_DUMPOPT_CHECKSUM', True)
+    opt_col = ("1" == d.getVar('PRSERV_DUMPOPT_COL', True))
+    return conn.export(opt_version, opt_pkgarch, opt_checksum, opt_col)
+
+def prserv_import_db(d, filter_version=None, filter_pkgarch=None, filter_checksum=None):
+    if d.getVar('USE_PR_SERV', True) != "1":
+        bb.error("Not using network based PR service")
+        return None
+
+    conn = d.getVar("__PRSERV_CONN", True)
+    if conn is None:
+        conn = prserv_make_conn(d)
+        if conn is None:
+            bb.error("Making connection failed to remote PR service")
+            return None
+    #get the entry values
+    imported = []
+    prefix = "PRAUTO$"
+    for v in d.keys():
+        if v.startswith(prefix):
+            (remain, sep, checksum) = v.rpartition('$')
+            (remain, sep, pkgarch) = remain.rpartition('$')
+            (remain, sep, version) = remain.rpartition('$')
+            if (remain + '$' != prefix) or \
+               (filter_version and filter_version != version) or \
+               (filter_pkgarch and filter_pkgarch != pkgarch) or \
+               (filter_checksum and filter_checksum != checksum):
+               continue
+            try:
+                value = int(d.getVar(remain + '$' + version + '$' + pkgarch + '$' + checksum, True))
+            except BaseException as exc:
+                bb.debug("Not valid value of %s:%s" % (v,str(exc)))
+                continue
+            ret = conn.importone(version,pkgarch,checksum,value)
+            if ret != value:
+                bb.error("importing(%s,%s,%s,%d) failed. DB may have larger value %d" % (version,pkgarch,checksum,value,ret))
+            else:
+               imported.append((version,pkgarch,checksum,value))
+    return imported
+
+def prserv_export_tofile(d, metainfo, datainfo, lockdown, nomax=False):
+    import bb.utils
+    #initilize the output file
+    bb.utils.mkdirhier(d.getVar('PRSERV_DUMPDIR', True))
+    df = d.getVar('PRSERV_DUMPFILE', True)
+    #write data
+    lf = bb.utils.lockfile("%s.lock" % df)
+    f = open(df, "a")
+    if metainfo:
+        #dump column info 
+        f.write("#PR_core_ver = \"%s\"\n\n" % metainfo['core_ver']);
+        f.write("#Table: %s\n" % metainfo['tbl_name'])
+        f.write("#Columns:\n")
+        f.write("#name      \t type    \t notn    \t dflt    \t pk\n")
+        f.write("#----------\t --------\t --------\t --------\t ----\n")
+        for i in range(len(metainfo['col_info'])):
+            f.write("#%10s\t %8s\t %8s\t %8s\t %4s\n" % 
+                    (metainfo['col_info'][i]['name'], 
+                     metainfo['col_info'][i]['type'], 
+                     metainfo['col_info'][i]['notnull'], 
+                     metainfo['col_info'][i]['dflt_value'], 
+                     metainfo['col_info'][i]['pk']))
+        f.write("\n")
+
+    if lockdown:
+        f.write("PRSERV_LOCKDOWN = \"1\"\n\n")
+
+    if datainfo:
+        idx = {}
+        for i in range(len(datainfo)):
+            pkgarch = datainfo[i]['pkgarch']
+            value = datainfo[i]['value']
+            if not idx.has_key(pkgarch):
+                idx[pkgarch] = i
+            elif value > datainfo[idx[pkgarch]]['value']:
+                idx[pkgarch] = i
+            f.write("PRAUTO$%s$%s$%s = \"%s\"\n" % 
+                (str(datainfo[i]['version']), pkgarch, str(datainfo[i]['checksum']), str(value)))
+        if not nomax:
+            for i in idx:
+                f.write("PRAUTO_%s_%s = \"%s\"\n" % (str(datainfo[idx[i]]['version']),str(datainfo[idx[i]]['pkgarch']),str(datainfo[idx[i]]['value'])))
+    f.close()
+    bb.utils.unlockfile(lf)
diff --git a/scripts/bitbake-prserv-tool b/scripts/bitbake-prserv-tool
new file mode 100755
index 0000000..6c0584c
--- /dev/null
+++ b/scripts/bitbake-prserv-tool
@@ -0,0 +1,57 @@
+#!/usr/bin/env bash
+
+help ()
+{
+    base=`basename $0`
+    echo -e "Usage: $base command"
+    echo "Avaliable commands:"
+    echo -e "\texport <file>: export and lock down the AUTOPR values from the PR service into a file for release."
+    echo -e "\timport <file>: import the AUTOPR values from the exported file into the PR service."
+}
+
+export ()
+{
+    file=$1
+    [ "x${file}" == "x" ] && help && exit 1
+    rm -f ${file}
+
+    touch dummy.inc
+    bitbake -R conf/prexport.conf -R dummy.inc -p
+    s=`bitbake -R conf/prexport.conf -R dummy.inc -e | grep ^PRSERV_DUMPFILE= | cut -f2 -d\"`
+    rm -f dummy.inc
+    if [ "x${s}" != "x" ];
+    then
+       [ -e $s ] && mv -f $s $file && echo "Exporting to file $file succeeded!"
+       return 0
+    fi
+    echo "Exporting to file $file failed!"
+    return 1
+}
+
+import ()
+{
+    file=$1
+    [ "x${file}" == "x" ] && help && exit 1
+
+    touch dummy.inc
+    bitbake -R conf/primport.conf -R dummy.inc -R $file -p
+    ret=$?
+    rm -f dummy.inc
+    [ $ret -eq 0 ] && echo "Importing from file $file succeeded!" || echo "Importing from file $file failed!"
+    return $ret
+}
+
+[ $# -eq 0 ] && help  && exit 1
+
+case $1 in
+export)
+    export $2
+    ;;
+import)
+    import $2
+    ;;
+*)
+    help
+    exit 1
+    ;;
+esac
-- 
1.7.6.5




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

* [CONSOLIDATED PULL 5/5] package.bbclass: per recipe PRSERV_HOST support
  2012-01-11  7:36 [CONSOLIDATED PULL 0/5] final items for M2 RC1 Saul Wold
                   ` (3 preceding siblings ...)
  2012-01-11  7:36 ` [CONSOLIDATED PULL 4/5] meta/PRService: Added export/import fuctions Saul Wold
@ 2012-01-11  7:36 ` Saul Wold
  2012-01-11 10:40 ` [CONSOLIDATED PULL 0/5] final items for M2 RC1 Richard Purdie
  5 siblings, 0 replies; 10+ messages in thread
From: Saul Wold @ 2012-01-11  7:36 UTC (permalink / raw)
  To: openembedded-core

From: Lianhao Lu <lianhao.lu@intel.com>

[YOCTO #1126]
Added per recipe PRSERV_HOST PRSERV_PORT support.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
---
 meta/classes/package.bbclass |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 65e6571..f8f0a12 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -350,6 +350,14 @@ def runtime_mapping_rename (varname, d):
 #
 
 python package_get_auto_pr() {
+	# per recipe PRSERV_HOST PRSERV_PORT
+	pn = d.getVar('PN', True)
+	host = d.getVar("PRSERV_HOST_" + pn, True)
+	port = d.getVar("PRSERV_PORT_" + pn, True)
+	if not (host is None):
+		d.setVar("PRSERV_HOST", host)
+	if not (port is None):
+		d.setVar("PRSERV_PORT", port)
 	if d.getVar('USE_PR_SERV', True) != "0":
 		try:
 			auto_pr=prserv_get_pr_auto(d)
-- 
1.7.6.5




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

* Re: [CONSOLIDATED PULL 1/5] hdparm: upgrade to 9.37
  2012-01-11  7:36 ` [CONSOLIDATED PULL 1/5] hdparm: upgrade to 9.37 Saul Wold
@ 2012-01-11  9:38   ` Paul Menzel
  0 siblings, 0 replies; 10+ messages in thread
From: Paul Menzel @ 2012-01-11  9:38 UTC (permalink / raw)
  To: openembedded-core

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

Dear Shane,


Am Dienstag, den 10.01.2012, 23:36 -0800 schrieb Saul Wold:
> From: Shane Wang <shane.wang@intel.com>
> 
> Because hdparm depends on stat, stat is brought into Yocto, and it is a new dependency.

please split this patch up and send a separate patch to include stat and
adhere to the guidelines on what information is to provided (like commit
IDs) in the commit message.

> Part of this patch comes from oe

OE-Classic

> http://git.openembedded.org/openembedded/tree/recipes/hdparm, and
> http://git.openembedded.org/openembedded/tree/recipes/stat.
> But, changes include:
>    - upgrade to the latest version 9.37 from 9.35.
>    - added license checksum for both recipes.
>    - for hdparm, the license for wiper which is in hdparm is GPLv2.
> 
> Signed-off-by: Shane Wang <shane.wang@intel.com>
> ---
>  .../recipes-extended/hdparm/hdparm-6.3/bswap.patch |   37 --------------------
>  .../hdparm/hdparm-6.3/uclibc.patch                 |   34 ------------------
>  meta/recipes-extended/hdparm/hdparm_6.3.bb         |   18 ---------
>  meta/recipes-extended/hdparm/hdparm_9.37.bb        |   36 +++++++++++++++++++
>  meta/recipes-extended/stat/stat_3.3.bb             |   27 ++++++++++++++
>  5 files changed, 63 insertions(+), 89 deletions(-)
>  delete mode 100644 meta/recipes-extended/hdparm/hdparm-6.3/bswap.patch
>  delete mode 100644 meta/recipes-extended/hdparm/hdparm-6.3/uclibc.patch
>  delete mode 100644 meta/recipes-extended/hdparm/hdparm_6.3.bb
>  create mode 100644 meta/recipes-extended/hdparm/hdparm_9.37.bb
>  create mode 100644 meta/recipes-extended/stat/stat_3.3.bb
> 
> diff --git a/meta/recipes-extended/hdparm/hdparm-6.3/bswap.patch b/meta/recipes-extended/hdparm/hdparm-6.3/bswap.patch
> deleted file mode 100644
> index 715886a..0000000
> --- a/meta/recipes-extended/hdparm/hdparm-6.3/bswap.patch
> +++ /dev/null
> @@ -1,37 +0,0 @@
> -Upstream-Status: Backport
> -
> -#
> -# Patch managed by http://www.holgerschurig.de/patcher.html
> -#
> -
> ---- hdparm-5.8/hdparm.c~bswap
> -+++ hdparm-5.8/hdparm.c
> -@@ -20,7 +20,9 @@
> - #include <linux/types.h>
> - #include <linux/hdreg.h>
> - #include <linux/major.h>
> --#include <asm/byteorder.h>
> -+#include <byteswap.h>
> -+
> -+#define le16_to_cpus(x) bswap_16(htons(x))
> - 
> - #include "hdparm.h"
> - 
> -@@ -1160,7 +1162,7 @@
> - 			}
> - 		} else {
> - 			for(i = 0; i < 0x100; ++i) {
> --				__le16_to_cpus(&id[i]);
> -+				le16_to_cpus(&id[i]);
> - 			}
> - 			identify((void *)id, NULL);
> - 		}
> -@@ -1380,7 +1382,7 @@
> - 	}
> - 	for (i = 0; count >= 4; ++i) {
> - 		sbuf[i] = (fromhex(b[0]) << 12) | (fromhex(b[1]) << 8) | (fromhex(b[2]) << 4) | fromhex(b[3]);
> --		__le16_to_cpus((__u16 *)(&sbuf[i]));
> -+		le16_to_cpus((__u16 *)(&sbuf[i]));
> - 		b += 5;
> - 		count -= 5;
> - 	}
> diff --git a/meta/recipes-extended/hdparm/hdparm-6.3/uclibc.patch b/meta/recipes-extended/hdparm/hdparm-6.3/uclibc.patch
> deleted file mode 100644
> index d5f9298..0000000
> --- a/meta/recipes-extended/hdparm/hdparm-6.3/uclibc.patch
> +++ /dev/null
> @@ -1,34 +0,0 @@
> -Upstream-Status: Inappropriate [embedded specific]
> -
> ---- hdparm-5.8/hdparm.c.ark	2005-05-22 19:48:34.000000000 +0000
> -+++ hdparm-5.8/hdparm.c	2005-05-22 19:52:18.000000000 +0000
> -@@ -17,7 +17,9 @@
> - #include <sys/times.h>
> - #include <sys/types.h>
> - #include <sys/mount.h>
> -+#ifndef __UCLIBC__
> - #include <linux/types.h>
> -+#endif
> - #include <linux/hdreg.h>
> - #include <linux/major.h>
> - #include <byteswap.h>
> ---- hdparm-5.8/hdparm.h.ark	2005-05-22 19:51:49.000000000 +0000
> -+++ hdparm-5.8/hdparm.h	2005-05-22 19:54:54.000000000 +0000
> -@@ -1,6 +1,6 @@
> - /* Some prototypes for extern functions. */
> - 
> --#include <linux/types.h>	/* for __u16 */
> -+#include <stdint.h>
> - 
> - #if !defined(__GNUC__) && !defined(__attribute__)
> - #define __attribute__(x)	/* if not using GCC, turn off the __attribute__
> -@@ -11,7 +11,7 @@
> -    others, though, were declared in hdparm.c with global scope; since other
> -    functions in that file have static (file) scope, I assume the difference is
> -    intentional. */
> --extern void identify (__u16 *id_supplied, const char *devname);
> -+extern void identify (uint16_t *id_supplied, const char *devname);
> - 
> - extern void usage_error(int out)    __attribute__((noreturn));
> - extern int main(int argc, char **argv) __attribute__((noreturn));
> -
> diff --git a/meta/recipes-extended/hdparm/hdparm_6.3.bb b/meta/recipes-extended/hdparm/hdparm_6.3.bb
> deleted file mode 100644
> index 62ae4c0..0000000
> --- a/meta/recipes-extended/hdparm/hdparm_6.3.bb
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -SUMMARY = "Utility for displaying and setting hard disk parameters"
> -DESCRIPTION = "hdparm is a system utility for viewing \
> -and manipulating various IDE drive and driver parameters."
> -SECTION = "console/utils"
> -LICENSE = "BSD"
> -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=910a8a42c962d238619c75fdb78bdb24"
> -
> -SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/hdparm-${PV}.tar.gz \
> -	   file://bswap.patch \
> -	   file://uclibc.patch"
> -
> -SRC_URI[md5sum] = "0c12672f3a09c14ad0b0882f15fc9389"
> -SRC_URI[sha256sum] = "08688a6a46ba495494bf838f8f26103e797584c1888eca94e43a171e1b37246d"
> -
> -do_install () {
> -	install -d ${D}/${sbindir} ${D}/${mandir}/man8
> -	oe_runmake 'DESTDIR=${D}' install
> -}
> diff --git a/meta/recipes-extended/hdparm/hdparm_9.37.bb b/meta/recipes-extended/hdparm/hdparm_9.37.bb
> new file mode 100644
> index 0000000..bfc64e7
> --- /dev/null
> +++ b/meta/recipes-extended/hdparm/hdparm_9.37.bb
> @@ -0,0 +1,36 @@
> +DESCRIPTION = "hdparm is a Linux shell utility for viewing \
> +and manipulating various IDE drive and driver parameters."
> +SECTION = "console/utils"
> +PRIORITY = "optional"
> +LICENSE = "BSD"
> +LICENSE_wiper = "GPLv2"
> +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=910a8a42c962d238619c75fdb78bdb24 \
> +                    file://debian/copyright;md5=a82d7ba3ade9e8ec902749db98c592f3 \
> +                    file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \
> +                    file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09"
> +
> +PACKAGES += "wiper"
> +
> +FILES_wiper = "${bindir}/wiper.sh"
> +FILES_${PN} = "${base_sbindir} ${mandir}"
> +
> +RDEPENDS_wiper = "bash gawk stat"
> +
> +SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/hdparm-${PV}.tar.gz "
> +SRC_URI[md5sum] = "0bb94ddd1bedd5c02b1ca62f1caaf6de"
> +SRC_URI[sha256sum] = "87ede0a7cb5b4de500748232e9d251b75acfccce078e1d42c8d125b9e5b4ccd3"
> +
> +do_install () {
> +	install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir}
> +	oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install
> +	mv ${D}${base_sbindir}/hdparm ${D}${base_sbindir}/hdparm.${PN}
> +	cp ${S}/wiper/wiper.sh ${D}/${bindir}
> +}
> +
> +pkg_postinst_${PN} () {
> +	update-alternatives --install ${base_sbindir}/hdparm hdparm hdparm.${PN} 100
> +}
> +
> +pkg_prerm_${PN} () {
> +	update-alternatives --remove hdparm hdparm.${PN}
> +}
> diff --git a/meta/recipes-extended/stat/stat_3.3.bb b/meta/recipes-extended/stat/stat_3.3.bb
> new file mode 100644
> index 0000000..aa21e75
> --- /dev/null
> +++ b/meta/recipes-extended/stat/stat_3.3.bb
> @@ -0,0 +1,27 @@
> +SECTION = "console/utils"
> +DESCRIPTION = "Display all information about a file that the stat() call provides and all information a filesystem that statfs() provides."
> +LICENSE = "GPLv2"
> +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=39886b077fd072e876e5c4c16310b631 \
> +                    file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f"
> +
> +BBCLASSEXTEND = "native"
> +
> +PR = "r1"

Start with `r0` please.

> +
> +SRC_URI = "ftp://metalab.unc.edu/pub/Linux/utils/file/stat-3.3.tar.gz"
> +SRC_URI[md5sum] = "37e247e8e400ad9205f1b0500b728fd3"
> +SRC_URI[sha256sum] = "7071f0384a423a938dd542c1f08547a02824f6359acd3ef3f944b2c4c2d1ee09"
> +
> +do_install() {
> +	install -d ${D}${bindir} ${D}${mandir}/man1
> +	install -m 755 stat ${D}${bindir}
> +	install -m 644 stat.1 ${D}${mandir}/man1
> +}
> +
> +#do_install_virtclass-native() {
> +#	install -d ${D}${bindir}
> +#	install -m 755 stat ${D}${bindir}
> +#}
> +
> +NATIVE_INSTALL_WORKS = "1"
> +

No new line at the end please.


Thanks,

Paul

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [CONSOLIDATED PULL 0/5] final items for M2 RC1
  2012-01-11  7:36 [CONSOLIDATED PULL 0/5] final items for M2 RC1 Saul Wold
                   ` (4 preceding siblings ...)
  2012-01-11  7:36 ` [CONSOLIDATED PULL 5/5] package.bbclass: per recipe PRSERV_HOST support Saul Wold
@ 2012-01-11 10:40 ` Richard Purdie
  2012-01-11 16:45   ` Saul Wold
  5 siblings, 1 reply; 10+ messages in thread
From: Richard Purdie @ 2012-01-11 10:40 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, 2012-01-10 at 23:36 -0800, Saul Wold wrote:
> Richard,
> 
> Here are the final items we discussed yesterday, a succesful
> build finished, and we seem to be in good shape, please pull 
> these early in your day and fire up AB Master is you can.
> 
> 
> Thanks
> 	Sau!
> 
> 
> The following changes since commit 9b944ae2f0e4dbac5a8f1f235f60730e56b26516:
> 
>   Revert "site/common-uclibc: Cache gl_cv_func_wcwidth_works" (2012-01-10 18:32:16 +0000)
> 
> are available in the git repository at:
>   git://git.openembedded.org/openembedded-core-contrib sgw/stage
>   http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=sgw/stage
> 
> Lianhao Lu (2):
>   meta/PRService: Added export/import fuctions.
>   package.bbclass: per recipe PRSERV_HOST support
> 
> Robert Yang (2):
>   Incremental rpm image generation
>   Incremental rpm image generation(Add config sample)

I merged these, thanks.

> Shane Wang (1):
>   hdparm: upgrade to 9.37

This one needs to be split up as Paul points out...

Cheers,

Richard




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

* Re: [CONSOLIDATED PULL 0/5] final items for M2 RC1
  2012-01-11 10:40 ` [CONSOLIDATED PULL 0/5] final items for M2 RC1 Richard Purdie
@ 2012-01-11 16:45   ` Saul Wold
  2012-01-11 17:07     ` Koen Kooi
  0 siblings, 1 reply; 10+ messages in thread
From: Saul Wold @ 2012-01-11 16:45 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 01/11/2012 02:40 AM, Richard Purdie wrote:
> On Tue, 2012-01-10 at 23:36 -0800, Saul Wold wrote:
>> Richard,
>>
>> Here are the final items we discussed yesterday, a succesful
>> build finished, and we seem to be in good shape, please pull
>> these early in your day and fire up AB Master is you can.
>>
>>
>> Thanks
>> 	Sau!
>>
>>
>> The following changes since commit 9b944ae2f0e4dbac5a8f1f235f60730e56b26516:
>>
>>    Revert "site/common-uclibc: Cache gl_cv_func_wcwidth_works" (2012-01-10 18:32:16 +0000)
>>
>> are available in the git repository at:
>>    git://git.openembedded.org/openembedded-core-contrib sgw/stage
>>    http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=sgw/stage
>>
>> Lianhao Lu (2):
>>    meta/PRService: Added export/import fuctions.
>>    package.bbclass: per recipe PRSERV_HOST support
>>
>> Robert Yang (2):
>>    Incremental rpm image generation
>>    Incremental rpm image generation(Add config sample)
>
> I merged these, thanks.
>
>> Shane Wang (1):
>>    hdparm: upgrade to 9.37
>
> This one needs to be split up as Paul points out...
>
Ok, but one question about bisect-ability, if they are split and the 
hdparm is in one side of a bisect without the new stat package, doesn't 
that break the bisect ability "rule"?

Sau!

> Cheers,
>
> Richard
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>



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

* Re: [CONSOLIDATED PULL 0/5] final items for M2 RC1
  2012-01-11 16:45   ` Saul Wold
@ 2012-01-11 17:07     ` Koen Kooi
  0 siblings, 0 replies; 10+ messages in thread
From: Koen Kooi @ 2012-01-11 17:07 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


Op 11 jan. 2012, om 17:45 heeft Saul Wold het volgende geschreven:

> On 01/11/2012 02:40 AM, Richard Purdie wrote:
>> On Tue, 2012-01-10 at 23:36 -0800, Saul Wold wrote:
>>> Richard,
>>> 
>>> Here are the final items we discussed yesterday, a succesful
>>> build finished, and we seem to be in good shape, please pull
>>> these early in your day and fire up AB Master is you can.
>>> 
>>> 
>>> Thanks
>>> 	Sau!
>>> 
>>> 
>>> The following changes since commit 9b944ae2f0e4dbac5a8f1f235f60730e56b26516:
>>> 
>>>   Revert "site/common-uclibc: Cache gl_cv_func_wcwidth_works" (2012-01-10 18:32:16 +0000)
>>> 
>>> are available in the git repository at:
>>>   git://git.openembedded.org/openembedded-core-contrib sgw/stage
>>>   http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=sgw/stage
>>> 
>>> Lianhao Lu (2):
>>>   meta/PRService: Added export/import fuctions.
>>>   package.bbclass: per recipe PRSERV_HOST support
>>> 
>>> Robert Yang (2):
>>>   Incremental rpm image generation
>>>   Incremental rpm image generation(Add config sample)
>> 
>> I merged these, thanks.
>> 
>>> Shane Wang (1):
>>>   hdparm: upgrade to 9.37
>> 
>> This one needs to be split up as Paul points out...
>> 
> Ok, but one question about bisect-ability, if they are split and the hdparm is in one side of a bisect without the new stat package, doesn't that break the bisect ability "rule"?

That's why you add the stat recipe first.


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

end of thread, other threads:[~2012-01-11 17:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-11  7:36 [CONSOLIDATED PULL 0/5] final items for M2 RC1 Saul Wold
2012-01-11  7:36 ` [CONSOLIDATED PULL 1/5] hdparm: upgrade to 9.37 Saul Wold
2012-01-11  9:38   ` Paul Menzel
2012-01-11  7:36 ` [CONSOLIDATED PULL 2/5] Incremental rpm image generation Saul Wold
2012-01-11  7:36 ` [CONSOLIDATED PULL 3/5] Incremental rpm image generation(Add config sample) Saul Wold
2012-01-11  7:36 ` [CONSOLIDATED PULL 4/5] meta/PRService: Added export/import fuctions Saul Wold
2012-01-11  7:36 ` [CONSOLIDATED PULL 5/5] package.bbclass: per recipe PRSERV_HOST support Saul Wold
2012-01-11 10:40 ` [CONSOLIDATED PULL 0/5] final items for M2 RC1 Richard Purdie
2012-01-11 16:45   ` Saul Wold
2012-01-11 17:07     ` Koen Kooi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.