Skip to contentSkip to conversation

self-hosted-image: the first set of patch

PATCH In review Dexuan Cui 3 participants 12 messages Nov 24, 2011 – Nov 29, 2011

lore
Share & tools
lore

Dexuan Cui

author
#0 lore raw

cover self-hosted-image: the first set of patch

This is the first patchset for the task Build Applianc: self-hosted-image:
https://wiki.yoctoproject.org/wiki/Build_Appliance_Design

The only notable issue left is:
there is an eglibc_initial do_insall failure that seems be caused by make-3.82. If we downgrade to make-3.81(the hacking patch is at
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=gzhai/build-appliance&id=981a37e3e031e7c96361c1c170050ab3cdbadf6c),
"bitbake core-image-minimal" in the target can build fine. The built image can run fine with host's qemu (in target, runqemu doesn't work yet as at least sudo is absent -- we're fixing this).

The above patchset was done by the Build Appliance development team, including Saul, Edwin and me.

Though there are still some known issues, now we want to share the patches. Please review, comment and merge them(if they seem good :-).

Thanks!

-- Dexuan, on behalf of the team

The following changes since commit dc2d701207435b0dbd521a11d152f11d0f18d11e:

apt: Fix locale header and hardcoded libname issues (2011-11-23 23:41:09 +0000)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib dcui/self-hosted-v2
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dcui/self-hosted-v2

Dexuan Cui (2):
gcc-package-target.inc: add the symbol link /lib/cpp
coreutils: build and install hostname

Saul Wold (2):
runqemu: look for *image* to be more flexible for image names Self Hosted Image: Added Task and Images

 .../coreutils/coreutils-8.14/disable_doc_man.patch |   36 ++++
 meta/recipes-core/coreutils/coreutils_8.14.bb      |    9 +-
 meta/recipes-core/images/self-hosted-image.bb      |   11 ++
 meta/recipes-core/tasks/task-self-hosted.bb        |  174 ++++++++++++++++++++
 meta/recipes-devtools/gcc/gcc-4.6.inc              |    2 +-
 meta/recipes-devtools/gcc/gcc-package-target.inc   |    2 +
 scripts/runqemu                                    |    4 +-
 7 files changed, 231 insertions(+), 7 deletions(-)
 create mode 100644 meta/recipes-core/coreutils/coreutils-8.14/disable_doc_man.patch
 create mode 100644 meta/recipes-core/images/self-hosted-image.bb
 create mode 100644 meta/recipes-core/tasks/task-self-hosted.bb
Signature · 1 line
1.7.6
author
#1 lore raw

PATCH 1/4 runqemu: look for *image* to be more flexible for image names

From: Saul Wold <[email protected]>

---
 scripts/runqemu |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
scripts/runqemu +2 -2
index 31e9822..a9a362f 100755
@@ -114,7 +114,7 @@ while [ $i -le $# ]; do
                 usage
             fi
             ;;
-        *-image-*)
+        *image*)
             if [ -z "$ROOTFS" ]; then
                 if [ -f "$arg" ]; then
                     process_filename $arg
@@ -307,7 +307,7 @@ findimage() {
 
     # Sort rootfs candidates by modification time - the most
     # recently created one is the one we most likely want to boot.
-    filenames=`ls -t $where/*core-image*$machine.$extension 2>/dev/null | xargs`
+    filenames=`ls -t $where/*image*$machine.$extension 2>/dev/null | xargs`
     for name in $filenames; do
         if [[ "$name" =~ core-image-sato-sdk ||
               "$name" =~ core-image-sato     ||
Signature · 1 line
1.7.6
#2 lore raw

Re: [PATCH 1/4] runqemu: look for *image* to be more flexible for image names

Quoted 12 lines · Dexuan Cui

From: Saul Wold <[email protected]>

---
 scripts/runqemu |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
scripts/runqemu +0 -0
index 31e9822..a9a362f 100755

scripts/runqemu while [ $i -le $# ]; do · line 120

Quoted 8 lines
scripts/runqemu +1 -1
@@ -114,7 +114,7 @@ while [ $i -le $# ]; do
                 usage
             fi
             ;;
-        *-image-*)
+        *image*)
             if [ -z "$ROOTFS" ]; then
                 if [ -f "$arg" ]; then
                     process_filename $arg

As I mentioned to Saul, this is a bad idea since its very close to matching things like bzImage. I seem to remember something with a *image* name being in deploy before and having problems with that.

Cheers,

Richard

author
#3 lore raw

PATCH 2/4 gcc-package-target.inc: add the symbol link /lib/cpp

In reply to Dexuan Cui
---
 meta/recipes-devtools/gcc/gcc-4.6.inc            |    2 +-
 meta/recipes-devtools/gcc/gcc-package-target.inc |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
meta/recipes-devtools/gcc/gcc-4.6.inc +1 -1
index 7bf14e3..7cd0850 100644
@@ -1,6 +1,6 @@
 require gcc-common.inc
 
-PR = "r17"
+PR = "r18"
 
 # Third digit in PV should be incremented after a minor release
 # happens from this branch on gcc e.g. currently its 4.6.0
meta/recipes-devtools/gcc/gcc-package-target.inc +2 -0
index f0f1a04..3076670 100644
@@ -122,6 +122,8 @@ do_install () {
 	ln -sf ${TARGET_PREFIX}g++ g++
 	ln -sf ${TARGET_PREFIX}gcc gcc
 	ln -sf ${TARGET_PREFIX}cpp cpp
+	install -d ${D}${base_libdir}
+	ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp
 	ln -sf g++ c++
 	ln -sf gcc cc
 
Signature · 1 line
1.7.6
#4 lore raw

Re: [PATCH 2/4] gcc-package-target.inc: add the symbol link /lib/cpp

Quoted 23 lines · Dexuan Cui
---
 meta/recipes-devtools/gcc/gcc-4.6.inc            |    2 +-
 meta/recipes-devtools/gcc/gcc-package-target.inc |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
meta/recipes-devtools/gcc/gcc-4.6.inc +1 -1
index 7bf14e3..7cd0850 100644
@@ -1,6 +1,6 @@
 require gcc-common.inc
 
-PR = "r17"
+PR = "r18"
 
 # Third digit in PV should be incremented after a minor release
 # happens from this branch on gcc e.g. currently its 4.6.0
meta/recipes-devtools/gcc/gcc-package-target.inc +0 -0
index f0f1a04..3076670 100644

meta/recipes-devtools/gcc/gcc-package-target.inc do_install () { · line 128

Quoted 7 lines
meta/recipes-devtools/gcc/gcc-package-target.inc +2 -0
@@ -122,6 +122,8 @@ do_install () {
 	ln -sf ${TARGET_PREFIX}g++ g++
 	ln -sf ${TARGET_PREFIX}gcc gcc
 	ln -sf ${TARGET_PREFIX}cpp cpp
+	install -d ${D}${base_libdir}
+	ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp
 	ln -sf g++ c++
 	ln -sf gcc cc

Why do we need this change?

Cheers,

Richard

#5 lore raw

Re: [PATCH 2/4] gcc-package-target.inc: add the symbol link /lib/cpp

Richard Purdie wrote on 2011-11-24:

Quoted 5 lines · Dexuan Cui
Quoted 4 lines
meta/recipes-devtools/gcc/gcc-package-target.inc +0 -0
@@ -122,6 +122,8 @@ do_install () {
 	ln -sf ${TARGET_PREFIX}g++ g++
Quoted 8 lines

meta/recipes-devtools/gcc/gcc-package-target.inc do_install () { · line 128

Quoted 6 lines
meta/recipes-devtools/gcc/gcc-package-target.inc +2 -0
 	ln -sf ${TARGET_PREFIX}gcc gcc
 	ln -sf ${TARGET_PREFIX}cpp cpp
+	install -d ${D}${base_libdir}
+	ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp
 	ln -sf g++ c++
 	ln -sf gcc cc

Why do we need this change?

When I was trying self-hosted-image, eglibc's do_install failed in the target:
ERROR: cannot stat bootparam_prot.h: the cause is: rpcgen doesn't work properly: rpcgen can't exec /lib/cpp since it doesn't exist.

According to http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/lib.html, "if a C preprocessor is installed, /lib/cpp must be a reference to it, for historical reasons. The usual placement of this binary is /usr/bin/cpp".

Typical distros, like Ubuntu, openSuSE, Fedora, RHEL, all comply with the rule.

Actually in meta/recipes-devtools/gcc/gcc-package-target.inc, we do try to package ${base_libdir}/cpp:
FILES_cpp = "\
${bindir}/${TARGET_PREFIX}cpp \
${base_libdir}/cpp \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
But unluckily we didn't to create a symbol link in do_install. This patch adds the symbol link.

Thanks,
-- Dexuan

#6 lore raw

Re: [PATCH 2/4] gcc-package-target.inc: add the symbol link /lib/cpp

Quoted 19 lines · Dexuan

Richard Purdie wrote on 2011-11-24:

Quoted 5 lines · Dexuan Cui
Quoted 4 lines
meta/recipes-devtools/gcc/gcc-package-target.inc +0 -0
@@ -122,6 +122,8 @@ do_install () {
 	ln -sf ${TARGET_PREFIX}g++ g++
Quoted 8 lines

meta/recipes-devtools/gcc/gcc-package-target.inc do_install () { · line 128

Quoted 6 lines
meta/recipes-devtools/gcc/gcc-package-target.inc +2 -0
 	ln -sf ${TARGET_PREFIX}gcc gcc
 	ln -sf ${TARGET_PREFIX}cpp cpp
+	install -d ${D}${base_libdir}
+	ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp
 	ln -sf g++ c++
 	ln -sf gcc cc

Why do we need this change?

When I was trying self-hosted-image, eglibc's do_install failed in the target:
ERROR: cannot stat bootparam_prot.h: the cause is: rpcgen doesn't work properly: rpcgen can't exec /lib/cpp since it doesn't exist.

According to http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/lib.html, "if a C preprocessor is installed, /lib/cpp must be a reference to it, for historical reasons. The usual placement of this binary is /usr/bin/cpp".

Quoted 8 lines

Typical distros, like Ubuntu, openSuSE, Fedora, RHEL, all comply with the rule.

Actually in meta/recipes-devtools/gcc/gcc-package-target.inc, we do try to package ${base_libdir}/cpp:
FILES_cpp = "\
${bindir}/${TARGET_PREFIX}cpp \
${base_libdir}/cpp \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
But unluckily we didn't to create a symbol link in do_install. This patch adds the symbol link.

Ok, this sounds great. Put this in the commit message though please!

Cheers,

Richard

#7 lore raw

Re: [PATCH 2/4] gcc-package-target.inc: add the symbol link /lib/cpp

Richard Purdie wrote on 2011-11-25:

Quoted 37 lines · Dexuan
Quoted 14 lines

Richard Purdie wrote on 2011-11-24:

Quoted 5 lines · Dexuan Cui
Quoted 4 lines
meta/recipes-devtools/gcc/gcc-package-target.inc +0 -0
@@ -122,6 +122,8 @@ do_install () {
 	ln -sf ${TARGET_PREFIX}g++ g++
Quoted 8 lines

meta/recipes-devtools/gcc/gcc-package-target.inc do_install () { · line 128

Quoted 6 lines
meta/recipes-devtools/gcc/gcc-package-target.inc +2 -0
 	ln -sf ${TARGET_PREFIX}gcc gcc
 	ln -sf ${TARGET_PREFIX}cpp cpp
+	install -d ${D}${base_libdir}
+	ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp
 	ln -sf g++ c++
 	ln -sf gcc cc

Why do we need this change?

Quoted 7 lines

When I was trying self-hosted-image, eglibc's do_install failed in the
target: ERROR: cannot stat bootparam_prot.h: the cause is: rpcgen doesn't work properly: rpcgen can't exec /lib/cpp since it doesn't exist.

According to
http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/lib.html,

"if a C preprocessor is installed, /lib/cpp must be a reference to it, for historical reasons. The usual placement of this binary is /usr/bin/cpp".

Quoted 6 lines

Typical distros, like Ubuntu, openSuSE, Fedora, RHEL, all comply with the rule.

Actually in meta/recipes-devtools/gcc/gcc-package-target.inc, we do try to

package ${base_libdir}/cpp:

Quoted 6 lines

FILES_cpp = "\
${bindir}/${TARGET_PREFIX}cpp \
${base_libdir}/cpp \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
But unluckily we didn't to create a symbol link in do_install. This patch

Quoted 3 lines

adds the symbol link.

Ok, this sounds great. Put this in the commit message though please!

Hi RP,
Please use the new commit(the only change is the updated commit message):
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=dcui/self-hosted-v2&id=f6001f0b12cb561f5e08d3a5b0d61ab5fa924f40

Thanks,
-- Dexuan

#8 lore raw

Re: [PATCH 2/4] gcc-package-target.inc: add the symbol link /lib/cpp

Quoted 38 lines · Dexuan

Richard Purdie wrote on 2011-11-25:

Quoted 37 lines · Dexuan
Quoted 14 lines

Richard Purdie wrote on 2011-11-24:

Quoted 5 lines · Dexuan Cui
Quoted 4 lines
meta/recipes-devtools/gcc/gcc-package-target.inc +0 -0
@@ -122,6 +122,8 @@ do_install () {
 	ln -sf ${TARGET_PREFIX}g++ g++
Quoted 8 lines

meta/recipes-devtools/gcc/gcc-package-target.inc do_install () { · line 128

Quoted 6 lines
meta/recipes-devtools/gcc/gcc-package-target.inc +2 -0
 	ln -sf ${TARGET_PREFIX}gcc gcc
 	ln -sf ${TARGET_PREFIX}cpp cpp
+	install -d ${D}${base_libdir}
+	ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp
 	ln -sf g++ c++
 	ln -sf gcc cc

Why do we need this change?

Quoted 7 lines

When I was trying self-hosted-image, eglibc's do_install failed in the
target: ERROR: cannot stat bootparam_prot.h: the cause is: rpcgen doesn't work properly: rpcgen can't exec /lib/cpp since it doesn't exist.

According to
http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/lib.html,

"if a C preprocessor is installed, /lib/cpp must be a reference to it, for historical reasons. The usual placement of this binary is /usr/bin/cpp".

Quoted 6 lines

Typical distros, like Ubuntu, openSuSE, Fedora, RHEL, all comply with the rule.

Actually in meta/recipes-devtools/gcc/gcc-package-target.inc, we do try to

package ${base_libdir}/cpp:

Quoted 6 lines

FILES_cpp = "\
${bindir}/${TARGET_PREFIX}cpp \
${base_libdir}/cpp \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
But unluckily we didn't to create a symbol link in do_install. This patch

Quoted 6 lines
Quoted 3 lines

adds the symbol link.

Ok, this sounds great. Put this in the commit message though please!

Hi RP,
Please use the new commit(the only change is the updated commit message):
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=dcui/self-hosted-v2&id=f6001f0b12cb561f5e08d3a5b0d61ab5fa924f40

Thanks, I've merged this patch to master.

Cheers,

Richard

author
#9 lore raw

PATCH 3/4 Self Hosted Image: Added Task and Images

In reply to Dexuan Cui

From: Saul Wold <[email protected]>

This is the first pass of creating a self hosted image, this task and image can pass bitbake's sanity check (if modified to remove the cvs check) and can build psuedo, albit very slowly on qemu.

---
 meta/recipes-core/images/self-hosted-image.bb |   11 ++
 meta/recipes-core/tasks/task-self-hosted.bb   |  174 +++++++++++++++++++++++++
 2 files changed, 185 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-core/images/self-hosted-image.bb
 create mode 100644 meta/recipes-core/tasks/task-self-hosted.bb
meta/recipes-core/images/self-hosted-image.bb new file +11 -0
new file mode 100644
index 0000000..7ddba9c
@@ -0,0 +1,11 @@
+IMAGE_INSTALL = "task-core-boot task-core-apps-console task-core-ssh-openssh task-self-hosted"
+
+POKY_EXTRA_INSTALL = "\
+    task-self-hosted \
+    "
+
+IMAGE_ROOTFS_EXTRA_SPACE = "1048576"
+
+inherit core-image
+
+PR = "r0"
meta/recipes-core/tasks/task-self-hosted.bb new file +174 -0

174 lines not on this page · raw message

Signature · 1 line
1.7.6
author
#10 lore raw

PATCH 4/4 coreutils: build and install hostname

In reply to Dexuan Cui

busybox's hostname doesn't work with pseudo somehow, so let's use the version of coreutils. This is needed for the self-hosted-image work.

Also add a patch to disable building the doc and manual: we don't really need them and this causes compilation error in the cross-compiling case.

---
 .../coreutils/coreutils-8.14/disable_doc_man.patch |   36 ++++++++++++++++++++
 meta/recipes-core/coreutils/coreutils_8.14.bb      |    9 +++--
 2 files changed, 41 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-core/coreutils/coreutils-8.14/disable_doc_man.patch
meta/recipes-core/coreutils/coreutils-8.14/disable_doc_man.patch new file +36 -0
new file mode 100644
index 0000000..c9dc92c
@@ -0,0 +1,36 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+We don't really need to build the doc and manual.
+
+Morever, we get this failure in do_compile:
+help2man: can't get `--help' info from hostname.td/hostname
+
+This is because help2man tries to invoke "hostname --help", but in the
+cross-compile case, the target binary may not be execuable on the host.
+
+Signed-off-by: Dexuan Cui <[email protected]>
+
+diff -Nru coreutils-8.14/Makefile.am coreutils-8.14/Makefile.am
+--- coreutils-8.14.orig/Makefile.am	2011-10-10 15:30:55.000000000 +0800
++++ coreutils-8.14/Makefile.am	2011-11-24 17:29:26.398593744 +0800
+@@ -17,7 +17,7 @@
+ 
+ ALL_RECURSIVE_TARGETS =
+ 
+-SUBDIRS = lib src doc man po tests gnulib-tests
++SUBDIRS = lib src po tests gnulib-tests
+ 
+ changelog_etc =				\
+   ChangeLog-2005			\
+diff -Nru coreutils-8.14.orig/Makefile.in coreutils-8.14/Makefile.in
+--- coreutils-8.14.orig/Makefile.in	2011-10-12 17:21:46.000000000 +0800
++++ coreutils-8.14/Makefile.in	2011-11-24 17:29:14.868593748 +0800
+@@ -1453,7 +1453,7 @@
+ 
+ # Some tests always need root privileges, others need them only sometimes.
+ ALL_RECURSIVE_TARGETS = install-root check-root distcheck-hook
+-SUBDIRS = lib src doc man po tests gnulib-tests
++SUBDIRS = lib src po tests gnulib-tests
+ changelog_etc = \
+   ChangeLog-2005			\
+   ChangeLog-2006			\
meta/recipes-core/coreutils/coreutils_8.14.bb +5 -4
index 01face0..ec41fe2 100644
@@ -7,7 +7,7 @@ BUGTRACKER = "http://debbugs.gnu.org/coreutils"
 LICENSE = "GPLv3+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
                     file://src/ls.c;startline=5;endline=16;md5=e1a509558876db58fb6667ba140137ad"
-PR = "r1"
+PR = "r2"
 DEPENDS = "gmp"
 DEPENDS_virtclass-native = ""
 
@@ -15,10 +15,13 @@ inherit autotools gettext
 
 SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \
            file://remove-usr-local-lib-from-m4.patch \
+           file://disable_doc_man.patch \
           "
 SRC_URI[md5sum] = "bcb135ce553493a45aba01b39eb3920a"
 SRC_URI[sha256sum] = "0d120817c19292edb19e92ae6b8eac9020e03d51e0af9cb116cf82b65d18b02d"
 
+EXTRA_OECONF += "--enable-install-program=hostname"
+
 EXTRA_OECONF_virtclass-native = "--without-gmp"
 
 # [ gets a special treatment and is not included in this
@@ -29,9 +32,8 @@ bindir_progs = "base64 basename chcon cksum comm csplit cut dir dircolors dirnam
                 sha384sum sha512sum shred shuf sort split stat stdbuf sum tac tail tee test timeout\
                 tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes df"
 
-# hostname gets a special treatment and is not included in this
 base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
-                     mknod mv pwd rm rmdir sleep stty sync touch true uname"
+                     mknod mv pwd rm rmdir sleep stty sync touch true uname hostname"
 
 sbindir_progs= "chroot"
 
@@ -71,7 +73,6 @@ pkg_prerm_${PN} () {
 	for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done
 
 	# The special cases
-	update-alternatives --remove hostname hostname.${PN}
 	update-alternatives --remove uptime uptime.${PN}
 	update-alternatives --remove '[' 'lbracket.${PN}'
 }
Signature · 1 line
1.7.6
#11 lore raw

Re: [PATCH 4/4] coreutils: build and install hostname

Quoted 6 lines · Dexuan Cui

busybox's hostname doesn't work with pseudo somehow, so let's use the version of coreutils. This is needed for the self-hosted-image work.

Also add a patch to disable building the doc and manual: we don't really need them and this causes compilation error in the cross-compiling case.

Upon further review and thoughts about this, it's not idea to remove docs and manual's, I will take this patch for now, but we need to file a bug and find a better solution that will re-enable the docs and manual creation.

Sau!

Quoted 95 lines
---
  .../coreutils/coreutils-8.14/disable_doc_man.patch |   36 ++++++++++++++++++++
  meta/recipes-core/coreutils/coreutils_8.14.bb      |    9 +++--
  2 files changed, 41 insertions(+), 4 deletions(-)

create mode 100644 meta/recipes-core/coreutils/coreutils-8.14/disable_doc_man.patch

meta/recipes-core/coreutils/coreutils-8.14/disable_doc_man.patch new file +36 -0
new file mode 100644
index 0000000..c9dc92c
@@ -0,0 +1,36 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+We don't really need to build the doc and manual.
+
+Morever, we get this failure in do_compile:
+help2man: can't get `--help' info from hostname.td/hostname
+
+This is because help2man tries to invoke "hostname --help", but in the
+cross-compile case, the target binary may not be execuable on the host.
+
+Signed-off-by: Dexuan Cui<[email protected]>
+
+diff -Nru coreutils-8.14/Makefile.am coreutils-8.14/Makefile.am
+--- coreutils-8.14.orig/Makefile.am	2011-10-10 15:30:55.000000000 +0800
++++ coreutils-8.14/Makefile.am	2011-11-24 17:29:26.398593744 +0800
+@@ -17,7 +17,7 @@
+
+ ALL_RECURSIVE_TARGETS =
+
+-SUBDIRS = lib src doc man po tests gnulib-tests
++SUBDIRS = lib src po tests gnulib-tests
+
+ changelog_etc =				\
+   ChangeLog-2005			\
+diff -Nru coreutils-8.14.orig/Makefile.in coreutils-8.14/Makefile.in
+--- coreutils-8.14.orig/Makefile.in	2011-10-12 17:21:46.000000000 +0800
++++ coreutils-8.14/Makefile.in	2011-11-24 17:29:14.868593748 +0800
+@@ -1453,7 +1453,7 @@
+
+ # Some tests always need root privileges, others need them only sometimes.
+ ALL_RECURSIVE_TARGETS = install-root check-root distcheck-hook
+-SUBDIRS = lib src doc man po tests gnulib-tests
++SUBDIRS = lib src po tests gnulib-tests
+ changelog_etc = \
+   ChangeLog-2005			\
+   ChangeLog-2006			\
meta/recipes-core/coreutils/coreutils_8.14.bb +5 -4
index 01face0..ec41fe2 100644
@@ -7,7 +7,7 @@ BUGTRACKER = "http://debbugs.gnu.org/coreutils"
  LICENSE = "GPLv3+"
  LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
                      file://src/ls.c;startline=5;endline=16;md5=e1a509558876db58fb6667ba140137ad"
-PR = "r1"
+PR = "r2"
  DEPENDS = "gmp"
  DEPENDS_virtclass-native = ""
 
@@ -15,10 +15,13 @@ inherit autotools gettext
 
  SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \
             file://remove-usr-local-lib-from-m4.patch \
+           file://disable_doc_man.patch \
            "
  SRC_URI[md5sum] = "bcb135ce553493a45aba01b39eb3920a"
  SRC_URI[sha256sum] = "0d120817c19292edb19e92ae6b8eac9020e03d51e0af9cb116cf82b65d18b02d"
 
+EXTRA_OECONF += "--enable-install-program=hostname"
+
  EXTRA_OECONF_virtclass-native = "--without-gmp"
 
  # [ gets a special treatment and is not included in this
@@ -29,9 +32,8 @@ bindir_progs = "base64 basename chcon cksum comm csplit cut dir dircolors dirnam
                  sha384sum sha512sum shred shuf sort split stat stdbuf sum tac tail tee test timeout\
                  tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes df"
 
-# hostname gets a special treatment and is not included in this
  base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
-                     mknod mv pwd rm rmdir sleep stty sync touch true uname"
+                     mknod mv pwd rm rmdir sleep stty sync touch true uname hostname"
 
  sbindir_progs= "chroot"
 
@@ -71,7 +73,6 @@ pkg_prerm_${PN} () {
  	for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done
 
  	# The special cases
-	update-alternatives --remove hostname hostname.${PN}
  	update-alternatives --remove uptime uptime.${PN}
  	update-alternatives --remove '[' 'lbracket.${PN}'
  }