Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main/busybox: enable telnetd #1092

Merged
merged 1 commit into from
Jun 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 32 additions & 7 deletions main/busybox/APKBUILD
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Oliver Smith <ollieparanoid@bitmessage.ch>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox
pkgver=1.26.2
pkgrel=4
pkgrel=5
pkgdesc="Size optimized toolbox of many common UNIX utilities"
url=http://busybox.net
arch="all"
Expand All @@ -11,8 +12,9 @@ makedepends_build=""
makedepends_host="linux-headers"
makedepends="$makedepends_build $makedepends_host"
checkdepends="zip"
install="$pkgname.post-install $pkgname.post-upgrade"
subpackages="$pkgname-static $pkgname-suid"
install="$pkgname.post-install $pkgname.post-upgrade
$pkgname-extras.post-install $pkgname-extras.pre-deinstall"
subpackages="$pkgname-static $pkgname-suid $pkgname-extras"
options="suid !check"
triggers="busybox.trigger=/bin:/usr/bin:/sbin:/usr/sbin:/lib/modules/*"
source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
Expand All @@ -38,6 +40,7 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2

acpid.logrotate
busyboxconfig
busyboxconfig-extras
bbsuid.c
dad.if-up
nologin.c
Expand All @@ -46,13 +49,15 @@ builddir="$srcdir"/$pkgname-$pkgver

_staticdir="$srcdir"/build-static
_dyndir="$srcdir"/build-dynamic
_dyndir_extras="$srcdir"/build-dynamic-extras
_config="$srcdir"/busyboxconfig
_config_extras="$srcdir"/busyboxconfig-extras

prepare() {
default_prepare

cd "$builddir"
mkdir -p "$_staticdir" "$_dyndir"
mkdir -p "$_staticdir" "$_dyndir" "$_dyndir_extras"
cp "$srcdir"/nologin.c loginutils/
}

Expand All @@ -72,6 +77,16 @@ build() {
make -C "$builddir" O="$PWD" silentoldconfig
make

# build dynamic (extras)
cd "$_dyndir_extras"
msg "Building dynamic busybox-extras"
cp "$_config_extras" .config
[ "$CLIBC" = musl ] && sed -i \
-e "s/CONFIG_EXTRA_COMPAT=y/CONFIG_EXTRA_COMPAT=n/" \
.config
make -C "$builddir" O="$PWD" silentoldconfig
make

# build static
cd "$_staticdir"
msg "Building static busybox"
Expand All @@ -88,8 +103,11 @@ build() {
}

check() {
cd "$_dyndir"
SKIP_KNOWN_BUGS=1 make -C "$builddir" O="$PWD" V=1 check
cd "$_dyndir"
SKIP_KNOWN_BUGS=1 make -C "$builddir" O="$PWD" V=1 check

cd "$_dyndir_extras"
SKIP_KNOWN_BUGS=1 make -C "$builddir" O="$PWD" V=1 check
}

package() {
Expand Down Expand Up @@ -133,6 +151,12 @@ tty11
EOF
}

extras() {
pkgdesc="Additional binaries of Busybox"
depends="${pkgname}"
install -Dm755 "$_dyndir_extras"/busybox "$subpkgdir"/bin/busybox-extras
}

suid() {
pkgdesc="suid binaries of Busybox"
depends="${pkgname}"
Expand Down Expand Up @@ -169,7 +193,8 @@ c37d1583cfb32e7aa077e7f4ea121dd3b2e3cf989a3dca2793126bcd89eb6d8eb6fae94808556580
2adfc6c71cfcc5df12edef13228c92b34c7782615e60effc97e6e7a9aa7e015c24c7b3950a8a9a2bf3ba5efd43a08ad45b16b35b03c90275807380e0600cb70d fix-tests.patch
f26e090f5de0096ba5c4d46989ebe0ab5fa64c8bf54cd37ddec302fddfde23eac914858d86cc52bf3b5780a8e81ea2612ef6e713df2828e52c606f86a6816f39 location-for-cpio.patch
a9b1403c844c51934637215307dd9e2adb9458921047acff0d86dcf229b6e0027f4b2c6cdaa25a58407aad9d098fb5685d58eb5ff8d2aa3de4912cdea21fe54c acpid.logrotate
43e5b1c699fffea4e41621faee8b3d28774e5888070113ae98a940c6837efec617bac7c78c34a2c982cbcccf25a67691c480be8ba4b8e552eed8bb0d3a09dac8 busyboxconfig
8d6497242bc4b3d08afa5b3e80cf62b8b392818d4d5f9202681b2bebe4d0c9958841a937608233f744a6036676f0101116a54a2a57d3628306340b4a95c8a7d0 busyboxconfig
9b7b2aa51b72eff97eb8f7eae42fefb3dc5801def9a7484948bd097e0232f245320c8225ff8605be1c298bed7e2ca5dccebf9e4204b541c84de7a5dd56d7d379 busyboxconfig-extras
c1dd56509277c59751907a27f067f1622191ddfd498acfe390d83136d36a41f2bdfc2fd4daf35af77219a66fb00fea20483f34112afd5df2ccd9f36ab548e66f bbsuid.c
a1127c8a384294135e11500fde7ead33b73d24b11c21911b08447a4c4ef71d7a9965d6466f60f2da64e3b877213b0a3e924a5add3c5333ee3ecde8c2a91c5e02 dad.if-up
4e7c291a70e879b74c0fc07c54a73ef50537d8be68fee6b2d409425c07afd2d67f9b6afcd8c33a7971014913cc5de85e45079681c9e77200c6cc2f34acfba6d2 nologin.c"
4 changes: 4 additions & 0 deletions main/busybox/busybox-extras.post-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

# Create all symlinks
exec /bin/busybox-extras --install -s
9 changes: 9 additions & 0 deletions main/busybox/busybox-extras.pre-deinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

# Remove all symlinks to busybox-extras
cd /
for link in $(busybox-extras --list --full); do
if [ -L "$link" ] && [ "$(readlink $link)" = "/bin/busybox-extras" ]; then
rm "$link"
fi
done
9 changes: 9 additions & 0 deletions main/busybox/busybox.post-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,14 @@ for link in /bin/ping /bin/ping6; do
fi
done

# remove links of programs moved to busybox-extras
for link in /usr/bin/telnet /usr/sbin/httpd /usr/bin/ftpget /usr/bin/ftpput \
/usr/sbin/ftpd /usr/bin/tftp; do
if [ -L "$link" ] && [ "$(readlink $link)" = "/bin/busybox" ]; then
rm "$link"
echo "NOTE: $link has been moved to the package 'busybox-extras'"
fi
done

# We need the symlinks early
exec /bin/busybox --install -s
1 change: 1 addition & 0 deletions main/busybox/busybox.trigger
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ done

if [ -n "$do_bb_install" ]; then
[ -e /bin/bbsuid ] && /bin/bbsuid --install
[ -e /bin/busybux-extras ] && /bin/busybox-extras --install -s
/bin/busybox --install -s
fi
60 changes: 28 additions & 32 deletions main/busybox/busyboxconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Busybox version: 1.26.1
# Tue Jan 3 09:59:23 2017
# Busybox version: 1.26.2
# Wed Jun 7 17:24:01 2017
#
CONFIG_HAVE_DOT_CONFIG=y

Expand Down Expand Up @@ -800,27 +800,27 @@ CONFIG_FEATURE_BRCTL_FANCY=y
CONFIG_FEATURE_BRCTL_SHOW=y
CONFIG_DNSD=y
CONFIG_ETHER_WAKE=y
CONFIG_FTPD=y
CONFIG_FEATURE_FTPD_WRITE=y
CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y
CONFIG_FEATURE_FTPD_AUTHENTICATION=y
CONFIG_FTPGET=y
CONFIG_FTPPUT=y
# CONFIG_FTPD is not set
# CONFIG_FEATURE_FTPD_WRITE is not set
# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set
# CONFIG_FEATURE_FTPD_AUTHENTICATION is not set
# CONFIG_FTPGET is not set
# CONFIG_FTPPUT is not set
# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
CONFIG_HOSTNAME=y
CONFIG_DNSDOMAINNAME=y
CONFIG_HTTPD=y
CONFIG_FEATURE_HTTPD_RANGES=y
CONFIG_FEATURE_HTTPD_SETUID=y
CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
CONFIG_FEATURE_HTTPD_AUTH_MD5=y
CONFIG_FEATURE_HTTPD_CGI=y
CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
CONFIG_FEATURE_HTTPD_PROXY=y
CONFIG_FEATURE_HTTPD_GZIP=y
# CONFIG_HTTPD is not set
# CONFIG_FEATURE_HTTPD_RANGES is not set
# CONFIG_FEATURE_HTTPD_SETUID is not set
# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
# CONFIG_FEATURE_HTTPD_CGI is not set
# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set
# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
# CONFIG_FEATURE_HTTPD_PROXY is not set
# CONFIG_FEATURE_HTTPD_GZIP is not set
CONFIG_IFCONFIG=y
CONFIG_FEATURE_IFCONFIG_STATUS=y
CONFIG_FEATURE_IFCONFIG_SLIP=y
Expand Down Expand Up @@ -885,22 +885,18 @@ CONFIG_ROUTE=y
CONFIG_SLATTACH=y
# CONFIG_TCPSVD is not set
# CONFIG_UDPSVD is not set
CONFIG_TELNET=y
CONFIG_FEATURE_TELNET_TTYPE=y
CONFIG_FEATURE_TELNET_AUTOLOGIN=y
# CONFIG_TELNET is not set
# CONFIG_FEATURE_TELNET_TTYPE is not set
# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
# CONFIG_TELNETD is not set
# CONFIG_FEATURE_TELNETD_STANDALONE is not set
# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set
CONFIG_TFTP=y
# CONFIG_TFTP is not set
# CONFIG_TFTPD is not set

#
# Common options for tftp/tftpd
#
CONFIG_FEATURE_TFTP_GET=y
CONFIG_FEATURE_TFTP_PUT=y
CONFIG_FEATURE_TFTP_BLOCKSIZE=y
CONFIG_FEATURE_TFTP_PROGRESS_BAR=y
# CONFIG_FEATURE_TFTP_GET is not set
# CONFIG_FEATURE_TFTP_PUT is not set
# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set
# CONFIG_TFTP_DEBUG is not set
CONFIG_TRACEROUTE=y
CONFIG_TRACEROUTE6=y
Expand Down
Loading