diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-11-21 21:05:13 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-11-22 08:13:48 +0000 |
commit | ad3dbb9b8cb9f7ff7dee76859f765450567d3b0d (patch) | |
tree | bcbfc9e31e95df70d7d9a6749e46809e399f999a | |
parent | 8fd3b83790332ed685791f243236e974fe347f1a (diff) | |
download | aports-ad3dbb9b8cb9f7ff7dee76859f765450567d3b0d.tar.bz2 aports-ad3dbb9b8cb9f7ff7dee76859f765450567d3b0d.tar.xz |
main/busybox: fix bug when comparing negative numbers
See:
- https://gitlab.alpinelinux.org/alpine/aports/issues/10976
- https://bugs.busybox.net/show_bug.cgi?id=12336
fixes #10976
Also fix policy violations while we're at it.
-rw-r--r-- | main/busybox/APKBUILD | 15 | ||||
-rw-r--r-- | main/busybox/busybox-bc.patch | 11 |
2 files changed, 18 insertions, 8 deletions
diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD index 60cf7ffa87..1040befd75 100644 --- a/main/busybox/APKBUILD +++ b/main/busybox/APKBUILD @@ -3,12 +3,11 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=busybox pkgver=1.31.1 -pkgrel=0 +pkgrel=1 pkgdesc="Size optimized toolbox of many common UNIX utilities" url="https://busybox.net/" arch="all" license="GPL-2.0" -makedepends_build="" makedepends_host="linux-headers openssl-dev libtls-standalone-dev" makedepends="$makedepends_build $makedepends_host" checkdepends="zip" @@ -18,7 +17,7 @@ install="$pkgname.post-install $pkgname.post-upgrade subpackages="$pkgname-static $pkgname-suid $pkgname-extras ssl_client" options="suid !check" triggers="busybox.trigger=/bin:/usr/bin:/sbin:/usr/sbin:/lib/modules/*" -source="https://busybox.net/downloads/$pkgname-$pkgver.tar.bz2 +source="https://busybox.net/downloads/busybox-$pkgver.tar.bz2 0001-ln-no-target-directory-implies-no-dereference.patch 0001-nologin-Install-applet-to-sbin-instead-of-usr-sbin.patch 0001-adduser-default-to-sbin-nologin-as-shell-for-system-.patch @@ -34,6 +33,7 @@ source="https://busybox.net/downloads/$pkgname-$pkgver.tar.bz2 0010-Add-flag-for-not-following-symlinks-when-recursing.patch 0012-udhcpc-Don-t-background-if-n-is-given.patch 0013-testsuite-fix-cpio-tests.patch + busybox-bc.patch acpid.logrotate busyboxconfig @@ -54,7 +54,6 @@ source="https://busybox.net/downloads/$pkgname-$pkgver.tar.bz2 # - CVE-2017-15873 # - CVE-2017-15874 -builddir="$srcdir"/$pkgname-$pkgver _staticdir="$srcdir"/build-static _dyndir="$srcdir"/build-dynamic @@ -65,7 +64,6 @@ _config_extras="$srcdir"/busyboxconfig-extras prepare() { default_prepare - cd "$builddir" mkdir -p "$_staticdir" "$_dyndir" "$_dyndir_extras" } @@ -130,7 +128,7 @@ package() { mkdir -p "$pkgdir"/usr/sbin "$pkgdir"/usr/bin "$pkgdir"/tmp \ "$pkgdir"/var/cache/misc "$pkgdir"/bin "$pkgdir"/sbin chmod 1777 "$pkgdir"/tmp - install -m755 busybox "$pkgdir"/bin/busybox || return 1 + install -m755 busybox "$pkgdir"/bin/busybox # we need /bin/sh to be able to execute post-install ln -s /bin/busybox "$pkgdir"/bin/sh @@ -168,13 +166,13 @@ EOF extras() { pkgdesc="Additional binaries of Busybox" - depends="${pkgname}" + depends="$pkgname" install -Dm755 "$_dyndir_extras"/busybox "$subpkgdir"/bin/busybox-extras } suid() { pkgdesc="suid binaries of Busybox" - depends="${pkgname}" + depends="$pkgname" cd "$_dyndir" mkdir -p "$subpkgdir"/bin @@ -215,6 +213,7 @@ f96d66ce5a0295a2459a2c49c281b64e016de675ebd31a49af18cb06f3498fe27dfbc8667324b439 3b13ba6bd9b697e48864cb5376849c1ac95b30650e3e27605cc05edf4fdc1ecbb4c4503d4fe9012a581bcd660f6bb44d644575cf437d30423614cb83ee92c22c 0010-Add-flag-for-not-following-symlinks-when-recursing.patch b0f956e98ed1b670dc27f835441407d32395d371599780cf87a5fb2eee43ad2f77c8c484d20f08b1ed5d2bdee039668ff1a0b02561fa8206832072ab3b89cc45 0012-udhcpc-Don-t-background-if-n-is-given.patch d8926f0e4ed7d2fe5af89ff2a944d781b45b109c9edf1ef2591e7bce2a8bbadd7c8ca814cb3c928ae09027d9603434fe70496f308d701f3d42260ebd1e9e9b29 0013-testsuite-fix-cpio-tests.patch +9bb4d16ca418b6fd3c0b6dc867c92920e66ddb0c98040373d1166608284d2755b8d6eed0022bfddfcc07f5df93974fb7ed79402511a9728eb6c95ce05c37cfeb busybox-bc.patch aa93095e20de88730f526c6f463cef711b290b9582cdbd8c1ba2bd290019150cbeaa7007c2e15f0362d5b9315dd63f60511878f0ea05e893f4fdfb4a54af3fb1 acpid.logrotate ace97d165b80121968458f57d856d7f0b12ff342defe87c33ed5f994f7b00027b65f7389f6d23120a7d11449378e3d503552e87b17a3bb18337d74992b125b14 busyboxconfig 5f9739b9d0c1ba5d77e3153c373593a1bcb813cf466f951b00a2a040262e5077fb13c1a7aa17d67d1533a473bfcacc1a22833b7f491b4dde9dcb5638ad585f9a busyboxconfig-extras diff --git a/main/busybox/busybox-bc.patch b/main/busybox/busybox-bc.patch new file mode 100644 index 0000000000..465e798405 --- /dev/null +++ b/main/busybox/busybox-bc.patch @@ -0,0 +1,11 @@ +--- a/miscutils/bc.c 2019-11-21 12:59:36.007348161 +0000 ++++ b/miscutils/bc.c 2019-11-21 17:05:22.192565550 +0000 +@@ -1465,7 +1465,7 @@ + b_int = BC_NUM_INT(b); + a_int -= b_int; + +- if (a_int != 0) return (ssize_t) a_int; ++ if (a_int != 0) return neg ? - (ssize_t) a_int : (ssize_t) a_int; + + a_max = (a->rdx > b->rdx); + if (a_max) { |