OBS User unknown 2008-07-24 21:36:45 +00:00 committed by Git OBS Bridge
parent f96dcff6ae
commit a2129f7429
4 changed files with 78 additions and 4 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Jul 23 15:16:30 CEST 2008 - hare@suse.de
- Include mkinitrd scriptlets.
-------------------------------------------------------------------
Thu Jan 17 14:30:48 CET 2008 - sassmann@suse.de

View File

@ -10,17 +10,20 @@
# norootforbuild
Name: busybox
BuildRequires: dietlibc
Url: http://www.busybox.net/
Version: 1.8.2
Release: 1
Release: 31
Summary: The Swiss Army Knife of Embedded Linux
License: GPL v2 or later
Group: System/Base
AutoReqProv: on
Source: http://busybox.net/downloads/%{name}-%{version}.tar.bz2
Source2: busybox.SuSE.config
Source3: mkinitrd-setup.sh
Source4: mkinitrd-boot.sh
Patch1: busybox-1.8.2-arping.patch
Patch2: busybox-1.8.2-static.patch
Patch3: busybox-1.8.2-vi.patch
@ -75,6 +78,9 @@ install applets/install.sh $RPM_BUILD_ROOT/usr/bin/busybox.install
install busybox $RPM_BUILD_ROOT/usr/bin
install -d $RPM_BUILD_ROOT%_mandir/man1
install -m 644 docs/BusyBox.1 $RPM_BUILD_ROOT%_mandir/man1
install -d $RPM_BUILD_ROOT/lib/mkinitrd/scripts
install -m 755 %{S:3} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/setup-busybox.sh
install -m 755 %{S:4} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-busybox.sh
%files
%defattr(-,root,root)
@ -84,8 +90,14 @@ install -m 644 docs/BusyBox.1 $RPM_BUILD_ROOT%_mandir/man1
/usr/bin/busybox.install
%dir /usr/share/busybox
%config /usr/share/busybox/busybox.links
%dir /lib/mkinitrd
%dir /lib/mkinitrd/scripts
/lib/mkinitrd/scripts/setup-busybox.sh
/lib/mkinitrd/scripts/boot-busybox.sh
%changelog
* Wed Jul 23 2008 hare@suse.de
- Include mkinitrd scriptlets.
* Thu Jan 17 2008 sassmann@suse.de
- update to 1.8.2
see http://www.busybox.net/ for full changelog
@ -138,7 +150,7 @@ install -m 644 docs/BusyBox.1 $RPM_BUILD_ROOT%_mandir/man1
- Update to 1.00 final
* Tue Aug 17 2004 nashif@suse.de
- Update to 1.00-rc3
* Thu Aug 05 2004 nashif@suse.de
* Fri Aug 06 2004 nashif@suse.de
- Update to 1.00-rc2
* Wed Jul 21 2004 nashif@suse.de
- Update to 1.00-rc1
@ -150,7 +162,7 @@ install -m 644 docs/BusyBox.1 $RPM_BUILD_ROOT%_mandir/man1
- Update to 1.0 pre 8
* Wed Feb 11 2004 ro@suse.de
- hack to build it on amd64
* Tue Feb 10 2004 schwab@suse.de
* Wed Feb 11 2004 schwab@suse.de
- Fix building on ia64.
* Wed Feb 04 2004 kukuk@suse.de
- Remove wrong dietlibc requires
@ -200,7 +212,7 @@ install -m 644 docs/BusyBox.1 $RPM_BUILD_ROOT%_mandir/man1
- disabled insmod for all archs except IA32, ARM and SH
* Tue Dec 19 2000 nashif@suse.de
- Update to 0.48 (Fixes many bugs)
* Mon Nov 27 2000 nashif@suse.de
* Tue Nov 28 2000 nashif@suse.de
- Fixed pathes in install script
* Tue Nov 07 2000 nashif@suse.de
- Added EM_486 and OPEN_MAX fixes

6
mkinitrd-boot.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
#%stage: setup
#%if: 1 = 2
#%programs: busybox
## this is only a dummy script so we see busybox as a feature in the list

51
mkinitrd-setup.sh Normal file
View File

@ -0,0 +1,51 @@
#!/bin/bash
#
#%stage: boot
#%depends: progs
#
if use_script busybox; then
if [ ! -x "/usr/bin/busybox" ]; then
echo "[BUSYBOX] No Busybox executable was found"
else
for i in `busybox | grep Curr -A 200 | grep -v "Currently defined f"`; do
DIR=bin
busyfile="${i/,/}"
# skip programs that do not work properly (if they exist)
if [ -e "bin/$busyfile" -o -e "sbin/$busyfile" ]; then
case $busyfile in
# modprobe: breaks udev
# fsck: breaks fsck.ext3
# umount: does not know -f
# sleep: can only use full integers (no floats)
# init: no need for init in initrd (breaks bootchart)
# cp: missing -v (breaks bootchart)
modprobe|fsck|umount|mount|sleep|init|cp)
continue
;;
esac
fi
if [ -h "bin/$busyfile" ]; then
# don't process symlinks
continue
elif [ -e "bin/$busyfile" ]; then
verbose "[BUSYBOX] replacing $DIR/$busyfile"
rm -f bin/$busyfile
elif [ -e "sbin/$busyfile" ]; then
DIR=sbin
rm -f sbin/$busyfile
verbose "[BUSYBOX] replacing $DIR/$busyfile"
fi
# we have to remove the copied program files from the
# internal list so we only get shared libs that are
# actually used
declare -i binc
for ((binc=0 ; $binc<${#initrd_bins[@]} ; binc++)); do
${A##*/}
if [ "${initrd_bins[$binc]##*/}}" = "$busyfile" ]; then
initrd_bins[$binc]=''
fi
done
ln -s ../bin/busybox "$DIR/$busyfile"
done
fi
fi