[oe-commits] org.oe.dev busybox 1.9.1 factor more common things into busybox.inc

mickeyl commit openembedded-commits at lists.openembedded.org
Thu Feb 28 12:04:12 UTC 2008


busybox 1.9.1 factor more common things into busybox.inc
disable utilities again until we're a proper replacement for tinylogin

Author: mickeyl at openembedded.org
Branch: org.openembedded.dev
Revision: 3280ed49d0f6340ce60f4833eac87492b027c0ac
ViewMTN: http://monotone.openembedded.org/revision/info/3280ed49d0f6340ce60f4833eac87492b027c0ac
Files:
1
packages/busybox/busybox-1.9.1/defconfig
packages/busybox/busybox.inc
packages/busybox/busybox_1.9.1.bb
Diffs:

#
# mt diff -rd954d523c897bdc03bc955807728abed35427069 -r3280ed49d0f6340ce60f4833eac87492b027c0ac
#
# 
# 
# patch "packages/busybox/busybox-1.9.1/defconfig"
#  from [f9c49ff1e22a8954779029451df51773b51ed09f]
#    to [ff25ec81c1351231f97bffc1ee90939e562137a4]
# 
# patch "packages/busybox/busybox.inc"
#  from [82ab2ea23b28f3cfde9a11d2718ddbc3ebbb899a]
#    to [e17706ff0f8357569cffa7704fe0c16990b62121]
# 
# patch "packages/busybox/busybox_1.9.1.bb"
#  from [49749d22f545c3b4e7a19e560079375738c0afdb]
#    to [611d61a446d2bd0678cce14f4d7f8a7e916ebf9d]
# 
============================================================
--- packages/busybox/busybox-1.9.1/defconfig	f9c49ff1e22a8954779029451df51773b51ed09f
+++ packages/busybox/busybox-1.9.1/defconfig	ff25ec81c1351231f97bffc1ee90939e562137a4
@@ -378,30 +378,30 @@ CONFIG_XARGS=y
 # CONFIG_FEATURE_SHADOWPASSWDS is not set
 # CONFIG_USE_BB_SHADOW is not set
 # CONFIG_USE_BB_PWD_GRP is not set
-CONFIG_ADDGROUP=y
-CONFIG_FEATURE_ADDUSER_TO_GROUP=y
-CONFIG_DELGROUP=y
-CONFIG_FEATURE_DEL_USER_FROM_GROUP=y
-CONFIG_ADDUSER=y
-CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y
-CONFIG_DELUSER=y
-CONFIG_GETTY=y
-CONFIG_FEATURE_UTMP=y
-CONFIG_FEATURE_WTMP=y
-CONFIG_LOGIN=y
+# CONFIG_ADDGROUP is not set
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+# CONFIG_DELGROUP is not set
+# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
+# CONFIG_ADDUSER is not set
+# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
+# CONFIG_DELUSER is not set
+# CONFIG_GETTY is not set
+# CONFIG_FEATURE_UTMP is not set
+# CONFIG_FEATURE_WTMP is not set
+# CONFIG_LOGIN is not set
 # CONFIG_PAM is not set
 # CONFIG_LOGIN_SCRIPTS is not set
-CONFIG_FEATURE_NOLOGIN=y
-CONFIG_FEATURE_SECURETTY=y
-CONFIG_PASSWD=y
-CONFIG_FEATURE_PASSWD_WEAK_CHECK=y
+# CONFIG_FEATURE_NOLOGIN is not set
+# CONFIG_FEATURE_SECURETTY is not set
+# CONFIG_PASSWD is not set
+# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
 # CONFIG_CRYPTPW is not set
 # CONFIG_CHPASSWD is not set
-CONFIG_SU=y
-CONFIG_FEATURE_SU_SYSLOG=y
-CONFIG_FEATURE_SU_CHECKS_SHELLS=y
+# CONFIG_SU is not set
+# CONFIG_FEATURE_SU_SYSLOG is not set
+# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
 # CONFIG_SULOGIN is not set
-CONFIG_VLOCK=y
+# CONFIG_VLOCK is not set
 
 #
 # Linux Ext2 FS Progs
============================================================
--- packages/busybox/busybox.inc	82ab2ea23b28f3cfde9a11d2718ddbc3ebbb899a
+++ packages/busybox/busybox.inc	e17706ff0f8357569cffa7704fe0c16990b62121
@@ -11,19 +11,21 @@ PRIORITY = "required"
 SECTION = "base"
 PRIORITY = "required"
 
-SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
-           file://busybox-cron \
-	   file://busybox-httpd \
-	   file://busybox-udhcpd \
-	   file://default.script \
-	   file://dhcp-hostname.patch;patch=1 \
-           file://hwclock.sh \
-	   file://ifupdown-spurious-environ.patch;patch=1 \
-	   file://mount.busybox \
-	   file://syslog \
-	   file://syslog.conf \
-	   file://udhcpscript.patch;patch=1 \
-	   file://umount.busybox"
+SRC_URI = "\
+  http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
+  file://busybox-cron \
+  file://busybox-httpd \
+  file://busybox-udhcpd \
+  file://default.script \
+  file://dhcp-hostname.patch;patch=1 \
+  file://hwclock.sh \
+  file://ifupdown-spurious-environ.patch;patch=1 \
+  file://mount.busybox \
+  file://syslog \
+  file://syslog.conf \
+  file://udhcpscript.patch;patch=1 \
+  file://umount.busybox \
+"
 
 SRC_URI_append_nylon = " file://xargs-double-size.patch;patch=1"
 
@@ -34,7 +36,7 @@ FILES_${PN}-udhcpd = "${sysconfdir}/init
 FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
 FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
 
-FILES_${PN} += " ${datadir}/udhcpc"
+FILES_${PN} += "${datadir}/udhcpc"
 
 INITSCRIPT_PACKAGES = "${PN} ${PN}-httpd ${PN}-udhcpd"
 INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
@@ -47,11 +49,73 @@ inherit cml1 update-rc.d
 
 inherit cml1 update-rc.d
 
-do_compile () {
-	unset CFLAGS
+do_compile() {
+	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
 	base_do_compile
 }
 
+do_install () {
+	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+	install -d ${D}${sysconfdir}/init.d
+	oe_runmake "PREFIX=${D}" install
+	cp -pPR ${S}/_install/* ${D}/
+
+	# Move everything to /busybox (not supposed to end up in any package)
+	install -d ${D}/busybox
+	ls ${D} -R
+
+	cp -dPr ${D}${base_bindir} ${D}${base_sbindir} ${D}${prefix} ${D}/busybox/
+	# Move the busybox binary back to /bin
+	install -d ${D}${base_bindir}
+	mv ${D}/busybox${base_bindir}/busybox ${D}${base_bindir}/
+	# Move back the sh symlink
+	test -h ${D}/busybox${base_bindir}/sh && mv ${D}/busybox${base_bindir}/sh ${D}${base_bindir}/
+
+	install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
+	install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
+	if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
+		# Move crond back to /usr/sbin/crond
+		install -d ${D}${sbindir}
+		mv ${D}/busybox${sbindir}/crond ${D}${sbindir}/
+
+		install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
+	fi
+	if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then
+		# Move httpd back to /usr/sbin/httpd
+		install -d ${D}${sbindir}
+		mv ${D}/busybox${sbindir}/httpd ${D}${sbindir}/
+
+		install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/
+		install -d ${D}/srv/www
+	fi
+	if grep "CONFIG_APP_UDHCPD=y" ${WORKDIR}/defconfig; then
+		# Move udhcpd back to /usr/sbin/udhcpd
+		install -d ${D}${sbindir}
+		mv ${D}/busybox${sbindir}/udhcpd ${D}${sbindir}/
+
+		install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/
+	fi
+	if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then
+		# Move hwclock back to /sbin/hwclock
+		install -d ${D}${base_sbindir}
+		mv ${D}/busybox${base_sbindir}/hwclock ${D}${base_sbindir}/
+
+		install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/
+	fi
+	if grep "CONFIG_APP_UDHCPC=y" ${WORKDIR}/defconfig; then
+		# Move dhcpc back to /usr/sbin/udhcpc
+		install -d ${D}${base_sbindir}
+		mv ${D}/busybox${base_sbindir}/udhcpc ${D}${base_sbindir}/
+
+		install -d ${D}${sysconfdir}/udhcpc.d
+		install -d ${D}${datadir}/udhcpc
+		install -m 0755 ${S}/examples/udhcp/simple.script ${D}${sysconfdir}/udhcpc.d/50default
+		install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script
+	fi
+
+	install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
+}
+
 pkg_postinst_${PN} () {
 	# If we are not making an image we create links for the utilities that doesn't exist
 	# so the update-alternatives script will get the utilities it needs
@@ -62,3 +126,34 @@ pkg_postinst_${PN} () {
 	# This adds the links, remember that this has to work when building an image too, hence the $D
 	while read link; do case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; esac; bn=`basename $link`; update-alternatives --install $link $bn $to 50; done <$D/etc/busybox.links
 }
+
+pkg_prerm_${PN} () {
+	# This is so you can make busybox commit suicide - removing busybox with no other packages
+	# providing its files, this will make update-alternatives work, but the update-rc.d part
+	# for syslog, httpd and/or udhcpd will fail if there is no other package providing sh
+	tmpdir=`mktemp -d /tmp/busyboxrm-XXXXXX`
+	ln -s /bin/busybox $tmpdir/[
+	ln -s /bin/busybox $tmpdir/test
+	ln -s /bin/busybox $tmpdir/head
+	ln -s /bin/busybox $tmpdir/sh
+	ln -s /bin/busybox $tmpdir/basename
+	ln -s /bin/busybox $tmpdir/echo
+	ln -s /bin/busybox $tmpdir/mv
+	ln -s /bin/busybox $tmpdir/ln
+	ln -s /bin/busybox $tmpdir/dirname
+	ln -s /bin/busybox $tmpdir/rm
+	ln -s /bin/busybox $tmpdir/sed
+	ln -s /bin/busybox $tmpdir/sort
+	export PATH=$PATH:$tmpdir
+
+	while read link
+	do
+		case "$link" in
+			/*/*/*) to="../../bin/busybox";;
+			/bin/*) to="busybox";;
+			/*/*) to="../bin/busybox";;
+		esac
+		bn=`basename $link`
+		sh /usr/bin/update-alternatives --remove $bn $to
+	done </etc/busybox.links
+}
============================================================
--- packages/busybox/busybox_1.9.1.bb	49749d22f545c3b4e7a19e560079375738c0afdb
+++ packages/busybox/busybox_1.9.1.bb	611d61a446d2bd0678cce14f4d7f8a7e916ebf9d
@@ -1,5 +1,5 @@ require busybox.inc
 require busybox.inc
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
            http://busybox.net/downloads/fixes-1.9.1/busybox-1.9.1-lineedit.patch;patch=1 \
@@ -23,91 +23,3 @@ do_configure () {
 	install -m 0644 ${WORKDIR}/defconfig ${S}/.config
 	cml1_do_configure
 }
-
-do_compile () {
-	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
-	base_do_compile
-}
-
-do_install () {
-	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
-	install -d ${D}${sysconfdir}/init.d
-	oe_runmake "PREFIX=${D}" install
-	cp -pPR ${S}/_install/* ${D}/
-
-	# Move everything to /busybox (not supposed to end up in any package)
-	install -d ${D}/busybox
-	ls ${D} -R
-
-	cp -dPr ${D}${base_bindir} ${D}${base_sbindir} ${D}${prefix} ${D}/busybox/
-	# Move the busybox binary back to /bin
-	install -d ${D}${base_bindir}
-	mv ${D}/busybox${base_bindir}/busybox ${D}${base_bindir}/
-	# Move back the sh symlink
-	test -h ${D}/busybox${base_bindir}/sh && mv ${D}/busybox${base_bindir}/sh ${D}${base_bindir}/
-
-	install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
-	install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
-	if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
-		# Move crond back to /usr/sbin/crond
-		install -d ${D}${sbindir}
-		mv ${D}/busybox${sbindir}/crond ${D}${sbindir}/
-
-		install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
-	fi
-	if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then
-		# Move httpd back to /usr/sbin/httpd
-		install -d ${D}${sbindir}
-		mv ${D}/busybox${sbindir}/httpd ${D}${sbindir}/
-
-		install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/
-		install -d ${D}/srv/www
-	fi
-	if grep "CONFIG_APP_UDHCPD=y" ${WORKDIR}/defconfig; then
-		# Move udhcpd back to /usr/sbin/udhcpd
-		install -d ${D}${sbindir}
-		mv ${D}/busybox${sbindir}/udhcpd ${D}${sbindir}/
-
-		install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/
-	fi
-	if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then
-		# Move hwclock back to /sbin/hwclock
-		install -d ${D}${base_sbindir}
-		mv ${D}/busybox${base_sbindir}/hwclock ${D}${base_sbindir}/
-
-		install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/
-	fi
-	if grep "CONFIG_APP_UDHCPC=y" ${WORKDIR}/defconfig; then
-		# Move dhcpc back to /usr/sbin/udhcpc
-		install -d ${D}${base_sbindir}
-		mv ${D}/busybox${base_sbindir}/udhcpc ${D}${base_sbindir}/
-
-		install -d ${D}${sysconfdir}/udhcpc.d
-		install -d ${D}${datadir}/udhcpc
-		install -m 0755 ${S}/examples/udhcp/simple.script ${D}${sysconfdir}/udhcpc.d/50default
-		install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script
-	fi
-
-	install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
-}
-
-pkg_prerm_${PN} () {
-	# This is so you can make busybox commit suicide - removing busybox with no other packages
-	# providing its files, this will make update-alternatives work, but the update-rc.d part
-	# for syslog, httpd and/or udhcpd will fail if there is no other package providing sh
-	tmpdir=`mktemp -d /tmp/busyboxrm-XXXXXX`
-	ln -s /bin/busybox $tmpdir/[
-	ln -s /bin/busybox $tmpdir/test
-	ln -s /bin/busybox $tmpdir/head
-	ln -s /bin/busybox $tmpdir/sh
-	ln -s /bin/busybox $tmpdir/basename
-	ln -s /bin/busybox $tmpdir/echo
-	ln -s /bin/busybox $tmpdir/mv
-	ln -s /bin/busybox $tmpdir/ln
-	ln -s /bin/busybox $tmpdir/dirname
-	ln -s /bin/busybox $tmpdir/rm
-	ln -s /bin/busybox $tmpdir/sed
-	ln -s /bin/busybox $tmpdir/sort
-	export PATH=$PATH:$tmpdir
-	while read link; do case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; esac; bn=`basename $link`; sh /usr/bin/update-alternatives --remove $bn $to; done </etc/busybox.links
-}






More information about the Openembedded-commits mailing list