Sophie

Sophie

distrib > Mageia > 6 > x86_64 > by-pkgid > c0fde04b7f0b9d6263781625507ef458 > files > 12

busybox-1.24.2-2.mga6.src.rpm

%bcond_with   		uclibc
%define Werror_cflags	%{nil} 
%define _ssp_cflags	%{nil}

Summary:	Multi-call binary combining many common Unix tools into one executable
Name:		busybox
Version:	1.24.2
Release:	%mkrel 2
Epoch:		1
License:	GPLv2
Group:		Shells
URL:		http://www.busybox.net/
Source0:	http://www.busybox.net/downloads/%{name}-%{version}.tar.bz2
Source1:	http://www.busybox.net/downloads/%{name}-%{version}.tar.bz2.sign
Source2:	busybox-1.15.2-config
Source3:	busybox-1.17.2-minimal-config
#Patch0:	busybox-1.12.1-static.patch
Patch1:		busybox-i.15.2-no-march_i386.patch
Patch12:	busybox-1.2.2-ls.patch
Patch17:	busybox-1.19.3-use-Os.diff
Patch19:	busybox-1.22.1-CVE-2014-9645.patch
Patch21:	busybox-1.24.1-CVE-2016-2147.patch
Patch22:	busybox-1.24.1-CVE-2016-2148.patch
Patch23:	busybox-1.24.2-CVE-2016-6301.patch

BuildRequires:	gcc >= 3.3.1-2mdk
%if %{with uclibc}
BuildRequires:	uClibc-static-devel >= 0.9.30.3-3
%define __cc	%{uclibc_cc}
%define	cflags	%{uclibc_cflags}
%else
BuildRequires:	glibc-static-devel
%define	cflags	%{optflags}
%endif
BuildRequires:	kernel-userspace-headers

%description
BusyBox combines tiny versions of many common UNIX utilities into a
single small executable. It provides minimalist replacements for most
of the utilities you usually find in GNU coreutils, shellutils, etc.
The utilities in BusyBox generally have fewer options than their
full-featured GNU cousins; however, the options that are included provide
the expected functionality and behave very much like their GNU counterparts.
BusyBox provides a fairly complete POSIX environment for any small or
embedded system.

BusyBox has been written with size-optimization and limited resources in
mind. It is also extremely modular so you can easily include or exclude
commands (or features) at compile time. This makes it easy to customize
your embedded systems. To create a working system, just add /dev, /etc,
and a kernel.

%package	static
Group:		Shells
Summary:	Static linked busybox

%description	static
This package contains a static linked busybox.

%prep
%setup -q
#%%patch0 -b .static -p1
%patch1 -b .no_march~ -p1
%patch12 -b .ls~ -p1
%patch17 -b .Os~ -p1
%patch19 -p1 -b .modprobe
%patch21 -p1 -b .udhcp-segv
%patch22 -p1 -b .udhcpc-overflow
%patch23 -p1 -b .ntpd-dos

%build
cat %{SOURCE2} |sed \
	-e 's|^.*CONFIG_EXTRA_CFLAGS.*$|CONFIG_EXTRA_CFLAGS="%{cflags} -fno-strict-aliasing"|g' \
	> .config
yes "" | %make oldconfig V=1
%make CC=%{__cc} LDFLAGS="%{ldflags}" V=1
mv busybox_unstripped busybox.full.static
%make CC=%{__cc} LDFLAGS="%{ldflags}" V=1 CONFIG_STATIC=n
mv busybox_unstripped busybox.full


%if %{with uclibc}
cat %{SOURCE3} |sed \
	-e 's|^.*CONFIG_EXTRA_CFLAGS.*$|CONFIG_EXTRA_CFLAGS="%{cflags} -fno-strict-aliasing"|g' \
	> .config
yes "" | %make oldconfig V=1
%make CC=%{__cc} LDFLAGS="%{ldflags}" V=1
mv busybox_unstripped busybox.minimal.static
%make CC=%{__cc} LDFLAGS="%{ldflags}" V=1 CONFIG_STATIC=n
mv busybox_unstripped busybox.minimal
%endif

%check
# FIXME
%if 0
%make CC=%{__cc} V=1 check
%endif

%install
install -m755 busybox.full -D %{buildroot}%{_bindir}/busybox
install -m755 busybox.full.static -D %{buildroot}/bin/busybox.static
%if %{with uclibc}
install -m755 busybox.minimal -D %{buildroot}%{uclibc_root}%{_bindir}/busybox.minimal
install -m755 busybox.minimal.static -D %{buildroot}%{uclibc_root}/bin/busybox.minimal.static
%endif

%files
%doc AUTHORS README TODO
%{_bindir}/busybox
%if %{with uclibc}
%{uclibc_root}%{_bindir}/busybox.minimal
%endif

%files static
%doc AUTHORS README TODO
/bin/busybox.static
%if %{with uclibc}
%{uclibc_root}/bin/busybox.minimal.static
%endif




%changelog
* Thu Aug 04 2016 luigiwalser <luigiwalser> 1:1.24.2-2.mga6
+ Revision: 1044429
- add upstream patch to fix CVE-2016-6301

* Fri Mar 18 2016 luigiwalser <luigiwalser> 1:1.24.2-1.mga6
+ Revision: 992836
- 1.24.2
- remove upstream patch 20

* Mon Mar 14 2016 luigiwalser <luigiwalser> 1:1.24.1-2.mga6
+ Revision: 990565
- add upstream patches to fix CVE-2016-2147 and CVE-2016-2148

* Sat Dec 26 2015 luigiwalser <luigiwalser> 1:1.24.1-1.mga6
+ Revision: 915270
- 1.24.1

* Wed Oct 28 2015 luigiwalser <luigiwalser> 1:1.23.2-2.mga6
+ Revision: 896066
- add upstream patch to fix segfault in unzip

* Sat Jul 25 2015 blino <blino> 1:1.23.2-1.mga6
+ Revision: 857328
- 1.23.2
- remove merged/fixed patches

* Mon Jan 26 2015 luigiwalser <luigiwalser> 1:1.22.1-5.mga5
+ Revision: 812345
- add upstream patch to fix CVE-2014-9645

* Wed Oct 15 2014 umeabot <umeabot> 1:1.22.1-4.mga5
+ Revision: 738800
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 1:1.22.1-3.mga5
+ Revision: 678252
- Mageia 5 Mass Rebuild

* Tue Aug 19 2014 luigiwalser <luigiwalser> 1:1.22.1-2.mga5
+ Revision: 665667
- add upstream patch to fix CVE-2014-4607

* Fri Feb 14 2014 luigiwalser <luigiwalser> 1:1.22.1-1.mga5
+ Revision: 591030
- 1.22.1

* Tue Nov 12 2013 tv <tv> 1:1.21.1-3.mga4
+ Revision: 550841
- patch 17: uses -Os
- disable uClibc build (trades 41k of overhead in busybox for saving 444k of
  dynamic uclibc in stage2: we don't want _both_ glibc & uclibc!)

* Sat Oct 19 2013 umeabot <umeabot> 1:1.21.1-2.mga4
+ Revision: 528921
- Mageia 4 Mass Rebuild

* Sat Jun 29 2013 fwang <fwang> 1:1.21.1-1.mga4
+ Revision: 448336
- new version 1.21.1

* Fri Jan 11 2013 umeabot <umeabot> 1:1.20.2-2.mga3
+ Revision: 347231
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Tue Jul 17 2012 rtp <rtp> 1:1.20.2-1.mga3
+ Revision: 271832
- bump dep on uClibc to get suitable headers

  + luigiwalser <luigiwalser>
    - 1.20.2
    - try different patches to not use missing header
    - add BuildRequires kernel-userspace-headers and upstream patch to fix build
    - re-diff patch from upstream to fix CVE-2011-2716

* Fri Jan 06 2012 shlomif <shlomif> 1:1.19.3-1.mga2
+ Revision: 192380
- New busybox version - 1.19.3

* Wed Apr 13 2011 tv <tv> 1:1.18.4-1.mga1
+ Revision: 84497
- drop patches 100-103 (merged upstream)
- new release

* Thu Jan 27 2011 erwan <erwan> 1:1.18.2-2.mga1
+ Revision: 42223
- Fixing typo
- Rebuild
- Adding latest patches

* Thu Jan 27 2011 erwan <erwan> 1:1.18.2-1.mga1
+ Revision: 42215
- imported package busybox