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.7.1.ebuild
Date: Thu, 27 Sep 2007 15:44:58
Message-Id: E1IavPY-00047t-F8@stork.gentoo.org
1 solar 07/09/27 15:36:20
2
3 Modified: ChangeLog
4 Added: busybox-1.7.1.ebuild
5 Log:
6 - version bump
7 (Portage version: 2.1.2.7)
8
9 Revision Changes Path
10 1.159 sys-apps/busybox/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/ChangeLog?rev=1.159&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/ChangeLog?rev=1.159&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/ChangeLog?r1=1.158&r2=1.159
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v
19 retrieving revision 1.158
20 retrieving revision 1.159
21 diff -u -r1.158 -r1.159
22 --- ChangeLog 20 Sep 2007 07:39:32 -0000 1.158
23 +++ ChangeLog 27 Sep 2007 15:36:19 -0000 1.159
24 @@ -1,6 +1,11 @@
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.158 2007/09/20 07:39:32 vapier Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.159 2007/09/27 15:36:19 solar Exp $
29 +
30 +*busybox-1.7.1 (27 Sep 2007)
31 +
32 + 27 Sep 2007; <solar@g.o> +busybox-1.7.1.ebuild:
33 + - version bump
34
35 20 Sep 2007; Mike Frysinger <vapier@g.o> busybox-1.7.0.ebuild:
36 Pull in pam when USE=pam #192895 by Marek Bartosiewicz.
37
38
39
40 1.1 sys-apps/busybox/busybox-1.7.1.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/busybox-1.7.1.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/busybox-1.7.1.ebuild?rev=1.1&content-type=text/plain
44
45 Index: busybox-1.7.1.ebuild
46 ===================================================================
47 # Copyright 1999-2007 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.7.1.ebuild,v 1.1 2007/09/27 15:36:19 solar Exp $
50
51 inherit eutils flag-o-matic savedconfig
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
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
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 pam static make-symlinks selinux"
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)
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.7.0-bb.patch
136
137 # work around broken ass powerpc compilers
138 use ppc64 && append-flags -mminimal-toc
139 # flag cleanup
140 sed -i \
141 -e 's:,-Werror,:,,:' \
142 -e 's:-Os -falign-functions=1 -falign-jumps=1 -falign-loops=1::' \
143 -e 's:-fomit-frame-pointer::' \
144 Makefile.flags
145 sed -i 's:-Wl,--gc-sections::' Makefile
146 sed -i '/^#error Aborting compilation./d' applets/applets.c
147 sed -i "/^CFLAGS.*:=/s:$: ${CFLAGS}:" Makefile
148 echo "CROSS_COMPILE := ${CHOST}-" >> Makefile.flags
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 "" | make 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 make 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
168 # If these are not set and we are using a uclibc/busybox setup
169 # all calls to system() will fail.
170 busybox_config_option y FEATURE_SH_IS_ASH
171 busybox_config_option n FEATURE_SH_IS_NONE
172
173 if use static && use pam ; then
174 ewarn "You cannot have USE='static pam'. Assuming static is more important."
175 fi
176 use static \
177 && busybox_config_option n PAM \
178 || busybox_config_option pam PAM
179 busybox_config_option static STATIC
180 busybox_config_option debug DEBUG
181 use debug \
182 && busybox_config_option y NO_DEBUG_LIB \
183 && busybox_config_option n DMALLOC \
184 && busybox_config_option n EFENCE
185
186 busybox_config_option selinux SELINUX
187
188 # default a bunch of uncommon options to off
189 for opt in LOCALE_SUPPORT TFTP FTP{GET,PUT} IPCALC TFTP HUSH \
190 LASH MSH INETD DPKG RPM2CPIO RPM FOLD LOGNAME OD CRONTAB \
191 UUDECODE UUENCODE SULOGIN DC DEBUG_YANK_SUSv2 DEBUG_INIT \
192 DEBUG_CROND_OPTION FEATURE_UDHCP_DEBUG TASKSET
193 do
194 busybox_config_option n ${opt}
195 done
196
197 make oldconfig > /dev/null
198 }
199
200 src_compile() {
201 unset KBUILD_OUTPUT #88088
202
203 emake busybox || die "build failed"
204 if ! use static && ! use pam ; then
205 mv busybox_unstripped{,.bak}
206 emake CONFIG_STATIC=y busybox || die "static build failed"
207 mv busybox_unstripped bb
208 mv busybox_unstripped{.bak,}
209 fi
210 }
211
212 src_install() {
213 unset KBUILD_OUTPUT #88088
214 save_config .config
215
216 into /
217 newbin busybox_unstripped busybox || die
218 if use static || use pam ; then
219 dosym busybox /bin/bb || die
220 dosym bb /bin/busybox.static || die
221 else
222 dobin bb || die
223 fi
224
225 insinto /$(get_libdir)/rcscripts/addons
226 doins "${FILESDIR}"/mdev-start.sh || die
227
228 # bundle up the symlink files for use later
229 emake install || die
230 rm _install/bin/busybox
231 tar cf busybox-links.tar -C _install . || : #;die
232 insinto /usr/share/${PN}
233 doins busybox-links.tar || die
234 newins .config ${PF}.config || die
235
236 dodoc AUTHORS README TODO
237
238 cd docs || die
239 docinto txt
240 dodoc *.txt
241 docinto pod
242 dodoc *.pod
243 dohtml *.html *.sgml
244
245 cd ../examples || die
246 docinto examples
247 dodoc inittab depmod.pl *.conf *.script undeb unrpm
248
249 cd bootfloppy || die
250 docinto bootfloppy
251 dodoc * etc/* etc/init.d/* 2>/dev/null
252 }
253
254 pkg_preinst() {
255 if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
256 ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
257 ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
258 ewarn "If you are creating a binary only and not merging this is probably ok."
259 ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is realy what you want."
260 die "silly options will destroy your system"
261 fi
262
263 if use make-symlinks ; then
264 mv "${D}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
265 fi
266 }
267
268 pkg_postinst() {
269 if use make-symlinks ; then
270 cd "${T}" || die
271 mkdir _install
272 tar xf busybox-links.tar -C _install || die
273 cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
274 fi
275
276 echo
277 einfo "This ebuild has support for user defined configs"
278 einfo "Please read this ebuild for more details and re-emerge as needed"
279 einfo "if you want to add or remove functionality for ${PN}"
280 echo
281 }
282
283
284
285 --
286 gentoo-commits@g.o mailing list