# HG changeset patch # User Pascal Bellard # Date 1280319327 -7200 # Node ID c29991cef110d2d8da624bf191e8c7380207cd8b # Parent 4234202a789b8de1d9dae7f14a620bbb8f4a7bcc busybox: fix pre_install diff -r 4234202a789b -r c29991cef110 busybox-pam/receipt --- a/busybox-pam/receipt Wed Jul 28 13:23:18 2010 +0200 +++ b/busybox-pam/receipt Wed Jul 28 14:15:27 2010 +0200 @@ -35,9 +35,13 @@ EOT cp $WOK/$SOURCE/stuff/$SOURCE-$VERSION.config .config sed -i 's/# CONFIG_PAM is not set/CONFIG_PAM=y/' .config - make oldconfig - # "CFLAGS=-O0" is a workaround for GCC 4.5.0 - make -j 4 "CFLAGS=-O0" && make "CFLAGS=-O0" install + if [ "$(gcc --version | awk '{ print $3; exit }')" == "4.5.0" ]; then + # "CFLAGS=-O0" is a workaround for GCC 4.5.0 (sed crash) + # "CFLAGS=-fno-tree-pta" may be a workaround for GCC 4.5.0 (sed garbage) + make -j 4 "CFLAGS=-O0" && make "CFLAGS=-O0" install + else + make -j 4 && make install + fi echo "Chmod 4755 on busybox binary..." chmod 4755 _install/bin/busybox } @@ -93,7 +97,7 @@ tazpkg get-install glibc-base --forced fi answer="" - while read i ; do + for i in $(cat $1$INSTALLED/$PACKAGE/files.list); do [ -f $1$i ] || continue case "$i" in /bin/busybox) continue ;; @@ -109,12 +113,13 @@ esac fi cp -a $1$i $1$i-busybox-install - done < $1$INSTALLED/$PACKAGE/files.list + done } post_install() { local i + [ -f /etc/resolv.conf-busybox-install ] && mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf while read i ; do [ -f $1$i-busybox-install ] || continue diff -r 4234202a789b -r c29991cef110 busybox-static/receipt --- a/busybox-static/receipt Wed Jul 28 13:23:18 2010 +0200 +++ b/busybox-static/receipt Wed Jul 28 14:15:27 2010 +0200 @@ -33,8 +33,13 @@ EOT cp ../stuff/$SOURCE-$VERSION.config .config make oldconfig - # "CFLAGS=-O0" is a workaround for GCC 4.5.0 - make -j 4 "CFLAGS=-O0" && make "CFLAGS=-O0" install + if [ "$(gcc --version | awk '{ print $3; exit }')" == "4.5.0" ]; then + # "CFLAGS=-O0" is a workaround for GCC 4.5.0 (sed crash) + # "CFLAGS=-fno-tree-pta" may be a workaround for GCC 4.5.0 (sed garbage) + make -j 4 "CFLAGS=-O0" && make "CFLAGS=-O0" install + else + make -j 4 && make install + fi echo "Chmod 4755 on busybox binary..." chmod 4755 _install/bin/busybox } diff -r 4234202a789b -r c29991cef110 busybox/receipt --- a/busybox/receipt Wed Jul 28 13:23:18 2010 +0200 +++ b/busybox/receipt Wed Jul 28 14:15:27 2010 +0200 @@ -33,7 +33,7 @@ cp ../stuff/$PACKAGE-$VERSION.config .config make oldconfig if [ "$(gcc --version | awk '{ print $3; exit }')" == "4.5.0" ]; then - # "CFLAGS=-O0" is a workaround for GCC 4.5.0 (sed crach) + # "CFLAGS=-O0" is a workaround for GCC 4.5.0 (sed crash) # "CFLAGS=-fno-tree-pta" may be a workaround for GCC 4.5.0 (sed garbage) make -j 4 "CFLAGS=-O0" && make "CFLAGS=-O0" install else @@ -85,7 +85,7 @@ tazpkg get-install glibc-base --forced fi answer="" - while read i ; do + for i in $(cat $1$INSTALLED/$PACKAGE/files.list); do [ -f $1$i ] || continue case "$i" in /bin/busybox) continue ;; @@ -101,12 +101,13 @@ esac fi cp -a $1$i $1$i-busybox-install - done < $1$INSTALLED/$PACKAGE/files.list + done } post_install() { local i + [ -f /etc/resolv.conf-busybox-install ] && mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf while read i ; do [ -f $1$i-busybox-install ] || continue