Gentoo Archives: gentoo-commits

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