summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorPhil Blundell <pb@pbcl.net>2011-05-26 11:08:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-01 18:34:36 +0100
commitab65c7247ff659edabe9f866fd9ca39941265f88 (patch)
treef85f61bd61666d9f63f475b50bf63150bcdd986a /meta/recipes-core
parent505ee4b0a7443c185b101aaa6460d3a566a91fce (diff)
downloadpoky-ab65c7247ff659edabe9f866fd9ca39941265f88.tar.gz
busybox: sync do_install() with oe master (mostly)
This is basically a backport of the current state of the art from the openembedded master repo. In particular this fixes an installation error on micro: | + cp -dPr /home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/image/bin /home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/image/sbin /home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/image /home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/image/busybox/ | cp: will not create hard link `/home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/image/busybox/image/bin' to directory `/home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/image/busybox/bin' | cp: cannot copy a directory, `/home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/image', into itself, `/home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/image/busybox/image' | ERROR: Function 'do_install' failed (see /home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/temp/log.do_install.3808 for further information) (From OE-Core rev: 613d0275a59be9154c2a2cdc101bd3e2c79a6d44) Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/busybox/busybox.inc103
-rw-r--r--meta/recipes-core/busybox/busybox_1.18.4.bb2
2 files changed, 57 insertions, 48 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 341c5c4146..86fbdae2a5 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -46,75 +46,84 @@ do_compile() {
46} 46}
47 47
48do_install () { 48do_install () {
49 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS 49 oe_runmake busybox.links
50 if [ "${prefix}" != "/usr" ]; then
51 sed "s:^/usr/:${prefix}/:" busybox.links > busybox.links.new
52 mv busybox.links.new busybox.links
53 fi
54 if [ "${base_sbindir}" != "/sbin" ]; then
55 sed "s:^/sbin/:${base_sbindir}/:" busybox.links > busybox.links.new
56 mv busybox.links.new busybox.links
57 fi
58
50 install -d ${D}${sysconfdir}/init.d 59 install -d ${D}${sysconfdir}/init.d
51 oe_runmake "PREFIX=${D}" install
52 cp -pPR ${S}/_install/* ${D}/
53
54 # Move everything to /busybox (not supposed to end up in any package)
55 install -d ${D}/busybox
56 ls ${D} -R
57
58 cp -dPr ${D}${base_bindir} ${D}${base_sbindir} ${D}${prefix} ${D}/busybox/
59 # Move the busybox binary back to /bin
60 install -d ${D}${base_bindir}
61 mv ${D}/busybox${base_bindir}/busybox ${D}${base_bindir}/
62 # Move back the sh symlink
63 test -h ${D}/busybox${base_bindir}/sh && mv ${D}/busybox${base_bindir}/sh ${D}${base_bindir}/
64
65 install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${PN}
66 install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf.${PN}
67 if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
68 # Move crond back to /usr/sbin/crond
69 install -d ${D}${sbindir}
70 mv ${D}/busybox${sbindir}/crond ${D}${sbindir}/
71 60
61 if ! grep -q "CONFIG_FEATURE_INDIVIDUAL=y" ${WORKDIR}/defconfig; then
62 # Install /bin/busybox, and the /bin/sh link so the postinst script
63 # can run. Let update-alternatives handle the rest.
64 install -d ${D}${base_bindir}
65 if grep -q "CONFIG_FEATURE_SUID=y" ${WORKDIR}/defconfig; then
66 install -m 4755 ${S}/busybox ${D}${base_bindir}
67 else
68 install -m 0755 ${S}/busybox ${D}${base_bindir}
69 fi
70 ln -sf busybox ${D}${base_bindir}/sh
71 else
72 install -d ${D}${base_bindir} ${D}${base_sbindir}
73 install -d ${D}${libdir} ${D}${bindir} ${D}${sbindir}
74 cat busybox.links | while read FILE; do
75 NAME=`basename "$FILE"`
76 install -m 0755 "0_lib/$NAME" "${D}$FILE.${PN}"
77 done
78 # add suid bit where needed
79 for i in `grep -E "APPLET.*_BB_SUID_((MAYBE|REQUIRE))" include/applets.h | grep -v _BB_SUID_DROP | cut -f 3 -d '(' | cut -f 1 -d ','`; do
80 find ${D} -name $i.${PN} -exec chmod a+s {} \;
81 done
82 install -m 0755 0_lib/libbusybox.so.${PV} ${D}${libdir}/libbusybox.so.${PV}
83 ln -sf sh.${PN} ${D}${base_bindir}/sh
84 ln -sf ln.${PN} ${D}${base_bindir}/ln
85 ln -sf test.${PN} ${D}${bindir}/test
86 if [ -f ${D}/linuxrc.${PN} ]; then
87 mv ${D}/linuxrc.${PN} ${D}/linuxrc
88 fi
89 fi
90
91 if grep -q "CONFIG_SYSLOGD=y" ${WORKDIR}/defconfig; then
92 install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${PN}
93 install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf.${PN}
94 fi
95 if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
72 install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/ 96 install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
73 fi 97 fi
74 if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then 98 if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then
75 # Move httpd back to /usr/sbin/httpd
76 install -d ${D}${sbindir}
77 mv ${D}/busybox${sbindir}/httpd ${D}${sbindir}/
78
79 install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/ 99 install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/
80 install -d ${D}/srv/www 100 install -d ${D}/srv/www
81 fi 101 fi
82 if grep "CONFIG_UDHCPD=y" ${WORKDIR}/defconfig; then 102 if grep "CONFIG_UDHCPD=y" ${WORKDIR}/defconfig; then
83 # Move udhcpd back to /usr/sbin/udhcpd
84 install -d ${D}${sbindir}
85 mv ${D}/busybox${sbindir}/udhcpd ${D}${sbindir}/
86
87 install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/ 103 install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/
88 fi 104 fi
89 if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then 105 if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then
90 # Move hwclock back to /sbin/hwclock 106 install -d ${D}${sysconfdir}/default
91 install -d ${D}${base_sbindir}
92 mv ${D}/busybox${base_sbindir}/hwclock ${D}${base_sbindir}/
93
94 install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/ 107 install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/
95 fi 108 fi
96 if grep "CONFIG_UDHCPC=y" ${WORKDIR}/defconfig; then 109 if grep "CONFIG_UDHCPC=y" ${WORKDIR}/defconfig; then
97 # Move dhcpc back to /usr/sbin/udhcpc
98 install -d ${D}${base_sbindir}
99 mv ${D}/busybox${base_sbindir}/udhcpc ${D}${base_sbindir}/
100
101 install -d ${D}${sysconfdir}/udhcpc.d 110 install -d ${D}${sysconfdir}/udhcpc.d
102 install -d ${D}${datadir}/udhcpc 111 install -d ${D}${datadir}/udhcpc
103 install -m 0755 ${S}/examples/udhcp/simple.script ${D}${sysconfdir}/udhcpc.d/50default 112 install -m 0755 ${WORKDIR}/simple.script ${D}${sysconfdir}/udhcpc.d/50default
104 install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script 113 install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script
105 install -m 0755 ${WORKDIR}/busybox-udhcpc ${D}${sysconfdir}/init.d/ 114 install -m 0755 ${WORKDIR}/busybox-udhcpc ${D}${sysconfdir}/init.d/
106 fi 115 fi
107 if grep "CONFIG_MDEV=y" ${WORKDIR}/defconfig; then 116 if grep "CONFIG_INETD=y" ${WORKDIR}/defconfig; then
108 install -m 0755 ${WORKDIR}/mdev ${D}${sysconfdir}/init.d/mdev 117 install -m 0755 ${WORKDIR}/inetd ${D}${sysconfdir}/init.d/inetd.${PN}
109 if grep "CONFIG_FEATURE_MDEV_CONF=y" ${WORKDIR}/defconfig; then 118 install -m 0644 ${WORKDIR}/inetd.conf ${D}${sysconfdir}/
110 install -m 644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf 119 fi
111 fi 120 if grep "CONFIG_MDEV=y" ${WORKDIR}/defconfig; then
121 install -m 0755 ${WORKDIR}/mdev ${D}${sysconfdir}/init.d/mdev
122 if grep "CONFIG_FEATURE_MDEV_CONF=y" ${WORKDIR}/defconfig; then
123 install -m 644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf
124 fi
112 fi 125 fi
113
114 install -m 0644 ${S}/busybox.links ${D}${sysconfdir} 126 install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
115
116 # remove the temp dir to suppress warning, we are done with it
117 rm -rf ${D}/busybox
118} 127}
119 128
120pkg_postinst_${PN} () { 129pkg_postinst_${PN} () {
diff --git a/meta/recipes-core/busybox/busybox_1.18.4.bb b/meta/recipes-core/busybox/busybox_1.18.4.bb
index cf3765075c..a5080d5a47 100644
--- a/meta/recipes-core/busybox/busybox_1.18.4.bb
+++ b/meta/recipes-core/busybox/busybox_1.18.4.bb
@@ -1,5 +1,5 @@
1require busybox.inc 1require busybox.inc
2PR = "r1" 2PR = "r2"
3 3
4SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ 4SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
5 file://udhcpscript.patch \ 5 file://udhcpscript.patch \