Gentoo Archives: gentoo-commits

From: "Matsuu Takuto (matsuu)" <matsuu@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/busybox: ChangeLog busybox-1.12.2-r1.ebuild
Date: Fri, 21 Nov 2008 00:14:08
Message-Id: E1L3Jew-0006iv-0i@stork.gentoo.org
1 matsuu 08/11/21 00:14:06
2
3 Modified: ChangeLog
4 Added: busybox-1.12.2-r1.ebuild
5 Log:
6 Fixed cross-distcc issue, bug #131316.
7 (Portage version: 2.2_rc14/cvs/Linux 2.6.27-gentoo-r2 x86_64)
8
9 Revision Changes Path
10 1.207 sys-apps/busybox/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/ChangeLog?rev=1.207&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/ChangeLog?rev=1.207&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/ChangeLog?r1=1.206&r2=1.207
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v
19 retrieving revision 1.206
20 retrieving revision 1.207
21 diff -u -r1.206 -r1.207
22 --- ChangeLog 20 Nov 2008 21:56:26 -0000 1.206
23 +++ ChangeLog 21 Nov 2008 00:14:05 -0000 1.207
24 @@ -1,6 +1,11 @@
25 # ChangeLog for sys-apps/busybox
26 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.206 2008/11/20 21:56:26 jer Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.207 2008/11/21 00:14:05 matsuu Exp $
29 +
30 +*busybox-1.12.2-r1 (21 Nov 2008)
31 +
32 + 21 Nov 2008; MATSUU Takuto <matsuu@g.o> +busybox-1.12.2-r1.ebuild:
33 + Fixed cross-distcc issue, bug #131316.
34
35 20 Nov 2008; Jeroen Roovers <jer@g.o> busybox-1.11.1.ebuild,
36 busybox-1.11.3.ebuild, busybox-1.12.0.ebuild, busybox-1.12.1.ebuild,
37
38
39
40 1.1 sys-apps/busybox/busybox-1.12.2-r1.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/busybox-1.12.2-r1.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/busybox-1.12.2-r1.ebuild?rev=1.1&content-type=text/plain
44
45 Index: busybox-1.12.2-r1.ebuild
46 ===================================================================
47 # Copyright 1999-2008 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.12.2-r1.ebuild,v 1.1 2008/11/21 00:14:05 matsuu 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)
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 # include this upstream later..
138 epatch "${FILESDIR}"/busybox-devmem.patch
139
140 epatch "${FILESDIR}"/busybox-1.12.0-mdev-exec.patch
141
142 # work around broken ass powerpc compilers
143 use ppc64 && append-flags -mminimal-toc
144 # flag cleanup
145 sed -i -r \
146 -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
147 Makefile.flags || die
148 sed -i '/^#error Aborting compilation./d' applets/applets.c || die
149 use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
150 sed -i \
151 -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
152 -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
153 Makefile || die
154
155 # check for a busybox config before making one of our own.
156 # if one exist lets return and use it.
157
158 restore_config .config
159 if [ -f .config ]; then
160 yes "" | emake -j1 oldconfig > /dev/null
161 return 0
162 else
163 ewarn "Could not locate user configfile, so we will save a default one"
164 fi
165
166 # setup the config file
167 emake -j1 allyesconfig > /dev/null
168 busybox_config_option n DMALLOC
169 busybox_config_option n FEATURE_SUID_CONFIG
170 busybox_config_option n BUILD_AT_ONCE
171 busybox_config_option n BUILD_LIBBUSYBOX
172 busybox_config_option n NOMMU
173 busybox_config_option n MONOTONIC_SYSCALL
174
175 # If these are not set and we are using a uclibc/busybox setup
176 # all calls to system() will fail.
177 busybox_config_option y FEATURE_SH_IS_ASH
178 busybox_config_option n FEATURE_SH_IS_NONE
179
180 if use static && use pam ; then
181 ewarn "You cannot have USE='static pam'. Assuming static is more important."
182 fi
183 use static \
184 && busybox_config_option n PAM \
185 || busybox_config_option pam PAM
186 busybox_config_option static STATIC
187 busybox_config_option debug DEBUG
188 use debug \
189 && busybox_config_option y NO_DEBUG_LIB \
190 && busybox_config_option n DMALLOC \
191 && busybox_config_option n EFENCE
192
193 busybox_config_option selinux SELINUX
194
195 # default a bunch of uncommon options to off
196 for opt in LOCALE_SUPPORT TFTP FTP{GET,PUT} IPCALC TFTP HUSH \
197 LASH MSH INETD DPKG RPM2CPIO RPM FOLD LOGNAME OD CRONTAB \
198 UUDECODE UUENCODE SULOGIN DC DEBUG_YANK_SUSv2 DEBUG_INIT \
199 DEBUG_CROND_OPTION FEATURE_UDHCP_DEBUG TASKSET INOTIFYD
200 do
201 busybox_config_option n ${opt}
202 done
203
204 emake -j1 oldconfig > /dev/null
205 }
206
207 src_compile() {
208 unset KBUILD_OUTPUT #88088
209 export SKIP_STRIP=y
210
211 emake busybox || die "build failed"
212 if ! use static && ! use pam ; then
213 mv busybox_unstripped{,.bak}
214 emake CONFIG_STATIC=y busybox || die "static build failed"
215 mv busybox_unstripped bb
216 mv busybox_unstripped{.bak,}
217 fi
218 }
219
220 src_install() {
221 unset KBUILD_OUTPUT #88088
222 save_config .config
223
224 into /
225 newbin busybox_unstripped busybox || die
226 if use static || use pam ; then
227 dosym busybox /bin/bb || die
228 dosym bb /bin/busybox.static || die
229 else
230 dobin bb || die
231 fi
232
233 insinto /$(get_libdir)/rcscripts/addons
234 doins "${FILESDIR}"/mdev-start.sh || die
235
236 # bundle up the symlink files for use later
237 emake install || die
238 rm _install/bin/busybox
239 tar cf busybox-links.tar -C _install . || : #;die
240 insinto /usr/share/${PN}
241 doins busybox-links.tar || die
242 newins .config ${PF}.config || die
243
244 dodoc AUTHORS README TODO
245
246 cd docs || die
247 docinto txt
248 dodoc *.txt
249 docinto pod
250 dodoc *.pod
251 dohtml *.html *.sgml
252
253 cd ../examples || die
254 docinto examples
255 dodoc inittab depmod.pl *.conf *.script undeb unrpm
256
257 cd bootfloppy || die
258 docinto bootfloppy
259 dodoc $(find . -type f)
260 }
261
262 pkg_preinst() {
263 if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
264 ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
265 ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
266 ewarn "If you are creating a binary only and not merging this is probably ok."
267 ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is realy what you want."
268 die "silly options will destroy your system"
269 fi
270
271 if use make-symlinks ; then
272 mv "${D}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
273 fi
274 }
275
276 pkg_postinst() {
277 if use make-symlinks ; then
278 cd "${T}" || die
279 mkdir _install
280 tar xf busybox-links.tar -C _install || die
281 cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
282 fi
283
284 echo
285 einfo "This ebuild has support for user defined configs"
286 einfo "Please read this ebuild for more details and re-emerge as needed"
287 einfo "if you want to add or remove functionality for ${PN}"
288 echo
289 }