Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/busybox: ChangeLog busybox-1.15.2.ebuild
Date: Thu, 05 Nov 2009 00:52:55
Message-Id: E1N5qar-0001KT-98@stork.gentoo.org
1 vapier 09/11/05 00:52:53
2
3 Modified: ChangeLog
4 Added: busybox-1.15.2.ebuild
5 Log:
6 Version bump #290674 by Sergey Kondakov.
7 (Portage version: 2.2_rc46/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.230 sys-apps/busybox/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/ChangeLog?rev=1.230&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/ChangeLog?rev=1.230&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/ChangeLog?r1=1.229&r2=1.230
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v
19 retrieving revision 1.229
20 retrieving revision 1.230
21 diff -u -r1.229 -r1.230
22 --- ChangeLog 9 Jul 2009 17:12:31 -0000 1.229
23 +++ ChangeLog 5 Nov 2009 00:52:52 -0000 1.230
24 @@ -1,6 +1,12 @@
25 # ChangeLog for sys-apps/busybox
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.229 2009/07/09 17:12:31 solar Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.230 2009/11/05 00:52:52 vapier Exp $
29 +
30 +*busybox-1.15.2 (05 Nov 2009)
31 +
32 + 05 Nov 2009; Mike Frysinger <vapier@g.o> +busybox-1.15.2.ebuild,
33 + +files/busybox-1.15.2-bb.patch:
34 + Version bump #290674 by Sergey Kondakov.
35
36 *busybox-1.14.2 (09 Jul 2009)
37
38
39
40
41 1.1 sys-apps/busybox/busybox-1.15.2.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/busybox-1.15.2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/busybox-1.15.2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: busybox-1.15.2.ebuild
47 ===================================================================
48 # Copyright 1999-2009 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.15.2.ebuild,v 1.1 2009/11/05 00:52:52 vapier Exp $
51
52 inherit eutils flag-o-matic savedconfig toolchain-funcs
53
54 ################################################################################
55 # BUSYBOX ALTERNATE CONFIG MINI-HOWTO
56 #
57 # Busybox can be modified in many different ways. Here's a few ways to do it:
58 #
59 # (1) Emerge busybox with FEATURES=keepwork so the work directory won't
60 # get erased afterwards. Add a definition like ROOT=/my/root/path to the
61 # start of the line if you're installing to somewhere else than the root
62 # directory. This command will save the default configuration to
63 # ${PORTAGE_CONFIGROOT} (or ${ROOT} if ${PORTAGE_CONFIGROOT} is not
64 # defined), and it will tell you that it has done this. Note the location
65 # where the config file was saved.
66 #
67 # FEATURES=keepwork USE=savedconfig emerge busybox
68 #
69 # (2) Go to the work directory and change the configuration of busybox using its
70 # menuconfig feature.
71 #
72 # cd /var/tmp/portage/busybox*/work/busybox-*
73 # make menuconfig
74 #
75 # (3) Save your configuration to the default location and copy it to the
76 # one of the locations listed in /usr/portage/eclass/savedconfig.eclass
77 #
78 # (4) Emerge busybox with USE=savedconfig to use the configuration file you
79 # just generated.
80 #
81 ################################################################################
82 #
83 # (1) Alternatively skip the above steps and simply emerge busybox without
84 # USE=savedconfig.
85 #
86 # (2) Edit the file it saves by hand. ${ROOT}"/etc/portage/savedconfig/${CATEGORY}/${PF}
87 #
88 # (3) Remerge busybox as using USE=savedconfig.
89 #
90 ################################################################################
91
92 #SNAPSHOT=20040726
93 SNAPSHOT=""
94
95 DESCRIPTION="Utilities for rescue and embedded systems"
96 HOMEPAGE="http://www.busybox.net/"
97 if [[ -n ${SNAPSHOT} ]] ; then
98 MY_P=${PN}
99 SRC_URI="http://www.busybox.net/downloads/snapshots/${PN}-${SNAPSHOT}.tar.bz2"
100 else
101 MY_P=${PN}-${PV/_/-}
102 SRC_URI="http://www.busybox.net/downloads/${MY_P}.tar.bz2"
103 fi
104 LICENSE="GPL-2"
105 SLOT="0"
106 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
107 IUSE="debug make-symlinks pam selinux static"
108 RESTRICT="test"
109
110 DEPEND="selinux? ( sys-libs/libselinux )
111 pam? ( sys-libs/pam )"
112
113 S=${WORKDIR}/${MY_P}
114
115 busybox_config_option() {
116 case $1 in
117 y) sed -i -e "s:.*CONFIG_$2.*set:CONFIG_$2=y:g" .config;;
118 n) sed -i -e "s:CONFIG_$2=y:# CONFIG_$2 is not set:g" .config;;
119 *) use $1 \
120 && busybox_config_option y $2 \
121 || busybox_config_option n $2
122 return 0
123 ;;
124 esac
125 einfo $(grep "CONFIG_$2[= ]" .config || echo Could not find CONFIG_$2 ...)
126 }
127
128 src_unpack() {
129 unset KBUILD_OUTPUT #88088
130
131 unpack ${MY_P}.tar.bz2
132 cd "${S}"
133
134 # patches go here!
135 epatch "${FILESDIR}"/busybox-1.15.2-bb.patch
136 #epatch "${FILESDIR}"/busybox-${PV}-*.patch
137
138 # work around broken ass powerpc compilers
139 use ppc64 && append-flags -mminimal-toc
140 # flag cleanup
141 sed -i -r \
142 -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
143 Makefile.flags || die
144 #sed -i '/bbsh/s:^//::' include/applets.h
145 sed -i '/^#error Aborting compilation./d' applets/applets.c || die
146 use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
147 sed -i \
148 -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
149 -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
150 Makefile || die
151
152 # check for a busybox config before making one of our own.
153 # if one exist lets return and use it.
154
155 restore_config .config
156 if [ -f .config ]; then
157 yes "" | emake -j1 oldconfig > /dev/null
158 return 0
159 else
160 ewarn "Could not locate user configfile, so we will save a default one"
161 fi
162
163 # setup the config file
164 emake -j1 allyesconfig > /dev/null
165 busybox_config_option n DMALLOC
166 busybox_config_option n FEATURE_SUID_CONFIG
167 busybox_config_option n BUILD_AT_ONCE
168 busybox_config_option n BUILD_LIBBUSYBOX
169 busybox_config_option n NOMMU
170 busybox_config_option n MONOTONIC_SYSCALL
171
172 # If these are not set and we are using a uclibc/busybox setup
173 # all calls to system() will fail.
174 busybox_config_option y FEATURE_SH_IS_ASH
175 busybox_config_option n FEATURE_SH_IS_NONE
176
177 if use static && use pam ; then
178 ewarn "You cannot have USE='static pam'. Assuming static is more important."
179 fi
180 use static \
181 && busybox_config_option n PAM \
182 || busybox_config_option pam PAM
183 busybox_config_option static STATIC
184 busybox_config_option debug DEBUG
185 use debug \
186 && busybox_config_option y NO_DEBUG_LIB \
187 && busybox_config_option n DMALLOC \
188 && busybox_config_option n EFENCE
189
190 busybox_config_option selinux SELINUX
191
192 # default a bunch of uncommon options to off
193 local opt
194 for opt in \
195 CRONTAB \
196 DC DEVFSD DNSD DPKG \
197 FAKEIDENTD FBSPLASH FOLD FTP{GET,PUT} \
198 HOSTID HUSH \
199 INETD INOTIFYD IPCALC \
200 LASH LOCALE_SUPPORT LOGNAME LPD \
201 MSH \
202 OD \
203 SLATTACH SULOGIN \
204 TASKSET TCPSVD \
205 RPM RPM2CPIO \
206 UDPSVD UUDECODE UUENCODE
207 do
208 busybox_config_option n ${opt}
209 done
210
211 emake -j1 oldconfig > /dev/null
212 }
213
214 src_compile() {
215 unset KBUILD_OUTPUT #88088
216 export SKIP_STRIP=y
217
218 emake busybox || die "build failed"
219 if ! use static && ! use pam ; then
220 mv busybox_unstripped{,.bak}
221 emake CONFIG_STATIC=y busybox || die "static build failed"
222 mv busybox_unstripped bb
223 mv busybox_unstripped{.bak,}
224 fi
225 }
226
227 src_install() {
228 unset KBUILD_OUTPUT #88088
229 save_config .config
230
231 into /
232 newbin busybox_unstripped busybox || die
233 if use static || use pam ; then
234 dosym busybox /bin/bb || die
235 dosym bb /bin/busybox.static || die
236 else
237 dobin bb || die
238 fi
239
240 insinto /$(get_libdir)/rcscripts/addons
241 doins "${FILESDIR}"/mdev-start.sh || die
242
243 # bundle up the symlink files for use later
244 emake install || die
245 rm _install/bin/busybox
246 tar cf busybox-links.tar -C _install . || : #;die
247 insinto /usr/share/${PN}
248 doins busybox-links.tar || die
249 newins .config ${PF}.config || die
250
251 dodoc AUTHORS README TODO
252
253 cd docs || die
254 docinto txt
255 dodoc *.txt
256 docinto pod
257 dodoc *.pod
258 dohtml *.html *.sgml
259
260 cd ../examples || die
261 docinto examples
262 dodoc inittab depmod.pl *.conf *.script undeb unrpm
263
264 cd bootfloppy || die
265 docinto bootfloppy
266 dodoc $(find . -type f)
267 }
268
269 pkg_preinst() {
270 if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
271 ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
272 ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
273 ewarn "If you are creating a binary only and not merging this is probably ok."
274 ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is realy what you want."
275 die "silly options will destroy your system"
276 fi
277
278 if use make-symlinks ; then
279 mv "${D}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
280 fi
281 }
282
283 pkg_postinst() {
284 if use make-symlinks ; then
285 cd "${T}" || die
286 mkdir _install
287 tar xf busybox-links.tar -C _install || die
288 cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
289 fi
290
291 echo
292 einfo "This ebuild has support for user defined configs"
293 einfo "Please read this ebuild for more details and re-emerge as needed"
294 einfo "if you want to add or remove functionality for ${PN}"
295 echo
296 }