summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/adelie-base/APKBUILD6
-rw-r--r--system/asciidoctor/APKBUILD8
-rw-r--r--system/bc/APKBUILD4
-rw-r--r--system/bison/APKBUILD8
-rw-r--r--system/bubblewrap/APKBUILD35
-rw-r--r--system/bubblewrap/musl-fixes.patch17
-rw-r--r--system/check/APKBUILD4
-rw-r--r--system/console-setup/APKBUILD48
-rw-r--r--system/console-setup/console-setup.initd32
-rw-r--r--system/coreutils/APKBUILD16
-rw-r--r--system/coreutils/cp-dont-delete.patch72
-rw-r--r--system/coreutils/date-debug.patch56
-rw-r--r--system/coreutils/disable-mbrtowc-test.patch4
-rw-r--r--system/coreutils/localename-test-fix.patch2
-rw-r--r--system/coreutils/ls-removed-dirs.patch99
-rw-r--r--system/e2fsprogs/APKBUILD4
-rw-r--r--system/easy-kernel/APKBUILD16
-rw-r--r--system/easy-kernel/config-aarch644
-rw-r--r--system/easy-kernel/config-m68k4
-rw-r--r--system/easy-kernel/config-pmmx4
-rw-r--r--system/easy-kernel/config-ppc4
-rw-r--r--system/easy-kernel/config-ppc644
-rw-r--r--system/easy-kernel/config-sparc644
-rw-r--r--system/easy-kernel/config-x86_644
-rw-r--r--system/execline/APKBUILD7
-rw-r--r--system/gettext-tiny/APKBUILD6
-rw-r--r--system/gettext-tiny/msgfmt-exit.patch36
-rw-r--r--system/git/APKBUILD47
-rw-r--r--system/help2man/APKBUILD4
-rw-r--r--system/icu/APKBUILD9
-rw-r--r--system/icu/CVE-2017-7867-7868.patch155
-rw-r--r--system/icu/CVE-2020-10531.patch118
-rw-r--r--system/kbd/APKBUILD32
-rw-r--r--system/kbd/consolefont.confd20
-rw-r--r--system/kbd/consolefont.initd70
-rw-r--r--system/kbd/keymaps.confd24
-rw-r--r--system/kbd/keymaps.initd77
-rw-r--r--system/kmod/APKBUILD10
-rw-r--r--system/libucontext/APKBUILD12
-rw-r--r--system/libucontext/git.patch115
-rw-r--r--system/libucontext/powerpc.patch1121
-rw-r--r--system/libucontext/static.patch76
-rw-r--r--system/lvm2/APKBUILD4
-rw-r--r--system/lvm2/fix-stdio-usage.patch30
-rw-r--r--system/make/APKBUILD15
-rw-r--r--system/make/fix-atexit-exit.patch4
-rw-r--r--system/man-db/APKBUILD4
-rw-r--r--system/mdevd/APKBUILD4
-rw-r--r--system/musl-locales/APKBUILD32
-rw-r--r--system/nss/APKBUILD17
-rw-r--r--system/openrc/0007-make-consolefont-service-compatible-with-busyboxs-se.patch70
-rw-r--r--system/openrc/APKBUILD11
-rw-r--r--system/openrc/openrc.post-install2
-rw-r--r--system/openssl/APKBUILD12
-rw-r--r--system/openssl/ppc-auxv.patch17
-rw-r--r--system/openssl/ppc64.patch2
-rw-r--r--system/pcre2/APKBUILD13
-rw-r--r--system/pcre2/CVE-2019-20454.patch50
-rw-r--r--system/python3/APKBUILD15
-rw-r--r--system/python3/CVE-2019-16056.patch131
-rw-r--r--system/python3/CVE-2019-16935.patch80
-rw-r--r--system/python3/CVE-2019-18348.patch147
-rw-r--r--system/ruby/APKBUILD32
-rw-r--r--system/ruby/fix-get_main_stack.patch4
-rw-r--r--system/ruby/libedit-compat.patch4
-rw-r--r--system/ruby/rubygems-avoid-platform-specific-gems.patch2
-rw-r--r--system/s6-linux-init/APKBUILD4
-rw-r--r--system/s6-rc/APKBUILD4
-rw-r--r--system/s6/APKBUILD4
-rw-r--r--system/skalibs/APKBUILD4
-rw-r--r--system/sqlite/APKBUILD23
-rw-r--r--system/unzip/10-unzip-handle-pkware-verify.patch21
-rw-r--r--system/unzip/20-unzip-uidgid-fix.patch29
-rw-r--r--system/unzip/APKBUILD31
-rw-r--r--system/unzip/unzip-6.0-heap-overflow-infloop.patch104
-rw-r--r--system/utmps/APKBUILD4
-rw-r--r--system/vim/APKBUILD4
77 files changed, 1192 insertions, 2140 deletions
diff --git a/system/adelie-base/APKBUILD b/system/adelie-base/APKBUILD
index 04b100e69..8b06a3699 100644
--- a/system/adelie-base/APKBUILD
+++ b/system/adelie-base/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=adelie-base
pkgver=0.9.4
-pkgrel=0
+pkgrel=1
pkgdesc="The Adélie Linux Base System"
url="https://www.adelielinux.org/"
arch="noarch"
@@ -13,8 +13,8 @@ _core_depends="apk-tools adelie-keys musl-utils shadow
coreutils diffutils findutils
util-linux net-tools
nvi sed psmisc less tzdata"
-depends="adelie-core binutils console-setup debianutils file gettys-openrc
- libarchive-tools man-db patch sed sharutils sysklogd zsh"
+depends="adelie-core binutils debianutils file gettys-openrc
+ kbd libarchive-tools man-db patch sed sharutils sysklogd zsh"
makedepends=""
makedepends_host="$depends"
subpackages="adelie-core:core $pkgname-doc $pkgname-posix $pkgname-lsb dev
diff --git a/system/asciidoctor/APKBUILD b/system/asciidoctor/APKBUILD
index 760f82d81..188751c26 100644
--- a/system/asciidoctor/APKBUILD
+++ b/system/asciidoctor/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Seung Soo Mun <hamletmun@gmail.com>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=asciidoctor
-pkgver=1.5.8
+pkgver=2.0.10
pkgrel=0
pkgdesc="An implementation of AsciiDoc in Ruby"
url="https://rubygems.org/gems/$pkgname"
@@ -13,7 +13,7 @@ makedepends=""
source="https://rubygems.org/downloads/$pkgname-$pkgver.gem"
package() {
- local gemdir="$(ruby -e 'puts Gem.default_dir')"
+ gemdir="$(ruby -e 'puts Gem.default_dir')"
gem install \
--local \
@@ -26,7 +26,7 @@ package() {
rm -rf "$pkgdir"/$gemdir/cache
cd "$pkgdir"
- local i; for i in usr/lib/ruby/gems/*/bin/*; do
+ for i in usr/lib/ruby/gems/*/bin/*; do
if [ -e "$i" ]; then
mkdir -p "$pkgdir"/usr/bin
ln -s /$i "$pkgdir"/usr/bin/
@@ -34,4 +34,4 @@ package() {
done
}
-sha512sums="34ff0df98ff9ebb2d3640629870cd848cf2f4b617564a42e7b30b6cf60c01d1188b4cc695af49550e054c9e833accc1ed5d622b4952ece3da99c8ed98af769ac asciidoctor-1.5.8.gem"
+sha512sums="41db1947da60be27079eaef99c76ae7a20797f0291313ac82582466774a569130e995c674f7ef884a05d3d3783d70df3d5ef83b42ded1c722dd9ab7b1a3357ab asciidoctor-2.0.10.gem"
diff --git a/system/bc/APKBUILD b/system/bc/APKBUILD
index aaa5fc26c..99fb584f3 100644
--- a/system/bc/APKBUILD
+++ b/system/bc/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=bc
-pkgver=2.5.3
+pkgver=2.6.0
pkgrel=0
pkgdesc="An arbitrary precision numeric processing language (calculator)"
url="https://github.com/gavinhoward/bc"
@@ -25,4 +25,4 @@ package() {
make install
}
-sha512sums="97c0722969c4f2fd907786e0a89f9b403662b1bcdd1aab59418ab3fe140c50584b45eb346008ad94916335418f08433d2634b52b94ae1d7463b665a746f1a608 bc-2.5.3.tar.xz"
+sha512sums="809ca124d110bb96ded253fe8799786b48dc5ff8ab540aa97dc8ed43f5a835841d44a71ed082ded17c1df39b6fe5dc2ce7247be0c771b22d7d354aec40434411 bc-2.6.0.tar.xz"
diff --git a/system/bison/APKBUILD b/system/bison/APKBUILD
index 2c093c6d1..a053dd0b7 100644
--- a/system/bison/APKBUILD
+++ b/system/bison/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=bison
-pkgver=3.4.2
+pkgver=3.5.3
pkgrel=0
pkgdesc="The GNU general-purpose parser generator"
arch="all"
@@ -9,7 +9,7 @@ arch="all"
license="GPL-3.0+"
url="https://www.gnu.org/software/bison/bison.html"
depends="m4"
-checkdepends="bison flex"
+checkdepends="bison flex musl-locales"
makedepends="perl"
provider_priority=1
subpackages="$pkgname-doc $pkgname-lang"
@@ -28,7 +28,7 @@ build() {
check() {
# Work around for Bison 3.4.x test failure
- for _calc in {,lex,mf,rec,rp}calc; do
+ for _calc in calc lexcalc mfcalc reccalc rpcalc; do
make -j1 examples/c/$_calc/$_calc
done
make check
@@ -40,4 +40,4 @@ package() {
rmdir -p "$pkgdir"/usr/lib 2>/dev/null || true
}
-sha512sums="00d2b37187b93100ec4b220ce2752d12ccf68f9d0d39b380d375d36dd8a22aa1d6e60156918f95e4493f9531c5d42d8fad38fd807307b491c1ca7ca4177823d9 bison-3.4.2.tar.xz"
+sha512sums="888a1e8d4aeda3ff2d7d0a3a88b63bbfe89bdb718cc64d48c244e05fe6c6cd39526fd88143db379fef3071cf6c2dc2ab2fd69834c24acb23ed5f739584ff6308 bison-3.5.3.tar.xz"
diff --git a/system/bubblewrap/APKBUILD b/system/bubblewrap/APKBUILD
index c4ae4fa31..866bdb468 100644
--- a/system/bubblewrap/APKBUILD
+++ b/system/bubblewrap/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=bubblewrap
-pkgver=0.3.3
+pkgver=0.4.1
pkgrel=0
pkgdesc="Unprivileged sandboxing tool"
url="https://github.com/projectatomic/bubblewrap"
@@ -9,21 +9,23 @@ arch="all"
options="!check suid" # requires suid to already be set in order to check
license="LGPL-2.0+"
makedepends="autoconf automake libcap-dev docbook-xsl"
-checkdepends="sudo"
+checkdepends="python3 sudo"
subpackages="$pkgname-nosuid $pkgname-doc
$pkgname-bash-completion:bashcomp:noarch"
-source="bubblewrap-$pkgver.tar.gz::https://github.com/projectatomic/bubblewrap/archive/v$pkgver.tar.gz
+source="bubblewrap-$pkgver.tar.gz::https://github.com/containers/bubblewrap/archive/v$pkgver.tar.gz
realpath-workaround.patch
- musl-fixes.patch
- tests.patch"
+ tests.patch
+ "
# secfixes:
# 0.3.3-r0:
-# - CVE-2019-12439
+# - CVE-2019-12439
+# 0.4.1-r0:
+# - GHSA-j2qp-rvxj-43vj
prepare() {
- srcdir= NOCONFIGURE=1 ./autogen.sh
default_prepare
+ NOCONFIGURE=1 ./autogen.sh
}
build() {
@@ -39,14 +41,16 @@ build() {
}
check() {
- # Uses sudo to chown root and setuid $builddir/test-bwrap
+ # 1. chown root and chmod u+s $builddir/test-bwrap
+ # 2. Run abuild check (suid test)
+ # 3. Unset permissions on test-bwrap
+ # 4. Run abuild check again (nosuid test)
#
- # As of 0.3.3-r0, all tests pass on ppc64 except those relating
- # to bind mounts over symlinks. Those tests fail because musl's
- # realpath depends on the availability of /proc, which is not
- # available in the middle of the setup procedure since pivot_root
- # has been performed at least once. They have been patched to be
- # skipped.
+ # As of 0.4.1, all tests pass except those relating to bind mounts
+ # over symlinks. Those tests fail because musl's realpath depends on
+ # the availability of /proc, which is not available in the middle of
+ # the setup procedure since pivot_root has been performed at least
+ # once. They have been patched to be skipped.
make check
}
@@ -72,7 +76,6 @@ bashcomp() {
mv "$pkgdir"/usr/share/bash-completion/ "$subpkgdir"/usr/share/
}
-sha512sums="b1c38fad90ddaa23a5f2dd49f9ec3f9d9af7426af321ae9f7c43dd64f11a448b3502942a42112a1c6ebf8a4dea2e1196b17c31cca9c2f119dc2e0c1674c345ae bubblewrap-0.3.3.tar.gz
+sha512sums="83e036e242503e1364b2d0052bba5127175891203c57bd22ba47a1b1e934fdca64ca620cd0e48c903fa2bc7cdcf92339b8a7fcb8716b54c2e28034b6d6f86adc bubblewrap-0.4.1.tar.gz
400a0446670ebf80f16739f1a7a2878aadc3099424f957ba09ec3df780506c23a11368f0578c9e352d7ca6473fa713df826fad7a20c50338aa5f9fa9ac6b84a4 realpath-workaround.patch
-f59cda3b09dd99db9ca6d97099a15bb2523e054063d677502317ae3165ba2e32105a0ae8f877afc3827bd28d093c9d9d413270f4c87d9fe5f26f3eee670d916e musl-fixes.patch
d572a6296729ab192dd4f04707e0271df600d565897ce089b7f00b9ae6c62e71a087e864b4c4972e0a64aeb222a337ff4ed95560620c200cc44534db1ca79efd tests.patch"
diff --git a/system/bubblewrap/musl-fixes.patch b/system/bubblewrap/musl-fixes.patch
deleted file mode 100644
index ecf626331..000000000
--- a/system/bubblewrap/musl-fixes.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- a/config.h.in
-+++ b/config.h.in
-@@ -102,3 +102,14 @@
-
- /* Define to 1 if you need to in order for `stat' and other things to work. */
- #undef _POSIX_SOURCE
-+
-+/* taken from glibc unistd.h and fixes musl */
-+#ifndef TEMP_FAILURE_RETRY
-+#define TEMP_FAILURE_RETRY(expression) \
-+ (__extension__ \
-+ ({ long int __result; \
-+ do __result = (long int) (expression); \
-+ while (__result == -1L && errno == EINTR); \
-+ __result; }))
-+#endif
-+
diff --git a/system/check/APKBUILD b/system/check/APKBUILD
index 0cba779fa..7c07b68df 100644
--- a/system/check/APKBUILD
+++ b/system/check/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=check
-pkgver=0.13.0
+pkgver=0.14.0
pkgrel=0
pkgdesc="A unit test framework for C"
url="https://libcheck.github.io/check/"
@@ -32,4 +32,4 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="9e3a3b4b2e1aae02f6481a3d944a5a9216c1f03d85a2bbd63c05d047095fe16b78e5c4094b464fe531650daba24c58d7343f7ec059ce0e127e9aff1ff86213d0 check-0.13.0.tar.gz"
+sha512sums="07fc85b5eecffeb407f554c0cb737126ed6d68ba0db3d74c14697505f2b410496ff72311f08bbf43d7af1c971f0475e776966e320bfb3fe00cde1ecbe1d6f367 check-0.14.0.tar.gz"
diff --git a/system/console-setup/APKBUILD b/system/console-setup/APKBUILD
deleted file mode 100644
index 3a49f1c50..000000000
--- a/system/console-setup/APKBUILD
+++ /dev/null
@@ -1,48 +0,0 @@
-# Contributor: A. Wilcox <awilfox@adelielinux.org>
-# Maintainer: A. Wilcox <awilfox@adelielinux.org>
-pkgname=console-setup
-pkgver=1.194
-pkgrel=0
-pkgdesc="Tools for configuring the console using X Window System key maps"
-url="https://salsa.debian.org/installer-team/console-setup"
-arch="noarch"
-options="!check" # No test suite.
-license="MIT AND GPL-2.0+ AND BSD-3-Clause"
-depends="ckbcomp kbd"
-makedepends="perl"
-subpackages="$pkgname-doc console-fonts:fonts console-keymaps:keymaps
- $pkgname-openrc ckbcomp"
-source="http://ftp.de.debian.org/debian/pool/main/c/$pkgname/${pkgname}_$pkgver.tar.xz
- console-setup.initd
- "
-
-build() {
- make build-linux
-}
-
-package() {
- make prefix="$pkgdir/usr" etcdir="$pkgdir/etc" xkbdir= install-linux
- install -D -m755 "$srcdir"/console-setup.initd "$pkgdir"/etc/init.d/console-setup
-}
-
-fonts() {
- pkgdesc="Console fonts for use with $pkgname"
- mkdir -p "$subpkgdir"/usr/share
- mv "$pkgdir"/usr/share/consolefonts "$subpkgdir"/usr/share/
-}
-
-keymaps() {
- pkgdesc="Keyboard layouts for use with $pkgname"
- mkdir -p "$subpkgdir"/etc/console-setup
- mv "$pkgdir"/etc/console-setup/ckb "$subpkgdir"/etc/console-setup/
-}
-
-ckbcomp() {
- pkgdesc="XKB keyboard layout translation utility"
- depends="perl"
- mkdir -p "$subpkgdir"/usr/bin
- mv "$pkgdir"/usr/bin/ckbcomp "$subpkgdir"/usr/bin/
-}
-
-sha512sums="fe71480b45e8c88c9e46264f734d0eb21023a6afedfa6412551bb40f7525f14823befe726efc37f152a36d9a8de3aba00cd41f9fe42bcea2780c5cf8764a6b80 console-setup_1.194.tar.xz
-3b8e2c9d8551f9a51bcd33e58771a4f55ff2840f8fe392e0070bd2b6a3911cd9ed9377873538f6904fd99836ac4e0280c712be69d275aae9183dd12ff7efddae console-setup.initd"
diff --git a/system/console-setup/console-setup.initd b/system/console-setup/console-setup.initd
deleted file mode 100644
index bf3479566..000000000
--- a/system/console-setup/console-setup.initd
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/sbin/openrc-run
-# Copyright (c) 2007-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/master/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-description="Applies a keymap and font for the consoles."
-
-depend()
-{
- provide keymaps
- need localmount termencoding
- after bootmisc
- keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu
-}
-
-start()
-{
- # Force linux keycodes for PPC.
- if [ -f /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes ]; then
- echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
- fi
-
- ebegin "Loading default key mappings / font"
- setupcon
- eend $? "Error loading key mappings / font" || return $?
-}
diff --git a/system/coreutils/APKBUILD b/system/coreutils/APKBUILD
index 23d96edbd..71c10cca4 100644
--- a/system/coreutils/APKBUILD
+++ b/system/coreutils/APKBUILD
@@ -2,8 +2,8 @@
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=coreutils
-pkgver=8.31
-pkgrel=4
+pkgver=8.32
+pkgrel=0
pkgdesc="Basic file, shell, and text manipulation utilities"
url="https://www.gnu.org/software/coreutils/"
arch="all"
@@ -15,12 +15,13 @@ subpackages="$pkgname-doc"
[ "${CBUILD}" = "${CHOST}" ] && subpackages="$subpackages $pkgname-lang"
install="$pkgname.post-deinstall"
source="https://ftp.gnu.org/gnu/coreutils/$pkgname-$pkgver.tar.xz
- date-debug.patch
+ cp-dont-delete.patch
disable-csplit-io-err-test.patch
disable-mbrtowc-test.patch
gnulib-tests-dont-require-gpg-passphrase.patch
gnulib-test-fixes.patch
localename-test-fix.patch
+ ls-removed-dirs.patch
test-df-symlink-bindmount.patch
"
[ "${CBUILD}" != "${CHOST}" ] && source="$source
@@ -68,13 +69,14 @@ package() {
done
}
-sha512sums="ef8941dae845bbf5ae5838bc49e44554a766302930601aada6fa594e8088f0fbad74e481ee392ff89633e68b99e4da3f761fcb5d31ee3b233d540fe2a2d4e1af coreutils-8.31.tar.xz
+sha512sums="1c8f3584efd61b4b02e7ac5db8e103b63cfb2063432caaf1e64cb2dcc56d8c657d1133bbf10bd41468d6a1f31142e6caa81d16ae68fa3e6e84075c253613a145 coreutils-8.32.tar.xz
+96eecaaea757c0a39136733b6b5a9d97b869c50aa41d2052a293544a59a959de7dfa0412f5613e52ff946da42df5b50403b30c88c0a1a882690219fd4ee2efa9 cp-dont-delete.patch
bd8b5cecba59eba30458c8afa895877d39a987b989bc06b70cd6836e0ef684677aaadcb4949b58a713779fe1df1e15e3903e9be14e306671b86b69018b75de8b disable-csplit-io-err-test.patch
-532ef8210261437855ba3e2fc72ec57b0e0252b2b0f7817990c9629613ece2cdd86cf30aa049f3cff6fbda12ed3bb9a0db3a3642475378ae44ce319bdf005d9b disable-mbrtowc-test.patch
-86944e9ea5493c5b21ab62562a63aa134952738297b21cfb2e8f751db4a695ff25ee1592eb231ed1bb80999bc31f7504c7feffde2e93b4e068c05c44ac83cbdf localename-test-fix.patch
+595be7f580f8906467624959c7eddbd6d7007571d92668b6a1ea5543b73764035b44b02ab5f352c67ec6562a368f220af445edd0a0965fb9826bccfd25ddbdba disable-mbrtowc-test.patch
fd97fccd661befc558b3afb3e32c82dd2cef511a05e6129d49540599297c1b59ab1f109e63a12f585a2348c26c28fb98330c348829d1fe61cf8149d0dd1c989c gnulib-tests-dont-require-gpg-passphrase.patch
08f6de0e4c1615503a276fb7eb8abb3f1a996d3e9e4c789deb1507e9ac66364e3993591e37ee444d239c64bf3b7d61f909c0da5ead3047b75623cd846e9f868f gnulib-test-fixes.patch
-aac3a89b27a7854fbf483e155df9133c3d33a0f36bd55d5606559a7781f9d27d5c17779ea427142311749252767097bf92ec22d4cf86b510568c186da84ff16c date-debug.patch
+b1509e5678a05f24d6e764c047546e5e34a7fbd5edb59c7debedb144a0096d8ac247c7e2722a5f68c90751e5280bec743c9a6ed3e1433c1916294d68d7bca109 localename-test-fix.patch
+c7e7a03ed074d74fa836eaa6372d170b50d5719914160d9a835db25fb958e1fcfa4530231abd8f9b2323958a510750a8a5f65a5cea56555fa8a39dd8abd6e8cc ls-removed-dirs.patch
0b90b7721dd01bd22eba50f73bc756930dd4a8bc78ec408ce7f155a02b520375023897b9d12872030735d908208b912ea7adfac9e8b4d055e617873d982eef56 test-df-symlink-bindmount.patch"
[ "${CBUILD}" != "${CHOST}" ] && sha512sums="
bae804f057252c25452ac178c545dc2c4b4775cbfbdcfd4775edd1a4ed6507882bfac39e2b11ad01b74230ca48d761bf62f11bde5bcbc35a6e5a61cbe4a46e36 051_all_coreutils-mangen.patch
diff --git a/system/coreutils/cp-dont-delete.patch b/system/coreutils/cp-dont-delete.patch
new file mode 100644
index 000000000..a60608952
--- /dev/null
+++ b/system/coreutils/cp-dont-delete.patch
@@ -0,0 +1,72 @@
+From 7b5f0fa47cd04c84975250d5b5da7c98e097e99f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
+Date: Wed, 1 Apr 2020 12:51:34 +0100
+Subject: cp: ensure --attributes-only doesn't remove files
+
+* src/copy.c (copy_internal): Ensure we don't unlink the destination
+unless explicitly requested.
+* tests/cp/attr-existing.sh: Add test cases.
+Fixes https://bugs.gnu.org/40352
+---
+ NEWS | 7 +++++++
+ src/copy.c | 9 +++++----
+ tests/cp/attr-existing.sh | 21 ++++++++++++++++++---
+ 3 files changed, 30 insertions(+), 7 deletions(-)
+
+diff --git a/src/copy.c b/src/copy.c
+index 6e5efc708..54601ce07 100644
+--- a/src/copy.c
++++ b/src/copy.c
+@@ -2211,10 +2211,11 @@ copy_internal (char const *src_name, char const *dst_name,
+ /* Never unlink dst_name when in move mode. */
+ && ! x->move_mode
+ && (x->unlink_dest_before_opening
+- || (x->preserve_links && 1 < dst_sb.st_nlink)
+- || (x->dereference == DEREF_NEVER
+- && ! S_ISREG (src_sb.st_mode))
+- ))
++ || (x->data_copy_required
++ && ((x->preserve_links && 1 < dst_sb.st_nlink)
++ || (x->dereference == DEREF_NEVER
++ && ! S_ISREG (src_sb.st_mode))))
++ ))
+ {
+ if (unlink (dst_name) != 0 && errno != ENOENT)
+ {
+diff --git a/tests/cp/attr-existing.sh b/tests/cp/attr-existing.sh
+index 59ce64183..14fc8445c 100755
+--- a/tests/cp/attr-existing.sh
++++ b/tests/cp/attr-existing.sh
+@@ -19,11 +19,26 @@
+ . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
+ print_ver_ cp
+
+-printf '1' > file1
+-printf '2' > file2
+-printf '2' > file2.exp
++printf '1' > file1 || framework_failure_
++printf '2' > file2 || framework_failure_
++printf '2' > file2.exp || framework_failure_
+
+ cp --attributes-only file1 file2 || fail=1
+ cmp file2 file2.exp || fail=1
+
++# coreutils v8.32 and before would remove destination files
++# if hardlinked or the source was not a regular file.
++ln file2 link2 || framework_failure_
++cp -a --attributes-only file1 file2 || fail=1
++cmp file2 file2.exp || fail=1
++
++ln -s file1 sym1 || framework_failure_
++returns_ 1 cp -a --attributes-only sym1 file2 || fail=1
++cmp file2 file2.exp || fail=1
++
++# One can still force removal though
++cp -a --remove-destination --attributes-only sym1 file2 || fail=1
++test -L file2 || fail=1
++cmp file1 file2 || fail=1
++
+ Exit $fail
+--
+cgit v1.2.1
+
diff --git a/system/coreutils/date-debug.patch b/system/coreutils/date-debug.patch
deleted file mode 100644
index fc4977e72..000000000
--- a/system/coreutils/date-debug.patch
+++ /dev/null
@@ -1,56 +0,0 @@
->From 402c3646e19c199130e7a6db5238cf5908e51fb8 Mon Sep 17 00:00:00 2001
-From: Assaf Gordon <assafgordon@gmail.com>
-Date: Mon, 13 May 2019 16:37:40 -0600
-Subject: [PATCH] tests: avoid false-positive in date-debug test
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-When debugging an invalid date due to DST switching, the intermediate
-'normalized time' should not be checked - its value can differ between
-systems (e.g. glibc vs musl).
-
-Reported by Niklas Hambüchen in
-https://lists.gnu.org/r/coreutils/2019-05/msg00031.html
-Analyzed by Rich Felker in
-https://lists.gnu.org/r/coreutils/2019-05/msg00039.html
-
-* tests/misc/date-debug.sh: Replace the exact normalized time
-with 'XX:XX:XX' so different values would not trigger test failure.
----
- tests/misc/date-debug.sh | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/tests/misc/date-debug.sh b/tests/misc/date-debug.sh
-index aa47f1abb..2ce6f4ce8 100755
---- a/tests/misc/date-debug.sh
-+++ b/tests/misc/date-debug.sh
-@@ -71,7 +71,7 @@ date: input timezone: TZ="America/Edmonton" in date string
- date: using specified time as starting value: '02:30:00'
- date: error: invalid date/time value:
- date: user provided time: '(Y-M-D) 2006-04-02 02:30:00'
--date: normalized time: '(Y-M-D) 2006-04-02 03:30:00'
-+date: normalized time: '(Y-M-D) 2006-04-02 XX:XX:XX'
- date: --
- date: possible reasons:
- date: non-existing due to daylight-saving time;
-@@ -81,7 +81,14 @@ date: invalid date 'TZ="America/Edmonton" 2006-04-02 02:30:00'
- EOF
-
- # date should return 1 (error) for invalid date
--returns_ 1 date --debug -d "$in2" >out2 2>&1 || fail=1
-+returns_ 1 date --debug -d "$in2" >out2-t 2>&1 || fail=1
-+
-+# The output line of "normalized time" can differ between systems
-+# (e.g. glibc vs musl) and should not be checked.
-+# See: https://lists.gnu.org/archive/html/coreutils/2019-05/msg00039.html
-+sed '/normalized time:/s/ [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/ XX:XX:XX/' \
-+ out2-t > out2 || framework_failure_
-+
- compare exp2 out2 || fail=1
-
- ##
---
-2.11.0
-
-
diff --git a/system/coreutils/disable-mbrtowc-test.patch b/system/coreutils/disable-mbrtowc-test.patch
index d338e0324..fb595df0e 100644
--- a/system/coreutils/disable-mbrtowc-test.patch
+++ b/system/coreutils/disable-mbrtowc-test.patch
@@ -4,7 +4,7 @@
#!/bin/sh
-# Test whether the POSIX locale has encoding errors.
-LC_ALL=C \
--./test-mbrtowc${EXEEXT} 5 || exit
+-${CHECKER} ./test-mbrtowc${EXEEXT} 5 || exit
-LC_ALL=POSIX \
--./test-mbrtowc${EXEEXT} 5
+-${CHECKER} ./test-mbrtowc${EXEEXT} 5
+exit 77
diff --git a/system/coreutils/localename-test-fix.patch b/system/coreutils/localename-test-fix.patch
index ff89319c7..17aaa226f 100644
--- a/system/coreutils/localename-test-fix.patch
+++ b/system/coreutils/localename-test-fix.patch
@@ -8,7 +8,7 @@
# if !defined IN_LIBINTL
--- coreutils-8.27/gnulib-tests/localename.c.old 2016-12-31 13:54:43.000000000 +0000
+++ coreutils-8.27/gnulib-tests/localename.c 2017-07-30 16:40:47.098541270 +0000
-@@ -2692,16 +2692,19 @@
+@@ -3111,16 +3111,19 @@
locale_t thread_locale = uselocale (NULL);
if (thread_locale != LC_GLOBAL_LOCALE)
{
diff --git a/system/coreutils/ls-removed-dirs.patch b/system/coreutils/ls-removed-dirs.patch
new file mode 100644
index 000000000..59808345c
--- /dev/null
+++ b/system/coreutils/ls-removed-dirs.patch
@@ -0,0 +1,99 @@
+From 10fcb97bd728f09d4a027eddf8ad2900f0819b0a Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Thu, 5 Mar 2020 17:25:29 -0800
+Subject: ls: restore 8.31 behavior on removed directories
+
+* src/ls.c: Do not include <sys/sycall.h>
+(print_dir): Don't worry about whether the directory is removed.
+* tests/ls/removed-directory.sh: Adjust to match new (i.e., old)
+behavior.
+---
+ NEWS | 6 ++++++
+ src/ls.c | 22 ----------------------
+ tests/ls/removed-directory.sh | 10 ++--------
+ 3 files changed, 8 insertions(+), 30 deletions(-)
+
+diff --git a/src/ls.c b/src/ls.c
+index 24b983287..4acf5f44d 100644
+--- a/src/ls.c
++++ b/src/ls.c
+@@ -49,10 +49,6 @@
+ # include <sys/ptem.h>
+ #endif
+
+-#ifdef __linux__
+-# include <sys/syscall.h>
+-#endif
+-
+ #include <stdio.h>
+ #include <assert.h>
+ #include <setjmp.h>
+@@ -2896,7 +2892,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
+ struct dirent *next;
+ uintmax_t total_blocks = 0;
+ static bool first = true;
+- bool found_any_entries = false;
+
+ errno = 0;
+ dirp = opendir (name);
+@@ -2972,7 +2967,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
+ next = readdir (dirp);
+ if (next)
+ {
+- found_any_entries = true;
+ if (! file_ignored (next->d_name))
+ {
+ enum filetype type = unknown;
+@@ -3018,22 +3012,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
+ if (errno != EOVERFLOW)
+ break;
+ }
+-#ifdef __linux__
+- else if (! found_any_entries)
+- {
+- /* If readdir finds no directory entries at all, not even "." or
+- "..", then double check that the directory exists. */
+- if (syscall (SYS_getdents, dirfd (dirp), NULL, 0) == -1
+- && errno != EINVAL)
+- {
+- /* We exclude EINVAL as that pertains to buffer handling,
+- and we've passed NULL as the buffer for simplicity.
+- ENOENT is returned if appropriate before buffer handling. */
+- file_failure (command_line_arg, _("reading directory %s"), name);
+- }
+- break;
+- }
+-#endif
+ else
+ break;
+
+diff --git a/tests/ls/removed-directory.sh b/tests/ls/removed-directory.sh
+index e8c835dab..fe8f929a1 100755
+--- a/tests/ls/removed-directory.sh
++++ b/tests/ls/removed-directory.sh
+@@ -26,20 +26,14 @@ case $host_triplet in
+ *) skip_ 'non linux kernel' ;;
+ esac
+
+-LS_FAILURE=2
+-
+-cat <<\EOF >exp-err || framework_failure_
+-ls: reading directory '.': No such file or directory
+-EOF
+-
+ cwd=$(pwd)
+ mkdir d || framework_failure_
+ cd d || framework_failure_
+ rmdir ../d || framework_failure_
+
+-returns_ $LS_FAILURE ls >../out 2>../err || fail=1
++ls >../out 2>../err || fail=1
+ cd "$cwd" || framework_failure_
+ compare /dev/null out || fail=1
+-compare exp-err err || fail=1
++compare /dev/null err || fail=1
+
+ Exit $fail
+--
+cgit v1.2.1
+
diff --git a/system/e2fsprogs/APKBUILD b/system/e2fsprogs/APKBUILD
index c72ff8c63..6ecbc37f4 100644
--- a/system/e2fsprogs/APKBUILD
+++ b/system/e2fsprogs/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=e2fsprogs
-pkgver=1.45.5
+pkgver=1.45.6
pkgrel=0
pkgdesc="Ext2/3/4 filesystem utilities"
url="http://e2fsprogs.sourceforge.net"
@@ -59,6 +59,6 @@ libcom_err() {
mv "$pkgdir"/lib/libcom_err* "$subpkgdir"/lib/
}
-sha512sums="d1a8611b525742387061f390fb24825dfa175997cc7db05decea913fcc7b97a95a3e787091f2920d4a7d4eb1d813568af734a1610229ead09bcbf9f3e262e4ce e2fsprogs-1.45.5.tar.xz
+sha512sums="f3abfb6fe7ef632bb81152e2127d601cadd3fa93162178576a1d5ed82c2286627184b207b85a5b2a1793db0addf0885dfc3b9523bb340443224caf9c6d613b84 e2fsprogs-1.45.6.tar.xz
34ca45c64a132bb4b507cd4ffb763c6d1b7979eccfed20f63417e514871b47639d32f2a3ecff090713c21a0f02ac503d5093960c80401d64081c592d01af279d header-fix.patch
5f8ff2f096da4b445edff72dfa03f27dd8bf5b6733e724205f5661e32fd0bae92849a1aa53e20c6b60c026dc5ed68567b7866fade1ecd0187718509f03fe9145 time64.patch"
diff --git a/system/easy-kernel/APKBUILD b/system/easy-kernel/APKBUILD
index c840c960e..72d4a1c48 100644
--- a/system/easy-kernel/APKBUILD
+++ b/system/easy-kernel/APKBUILD
@@ -5,7 +5,7 @@ _kflavour=""
_patchver=0
_pkgname=easy-kernel$_kflavour
pkgver=5.4.5
-pkgrel=2
+pkgrel=3
pkgname=$_pkgname-$pkgver-mc$_patchver
pkgdesc="The Linux kernel, packaged for your convenience"
url="https://kernel.org/"
@@ -134,13 +134,13 @@ src() {
sha512sums="9f60f77e8ab972b9438ac648bed17551c8491d6585a5e85f694b2eaa4c623fbc61eb18419b2656b6795eac5deec0edaa04547fc6723fbda52256bd7f3486898f linux-5.4.tar.xz
37c85fcec3bd54d586523f74cfb56db6158152cfbb407469f0da12b24e5de01cbe273ad4e59d41df75011c163922dadf2fe5e919cb6b16f74872e80c28bba1b1 linux-5.4-mc0-patches.tar.xz
-8278765408dbeb860f2b125207f4e47f52c323d7b1596da426510af8a8acdf36decde26d581a902496042b8b7834f5377c4327458b2038f6a10eb653ce7208df config-ppc64
-89b7e2055586a3a71674ebe41cb3f6302b318cc24d8794a970150a1dfe236df4838c8126d6e43b951bbab2680a83b391b03b74317aa794b0371e91426c198008 config-ppc
-072143e5cfb4ba60b2af8de923e5ab8c71224ffee4a97ce6f3a35223afd83e8d86faa15f1d86219d3f8cc4c1b9c2eb4bdc5b0421be7501e5b00916bf63aa0763 config-x86_64
-c699a9499058a2df0692272bd15d7398745459458eb62c99813e0b4de28f359117c6c727be77d75ae08db23cb1824a3bf1f045aaadf88bc53b8267b2c0f6992f config-pmmx
-9d5ae66c32060c90074d2e217ade8dc700262bb737a46e5d7242cb24bb98b54c3d27eb19685fcef1875fbb6bd2283f2a8fda8c37940ea49fa58e891524893046 config-aarch64
-67d61164e5cfebb4127ba3ef265339bfce834f9b8bca1f82d4acdd5cefb673fdb456a837c090667fd6659a28fe7a9480dbbfceac6550e24245c260561cdc6070 config-sparc64
-7b240485f3adc7da4f08612d11c3001e40ab7b50cfdf492eb23aed335bcbf742c92afa39aa1764d8f85599d009a07c8dca77a1e19676d4729d232410bdd36905 config-m68k
+dcf8bc3638b3234df3d66f5b804938113e859ffd1df4c7b689f476ea5d9c43d5df9c58dbb8b4def61e8f720554d9d11db6d6065ed5ded7482d5bb088d838f23e config-ppc64
+7b251676a1e497f3bad5d93744af9ec181ee792ca90f70207116de82e059c901309273e7ca932ed6b336f67338d33efc20aa91ec563e9acd8c2539520ff70f4e config-ppc
+df6ad91d6889bdb5bd0fe8dc8dcddc1d133e290ca900702420160e5a3b8c1edaa3d73cfb7ecbf79e0dd53637d926254859e3cde7d12921f249bee76cb17f38fb config-x86_64
+a0fdd57f57ce52caa83f962a6352c843882ecc9375d9dfa922c389d46f785f358016d5112a2a447475f890727f2a44533dd8e4ebea1e6a48fcc0aad78ea4dd2f config-pmmx
+e5f8f07c588ebbaa53166711b9940aa6d14a72e017df50300f3817c34a1abc2931f191431246d313ba85bc691c97f5094e01460ed98f4dbcd6e4780eefec10bc config-aarch64
+4527b7951620953e83e824c41e2dbc5c49e92f13709500fd849813dc157897da33d177b901ce1304b317a51a7c19a561a891a02e463f98236ff9e6957131d65a config-sparc64
+581da20b2e0db48fcb29fe97ce6cf5d2e6a7092cbe2fd1b48cbdaddc1bc15d24e2470e56394624ff61b94b6ccf25035d07a18d9cbc4c16ac7f2865913a13c0d8 config-m68k
4b2cd7dd0010aaec617c756e7587be7fad6ff0ab3dbc1ed038e3dc72c9308fc9e347c6e5296c30711d914e286aa254600586e2ad954a5da226e6e4c1522b75b5 asound-syntax-fix.patch
61dcd633d72876566b7738dd08856b26850c935b4a81ab2364711335fe01c397083160f530b3382bbc239c6a8135be6a032e93039083ec2cefdae2902429a2e0 kernel.h
6f309a18c65c991240265afd200cc79a706f5d9e5d072838a9a641ab3676a5e4c32033f9767fc723ff4c45ee462169a0f77bd7dfe63b547d521dadd073f827a7 uapi-iphdr.patch"
diff --git a/system/easy-kernel/config-aarch64 b/system/easy-kernel/config-aarch64
index 4a6a7889b..9241599cd 100644
--- a/system/easy-kernel/config-aarch64
+++ b/system/easy-kernel/config-aarch64
@@ -7014,7 +7014,9 @@ CONFIG_CIFS_DEBUG=y
# CONFIG_CIFS_DFS_UPCALL is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
+CONFIG_9P_FS=m
+CONFIG_9P_FS_POSIX_ACL=y
+CONFIG_9P_FS_SECURITY=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
diff --git a/system/easy-kernel/config-m68k b/system/easy-kernel/config-m68k
index 1b8be2d03..a180ea561 100644
--- a/system/easy-kernel/config-m68k
+++ b/system/easy-kernel/config-m68k
@@ -2629,7 +2629,9 @@ CONFIG_CIFS_ALLOW_INSECURE_LEGACY=y
# CONFIG_CIFS_DFS_UPCALL is not set
CONFIG_CODA_FS=m
# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
+CONFIG_9P_FS=m
+CONFIG_9P_FS_POSIX_ACL=y
+CONFIG_9P_FS_SECURITY=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
diff --git a/system/easy-kernel/config-pmmx b/system/easy-kernel/config-pmmx
index 68358793f..c27e17981 100644
--- a/system/easy-kernel/config-pmmx
+++ b/system/easy-kernel/config-pmmx
@@ -6680,7 +6680,9 @@ CONFIG_CIFS_DEBUG=y
# CONFIG_CIFS_DFS_UPCALL is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
+CONFIG_9P_FS=m
+CONFIG_9P_FS_POSIX_ACL=y
+CONFIG_9P_FS_SECURITY=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
diff --git a/system/easy-kernel/config-ppc b/system/easy-kernel/config-ppc
index 60dfb0409..816582f7f 100644
--- a/system/easy-kernel/config-ppc
+++ b/system/easy-kernel/config-ppc
@@ -5262,7 +5262,9 @@ CONFIG_CIFS_DEBUG=y
# CONFIG_CIFS_DFS_UPCALL is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
+CONFIG_9P_FS=m
+CONFIG_9P_FS_POSIX_ACL=y
+CONFIG_9P_FS_SECURITY=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
diff --git a/system/easy-kernel/config-ppc64 b/system/easy-kernel/config-ppc64
index 1bdb0d81b..c17fb433c 100644
--- a/system/easy-kernel/config-ppc64
+++ b/system/easy-kernel/config-ppc64
@@ -5179,7 +5179,9 @@ CONFIG_CIFS_DEBUG=y
# CONFIG_CIFS_DFS_UPCALL is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
+CONFIG_9P_FS=m
+CONFIG_9P_FS_POSIX_ACL=y
+CONFIG_9P_FS_SECURITY=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
diff --git a/system/easy-kernel/config-sparc64 b/system/easy-kernel/config-sparc64
index 8230ed3f2..c4e4f71d9 100644
--- a/system/easy-kernel/config-sparc64
+++ b/system/easy-kernel/config-sparc64
@@ -4694,7 +4694,9 @@ CONFIG_CIFS_DEBUG=y
# CONFIG_CIFS_DFS_UPCALL is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
+CONFIG_9P_FS=m
+CONFIG_9P_FS_POSIX_ACL=y
+CONFIG_9P_FS_SECURITY=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
diff --git a/system/easy-kernel/config-x86_64 b/system/easy-kernel/config-x86_64
index 84397a343..b3df96c68 100644
--- a/system/easy-kernel/config-x86_64
+++ b/system/easy-kernel/config-x86_64
@@ -6842,7 +6842,9 @@ CONFIG_CIFS_DEBUG=y
# CONFIG_CIFS_DFS_UPCALL is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
+CONFIG_9P_FS=m
+CONFIG_9P_FS_POSIX_ACL=y
+CONFIG_9P_FS_SECURITY=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
diff --git a/system/execline/APKBUILD b/system/execline/APKBUILD
index 3e903ee56..bc7328ea3 100644
--- a/system/execline/APKBUILD
+++ b/system/execline/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Laurent Bercot <ska-adelie@skarnet.org>
# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
pkgname=execline
-pkgver=2.5.3.0
+pkgver=2.6.0.2
pkgrel=0
pkgdesc="A small scripting language for non-interactive scripts"
url="https://skarnet.org/software/$pkgname/"
@@ -20,7 +20,8 @@ build() {
--enable-allstatic \
--enable-static-libc \
--libdir=/usr/lib \
- --with-dynlib=/lib
+ --with-dynlib=/lib \
+ --enable-pedantic-posix
make
}
@@ -61,4 +62,4 @@ doc() {
cp -a "$builddir/doc" "$subpkgdir/usr/share/doc/$pkgname"
}
-sha512sums="75b584e2365288bb1d05fd67e390fab1b6ccf48cb0a2ccbfb84a7d22ddf6957c9c591ab165542ed180b2ff1ef9ceb2a16cbae569e69c5dd5f20e52be092cff15 execline-2.5.3.0.tar.gz"
+sha512sums="915823af0d557fc7a181e088ce319568e62ea4bf743704e498786422c97b991e6b09447c7cff7d7dda520d391773ef4b2fea68e44479c02766966256719bb4c0 execline-2.6.0.2.tar.gz"
diff --git a/system/gettext-tiny/APKBUILD b/system/gettext-tiny/APKBUILD
index ce62d5c99..a1d199ecd 100644
--- a/system/gettext-tiny/APKBUILD
+++ b/system/gettext-tiny/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=gettext-tiny
pkgver=0.3.1_git20191130
-pkgrel=2
+pkgrel=3
pkgdesc="An internationalisation and localisation system"
url="https://github.com/sabotage-linux/gettext-tiny"
arch="all"
@@ -16,6 +16,7 @@ source="https://distfiles.adelielinux.org/source/$pkgname-$pkgver.tar.xz
line-length.patch
respect-cflags.patch
stop-doing-macro-crap.patch
+ msgfmt-exit.patch
"
build() {
@@ -30,4 +31,5 @@ sha512sums="a318135626a0403a30a81fa475f7e1878b8af5a87053b0e00876c73b591508f3cf1e
8efbf9c11429ab26f3c15e00c34258200598833b8f846a23e4c8d95023c2184d9dcf9cbb48d58eec1604442691af76e6f8e904ad7348016c393257aa30eae7cd keyword.patch
0a26a8481bffe2ce8c73f7f500963aea9db8379fb87849142d8efabf1656604b22f6ad345483256f14c388466f2f44e5924b9f65d88f26867a753a96d1529270 line-length.patch
b4e7db4e415f6bc31f2214f2044506ad18ea0bd3cae4200d93bbd34aa493c7478a7f953d0a7e08f29f0fd5a5d7b7cbfa2bcfd5692c37e423706a1c193239bf1d respect-cflags.patch
-cd4cfc8cc6ea998f1e33ef666e3b9c3de3f3253994bccc942b177773c94f785e3892cb7d5f34bec1102dc7558236c07c5eac90e15d755e12ee06836336373526 stop-doing-macro-crap.patch"
+cd4cfc8cc6ea998f1e33ef666e3b9c3de3f3253994bccc942b177773c94f785e3892cb7d5f34bec1102dc7558236c07c5eac90e15d755e12ee06836336373526 stop-doing-macro-crap.patch
+0037a1347f9ac2aa6f68160441b83c35ce8128ca140be93f3c508e6cd02161e49edff82034877ed11c127886337455ff4ea941b6a14168c2ca69aa82a7cff8a5 msgfmt-exit.patch"
diff --git a/system/gettext-tiny/msgfmt-exit.patch b/system/gettext-tiny/msgfmt-exit.patch
new file mode 100644
index 000000000..f5ff3fbb8
--- /dev/null
+++ b/system/gettext-tiny/msgfmt-exit.patch
@@ -0,0 +1,36 @@
+From 0e62c2588742cfffd3dc81c09ecc8488c0ce25b9 Mon Sep 17 00:00:00 2001
+From: Max Rees <maxcrees@me.com>
+Date: Sun, 22 Mar 2020 20:20:15 -0500
+Subject: [PATCH] msgfmt: exit(1) if incorrectly used
+
+This prevents builds from continuing seemingly fine when they are
+actually not using this version of msgfmt correctly.
+---
+ src/msgfmt.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/msgfmt.c b/src/msgfmt.c
+index aa16c5e..3de9a56 100644
+--- a/src/msgfmt.c
++++ b/src/msgfmt.c
+@@ -278,7 +278,7 @@ void set_file(int out, char* fn, FILE** dest) {
+ int main(int argc, char**argv) {
+ if (argc == 1) {
+ syntax();
+- return 0;
++ return 1;
+ }
+
+ int arg = 1;
+@@ -376,7 +376,7 @@ int main(int argc, char**argv) {
+ streq(A+1, "D")
+ ) {
+ syntax();
+- return 0;
++ return 1;
+ } else if (streq(A+1, "l")) {
+ arg++;
+ locale = A;
+--
+2.25.1
+
diff --git a/system/git/APKBUILD b/system/git/APKBUILD
index 45d7b033b..04762f7ef 100644
--- a/system/git/APKBUILD
+++ b/system/git/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=git
-pkgver=2.25.1
+pkgver=2.25.4
pkgrel=0
pkgdesc="Distributed version control system"
url="https://www.git-scm.com/"
@@ -21,7 +21,6 @@ subpackages="$pkgname-doc
$pkgname-daemon
$pkgname-gitweb
$pkgname-subtree::noarch
- $pkgname-subtree-doc:subtree_doc:noarch
$pkgname-lang
"
replaces="git-perl perl-git"
@@ -33,20 +32,24 @@ source="https://www.kernel.org/pub/software/scm/git/git-$pkgver.tar.xz
_gitcoredir=/usr/libexec/git-core
# secfixes:
-# 2.24.1:
-# - CVE-2019-1348
-# - CVE-2019-1349
-# - CVE-2019-1350
-# - CVE-2019-1351
-# - CVE-2019-1352
-# - CVE-2019-1353
-# - CVE-2019-1354
-# - CVE-2019-1387
-# - CVE-2019-19604
-# 2.19.2:
-# - CVE-2018-19486
-# 2.14.1:
-# - CVE-2017-1000117
+# 2.25.4-r0:
+# - CVE-2020-11008
+# 2.25.3-r0:
+# - CVE-2020-5260
+# 2.24.1-r0:
+# - CVE-2019-1348
+# - CVE-2019-1349
+# - CVE-2019-1350
+# - CVE-2019-1351
+# - CVE-2019-1352
+# - CVE-2019-1353
+# - CVE-2019-1354
+# - CVE-2019-1387
+# - CVE-2019-19604
+# 2.19.2-r0:
+# - CVE-2018-19486
+# 2.14.1-r0:
+# - CVE-2017-1000117
prepare() {
default_prepare
@@ -163,17 +166,7 @@ subtree() {
make install prefix=/usr DESTDIR="$subpkgdir"
}
-subtree_doc() {
- depends=""
- pkgdesc="Split git repository into subtrees (documentation)"
- replaces=""
-
- cd "$builddir"/contrib/subtree
- make install-man prefix=/usr DESTDIR="$subpkgdir"
- gzip -9 "$subpkgdir"/usr/share/man/man1/git-subtree.1
-}
-
-sha512sums="15241143acfd8542d85d2709ac3c80dbd6e8d5234438f70c4f33cc71a2bdec3e32938df7f6351e2746d570b021d3bd0b70474ea4beec0c51d1fc45f9c287b344 git-2.25.1.tar.xz
+sha512sums="ca2ecc561d06dbb393fe47d445f0d69423d114766d9bcc125ef1d6d37e350ad903c456540cea420c1a51635b750cde3901e4196f29ce95b315fda11270173450 git-2.25.4.tar.xz
0a0935d876024d96156df3aeec06b47fd9e370484d4552786c450cb500ae671a631e64c30994ec39f43a2f313f75d68909688ea92b47327d1af65e365dc77480 dont-test-other-encodings.patch
89528cdd14c51fd568aa61cf6c5eae08ea0844e59f9af9292da5fc6c268261f4166017d002d494400945e248df6b844e2f9f9cd2d9345d516983f5a110e4c42a git-daemon.initd
fbf1f425206a76e2a8f82342537ed939ff7e623d644c086ca2ced5f69b36734695f9f80ebda1728f75a94d6cd2fcb71bf845b64239368caab418e4d368c141ec git-daemon.confd"
diff --git a/system/help2man/APKBUILD b/system/help2man/APKBUILD
index 822ae754e..0bb2530e1 100644
--- a/system/help2man/APKBUILD
+++ b/system/help2man/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=help2man
-pkgver=1.47.12
+pkgver=1.47.13
pkgrel=0
pkgdesc="Create simple man pages from --help output"
url="https://www.gnu.org/software/help2man"
@@ -28,4 +28,4 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="fb71e48e4a7a0f4316148295ea539b667a131149f4467da0f3e283389c9d9f2a5f1e9124ca8d64d6c3250d332a713d4e8de204ca9e7088840e74f316fa5221be help2man-1.47.12.tar.xz"
+sha512sums="7bf4c75a42c103dd8413a94505f383c6e2b215f9a4cc506e11935acc7f108caad01a5fa489ee157ebef5fa02299145592f65cc828fc016417af557382975d57a help2man-1.47.13.tar.xz"
diff --git a/system/icu/APKBUILD b/system/icu/APKBUILD
index 4165246a3..046698316 100644
--- a/system/icu/APKBUILD
+++ b/system/icu/APKBUILD
@@ -6,7 +6,7 @@ pkgver=65.1
# convert x.y.z to x_y_z
_ver=$(printf '%s' "$pkgver" | tr . _)
-pkgrel=0
+pkgrel=1
pkgdesc="International Components for Unicode"
url="http://site.icu-project.org/"
arch="all"
@@ -17,6 +17,7 @@ makedepends=""
subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs"
source="https://github.com/unicode-org/icu/releases/download/release-$(printf '%s' "$pkgver" | tr . -)/${pkgname}4c-$_ver-src.tgz
icu-60.2-always-use-utf8.patch
+ CVE-2020-10531.patch
"
# secfixes:
@@ -27,6 +28,9 @@ source="https://github.com/unicode-org/icu/releases/download/release-$(printf '%
# 58.2-r2:
# - CVE-2017-7867
# - CVE-2017-7868
+# 65.1-r1:
+# - CVE-2020-10531
+
builddir="$srcdir"/icu/source
prepare() {
@@ -73,4 +77,5 @@ static() {
}
sha512sums="8f1ef33e1f4abc9a8ee870331c59f01b473d6da1251a19ce403f822f3e3871096f0791855d39c8f20c612fc49cda2c62c06864aa32ddab2dbd186d2b21ce9139 icu4c-65_1-src.tgz
-f86c62422f38f6485c58d4766e629bab69e4b0e00fa910854e40e7db1ace299152eaefa99ae2fbab7465e65d3156cbea7124612defa60680db58ab5c34d6262f icu-60.2-always-use-utf8.patch"
+f86c62422f38f6485c58d4766e629bab69e4b0e00fa910854e40e7db1ace299152eaefa99ae2fbab7465e65d3156cbea7124612defa60680db58ab5c34d6262f icu-60.2-always-use-utf8.patch
+2901235a24b1973516e495473188b077eb0486714ac47f702f226a3406176e913672159978b67548a1316284ecc716e06158b05c190ddfa83ad576a7a3539d72 CVE-2020-10531.patch"
diff --git a/system/icu/CVE-2017-7867-7868.patch b/system/icu/CVE-2017-7867-7868.patch
deleted file mode 100644
index df18283c2..000000000
--- a/system/icu/CVE-2017-7867-7868.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-Index: source/common/utext.cpp
-===================================================================
---- source/common/utext.cpp (revision 39670)
-+++ source/common/utext.cpp (revision 39671)
-@@ -848,7 +848,13 @@
-
- // Chunk size.
--// Must be less than 85, because of byte mapping from UChar indexes to native indexes.
--// Worst case is three native bytes to one UChar. (Supplemenaries are 4 native bytes
--// to two UChars.)
-+// Must be less than 42 (256/6), because of byte mapping from UChar indexes to native indexes.
-+// Worst case there are six UTF-8 bytes per UChar.
-+// obsolete 6 byte form fd + 5 trails maps to fffd
-+// obsolete 5 byte form fc + 4 trails maps to fffd
-+// non-shortest 4 byte forms maps to fffd
-+// normal supplementaries map to a pair of utf-16, two utf8 bytes per utf-16 unit
-+// mapToUChars array size must allow for the worst case, 6.
-+// This could be brought down to 4, by treating fd and fc as pure illegal,
-+// rather than obsolete lead bytes. But that is not compatible with the utf-8 access macros.
- //
- enum { UTF8_TEXT_CHUNK_SIZE=32 };
-@@ -890,5 +896,5 @@
- // one for a supplementary starting in the last normal position,
- // and one for an entry for the buffer limit position.
-- uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*3+6]; // Map native offset from bufNativeStart to
-+ uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*6+6]; // Map native offset from bufNativeStart to
- // correspoding offset in filled part of buf.
- int32_t align;
-@@ -1033,4 +1039,5 @@
- u8b = (UTF8Buf *)ut->p; // the current buffer
- mapIndex = ix - u8b->toUCharsMapStart;
-+ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars));
- ut->chunkOffset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx;
- return TRUE;
-@@ -1299,4 +1306,8 @@
- // If index is at the end, there is no character there to look at.
- if (ix != ut->b) {
-+ // Note: this function will only move the index back if it is on a trail byte
-+ // and there is a preceding lead byte and the sequence from the lead
-+ // through this trail could be part of a valid UTF-8 sequence
-+ // Otherwise the index remains unchanged.
- U8_SET_CP_START(s8, 0, ix);
- }
-@@ -1312,5 +1323,8 @@
- uint8_t *mapToNative = u8b->mapToNative;
- uint8_t *mapToUChars = u8b->mapToUChars;
-- int32_t toUCharsMapStart = ix - (UTF8_TEXT_CHUNK_SIZE*3 + 1);
-+ int32_t toUCharsMapStart = ix - sizeof(UTF8Buf::mapToUChars) + 1;
-+ // Note that toUCharsMapStart can be negative. Happens when the remaining
-+ // text from current position to the beginning is less than the buffer size.
-+ // + 1 because mapToUChars must have a slot at the end for the bufNativeLimit entry.
- int32_t destIx = UTF8_TEXT_CHUNK_SIZE+2; // Start in the overflow region
- // at end of buffer to leave room
-@@ -1339,4 +1353,5 @@
- // Special case ASCII range for speed.
- buf[destIx] = (UChar)c;
-+ U_ASSERT(toUCharsMapStart <= srcIx);
- mapToUChars[srcIx - toUCharsMapStart] = (uint8_t)destIx;
- mapToNative[destIx] = (uint8_t)(srcIx - toUCharsMapStart);
-@@ -1368,4 +1383,5 @@
- mapToUChars[sIx-- - toUCharsMapStart] = (uint8_t)destIx;
- } while (sIx >= srcIx);
-+ U_ASSERT(toUCharsMapStart <= (srcIx+1));
-
- // Set native indexing limit to be the current position.
-@@ -1542,4 +1558,5 @@
- U_ASSERT(index<=ut->chunkNativeLimit);
- int32_t mapIndex = index - u8b->toUCharsMapStart;
-+ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars));
- int32_t offset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx;
- U_ASSERT(offset>=0 && offset<=ut->chunkLength);
-Index: source/test/intltest/utxttest.cpp
-===================================================================
---- source/test/intltest/utxttest.cpp (revision 39670)
-+++ source/test/intltest/utxttest.cpp (revision 39671)
-@@ -68,4 +68,6 @@
- case 7: name = "Ticket12130";
- if (exec) Ticket12130(); break;
-+ case 8: name = "Ticket12888";
-+ if (exec) Ticket12888(); break;
- default: name = ""; break;
- }
-@@ -1584,2 +1586,62 @@
- utext_close(&ut);
- }
-+
-+// Ticket 12888: bad handling of illegal utf-8 containing many instances of the archaic, now illegal,
-+// six byte utf-8 forms. Original implementation had an assumption that
-+// there would be at most three utf-8 bytes per UTF-16 code unit.
-+// The five and six byte sequences map to a single replacement character.
-+
-+void UTextTest::Ticket12888() {
-+ const char *badString =
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80";
-+
-+ UErrorCode status = U_ZERO_ERROR;
-+ LocalUTextPointer ut(utext_openUTF8(NULL, badString, -1, &status));
-+ TEST_SUCCESS(status);
-+ for (;;) {
-+ UChar32 c = utext_next32(ut.getAlias());
-+ if (c == U_SENTINEL) {
-+ break;
-+ }
-+ }
-+ int32_t endIdx = utext_getNativeIndex(ut.getAlias());
-+ if (endIdx != (int32_t)strlen(badString)) {
-+ errln("%s:%d expected=%d, actual=%d", __FILE__, __LINE__, strlen(badString), endIdx);
-+ return;
-+ }
-+
-+ for (int32_t prevIndex = endIdx; prevIndex>0;) {
-+ UChar32 c = utext_previous32(ut.getAlias());
-+ int32_t currentIndex = utext_getNativeIndex(ut.getAlias());
-+ if (c != 0xfffd) {
-+ errln("%s:%d (expected, actual, index) = (%d, %d, %d)\n",
-+ __FILE__, __LINE__, 0xfffd, c, currentIndex);
-+ break;
-+ }
-+ if (currentIndex != prevIndex - 6) {
-+ errln("%s:%d: wrong index. Expected, actual = %d, %d",
-+ __FILE__, __LINE__, prevIndex - 6, currentIndex);
-+ break;
-+ }
-+ prevIndex = currentIndex;
-+ }
-+}
-Index: source/test/intltest/utxttest.h
-===================================================================
---- source/test/intltest/utxttest.h (revision 39670)
-+++ source/test/intltest/utxttest.h (revision 39671)
-@@ -39,4 +39,5 @@
- void Ticket10983();
- void Ticket12130();
-+ void Ticket12888();
-
- private:
diff --git a/system/icu/CVE-2020-10531.patch b/system/icu/CVE-2020-10531.patch
new file mode 100644
index 000000000..f456b06ec
--- /dev/null
+++ b/system/icu/CVE-2020-10531.patch
@@ -0,0 +1,118 @@
+From b7d08bc04a4296982fcef8b6b8a354a9e4e7afca Mon Sep 17 00:00:00 2001
+From: Frank Tang <ftang@chromium.org>
+Date: Sat, 1 Feb 2020 02:39:04 +0000
+Subject: [PATCH] ICU-20958 Prevent SEGV_MAPERR in append
+
+See #971
+---
+ source/common/unistr.cpp | 6 ++-
+ source/test/intltest/ustrtest.cpp | 62 +++++++++++++++++++++++++
+ source/test/intltest/ustrtest.h | 1 +
+ 3 files changed, 68 insertions(+), 1 deletion(-)
+
+diff --git source/common/unistr.cpp source/common/unistr.cpp
+index 901bb3358ba..077b4d6ef20 100644
+--- source/common/unistr.cpp
++++ source/common/unistr.cpp
+@@ -1563,7 +1563,11 @@ UnicodeString::doAppend(const UChar *srcChars, int32_t srcStart, int32_t srcLeng
+ }
+
+ int32_t oldLength = length();
+- int32_t newLength = oldLength + srcLength;
++ int32_t newLength;
++ if (uprv_add32_overflow(oldLength, srcLength, &newLength)) {
++ setToBogus();
++ return *this;
++ }
+
+ // Check for append onto ourself
+ const UChar* oldArray = getArrayStart();
+diff --git source/test/intltest/ustrtest.cpp source/test/intltest/ustrtest.cpp
+index b6515ea813c..ad38bdf53a3 100644
+--- source/test/intltest/ustrtest.cpp
++++ source/test/intltest/ustrtest.cpp
+@@ -67,6 +67,7 @@ void UnicodeStringTest::runIndexedTest( int32_t index, UBool exec, const char* &
+ TESTCASE_AUTO(TestWCharPointers);
+ TESTCASE_AUTO(TestNullPointers);
+ TESTCASE_AUTO(TestUnicodeStringInsertAppendToSelf);
++ TESTCASE_AUTO(TestLargeAppend);
+ TESTCASE_AUTO_END;
+ }
+
+@@ -2310,3 +2311,64 @@ void UnicodeStringTest::TestUnicodeStringInsertAppendToSelf() {
+ str.insert(2, sub);
+ assertEquals("", u"abbcdcde", str);
+ }
++
++void UnicodeStringTest::TestLargeAppend() {
++ if(quick) return;
++
++ IcuTestErrorCode status(*this, "TestLargeAppend");
++ // Make a large UnicodeString
++ int32_t len = 0xAFFFFFF;
++ UnicodeString str;
++ char16_t *buf = str.getBuffer(len);
++ // A fast way to set buffer to valid Unicode.
++ // 4E4E is a valid unicode character
++ uprv_memset(buf, 0x4e, len * 2);
++ str.releaseBuffer(len);
++ UnicodeString dest;
++ // Append it 16 times
++ // 0xAFFFFFF times 16 is 0xA4FFFFF1,
++ // which is greater than INT32_MAX, which is 0x7FFFFFFF.
++ int64_t total = 0;
++ for (int32_t i = 0; i < 16; i++) {
++ dest.append(str);
++ total += len;
++ if (total <= INT32_MAX) {
++ assertFalse("dest is not bogus", dest.isBogus());
++ } else {
++ assertTrue("dest should be bogus", dest.isBogus());
++ }
++ }
++ dest.remove();
++ total = 0;
++ for (int32_t i = 0; i < 16; i++) {
++ dest.append(str);
++ total += len;
++ if (total + len <= INT32_MAX) {
++ assertFalse("dest is not bogus", dest.isBogus());
++ } else if (total <= INT32_MAX) {
++ // Check that a string of exactly the maximum size works
++ UnicodeString str2;
++ int32_t remain = INT32_MAX - total;
++ char16_t *buf2 = str2.getBuffer(remain);
++ if (buf2 == nullptr) {
++ // if somehow memory allocation fail, return the test
++ return;
++ }
++ uprv_memset(buf2, 0x4e, remain * 2);
++ str2.releaseBuffer(remain);
++ dest.append(str2);
++ total += remain;
++ assertEquals("When a string of exactly the maximum size works", (int64_t)INT32_MAX, total);
++ assertEquals("When a string of exactly the maximum size works", INT32_MAX, dest.length());
++ assertFalse("dest is not bogus", dest.isBogus());
++
++ // Check that a string size+1 goes bogus
++ str2.truncate(1);
++ dest.append(str2);
++ total++;
++ assertTrue("dest should be bogus", dest.isBogus());
++ } else {
++ assertTrue("dest should be bogus", dest.isBogus());
++ }
++ }
++}
+diff --git source/test/intltest/ustrtest.h source/test/intltest/ustrtest.h
+index 218befdcc68..4a356a92c7a 100644
+--- source/test/intltest/ustrtest.h
++++ source/test/intltest/ustrtest.h
+@@ -97,6 +97,7 @@ class UnicodeStringTest: public IntlTest {
+ void TestWCharPointers();
+ void TestNullPointers();
+ void TestUnicodeStringInsertAppendToSelf();
++ void TestLargeAppend();
+ };
+
+ #endif
diff --git a/system/kbd/APKBUILD b/system/kbd/APKBUILD
index d54e7f29c..deb7fb205 100644
--- a/system/kbd/APKBUILD
+++ b/system/kbd/APKBUILD
@@ -2,9 +2,9 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=kbd
pkgver=2.2.0_git20190823
-pkgrel=0
+pkgrel=1
pkgdesc="Console keyboard and font management utilities"
-url=" "
+url="https://kbd-project.org/"
arch="all"
options="!check" # padding error on at least ppc64
license="GPL-2.0+"
@@ -12,8 +12,13 @@ depends=""
checkdepends="check-dev"
makedepends="linux-headers linux-pam-dev autoconf automake libtool"
subpackages="$pkgname-doc $pkgname-fonts::noarch $pkgname-keymaps::noarch
- $pkgname-lang"
-source="https://dev.sick.bike/dist/$pkgname-$pkgver.tar.xz"
+ $pkgname-lang $pkgname-openrc"
+source="https://dev.sick.bike/dist/$pkgname-$pkgver.tar.xz
+ consolefont.confd
+ consolefont.initd
+ keymaps.confd
+ keymaps.initd
+ "
prepare() {
default_prepare
@@ -37,6 +42,19 @@ check() {
package() {
make DESTDIR="$pkgdir" install
+
+ for i in consolefont keymaps; do
+ install -Dm644 "$srcdir"/$i.confd \
+ "$pkgdir"/etc/conf.d/$i
+ install -Dm755 "$srcdir"/$i.initd \
+ "$pkgdir"/etc/init.d/$i
+ done
+}
+
+openrc() {
+ default_openrc
+ license="BSD-2-Clause"
+ replaces="openrc<0.24.1-r10"
}
fonts() {
@@ -52,4 +70,8 @@ keymaps() {
mv "$pkgdir"/usr/share/unimaps "$subpkgdir"/usr/share/
}
-sha512sums="7f6202aeb17d6224095447a92d999478220457e1e7cadb90a7c40ca7f3b0c5b1f672db1995fb69652ca37558a75df582bfb5fea5772f3b1e040fe39f8f54504e kbd-2.2.0_git20190823.tar.xz"
+sha512sums="7f6202aeb17d6224095447a92d999478220457e1e7cadb90a7c40ca7f3b0c5b1f672db1995fb69652ca37558a75df582bfb5fea5772f3b1e040fe39f8f54504e kbd-2.2.0_git20190823.tar.xz
+19761fdd2b32c1bbcc9254b89b7893741e144b917a75410af3f274553fe61e2f56cbbd17ff77ac929e9377604663cbbfd9e53c73e7d41e71de6de573730950c7 consolefont.confd
+1e67f75f27ec5de8f71489c83f78e53e8fd0925ae2d82dabf516f98905c5aff206a8e943e92b6af413eae5f0ecb9c2240526dfc3c56811a8dc1d19ced561bba3 consolefont.initd
+af7d37fc6be1382414ca8245ca6f8d2ee8b82650b8a08eebbd980cf6dd2b92524fce2851ce0b2cd67e915488c12044ab50c5ab1f01c3072af87eed3e058ac268 keymaps.confd
+510d7eb582a914fa7cfb868d0c3d55a21ee1519033117d0943a153528b5810d09f6421ddc02d93906c1a66fb7e07e86240f38dad0d38cfb5a8c7e9a6335a937f keymaps.initd"
diff --git a/system/kbd/consolefont.confd b/system/kbd/consolefont.confd
new file mode 100644
index 000000000..4c41d0633
--- /dev/null
+++ b/system/kbd/consolefont.confd
@@ -0,0 +1,20 @@
+# The consolefont service is not activated by default. If you need to
+# use it, you should run "rc-update add consolefont boot" as root.
+#
+# consolefont specifies the default font that you'd like Linux to use on the
+# console. You will have to install a package such as kbd-fonts or
+# terminus-font to have a selection; they will be installed in
+# /usr/share/consolefonts.
+#
+# The following (from terminus-font) is a good font for HiDPI screens.
+#consolefont="ter-i32n"
+
+# consoletranslation is the charset map file to use. Leave commented to use
+# the default one. Have a look in /usr/share/consoletrans for a selection of
+# map files you can use.
+#consoletranslation="8859-1_to_uni"
+
+# unicodemap is the unicode map file to use. Leave commented to use the
+# default one. Have a look in /usr/share/unimaps (from the kbd-keymaps
+# package) for a selection of map files you can use.
+#unicodemap="iso01"
diff --git a/system/kbd/consolefont.initd b/system/kbd/consolefont.initd
new file mode 100644
index 000000000..63d8601c5
--- /dev/null
+++ b/system/kbd/consolefont.initd
@@ -0,0 +1,70 @@
+#!/sbin/openrc-run
+# Copyright (c) 2007-2015 The OpenRC Authors.
+# See the Authors file at the top-level directory of this distribution and
+# https://github.com/OpenRC/openrc/blob/master/AUTHORS
+#
+# This file is part of OpenRC. It is subject to the license terms in
+# the LICENSE file found in the top-level directory of this
+# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
+# This file may not be copied, modified, propagated, or distributed
+# except according to the terms contained in the LICENSE file.
+
+description="Sets a font for the consoles."
+
+depend()
+{
+ need localmount termencoding
+ after hotplug bootmisc modules
+ keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu
+}
+
+start()
+{
+ ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
+ consolefont=${consolefont:-${CONSOLEFONT}}
+ unicodemap=${unicodemap:-${UNICODEMAP}}
+ consoletranslation=${consoletranslation:-${CONSOLETRANSLATION}}
+
+ if [ -z "$consolefont" ]; then
+ ebegin "Using the default console font"
+ eend 0
+ return 0
+ fi
+
+ if [ "$ttyn" = 0 ]; then
+ ebegin "Skipping font setup (rc_tty_number == 0)"
+ eend 0
+ return 0
+ fi
+
+ local x= param= sf_param= retval=0 ttydev=/dev/tty
+
+ # Get additional parameters
+ if [ -n "$consoletranslation" ]; then
+ param="$param -m $consoletranslation"
+ fi
+ if [ -n "${unicodemap}" ]; then
+ param="$param -u $unicodemap"
+ fi
+
+ # Set the console font
+ ebegin "Setting console font [$consolefont]"
+ [ -d /dev/vc ] && ttydev=/dev/vc/
+ x=1
+ while [ $x -le $ttyn ]; do
+ if ! setfont $consolefont $param -C $ttydev$x >/dev/null; then
+ retval=1
+ break
+ fi
+ : $(( x += 1 ))
+ done
+ eend $retval
+
+ # Store the font so we can use it ASAP on boot
+ if [ $retval -eq 0 ] && checkpath -W "$RC_LIBEXECDIR"; then
+ mkdir -p "$RC_LIBEXECDIR"/console
+ setfont -O "$RC_LIBEXECDIR"/console/font
+ fi
+
+ return $retval
+}
diff --git a/system/kbd/keymaps.confd b/system/kbd/keymaps.confd
new file mode 100644
index 000000000..9a2863413
--- /dev/null
+++ b/system/kbd/keymaps.confd
@@ -0,0 +1,24 @@
+# Use keymap to specify the default console keymap. There is a complete tree
+# of keymaps in /usr/share/keymaps to choose from (from the kbd-keymaps
+# package).
+keymap="us"
+
+# Should we first load the 'windowkeys' console keymap? Most x86 users will
+# say "yes" here. Note that non-x86 users should leave it as "no".
+# Loading this keymap will enable VT switching (like ALT+Left/Right)
+# using the special windows keys on the linux console.
+windowkeys="NO"
+
+# The maps to load for extended keyboards. Most users will leave this as is.
+extended_keymaps=""
+#extended_keymaps="backspace keypad euro2"
+
+# Tell dumpkeys(1) to interpret character action codes to be
+# from the specified character set.
+# This only matters if you set unicode="yes" in /etc/rc.conf.
+# For a list of valid sets, run `dumpkeys --help`
+dumpkeys_charset=""
+
+# Some fonts map AltGr-E to the currency symbol instead of the Euro.
+# To fix this, set to "yes"
+fix_euro="NO"
diff --git a/system/kbd/keymaps.initd b/system/kbd/keymaps.initd
new file mode 100644
index 000000000..49e41b0e7
--- /dev/null
+++ b/system/kbd/keymaps.initd
@@ -0,0 +1,77 @@
+#!/sbin/openrc-run
+# Copyright (c) 2007-2015 The OpenRC Authors.
+# See the Authors file at the top-level directory of this distribution and
+# https://github.com/OpenRC/openrc/blob/master/AUTHORS
+#
+# This file is part of OpenRC. It is subject to the license terms in
+# the LICENSE file found in the top-level directory of this
+# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
+# This file may not be copied, modified, propagated, or distributed
+# except according to the terms contained in the LICENSE file.
+
+description="Applies a keymap for the consoles."
+
+depend()
+{
+ need localmount termencoding
+ after bootmisc
+ keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu
+}
+
+start()
+{
+ ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
+ : ${unicode:=$UNICODE}
+ : ${keymap:=$KEYMAP}
+ : ${extended_keymaps:=$EXTENDED_KEYMAPS}
+ : ${windowkeys:=$SET_WINDOWSKEYS}
+ : ${fix_euro:=$FIX_EURO}
+ : ${dumpkeys_charset:=${DUMPKEYS_CHARSET}}
+
+ if [ -z "$keymap" ]; then
+ eerror "You need to setup keymap in /etc/conf.d/keymaps first"
+ return 1
+ fi
+
+ local ttydev=/dev/tty n=
+ [ -d /dev/vc ] && ttydev=/dev/vc/
+
+ # Force linux keycodes for PPC.
+ if [ -f /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes ]; then
+ echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
+ fi
+
+ local wkeys= kmode="-a" msg="ASCII"
+ if yesno $unicode; then
+ kmode="-u"
+ msg="UTF-8"
+ fi
+ yesno $windowkeys && wkeys="windowkeys"
+
+ # Set terminal encoding to either ASCII or UNICODE.
+ # See utf-8(7) for more information.
+ ebegin "Setting keyboard mode [$msg]"
+ n=1
+ while [ $n -le $ttyn ]; do
+ kbd_mode $kmode -C $ttydev$n
+ : $(( n += 1 ))
+ done
+ eend 0
+
+ ebegin "Loading key mappings [$keymap]"
+ loadkeys -q $wkeys $keymap $extended_keymaps
+ eend $? "Error loading key mappings" || return $?
+
+ if yesno $fix_euro; then
+ ebegin "Fixing font for euro symbol"
+ # Fix some fonts displaying the Euro, #173528.
+ echo "altgr keycode 18 = U+20AC" | loadkeys -q -
+ eend $?
+ fi
+
+ # Save the keymapping for use immediately at boot
+ if checkpath -W "$RC_LIBEXECDIR"; then
+ mkdir -p "$RC_LIBEXECDIR"/console
+ dumpkeys >"$RC_LIBEXECDIR"/console/keymap
+ fi
+}
diff --git a/system/kmod/APKBUILD b/system/kmod/APKBUILD
index 748d26def..ad3396c8e 100644
--- a/system/kmod/APKBUILD
+++ b/system/kmod/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=kmod
-pkgver=26
+pkgver=27
pkgrel=0
pkgdesc="Linux kernel module management utilities"
url="https://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary"
@@ -10,7 +10,7 @@ options="!check" # https://bugs.gentoo.org/408915#c3
license="GPL-2.0+"
depends=""
makedepends_build="libxslt"
-makedepends_host="zlib-dev xz-dev"
+makedepends_host="openssl-dev zlib-dev xz-dev"
makedepends="$makedepends_build $makedepends_host"
triggers="$pkgname.trigger=/lib/modules/*"
subpackages="$pkgname-dev $pkgname-doc $pkgname-openrc
@@ -29,13 +29,13 @@ build() {
--sysconfdir=/etc \
--with-rootlibdir=/lib \
--with-zlib \
- --with-xz
+ --with-xz \
+ --with-openssl
make
}
package() {
make DESTDIR="$pkgdir" install
- local i
mkdir -p "$pkgdir"/sbin
for i in lsmod rmmod insmod modinfo modprobe depmod; do
ln -sf ../bin/kmod "$pkgdir"/sbin/$i
@@ -57,6 +57,6 @@ bashcomp() {
}
-sha512sums="3ca276c6fc13c2dd2220ec528b8dc4ab4edee5d2b22e16b6f945c552e51f74342c01c33a53740e6af8c893d42bd4d6f629cd8fa6e15ef8bd8da30cb003ef0865 kmod-26.tar.xz
+sha512sums="e0513094935333fca1fb4c3e3493b232507a579ab00a6457cc9ed3e928363d05aad80634fb65a8287a336bf9895194c7be8ddc41bb088a6c2cca44fc1bfbdb6c kmod-27.tar.xz
f2ea3527bfba182c5e15557c224a5bba8c7e2ea3d21cf604e6eb2277226dcf983c3aeb9ac44a322c7f2b4942b35135da999d63a5b946b829d3f3b09c050a0f17 strndupa.patch
7f0f89fe98167f71b7924f341ba701d001158225463c2f5e39f706a0224b1e952ee901b441f28cb15787563e83bb6e54eb752bf8669ae7c0ffbb11984542f354 kmod-static-nodes.initd"
diff --git a/system/libucontext/APKBUILD b/system/libucontext/APKBUILD
index 93bc2b252..78b079435 100644
--- a/system/libucontext/APKBUILD
+++ b/system/libucontext/APKBUILD
@@ -1,17 +1,20 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=libucontext
-pkgver=0.9.0
+pkgver=0.10
pkgrel=0
pkgdesc="Implementation of software-defined threading"
-url="https://code.foxkit.us/adelie/libucontext/"
+url=" "
arch="all"
license="ISC"
depends=""
makedepends=""
subpackages="$pkgname-dev"
-source="https://distfiles.adelielinux.org/source/libucontext/libucontext-$pkgver.tar.xz"
+source="https://distfiles.dereferenced.org/libucontext/libucontext-$pkgver.tar.xz
+ git.patch
+ "
case "$CTARGET_ARCH" in
+aarch64_be) LIBUCONTEXT_ARCH="aarch64" ;;
arm*) LIBUCONTEXT_ARCH="arm" ;;
ppc64le) LIBUCONTEXT_ARCH="ppc64" ;;
pmmx) LIBUCONTEXT_ARCH="x86" ;;
@@ -30,4 +33,5 @@ package() {
make ARCH="$LIBUCONTEXT_ARCH" DESTDIR="$pkgdir" install
}
-sha512sums="47ffa743e0b364d7a5d5ae633f89e83a7e3bbdf62a8a703a06a522c08b187b785548e8b8d58d53fc4fd984575f086794e74c12d40075326c6e88024e841550b6 libucontext-0.9.0.tar.xz"
+sha512sums="ef04485f66edd94711a15681953aed12652ea3821036e6a5b10d1ba3c0371ffabd689c85ee2403bc6a94544932e64855d8f5412f46b50d8b5a934f70a771fcb1 libucontext-0.10.tar.xz
+f3f5da2f76302fb3aeba8cca6e3485f264714ad12160e83ef92785a5f2a318cb4cea88e350df71dd6c976d075525361f36e67467ffb82b30fed6acee11be8095 git.patch"
diff --git a/system/libucontext/git.patch b/system/libucontext/git.patch
new file mode 100644
index 000000000..d42ee0803
--- /dev/null
+++ b/system/libucontext/git.patch
@@ -0,0 +1,115 @@
+From d7688a41df4cbe51e52bfebbab7d411548ed7738 Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Mon, 30 Mar 2020 02:22:43 -0500
+Subject: [PATCH 1/3] README: Remove support section
+
+This is no longer a member of the gcompat family of projects;
+remove the mention of that and the gcompat mailing list link.
+---
+ README.md | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/README.md b/README.md
+index 97a03b6..1db0516 100644
+--- a/README.md
++++ b/README.md
+@@ -38,8 +38,3 @@ $ make ARCH=x86_64 check
+ $ make ARCH=x86_64 DESTDIR=out install
+ ```
+
+-
+-## support
+-
+-`libucontext` is offered as part of the `gcompat` project. Accordingly, please address all questions
+-and bug reports to gcompat@lists.adelielinux.org.
+
+From e2178de76a7d3f41fed7cc5bef3e68eea623a72a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 30 Mar 2020 08:21:20 +0000
+Subject: [PATCH 2/3] Makefile: Add LIBDIR variable
+
+This ensures that it can be installed into custom location and also
+
+Upstream-Status: Submitted
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index a8dedc2..74ebdbf 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,6 +3,7 @@ ifeq ($(ARCH),$(filter $(ARCH),i386 i686))
+ override ARCH = x86
+ endif
+
++LIBDIR := /lib
+ CFLAGS = -ggdb3 -O2 -Wall -Iarch/${ARCH} -Iarch/common
+
+ LIBUCONTEXT_C_SRC = $(wildcard arch/${ARCH}/*.c)
+@@ -13,8 +14,8 @@ LIBUCONTEXT_SOVERSION = 0
+ LIBUCONTEXT_NAME = libucontext.so
+ LIBUCONTEXT_STATIC_NAME = libucontext.a
+ LIBUCONTEXT_SONAME = libucontext.so.${LIBUCONTEXT_SOVERSION}
+-LIBUCONTEXT_PATH = /lib/${LIBUCONTEXT_SONAME}
+-LIBUCONTEXT_STATIC_PATH = /lib/${LIBUCONTEXT_STATIC_NAME}
++LIBUCONTEXT_PATH = ${LIBDIR}/${LIBUCONTEXT_SONAME}
++LIBUCONTEXT_STATIC_PATH = ${LIBDIR}/${LIBUCONTEXT_STATIC_NAME}
+
+ all: ${LIBUCONTEXT_SONAME} ${LIBUCONTEXT_STATIC_NAME}
+
+@@ -39,9 +40,9 @@ clean:
+ ${LIBUCONTEXT_OBJ} test_libucontext
+
+ install: all
+- install -D -m755 ${LIBUCONTEXT_NAME} ${DESTDIR}/${LIBUCONTEXT_PATH}
+- install -D -m664 ${LIBUCONTEXT_STATIC_NAME} ${DESTDIR}/${LIBUCONTEXT_STATIC_PATH}
+- ln -sf ${LIBUCONTEXT_SONAME} ${DESTDIR}/lib/${LIBUCONTEXT_NAME}
++ install -D -m755 ${LIBUCONTEXT_NAME} ${DESTDIR}${LIBUCONTEXT_PATH}
++ install -D -m664 ${LIBUCONTEXT_STATIC_NAME} ${DESTDIR}${LIBUCONTEXT_STATIC_PATH}
++ ln -sf ${LIBUCONTEXT_SONAME} ${DESTDIR}${LIBDIR}/${LIBUCONTEXT_NAME}
+
+ check: test_libucontext ${LIBUCONTEXT_SONAME}
+ env LD_LIBRARY_PATH=$(shell pwd) ./test_libucontext
+
+From 467ee2916d0eacbd32af10ead14e5d86e365fa2b Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Mon, 30 Mar 2020 17:25:30 -0500
+Subject: [PATCH 3/3] x86: Update copyright statement
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Commit d0ccf2f96f12bfa040cc056f7dc26b3fd25c168d contains the makecontext
+fix from Adélie commit aaeb73ea701388e55b7640e32509a5f6a57f6350[1], as
+seen at AdelieLinux/libucontext@aaeb73ea – but it didn't include the
+addition of my author line.
+
+The full commit text, for future documentation/reference, was:
+
+```
+x86: Write link pointer at correct stack offset
+
+It must come *after* the parameters, not *before*.
+```
+
+Fixes: d0ccf2f96f12 ("x86: modernize")
+Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
+
+[1]: https://code.foxkit.us/adelie/libucontext/commit/aaeb73ea701388e55b7640e32509a5f6a57f6350
+---
+ arch/x86/makecontext.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arch/x86/makecontext.c b/arch/x86/makecontext.c
+index ee9c2e2..bc8163c 100644
+--- a/arch/x86/makecontext.c
++++ b/arch/x86/makecontext.c
+@@ -1,5 +1,6 @@
+ /*
+ * Copyright (c) 2018 Ariadne Conill <ariadne@dereferenced.org>
++ * Copyright (c) 2019 A. Wilcox <awilfox@adelielinux.org>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
diff --git a/system/libucontext/powerpc.patch b/system/libucontext/powerpc.patch
deleted file mode 100644
index ed7604d7b..000000000
--- a/system/libucontext/powerpc.patch
+++ /dev/null
@@ -1,1121 +0,0 @@
-From 94216c60c43a30e39fbc4f347450768699c6c77c Mon Sep 17 00:00:00 2001
-From: Bobby Bingham <koorogi@koorogi.info>
-Date: Mon, 1 Apr 2019 23:02:12 -0500
-Subject: [PATCH] test ability to pass 10 args through makecontext
-
----
- test_libucontext.c | 23 +++++++++++++++++++++--
- 1 file changed, 21 insertions(+), 2 deletions(-)
-
-diff --git a/test_libucontext.c b/test_libucontext.c
-index 121cc3e..e5eac83 100644
---- a/test_libucontext.c
-+++ b/test_libucontext.c
-@@ -6,13 +6,32 @@
- #include <stdio.h>
- #include <ucontext.h>
- #include <stdint.h>
-+#include <stdlib.h>
- #include <string.h>
-
-
- static ucontext_t ctx[3];
-
-
--static void f1 (void) {
-+static void check_arg(int actual, int expected) {
-+ if (actual == expected) return;
-+ fprintf(stderr, "argument has wrong value. got %d, expected %d.\n", actual, expected);
-+ abort();
-+}
-+
-+
-+static void f1 (int a, int b, int c, int d, int e, int f, int g, int h, int i, int j) {
-+ check_arg(a, 1);
-+ check_arg(b, 2);
-+ check_arg(c, 3);
-+ check_arg(d, 4);
-+ check_arg(e, 5);
-+ check_arg(f, 6);
-+ check_arg(g, 7);
-+ check_arg(h, 8);
-+ check_arg(i, 9);
-+ check_arg(j, 10);
-+
- printf("start f1\n");
- swapcontext(&ctx[1], &ctx[2]);
- printf("finish f1\n");
-@@ -40,7 +59,7 @@ int main (int argc, const char *argv[]) {
- ctx[1].uc_stack.ss_sp = st1;
- ctx[1].uc_stack.ss_size = sizeof st1;
- ctx[1].uc_link = &ctx[0];
-- makecontext(&ctx[1], f1, 0);
-+ makecontext(&ctx[1], f1, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
-
-
- getcontext(&ctx[2]);
-From cb59e7ee957b389578a3f973484ae3198f6cfed1 Mon Sep 17 00:00:00 2001
-From: Bobby Bingham <koorogi@koorogi.info>
-Date: Mon, 1 Apr 2019 23:03:21 -0500
-Subject: [PATCH] test calls to getcontext without makecontext
-
----
- test_libucontext.c | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/test_libucontext.c b/test_libucontext.c
-index e5eac83..a4a9b4c 100644
---- a/test_libucontext.c
-+++ b/test_libucontext.c
-@@ -48,6 +48,7 @@ static void f2 (void) {
- int main (int argc, const char *argv[]) {
- char st1[8192];
- char st2[8192];
-+ volatile int done = 0;
-
-
- /* poison each coroutine's stack memory for debugging purposes */
-@@ -70,5 +71,16 @@ int main (int argc, const char *argv[]) {
-
-
- swapcontext(&ctx[0], &ctx[2]);
-+
-+
-+ /* test ability to use getcontext/setcontext without makecontext */
-+ getcontext(&ctx[1]);
-+ printf("done = %d\n", done);
-+ if (done++ == 0) setcontext(&ctx[1]);
-+ if (done != 2) {
-+ fprintf(stderr, "wrong value for done. got %d, expected 2\n", done);
-+ abort();
-+ }
-+
- return 0;
- }
-From b6a9b5e279123f16569e0fd9f8ff14ff04bed7a3 Mon Sep 17 00:00:00 2001
-From: Bobby Bingham <koorogi@koorogi.info>
-Date: Fri, 5 Apr 2019 13:32:03 -0500
-Subject: [PATCH] ppc32: fix stack alignment
-
-The stack should be 16-byte aligned, not 8 mod 16.
----
- arch/ppc/makecontext.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/ppc/makecontext.c b/arch/ppc/makecontext.c
-index c562ea5..1b9efdf 100644
---- a/arch/ppc/makecontext.c
-+++ b/arch/ppc/makecontext.c
-@@ -37,7 +37,7 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
-
- sp = (greg_t *) ((uintptr_t) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
- sp -= (uc_link + 1);
-- sp = (greg_t *) (((uintptr_t) sp & -16L) - 8);
-+ sp = (greg_t *) ((uintptr_t) sp & -16L);
-
- ucp->uc_mcontext.gregs[REG_NIP] = (uintptr_t) func;
- ucp->uc_mcontext.gregs[REG_LNK] = (uintptr_t) &__start_context;
-From b9bd4045fb34f060d6cf37fc7da7ab13b91462de Mon Sep 17 00:00:00 2001
-From: Bobby Bingham <koorogi@koorogi.info>
-Date: Fri, 5 Apr 2019 13:35:00 -0500
-Subject: [PATCH] ppc32/64: fix back chain pointer
-
-The ABI states that sp[0] should point to the previous stack frame, or be
-zero if there is no previous stack frame. makecontext previously set this
-slot to point to the __start_context function, rather than to a valid
-stack frame.
----
- arch/ppc/makecontext.c | 2 +-
- arch/ppc64/makecontext.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/ppc/makecontext.c b/arch/ppc/makecontext.c
-index 1b9efdf..729f465 100644
---- a/arch/ppc/makecontext.c
-+++ b/arch/ppc/makecontext.c
-@@ -44,7 +44,7 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
- ucp->uc_mcontext.gregs[REG_R31] = (uintptr_t) ucp->uc_link;
- ucp->uc_mcontext.gregs[REG_SP] = (uintptr_t) sp;
-
-- sp[0] = (uintptr_t) &__start_context;
-+ sp[0] = 0;
- sp[uc_link] = (uintptr_t) ucp->uc_link;
- argp = &sp[2];
-
-diff --git a/arch/ppc64/makecontext.c b/arch/ppc64/makecontext.c
-index 9d6b998..91fb579 100644
---- a/arch/ppc64/makecontext.c
-+++ b/arch/ppc64/makecontext.c
-@@ -45,7 +45,7 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
- ucp->uc_mcontext.gp_regs[REG_ENTRY] = (uintptr_t) func;
- ucp->uc_mcontext.gp_regs[REG_R31] = (uintptr_t) ucp->uc_link;
-
-- sp[0] = (uintptr_t) &__start_context;
-+ sp[0] = 0;
- sp[uc_link] = (uintptr_t) ucp->uc_link;
- argp = &sp[2];
-
-From b500b054c7cf412a6042496afa08b4302f7ed929 Mon Sep 17 00:00:00 2001
-From: Bobby Bingham <koorogi@koorogi.info>
-Date: Fri, 5 Apr 2019 13:38:36 -0500
-Subject: [PATCH] ppc32/64: don't store uc_link on the stack
-
-This was previously stored either in the CR (ppc64) or LR (ppc32) save
-area of the stack, or to one of the parameter save slots.
-
-In either case, the saved value was unused. This value is also passed
-to __start_context via r31, so there's no need to pass it on the stack.
----
- arch/ppc/makecontext.c | 6 ++----
- arch/ppc64/makecontext.c | 6 ++----
- 2 files changed, 4 insertions(+), 8 deletions(-)
-
-diff --git a/arch/ppc/makecontext.c b/arch/ppc/makecontext.c
-index 729f465..2b7ea67 100644
---- a/arch/ppc/makecontext.c
-+++ b/arch/ppc/makecontext.c
-@@ -30,13 +30,12 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
- greg_t *sp, *argp;
- va_list va;
- int i;
-- unsigned int uc_link, stack_args;
-+ unsigned int stack_args;
-
- stack_args = argc > 8 ? argc - 8 : 0;
-- uc_link = stack_args + 1;
-
- sp = (greg_t *) ((uintptr_t) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
-- sp -= (uc_link + 1);
-+ sp -= stack_args + 2;
- sp = (greg_t *) ((uintptr_t) sp & -16L);
-
- ucp->uc_mcontext.gregs[REG_NIP] = (uintptr_t) func;
-@@ -45,7 +44,6 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
- ucp->uc_mcontext.gregs[REG_SP] = (uintptr_t) sp;
-
- sp[0] = 0;
-- sp[uc_link] = (uintptr_t) ucp->uc_link;
- argp = &sp[2];
-
- va_start(va, argc);
-diff --git a/arch/ppc64/makecontext.c b/arch/ppc64/makecontext.c
-index 91fb579..b060371 100644
---- a/arch/ppc64/makecontext.c
-+++ b/arch/ppc64/makecontext.c
-@@ -30,13 +30,12 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
- greg_t *sp, *argp;
- va_list va;
- int i;
-- unsigned int uc_link, stack_args;
-+ unsigned int stack_args;
-
- stack_args = argc > 8 ? argc - 8 : 0;
-- uc_link = stack_args + 1;
-
- sp = (greg_t *) ((uintptr_t) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
-- sp -= (uc_link + 1);
-+ sp -= stack_args + 2;
- sp = (greg_t *) (((uintptr_t) sp & -16L));
-
- ucp->uc_mcontext.gp_regs[REG_NIP] = (uintptr_t) func;
-@@ -46,7 +45,6 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
- ucp->uc_mcontext.gp_regs[REG_R31] = (uintptr_t) ucp->uc_link;
-
- sp[0] = 0;
-- sp[uc_link] = (uintptr_t) ucp->uc_link;
- argp = &sp[2];
-
- va_start(va, argc);
-From 55168fcb1809dde45c99450f1f3be27716c473db Mon Sep 17 00:00:00 2001
-From: Bobby Bingham <koorogi@koorogi.info>
-Date: Fri, 5 Apr 2019 13:57:53 -0500
-Subject: [PATCH] ppc32/64: simplify storage of stack parameters
-
-The switch statement is simpler as an if/else, and removing the argp
-variable makes the code more symmetric between the register and stack
-parameter cases.
----
- arch/ppc/makecontext.c | 24 ++++++------------------
- arch/ppc64/makecontext.c | 24 ++++++------------------
- 2 files changed, 12 insertions(+), 36 deletions(-)
-
-diff --git a/arch/ppc/makecontext.c b/arch/ppc/makecontext.c
-index 2b7ea67..4a404a4 100644
---- a/arch/ppc/makecontext.c
-+++ b/arch/ppc/makecontext.c
-@@ -27,7 +27,7 @@ extern void __start_context(void);
- void
- __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
- {
-- greg_t *sp, *argp;
-+ greg_t *sp;
- va_list va;
- int i;
- unsigned int stack_args;
-@@ -44,27 +44,15 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
- ucp->uc_mcontext.gregs[REG_SP] = (uintptr_t) sp;
-
- sp[0] = 0;
-- argp = &sp[2];
-
- va_start(va, argc);
-
-- for (i = 0; i < argc; i++)
-- switch (i)
-- {
-- case 0:
-- case 1:
-- case 2:
-- case 3:
-- case 4:
-- case 5:
-- case 6:
-- case 7:
-+ for (i = 0; i < argc; i++) {
-+ if (i < 8)
- ucp->uc_mcontext.gregs[i + 3] = va_arg (va, greg_t);
-- break;
-- default:
-- *argp++ = va_arg (va, greg_t);
-- break;
-- }
-+ else
-+ sp[i-8 + 2] = va_arg (va, greg_t);
-+ }
-
- va_end(va);
- }
-diff --git a/arch/ppc64/makecontext.c b/arch/ppc64/makecontext.c
-index b060371..962f98a 100644
---- a/arch/ppc64/makecontext.c
-+++ b/arch/ppc64/makecontext.c
-@@ -27,7 +27,7 @@ extern void __start_context(void);
- void
- __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
- {
-- greg_t *sp, *argp;
-+ greg_t *sp;
- va_list va;
- int i;
- unsigned int stack_args;
-@@ -45,27 +45,15 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
- ucp->uc_mcontext.gp_regs[REG_R31] = (uintptr_t) ucp->uc_link;
-
- sp[0] = 0;
-- argp = &sp[2];
-
- va_start(va, argc);
-
-- for (i = 0; i < argc; i++)
-- switch (i)
-- {
-- case 0:
-- case 1:
-- case 2:
-- case 3:
-- case 4:
-- case 5:
-- case 6:
-- case 7:
-+ for (i = 0; i < argc; i++) {
-+ if (i < 8)
- ucp->uc_mcontext.gp_regs[i + 3] = va_arg (va, greg_t);
-- break;
-- default:
-- *argp++ = va_arg (va, greg_t);
-- break;
-- }
-+ else
-+ sp[i-8 + 2] = va_arg (va, greg_t);
-+ }
-
- va_end(va);
- }
-From 8ea5f548b9146ffeea2074a33a06bbbd07a74402 Mon Sep 17 00:00:00 2001
-From: Bobby Bingham <koorogi@koorogi.info>
-Date: Fri, 5 Apr 2019 14:01:10 -0500
-Subject: [PATCH] ppc64: fix makecontext with more than 8 parameters
-
-The ELFv2 ABI used on PPC64 differs from the ELFv1 ABI used on PPC32 here.
-On PPC64, once there are any parameters that need to be passed on the
-stack, space needs to be reserved on the stack to pass all parameters.
-Parameters 0-7 are still only passed by register, but if the callee needs
-to spill them, it can use the stack space reserved for the corresponding
-parameter to do so.
----
- arch/ppc64/makecontext.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/ppc64/makecontext.c b/arch/ppc64/makecontext.c
-index 962f98a..ea980e9 100644
---- a/arch/ppc64/makecontext.c
-+++ b/arch/ppc64/makecontext.c
-@@ -32,7 +32,7 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
- int i;
- unsigned int stack_args;
-
-- stack_args = argc > 8 ? argc - 8 : 0;
-+ stack_args = argc > 8 ? argc : 0;
-
- sp = (greg_t *) ((uintptr_t) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
- sp -= stack_args + 2;
-@@ -52,7 +52,7 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
- if (i < 8)
- ucp->uc_mcontext.gp_regs[i + 3] = va_arg (va, greg_t);
- else
-- sp[i-8 + 2] = va_arg (va, greg_t);
-+ sp[i + 2] = va_arg (va, greg_t);
- }
-
- va_end(va);
-From a00a05ce2950ca3b306f8ccc3e817ea8cd675015 Mon Sep 17 00:00:00 2001
-From: Bobby Bingham <koorogi@koorogi.info>
-Date: Fri, 5 Apr 2019 14:03:47 -0500
-Subject: [PATCH] ppc64: fix incorrect position of parameters within stack
- frame
-
-On PPC64, there are 4 register-sized stack slots below the parameter save
-area, which is different from the 2 stack slots on PPC32.
----
- arch/ppc64/makecontext.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/ppc64/makecontext.c b/arch/ppc64/makecontext.c
-index ea980e9..a4c1bf9 100644
---- a/arch/ppc64/makecontext.c
-+++ b/arch/ppc64/makecontext.c
-@@ -35,7 +35,7 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
- stack_args = argc > 8 ? argc : 0;
-
- sp = (greg_t *) ((uintptr_t) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
-- sp -= stack_args + 2;
-+ sp -= stack_args + 4;
- sp = (greg_t *) (((uintptr_t) sp & -16L));
-
- ucp->uc_mcontext.gp_regs[REG_NIP] = (uintptr_t) func;
-@@ -52,7 +52,7 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
- if (i < 8)
- ucp->uc_mcontext.gp_regs[i + 3] = va_arg (va, greg_t);
- else
-- sp[i + 2] = va_arg (va, greg_t);
-+ sp[i + 4] = va_arg (va, greg_t);
- }
-
- va_end(va);
-From 40d07758a5677e8869d7a62a499236bb6ed01897 Mon Sep 17 00:00:00 2001
-From: Bobby Bingham <koorogi@koorogi.info>
-Date: Fri, 5 Apr 2019 14:09:25 -0500
-Subject: [PATCH] ppc32/64: correct signature of function parameter to
- makecontext
-
-Because makecontext can pass a set of integer arguments to the provided
-function, it is incorrect to require that this function accept no
-parameters.
----
- arch/ppc/makecontext.c | 2 +-
- arch/ppc64/makecontext.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/ppc/makecontext.c b/arch/ppc/makecontext.c
-index 4a404a4..0633c0f 100644
---- a/arch/ppc/makecontext.c
-+++ b/arch/ppc/makecontext.c
-@@ -25,7 +25,7 @@ extern void __start_context(void);
-
-
- void
--__makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
-+__makecontext(ucontext_t *ucp, void (*func)(), int argc, ...)
- {
- greg_t *sp;
- va_list va;
-diff --git a/arch/ppc64/makecontext.c b/arch/ppc64/makecontext.c
-index a4c1bf9..8a293b5 100644
---- a/arch/ppc64/makecontext.c
-+++ b/arch/ppc64/makecontext.c
-@@ -25,7 +25,7 @@ extern void __start_context(void);
-
-
- void
--__makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
-+__makecontext(ucontext_t *ucp, void (*func)(), int argc, ...)
- {
- greg_t *sp;
- va_list va;
-From edf69879eadaec0c72ba7ef5e7d2389946c6644b Mon Sep 17 00:00:00 2001
-From: Bobby Bingham <koorogi@koorogi.info>
-Date: Fri, 5 Apr 2019 14:09:39 -0500
-Subject: [PATCH] ppc64: remove unnecessary parentheses
-
----
- arch/ppc64/makecontext.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/ppc64/makecontext.c b/arch/ppc64/makecontext.c
-index 8a293b5..84d390a 100644
---- a/arch/ppc64/makecontext.c
-+++ b/arch/ppc64/makecontext.c
-@@ -36,7 +36,7 @@ __makecontext(ucontext_t *ucp, void (*func)(), int argc, ...)
-
- sp = (greg_t *) ((uintptr_t) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
- sp -= stack_args + 4;
-- sp = (greg_t *) (((uintptr_t) sp & -16L));
-+ sp = (greg_t *) ((uintptr_t) sp & -16L);
-
- ucp->uc_mcontext.gp_regs[REG_NIP] = (uintptr_t) func;
- ucp->uc_mcontext.gp_regs[REG_LNK] = (uintptr_t) &__start_context;
-From 29eac4259adfd85e0f4946a1080bb9e3f8c0cc2e Mon Sep 17 00:00:00 2001
-From: Bobby Bingham <koorogi@koorogi.info>
-Date: Fri, 5 Apr 2019 14:10:28 -0500
-Subject: [PATCH] ppc32/64: remove unused includes
-
----
- arch/ppc/makecontext.c | 2 --
- arch/ppc64/makecontext.c | 2 --
- 2 files changed, 4 deletions(-)
-
-diff --git a/arch/ppc/makecontext.c b/arch/ppc/makecontext.c
-index 0633c0f..7214a40 100644
---- a/arch/ppc/makecontext.c
-+++ b/arch/ppc/makecontext.c
-@@ -11,10 +11,8 @@
- */
-
- #define _GNU_SOURCE
--#include <stddef.h>
- #include <stdarg.h>
- #include <signal.h>
--#include <string.h>
- #include <stdint.h>
-
-
-diff --git a/arch/ppc64/makecontext.c b/arch/ppc64/makecontext.c
-index 84d390a..2650f56 100644
---- a/arch/ppc64/makecontext.c
-+++ b/arch/ppc64/makecontext.c
-@@ -11,10 +11,8 @@
- */
-
- #define _GNU_SOURCE
--#include <stddef.h>
- #include <stdarg.h>
- #include <signal.h>
--#include <string.h>
- #include <stdint.h>
-
-
-From 90ff6330e62c8f836016668c9f769af365b257cb Mon Sep 17 00:00:00 2001
-From: Bobby Bingham <koorogi@koorogi.info>
-Date: Fri, 5 Apr 2019 14:11:21 -0500
-Subject: [PATCH] ppc32/64: update copyright
-
----
- arch/ppc/makecontext.c | 1 +
- arch/ppc64/makecontext.c | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/arch/ppc/makecontext.c b/arch/ppc/makecontext.c
-index 7214a40..51c492f 100644
---- a/arch/ppc/makecontext.c
-+++ b/arch/ppc/makecontext.c
-@@ -1,5 +1,6 @@
- /*
- * Copyright (c) 2018 William Pitcock <nenolod@dereferenced.org>
-+ * Copyright (c) 2019 Bobby Bingham <koorogi@koorogi.info>
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
-diff --git a/arch/ppc64/makecontext.c b/arch/ppc64/makecontext.c
-index 2650f56..43da557 100644
---- a/arch/ppc64/makecontext.c
-+++ b/arch/ppc64/makecontext.c
-@@ -1,5 +1,6 @@
- /*
- * Copyright (c) 2018 William Pitcock <nenolod@dereferenced.org>
-+ * Copyright (c) 2019 Bobby Bingham <koorogi@koorogi.info>
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
-From 2610c7faa7b9c4114d53bb659264a6be238cd2a3 Mon Sep 17 00:00:00 2001
-From: Bobby Bingham <koorogi@koorogi.info>
-Date: Sat, 23 Feb 2019 17:12:37 -0600
-Subject: [PATCH] ppc32/64: rewrite get/set/swapcontext in assembly
-
-getcontext cannot be correctly implemented in C.
-
-If this calls another function, as it does to call syscall, it needs to
-first spill its return address to the stack. If, after getcontext returns,
-its caller then calls other functions, this saved return address can be
-clobbered. When the context saved by getcontext is later restored, the
-(now clobbered) return address will be reloaded from the stack, and the
-second return from getcontext will return to the wrong location.
-
-Because the powerpc swapcontext syscall allows either the old context or
-new context pointers to be null, it is usable for implementing all of
-get/set/swapcontext.
-
-We therefore rewrite swapcontext in assembly, and get/setcontext as simple
-assembly function wrappers around swapcontext.
-
-The one piece we keep in C is the code to check the return value of the
-system call and to set errno. This code was actually unnecessary before --
-libc does this within syscall. However, now that the system call is made
-directly in assembly, bypassing libc, it is truly necessary. Because errno
-is thread-local and the details of how to set it can vary by libc, this
-code remains written in C.
----
- Makefile | 10 +----
- README.md | 2 +-
- arch/ppc/getcontext.S | 20 +++++++++
- arch/ppc/{getcontext.c => retfromsyscall.c} | 30 +++----------
- arch/ppc/setcontext.S | 21 +++++++++
- arch/ppc/setcontext.c | 45 -------------------
- arch/ppc/swapcontext.S | 23 ++++++++++
- arch/ppc/swapcontext.c | 45 -------------------
- arch/ppc64/getcontext.S | 25 +++++++++++
- arch/ppc64/{getcontext.c => retfromsyscall.c} | 30 +++----------
- arch/ppc64/setcontext.S | 26 +++++++++++
- arch/ppc64/setcontext.c | 45 -------------------
- arch/ppc64/swapcontext.S | 28 ++++++++++++
- arch/ppc64/swapcontext.c | 45 -------------------
- 14 files changed, 156 insertions(+), 239 deletions(-)
- create mode 100644 arch/ppc/getcontext.S
- rename arch/ppc/{getcontext.c => retfromsyscall.c} (53%)
- create mode 100644 arch/ppc/setcontext.S
- delete mode 100644 arch/ppc/setcontext.c
- create mode 100644 arch/ppc/swapcontext.S
- delete mode 100644 arch/ppc/swapcontext.c
- create mode 100644 arch/ppc64/getcontext.S
- rename arch/ppc64/{getcontext.c => retfromsyscall.c} (53%)
- create mode 100644 arch/ppc64/setcontext.S
- delete mode 100644 arch/ppc64/setcontext.c
- create mode 100644 arch/ppc64/swapcontext.S
- delete mode 100644 arch/ppc64/swapcontext.c
-
-diff --git a/Makefile b/Makefile
-index 51365a3..d6ff1b0 100644
---- a/Makefile
-+++ b/Makefile
-@@ -2,14 +2,8 @@ ARCH := $(shell uname -m)
-
- CFLAGS = -ggdb3 -O2 -Wall -Iarch/${ARCH}
-
--LIBUCONTEXT_C_SRC = \
-- arch/${ARCH}/makecontext.c
--
--LIBUCONTEXT_S_SRC = \
-- arch/${ARCH}/getcontext.S \
-- arch/${ARCH}/setcontext.S \
-- arch/${ARCH}/swapcontext.S \
-- arch/${ARCH}/startcontext.S
-+LIBUCONTEXT_C_SRC = $(wildcard arch/${ARCH}/*.c)
-+LIBUCONTEXT_S_SRC = $(wildcard arch/${ARCH}/*.S)
-
- LIBUCONTEXT_OBJ = ${LIBUCONTEXT_C_SRC:.c=.o} ${LIBUCONTEXT_S_SRC:.S=.o}
- LIBUCONTEXT_SOVERSION = 0
-diff --git a/README.md b/README.md
-index 6bd4493..27d3d0b 100644
---- a/README.md
-+++ b/README.md
-@@ -19,7 +19,7 @@ Right now these archs are supported and should work on bare metal:
- * aarch64
- * s390x
-
--These archs require kernel assistance and use a syscall (the only assembly is the trampoline):
-+These archs require kernel assistance and use a syscall:
-
- * ppc
- * ppc64 (ELFv2 ABI spec only, ELFv1 not supported)
-diff --git a/arch/ppc/getcontext.S b/arch/ppc/getcontext.S
-new file mode 100644
-index 0000000..beffaf5
---- /dev/null
-+++ b/arch/ppc/getcontext.S
-@@ -0,0 +1,20 @@
-+/*
-+ * Copyright (c) 2019 Bobby Bingham <koorogi@koorogi.info>
-+ *
-+ * Permission to use, copy, modify, and/or distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * This software is provided 'as is' and without any warranty, express or
-+ * implied. In no event shall the authors be liable for any damages arising
-+ * from the use of this software.
-+ */
-+
-+.global __getcontext
-+.hidden __swapcontext
-+__getcontext:
-+ li 4, 0
-+ b __swapcontext@local
-+
-+.weak getcontext
-+getcontext = __getcontext
-diff --git a/arch/ppc/getcontext.c b/arch/ppc/retfromsyscall.c
-similarity index 53%
-rename from arch/ppc/getcontext.c
-rename to arch/ppc/retfromsyscall.c
-index 5da9dfb..3ad43c0 100644
---- a/arch/ppc/getcontext.c
-+++ b/arch/ppc/retfromsyscall.c
-@@ -1,5 +1,6 @@
- /*
- * Copyright (c) 2018 William Pitcock <nenolod@dereferenced.org>
-+ * Copyright (c) 2019 Bobby Bingham <koorogi@koorogi.info>
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
-@@ -10,36 +11,15 @@
- * from the use of this software.
- */
-
--#define _GNU_SOURCE
--#include <stddef.h>
--#include <stdarg.h>
--#include <signal.h>
--#include <string.h>
--#include <stdint.h>
- #include <errno.h>
--#include <unistd.h>
--#include <sys/syscall.h>
-
--
--int
--__getcontext(ucontext_t *ucp)
-+__attribute__ ((visibility ("hidden")))
-+int __retfromsyscall(long retval)
- {
--#ifdef SYS_swapcontext
-- int r;
--
-- r = syscall(SYS_swapcontext, ucp, NULL, sizeof(ucontext_t));
-- if (r < 0)
-- {
-- errno = -r;
-+ if (retval < 0) {
-+ errno = -retval;
- return -1;
- }
--
- return 0;
--#else
-- errno = ENOSYS;
-- return -1;
--#endif
- }
-
--
--extern __typeof(__getcontext) getcontext __attribute__((weak, __alias__("__getcontext")));
-diff --git a/arch/ppc/setcontext.S b/arch/ppc/setcontext.S
-new file mode 100644
-index 0000000..89e6de0
---- /dev/null
-+++ b/arch/ppc/setcontext.S
-@@ -0,0 +1,21 @@
-+/*
-+ * Copyright (c) 2019 Bobby Bingham <koorogi@koorogi.info>
-+ *
-+ * Permission to use, copy, modify, and/or distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * This software is provided 'as is' and without any warranty, express or
-+ * implied. In no event shall the authors be liable for any damages arising
-+ * from the use of this software.
-+ */
-+
-+.global __setcontext
-+.hidden __swapcontext
-+__setcontext:
-+ mr 4, 3
-+ li 3, 0
-+ b __swapcontext@local
-+
-+.weak setcontext
-+setcontext = __setcontext
-diff --git a/arch/ppc/setcontext.c b/arch/ppc/setcontext.c
-deleted file mode 100644
-index 59c65b4..0000000
---- a/arch/ppc/setcontext.c
-+++ /dev/null
-@@ -1,45 +0,0 @@
--/*
-- * Copyright (c) 2018 William Pitcock <nenolod@dereferenced.org>
-- *
-- * Permission to use, copy, modify, and/or distribute this software for any
-- * purpose with or without fee is hereby granted, provided that the above
-- * copyright notice and this permission notice appear in all copies.
-- *
-- * This software is provided 'as is' and without any warranty, express or
-- * implied. In no event shall the authors be liable for any damages arising
-- * from the use of this software.
-- */
--
--#define _GNU_SOURCE
--#include <stddef.h>
--#include <stdarg.h>
--#include <signal.h>
--#include <string.h>
--#include <stdint.h>
--#include <errno.h>
--#include <unistd.h>
--#include <sys/syscall.h>
--
--
--int
--__setcontext(const ucontext_t *ucp)
--{
--#ifdef SYS_swapcontext
-- int r;
--
-- r = syscall(SYS_swapcontext, NULL, (void *) ucp, sizeof(ucontext_t));
-- if (r < 0)
-- {
-- errno = -r;
-- return -1;
-- }
--
-- return r;
--#else
-- errno = ENOSYS;
-- return -1;
--#endif
--}
--
--
--extern __typeof(__setcontext) setcontext __attribute__((weak, __alias__("__setcontext")));
-diff --git a/arch/ppc/swapcontext.S b/arch/ppc/swapcontext.S
-new file mode 100644
-index 0000000..24b6655
---- /dev/null
-+++ b/arch/ppc/swapcontext.S
-@@ -0,0 +1,23 @@
-+/*
-+ * Copyright (c) 2019 Bobby Bingham <koorogi@koorogi.info>
-+ *
-+ * Permission to use, copy, modify, and/or distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * This software is provided 'as is' and without any warranty, express or
-+ * implied. In no event shall the authors be liable for any damages arising
-+ * from the use of this software.
-+ */
-+
-+.global __swapcontext
-+__swapcontext:
-+ li 0, 249 # SYS_swapcontext
-+ li 5, 1184 # sizeof(ucontext_t)
-+ sc
-+
-+.hidden __retfromsyscall
-+ b __retfromsyscall@local
-+
-+.weak swapcontext
-+swapcontext = __swapcontext
-diff --git a/arch/ppc/swapcontext.c b/arch/ppc/swapcontext.c
-deleted file mode 100644
-index af14bc2..0000000
---- a/arch/ppc/swapcontext.c
-+++ /dev/null
-@@ -1,45 +0,0 @@
--/*
-- * Copyright (c) 2018 William Pitcock <nenolod@dereferenced.org>
-- *
-- * Permission to use, copy, modify, and/or distribute this software for any
-- * purpose with or without fee is hereby granted, provided that the above
-- * copyright notice and this permission notice appear in all copies.
-- *
-- * This software is provided 'as is' and without any warranty, express or
-- * implied. In no event shall the authors be liable for any damages arising
-- * from the use of this software.
-- */
--
--#define _GNU_SOURCE
--#include <stddef.h>
--#include <stdarg.h>
--#include <signal.h>
--#include <string.h>
--#include <stdint.h>
--#include <errno.h>
--#include <unistd.h>
--#include <sys/syscall.h>
--
--
--int
--__swapcontext(ucontext_t *oucp, const ucontext_t *ucp)
--{
--#ifdef SYS_swapcontext
-- int r;
--
-- r = syscall(SYS_swapcontext, oucp, ucp, sizeof(ucontext_t));
-- if (r < 0)
-- {
-- errno = -r;
-- return -1;
-- }
--
-- return r;
--#else
-- errno = ENOSYS;
-- return -1;
--#endif
--}
--
--
--extern __typeof(__swapcontext) swapcontext __attribute__((weak, __alias__("__swapcontext")));
-diff --git a/arch/ppc64/getcontext.S b/arch/ppc64/getcontext.S
-new file mode 100644
-index 0000000..935edd2
---- /dev/null
-+++ b/arch/ppc64/getcontext.S
-@@ -0,0 +1,25 @@
-+/*
-+ * Copyright (c) 2019 Bobby Bingham <koorogi@koorogi.info>
-+ *
-+ * Permission to use, copy, modify, and/or distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * This software is provided 'as is' and without any warranty, express or
-+ * implied. In no event shall the authors be liable for any damages arising
-+ * from the use of this software.
-+ */
-+
-+.global __getcontext
-+.hidden __swapcontext
-+__getcontext:
-+ addis 2, 12, .TOC.-__getcontext@ha
-+ addi 2, 12, .TOC.-__getcontext@l
-+
-+ .localentry __getcontext,.-__getcontext
-+
-+ li 4, 0
-+ b __swapcontext
-+
-+.weak getcontext
-+getcontext = __getcontext
-diff --git a/arch/ppc64/getcontext.c b/arch/ppc64/retfromsyscall.c
-similarity index 53%
-rename from arch/ppc64/getcontext.c
-rename to arch/ppc64/retfromsyscall.c
-index 5da9dfb..3ad43c0 100644
---- a/arch/ppc64/getcontext.c
-+++ b/arch/ppc64/retfromsyscall.c
-@@ -1,5 +1,6 @@
- /*
- * Copyright (c) 2018 William Pitcock <nenolod@dereferenced.org>
-+ * Copyright (c) 2019 Bobby Bingham <koorogi@koorogi.info>
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
-@@ -10,36 +11,15 @@
- * from the use of this software.
- */
-
--#define _GNU_SOURCE
--#include <stddef.h>
--#include <stdarg.h>
--#include <signal.h>
--#include <string.h>
--#include <stdint.h>
- #include <errno.h>
--#include <unistd.h>
--#include <sys/syscall.h>
-
--
--int
--__getcontext(ucontext_t *ucp)
-+__attribute__ ((visibility ("hidden")))
-+int __retfromsyscall(long retval)
- {
--#ifdef SYS_swapcontext
-- int r;
--
-- r = syscall(SYS_swapcontext, ucp, NULL, sizeof(ucontext_t));
-- if (r < 0)
-- {
-- errno = -r;
-+ if (retval < 0) {
-+ errno = -retval;
- return -1;
- }
--
- return 0;
--#else
-- errno = ENOSYS;
-- return -1;
--#endif
- }
-
--
--extern __typeof(__getcontext) getcontext __attribute__((weak, __alias__("__getcontext")));
-diff --git a/arch/ppc64/setcontext.S b/arch/ppc64/setcontext.S
-new file mode 100644
-index 0000000..5a0cde3
---- /dev/null
-+++ b/arch/ppc64/setcontext.S
-@@ -0,0 +1,26 @@
-+/*
-+ * Copyright (c) 2019 Bobby Bingham <koorogi@koorogi.info>
-+ *
-+ * Permission to use, copy, modify, and/or distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * This software is provided 'as is' and without any warranty, express or
-+ * implied. In no event shall the authors be liable for any damages arising
-+ * from the use of this software.
-+ */
-+
-+.global __setcontext
-+.hidden __swapcontext
-+__setcontext:
-+ addis 2, 12, .TOC.-__setcontext@ha
-+ addi 2, 12, .TOC.-__setcontext@l
-+
-+ .localentry __setcontext,.-__setcontext
-+
-+ mr 4, 3
-+ li 3, 0
-+ b __swapcontext
-+
-+.weak setcontext
-+setcontext = __setcontext
-diff --git a/arch/ppc64/setcontext.c b/arch/ppc64/setcontext.c
-deleted file mode 100644
-index 59c65b4..0000000
---- a/arch/ppc64/setcontext.c
-+++ /dev/null
-@@ -1,45 +0,0 @@
--/*
-- * Copyright (c) 2018 William Pitcock <nenolod@dereferenced.org>
-- *
-- * Permission to use, copy, modify, and/or distribute this software for any
-- * purpose with or without fee is hereby granted, provided that the above
-- * copyright notice and this permission notice appear in all copies.
-- *
-- * This software is provided 'as is' and without any warranty, express or
-- * implied. In no event shall the authors be liable for any damages arising
-- * from the use of this software.
-- */
--
--#define _GNU_SOURCE
--#include <stddef.h>
--#include <stdarg.h>
--#include <signal.h>
--#include <string.h>
--#include <stdint.h>
--#include <errno.h>
--#include <unistd.h>
--#include <sys/syscall.h>
--
--
--int
--__setcontext(const ucontext_t *ucp)
--{
--#ifdef SYS_swapcontext
-- int r;
--
-- r = syscall(SYS_swapcontext, NULL, (void *) ucp, sizeof(ucontext_t));
-- if (r < 0)
-- {
-- errno = -r;
-- return -1;
-- }
--
-- return r;
--#else
-- errno = ENOSYS;
-- return -1;
--#endif
--}
--
--
--extern __typeof(__setcontext) setcontext __attribute__((weak, __alias__("__setcontext")));
-diff --git a/arch/ppc64/swapcontext.S b/arch/ppc64/swapcontext.S
-new file mode 100644
-index 0000000..982537a
---- /dev/null
-+++ b/arch/ppc64/swapcontext.S
-@@ -0,0 +1,28 @@
-+/*
-+ * Copyright (c) 2019 Bobby Bingham <koorogi@koorogi.info>
-+ *
-+ * Permission to use, copy, modify, and/or distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * This software is provided 'as is' and without any warranty, express or
-+ * implied. In no event shall the authors be liable for any damages arising
-+ * from the use of this software.
-+ */
-+
-+.global __swapcontext
-+__swapcontext:
-+ addis 2, 12, .TOC.-__swapcontext@ha
-+ addi 2, 12, .TOC.-__swapcontext@l
-+
-+ .localentry __swapcontext,.-__swapcontext
-+
-+ li 0, 249 # SYS_swapcontext
-+ li 5, 1696 # sizeof(ucontext_t)
-+ sc
-+
-+.hidden __retfromsyscall
-+ b __retfromsyscall
-+
-+.weak swapcontext
-+swapcontext = __swapcontext
-diff --git a/arch/ppc64/swapcontext.c b/arch/ppc64/swapcontext.c
-deleted file mode 100644
-index af14bc2..0000000
---- a/arch/ppc64/swapcontext.c
-+++ /dev/null
-@@ -1,45 +0,0 @@
--/*
-- * Copyright (c) 2018 William Pitcock <nenolod@dereferenced.org>
-- *
-- * Permission to use, copy, modify, and/or distribute this software for any
-- * purpose with or without fee is hereby granted, provided that the above
-- * copyright notice and this permission notice appear in all copies.
-- *
-- * This software is provided 'as is' and without any warranty, express or
-- * implied. In no event shall the authors be liable for any damages arising
-- * from the use of this software.
-- */
--
--#define _GNU_SOURCE
--#include <stddef.h>
--#include <stdarg.h>
--#include <signal.h>
--#include <string.h>
--#include <stdint.h>
--#include <errno.h>
--#include <unistd.h>
--#include <sys/syscall.h>
--
--
--int
--__swapcontext(ucontext_t *oucp, const ucontext_t *ucp)
--{
--#ifdef SYS_swapcontext
-- int r;
--
-- r = syscall(SYS_swapcontext, oucp, ucp, sizeof(ucontext_t));
-- if (r < 0)
-- {
-- errno = -r;
-- return -1;
-- }
--
-- return r;
--#else
-- errno = ENOSYS;
-- return -1;
--#endif
--}
--
--
--extern __typeof(__swapcontext) swapcontext __attribute__((weak, __alias__("__swapcontext")));
diff --git a/system/libucontext/static.patch b/system/libucontext/static.patch
deleted file mode 100644
index a51e55f64..000000000
--- a/system/libucontext/static.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 9cc1a2c0e62c75dc7afd20d5e337953f44693b70 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Gabriel=20Iva=C8=99cu?= <givascu@bitdefender.com>
-Date: Tue, 9 Apr 2019 16:07:39 +0300
-Subject: [PATCH] Build static library too
-
----
- Makefile | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index d6ff1b0..d81153c 100644
---- a/Makefile
-+++ b/Makefile
-@@ -8,10 +8,14 @@ LIBUCONTEXT_S_SRC = $(wildcard arch/${ARCH}/*.S)
- LIBUCONTEXT_OBJ = ${LIBUCONTEXT_C_SRC:.c=.o} ${LIBUCONTEXT_S_SRC:.S=.o}
- LIBUCONTEXT_SOVERSION = 0
- LIBUCONTEXT_NAME = libucontext.so
-+LIBUCONTEXT_STATIC_NAME = libucontext.a
- LIBUCONTEXT_SONAME = libucontext.so.${LIBUCONTEXT_SOVERSION}
- LIBUCONTEXT_PATH = /lib/${LIBUCONTEXT_SONAME}
-
--all: ${LIBUCONTEXT_SONAME}
-+all: ${LIBUCONTEXT_SONAME} ${LIBUCONTEXT_STATIC_NAME}
-+
-+${LIBUCONTEXT_STATIC_NAME}: ${LIBUCONTEXT_OBJ}
-+ $(AR) rcs ${LIBUCONTEXT_STATIC_NAME} ${LIBUCONTEXT_OBJ}
-
- ${LIBUCONTEXT_NAME}: ${LIBUCONTEXT_OBJ}
- $(CC) -o ${LIBUCONTEXT_NAME} -Wl,-soname,${LIBUCONTEXT_SONAME} \
-From 2e15b383272fafbbb92882990b8f339e2c6888d2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Gabriel=20Iva=C8=99cu?= <givascu@bitdefender.com>
-Date: Fri, 12 Apr 2019 10:48:24 +0300
-Subject: [PATCH] Makefile: Handle static library at clean/install
-
----
- .gitignore | 1 +
- Makefile | 5 ++++-
- 2 files changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/.gitignore b/.gitignore
-index 4fb95ca..d2e350f 100644
---- a/.gitignore
-+++ b/.gitignore
-@@ -34,5 +34,6 @@ Makefile.in
-
- *.o
- test_libucontext
-+libucontext.a
- libucontext.so
- libucontext.so.*
-diff --git a/Makefile b/Makefile
-index d81153c..8a605fd 100644
---- a/Makefile
-+++ b/Makefile
-@@ -11,6 +11,7 @@ LIBUCONTEXT_NAME = libucontext.so
- LIBUCONTEXT_STATIC_NAME = libucontext.a
- LIBUCONTEXT_SONAME = libucontext.so.${LIBUCONTEXT_SOVERSION}
- LIBUCONTEXT_PATH = /lib/${LIBUCONTEXT_SONAME}
-+LIBUCONTEXT_STATIC_PATH = /lib/${LIBUCONTEXT_STATIC_NAME}
-
- all: ${LIBUCONTEXT_SONAME} ${LIBUCONTEXT_STATIC_NAME}
-
-@@ -31,10 +32,12 @@ ${LIBUCONTEXT_SONAME}: ${LIBUCONTEXT_NAME}
- $(CC) -fPIC -DPIC ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
-
- clean:
-- rm -f ${LIBUCONTEXT_NAME} ${LIBUCONTEXT_SONAME} ${LIBUCONTEXT_OBJ} test_libucontext
-+ rm -f ${LIBUCONTEXT_NAME} ${LIBUCONTEXT_SONAME} ${LIBUCONTEXT_STATIC_NAME} \
-+ ${LIBUCONTEXT_OBJ} test_libucontext
-
- install: all
- install -D -m755 ${LIBUCONTEXT_NAME} ${DESTDIR}/${LIBUCONTEXT_PATH}
-+ install -D -m664 ${LIBUCONTEXT_STATIC_NAME} ${DESTDIR}/${LIBUCONTEXT_STATIC_PATH}
- ln -sf ${LIBUCONTEXT_SONAME} ${DESTDIR}/lib/${LIBUCONTEXT_NAME}
-
- check: test_libucontext ${LIBUCONTEXT_SONAME}
diff --git a/system/lvm2/APKBUILD b/system/lvm2/APKBUILD
index 4bb0d5d0c..3baea9c09 100644
--- a/system/lvm2/APKBUILD
+++ b/system/lvm2/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=lvm2
pkgver=2.03.08
-pkgrel=0
+pkgrel=1
pkgdesc="Logical Volume Manager 2 utilities"
url="https://sourceware.org/lvm2/"
arch="all"
@@ -88,7 +88,7 @@ udev() {
sha512sums="411c76de2acd8d7d707b60a4aab3f846004a1fbdc7b1d3f34d21af8ed45716adc0516b11491a26261580da7396d13a506e3994b32f5d1cefdf49c97e5d62d2e3 LVM2.2.03.08.tgz
-62dd89e626adc86d1f9d7c575517b4454a362868e2fd3399813b61c1cc407316156456348cd4e8148542ee26124739d6c0e72f3dddee66662a40ca86f1bc3abd fix-stdio-usage.patch
+bc4473c2f48ff6cab121f92211cd1b67589a6abadd8e32ffa366fed6ddbf9c87be695aa54a6e97b5b79203bf1a7d22cdb5974da84d38b4977592ef7a061612e7 fix-stdio-usage.patch
9272ec8c5184ef5dc776ead8f74132e072b7563b5119a3a38b712f00d92a1e3878c9b3a54eb2b01dcba038110c686b39d4c17ecd0eb258537e9217d7ed03c408 mallinfo.patch
d190c40a137b006d7b63298069c93ff08d2804b990e85d44739cd7c48beec9a569903b98f0d940895fc7365723ba886acd7ef0e08f1f65a1a391d1c448ce080e mlockall-default-config.patch
a853078660fd2fd943538924f56e81dc5793294e26b8f61d93e6188893f15f4a438d33792b341c1865d61e03f4a371b7c7ee0db5f4130ef7cb7aeaeb9290086a lvm.initd
diff --git a/system/lvm2/fix-stdio-usage.patch b/system/lvm2/fix-stdio-usage.patch
index d5cc43f65..6b7ee0eaa 100644
--- a/system/lvm2/fix-stdio-usage.patch
+++ b/system/lvm2/fix-stdio-usage.patch
@@ -1,6 +1,6 @@
---- ./tools/lvmcmdline.c
-+++ ./tools/lvmcmdline.c
-@@ -1252,7 +1252,7 @@
+--- LVM2.2.03.08/tools/lvmcmdline.c 2020-02-11 03:59:27.000000000 -0600
++++ LVM2.2.03.08/tools/lvmcmdline.c 2020-03-22 16:17:35.470100377 -0500
+@@ -3233,7 +3233,7 @@ static int _check_standard_fds(void)
int err = is_valid_fd(STDERR_FILENO);
if (!is_valid_fd(STDIN_FILENO) &&
@@ -9,7 +9,7 @@
if (err)
perror("stdin stream open");
else
-@@ -1262,7 +1262,7 @@
+@@ -3243,7 +3243,7 @@ static int _check_standard_fds(void)
}
if (!is_valid_fd(STDOUT_FILENO) &&
@@ -18,7 +18,7 @@
if (err)
perror("stdout stream open");
/* else no stdout */
-@@ -1270,7 +1270,7 @@
+@@ -3251,7 +3251,7 @@ static int _check_standard_fds(void)
}
if (!is_valid_fd(STDERR_FILENO) &&
@@ -27,3 +27,23 @@
printf("stderr stream open: %s\n",
strerror(errno));
return 0;
+--- LVM2.2.03.08/lib/commands/toolcontext.c 2020-02-11 03:59:27.000000000 -0600
++++ LVM2.2.03.08/lib/commands/toolcontext.c 2020-03-22 16:18:35.130101016 -0500
+@@ -1599,7 +1599,7 @@ struct cmd_context *create_toolcontext(u
+ /* FIXME Make this configurable? */
+ reset_lvm_errno(1);
+
+-#ifndef VALGRIND_POOL
++#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
+ /* Set in/out stream buffering before glibc */
+ if (set_buffering
+ #ifdef SYS_gettid
+@@ -1980,7 +1980,7 @@ void destroy_toolcontext(struct cmd_cont
+
+ if (cmd->pending_delete_mem)
+ dm_pool_destroy(cmd->pending_delete_mem);
+-#ifndef VALGRIND_POOL
++#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
+ if (cmd->linebuffer) {
+ /* Reset stream buffering to defaults */
+ if (is_valid_fd(STDIN_FILENO) &&
diff --git a/system/make/APKBUILD b/system/make/APKBUILD
index 7f8639199..6459c306f 100644
--- a/system/make/APKBUILD
+++ b/system/make/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=make
-pkgver=4.2.1
-pkgrel=2
+pkgver=4.3
+pkgrel=0
pkgdesc="GNU make utility to maintain groups of programs"
url="https://www.gnu.org/software/make"
arch="all"
@@ -10,15 +10,10 @@ depends=""
checkdepends="perl"
makedepends=""
subpackages="$pkgname-doc $pkgname-lang"
-source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.bz2
+source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz
fix-atexit-exit.patch
"
-prepare() {
- update_config_sub
- default_prepare
-}
-
build() {
./configure \
--build=$CBUILD \
@@ -37,5 +32,5 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="9cf00869a2f938492554f71d8cb288b5b009b3bd0489ef164f2c8f6532fc37db5c7e20af1dea288536e7c9710ee0bc6e1ddcdfc4928a8540e6e43661741825b8 make-4.2.1.tar.bz2
-a1639d9caf84a24a9f161a30d8b5dcd079b13faf2a5e3d514ff39fa11b13e796c7ff34c46ac2b56656d52129b4d3627c6102b129a4ab011f065076d872ef3992 fix-atexit-exit.patch"
+sha512sums="9a1185cc468368f4ec06478b1cfa343bf90b5cd7c92c0536567db0315b0ee909af53ecce3d44cfd93dd137dbca1ed13af5713e8663590c4fdd21ea635d78496b make-4.3.tar.gz
+ce638cf5689d384f961a92b186d9f53f34764b6ab55deca8cc284fc2192a981d4d896cf58ab764b032e9b09fe50d238c9b3031712bf94e368428174372307a45 fix-atexit-exit.patch"
diff --git a/system/make/fix-atexit-exit.patch b/system/make/fix-atexit-exit.patch
index a71d26fb5..bce562f90 100644
--- a/system/make/fix-atexit-exit.patch
+++ b/system/make/fix-atexit-exit.patch
@@ -4,8 +4,8 @@ POSIX says the behaviour is undefined if atexit callback calls
exit(). On glibc it works, but on musl it does not. Call instead
_exit() which is guaranteed to work.
---- ./output.c.orig
-+++ ./output.c
+--- make-4.3/src/output.c
++++ make-4.3/src/output.c
@@ -495,7 +495,7 @@
perror_with_name (_("write error: stdout"), "");
else
diff --git a/system/man-db/APKBUILD b/system/man-db/APKBUILD
index 5ee93c438..136e0720d 100644
--- a/system/man-db/APKBUILD
+++ b/system/man-db/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=man-db
-pkgver=2.9.0
+pkgver=2.9.1
pkgrel=0
pkgdesc="The man command and related utilities for examining on-line help files"
url="https://www.nongnu.org/man-db/"
@@ -40,5 +40,5 @@ package() {
rm -r "${pkgdir}"/usr/lib/tmpfiles.d # systemd
}
-sha512sums="7deb4421c7944276c6edf974b1336ee2f6605ee470c98d374544e2fcaa32ec2afe077c5fd020fc1f74df058384a293b8ad5a92d86b1c15a949573af46ba09cda man-db-2.9.0.tar.xz
+sha512sums="ae2d1e9f293795c63f5a9a1a765478a9a59cbe5fe6f759647be5057c1ae53f90baee8d5467921f3d0102300f2111a5026eeb25f78401bcb16ce45ad790634977 man-db-2.9.1.tar.xz
0a68260fc48488408dc11855858aa2569efa3aeefd765c425b8fc988e7fee3e1d42e19eb299e518afc9b2ae54c5d37911176127124a43d5041f1137af0457097 man-db-2.8.5-iconv.patch"
diff --git a/system/mdevd/APKBUILD b/system/mdevd/APKBUILD
index 8d52e5286..c0c9ac011 100644
--- a/system/mdevd/APKBUILD
+++ b/system/mdevd/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Laurent Bercot <ska-adelie@skarnet.org>
# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
pkgname=mdevd
-pkgver=0.1.1.1
+pkgver=0.1.1.2
pkgrel=0
pkgdesc="A small uevent manager daemon"
url="https://skarnet.org/software/$pkgname/"
@@ -47,7 +47,7 @@ openrc() {
ln -s ../../init.d/mdevd "$rldir/mdevd"
}
-sha512sums="cd7d6dcddc2bca30a3dd4583c2aa800fc54b559d4ca9385d3247eec93ee8500493254a60e47028243f715e6a3517930135407a5249641c8f23efdcaa67a50467 mdevd-0.1.1.1.tar.gz
+sha512sums="7d7a25facde1291854f564e805cc2bf7e7e0b06aaa4b631a640cf999007a3ef063ec68e8973559ec69023f40bb6ed24937d4d8510fd697f34a97345a22ede5b5 mdevd-0.1.1.2.tar.gz
b237443837c3d76f8964e2b1a48c2278af7b4a4e7f735da6fc861b7598cbf50017e961e5a4fd1f20dd9cb7dd46f4cdf68144539d909b1f245e110b75c2d849db mdev.conf
31231b28d0b980dda634e8b043a2ee31960493d60c2c9aac8a4f3f68ca1d130342569af2acd0bc04d9d8008b8e234ba949b64d9ec3ff1bded64b4e4f0ce3786b mdevd.run
f6f9eebf49c2de6abde9cfb7a9d7b3a6b3afdd3e01ba4155f1b95dfa27e522363059b69cec19305881773d776ffeccf6c1106d537d01780468bd3b9846edb2cc mdevd.initd"
diff --git a/system/musl-locales/APKBUILD b/system/musl-locales/APKBUILD
new file mode 100644
index 000000000..f537430d0
--- /dev/null
+++ b/system/musl-locales/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor: Alyx <alyx@leuhta.com>
+# Maintainer: Alyx <alyx@leuhta.com>
+pkgname=musl-locales
+pkgver=0.20200319
+pkgrel=0
+pkgdesc="Locale program for musl"
+url="https://gitlab.com/rilian-la-te/musl-locales"
+arch="all"
+options="!check" # No test suite.
+license="LGPL-3.0-only"
+depends=""
+makedepends="cmake make gettext-tiny-dev"
+subpackages="$pkgname-lang"
+source="https://distfiles.adelielinux.org/source/$pkgname-$pkgver.tar.xz"
+
+build() {
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ .
+ make
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+lang() {
+ license="MIT"
+ default_lang
+}
+
+sha512sums="921c5a4dfb45ac12b1eaf284986237bd95420a58705702d0541a46fa2480ff97cd3ac929661108c67304e4e1bfe1efed7bf8edd535b7260d7eb69d72aa294e45 musl-locales-0.20200319.tar.xz"
diff --git a/system/nss/APKBUILD b/system/nss/APKBUILD
index 0e233e589..944668272 100644
--- a/system/nss/APKBUILD
+++ b/system/nss/APKBUILD
@@ -1,9 +1,9 @@
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=nss
-pkgver=3.50
+pkgver=3.51
_ver=$(printf '%s' "$pkgver" | tr . _)
-pkgrel=0
+pkgrel=1
pkgdesc="Mozilla Network Security Services"
url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS"
arch="all"
@@ -49,6 +49,17 @@ build() {
case "$CARCH" in
*64* | s390x) export USE_64=1;;
esac
+
+ # This actually enables -mvsx and -mcrypto too, and those can't
+ # be turned off separately in this case:
+ #
+ # altivec-types.h:20:1: error: use of _long long_ in AltiVec
+ # types is invalid without _-mvsx_
+ #
+ # typedef __vector signed long long vec_s64;
+ # ^~~~~~~
+ export NSS_DISABLE_ALTIVEC=1
+
make -j 1 -C nss/coreconf
make -j 1 -C nss/lib/dbm
make -j 1 -C nss
@@ -146,7 +157,7 @@ tools() {
mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}
-sha512sums="d6bcaf8ad65b5a97c42cd6cbbc68add5c4b49db74b2debcedb2a007f72511ac0e9bd21fd2dec041bc1975cfc8af26a48450aa0d1b962f755931ab2ac45c795b1 nss-3.50.tar.gz
+sha512sums="9c894b1ea41449b000750a7b3a89fcb43dfc3d0d4d6dcc0dc288bc73996f76f1ee1ede927a8aecae6d4a07f9f3d3e3a042c6a60cf06e27e0cdc004fce2e510fd nss-3.51.tar.gz
75dbd648a461940647ff373389cc73bc8ec609139cd46c91bcce866af02be6bcbb0524eb3dfb721fbd5b0bc68c20081ed6f7debf6b24317f2a7ba823e8d3c531 nss.pc.in
0f2efa8563b11da68669d281b4459289a56f5a3a906eb60382126f3adcfe47420cdcedc6ab57727a3afeeffa2bbb4c750b43bef8b5f343a75c968411dfa30e09 nss-util.pc.in
09c69d4cc39ec9deebc88696a80d0f15eb2d8c94d9daa234a2adfec941b63805eb4ce7f2e1943857b938bddcaee1beac246a0ec627b71563d9f846e6119a4a15 nss-softokn.pc.in
diff --git a/system/openrc/0007-make-consolefont-service-compatible-with-busyboxs-se.patch b/system/openrc/0007-make-consolefont-service-compatible-with-busyboxs-se.patch
deleted file mode 100644
index 6c23e2ab0..000000000
--- a/system/openrc/0007-make-consolefont-service-compatible-with-busyboxs-se.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 3d0d2b89745597ea973129eafa3f999cf19d761f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
-Date: Wed, 17 Aug 2016 17:52:58 +0200
-Subject: [PATCH 7/7] make consolefont service compatible with busyboxs setfont
- applet
-
-Compared to kdbs setfont program it doesn't support -O and -m.
----
- conf.d/consolefont | 11 ++---------
- init.d/consolefont.in | 7 ++-----
- 2 files changed, 4 insertions(+), 14 deletions(-)
-
-diff --git a/conf.d/consolefont b/conf.d/consolefont
-index e01ae842..75544b2f 100644
---- a/conf.d/consolefont
-+++ b/conf.d/consolefont
-@@ -3,16 +3,9 @@
- #
- # consolefont specifies the default font that you'd like Linux to use on the
- # console. You can find a good selection of fonts in /usr/share/consolefonts;
--# you shouldn't specify the trailing ".psf.gz", just the font name below.
--# To use the default console font, comment out the CONSOLEFONT setting below.
--consolefont="default8x16"
-+consolefont="default8x16.psf.gz"
-
- # consoletranslation is the charset map file to use. Leave commented to use
- # the default one. Have a look in /usr/share/consoletrans for a selection of
- # map files you can use.
--#consoletranslation="8859-1_to_uni"
--
--# unicodemap is the unicode map file to use. Leave commented to use the
--# default one. Have a look in /usr/share/unimaps for a selection of map files
--# you can use.
--#unicodemap="iso01"
-+#consoletranslation="8859-1_to_uni.trans"
-diff --git a/init.d/consolefont.in b/init.d/consolefont.in
-index 9fe95afa..173ed426 100644
---- a/init.d/consolefont.in
-+++ b/init.d/consolefont.in
-@@ -22,7 +22,6 @@ start()
- {
- ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
- consolefont=${consolefont:-${CONSOLEFONT}}
-- unicodemap=${unicodemap:-${UNICODEMAP}}
- consoletranslation=${consoletranslation:-${CONSOLETRANSLATION}}
-
- if [ -z "$consolefont" ]; then
-@@ -43,9 +42,6 @@ start()
- if [ -n "$consoletranslation" ]; then
- param="$param -m $consoletranslation"
- fi
-- if [ -n "${unicodemap}" ]; then
-- param="$param -u $unicodemap"
-- fi
-
- # Set the console font
- ebegin "Setting console font [$consolefont]"
-@@ -63,7 +59,8 @@ start()
- # Store the font so we can use it ASAP on boot
- if [ $retval -eq 0 ] && checkpath -W "$RC_LIBEXECDIR"; then
- mkdir -p "$RC_LIBEXECDIR"/console
-- setfont -O "$RC_LIBEXECDIR"/console/font
-+ zcat "/usr/share/consolefonts/$consolefont" \
-+ > "$RC_LIBEXECDIR"/console/font
- fi
-
- return $retval
---
-2.11.0
-
diff --git a/system/openrc/APKBUILD b/system/openrc/APKBUILD
index 2b1c5f520..c2cb32220 100644
--- a/system/openrc/APKBUILD
+++ b/system/openrc/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer:
pkgname=openrc
pkgver=0.24.1
-pkgrel=8
+pkgrel=10
pkgdesc="OpenRC manages the services, startup and shutdown of a host"
url="https://github.com/OpenRC/openrc"
arch="all"
@@ -19,7 +19,6 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/OpenRC/openrc/archive/$pkgve
0004-hide-error-when-migrating-var-run-to-run.patch
0005-rc-pull-in-sysinit-and-boot-as-stacked-levels-when-n.patch
0006-mount-efivars-read-only.patch
- 0007-make-consolefont-service-compatible-with-busyboxs-se.patch
openrc-configuration.patch
@@ -69,8 +68,11 @@ package() {
rm "$pkgdir"/etc/conf.d/network
rm "$pkgdir"/etc/init.d/network
- # we use console-setup for keymaps
- rm "$pkgdir"/etc/init.d/keymaps
+ # we ship these in system/kbd
+ for i in consolefont keymaps; do
+ rm "$pkgdir"/etc/conf.d/$i
+ rm "$pkgdir"/etc/init.d/$i
+ done
# we use gettys-openrc for TTY
rm "$pkgdir"/etc/init.d/agetty
@@ -86,7 +88,6 @@ aedf77f9159fefb4bd5f30a29a33b6aedbc986c9a0f993aa928cc79fbe24aac76bd9e5974dcce52e
d54630d40a2d6b10a325cb012d4efcda997a60c008ca953ce5d60059d3f267308a59dabddf93a5fc0d301aa91967137d144effbe5f574394af768ce4ebc48738 0004-hide-error-when-migrating-var-run-to-run.patch
39a35c54ec9112fe84c901ed155a711cec8e194af02d5483ee60b80743dab12391e6fdc7b3da2f86844dd4edcf53e681ff95bd4d6fa1101a89ce54dce2ddbb7c 0005-rc-pull-in-sysinit-and-boot-as-stacked-levels-when-n.patch
7221dd2daccd8844f6f9481b7b5921abc2711c8abd1a4bb72f04db8fd8e734b817f5d0d571daea0e2e05d3bc687f75ee1d8025249996bdee0b3328e18d9da7d3 0006-mount-efivars-read-only.patch
-234c4f3cf39df3350dbea25c00b8d584794b28194f44c726767a6a16d91a26fee1b5d2dd16635f19803fc015b4e9d99c52b23128e6b815938b88365feba8cf59 0007-make-consolefont-service-compatible-with-busyboxs-se.patch
2dde266f3176456724e4b0c40476e7061e31986b67744b4a53c71ba0d3896860b4569e3af2ea4777a9d8fe3b6282ff869666570f1daa86cdc410c0e09805c990 openrc-configuration.patch
12bb6354e808fbf47bbab963de55ee7901738b4a912659982c57ef2777fff9a670e867fcb8ec316a76b151032c92dc89a950d7d1d835ef53f753a8f3b41d2cec openrc.logrotate
99b542c0903ad6874b8c308b2e0660a4fe2ff9db962dfec65325cd12c368873a2ae800d5e6d42dc4deff775e1d5c0068869eb72581f7ab16e88d5738afe1d3dd hostname.initd
diff --git a/system/openrc/openrc.post-install b/system/openrc/openrc.post-install
index 0f6572ef7..9632de2ee 100644
--- a/system/openrc/openrc.post-install
+++ b/system/openrc/openrc.post-install
@@ -1,6 +1,6 @@
#!/bin/sh
-if [ -d /etc/runlevels ]; then
+if [ -d /etc/runlevels/sysinit ]; then
exit 0
fi
diff --git a/system/openssl/APKBUILD b/system/openssl/APKBUILD
index 070d3d0e2..dde5f8603 100644
--- a/system/openssl/APKBUILD
+++ b/system/openssl/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=openssl
-pkgver=1.1.1d
+pkgver=1.1.1g
pkgrel=0
pkgdesc="Toolkit for SSL and TLS"
url="https://www.openssl.org/"
@@ -12,7 +12,7 @@ makedepends_build="perl"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc libcrypto1.1:libcrypto
libssl1.1:libssl"
source="https://www.openssl.org/source/${pkgname}-${pkgver}.tar.gz
- CVE-2019-1551.patch
+ ppc-auxv.patch
ppc64.patch
"
@@ -58,6 +58,8 @@ source="https://www.openssl.org/source/${pkgname}-${pkgver}.tar.gz
# - CVE-2019-1563
# 1.1.1d-r0:
# - CVE-2019-1551
+# 1.1.1g-r0:
+# - CVE-2020-1967
build() {
# openssl will prepend crosscompile always core CC et al
@@ -127,6 +129,6 @@ libssl() {
done
}
-sha512sums="2bc9f528c27fe644308eb7603c992bac8740e9f0c3601a130af30c9ffebbf7e0f5c28b76a00bbb478bad40fbe89b4223a58d604001e1713da71ff4b7fe6a08a7 openssl-1.1.1d.tar.gz
-11ca61515a89766241fe0fae27f3b39767128915f288ea88840bf93e8b50ac416024cb2153efcdf2658d3e82a8e4250a0c069333dbd7347475f9dafcc45370b5 CVE-2019-1551.patch
-66bbb0ae769643c8a0b1501d9c8466f08f0d8b3b2bc4fcc2c0c054ab1971ced85c07aa0e4b8168a4394d0ae407dfbd26066a7a068602ce5b58e459b12ce6d36a ppc64.patch"
+sha512sums="01e3d0b1bceeed8fb066f542ef5480862001556e0f612e017442330bbd7e5faee228b2de3513d7fc347446b7f217e27de1003dc9d7214d5833b97593f3ec25ab openssl-1.1.1g.tar.gz
+c164dd528d7408b8b2a52a0b181f2066ff00feb635df863bdeb4ce879db9ecdf7dd9033bb14b63ee5239aa814d5d777a86bb99cc37ecedae2d77a6bd86144b88 ppc-auxv.patch
+e040f23770d52b988578f7ff84d77563340f37c026db7643db8e4ef18e795e27d10cb42cb8656da4d9c57a28283a2828729d70f940edc950c3422a54fea55509 ppc64.patch"
diff --git a/system/openssl/ppc-auxv.patch b/system/openssl/ppc-auxv.patch
new file mode 100644
index 000000000..e19d8df1f
--- /dev/null
+++ b/system/openssl/ppc-auxv.patch
@@ -0,0 +1,17 @@
+--- openssl-1.1.1e/crypto/ppccap.c.old 2020-03-17 14:31:17.000000000 +0000
++++ openssl-1.1.1e/crypto/ppccap.c 2020-03-30 06:32:25.943988524 +0000
+@@ -207,11 +207,9 @@
+ return 0;
+ }
+
+-#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-# if __GLIBC_PREREQ(2, 16)
+-# include <sys/auxv.h>
+-# define OSSL_IMPLEMENT_GETAUXVAL
+-# endif
++#if defined(__linux__)
++# include <sys/auxv.h>
++# define OSSL_IMPLEMENT_GETAUXVAL
+ #endif
+
+ /* I wish <sys/auxv.h> was universally available */
diff --git a/system/openssl/ppc64.patch b/system/openssl/ppc64.patch
index 5f79c4ddc..c75ceedba 100644
--- a/system/openssl/ppc64.patch
+++ b/system/openssl/ppc64.patch
@@ -78,7 +78,7 @@ diff --git a/Configure b/Configure
index 22082deb4c7..e303d98deb3 100755
--- a/Configure
+++ b/Configure
-@@ -1411,8 +1410,15 @@
+@@ -1402,8 +1402,15 @@
my %predefined_C = compiler_predefined($config{CROSS_COMPILE}.$config{CC});
my %predefined_CXX = $config{CXX}
? compiler_predefined($config{CROSS_COMPILE}.$config{CXX})
diff --git a/system/pcre2/APKBUILD b/system/pcre2/APKBUILD
index 7bca0e450..4120d0a7b 100644
--- a/system/pcre2/APKBUILD
+++ b/system/pcre2/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer:
pkgname=pcre2
pkgver=10.33
-pkgrel=0
+pkgrel=1
pkgdesc="Perl-compatible regular expression library"
url="https://pcre.org"
arch="all"
@@ -12,7 +12,13 @@ depends_dev="libedit-dev zlib-dev"
makedepends="$depends_dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools
libpcre2-16:_libpcre libpcre2-32:_libpcre"
-source="https://ftp.pcre.org/pub/pcre/$pkgname-$pkgver.tar.gz"
+source="https://ftp.pcre.org/pub/pcre/$pkgname-$pkgver.tar.gz
+ CVE-2019-20454.patch
+ "
+
+# secfixes:
+# 10.33-r1:
+# - CVE-2019-20454
case "$CARCH" in
s390x) _enable_jit="";;
@@ -62,4 +68,5 @@ tools() {
mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}
-sha512sums="649983c7725e2fd2451ba89243b4c08c408fc279b7be3b2d225045cced3b0667ff6da4c9dd37510eb9e5aed6478aff54c2dbd1d92f4d0f1174579df9ec2c1882 pcre2-10.33.tar.gz"
+sha512sums="649983c7725e2fd2451ba89243b4c08c408fc279b7be3b2d225045cced3b0667ff6da4c9dd37510eb9e5aed6478aff54c2dbd1d92f4d0f1174579df9ec2c1882 pcre2-10.33.tar.gz
+07c43ccf130c1ed2b4f97036671f92e9c1d0100fd32c053b448e5dbdf976543c12f74568e37b661db7fbd603e815f5683a59cb2a9f9c307505dca3cb36db8120 CVE-2019-20454.patch"
diff --git a/system/pcre2/CVE-2019-20454.patch b/system/pcre2/CVE-2019-20454.patch
new file mode 100644
index 000000000..bdec87294
--- /dev/null
+++ b/system/pcre2/CVE-2019-20454.patch
@@ -0,0 +1,50 @@
+Revision: 1091
+Author: ph10
+Date: Mon May 13 16:26:17 2019 UTC
+URL: https://vcs.pcre.org/pcre2?view=revision&revision=1091
+
+Fix crash when \X is used without UTF in JIT.
+
+--- a/testdata/testinput4 2019/05/11 11:43:39 1090
++++ b/testdata/testinput4 2019/05/13 16:26:17 1091
+@@ -2480,4 +2480,7 @@
+ /^(?'אABC'...)(?&אABC)/utf
+ 123123123456
+
++/\X*/
++ \xF3aaa\xE4\xEA\xEB\xFEa
++
+ # End of testinput4
+--- a/testdata/testoutput4 2019/05/11 11:43:39 1090
++++ b/testdata/testoutput4 2019/05/13 16:26:17 1091
+@@ -4012,4 +4012,8 @@
+ 0: 123123
+ 1: 123
+
++/\X*/
++ \xF3aaa\xE4\xEA\xEB\xFEa
++ 0: \xf3aaa\xe4\xea\xeb\xfea
++
+ # End of testinput4
+
+Revision: 1092
+Author: ph10
+Date: Mon May 13 16:38:18 2019 UTC
+URL: https://vcs.pcre.org/pcre2?view=revision&revision=1092
+
+Forgot this file in previous commit. Fixes JIT non-UTF bug.
+
+--- a/src/pcre2_jit_compile.c 2019/05/13 16:26:17 1091
++++ b/src/pcre2_jit_compile.c 2019/05/13 16:38:18 1092
+@@ -8571,7 +8571,10 @@
+ PCRE2_SPTR bptr;
+ uint32_t c;
+
+-GETCHARINC(c, cc);
++/* Patch by PH */
++/* GETCHARINC(c, cc); */
++
++c = *cc++;
+ #if PCRE2_CODE_UNIT_WIDTH == 32
+ if (c >= 0x110000)
+ return NULL;
diff --git a/system/python3/APKBUILD b/system/python3/APKBUILD
index b8c72f3a7..e875d3941 100644
--- a/system/python3/APKBUILD
+++ b/system/python3/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=python3
-pkgver=3.6.9
+pkgver=3.6.10
_basever="${pkgver%.*}"
pkgrel=2
pkgdesc="A high-level scripting language"
@@ -40,8 +40,7 @@ makedepends="expat-dev openssl-dev zlib-dev ncurses-dev bzip2-dev xz-dev
source="https://www.python.org/ftp/python/$pkgver/Python-$pkgver.tar.xz
musl-find_library.patch
fix-xattrs-glibc.patch
- CVE-2019-16056.patch
- CVE-2019-16935.patch
+ CVE-2019-18348.patch
"
builddir="$srcdir/Python-$pkgver"
@@ -63,6 +62,8 @@ builddir="$srcdir/Python-$pkgver"
# - CVE-2019-16056
# 3.6.9-r2:
# - CVE-2019-16935
+# 3.6.10-r0:
+# - CVE-2019-18348
prepare() {
default_prepare
@@ -153,11 +154,14 @@ EOF
}
package() {
+ export XDG_CACHE_HOME="$(mktemp -d)"
make -j1 DESTDIR="$pkgdir" EXTRA_CFLAGS="$CFLAGS" install maninstall
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
# those are provided by python3-tkinter
rm -r "$pkgdir"/usr/bin/idle* "$pkgdir"/usr/lib/python*/idlelib \
"$pkgdir"/usr/lib/python*/tkinter
+
+ rm -rf "$XDG_CACHE_HOME"
}
dev() {
@@ -189,8 +193,7 @@ wininst() {
"$subpkgdir"/usr/lib/python$_basever/distutils/command
}
-sha512sums="05de9c6f44d96a52bfce10ede4312de892573edaf8bece65926d19973a3a800d65eed7a857af945f69efcfb25efa3788e7a54016b03d80b611eb51c3ea074819 Python-3.6.9.tar.xz
+sha512sums="26147099e1f1a0ffc85febad26e18e991f019599a150887ea0b925e34663fad8e03b3c2a941e2770c1a63960695e173ef32709572c9361e7f2cb862ccf75b28a Python-3.6.10.tar.xz
ab8eaa2858d5109049b1f9f553198d40e0ef8d78211ad6455f7b491af525bffb16738fed60fc84e960c4889568d25753b9e4a1494834fea48291b33f07000ec2 musl-find_library.patch
37b6ee5d0d5de43799316aa111423ba5a666c17dc7f81b04c330f59c1d1565540eac4c585abe2199bbed52ebe7426001edb1c53bd0a17486a2a8e052d0f494ad fix-xattrs-glibc.patch
-1f1eb61355eb7832bef8e9c3915895cc3b2966a30c809371430b4416260452cd39c48ba593b2259574867bd1e8fea98efbc45c4b0bd95aeb0690c8514b380ea0 CVE-2019-16056.patch
-7f94d887c81f79d90afd4a9621547c13cbdd0232250f62a686b26a63160a4d286a6db9b342d06b9b63af64f994835b489c37bab499a2093c3c2585dc7a04d8a1 CVE-2019-16935.patch"
+7a15409165feb60358455b711f978b7b1c4dea9ad53aa7b5be07c1f70262988e592e7a630f83125f37051bbed14d14b66d2acd775234a163ff5b048621b9a59c CVE-2019-18348.patch"
diff --git a/system/python3/CVE-2019-16056.patch b/system/python3/CVE-2019-16056.patch
deleted file mode 100644
index b2f5ce826..000000000
--- a/system/python3/CVE-2019-16056.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From 13a19139b5e76175bc95294d54afc9425e4f36c9 Mon Sep 17 00:00:00 2001
-From: "Miss Islington (bot)"
- <31488909+miss-islington@users.noreply.github.com>
-Date: Fri, 9 Aug 2019 08:22:19 -0700
-Subject: [PATCH] bpo-34155: Dont parse domains containing @ (GH-13079)
- (GH-14826)
-
-Before:
-
- >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses
- (Address(display_name='', username='a', domain='malicious.org'),)
-
- >>> parseaddr('a@malicious.org@important.com')
- ('', 'a@malicious.org')
-
- After:
-
- >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses
- (Address(display_name='', username='', domain=''),)
-
- >>> parseaddr('a@malicious.org@important.com')
- ('', 'a@')
-
-https://bugs.python.org/issue34155
-(cherry picked from commit 8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9)
-
-Co-authored-by: jpic <jpic@users.noreply.github.com>
----
- Lib/email/_header_value_parser.py | 2 ++
- Lib/email/_parseaddr.py | 11 ++++++++++-
- Lib/test/test_email/test__header_value_parser.py | 10 ++++++++++
- Lib/test/test_email/test_email.py | 14 ++++++++++++++
- .../2019-05-04-13-33-37.bpo-34155.MJll68.rst | 1 +
- 5 files changed, 37 insertions(+), 1 deletion(-)
- create mode 100644 Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst
-
-diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py
-index 737951e4b1b1..bc9c9b6241d4 100644
---- a/Lib/email/_header_value_parser.py
-+++ b/Lib/email/_header_value_parser.py
-@@ -1561,6 +1561,8 @@ def get_domain(value):
- token, value = get_dot_atom(value)
- except errors.HeaderParseError:
- token, value = get_atom(value)
-+ if value and value[0] == '@':
-+ raise errors.HeaderParseError('Invalid Domain')
- if leader is not None:
- token[:0] = [leader]
- domain.append(token)
-diff --git a/Lib/email/_parseaddr.py b/Lib/email/_parseaddr.py
-index cdfa3729adc7..41ff6f8c000d 100644
---- a/Lib/email/_parseaddr.py
-+++ b/Lib/email/_parseaddr.py
-@@ -379,7 +379,12 @@ def getaddrspec(self):
- aslist.append('@')
- self.pos += 1
- self.gotonext()
-- return EMPTYSTRING.join(aslist) + self.getdomain()
-+ domain = self.getdomain()
-+ if not domain:
-+ # Invalid domain, return an empty address instead of returning a
-+ # local part to denote failed parsing.
-+ return EMPTYSTRING
-+ return EMPTYSTRING.join(aslist) + domain
-
- def getdomain(self):
- """Get the complete domain name from an address."""
-@@ -394,6 +399,10 @@ def getdomain(self):
- elif self.field[self.pos] == '.':
- self.pos += 1
- sdlist.append('.')
-+ elif self.field[self.pos] == '@':
-+ # bpo-34155: Don't parse domains with two `@` like
-+ # `a@malicious.org@important.com`.
-+ return EMPTYSTRING
- elif self.field[self.pos] in self.atomends:
- break
- else:
-diff --git a/Lib/test/test_email/test__header_value_parser.py b/Lib/test/test_email/test__header_value_parser.py
-index a2c900fa7fd2..02ef3e1006c6 100644
---- a/Lib/test/test_email/test__header_value_parser.py
-+++ b/Lib/test/test_email/test__header_value_parser.py
-@@ -1418,6 +1418,16 @@ def test_get_addr_spec_dot_atom(self):
- self.assertEqual(addr_spec.domain, 'example.com')
- self.assertEqual(addr_spec.addr_spec, 'star.a.star@example.com')
-
-+ def test_get_addr_spec_multiple_domains(self):
-+ with self.assertRaises(errors.HeaderParseError):
-+ parser.get_addr_spec('star@a.star@example.com')
-+
-+ with self.assertRaises(errors.HeaderParseError):
-+ parser.get_addr_spec('star@a@example.com')
-+
-+ with self.assertRaises(errors.HeaderParseError):
-+ parser.get_addr_spec('star@172.17.0.1@example.com')
-+
- # get_obs_route
-
- def test_get_obs_route_simple(self):
-diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py
-index f97ccc6711cc..68d052279987 100644
---- a/Lib/test/test_email/test_email.py
-+++ b/Lib/test/test_email/test_email.py
-@@ -3035,6 +3035,20 @@ def test_parseaddr_empty(self):
- self.assertEqual(utils.parseaddr('<>'), ('', ''))
- self.assertEqual(utils.formataddr(utils.parseaddr('<>')), '')
-
-+ def test_parseaddr_multiple_domains(self):
-+ self.assertEqual(
-+ utils.parseaddr('a@b@c'),
-+ ('', '')
-+ )
-+ self.assertEqual(
-+ utils.parseaddr('a@b.c@c'),
-+ ('', '')
-+ )
-+ self.assertEqual(
-+ utils.parseaddr('a@172.17.0.1@c'),
-+ ('', '')
-+ )
-+
- def test_noquote_dump(self):
- self.assertEqual(
- utils.formataddr(('A Silly Person', 'person@dom.ain')),
-diff --git a/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst b/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst
-new file mode 100644
-index 000000000000..50292e29ed1d
---- /dev/null
-+++ b/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst
-@@ -0,0 +1 @@
-+Fix parsing of invalid email addresses with more than one ``@`` (e.g. a@b@c.com.) to not return the part before 2nd ``@`` as valid email address. Patch by maxking & jpic.
diff --git a/system/python3/CVE-2019-16935.patch b/system/python3/CVE-2019-16935.patch
deleted file mode 100644
index 567eb90fc..000000000
--- a/system/python3/CVE-2019-16935.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 1698cacfb924d1df452e78d11a4bf81ae7777389 Mon Sep 17 00:00:00 2001
-From: Victor Stinner <vstinner@redhat.com>
-Date: Sat, 28 Sep 2019 09:33:00 +0200
-Subject: [PATCH] bpo-38243, xmlrpc.server: Escape the server_title (GH-16373)
- (GH-16441)
-
-Escape the server title of xmlrpc.server.DocXMLRPCServer
-when rendering the document page as HTML.
-
-(cherry picked from commit e8650a4f8c7fb76f570d4ca9c1fbe44e91c8dfaa)
----
- Lib/test/test_docxmlrpc.py | 16 ++++++++++++++++
- Lib/xmlrpc/server.py | 3 ++-
- .../2019-09-25-13-21-09.bpo-38243.1pfz24.rst | 3 +++
- 3 files changed, 21 insertions(+), 1 deletion(-)
- create mode 100644 Misc/NEWS.d/next/Security/2019-09-25-13-21-09.bpo-38243.1pfz24.rst
-
-diff --git a/Lib/test/test_docxmlrpc.py b/Lib/test/test_docxmlrpc.py
-index 00903337c07c2..d2adb21af0fb3 100644
---- a/Lib/test/test_docxmlrpc.py
-+++ b/Lib/test/test_docxmlrpc.py
-@@ -1,5 +1,6 @@
- from xmlrpc.server import DocXMLRPCServer
- import http.client
-+import re
- import sys
- from test import support
- threading = support.import_module('threading')
-@@ -193,6 +194,21 @@ def test_annotations(self):
- b'method_annotation</strong></a>(x: bytes)</dt></dl>'),
- response.read())
-
-+ def test_server_title_escape(self):
-+ # bpo-38243: Ensure that the server title and documentation
-+ # are escaped for HTML.
-+ self.serv.set_server_title('test_title<script>')
-+ self.serv.set_server_documentation('test_documentation<script>')
-+ self.assertEqual('test_title<script>', self.serv.server_title)
-+ self.assertEqual('test_documentation<script>',
-+ self.serv.server_documentation)
-+
-+ generated = self.serv.generate_html_documentation()
-+ title = re.search(r'<title>(.+?)</title>', generated).group()
-+ documentation = re.search(r'<p><tt>(.+?)</tt></p>', generated).group()
-+ self.assertEqual('<title>Python: test_title&lt;script&gt;</title>', title)
-+ self.assertEqual('<p><tt>test_documentation&lt;script&gt;</tt></p>', documentation)
-+
-
- if __name__ == '__main__':
- unittest.main()
-diff --git a/Lib/xmlrpc/server.py b/Lib/xmlrpc/server.py
-index 3e0dca027f068..efe593748968c 100644
---- a/Lib/xmlrpc/server.py
-+++ b/Lib/xmlrpc/server.py
-@@ -106,6 +106,7 @@ def export_add(self, x, y):
-
- from xmlrpc.client import Fault, dumps, loads, gzip_encode, gzip_decode
- from http.server import BaseHTTPRequestHandler
-+import html
- import http.server
- import socketserver
- import sys
-@@ -904,7 +905,7 @@ def generate_html_documentation(self):
- methods
- )
-
-- return documenter.page(self.server_title, documentation)
-+ return documenter.page(html.escape(self.server_title), documentation)
-
- class DocXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
- """XML-RPC and documentation request handler class.
-diff --git a/Misc/NEWS.d/next/Security/2019-09-25-13-21-09.bpo-38243.1pfz24.rst b/Misc/NEWS.d/next/Security/2019-09-25-13-21-09.bpo-38243.1pfz24.rst
-new file mode 100644
-index 0000000000000..98d7be129573a
---- /dev/null
-+++ b/Misc/NEWS.d/next/Security/2019-09-25-13-21-09.bpo-38243.1pfz24.rst
-@@ -0,0 +1,3 @@
-+Escape the server title of :class:`xmlrpc.server.DocXMLRPCServer`
-+when rendering the document page as HTML.
-+(Contributed by Dong-hee Na in :issue:`38243`.)
diff --git a/system/python3/CVE-2019-18348.patch b/system/python3/CVE-2019-18348.patch
new file mode 100644
index 000000000..9ebb963a8
--- /dev/null
+++ b/system/python3/CVE-2019-18348.patch
@@ -0,0 +1,147 @@
+From 83fc70159b24f5b11a5ef87c9b05c2cf4c7faeba Mon Sep 17 00:00:00 2001
+From: "Miss Islington (bot)"
+ <31488909+miss-islington@users.noreply.github.com>
+Date: Sat, 14 Mar 2020 15:35:52 -0700
+Subject: [PATCH] bpo-38576: Disallow control characters in hostnames in
+ http.client (GH-18995) (GH-19002)
+
+Add host validation for control characters for more CVE-2019-18348 protection.
+(cherry picked from commit 9165addc22d05e776a54319a8531ebd0b2fe01ef)
+
+Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
+---
+ Lib/http/client.py | 10 ++++++
+ Lib/test/test_httplib.py | 13 ++++++-
+ Lib/test/test_urllib.py | 36 +++++++++++++++++--
+ .../2020-03-14-14-57-44.bpo-38576.OowwQn.rst | 1 +
+ 4 files changed, 57 insertions(+), 3 deletions(-)
+ create mode 100644 Misc/NEWS.d/next/Security/2020-03-14-14-57-44.bpo-38576.OowwQn.rst
+
+diff --git a/Lib/http/client.py b/Lib/http/client.py
+index d4821f1a96e07..c0ac7db6f40a0 100644
+--- a/Lib/http/client.py
++++ b/Lib/http/client.py
+@@ -858,6 +858,8 @@ def __init__(self, host, port=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
+
+ (self.host, self.port) = self._get_hostport(host, port)
+
++ self._validate_host(self.host)
++
+ # This is stored as an instance variable to allow unit
+ # tests to replace it with a suitable mockup
+ self._create_connection = socket.create_connection
+@@ -1215,6 +1217,14 @@ def _validate_path(self, url):
+ raise InvalidURL(f"URL can't contain control characters. {url!r} "
+ f"(found at least {match.group()!r})")
+
++ def _validate_host(self, host):
++ """Validate a host so it doesn't contain control characters."""
++ # Prevent CVE-2019-18348.
++ match = _contains_disallowed_url_pchar_re.search(host)
++ if match:
++ raise InvalidURL(f"URL can't contain control characters. {host!r} "
++ f"(found at least {match.group()!r})")
++
+ def putheader(self, header, *values):
+ """Send a request header line to the server.
+
+diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py
+index 14d42d483773c..fcd9231666ede 100644
+--- a/Lib/test/test_httplib.py
++++ b/Lib/test/test_httplib.py
+@@ -1132,7 +1132,7 @@ def run_server():
+ thread.join()
+ self.assertEqual(result, b"proxied data\n")
+
+- def test_putrequest_override_validation(self):
++ def test_putrequest_override_domain_validation(self):
+ """
+ It should be possible to override the default validation
+ behavior in putrequest (bpo-38216).
+@@ -1145,6 +1145,17 @@ def _validate_path(self, url):
+ conn.sock = FakeSocket('')
+ conn.putrequest('GET', '/\x00')
+
++ def test_putrequest_override_host_validation(self):
++ class UnsafeHTTPConnection(client.HTTPConnection):
++ def _validate_host(self, url):
++ pass
++
++ conn = UnsafeHTTPConnection('example.com\r\n')
++ conn.sock = FakeSocket('')
++ # set skip_host so a ValueError is not raised upon adding the
++ # invalid URL as the value of the "Host:" header
++ conn.putrequest('GET', '/', skip_host=1)
++
+ def test_putrequest_override_encoding(self):
+ """
+ It should be possible to override the default encoding
+diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
+index 0061a5297cb35..ddf425fd8d4b5 100644
+--- a/Lib/test/test_urllib.py
++++ b/Lib/test/test_urllib.py
+@@ -331,7 +331,7 @@ def test_willclose(self):
+ self.unfakehttp()
+
+ @unittest.skipUnless(ssl, "ssl module required")
+- def test_url_with_control_char_rejected(self):
++ def test_url_path_with_control_char_rejected(self):
+ for char_no in list(range(0, 0x21)) + [0x7f]:
+ char = chr(char_no)
+ schemeless_url = f"//localhost:7777/test{char}/"
+@@ -358,7 +358,7 @@ def test_url_with_control_char_rejected(self):
+ self.unfakehttp()
+
+ @unittest.skipUnless(ssl, "ssl module required")
+- def test_url_with_newline_header_injection_rejected(self):
++ def test_url_path_with_newline_header_injection_rejected(self):
+ self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
+ host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123"
+ schemeless_url = "//" + host + ":8080/test/?test=a"
+@@ -383,6 +383,38 @@ def test_url_with_newline_header_injection_rejected(self):
+ finally:
+ self.unfakehttp()
+
++ @unittest.skipUnless(ssl, "ssl module required")
++ def test_url_host_with_control_char_rejected(self):
++ for char_no in list(range(0, 0x21)) + [0x7f]:
++ char = chr(char_no)
++ schemeless_url = f"//localhost{char}/test/"
++ self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
++ try:
++ escaped_char_repr = repr(char).replace('\\', r'\\')
++ InvalidURL = http.client.InvalidURL
++ with self.assertRaisesRegex(
++ InvalidURL, f"contain control.*{escaped_char_repr}"):
++ urlopen(f"http:{schemeless_url}")
++ with self.assertRaisesRegex(InvalidURL, f"contain control.*{escaped_char_repr}"):
++ urlopen(f"https:{schemeless_url}")
++ finally:
++ self.unfakehttp()
++
++ @unittest.skipUnless(ssl, "ssl module required")
++ def test_url_host_with_newline_header_injection_rejected(self):
++ self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
++ host = "localhost\r\nX-injected: header\r\n"
++ schemeless_url = "//" + host + ":8080/test/?test=a"
++ try:
++ InvalidURL = http.client.InvalidURL
++ with self.assertRaisesRegex(
++ InvalidURL, r"contain control.*\\r"):
++ urlopen(f"http:{schemeless_url}")
++ with self.assertRaisesRegex(InvalidURL, r"contain control.*\\n"):
++ urlopen(f"https:{schemeless_url}")
++ finally:
++ self.unfakehttp()
++
+ def test_read_0_9(self):
+ # "0.9" response accepted (but not "simple responses" without
+ # a status line)
+diff --git a/Misc/NEWS.d/next/Security/2020-03-14-14-57-44.bpo-38576.OowwQn.rst b/Misc/NEWS.d/next/Security/2020-03-14-14-57-44.bpo-38576.OowwQn.rst
+new file mode 100644
+index 0000000000000..34b8af28988fa
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2020-03-14-14-57-44.bpo-38576.OowwQn.rst
+@@ -0,0 +1 @@
++Disallow control characters in hostnames in http.client, addressing CVE-2019-18348. Such potentially malicious header injection URLs now cause a InvalidURL to be raised.
+\ No newline at end of file
diff --git a/system/ruby/APKBUILD b/system/ruby/APKBUILD
index 537c1010a..1f4eeafc2 100644
--- a/system/ruby/APKBUILD
+++ b/system/ruby/APKBUILD
@@ -38,9 +38,11 @@
# - CVE-2019-16201
# - CVE-2019-16254
# - CVE-2019-16255
+# 2.5.7-r1:
+# - CVE-2020-8130
#
pkgname=ruby
-pkgver=2.5.7
+pkgver=2.7.1
_abiver="${pkgver%.*}.0"
pkgrel=0
pkgdesc="An object-oriented language for quick and easy programming"
@@ -48,13 +50,12 @@ url="https://www.ruby-lang.org/"
arch="all"
license="Ruby AND BSD-2-Clause"
depends="ca-certificates"
-depends_dev="ruby=$pkgver-r$pkgrel gmp-dev"
+depends_dev="ruby=$pkgver-r$pkgrel gmp-dev libucontext-dev"
makedepends="$depends_dev zlib-dev openssl-dev db-dev libedit-dev
libffi-dev coreutils yaml-dev linux-headers autoconf"
install="$pkgname.post-upgrade"
subpackages="$pkgname-doc $pkgname-dev
$pkgname-bigdecimal
- $pkgname-did_you_mean::noarch
$pkgname-fiddle
$pkgname-io-console:io_console
$pkgname-irb::noarch
@@ -108,6 +109,9 @@ build() {
export CFLAGS="$CFLAGS -fno-omit-frame-pointer -fno-strict-aliasing"
export CPPFLAGS="$CPPFLAGS -fno-omit-frame-pointer -fno-strict-aliasing"
+ # Needed for coroutine stuff
+ export LIBS="-lucontext"
+
# ruby saves path to install. we want use $PATH
export INSTALL=install
@@ -144,7 +148,7 @@ package() {
rm -R "$pkgdir"$_gemdir/cache/*
if [ -d "$pkgdir"/usr/local ]; then
- local f="$(cd "$pkgdir" ; find usr/local -type f)"
+ f="$(cd "$pkgdir" ; find usr/local -type f)"
if [ -n "$f" ]; then
error "Found files in /usr/local:"
echo "$f"
@@ -162,14 +166,6 @@ bigdecimal() {
_mvgem bigdecimal
}
-did_you_mean() {
- pkgdesc="Did you mean? experience in Ruby"
- license="MIT"
- depends="$pkgname-libs"
-
- _mvgem did_you_mean
-}
-
fiddle() {
pkgdesc="A libffi wrapper for Ruby"
license="BSD-2-Clause"
@@ -295,7 +291,7 @@ full() {
}
_mv() {
- local i; for i in "$@"; do
+ for i in "$@"; do
mkdir -p "$subpkgdir"/${i%/*}
mv "$pkgdir"/${i} "$subpkgdir"/${i%/*}/
done
@@ -303,7 +299,7 @@ _mv() {
_mvgem() {
cd "$pkgdir"
- local path; for path in ./$_rubydir/${1}.rb \
+ for path in ./$_rubydir/${1}.rb \
./$_rubydir/${1} \
./$_rubydir/$_chost/${1} \
./$_rubydir/$_chost/${1}.so \
@@ -314,8 +310,8 @@ _mvgem() {
done
}
-sha512sums="63b7c75fab44cd1bd22f22ddec00c740cf379ac7240da0dfafcec54347766695faef47428ce1c433fd77fa96992e976c984697067fa526236d383b12adc9ce75 ruby-2.5.7.tar.xz
-20e7e5ee9936a93872fe1ad836dd1fde001fe4a0e7ed54c26727ad83da3ceb0e6247681d9dd4f98a69e1b0250703ed8fc682d44075780d5f47faa1d5f58d2bdb rubygems-avoid-platform-specific-gems.patch
+sha512sums="79f98b1ea98e0b10ec79da1883e8fc84d48ffe5c09ae945cbebde94365e35a589d919aac965f74d70ca7e21370ecee631ac5a8f9c4eac61d62f5aa629f27bf31 ruby-2.7.1.tar.xz
+a142199140fa711a64717429e9069fd2082319abaf4b129f561db374b3bc16e2a90cc4c849b5d28334505d1c71fed242aef3c44d983da3513d239dcb778673a5 rubygems-avoid-platform-specific-gems.patch
814fe6359505b70d8ff680adf22f20a74b4dbd3fecc9a63a6c2456ee9824257815929917b6df5394ed069a6869511b8c6dce5b95b4acbbb7867c1f3a975a0150 test_insns-lower-recursion-depth.patch
-e99b36940fa8fdd445d82738c70b8fc042cab042a4662cab156578aad2dac9673a96da22b6676aa36beac08070e92a7798c60d6f36eeb169216c4c51864ce2fe fix-get_main_stack.patch
-6b88fccce164db1d8beb16adeffdd7effd077e9842b7f61deddebeb39afcf9b839192b68a43ce66a1ff0c9aeaacc4f13a0ee56184c22e822cd8b10a07a1c87b2 libedit-compat.patch"
+3ffc034c01110ee5531265333ca5ee8d61d08131843fe3004c5b34c88c9c1b32cb4ed89574f393177c8bd526e9c15da61ab344f93adf07b9148c561ee19e2eb5 fix-get_main_stack.patch
+6cbeb9d05a3c028e6bd371deaeec6e97fa8ebd03f0dc9d406648a03b569bb44a148e2bd81998a2a973e91ded8a08af141bdebe3e324bdc32df5e74209a42b024 libedit-compat.patch"
diff --git a/system/ruby/fix-get_main_stack.patch b/system/ruby/fix-get_main_stack.patch
index 4b1a101ab..b56bc114b 100644
--- a/system/ruby/fix-get_main_stack.patch
+++ b/system/ruby/fix-get_main_stack.patch
@@ -2,7 +2,7 @@ diff --git a/thread_pthread.c b/thread_pthread.c
index 951885ffa0..cf90321d1d 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
-@@ -552,9 +552,6 @@ hpux_attr_getstackaddr(const pthread_attr_t *attr, void **addr)
+@@ -656,9 +656,6 @@ hpux_attr_getstackaddr(const pthread_attr_t *attr, void **addr)
# define MAINSTACKADDR_AVAILABLE 0
# endif
#endif
@@ -12,7 +12,7 @@ index 951885ffa0..cf90321d1d 100644
#ifdef STACKADDR_AVAILABLE
/*
-@@ -632,6 +629,55 @@ get_stack(void **addr, size_t *size)
+@@ -740,6 +737,55 @@ get_stack(void **addr, size_t *size)
return 0;
#undef CHECK_ERR
}
diff --git a/system/ruby/libedit-compat.patch b/system/ruby/libedit-compat.patch
index 601a9feea..670b16dc8 100644
--- a/system/ruby/libedit-compat.patch
+++ b/system/ruby/libedit-compat.patch
@@ -1,6 +1,6 @@
--- ruby-2.5.5/ext/readline/readline.c.old 2017-09-30 08:35:23.000000000 +0000
+++ ruby-2.5.5/ext/readline/readline.c 2019-09-09 06:12:00.300098741 +0000
-@@ -571,6 +571,9 @@
+@@ -572,6 +572,9 @@
rb_syserr_fail(save_errno, "fdopen");
}
rl_instream = readline_rl_instream = f;
@@ -10,7 +10,7 @@
readline_instream = input;
}
return input;
-@@ -607,6 +610,9 @@
+@@ -608,6 +611,9 @@
rb_syserr_fail(save_errno, "fdopen");
}
rl_outstream = readline_rl_outstream = f;
diff --git a/system/ruby/rubygems-avoid-platform-specific-gems.patch b/system/ruby/rubygems-avoid-platform-specific-gems.patch
index da6884d09..4eb26a63f 100644
--- a/system/ruby/rubygems-avoid-platform-specific-gems.patch
+++ b/system/ruby/rubygems-avoid-platform-specific-gems.patch
@@ -17,7 +17,7 @@ a platform-agnostic (source) gem. Users can override it using
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
-@@ -764,7 +764,10 @@
+@@ -759,7 +759,10 @@
def self.platforms
@platforms ||= []
if @platforms.empty?
diff --git a/system/s6-linux-init/APKBUILD b/system/s6-linux-init/APKBUILD
index 58415752b..c3985d7d3 100644
--- a/system/s6-linux-init/APKBUILD
+++ b/system/s6-linux-init/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Laurent Bercot <ska-adelie@skarnet.org>
# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
pkgname=s6-linux-init
-pkgver=1.0.3.1
+pkgver=1.0.4.0
pkgrel=0
pkgdesc="A s6-based init system"
url="https://skarnet.org/software/$pkgname/"
@@ -119,7 +119,7 @@ doc() {
cp -a "$builddir/doc" "$subpkgdir/usr/share/doc/$pkgname"
}
-sha512sums="71b380ff0eaa1d297bf6af5a1c979efdf34d10ec1e440fd1ee3fcab8ddf2c5d7c903d151986ecb5f01a9e0135bedc8021e5fbf82a3fd66abfebcb5e3cbf19242 s6-linux-init-1.0.3.1.tar.gz
+sha512sums="791e376911c9217adace72c6048a295d4b486fc51c0a73578a40a0b020a735d9444f58e5f49d613e99a81aadd63d016ae60c8b056c49c1b50693a7b054890926 s6-linux-init-1.0.4.0.tar.gz
756b0cbbe5dabb4631380c3c7ea199cc213224b2e36e50a2d012a61948170078b78bf49b85d886319fecf59843087f937d3d804723b2553ac9f94d088a2f0fd8 rc.init
e73c3c32b118831074288d23fadace2158a2b15d5a13ffa73290b92a9e39c2a21c73d3b0eabea29bcbaa5f6381611fd8d0aaa6aa691ec7de91b8ef6ae404b6da runlevel
7bb050248a5c2ab6a56c50c35f87cde724f97ff9882f5e60b0f0f2f14bd93c1df7d99fedc3d81c8519cf1a1ed90e03f1cbb9bf891c7b3618aa9a5f5738d262f4 rc.shutdown
diff --git a/system/s6-rc/APKBUILD b/system/s6-rc/APKBUILD
index f857861e5..cc7148513 100644
--- a/system/s6-rc/APKBUILD
+++ b/system/s6-rc/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Laurent Bercot <ska-adelie@skarnet.org>
# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
pkgname=s6-rc
-pkgver=0.5.1.1
+pkgver=0.5.1.2
pkgrel=0
pkgdesc="skarnet.org's service manager, working on top of s6"
url="https://skarnet.org/software/s6-rc/"
@@ -66,4 +66,4 @@ doc() {
cp -a "$builddir/doc" "$subpkgdir/usr/share/doc/$pkgname"
}
-sha512sums="88e6ad4f09501eda231e3bbac58e9dafc925ff4b2c2a845c9796f3c1519834901f0126d751705b00ecd71173e208085bd68c5ae221a7074da8254d2b71e8a772 s6-rc-0.5.1.1.tar.gz"
+sha512sums="d52b8b22c709f5d8df7d54d70363f06f7b64b841019d046e9ecaf2cb5f1d319ce8995da5eb5aafb9627f993abfe213c4f75ae3ad6cadad2b3a3175271989ac95 s6-rc-0.5.1.2.tar.gz"
diff --git a/system/s6/APKBUILD b/system/s6/APKBUILD
index e4acf50ef..e2a601690 100644
--- a/system/s6/APKBUILD
+++ b/system/s6/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Laurent Bercot <ska-adelie@skarnet.org>
# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
pkgname=s6
-pkgver=2.9.0.1
+pkgver=2.9.1.0
pkgrel=0
pkgdesc="skarnet.org's small & secure supervision software suite"
url="https://skarnet.org/software/$pkgname/"
@@ -67,4 +67,4 @@ doc() {
cp -a "$builddir/doc" "$subpkgdir/usr/share/doc/$pkgname"
}
-sha512sums="5beb6170e4a457a0a307cbace67369cc35f6fd79d13ece2e82a3ebbdb4b032304eba8124be3e45b4db921863eaa02f51472c1365b0da000eef0868c11514dfff s6-2.9.0.1.tar.gz"
+sha512sums="190660ed3af678b304230c688d3364a20dfb8d6e944314506bc27c90fc2ccf1062c7b2931df93620dd3b6f5f794d6119d984f28cb2f4562c1abb8609270b90f5 s6-2.9.1.0.tar.gz"
diff --git a/system/skalibs/APKBUILD b/system/skalibs/APKBUILD
index 2ec93cd17..129fa7e79 100644
--- a/system/skalibs/APKBUILD
+++ b/system/skalibs/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Laurent Bercot <ska-adelie@skarnet.org>
# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
pkgname=skalibs
-pkgver=2.9.1.0
+pkgver=2.9.2.1
pkgrel=0
pkgdesc="A set of general-purpose C programming libraries for skarnet.org software"
url="https://skarnet.org/software/skalibs/"
@@ -57,4 +57,4 @@ doc() {
cp -a "$builddir/doc" "$subpkgdir/usr/share/doc/$pkgname"
}
-sha512sums="a85a9397cdb10cbc42fd7ef4984a77802cf8c42abeabc8ff18de6d2e11ff97d950418aeda5f2dd66a04bd30004a5c4608e7cc6f4c7e23b91f56ef1ff59f4b6d5 skalibs-2.9.1.0.tar.gz"
+sha512sums="bd507faf30f0564fb8d3e5f86de04ab4b39961dab2497ba9f4a81980a57f7ff68cad366b9847b25d555b5b9263460d13f096e1774d080d1d286979f2e7324c54 skalibs-2.9.2.1.tar.gz"
diff --git a/system/sqlite/APKBUILD b/system/sqlite/APKBUILD
index 0a3e367c1..e8db13ba0 100644
--- a/system/sqlite/APKBUILD
+++ b/system/sqlite/APKBUILD
@@ -1,20 +1,37 @@
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=sqlite
-pkgver=3.30.1
+pkgver=3.31.1
_pkgver=${pkgver%.*}0${pkgver#*.*.}00
_pkgver=${_pkgver%.*}${_pkgver#*.}
pkgrel=0
pkgdesc="C library that implements an SQL database engine"
url="https://sqlite.org/"
arch="all"
+options="!check" # Test suite requires tcl - circular dependency
license="Public-Domain"
depends=""
makedepends="libedit-dev zlib-dev"
-source="https://sqlite.org/2019/$pkgname-autoconf-$_pkgver.tar.gz"
+source="https://sqlite.org/2020/$pkgname-autoconf-$_pkgver.tar.gz"
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs"
builddir="$srcdir/$pkgname-autoconf-$_pkgver"
+# secfixes:
+# 3.31.1-r0:
+# - CVE-2019-19242
+# - CVE-2019-19244
+# - CVE-2019-19317
+# - CVE-2019-19603
+# - CVE-2019-19645
+# - CVE-2019-19646
+# - CVE-2019-19880
+# - CVE-2019-19923
+# - CVE-2019-19924
+# - CVE-2019-19925
+# - CVE-2019-19926
+# - CVE-2019-19959
+# - CVE-2019-20218
+
build() {
local _amalgamation="-DSQLITE_ENABLE_FTS4 \
-DSQLITE_ENABLE_FTS3 \
@@ -61,4 +78,4 @@ libs() {
mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
}
-sha512sums="9ec0283c417fb0323b0e43550af2a49e9a63988e4212c27ea62cc9da3534caa6faf5bdc7e051b6772c4ce61560a433b3d3288b68e05e9ba8495f61a3bcebda3e sqlite-autoconf-3300100.tar.gz"
+sha512sums="d85250ba5f78f0c918880f663741709aba662192f04888b2324a0df17affdf5b8540e8428c6c7315119806e7adad758ea281c9b403c0ad94ac6a9bd1b93fd617 sqlite-autoconf-3310100.tar.gz"
diff --git a/system/unzip/10-unzip-handle-pkware-verify.patch b/system/unzip/10-unzip-handle-pkware-verify.patch
deleted file mode 100644
index b373ce07d..000000000
--- a/system/unzip/10-unzip-handle-pkware-verify.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From: Steven Schweda
-Subject: Handle the PKWare verification bit of internal attributes
-Bug-Debian: http://bugs.debian.org/630078
-X-Debian-version: 6.0-5
-
---- a/process.c
-+++ b/process.c
-@@ -1729,6 +1729,13 @@
- else if (uO.L_flag > 1) /* let -LL force lower case for all names */
- G.pInfo->lcflag = 1;
-
-+ /* Handle the PKWare verification bit, bit 2 (0x0004) of internal
-+ attributes. If this is set, then a verification checksum is in the
-+ first 3 bytes of the external attributes. In this case all we can use
-+ for setting file attributes is the last external attributes byte. */
-+ if (G.crec.internal_file_attributes & 0x0004)
-+ G.crec.external_file_attributes &= (ulg)0xff;
-+
- /* do Amigas (AMIGA_) also have volume labels? */
- if (IS_VOLID(G.crec.external_file_attributes) &&
- (G.pInfo->hostnum == FS_FAT_ || G.pInfo->hostnum == FS_HPFS_ ||
diff --git a/system/unzip/20-unzip-uidgid-fix.patch b/system/unzip/20-unzip-uidgid-fix.patch
deleted file mode 100644
index 3a308990e..000000000
--- a/system/unzip/20-unzip-uidgid-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: sms
-Subject: Restore uid and gid information when requested
-Bug-Debian: http://bugs.debian.org/689212
-X-Debian-version: 6.0-8
-
---- a/process.c
-+++ b/process.c
-@@ -2904,7 +2904,7 @@
- #ifdef IZ_HAVE_UXUIDGID
- if (eb_len >= EB_UX3_MINLEN
- && z_uidgid != NULL
-- && (*((EB_HEADSIZE + 0) + ef_buf) == 1)
-+ && (*((EB_HEADSIZE + 0) + ef_buf) == 1))
- /* only know about version 1 */
- {
- uch uid_size;
-@@ -2916,10 +2916,10 @@
- flags &= ~0x0ff; /* ignore any previous UNIX field */
-
- if ( read_ux3_value((EB_HEADSIZE + 2) + ef_buf,
-- uid_size, z_uidgid[0])
-+ uid_size, &z_uidgid[0])
- &&
- read_ux3_value((EB_HEADSIZE + uid_size + 3) + ef_buf,
-- gid_size, z_uidgid[1]) )
-+ gid_size, &z_uidgid[1]) )
- {
- flags |= EB_UX2_VALID; /* signal success */
- }
diff --git a/system/unzip/APKBUILD b/system/unzip/APKBUILD
index e915966a0..ea8f7e6fa 100644
--- a/system/unzip/APKBUILD
+++ b/system/unzip/APKBUILD
@@ -4,7 +4,8 @@
pkgname=unzip
pkgver=6.0
_pkgver=$(printf '%s' "$pkgver" | tr -d .)
-pkgrel=3
+_debver=25
+pkgrel=4
pkgdesc="Extract PKZIP-compatible .zip files"
url="http://www.info-zip.org/UnZip.html"
arch="all"
@@ -12,12 +13,30 @@ license="Info-ZIP"
subpackages="$pkgname-doc"
# normally ftp://ftp.info-zip.org/pub/infozip/src/$pkgname$_pkgver.zip
source="$pkgname-$pkgver.tgz::https://distfiles.adelielinux.org/source/$pkgname$_pkgver.tgz
- 10-unzip-handle-pkware-verify.patch
- 20-unzip-uidgid-fix.patch
- unzip-6.0-heap-overflow-infloop.patch
+ http://deb.debian.org/debian/pool/main/u/unzip/unzip_$pkgver-$_debver.debian.tar.xz
"
builddir="$srcdir/$pkgname$_pkgver"
+# secfixes:
+# 6.0-r4:
+# - CVE-2014-8139
+# - CVE-2014-8140
+# - CVE-2014-8141
+# - CVE-2014-9636
+# - CVE-2014-9913
+# - CVE-2016-9844
+# - CVE-2018-18384
+# - CVE-2018-1000035
+# - CVE-2019-13232
+
+prepare() {
+ default_prepare
+ while read -r i; do
+ msg "$i"
+ patch -p1 -i "../debian/patches/$i"
+ done < ../debian/patches/series
+}
+
build() {
make -f unix/Makefile \
CC="${CHOST}-gcc" \
@@ -38,6 +57,4 @@ package() {
}
sha512sums="0694e403ebc57b37218e00ec1a406cae5cc9c5b52b6798e0d4590840b6cdbf9ddc0d9471f67af783e960f8fa2e620394d51384257dca23d06bcd90224a80ce5d unzip-6.0.tgz
-9d2914f22fb0075a2b6f72825c235f46eafd8d47b6fb6fcc8303fc69336e256b15923c002d2615bb6af733344c2315e4a8504d77bae301e10c11d4736faa2c81 10-unzip-handle-pkware-verify.patch
-57699582e9056af0817dcb67f8db67e6a1ff8208c137fbebcf559429e5f12b471b75d7e1ef938e5bbb5416074a51ac7342e4ce8057f4bbdcb0bf079b8d7832af 20-unzip-uidgid-fix.patch
-b1e3fac6a787828efaaef8ec7cc52e1573aea27a6f29830af37ec4ba8bcd2a6488c953ab10eee0561c78e82c7401833ef172bebee793405d93632ce788756301 unzip-6.0-heap-overflow-infloop.patch"
+13c16db420fa4a34be3090a9acdd79b01320da40ac5aa89a9dfca03e64b914b28eb72aff3882d02a8197457bcb8eeb9473c998cf6920e511883c9289a949fb21 unzip_6.0-25.debian.tar.xz"
diff --git a/system/unzip/unzip-6.0-heap-overflow-infloop.patch b/system/unzip/unzip-6.0-heap-overflow-infloop.patch
deleted file mode 100644
index 160c512f9..000000000
--- a/system/unzip/unzip-6.0-heap-overflow-infloop.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From bdd4a0cecd745cb4825e4508b5bdf2579731086a Mon Sep 17 00:00:00 2001
-From: Petr Stodulka <pstodulk@redhat.com>
-Date: Mon, 14 Sep 2015 18:23:17 +0200
-Subject: [PATCH 1/3] upstream fix for heap overflow
-
-https://bugzilla.redhat.com/attachment.cgi?id=1073002
----
- crypt.c | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/crypt.c b/crypt.c
-index 784e411..a8975f2 100644
---- a/crypt.c
-+++ b/crypt.c
-@@ -465,7 +465,17 @@ int decrypt(__G__ passwrd)
- GLOBAL(pInfo->encrypted) = FALSE;
- defer_leftover_input(__G);
- for (n = 0; n < RAND_HEAD_LEN; n++) {
-- b = NEXTBYTE;
-+ /* 2012-11-23 SMS. (OUSPG report.)
-+ * Quit early if compressed size < HEAD_LEN. The resulting
-+ * error message ("unable to get password") could be improved,
-+ * but it's better than trying to read nonexistent data, and
-+ * then continuing with a negative G.csize. (See
-+ * fileio.c:readbyte()).
-+ */
-+ if ((b = NEXTBYTE) == (ush)EOF)
-+ {
-+ return PK_ERR;
-+ }
- h[n] = (uch)b;
- Trace((stdout, " (%02x)", h[n]));
- }
---
-2.4.6
-
-
-From 4b48844661ff9569f2ecf582a387d46a5775b5d8 Mon Sep 17 00:00:00 2001
-From: Kamil Dudka <kdudka@redhat.com>
-Date: Mon, 14 Sep 2015 18:24:56 +0200
-Subject: [PATCH 2/3] fix infinite loop when extracting empty bzip2 data
-
-Bug: https://sourceforge.net/p/infozip/patches/23/
----
- extract.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/extract.c b/extract.c
-index 7134bfe..29db027 100644
---- a/extract.c
-+++ b/extract.c
-@@ -2733,6 +2733,12 @@ __GDEF
- int repeated_buf_err;
- bz_stream bstrm;
-
-+ if (G.incnt <= 0 && G.csize <= 0L) {
-+ /* avoid an infinite loop */
-+ Trace((stderr, "UZbunzip2() got empty input\n"));
-+ return 2;
-+ }
-+
- #if (defined(DLL) && !defined(NO_SLIDE_REDIR))
- if (G.redirect_slide)
- wsize = G.redirect_size, redirSlide = G.redirect_buffer;
---
-2.4.6
-
-
-From bd150334fb4084f5555a6be26b015a0671cb5b74 Mon Sep 17 00:00:00 2001
-From: Kamil Dudka <kdudka@redhat.com>
-Date: Tue, 22 Sep 2015 18:52:23 +0200
-Subject: [PATCH 3/3] extract: prevent unsigned overflow on invalid input
-
-Suggested-by: Stefan Cornelius
----
- extract.c | 11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/extract.c b/extract.c
-index 29db027..b9ae667 100644
---- a/extract.c
-+++ b/extract.c
-@@ -1257,8 +1257,17 @@ static int extract_or_test_entrylist(__G__ numchunk,
- if (G.lrec.compression_method == STORED) {
- zusz_t csiz_decrypted = G.lrec.csize;
-
-- if (G.pInfo->encrypted)
-+ if (G.pInfo->encrypted) {
-+ if (csiz_decrypted <= 12) {
-+ /* handle the error now to prevent unsigned overflow */
-+ Info(slide, 0x401, ((char *)slide,
-+ LoadFarStringSmall(ErrUnzipNoFile),
-+ LoadFarString(InvalidComprData),
-+ LoadFarStringSmall2(Inflate)));
-+ return PK_ERR;
-+ }
- csiz_decrypted -= 12;
-+ }
- if (G.lrec.ucsize != csiz_decrypted) {
- Info(slide, 0x401, ((char *)slide,
- LoadFarStringSmall2(WrnStorUCSizCSizDiff),
---
-2.5.2
-
diff --git a/system/utmps/APKBUILD b/system/utmps/APKBUILD
index eef50c1d8..b60248950 100644
--- a/system/utmps/APKBUILD
+++ b/system/utmps/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Laurent Bercot <ska-adelie@skarnet.org>
# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
pkgname=utmps
-pkgver=0.0.3.1
+pkgver=0.0.3.2
pkgrel=0
pkgdesc="A secure utmp/wtmp implementation"
url="https://skarnet.org/software/$pkgname/"
@@ -75,6 +75,6 @@ doc() {
cp -a "$builddir/doc" "$subpkgdir/usr/share/doc/$pkgname"
}
-sha512sums="30ad442d3dc4d8961b759361412b32903d6a0c9421d94e8fec2dd529dc63e0e551444be4c9b3a5f9eb8fcc6cbd2950f7c0bb0d6c5eda92b9278598dd2e4264b6 utmps-0.0.3.1.tar.gz
+sha512sums="096615bf4ef4bf73af6128fcdebc0473c736a154fb3f1db89f6f2f2301fdaf2ea183b709991d4591e75e6e8c51426ac03ce602e2d8ce9cd4a5c360bc5b44003e utmps-0.0.3.2.tar.gz
0ec30284c64c6ea9f25142c5f4a643bd48b137fe85781b650104f5137ffa4dfc35ca7be3e41e3acd3403ebe1d8c5378073afa4e2f3607d3d794fcd9f98ed51c4 utmpd.run
cba4f2ec3b8f5becf3ae57eecf584745d783046ee6cf5d116322421ad5ffd074d2955da22d31d2b5b1d05f906378aae92f221d2ac95ac21b54a361fbdc0566e7 wtmpd.run"
diff --git a/system/vim/APKBUILD b/system/vim/APKBUILD
index 3d0918d65..cb2f7090f 100644
--- a/system/vim/APKBUILD
+++ b/system/vim/APKBUILD
@@ -4,7 +4,7 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Kiyoshi Aman <adelie@aerdan.vulpine.house>
pkgname=vim
-pkgver=8.2.0255
+pkgver=8.2.0529
_pkgver=${pkgver%.*.*}${pkgver#*.}
_pkgver=${_pkgver%.*}
pkgrel=0
@@ -79,5 +79,5 @@ vimdiff() {
mv "$pkgdir"/usr/bin/vimdiff "$subpkgdir"/usr/bin
}
-sha512sums="347df5903c95753610eb48c85696d47df5fbfe1179544b4220cd3430dd228810d2639466ef4beaacf91b7ebf0ec9f7e029963af1f2a6b69b1d4bbff33d2db1bb vim-8.2.0255.tar.gz
+sha512sums="73cd3eb1522189f603c65ef1e80c0d1c860ce7332817967ab289aa8f2fdf376235fc9c30af53a66164cfe83a882b55003b4073b27852061295ca9b5fe203501d vim-8.2.0529.tar.gz
12ee3f96c94d74215159fba379ed61907ec5982a9f1643575dcb7c3d5e30824665d683de95f97b5067718b3f2a1238fb7534a70803bc170614498ad026f352d8 vimrc"