Gentoo Archives: gentoo-commits

From: "Alon Bar-Lev (alonbl)" <alonbl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/busybox: ChangeLog busybox-1.8.2.ebuild
Date: Wed, 28 Nov 2007 21:34:09
Message-Id: E1IxUXi-0000nN-6E@stork.gentoo.org
1 alonbl 07/11/28 21:34:02
2
3 Modified: ChangeLog
4 Added: busybox-1.8.2.ebuild
5 Log:
6 Version bump, add uclibc USE flag, bug#200367
7 (Portage version: 2.1.4_rc3)
8
9 Revision Changes Path
10 1.164 sys-apps/busybox/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/ChangeLog?rev=1.164&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/ChangeLog?rev=1.164&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/ChangeLog?r1=1.163&r2=1.164
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v
19 retrieving revision 1.163
20 retrieving revision 1.164
21 diff -u -r1.163 -r1.164
22 --- ChangeLog 4 Nov 2007 19:09:38 -0000 1.163
23 +++ ChangeLog 28 Nov 2007 21:34:01 -0000 1.164
24 @@ -1,6 +1,12 @@
25 # ChangeLog for sys-apps/busybox
26 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.163 2007/11/04 19:09:38 solar Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.164 2007/11/28 21:34:01 alonbl Exp $
29 +
30 +*busybox-1.8.2 (28 Nov 2007)
31 +
32 + 28 Nov 2007; Alon Bar-Lev <alonbl@g.o>
33 + +files/busybox-1.8.2-flags-strip.patch, +busybox-1.8.2.ebuild:
34 + Version bump, add uclibc USE flag, bug#200367
35
36 *busybox-1.7.3 (04 Nov 2007)
37
38
39
40
41 1.1 sys-apps/busybox/busybox-1.8.2.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/busybox-1.8.2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/busybox-1.8.2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: busybox-1.8.2.ebuild
47 ===================================================================
48 # Copyright 1999-2007 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.8.2.ebuild,v 1.1 2007/11/28 21:34:01 alonbl Exp $
51
52 inherit eutils flag-o-matic savedconfig
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
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
105 LICENSE="GPL-2"
106 SLOT="0"
107 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
108 IUSE="debug pam static make-symlinks selinux uclibc"
109 RESTRICT="test"
110
111 DEPEND="selinux? ( sys-libs/libselinux )
112 pam? ( sys-libs/pam )"
113
114 S=${WORKDIR}/${MY_P}
115
116 busybox_config_option() {
117 case $1 in
118 y) sed -i -e "s:.*CONFIG_$2.*set:CONFIG_$2=y:g" .config;;
119 n) sed -i -e "s:CONFIG_$2=y:# CONFIG_$2 is not set:g" .config;;
120 *) use $1 \
121 && busybox_config_option y $2 \
122 || busybox_config_option n $2
123 return 0
124 ;;
125 esac
126 einfo $(grep "CONFIG_$2[= ]" .config)
127 }
128
129 src_unpack() {
130 unset KBUILD_OUTPUT #88088
131
132 unpack ${MY_P}.tar.bz2
133 cd "${S}"
134
135 # patches go here!
136 epatch "${FILESDIR}"/busybox-1.7.0-bb.patch
137
138 # work around broken ass powerpc compilers
139 use ppc64 && append-flags -mminimal-toc
140 if ! use uclibc; then
141 epatch "${FILESDIR}/${P}-flags-strip.patch"
142 sed -i 's:-Wl,--gc-sections::' scripts/trylink
143 sed -i '/^#error Aborting compilation./d' applets/applets.c
144 fi
145 echo "CROSS_COMPILE := ${CHOST}-" >> Makefile.local
146
147 # check for a busybox config before making one of our own.
148 # if one exist lets return and use it.
149
150 restore_config .config
151 if [ -f .config ]; then
152 yes "" | make oldconfig > /dev/null
153 return 0
154 else
155 ewarn "Could not locate user configfile, so we will save a default one"
156
157 # setup the config file
158 make allyesconfig > /dev/null
159 busybox_config_option n DMALLOC
160 busybox_config_option n FEATURE_SUID_CONFIG
161 busybox_config_option n BUILD_AT_ONCE
162 busybox_config_option n BUILD_LIBBUSYBOX
163
164 # If these are not set and we are using a uclibc/busybox setup
165 # all calls to system() will fail.
166 busybox_config_option y FEATURE_SH_IS_ASH
167 busybox_config_option n FEATURE_SH_IS_NONE
168
169 # default a bunch of uncommon options to off
170 for opt in LOCALE_SUPPORT TFTP FTP{GET,PUT} IPCALC TFTP HUSH \
171 LASH MSH INETD DPKG RPM2CPIO RPM FOLD LOGNAME OD CRONTAB \
172 UUDECODE UUENCODE SULOGIN DC DEBUG_INIT \
173 DEBUG_CROND_OPTION FEATURE_UDHCP_DEBUG TASKSET \
174 WERROR
175 do
176 busybox_config_option n ${opt}
177 done
178 fi
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 make oldconfig > /dev/null
196 }
197
198 src_compile() {
199 unset KBUILD_OUTPUT #88088
200
201 emake busybox || die "build failed"
202 if ! use static && ! use pam ; then
203 mv busybox_unstripped{,.bak}
204 emake CONFIG_STATIC=y busybox || die "static build failed"
205 mv busybox_unstripped bb
206 mv busybox_unstripped{.bak,}
207 fi
208 }
209
210 src_install() {
211 unset KBUILD_OUTPUT #88088
212 save_config .config
213
214 into /
215 newbin busybox_unstripped busybox || die
216 if use static || use pam ; then
217 dosym busybox /bin/bb || die
218 dosym bb /bin/busybox.static || die
219 else
220 dobin bb || die
221 fi
222
223 insinto /$(get_libdir)/rcscripts/addons
224 doins "${FILESDIR}"/mdev-start.sh || die
225
226 # bundle up the symlink files for use later
227 emake install || die
228 rm _install/bin/busybox
229 tar cf busybox-links.tar -C _install . || : #;die
230 insinto /usr/share/${PN}
231 doins busybox-links.tar || die
232 newins .config ${PF}.config || die
233
234 dodoc AUTHORS README TODO
235
236 cd docs || die
237 docinto txt
238 dodoc *.txt
239 docinto pod
240 dodoc *.pod
241 dohtml *.html *.sgml
242
243 cd ../examples || die
244 docinto examples
245 dodoc inittab depmod.pl *.conf *.script undeb unrpm
246
247 cd bootfloppy || die
248 docinto bootfloppy
249 dodoc * etc/* etc/init.d/* 2>/dev/null
250 }
251
252 pkg_preinst() {
253 if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
254 ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
255 ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
256 ewarn "If you are creating a binary only and not merging this is probably ok."
257 ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is realy what you want."
258 die "silly options will destroy your system"
259 fi
260
261 if use make-symlinks ; then
262 mv "${D}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
263 fi
264 }
265
266 pkg_postinst() {
267 if use make-symlinks ; then
268 cd "${T}" || die
269 mkdir _install
270 tar xf busybox-links.tar -C _install || die
271 cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
272 fi
273
274 echo
275 einfo "This ebuild has support for user defined configs"
276 einfo "Please read this ebuild for more details and re-emerge as needed"
277 einfo "if you want to add or remove functionality for ${PN}"
278 echo
279 }
280
281
282
283 --
284 gentoo-commits@g.o mailing list