Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/busybox/
Date: Tue, 29 May 2018 14:31:04
Message-Id: 1527604254.a65f7770ff848b521e31d67753e340f8a46b92bc.zlogene@gentoo
1 commit: a65f7770ff848b521e31d67753e340f8a46b92bc
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 29 14:30:32 2018 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Tue May 29 14:30:54 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a65f7770
7
8 sys-apps/busybox: Drop old
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 sys-apps/busybox/Manifest | 1 -
13 sys-apps/busybox/busybox-1.28.1.ebuild | 323 ---------------------------------
14 2 files changed, 324 deletions(-)
15
16 diff --git a/sys-apps/busybox/Manifest b/sys-apps/busybox/Manifest
17 index 6958ccd0259..7217e409d15 100644
18 --- a/sys-apps/busybox/Manifest
19 +++ b/sys-apps/busybox/Manifest
20 @@ -1,4 +1,3 @@
21 DIST busybox-1.28.0.tar.bz2 2261831 BLAKE2B 9cbb133d59711dde90ef5b20bfd4b892e34565103eaa64b2000b042bd2b9b234df14b5e8b74f7cf8f9071b907e1b9eff556e852bb921088d81548473430d3acf SHA512 346a71d44e6c4e1889ac12ae52320cb0c3d0c45c2b4b49fc4e3c0bb25f427707d8075150d545906f414b9f4e5b6d8f1a3afe8cdc31f6a64e06c62b400d7d129b
22 -DIST busybox-1.28.1.tar.bz2 2260551 BLAKE2B 5dbe7d4fe63ff187bb1458368891c570016cd67406b7e1e4f675555d969c8655d258a0f6b3ba0ac26cc65739d65694f9042d00d9920ee610a6f79f62fb9bfb5d SHA512 c2d551eb70210d63d891614f4469ad3ec151dbd10fce96b2355dd1f2ea43a32ed08cc8f1d1ab361fb547199a19902d17a2935b839aeee2e1c3c8a1ed012db732
23 DIST busybox-1.28.3.tar.bz2 2260586 BLAKE2B f2fec31ab1c6e6b865cea20a2819f58cb8e4c789051a8fdc8c8ca43367049fa9038e07f3fe806ba7abd90cb6a6aefdb0d095afb68119c11e94240647da6d48ce SHA512 0e87019d9d1179bc072a5ef9752d7342747e311db13c0b0dfa9f380a1e3ad1c265cca118d41f86829629ec5c8eb3e83985421c6f3ea6c8a9991b92ed301a4982
24 DIST busybox-1.28.4.tar.bz2 2263342 BLAKE2B f35c81e67136d888a998f41b1418589e4bddaacde25d55eb509822a13ab93d351dcda6b147794a47e3c3c5c4141e9d8cc834ed239e0afba176f08bf3cb55b911 SHA512 92471617fcf3c1e28b468f3de2c83a1041f5ba5106580cc791e9c4cd602b7ccffabc51ce0807881ed734a89c3089113048265d6659a4d595528bd9150288d2ed
25
26 diff --git a/sys-apps/busybox/busybox-1.28.1.ebuild b/sys-apps/busybox/busybox-1.28.1.ebuild
27 deleted file mode 100644
28 index 68000bffa17..00000000000
29 --- a/sys-apps/busybox/busybox-1.28.1.ebuild
30 +++ /dev/null
31 @@ -1,323 +0,0 @@
32 -# Copyright 1999-2018 Gentoo Foundation
33 -# Distributed under the terms of the GNU General Public License v2
34 -
35 -# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
36 -
37 -EAPI="5"
38 -inherit eutils flag-o-matic savedconfig toolchain-funcs multilib
39 -
40 -DESCRIPTION="Utilities for rescue and embedded systems"
41 -HOMEPAGE="https://www.busybox.net/"
42 -if [[ ${PV} == "9999" ]] ; then
43 - MY_P=${P}
44 - EGIT_REPO_URI="https://git.busybox.net/busybox"
45 - inherit git-r3
46 -else
47 - MY_P=${PN}-${PV/_/-}
48 - SRC_URI="https://www.busybox.net/downloads/${MY_P}.tar.bz2"
49 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
50 -fi
51 -
52 -LICENSE="GPL-2" # GPL-2 only
53 -SLOT="0"
54 -IUSE="debug ipv6 livecd make-symlinks math mdev pam selinux sep-usr static syslog systemd"
55 -REQUIRED_USE="pam? ( !static )"
56 -RESTRICT="test"
57 -
58 -COMMON_DEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
59 - pam? ( sys-libs/pam )"
60 -DEPEND="${COMMON_DEPEND}
61 - static? ( selinux? ( sys-libs/libselinux[static-libs(+)] ) )
62 - >=sys-kernel/linux-headers-2.6.39"
63 -RDEPEND="${COMMON_DEPEND}
64 - mdev? ( !<sys-apps/openrc-0.13 )"
65 -
66 -S=${WORKDIR}/${MY_P}
67 -
68 -busybox_config_option() {
69 - local flag=$1 ; shift
70 - if [[ ${flag} != [yn] && ${flag} != \"* ]] ; then
71 - busybox_config_option $(usex ${flag} y n) "$@"
72 - return
73 - fi
74 - local expr
75 - while [[ $# -gt 0 ]] ; do
76 - case ${flag} in
77 - y) expr="s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" ;;
78 - n) expr="s:CONFIG_$1=y:# CONFIG_$1 is not set:g" ;;
79 - *) expr="s:.*\<CONFIG_$1\>.*:CONFIG_$1=${flag}:g" ;;
80 - esac
81 - sed -i -e "${expr}" .config || die
82 - einfo "$(grep "CONFIG_$1[= ]" .config || echo "Could not find CONFIG_$1 ...")"
83 - shift
84 - done
85 -}
86 -
87 -busybox_config_enabled() {
88 - local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config)
89 - case ${val} in
90 - "") return 1 ;;
91 - y) return 0 ;;
92 - *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;;
93 - esac
94 -}
95 -
96 -src_prepare() {
97 - unset KBUILD_OUTPUT #88088
98 - append-flags -fno-strict-aliasing #310413
99 - use ppc64 && append-flags -mminimal-toc #130943
100 -
101 - # patches go here!
102 - epatch "${FILESDIR}"/${PN}-1.26.2-bb.patch
103 -# epatch "${FILESDIR}"/${P}-*.patch
104 - cp "${FILESDIR}"/ginit.c init/ || die
105 -
106 - # flag cleanup
107 - sed -i -r \
108 - -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
109 - Makefile.flags || die
110 - #sed -i '/bbsh/s:^//::' include/applets.h
111 - sed -i '/^#error Aborting compilation./d' applets/applets.c || die
112 - use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
113 - sed -i \
114 - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
115 - -e "/^AR\>/s:=.*:= $(tc-getAR):" \
116 - -e "/^CC\>/s:=.*:= $(tc-getCC):" \
117 - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
118 - -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
119 - Makefile || die
120 - sed -i \
121 - -e 's:-static-libgcc::' \
122 - Makefile.flags || die
123 -}
124 -
125 -src_configure() {
126 - # check for a busybox config before making one of our own.
127 - # if one exist lets return and use it.
128 -
129 - restore_config .config
130 - if [ -f .config ]; then
131 - yes "" | emake -j1 -s oldconfig >/dev/null
132 - return 0
133 - else
134 - ewarn "Could not locate user configfile, so we will save a default one"
135 - fi
136 -
137 - # setup the config file
138 - emake -j1 -s allyesconfig >/dev/null
139 - # nommu forces a bunch of things off which we want on #387555
140 - busybox_config_option n NOMMU
141 - sed -i '/^#/d' .config
142 - yes "" | emake -j1 -s oldconfig >/dev/null
143 -
144 - # now turn off stuff we really don't want
145 - busybox_config_option n DMALLOC
146 - busybox_config_option n FEATURE_2_4_MODULES #607548
147 - busybox_config_option n FEATURE_SUID_CONFIG
148 - busybox_config_option n BUILD_AT_ONCE
149 - busybox_config_option n BUILD_LIBBUSYBOX
150 - busybox_config_option n FEATURE_CLEAN_UP
151 - busybox_config_option n MONOTONIC_SYSCALL
152 - busybox_config_option n USE_PORTABLE_CODE
153 - busybox_config_option n WERROR
154 - # triming the BSS size may be dangerous
155 - busybox_config_option n FEATURE_USE_BSS_TAIL
156 -
157 - # These cause trouble with musl.
158 - if use elibc_musl; then
159 - busybox_config_option n FEATURE_UTMP
160 - busybox_config_option n EXTRA_COMPAT
161 - busybox_config_option n FEATURE_VI_REGEX_SEARCH
162 - fi
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 ASH
167 - busybox_config_option y SH_IS_ASH
168 - busybox_config_option n HUSH
169 - busybox_config_option n SH_IS_HUSH
170 -
171 - busybox_config_option '"/run"' PID_FILE_PATH
172 - busybox_config_option '"/run/ifstate"' IFUPDOWN_IFSTATE_PATH
173 -
174 - # disable ipv6 applets
175 - if ! use ipv6; then
176 - busybox_config_option n FEATURE_IPV6
177 - busybox_config_option n TRACEROUTE6
178 - busybox_config_option n PING6
179 - busybox_config_option n UDHCPC6
180 - fi
181 -
182 - busybox_config_option pam PAM
183 - busybox_config_option static STATIC
184 - busybox_config_option syslog {K,SYS}LOGD LOGGER
185 - busybox_config_option systemd FEATURE_SYSTEMD
186 - busybox_config_option math FEATURE_AWK_LIBM
187 -
188 - # disable features that uClibc doesn't (yet?) provide.
189 - if use elibc_uclibc; then
190 - busybox_config_option n FEATURE_SYNC_FANCY #567598
191 - busybox_config_option n NSENTER
192 - fi
193 -
194 - # all the debug options are compiler related, so punt them
195 - busybox_config_option n DEBUG_SANITIZE
196 - busybox_config_option n DEBUG
197 - busybox_config_option y NO_DEBUG_LIB
198 - busybox_config_option n DMALLOC
199 - busybox_config_option n EFENCE
200 - busybox_config_option $(usex debug y n) TFTP_DEBUG
201 -
202 - busybox_config_option selinux SELINUX
203 -
204 - # this opt only controls mounting with <linux-2.6.23
205 - busybox_config_option n FEATURE_MOUNT_NFS
206 -
207 - # default a bunch of uncommon options to off
208 - local opt
209 - for opt in \
210 - ADD_SHELL \
211 - BEEP BOOTCHARTD \
212 - CRONTAB \
213 - DC DEVFSD DNSD DPKG{,_DEB} \
214 - FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
215 - FEATURE_DEVFS \
216 - HOSTID HUSH \
217 - INETD INOTIFYD IPCALC \
218 - LOCALE_SUPPORT LOGNAME LPD \
219 - MAKEMIME MKFS_MINIX MSH \
220 - OD \
221 - RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \
222 - SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
223 - TASKSET TCPSVD \
224 - RPM RPM2CPIO \
225 - UDPSVD UUDECODE UUENCODE
226 - do
227 - busybox_config_option n ${opt}
228 - done
229 -
230 - emake -j1 oldconfig > /dev/null
231 -}
232 -
233 -src_compile() {
234 - unset KBUILD_OUTPUT #88088
235 - export SKIP_STRIP=y
236 -
237 - emake V=1 busybox
238 -}
239 -
240 -src_install() {
241 - unset KBUILD_OUTPUT #88088
242 - save_config .config
243 -
244 - into /
245 - dodir /bin
246 - if use sep-usr ; then
247 - # install /ginit to take care of mounting stuff
248 - exeinto /
249 - newexe busybox_unstripped ginit
250 - dosym /ginit /bin/bb
251 - dosym bb /bin/busybox
252 - else
253 - newbin busybox_unstripped busybox
254 - dosym busybox /bin/bb
255 - fi
256 - if use mdev ; then
257 - dodir /$(get_libdir)/mdev/
258 - use make-symlinks || dosym /bin/bb /sbin/mdev
259 - cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
260 -
261 - exeinto /$(get_libdir)/mdev/
262 - doexe "${FILESDIR}"/mdev/*
263 -
264 - newinitd "${FILESDIR}"/mdev.initd mdev
265 - fi
266 - if use livecd ; then
267 - dosym busybox /bin/vi
268 - fi
269 -
270 - # add busybox daemon's, bug #444718
271 - if busybox_config_enabled FEATURE_NTPD_SERVER; then
272 - newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd"
273 - newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd"
274 - fi
275 - if busybox_config_enabled SYSLOGD; then
276 - newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd"
277 - newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd"
278 - fi
279 - if busybox_config_enabled KLOGD; then
280 - newconfd "${FILESDIR}/klogd.confd" "busybox-klogd"
281 - newinitd "${FILESDIR}/klogd.initd" "busybox-klogd"
282 - fi
283 - if busybox_config_enabled WATCHDOG; then
284 - newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog"
285 - newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog"
286 - fi
287 - if busybox_config_enabled UDHCPC; then
288 - local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT)
289 - exeinto "${path%/*}"
290 - newexe examples/udhcp/simple.script "${path##*/}"
291 - fi
292 - if busybox_config_enabled UDHCPD; then
293 - insinto /etc
294 - doins examples/udhcp/udhcpd.conf
295 - fi
296 -
297 - # bundle up the symlink files for use later
298 - emake DESTDIR="${ED}" install
299 - rm _install/bin/busybox
300 - # for compatibility, provide /usr/bin/env
301 - mkdir -p _install/usr/bin
302 - ln -s /bin/env _install/usr/bin/env
303 - tar cf busybox-links.tar -C _install . || : #;die
304 - insinto /usr/share/${PN}
305 - use make-symlinks && doins busybox-links.tar
306 -
307 - dodoc AUTHORS README TODO
308 -
309 - cd docs
310 - docinto txt
311 - dodoc *.txt
312 - docinto pod
313 - dodoc *.pod
314 - dohtml *.html
315 -
316 - cd ../examples
317 - docinto examples
318 - dodoc inittab depmod.pl *.conf *.script undeb unrpm
319 -}
320 -
321 -pkg_preinst() {
322 - if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
323 - ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
324 - ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
325 - ewarn "If you are creating a binary only and not merging this is probably ok."
326 - ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want."
327 - die "silly options will destroy your system"
328 - fi
329 -
330 - if use make-symlinks ; then
331 - mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
332 - fi
333 -}
334 -
335 -pkg_postinst() {
336 - savedconfig_pkg_postinst
337 -
338 - if use make-symlinks ; then
339 - cd "${T}" || die
340 - mkdir _install
341 - tar xf busybox-links.tar -C _install || die
342 - cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
343 - fi
344 -
345 - if use sep-usr ; then
346 - elog "In order to use the sep-usr support, you have to update your"
347 - elog "kernel command line. Add the option:"
348 - elog " init=/ginit"
349 - elog "To launch a different init than /sbin/init, use:"
350 - elog " init=/ginit /sbin/yourinit"
351 - elog "To get a rescue shell, you may boot with:"
352 - elog " init=/ginit bb"
353 - fi
354 -}