busybox-vl.spec 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. %define uclibc_version 0.9.30.1
  2. Summary: Statically linked binary providing simplified versions of system commands
  3. Name: busybox
  4. Version: 1.13.4
  5. Release: 2%{?_dist_release}
  6. License: GPLv2
  7. Group: System Environment/Shells
  8. Source: http://www.busybox.net/downloads/%{name}-%{version}.tar.bz2
  9. Source2: http://www.uclibc.org/downloads/uClibc-%{uclibc_version}.tar.bz2
  10. Source3: uClibc.config
  11. Patch0: busybox-1.12.1-static.patch
  12. Patch1: busybox-1.12.1-anaconda.patch
  13. Patch12: busybox-1.2.2-ls.patch
  14. Patch14: busybox-1.9.0-msh.patch
  15. Patch16: busybox-1.10.1-hwclock.patch
  16. Patch20: uClibc-0.9.30.1_remove-erroneous-hidden-defs.patch
  17. URL: http://www.busybox.net
  18. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  19. %description
  20. Busybox is a single binary which includes versions of a large number
  21. of system commands, including a shell. This package can be very
  22. useful for recovering from certain types of system failures,
  23. particularly those involving broken shared libraries.
  24. %package anaconda
  25. Group: System Environment/Shells
  26. Summary: Version of busybox configured for use with anaconda
  27. %description anaconda
  28. Busybox is a single binary which includes versions of a large number
  29. of system commands, including a shell. The version contained in this
  30. package is designed for use with the Red Hat installation program,
  31. anaconda. The busybox package provides a binary better suited to
  32. normal use.
  33. %prep
  34. %setup -q -a2
  35. %patch0 -b .static -p1
  36. %patch12 -b .ls -p1
  37. %patch14 -b .msh -p1
  38. %patch16 -b .ia64 -p1
  39. cat %{SOURCE3} >uClibc-%{uclibc_version}/.config1
  40. %patch20 -b .hidden-defs -p0
  41. %build
  42. # create static busybox - the executable is kept as busybox-static
  43. # We use uclibc instead of system glibc, uclibc is several times
  44. # smaller, this is important for static build.
  45. # Build uclibc first.
  46. cd uClibc-%{uclibc_version}
  47. # fixme:
  48. mkdir kernel-include
  49. cp -a /usr/include/asm kernel-include
  50. cp -a /usr/include/asm-generic kernel-include
  51. cp -a /usr/include/linux kernel-include
  52. # uclibc can't be built on ppc64, we set $arch to "" in this case
  53. arch=`uname -m | sed -e 's/i.86/i386/' -e 's/ppc/powerpc/' -e 's/ppc64//' -e 's/powerpc64//'`
  54. echo "TARGET_$arch=y" >.config
  55. echo "TARGET_ARCH=\"$arch\"" >>.config
  56. cat .config1 >>.config
  57. if test "$arch"; then yes "" | make oldconfig; fi
  58. if test "$arch"; then cat .config; fi
  59. if test "$arch"; then make V=1; fi
  60. if test "$arch"; then make install; fi
  61. if test "$arch"; then make install_kernel_headers; fi
  62. cd ..
  63. # we are back in busybox-NN.MM dir now
  64. make defconfig
  65. # gcc needs to be convinced to use neither system headers, nor libs,
  66. # nor startfiles (i.e. crtXXX.o files)
  67. if test "$arch"; then \
  68. mv .config .config1 && \
  69. grep -v ^CONFIG_SELINUX .config1 >.config && \
  70. yes "" | make oldconfig && \
  71. cat .config && \
  72. make V=1 \
  73. EXTRA_CFLAGS="-isystem uClibc-%{uclibc_version}/installed/include" \
  74. CFLAGS_busybox="-static -nostartfiles -LuClibc-%{uclibc_version}/installed/lib uClibc-%{uclibc_version}/installed/lib/crt1.o uClibc-%{uclibc_version}/installed/lib/crti.o uClibc-%{uclibc_version}/installed/lib/crtn.o"; \
  75. else \
  76. cat .config && \
  77. make V=1 CC="gcc $RPM_OPT_FLAGS"; \
  78. fi
  79. cp busybox busybox-static
  80. # create busybox optimized for anaconda
  81. make clean
  82. # revert the static patches
  83. patch -R -p1 <%{PATCH0}
  84. # applied anaconda patch
  85. patch -b --suffix .anaconda -p1 < %{PATCH1}
  86. make defconfig
  87. make CONFIG_DEBUG=y CC="gcc $RPM_OPT_FLAGS"
  88. cp busybox busybox.anaconda
  89. %install
  90. rm -rf $RPM_BUILD_ROOT
  91. mkdir -p $RPM_BUILD_ROOT/sbin
  92. install -m 755 busybox-static $RPM_BUILD_ROOT/sbin/busybox
  93. install -m 755 busybox.anaconda $RPM_BUILD_ROOT/sbin/busybox.anaconda
  94. %clean
  95. rm -rf $RPM_BUILD_ROOT
  96. %files
  97. %defattr(-,root,root,-)
  98. %doc LICENSE docs/busybox.net/*.html docs/busybox.net/images/*
  99. /sbin/busybox
  100. %files anaconda
  101. %defattr(-,root,root,-)
  102. %doc LICENSE docs/busybox.net/*.html docs/busybox.net/images/*
  103. /sbin/busybox.anaconda
  104. %changelog
  105. * Fri May 08 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.13.4-2
  106. - add Patch20 to fix build failure on ppc
  107. http://lists.uclibc.org/pipermail/uclibc-cvs/2009-January/025891.html
  108. * Mon May 04 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.13.4-1
  109. - new upstream release
  110. - use uClibc for static build instead of glibc
  111. * Fri Sep 19 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.0-1vl5
  112. - applied new versioning policy
  113. * Tue Aug 08 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.0-0vl1
  114. - initial build for Vine Linux based on FC-devel
  115. * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1:1.2.0-1.1
  116. - rebuild
  117. * Tue Jul 4 2006 Ivana Varekova <varekova@redhat.com> - 1:1.2.0-1
  118. - update to 1.2.0
  119. * Thu Jun 8 2006 Jeremy Katz <katzj@redhat.com> - 1:1.1.3-2
  120. - fix so that busybox.anaconda has sh
  121. * Wed May 31 2006 Ivana Varekova <varekova@redhat.com> - 1:1.1.3-1
  122. - update to 1.1.3
  123. * Mon May 29 2006 Ivana Varekova <varekova@redhat.com> - 1:1.1.2-3
  124. - fix Makefile typo (#193354)
  125. * Fri May 5 2006 Ivana Varekova <varekova@redhat.com> - 1:1.1.2-1
  126. - update to 1.1.2
  127. * Thu May 4 2006 Ivana Varekova <varekova@redhat.com> - 1:1.1.1-2
  128. - add -Z option to id command, rename ps command -Z option (#190534)
  129. * Wed May 03 2006 Ivana Varekova <varekova@redhat.com> - 1:1.1.1-1
  130. - update to 1.1.1
  131. - fix CVE-2006-1058 - BusyBox passwd command
  132. fails to generate password with salt (#187386)
  133. - add -minimal-toc option
  134. - add RPM_OPT_FLAGS
  135. - remove asm/page.h used sysconf command to get PAGE_SIZE
  136. - add overfl patch to aviod Buffer warning
  137. * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1:1.01-2.2.1
  138. - bump again for double-long bug on ppc(64)
  139. * Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1:1.01-2.2
  140. - rebuilt for new gcc4.1 snapshot and glibc changes
  141. * Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
  142. - rebuilt
  143. * Thu Oct 13 2005 Daniel Walsh <dwalsh@redhat.com> - 1.01-2
  144. - Add sepol for linking load_policy
  145. * Thu Sep 1 2005 Ivana Varekova <varekova@redhat.com> - 1.01-1
  146. - update to 1.01
  147. * Tue May 11 2005 Ivana Varekova <varekova@redhat.com> - 1.00-5
  148. - add debug files to debug_package
  149. * Mon Mar 7 2005 Ivana Varekova <varekova@redhat.com> - 1.00-4
  150. - rebuilt
  151. * Wed Jan 26 2005 Ivana Varekova <varekova@redhat.com> - 1.00-3
  152. - update to 1.00 - fix bug #145681
  153. - rebuild
  154. * Thu Jan 13 2005 Jeremy Katz <katzj@redhat.com> - 1.00.rc1-6
  155. - enable ash as the shell in busybox-anaconda
  156. * Sat Oct 2 2004 Bill Nottingham <notting@redhat.com> - 1.00.rc1-5
  157. - fix segfault in SELinux patch (#134404, #134406)
  158. * Fri Sep 17 2004 Phil Knirsch <pknirsch@redhat.com> - 1.00.rc1-4
  159. - Fixed double free in freecon() call (#132809)
  160. * Fri Sep 10 2004 Daniel Walsh <dwalsh@redhat.com> - 1.00.rc1-3
  161. - Add CONFIG_STATIC=y for static builds
  162. * Wed Aug 25 2004 Jeremy Katz <katzj@redhat.com> - 1.00.rc1-2
  163. - rebuild
  164. * Fri Jun 25 2004 Dan Walsh <dwalsh@redhat.com> 1.00-pre10.1
  165. - Add BuildRequires libselinux-devel
  166. - Update to latest from upstream
  167. * Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
  168. - rebuilt
  169. * Tue May 11 2004 Karsten Hopp <karsten@redhat.de> 1.00.pre8-4
  170. - add mknod to busybox-anaconda
  171. * Wed Apr 21 2004 Karsten Hopp <karsten@redhat.de> 1.00.pre8-3
  172. - fix LS_COLOR in anaconda patch
  173. * Tue Mar 23 2004 Jeremy Katz <katzj@redhat.com> 1.00.pre8-2
  174. - add awk to busybox-anaconda
  175. * Sat Mar 20 2004 Dan Walsh <dwalsh@redhat.com> 1.00-pre8.1
  176. - Update with latest patch.
  177. - Turn off LS_COLOR in static patch
  178. * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
  179. - rebuilt
  180. * Tue Jan 27 2004 Dan Walsh <dwalsh@redhat.com> 1.00-pre5.2
  181. - Fix is_selinux_enabled calls
  182. * Mon Dec 29 2003 Dan Walsh <dwalsh@redhat.com> 1.00-pre5.1
  183. -Latest update
  184. * Wed Nov 26 2003 Dan Walsh <dwalsh@redhat.com> 1.00-pre3.2
  185. - Add insmod
  186. * Mon Sep 15 2003 Dan Walsh <dwalsh@redhat.com> 1.00-pre3.1
  187. - Upgrade to pre3
  188. * Thu Sep 11 2003 Dan Walsh <dwalsh@redhat.com> 1.00.2
  189. - Upgrade selinux support
  190. * Wed Jul 23 2003 Dan Walsh <dwalsh@redhat.com> 1.00.1
  191. - Upgrade to 1.00 package
  192. * Wed Jul 16 2003 Elliot Lee <sopwith@redhat.com> 0.60.5-10
  193. - Rebuild
  194. * Mon Jul 14 2003 Jeremy Katz <katzj@redhat.com> 0.60.5-9
  195. - rebuild
  196. * Mon Jul 14 2003 Jeremy Katz <katzj@redhat.com> 0.60.5-8
  197. - add dmesg to busybox-anaconda
  198. * Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
  199. - rebuilt
  200. * Wed Jan 22 2003 Tim Powers <timp@redhat.com>
  201. - rebuilt
  202. * Mon Jan 13 2003 Jeremy Katz <katzj@redhat.com> 0.60.5-5
  203. - lost nolock for anaconda mount when rediffing, it returns (#81764)
  204. * Mon Jan 6 2003 Dan Walsh <dwalsh@redhat.com> 0.60.5-4
  205. - Upstream developers wanted to eliminate the use of floats
  206. * Thu Jan 3 2003 Dan Walsh <dwalsh@redhat.com> 0.60.5-3
  207. - Fix free to work on large memory machines.
  208. * Sat Dec 28 2002 Jeremy Katz <katzj@redhat.com> 0.60.5-2
  209. - update Config.h for anaconda build to include more useful utils
  210. * Thu Dec 19 2002 Dan Walsh <dwalsh@redhat.com> 0.60.5-1
  211. - update latest release
  212. * Thu Dec 19 2002 Dan Walsh <dwalsh@redhat.com> 0.60.2-8
  213. - incorporate hammer changes
  214. * Fri Jun 21 2002 Tim Powers <timp@redhat.com>
  215. - automated rebuild
  216. * Thu May 23 2002 Tim Powers <timp@redhat.com>
  217. - automated rebuild
  218. * Mon May 06 2002 Florian La Roche <Florian.LaRoche@redhat.de>
  219. - fix compilation on mainframe
  220. * Tue Apr 2 2002 Jeremy Katz <katzj@redhat.com>
  221. - fix static busybox (#60701)
  222. * Thu Feb 28 2002 Jeremy Katz <katzj@redhat.com>
  223. - don't include mknod in busybox.anaconda so we get collage mknod
  224. * Fri Feb 22 2002 Jeremy Katz <katzj@redhat.com>
  225. - rebuild in new environment
  226. * Wed Jan 30 2002 Jeremy Katz <katzj@redhat.com>
  227. - update to 0.60.2
  228. - include more pieces for the anaconda version so that collage can go away
  229. - make the mount in busybox.anaconda default to -onolock
  230. * Wed Jan 09 2002 Tim Powers <timp@redhat.com>
  231. `- automated rebuild
  232. * Mon Jul 9 2001 Tim Powers <timp@redhat.com>
  233. - don't obsolete sash
  234. - fix URL and spelling in desc. to satisfy rpmlint
  235. * Thu Jul 05 2001 Florian La Roche <Florian.LaRoche@redhat.de>
  236. - add missing defattr for anaconda subpackage
  237. * Thu Jun 28 2001 Erik Troan <ewt@redhat.com>
  238. - initial build for Red Hat