diff options
Diffstat (limited to 'system')
64 files changed, 1248 insertions, 2178 deletions
diff --git a/system/abuild/APKBUILD b/system/abuild/APKBUILD index cb6cb9ba9..b2ccb8f8d 100644 --- a/system/abuild/APKBUILD +++ b/system/abuild/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=abuild pkgver=3.3.1 -pkgrel=3 +pkgrel=4 pkgdesc="Script to build APK packages" url="https://code.foxkit.us/adelie/abuild" arch="all" @@ -21,6 +21,8 @@ pkggroups="abuild" source="https://distfiles.adelielinux.org/source/abuild-$pkgver+adelie.tar.xz keyhole.patch auto-dev-symbols.patch + bang.patch + modernise.patch " builddir="$srcdir/$pkgname-$pkgver+adelie" @@ -58,4 +60,6 @@ _rootbld() { sha512sums="c358f84d198527eeeac1a1aacc101174e18f9f34f692b12a4e4deb6b32d5f3ebdc703c90de6a6f81f195a81eebb90a11f9bfea13ef5db531d9b5d5ae6ecd6a66 abuild-3.3.1+adelie.tar.xz 757d750d4b5c88bf00774b64f2b93a9461e03f284d9423dc58c581e1309f276628de3114fcb510afd7c3cd55ceb721c1278e42756977c97ebe2597207805318d keyhole.patch -2aa43539fc465f5abdc7c3d994363b80d1f7494c2d659093e5a2c45056e07617506ad8ea98f0e7d4ebe2596802b76605cd7c9f3ffc5a30c488c30bb36248e3d2 auto-dev-symbols.patch" +2aa43539fc465f5abdc7c3d994363b80d1f7494c2d659093e5a2c45056e07617506ad8ea98f0e7d4ebe2596802b76605cd7c9f3ffc5a30c488c30bb36248e3d2 auto-dev-symbols.patch +0fccb03673f2f72a7bd2d2afd1c79141eeb73b3119e83fff966fb8a2851c0484912be70a7b384be1dc384c344cf27427e2fc2426c2f9bf56aa5625f32436524d bang.patch +b5b200da56c4319d332a7c5ddf38879fba0a4af723e1c6492f80a101afc8711d978dd7e1e5c31c80ed7fee15dcb19e7c449c92761b509a8063e417869885edc5 modernise.patch" diff --git a/system/abuild/bang.patch b/system/abuild/bang.patch new file mode 100644 index 000000000..7140f4dd8 --- /dev/null +++ b/system/abuild/bang.patch @@ -0,0 +1,10 @@ +diff --git a/abuild.in b/abuild.in +index acee26f..6e06f29 100644 +--- a/abuild.in ++++ b/abuild.in +@@ -1,4 +1,4 @@ +-#!/bin/sh -e ++#!/bin/bash -e + + # abuild - build apk packages (light version of makepkg) + # Copyright (c) 2008-2015 Natanael Copa <ncopa@alpinelinux.org> diff --git a/system/abuild/modernise.patch b/system/abuild/modernise.patch new file mode 100644 index 000000000..b87b098f9 --- /dev/null +++ b/system/abuild/modernise.patch @@ -0,0 +1,164 @@ +From 9221c1d06e9185b734d58c155764ed24fcfc48ed Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> +Date: Tue, 14 Jan 2020 04:46:41 -0600 +Subject: [PATCH 1/2] newapkbuild: Drastically modernise output APKBUILD file + +--- + newapkbuild.in | 44 +++++++++++++++++++++++++++++++------------- + 1 file changed, 31 insertions(+), 13 deletions(-) + +diff --git a/newapkbuild.in b/newapkbuild.in +index 85f838f..dbcef14 100644 +--- a/newapkbuild.in ++++ b/newapkbuild.in +@@ -68,13 +68,9 @@ build_cmake() { + -DCMAKE_BUILD_TYPE=RelWithDebugInfo \\ + -DCMAKE_CXX_FLAGS="\$CXXFLAGS" \\ + -DCMAKE_C_FLAGS="\$CFLAGS" \\ +- \${CMAKE_CROSSOPTS} ++ \${CMAKE_CROSSOPTS} \\ ++ . + make +-} +- +-check() { +- cd "\$builddir" +- CTEST_OUTPUT_ON_FAILURE=TRUE ctest + __EOF__ + } + +@@ -115,6 +111,12 @@ check_make() { + __EOF__ + } + ++check_cmake() { ++ cat >>APKBUILD<<__EOF__ ++ CTEST_OUTPUT_ON_FAILURE=TRUE ctest ++__EOF__ ++} ++ + check_python() { + cat >>APKBUILD<<__EOF__ + python3 setup.py test +@@ -193,7 +195,7 @@ newaport() { + python) makedepends="python3-dev";; + cmake) makedepends="cmake";; + meson) makedepends="meson";; +- *) makedepends="\$depends_dev";; ++ *) makedepends="";; + esac + + # Replace pkgver in $source +@@ -226,9 +228,15 @@ url="$url" + arch="all" + license="$license" + depends="$depends" +-depends_dev="" + makedepends="$makedepends" ++__EOF__ ++ if [ -n "$install" ]; then ++ cat >>APKBUILD<<__EOF__ + install="$install" ++__EOF__ ++ fi ++ ++ cat >>APKBUILD<<__EOF__ + subpackages="\$pkgname-dev \$pkgname-doc" + source="$source" + __EOF__ +@@ -241,7 +249,12 @@ __EOF__ + builddir=$(echo ${i#*/} | sed "s/$pv/\$pkgver/g") + fi + done +- printf 'builddir="$srcdir/%s"\n\n' "$builddir" >> APKBUILD ++ if [ -n "$sdir" ] && [ "$sdir" = "src/$pkgname-$pv" ]; then ++ # No builddir needed. ++ : ++ else ++ printf 'builddir="$srcdir/%s"\n\n' "$builddir" >> APKBUILD ++ fi + + # Subpackage -dev is usually required only for C/C++. Since depends_dev + # confuses a lot people, remove it if there's no .h or .hpp file. +@@ -271,7 +284,6 @@ __EOF__ + # Create build() function + cat >>APKBUILD<<__EOF__ + build() { +- cd "\$builddir" + __EOF__ + + case "$buildtype" in +@@ -287,6 +299,8 @@ __EOF__ + build_perl;; + python) + build_python;; ++ *) ++ printf '# Add build instructions here.' >> APKBUILD + esac + + cat >>APKBUILD<<__EOF__ +@@ -297,14 +311,17 @@ __EOF__ + # Create check() function + cat >>APKBUILD<<__EOF__ + check() { +- cd "\$builddir" + __EOF__ + + case "$buildtype" in +- make|cmake|autotools|perl) ++ make|autotools|perl) + check_make;; ++ cmake) ++ check_cmake;; + python) + check_python;; ++ *) ++ printf '# Add test instructions here.' >> APKBUILD + esac + + cat >>APKBUILD<<__EOF__ +@@ -315,7 +332,6 @@ __EOF__ + # Create package() function + cat >>APKBUILD<<__EOF__ + package() { +- cd "\$builddir" + __EOF__ + + case "$buildtype" in +@@ -329,6 +345,8 @@ __EOF__ + package_perl;; + python) + package_python;; ++ *) ++ printf '# Add packaging instructions here.' >> APKBUILD + esac + + if [ -n "$cpinitd" ]; then +-- +2.24.1 + +From 59cb9822c0ac347d58f1c37627a58fe14dce965d Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> +Date: Tue, 14 Jan 2020 04:47:36 -0600 +Subject: [PATCH 2/2] newapkbuild: Newline after source + +--- + newapkbuild.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/newapkbuild.in b/newapkbuild.in +index dbcef14..9c4ffbf 100644 +--- a/newapkbuild.in ++++ b/newapkbuild.in +@@ -251,7 +251,7 @@ __EOF__ + done + if [ -n "$sdir" ] && [ "$sdir" = "src/$pkgname-$pv" ]; then + # No builddir needed. +- : ++ printf '\n' >> APKBUILD + else + printf 'builddir="$srcdir/%s"\n\n' "$builddir" >> APKBUILD + fi +-- +2.24.1 + diff --git a/system/adelie-base/APKBUILD b/system/adelie-base/APKBUILD index 7ab59cbb5..04b100e69 100644 --- a/system/adelie-base/APKBUILD +++ b/system/adelie-base/APKBUILD @@ -1,8 +1,8 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=adelie-base -pkgver=0.9.3 -pkgrel=1 +pkgver=0.9.4 +pkgrel=0 pkgdesc="The Adélie Linux Base System" url="https://www.adelielinux.org/" arch="noarch" @@ -115,7 +115,7 @@ symbols() { return 0 } -sha512sums="a9690b20f90b94bda458e0570db55ce835e3d34ef04a3ea3f3d77e2d97483cecb940dbc3a1f2def72ff2589cc5b9cbe42ae38dc25d9b9ca25960a4832c87c7b4 adelie-base-0.9.3.tar.xz +sha512sums="37b8ee0d8f005077c69da72c9f4ca8afe4eacc25aed365992218f1b06b7946666e4060c958eb94bdebdba4b9fc2b4d165bf098ceb4f9f4cf544fb2935e1dd1a7 adelie-base-0.9.4.tar.xz 37260d9315fd8d8b0df3dfb5bd3e1035a47ba1e43f33aa195e3feca6d169da282c1b067ef4603e7e9acaedbfef8b58cf490c00bdca444d43c9d570355ad29eac group 3ee7ebe2ca762029fa1795471735922416a2ec7683774d107b38bcd7aeb8277046edeff0c26b1f1195739478e1e11fb7a51c55149cf79adab44ed217334b7013 passwd f2437ebfbc83aa6eaeec3a111aae98751215cebfaec3991ccc511be8c8938778ae46f15e07c7306bd431d036bc4ba49b33b724b839c125bd882d2e93c0314ae8 addgroup diff --git a/system/cmake/APKBUILD b/system/cmake/APKBUILD index c7cd896e6..e4ae8c5f8 100644 --- a/system/cmake/APKBUILD +++ b/system/cmake/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Valery Kartel <valery.kartel@gmail.com> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=cmake -pkgver=3.15.4 +pkgver=3.16.3 pkgrel=0 pkgdesc="Cross-platform build system" url="https://cmake.org" @@ -53,4 +53,4 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="4058b89d35d243146f4f521356d483a850cbade316b60cf896c90da5d6b6504bc35224c0702fa525d90fe97a5311c7a895466e5eb2edb4cd4306a3cc45182650 cmake-3.15.4.tar.gz" +sha512sums="ca9e0a142369735ef6469afb97f4463c981404bd59c7d48c1ef454dd705460a31a5dcffa4949b84b1ac723f5b7e79d67b250126fb42e1f15dab0ac2a17603672 cmake-3.16.3.tar.gz" diff --git a/system/curl/APKBUILD b/system/curl/APKBUILD index c65f14b60..8303e6d75 100644 --- a/system/curl/APKBUILD +++ b/system/curl/APKBUILD @@ -3,7 +3,7 @@ # Contributor: Łukasz Jendrysik <scadu@yandex.com> # Maintainer: pkgname=curl -pkgver=7.66.0 +pkgver=7.68.0 pkgrel=0 pkgdesc="A URL retrival utility and library" url="https://curl.haxx.se" @@ -110,4 +110,4 @@ libcurl() { mv "$pkgdir"/usr/lib "$subpkgdir"/usr } -sha512sums="81170e7e4fa9d99ee2038d96d7f2ab10dcf52435331c818c7565c1a733891720f845a08029915e52ba532c6a344c346e1678474624aac1cc333aea6d1eacde35 curl-7.66.0.tar.xz" +sha512sums="bf365609c9a66a05b3a263d02bcd3f81f905570c5739c8ec522a296b4b8e2a479d64d5524e8345e14eafad28995ee22d923522f1a45fa40eb46db38759c2eb2c curl-7.68.0.tar.xz" diff --git a/system/cxref/APKBUILD b/system/cxref/APKBUILD index eeea821be..f1bc75fb4 100644 --- a/system/cxref/APKBUILD +++ b/system/cxref/APKBUILD @@ -1,5 +1,5 @@ -# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> -# Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> +# Maintainer: Kiyoshi Aman <adelie@aerdan.vulpine.house> pkgname=cxref pkgver=1.6e pkgrel=0 diff --git a/system/dash/APKBUILD b/system/dash/APKBUILD index 04b81b17f..8abd44b65 100644 --- a/system/dash/APKBUILD +++ b/system/dash/APKBUILD @@ -1,5 +1,5 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> -# Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Maintainer: Kiyoshi Aman <adelie@aerdan.vulpine.house> pkgname=dash pkgver=0.5.10.2 pkgrel=0 diff --git a/system/file/APKBUILD b/system/file/APKBUILD index b1c337355..0e093ec4b 100644 --- a/system/file/APKBUILD +++ b/system/file/APKBUILD @@ -1,6 +1,6 @@ # Contributor: Valery Kartel <valery.kartel@gmail.com> # Contributor: Natanael Copa <ncopa@alpinelinux.org> -# Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Maintainer: Kiyoshi Aman <adelie@aerdan.vulpine.house> pkgname=file pkgver=5.37 pkgrel=0 diff --git a/system/gcc/202-ibm-ldbl.patch b/system/gcc/202-ibm-ldbl.patch new file mode 100644 index 000000000..bdf5c75d9 --- /dev/null +++ b/system/gcc/202-ibm-ldbl.patch @@ -0,0 +1,38 @@ +From 236634eed58fa6e00cc50f19e7202903a9d8fae6 Mon Sep 17 00:00:00 2001 +From: q66 <daniel@octaforge.org> +Date: Thu, 12 Dec 2019 04:03:56 +0100 +Subject: [PATCH] libgcc: use -mno-gnu-attribute for 128-bit IBM ldouble + support code + +Doing this will allow libgcc to emit the appropriate symbols without actually +emitting the FP ABI tag for them, which allows 64-bit long double environments +to function and even link statically while still allowing usage of +explicit __ibm128. +--- + libgcc/config/rs6000/t-ibm-ldouble | 2 +- + libgcc/config/rs6000/t-linux | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libgcc/config/rs6000/t-ibm-ldouble b/libgcc/config/rs6000/t-ibm-ldouble +index b132784..fb5eca8 100644 +--- a/libgcc/config/rs6000/t-ibm-ldouble ++++ b/libgcc/config/rs6000/t-ibm-ldouble +@@ -1,6 +1,6 @@ + # GCC 128-bit long double support routines. + LIB2ADD += $(srcdir)/config/rs6000/ibm-ldouble.c + +-HOST_LIBGCC2_CFLAGS += -mlong-double-128 ++HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-gnu-attribute + + SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ibm-ldouble.ver +diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux +index 4f6d4c4..fa93bb6 100644 +--- a/libgcc/config/rs6000/t-linux ++++ b/libgcc/config/rs6000/t-linux +@@ -1,3 +1,3 @@ + SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver + +-HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc ++HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-gnu-attribute -mno-minimal-toc +-- +2.24.0 diff --git a/system/gcc/APKBUILD b/system/gcc/APKBUILD index 5d5758528..32de06be4 100644 --- a/system/gcc/APKBUILD +++ b/system/gcc/APKBUILD @@ -6,7 +6,7 @@ pkgver=8.3.0 [ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target="" pkgname="$pkgname$_target" -pkgrel=1 +pkgrel=2 pkgdesc="The GNU Compiler Collection" url="https://gcc.gnu.org" arch="all" @@ -156,6 +156,7 @@ source="https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz 051_all_libiberty-pic.patch 201-ada.patch + 202-ibm-ldbl.patch 205-nopie.patch libgcc-always-build-gcceh.a.patch @@ -283,6 +284,8 @@ build() { echo " hash_style=$_hash_style" echo "" + export enable_libstdcxx_time=rt + mkdir -p "$_builddir" cd "$_builddir" "$_gccdir"/configure --prefix=/usr \ @@ -554,6 +557,7 @@ dfedf48829cff22ee836ece743de20ad467b40e86c8f4034326a4c32df35b10affd69d6b9ab3382d d35a3ac7e13a4446921a90e1ff3eec1079840c845f9d523c868e24ae21f94cf69ba041de5341ebef96432a6f57598e223381d4286e8fb8baaa25906707f29fbd 020_all_msgfmt-libstdc++-link.patch 0a0bc72b9366158f5d23fff1928e756fdd212433bac6ab1f00d632f241382820db8db5d475ddf11ea020eaf7e2e71b12fb9b1c3c870cf84adf6c2b16f15aabca 051_all_libiberty-pic.patch a3702c1f642412413d0ffc69f6439a3e101b2b56c16610f94c66556c88e52d01b0b6d1e57bfc5a972668f976c02fbf2fc22bcf707b000867e44744d9eb7b7566 201-ada.patch +152639228a189b211df660b5b7543e3744cf136e80fed7f1ac37a3bc1b692fba3431a0d62337e769ee8f323188acdf11092cb1b2ef5c75fafee9628d13bc4163 202-ibm-ldbl.patch 98473bcaa77903a223ca9b0d2087c0921b287a2816d308cc32c8fe009e6cbf5dd1ae7fba27794ab8d9c09e117fe534413d91a464d1218474fc123ce0adfdc2c1 205-nopie.patch d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2fa63850c50ae5eefd5f59e5910ec10d20044dac082182a8b libgcc-always-build-gcceh.a.patch 600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch diff --git a/system/gettext-tiny/APKBUILD b/system/gettext-tiny/APKBUILD index a2e541df5..702b85130 100644 --- a/system/gettext-tiny/APKBUILD +++ b/system/gettext-tiny/APKBUILD @@ -1,8 +1,8 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=gettext-tiny -pkgver=0.3.0_pre1 -pkgrel=7 +pkgver=0.3.1_git20191130 +pkgrel=1 pkgdesc="An internationalisation and localisation system" url="https://github.com/sabotage-linux/gettext-tiny" arch="all" @@ -12,13 +12,9 @@ depends="" makedepends="" subpackages="$pkgname-dev" source="https://distfiles.adelielinux.org/source/$pkgname-$pkgver.tar.xz - omg-i-cant-believe-im-doing-ua-crap.patch + line-length.patch respect-cflags.patch stop-doing-macro-crap.patch - cpp-compat.patch - double-stack-size.patch - m4-installation.patch - dynamic.patch " build() { @@ -29,11 +25,7 @@ package() { make LIBINTL=MUSL DESTDIR="$pkgdir" prefix=/usr install } -sha512sums="3795b9923f6820ce6e2c6a27480365a4ee1cb1f8f8916256887a40c8e0f0b582ada049a528330297f8daa1bff7d5877a15169095332456c57dc3fdb49407ef98 gettext-tiny-0.3.0_pre1.tar.xz -2951ad99fd04ee7d8dc06b4de575b7838e350737e3b40ecd93eae9f6f2b4c15883a392370e25dfaf834a57bc801721894e946d24910cfd65c44c2e025321ade4 omg-i-cant-believe-im-doing-ua-crap.patch -cea1596f3f20c8983e57d2e49e955a43ed2e261b244f6c4c2ae7d8b869e3cfce3bb87b0a17c16bdac59afd99703cef9c7ef4e93fca536bf1bf9aa5f9be9fa34f respect-cflags.patch -d2a1a6b1f135c25172cf98dfed64739ff85f6016a31c3ce028b3a7aa72de0b55c1f9a54c5ba2c58817f5222c3d2a5bc3d03ec9058ae5fbae2c798df9227a4e52 stop-doing-macro-crap.patch -0f1a1be10a038e6d30976f060c271e926f8f6b0541af7044f1b0ac2641825fc784ce3e3ff6ca13f3a5d15bbcd355a0999b60d4aa6f30c7b75254ca0edcaccc4d cpp-compat.patch -331bd0442b400407d690cce4a90aac09acf64e1a26f9951dc1d1332cc29916987d34cc13bc13e84482c6950908cedad50f6aaf325f99118d769bb1286dd4db1b double-stack-size.patch -090b685f6846b1cf4c266cbc982701283c7e30ddcbb1d3d263d50f83645ed168530db4bc03b6b688e46a32ac7ad09f0cd3f0e94f5c1a39e86d904f010353d91e m4-installation.patch -06ca61de36d41ad9545c7c60e54fe0fe77eb67bb4902679f2828e7a14ad01cfc244b7b136e31debbb60d9dc9b4101b4f0463d46f95c263939017fd38fbe31b19 dynamic.patch" +sha512sums="a318135626a0403a30a81fa475f7e1878b8af5a87053b0e00876c73b591508f3cf1e66d01f8d6a45013d1dc36a4da9f21fbf2b5050676826cb618b5b659aaaf7 gettext-tiny-0.3.1_git20191130.tar.xz +0a26a8481bffe2ce8c73f7f500963aea9db8379fb87849142d8efabf1656604b22f6ad345483256f14c388466f2f44e5924b9f65d88f26867a753a96d1529270 line-length.patch +b4e7db4e415f6bc31f2214f2044506ad18ea0bd3cae4200d93bbd34aa493c7478a7f953d0a7e08f29f0fd5a5d7b7cbfa2bcfd5692c37e423706a1c193239bf1d respect-cflags.patch +cd4cfc8cc6ea998f1e33ef666e3b9c3de3f3253994bccc942b177773c94f785e3892cb7d5f34bec1102dc7558236c07c5eac90e15d755e12ee06836336373526 stop-doing-macro-crap.patch" diff --git a/system/gettext-tiny/cpp-compat.patch b/system/gettext-tiny/cpp-compat.patch deleted file mode 100644 index e47c59695..000000000 --- a/system/gettext-tiny/cpp-compat.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- gettext-tiny-0.3.0_pre1/include/libintl.h.old 2018-06-21 19:55:29.646162973 -0500 -+++ gettext-tiny-0.3.0_pre1/include/libintl.h 2018-06-21 19:56:16.886116203 -0500 -@@ -1,6 +1,9 @@ - #ifndef LIBINTL_H - #define LIBINTL_H - -+#ifdef __cplusplus -+extern "C" { -+#endif - char *gettext(const char *msgid); - char *dgettext(const char *domainname, const char *msgid); - char *dcgettext(const char *domainname, const char *msgid, int category); -@@ -11,6 +14,9 @@ - char *textdomain(const char *domainname); - char *bind_textdomain_codeset(const char *domainname, const char *codeset); - char *bindtextdomain(const char *domainname, const char *dirname); -+#ifdef __cplusplus -+} -+#endif - - #undef gettext_noop - #define gettext_noop(X) X diff --git a/system/gettext-tiny/double-stack-size.patch b/system/gettext-tiny/double-stack-size.patch deleted file mode 100644 index 275f477e9..000000000 --- a/system/gettext-tiny/double-stack-size.patch +++ /dev/null @@ -1,20 +0,0 @@ -Seen in the Dzongkha translation of GConf 3.2.6: - - /bin/sh: line 1: 25453 Aborted /usr/bin/msgfmt -o $file dz.po - -This is what we expect to see having a short read of the line; the line in -question is 4,279 bytes long. - ---- gettext-tiny-0.3.0_pre1/src/msgfmt.c.old 2018-06-21 04:47:19.927932643 +0000 -+++ gettext-tiny-0.3.0_pre1/src/msgfmt.c 2018-07-12 01:23:59.250000000 +0000 -@@ -370,8 +370,8 @@ - - int process(FILE *in, FILE *out) { - struct mo_hdr mohdr = def_hdr; -- char line[4096]; char *lp; -- char convbuf[16384]; -+ char line[8448]; char *lp; -+ char convbuf[33792]; - - struct callbackdata d = { - .num = { diff --git a/system/gettext-tiny/dynamic.patch b/system/gettext-tiny/dynamic.patch deleted file mode 100644 index aa027d155..000000000 --- a/system/gettext-tiny/dynamic.patch +++ /dev/null @@ -1,18 +0,0 @@ -GDB/symbol splitting doesn't work on static binaries. - -For debugability, build dynamic. ---- gettext-tiny-0.3.0_pre1/Makefile.old 2018-07-25 23:41:05.120000000 +0000 -+++ gettext-tiny-0.3.0_pre1/Makefile 2018-07-25 23:42:51.350000000 +0000 -@@ -62,10 +62,10 @@ - $(RANLIB) $@ - - msgmerge: $(OBJS) -- $(CC) $(LDFLAGS) -static -o $@ src/msgmerge.o $(PARSEROBJS) -+ $(CC) $(LDFLAGS) -o $@ src/msgmerge.o $(PARSEROBJS) - - msgfmt: $(OBJS) -- $(CC) $(LDFLAGS) -static -o $@ src/msgfmt.o $(PARSEROBJS) -+ $(CC) $(LDFLAGS) -o $@ src/msgfmt.o $(PARSEROBJS) - - xgettext: - cp src/xgettext.sh ./xgettext diff --git a/system/gettext-tiny/line-length.patch b/system/gettext-tiny/line-length.patch new file mode 100644 index 000000000..0ba978197 --- /dev/null +++ b/system/gettext-tiny/line-length.patch @@ -0,0 +1,15 @@ +https://github.com/sabotage-linux/gettext-tiny/issues/50 + +We're losing the battle of the bulge; someone really should make this use malloc. + +--- gettext-tiny-0.3.1_git20191130/src/msgfmt.c.old 2020-01-14 08:03:11.000000000 +0000 ++++ gettext-tiny-0.3.1_git20191130/src/msgfmt.c 2020-01-21 18:58:28.257709860 +0000 +@@ -160,7 +160,7 @@ + + int process(FILE *in, FILE *out, bool strict) { + struct mo_hdr mohdr = def_hdr; +- char line[8192]; char *lp; ++ char line[12288]; char *lp; + size_t off, i; + enum po_error t; + char convbuf[32768]; diff --git a/system/gettext-tiny/m4-installation.patch b/system/gettext-tiny/m4-installation.patch deleted file mode 100644 index f55a03b08..000000000 --- a/system/gettext-tiny/m4-installation.patch +++ /dev/null @@ -1,149 +0,0 @@ -From 7698cca6d5634ce0de4bb382e0535e1f02d7fb17 Mon Sep 17 00:00:00 2001 -From: xhe <xw897002528@gmail.com> -Date: Sat, 14 Jul 2018 18:45:45 +0800 -Subject: [PATCH] install: symlink m4 files to $(dataroot)/aclocal follow - https://github.com/sabotage-linux/gettext-tiny/issues/27. - -According to @awilfox, GNU gettext will install m4 files to aclocal dir. -But gettext-tiny did not. So autoreconf just stops working and complains -that it can not find needed macros. - -Suggested by rofl0r, symlinking all m4 files into $(dataroot)/aclocal is -a good idea. Save a little disk space. ---- - Makefile | 22 ++++++++++++--------- - install.sh | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 80 insertions(+), 9 deletions(-) - create mode 100644 install.sh - -diff --git a/Makefile b/Makefile -index 7842c0f..927d02e 100644 ---- a/Makefile -+++ b/Makefile -@@ -3,7 +3,9 @@ bindir=$(prefix)/bin - includedir=$(prefix)/include - libdir=$(prefix)/lib - sysconfdir=$(prefix)/etc --datadir=$(prefix)/share/gettext-tiny -+datarootdir=$(prefix)/share -+datadir=$(datarootdir)/gettext-tiny -+acdir=$(datarootdir)/aclocal - - ifeq ($(LIBINTL), MUSL) - LIBSRC = libintl/libintl-musl.c -@@ -36,13 +38,15 @@ AR ?= $(CROSS_COMPILE)ar - RANLIB ?= $(CROSS_COMPILE)ranlib - CC ?= $(CROSS_COMPILE)cc - -+INSTALL ?= ./install.sh -+ - -include config.mak - - BUILDCFLAGS=$(CFLAGS) - - all: $(ALL_LIBS) $(ALL_TOOLS) - --install: $(ALL_LIBS:lib%=$(DESTDIR)$(libdir)/lib%) $(ALL_INCLUDES:%=$(DESTDIR)$(includedir)/%) $(ALL_TOOLS:%=$(DESTDIR)$(bindir)/%) $(ALL_M4S:%=$(DESTDIR)$(datadir)/%) $(ALL_DATA:%=$(DESTDIR)$(datadir)/%) -+install: $(ALL_LIBS:lib%=$(DESTDIR)$(libdir)/lib%) $(ALL_INCLUDES:%=$(DESTDIR)$(includedir)/%) $(ALL_TOOLS:%=$(DESTDIR)$(bindir)/%) $(ALL_M4S:%=$(DESTDIR)$(datadir)/%) $(ALL_M4S:%=$(DESTDIR)$(acdir)/%) $(ALL_DATA:%=$(DESTDIR)$(datadir)/%) - - clean: - rm -f $(ALL_LIBS) -@@ -70,18 +74,18 @@ autopoint: src/autopoint.in - cat $< | sed 's,@datadir@,$(datadir),' > $@ - - $(DESTDIR)$(libdir)/%.a: %.a -- install -D -m 755 $< $@ -+ $(INSTALL) -D -m 755 $< $@ - - $(DESTDIR)$(includedir)/%.h: include/%.h -- install -D -m 644 $< $@ -+ $(INSTALL) -D -m 644 $< $@ - - $(DESTDIR)$(bindir)/%: % -- install -D -m 755 $< $@ -+ $(INSTALL) -D -m 755 $< $@ - - $(DESTDIR)$(datadir)/%: % -- install -D -m 644 $< $@ -- --.PHONY: all clean install -- -+ $(INSTALL) -D -m 644 $< $@ - -+$(DESTDIR)$(acdir)/%: % -+ $(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(subst m4/,,$@) - -+.PHONY: all clean install -diff --git a/install.sh b/install.sh -new file mode 100755 -index 0000000..0410883 ---- /dev/null -+++ b/install.sh -@@ -0,0 +1,67 @@ -+#!/bin/sh -+# -+# Written by Rich Felker, originally as part of musl libc. -+# Multi-licensed under MIT, 0BSD, and CC0. -+# -+# This is an actually-safe install command which installs the new -+# file atomically in the new location, rather than overwriting -+# existing files. -+# -+ -+usage() { -+printf "usage: %s [-D] [-l] [-m mode] src dest\n" "$0" 1>&2 -+exit 1 -+} -+ -+mkdirp= -+symlink= -+mode=755 -+ -+while getopts Dlm: name ; do -+case "$name" in -+D) mkdirp=yes ;; -+l) symlink=yes ;; -+m) mode=$OPTARG ;; -+?) usage ;; -+esac -+done -+shift $(($OPTIND - 1)) -+ -+test "$#" -eq 2 || usage -+src=$1 -+dst=$2 -+tmp="$dst.tmp.$$" -+ -+case "$dst" in -+*/) printf "%s: %s ends in /\n", "$0" "$dst" 1>&2 ; exit 1 ;; -+esac -+ -+set -C -+set -e -+ -+if test "$mkdirp" ; then -+umask 022 -+case "$2" in -+*/*) mkdir -p "${dst%/*}" ;; -+esac -+fi -+ -+trap 'rm -f "$tmp"' EXIT INT QUIT TERM HUP -+ -+umask 077 -+ -+if test "$symlink" ; then -+ln -s "$1" "$tmp" -+else -+cat < "$1" > "$tmp" -+chmod "$mode" "$tmp" -+fi -+ -+mv -f "$tmp" "$2" -+test -d "$2" && { -+rm -f "$2/$tmp" -+printf "%s: %s is a directory\n" "$0" "$dst" 1>&2 -+exit 1 -+} -+ -+exit 0 diff --git a/system/gettext-tiny/omg-i-cant-believe-im-doing-ua-crap.patch b/system/gettext-tiny/omg-i-cant-believe-im-doing-ua-crap.patch deleted file mode 100644 index ced35e74b..000000000 --- a/system/gettext-tiny/omg-i-cant-believe-im-doing-ua-crap.patch +++ /dev/null @@ -1,18 +0,0 @@ -It turns out CMake requires the format to be: - -^msgmerge \(.*\) (gettext-version-number-here) - -So, this fixes CMake's test suite, and properly sets GETTEXT_VERSION_STRING -to be the same as the m4 scripts shipped. - ---- gettext-tiny-0.3.0_pre1/src/msgmerge.c.old 2018-06-20 23:47:19.927932643 -0500 -+++ gettext-tiny-0.3.0_pre1/src/msgmerge.c 2018-06-20 23:55:12.997464272 -0500 -@@ -18,7 +18,7 @@ - __attribute__((noreturn)) - static void version(void) { - fprintf(stdout, -- "these are not (GNU gettext-tools) 99.9999.9999\n"); -+ "msgmerge (GNU gettext-tools compatible) 99.9999.9999\n"); - exit(0); - } - diff --git a/system/gettext-tiny/respect-cflags.patch b/system/gettext-tiny/respect-cflags.patch index b949371c4..dd1cf3fe2 100644 --- a/system/gettext-tiny/respect-cflags.patch +++ b/system/gettext-tiny/respect-cflags.patch @@ -1,8 +1,8 @@ --- gettext-tiny-0.2.0/Makefile.old 2017-08-02 06:14:20.000000000 -0500 +++ gettext-tiny-0.2.0/Makefile 2018-06-16 21:21:57.148735892 -0500 -@@ -29,7 +29,7 @@ - ALL_TOOLS=msgfmt msgmerge xgettext autopoint +@@ -32,7 +32,7 @@ ALL_M4S=$(sort $(wildcard m4/*.m4)) + ALL_DATA=$(sort $(wildcard data/*)) -CFLAGS=-O0 -fPIC +CFLAGS ?= -O0 -fPIC diff --git a/system/gettext-tiny/stop-doing-macro-crap.patch b/system/gettext-tiny/stop-doing-macro-crap.patch index 8886b4eb5..277bc7ae7 100644 --- a/system/gettext-tiny/stop-doing-macro-crap.patch +++ b/system/gettext-tiny/stop-doing-macro-crap.patch @@ -1,6 +1,6 @@ --- gettext-tiny-0.2.0/include/libintl.h.old 2017-08-02 06:14:20.000000000 -0500 +++ gettext-tiny-0.2.0/include/libintl.h 2018-06-15 02:31:14.241446687 -0500 -@@ -15,14 +15,14 @@ +@@ -34,14 +34,14 @@ #undef gettext_noop #define gettext_noop(X) X diff --git a/system/git/APKBUILD b/system/git/APKBUILD index 07adcfdaa..0440b0f0b 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.24.1 +pkgver=2.25.0 pkgrel=0 pkgdesc="Distributed version control system" url="https://www.git-scm.com/" @@ -22,6 +22,7 @@ subpackages="$pkgname-doc $pkgname-gitweb $pkgname-subtree::noarch $pkgname-subtree-doc:subtree_doc:noarch + $pkgname-lang " replaces="git-perl perl-git" source="https://www.kernel.org/pub/software/scm/git/git-$pkgver.tar.xz @@ -50,7 +51,6 @@ _gitcoredir=/usr/libexec/git-core prepare() { default_prepare cat >> config.mak <<-EOF - NO_GETTEXT=YesPlease NO_SVN_TESTS=YesPlease NO_REGEX=YesPlease USE_ASCIIDOCTOR=1 @@ -173,7 +173,7 @@ subtree_doc() { gzip -9 "$subpkgdir"/usr/share/man/man1/git-subtree.1 } -sha512sums="010c13d4023c142876d0e075a394b74bef422944d8ca602325d0b2b47bf28b1d534283c7f295751113c83fdfcc0c91f97090e8f906560d44b04a94607fd8fcf7 git-2.24.1.tar.xz -315e4666c425b31a7f7a447e777cbf2a1050feac9b4d4b8a61c05248024e790d4d18f3336faf2a2c68584e05e8194c22a09e1caba1352cfec194e0bc01277a6c dont-test-other-encodings.patch +sha512sums="8bbada0451fe0a3314e1b9a43a74135115449aa41f5b3e7f960279e4a7fe6069c36e78825fc4b60d06806e3a6fa8158f327cb8a3801686ac22a35e3704244191 git-2.25.0.tar.xz +0a0935d876024d96156df3aeec06b47fd9e370484d4552786c450cb500ae671a631e64c30994ec39f43a2f313f75d68909688ea92b47327d1af65e365dc77480 dont-test-other-encodings.patch 89528cdd14c51fd568aa61cf6c5eae08ea0844e59f9af9292da5fc6c268261f4166017d002d494400945e248df6b844e2f9f9cd2d9345d516983f5a110e4c42a git-daemon.initd fbf1f425206a76e2a8f82342537ed939ff7e623d644c086ca2ced5f69b36734695f9f80ebda1728f75a94d6cd2fcb71bf845b64239368caab418e4d368c141ec git-daemon.confd" diff --git a/system/git/dont-test-other-encodings.patch b/system/git/dont-test-other-encodings.patch index 9019d4cab..7d176d57a 100644 --- a/system/git/dont-test-other-encodings.patch +++ b/system/git/dont-test-other-encodings.patch @@ -1,140 +1,5 @@ We can't support Japanese people using musl ---- git-2.14.1/t/t3900-i18n-commit.sh.old 2017-08-09 14:54:31.000000000 -0500 -+++ git-2.14.1/t/t3900-i18n-commit.sh 2017-09-10 21:10:09.269860087 -0500 -@@ -76,132 +76,4 @@ - test_i18ngrep "did not conform" "$HOME"/stderr - ' - --for H in ISO8859-1 eucJP ISO-2022-JP --do -- test_expect_success "$H setup" ' -- git config i18n.commitencoding $H && -- git checkout -b $H C0 && -- echo $H >F && -- git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt -- ' --done -- --for H in ISO8859-1 eucJP ISO-2022-JP --do -- test_expect_success "check encoding header for $H" ' -- E=$(git cat-file commit '$H' | sed -ne "s/^encoding //p") && -- test "z$E" = "z'$H'" -- ' --done -- --test_expect_success 'config to remove customization' ' -- git config --unset-all i18n.commitencoding && -- if Z=$(git config --get-all i18n.commitencoding) -- then -- echo Oops, should have failed. -- false -- else -- test z = "z$Z" -- fi && -- git config i18n.commitencoding UTF-8 --' -- --test_expect_success 'ISO8859-1 should be shown in UTF-8 now' ' -- compare_with ISO8859-1 "$TEST_DIRECTORY"/t3900/1-UTF-8.txt --' -- --for H in eucJP ISO-2022-JP --do -- test_expect_success "$H should be shown in UTF-8 now" ' -- compare_with '$H' "$TEST_DIRECTORY"/t3900/2-UTF-8.txt -- ' --done -- --test_expect_success 'config to add customization' ' -- git config --unset-all i18n.commitencoding && -- if Z=$(git config --get-all i18n.commitencoding) -- then -- echo Oops, should have failed. -- false -- else -- test z = "z$Z" -- fi --' -- --for H in ISO8859-1 eucJP ISO-2022-JP --do -- test_expect_success "$H should be shown in itself now" ' -- git config i18n.commitencoding '$H' && -- compare_with '$H' "$TEST_DIRECTORY"/t3900/'$H'.txt -- ' --done -- --test_expect_success 'config to tweak customization' ' -- git config i18n.logoutputencoding UTF-8 --' -- --test_expect_success 'ISO8859-1 should be shown in UTF-8 now' ' -- compare_with ISO8859-1 "$TEST_DIRECTORY"/t3900/1-UTF-8.txt --' -- --for H in eucJP ISO-2022-JP --do -- test_expect_success "$H should be shown in UTF-8 now" ' -- compare_with '$H' "$TEST_DIRECTORY"/t3900/2-UTF-8.txt -- ' --done -- --for J in eucJP ISO-2022-JP --do -- if test "$J" = ISO-2022-JP -- then -- ICONV=$J -- else -- ICONV= -- fi -- git config i18n.logoutputencoding $J -- for H in eucJP ISO-2022-JP -- do -- test_expect_success "$H should be shown in $J now" ' -- compare_with '$H' "$TEST_DIRECTORY"/t3900/'$J'.txt $ICONV -- ' -- done --done -- --for H in ISO8859-1 eucJP ISO-2022-JP --do -- test_expect_success "No conversion with $H" ' -- compare_with "--encoding=none '$H'" "$TEST_DIRECTORY"/t3900/'$H'.txt -- ' --done -- --test_commit_autosquash_flags () { -- H=$1 -- flag=$2 -- test_expect_success "commit --$flag with $H encoding" ' -- git config i18n.commitencoding $H && -- git checkout -b $H-$flag C0 && -- echo $H >>F && -- git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt && -- test_tick && -- echo intermediate stuff >>G && -- git add G && -- git commit -a -m "intermediate commit" && -- test_tick && -- echo $H $flag >>F && -- git commit -a --$flag HEAD~1 && -- E=$(git cat-file commit '$H-$flag' | -- sed -ne "s/^encoding //p") && -- test "z$E" = "z$H" && -- git config --unset-all i18n.commitencoding && -- git rebase --autosquash -i HEAD^^^ && -- git log --oneline >actual && -- test_line_count = 3 actual -- ' --} -- --test_commit_autosquash_flags eucJP fixup -- --test_commit_autosquash_flags ISO-2022-JP squash -- - test_done --- git-2.14.1/t/t5100-mailinfo.sh.old 2017-08-09 14:54:31.000000000 -0500 +++ git-2.14.1/t/t5100-mailinfo.sh 2017-09-10 23:26:39.206126739 -0500 @@ -27,6 +27,7 @@ diff --git a/system/mailx/APKBUILD b/system/mailx/APKBUILD index 846c4a08b..81322941b 100644 --- a/system/mailx/APKBUILD +++ b/system/mailx/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=mailx pkgver=12.4 -pkgrel=1 +pkgrel=2 pkgdesc="Send and receive Internet mail" url="http://heirloom.sourceforge.net/mailx.html" arch="all" @@ -14,16 +14,19 @@ subpackages="$pkgname-doc" source="https://downloads.sourceforge.net/heirloom/$pkgname-$pkgver.tar.bz2 Mail mailx-12.4-openssl.patch - mailx-12.4-cve.patch" + mailx-12.4-cve.patch + openssl-1.1.patch + sendmail.patch + " build() { - make PREFIX="/usr" SYSCONFDIR="/etc" STRIP=":" SENDMAIL="/usr/sbin/sendmail" \ + make PREFIX="/usr" SYSCONFDIR="/etc" STRIP=":" \ MAILSPOOL="/var/spool/mail" } package() { make DESTDIR="$pkgdir" PREFIX="/usr" SYSCONFDIR="/etc" STRIP=":" \ - UCBINSTALL="`command -v install`" SENDMAIL="/usr/sbin/sendmail" \ + UCBINSTALL="`command -v install`" \ MAILSPOOL="/var/spool/mail" install install -m 755 "$srcdir"/Mail "$pkgdir"/usr/bin/Mail } @@ -31,4 +34,6 @@ package() { sha512sums="a0e29972f552bd630ce1a14f70e61661815118520bcd4a00b6cad53f3270d3d08c835ff6982ba8800eb380a5b46f54eb6e60fb7533b5f41c916af45d29605af8 mailx-12.4.tar.bz2 8715bcdbcc5170f406df2a78dc9bac144c5d73eb90ba4832162cd3c5d72c938a32a86e622e64c7e786c05343a37d7b94245cc636511261d1d4f817def04087d2 Mail a74f85b5a4a9f9cd9a38e244498a11394c42189bbd0601656b6ed56fa55bf596820ef2f995c6878d322a1eca135bd1b1822467c4086adb849c81d65229845663 mailx-12.4-openssl.patch -1e77cd6ea251793ca48ae86b265580cd70fe33838b0b4e1f522af07f4f34bc909e1bab52dc0180516d44399c4227a54be7718c76ebbc4f886f372fdc5c19278f mailx-12.4-cve.patch" +1e77cd6ea251793ca48ae86b265580cd70fe33838b0b4e1f522af07f4f34bc909e1bab52dc0180516d44399c4227a54be7718c76ebbc4f886f372fdc5c19278f mailx-12.4-cve.patch +6b7cb06d13c6e213a403e6544fc73b1c3ea0a1dd96ef06ed3bb9f2b2519c1bc9a9e0510462c414ebe86a19e75dcdc1c634588036813136a16b7a3eccc24459e8 openssl-1.1.patch +0e7b7ed38546081df301123907cc12e2cd4b4c411da7976a5035239eecd1f6741a3faefdf6fdf1ed1b57afc1e58a9f24b0b5f3f129d78b3dfa9f9e5beda7d9b4 sendmail.patch" diff --git a/system/mailx/openssl-1.1.patch b/system/mailx/openssl-1.1.patch new file mode 100644 index 000000000..0c41ff1d6 --- /dev/null +++ b/system/mailx/openssl-1.1.patch @@ -0,0 +1,43 @@ +Remove EGD support no longer present in 1.1. + +Remove SSLv3 support. + +--- mailx-12.4/openssl.c.old 2020-01-15 02:20:57.711188031 +0000 ++++ mailx-12.4/openssl.c 2020-01-15 02:34:43.412879382 +0000 +@@ -130,15 +130,7 @@ + char *cp; + int state = 0; + +- if ((cp = value("ssl-rand-egd")) != NULL) { +- cp = expand(cp); +- if (RAND_egd(cp) == -1) { +- fprintf(stderr, catgets(catd, CATSET, 245, +- "entropy daemon at \"%s\" not available\n"), +- cp); +- } else +- state = 1; +- } else if ((cp = value("ssl-rand-file")) != NULL) { ++ if ((cp = value("ssl-rand-file")) != NULL) { + cp = expand(cp); + if (RAND_load_file(cp, 1024) == -1) { + fprintf(stderr, catgets(catd, CATSET, 246, +@@ -156,6 +148,8 @@ + } + state = 1; + } ++ } else { ++ RAND_poll(); + } + return state; + } +@@ -211,9 +205,7 @@ + + cp = ssl_method_string(uhp); + if (cp != NULL) { +- if (equal(cp, "ssl3")) +- method = SSLv3_client_method(); +- else if (equal(cp, "tls1")) ++ if (equal(cp, "tls1")) + method = TLSv1_client_method(); + else { + fprintf(stderr, catgets(catd, CATSET, 244, diff --git a/system/mailx/sendmail.patch b/system/mailx/sendmail.patch new file mode 100644 index 000000000..9be0fd0bd --- /dev/null +++ b/system/mailx/sendmail.patch @@ -0,0 +1,24 @@ +This patch additionally fixes the manpage. + +--- mailx-12.4/Makefile.old 2008-07-28 22:33:38.000000000 +0000 ++++ mailx-12.4/Makefile 2020-01-15 02:29:34.445930298 +0000 +@@ -13,7 +13,7 @@ + + MAILRC = $(SYSCONFDIR)/nail.rc + MAILSPOOL = /var/mail +-SENDMAIL = /usr/lib/sendmail ++SENDMAIL = /usr/sbin/sendmail + + DESTDIR = + +--- mailx-12.4/mailx.1.old 2020-01-15 02:20:57.711188031 +0000 ++++ mailx-12.4/mailx.1 2020-01-15 02:29:50.274237107 +0000 +@@ -4907,7 +4907,7 @@ + which just acts as a proxy. + .PP + \fIMailx\fR immediately contacts the SMTP server (or +-.IR \%/usr/lib/sendmail ) ++.IR \%/usr/sbin/sendmail ) + even when operating in + .I disconnected + mode. diff --git a/system/ncurses/APKBUILD b/system/ncurses/APKBUILD index 414283adf..5a28c9100 100644 --- a/system/ncurses/APKBUILD +++ b/system/ncurses/APKBUILD @@ -1,4 +1,4 @@ -# Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Maintainer: Kiyoshi Aman <adelie@aerdan.vulpine.house> pkgname=ncurses pkgver=6.1 _ver=${pkgver}-20190713 diff --git a/system/openssh/APKBUILD b/system/openssh/APKBUILD index 38d947585..10eee5514 100644 --- a/system/openssh/APKBUILD +++ b/system/openssh/APKBUILD @@ -136,7 +136,7 @@ server() { pkgdesc="OpenSSH server" depends="openssh-client openssh-keygen" replaces="openssh-server-common" - cd "$builddir" + install -d "$subpkgdir"/usr/sbin install -d "$subpkgdir"/etc/ssh mv "$pkgdir"/usr/sbin/sshd "$subpkgdir"/usr/sbin/ diff --git a/system/openssl/0003-use-termios.patch b/system/openssl/0003-use-termios.patch deleted file mode 100644 index 3312d1856..000000000 --- a/system/openssl/0003-use-termios.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 5caf1bdcdb56358c0ce38ef404fedbe323e66cb9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> -Date: Thu, 5 Feb 2015 08:40:32 +0200 -Subject: [PATCH] use termios - ---- - crypto/ui/ui_openssl.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/crypto/ui/ui_openssl.c b/crypto/ui/ui_openssl.c -index 8bda83c..a89b5f2 100644 ---- a/crypto/ui/ui_openssl.c -+++ b/crypto/ui/ui_openssl.c -@@ -224,6 +224,9 @@ - # undef SGTTY - #endif - -+#define TERMIOS -+#undef TERMIO -+ - #ifdef TERMIOS - # include <termios.h> - # define TTY_STRUCT struct termios --- -2.2.2 - diff --git a/system/openssl/0004-fix-default-ca-path-for-apps.patch b/system/openssl/0004-fix-default-ca-path-for-apps.patch deleted file mode 100644 index c2c53184a..000000000 --- a/system/openssl/0004-fix-default-ca-path-for-apps.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 09e6425ad6927a825b077af85c50b2fb04773757 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> -Date: Thu, 5 Feb 2015 08:52:05 +0200 -Subject: [PATCH] fix default ca path for apps - ---- - apps/s_server.c | 22 ++++++++++++++-------- - apps/s_time.c | 13 ++++++------- - 3 files changed, 26 insertions(+), 22 deletions(-) - -diff --git a/apps/s_server.c b/apps/s_server.c -index baa2455..2d5dc97 100644 ---- a/apps/s_server.c -+++ b/apps/s_server.c -@@ -1770,12 +1770,14 @@ int MAIN(int argc, char *argv[]) - } - #endif - -- if ((!SSL_CTX_load_verify_locations(ctx, CAfile, CApath)) || -- (!SSL_CTX_set_default_verify_paths(ctx))) { -- /* BIO_printf(bio_err,"X509_load_verify_locations\n"); */ -- ERR_print_errors(bio_err); -- /* goto end; */ -+ if (CAfile == NULL && CApath == NULL) { -+ if (!SSL_CTX_set_default_verify_paths(ctx)) -+ ERR_print_errors(bio_err); -+ } else { -+ if (!SSL_CTX_load_verify_locations(ctx, CAfile, CApath)) -+ ERR_print_errors(bio_err); - } -+ - if (vpm) - SSL_CTX_set1_param(ctx, vpm); - -@@ -1838,10 +1840,14 @@ int MAIN(int argc, char *argv[]) - else - SSL_CTX_sess_set_cache_size(ctx2, 128); - -- if ((!SSL_CTX_load_verify_locations(ctx2, CAfile, CApath)) || -- (!SSL_CTX_set_default_verify_paths(ctx2))) { -- ERR_print_errors(bio_err); -+ if (CAfile == NULL && CApath == NULL) { -+ if (!SSL_CTX_set_default_verify_paths(ctx2)) -+ ERR_print_errors(bio_err); -+ } else { -+ if (!SSL_CTX_load_verify_locations(ctx2, CAfile, CApath)) -+ ERR_print_errors(bio_err); - } -+ - if (vpm) - SSL_CTX_set1_param(ctx2, vpm); - -diff --git a/apps/s_time.c b/apps/s_time.c -index 5846f3a..c8f371a 100644 ---- a/apps/s_time.c -+++ b/apps/s_time.c -@@ -377,13 +377,12 @@ int MAIN(int argc, char **argv) - - SSL_load_error_strings(); - -- if ((!SSL_CTX_load_verify_locations(tm_ctx, CAfile, CApath)) || -- (!SSL_CTX_set_default_verify_paths(tm_ctx))) { -- /* -- * BIO_printf(bio_err,"error setting default verify locations\n"); -- */ -- ERR_print_errors(bio_err); -- /* goto end; */ -+ if (CAfile == NULL && CApath == NULL) { -+ if (!SSL_CTX_set_default_verify_paths(tm_ctx)) -+ ERR_print_errors(bio_err); -+ } else { -+ if (!SSL_CTX_load_verify_locations(tm_ctx, CAfile, CApath)) -+ ERR_print_errors(bio_err); - } - - if (tm_cipher == NULL) --- -2.2.2 - diff --git a/system/openssl/0005-fix-parallel-build.patch b/system/openssl/0005-fix-parallel-build.patch deleted file mode 100644 index 70073fd19..000000000 --- a/system/openssl/0005-fix-parallel-build.patch +++ /dev/null @@ -1,349 +0,0 @@ -diff -ru openssl-1.0.2a.orig/Makefile.org openssl-1.0.2a/Makefile.org ---- openssl-1.0.2d.orig/Makefile.org 2015-07-09 16:30:50.201986573 -0300 -+++ openssl-1.0.2d/Makefile.org 2015-07-09 16:30:50.201986573 -0300 -@@ -278,17 +278,17 @@ - build_libssl: build_ssl libssl.pc - - build_crypto: -- @dir=crypto; target=all; $(BUILD_ONE_CMD) -+ +@dir=crypto; target=all; $(BUILD_ONE_CMD) - build_ssl: build_crypto -- @dir=ssl; target=all; $(BUILD_ONE_CMD) -+ +@dir=ssl; target=all; $(BUILD_ONE_CMD) - build_engines: build_crypto -- @dir=engines; target=all; $(BUILD_ONE_CMD) -+ +@dir=engines; target=all; $(BUILD_ONE_CMD) - build_apps: build_libs -- @dir=apps; target=all; $(BUILD_ONE_CMD) -+ +@dir=apps; target=all; $(BUILD_ONE_CMD) - build_tests: build_libs -- @dir=test; target=all; $(BUILD_ONE_CMD) -+ +@dir=test; target=all; $(BUILD_ONE_CMD) - build_tools: build_libs -- @dir=tools; target=all; $(BUILD_ONE_CMD) -+ +@dir=tools; target=all; $(BUILD_ONE_CMD) - - all_testapps: build_libs build_testapps - build_testapps: -@@ -536,9 +536,9 @@ - dist_pem_h: - (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) - --install: all install_docs install_sw -+install: install_docs install_sw - --install_sw: -+install_dirs: - @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ - $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \ - $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \ -@@ -547,12 +547,19 @@ - $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ - $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \ - $(INSTALL_PREFIX)$(OPENSSLDIR)/private -+ @$(PERL) $(TOP)/util/mkdir-p.pl \ -+ $(INSTALL_PREFIX)$(MANDIR)/man1 \ -+ $(INSTALL_PREFIX)$(MANDIR)/man3 \ -+ $(INSTALL_PREFIX)$(MANDIR)/man5 \ -+ $(INSTALL_PREFIX)$(MANDIR)/man7 -+ -+install_sw: install_dirs - @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\ - do \ - (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ - done; -- @set -e; target=install; $(RECURSIVE_BUILD_CMD) -+ +@set -e; target=install; $(RECURSIVE_BUILD_CMD) - @set -e; liblist="$(LIBS)"; for i in $$liblist ;\ - do \ - if [ -f "$$i" ]; then \ -@@ -636,12 +643,7 @@ - done; \ - done - --install_docs: -- @$(PERL) $(TOP)/util/mkdir-p.pl \ -- $(INSTALL_PREFIX)$(MANDIR)/man1 \ -- $(INSTALL_PREFIX)$(MANDIR)/man3 \ -- $(INSTALL_PREFIX)$(MANDIR)/man5 \ -- $(INSTALL_PREFIX)$(MANDIR)/man7 -+install_docs: install_dirs - @pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \ - here="`pwd`"; \ - filecase=; \ -diff -ru openssl-1.0.2a.orig/Makefile.shared openssl-1.0.2a/Makefile.shared ---- openssl-1.0.2a.orig/Makefile.shared 2015-01-20 12:33:36.000000000 +0000 -+++ openssl-1.0.2a/Makefile.shared 2015-03-19 14:53:31.246908039 +0000 -@@ -105,6 +105,7 @@ - SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \ - LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \ - LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \ -+ [ -e $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX ] && exit 0; \ - LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \ - $${SHAREDCMD} $${SHAREDFLAGS} \ - -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \ -@@ -122,6 +123,7 @@ - done; \ - fi; \ - if [ -n "$$SHLIB_SOVER" ]; then \ -+ [ -e "$$SHLIB$$SHLIB_SUFFIX" ] || \ - ( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \ - ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \ - fi; \ -diff -ru openssl-1.0.2a.orig/crypto/Makefile openssl-1.0.2a/crypto/Makefile ---- openssl-1.0.2a.orig/crypto/Makefile 2015-03-19 13:31:02.000000000 +0000 -+++ openssl-1.0.2a/crypto/Makefile 2015-03-19 14:53:31.246908039 +0000 -@@ -85,11 +85,11 @@ - @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi - - subdirs: -- @target=all; $(RECURSIVE_MAKE) -+ +@target=all; $(RECURSIVE_MAKE) - - files: - $(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> $(TOP)/MINFO -- @target=files; $(RECURSIVE_MAKE) -+ +@target=files; $(RECURSIVE_MAKE) - - links: - @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER) -@@ -100,7 +100,7 @@ - # lib: $(LIB): are splitted to avoid end-less loop - lib: $(LIB) - @touch lib --$(LIB): $(LIBOBJ) -+$(LIB): $(LIBOBJ) | subdirs - $(AR) $(LIB) $(LIBOBJ) - test -z "$(FIPSLIBDIR)" || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o - $(RANLIB) $(LIB) || echo Never mind. -@@ -111,7 +111,7 @@ - fi - - libs: -- @target=lib; $(RECURSIVE_MAKE) -+ +@target=lib; $(RECURSIVE_MAKE) - - install: - @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... -@@ -120,7 +120,7 @@ - (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ - done; -- @target=install; $(RECURSIVE_MAKE) -+ +@target=install; $(RECURSIVE_MAKE) - - lint: - @target=lint; $(RECURSIVE_MAKE) -diff -ru openssl-1.0.2a.orig/engines/Makefile openssl-1.0.2a/engines/Makefile ---- openssl-1.0.2a.orig/engines/Makefile 2015-03-19 13:31:14.000000000 +0000 -+++ openssl-1.0.2a/engines/Makefile 2015-03-19 14:53:31.246908039 +0000 -@@ -72,7 +72,7 @@ - - all: lib subdirs - --lib: $(LIBOBJ) -+lib: $(LIBOBJ) | subdirs - @if [ -n "$(SHARED_LIBS)" ]; then \ - set -e; \ - for l in $(LIBNAMES); do \ -@@ -89,7 +89,7 @@ - - subdirs: - echo $(EDIRS) -- @target=all; $(RECURSIVE_MAKE) -+ +@target=all; $(RECURSIVE_MAKE) - - files: - $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO -@@ -128,7 +128,7 @@ - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \ - done; \ - fi -- @target=install; $(RECURSIVE_MAKE) -+ +@target=install; $(RECURSIVE_MAKE) - - tags: - ctags $(SRC) -diff -ru openssl-1.0.2a.orig/test/Makefile openssl-1.0.2a/test/Makefile ---- openssl-1.0.2a.orig/test/Makefile 2015-03-19 13:31:16.000000000 +0000 -+++ openssl-1.0.2a/test/Makefile 2015-03-19 14:55:44.146017128 +0000 -@@ -133,7 +133,7 @@ - tags: - ctags $(SRC) - --tests: exe apps $(TESTS) -+tests: exe $(TESTS) - - apps: - @(cd ..; $(MAKE) DIRS=apps all) -@@ -402,121 +402,121 @@ - link_app.$${shlib_target} - - $(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO) -- @target=$(RSATEST); $(BUILD_CMD) -+ +@target=$(RSATEST); $(BUILD_CMD) - - $(BNTEST)$(EXE_EXT): $(BNTEST).o $(DLIBCRYPTO) -- @target=$(BNTEST); $(BUILD_CMD) -+ +@target=$(BNTEST); $(BUILD_CMD) - - $(ECTEST)$(EXE_EXT): $(ECTEST).o $(DLIBCRYPTO) -- @target=$(ECTEST); $(BUILD_CMD) -+ +@target=$(ECTEST); $(BUILD_CMD) - - $(EXPTEST)$(EXE_EXT): $(EXPTEST).o $(DLIBCRYPTO) -- @target=$(EXPTEST); $(BUILD_CMD) -+ +@target=$(EXPTEST); $(BUILD_CMD) - - $(IDEATEST)$(EXE_EXT): $(IDEATEST).o $(DLIBCRYPTO) -- @target=$(IDEATEST); $(BUILD_CMD) -+ +@target=$(IDEATEST); $(BUILD_CMD) - - $(MD2TEST)$(EXE_EXT): $(MD2TEST).o $(DLIBCRYPTO) -- @target=$(MD2TEST); $(BUILD_CMD) -+ +@target=$(MD2TEST); $(BUILD_CMD) - - $(SHATEST)$(EXE_EXT): $(SHATEST).o $(DLIBCRYPTO) -- @target=$(SHATEST); $(BUILD_CMD) -+ +@target=$(SHATEST); $(BUILD_CMD) - - $(SHA1TEST)$(EXE_EXT): $(SHA1TEST).o $(DLIBCRYPTO) -- @target=$(SHA1TEST); $(BUILD_CMD) -+ +@target=$(SHA1TEST); $(BUILD_CMD) - - $(SHA256TEST)$(EXE_EXT): $(SHA256TEST).o $(DLIBCRYPTO) -- @target=$(SHA256TEST); $(BUILD_CMD) -+ +@target=$(SHA256TEST); $(BUILD_CMD) - - $(SHA512TEST)$(EXE_EXT): $(SHA512TEST).o $(DLIBCRYPTO) -- @target=$(SHA512TEST); $(BUILD_CMD) -+ +@target=$(SHA512TEST); $(BUILD_CMD) - - $(RMDTEST)$(EXE_EXT): $(RMDTEST).o $(DLIBCRYPTO) -- @target=$(RMDTEST); $(BUILD_CMD) -+ +@target=$(RMDTEST); $(BUILD_CMD) - - $(MDC2TEST)$(EXE_EXT): $(MDC2TEST).o $(DLIBCRYPTO) -- @target=$(MDC2TEST); $(BUILD_CMD) -+ +@target=$(MDC2TEST); $(BUILD_CMD) - - $(MD4TEST)$(EXE_EXT): $(MD4TEST).o $(DLIBCRYPTO) -- @target=$(MD4TEST); $(BUILD_CMD) -+ +@target=$(MD4TEST); $(BUILD_CMD) - - $(MD5TEST)$(EXE_EXT): $(MD5TEST).o $(DLIBCRYPTO) -- @target=$(MD5TEST); $(BUILD_CMD) -+ +@target=$(MD5TEST); $(BUILD_CMD) - - $(HMACTEST)$(EXE_EXT): $(HMACTEST).o $(DLIBCRYPTO) -- @target=$(HMACTEST); $(BUILD_CMD) -+ +@target=$(HMACTEST); $(BUILD_CMD) - - $(WPTEST)$(EXE_EXT): $(WPTEST).o $(DLIBCRYPTO) -- @target=$(WPTEST); $(BUILD_CMD) -+ +@target=$(WPTEST); $(BUILD_CMD) - - $(RC2TEST)$(EXE_EXT): $(RC2TEST).o $(DLIBCRYPTO) -- @target=$(RC2TEST); $(BUILD_CMD) -+ +@target=$(RC2TEST); $(BUILD_CMD) - - $(BFTEST)$(EXE_EXT): $(BFTEST).o $(DLIBCRYPTO) -- @target=$(BFTEST); $(BUILD_CMD) -+ +@target=$(BFTEST); $(BUILD_CMD) - - $(CASTTEST)$(EXE_EXT): $(CASTTEST).o $(DLIBCRYPTO) -- @target=$(CASTTEST); $(BUILD_CMD) -+ +@target=$(CASTTEST); $(BUILD_CMD) - - $(RC4TEST)$(EXE_EXT): $(RC4TEST).o $(DLIBCRYPTO) -- @target=$(RC4TEST); $(BUILD_CMD) -+ +@target=$(RC4TEST); $(BUILD_CMD) - - $(RC5TEST)$(EXE_EXT): $(RC5TEST).o $(DLIBCRYPTO) -- @target=$(RC5TEST); $(BUILD_CMD) -+ +@target=$(RC5TEST); $(BUILD_CMD) - - $(DESTEST)$(EXE_EXT): $(DESTEST).o $(DLIBCRYPTO) -- @target=$(DESTEST); $(BUILD_CMD) -+ +@target=$(DESTEST); $(BUILD_CMD) - - $(RANDTEST)$(EXE_EXT): $(RANDTEST).o $(DLIBCRYPTO) -- @target=$(RANDTEST); $(BUILD_CMD) -+ +@target=$(RANDTEST); $(BUILD_CMD) - - $(DHTEST)$(EXE_EXT): $(DHTEST).o $(DLIBCRYPTO) -- @target=$(DHTEST); $(BUILD_CMD) -+ +@target=$(DHTEST); $(BUILD_CMD) - - $(DSATEST)$(EXE_EXT): $(DSATEST).o $(DLIBCRYPTO) -- @target=$(DSATEST); $(BUILD_CMD) -+ +@target=$(DSATEST); $(BUILD_CMD) - - $(METHTEST)$(EXE_EXT): $(METHTEST).o $(DLIBCRYPTO) -- @target=$(METHTEST); $(BUILD_CMD) -+ +@target=$(METHTEST); $(BUILD_CMD) - - $(SSLTEST)$(EXE_EXT): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) -- @target=$(SSLTEST); $(FIPS_BUILD_CMD) -+ +@target=$(SSLTEST); $(FIPS_BUILD_CMD) - - $(ENGINETEST)$(EXE_EXT): $(ENGINETEST).o $(DLIBCRYPTO) -- @target=$(ENGINETEST); $(BUILD_CMD) -+ +@target=$(ENGINETEST); $(BUILD_CMD) - - $(EVPTEST)$(EXE_EXT): $(EVPTEST).o $(DLIBCRYPTO) -- @target=$(EVPTEST); $(BUILD_CMD) -+ +@target=$(EVPTEST); $(BUILD_CMD) - - $(EVPEXTRATEST)$(EXE_EXT): $(EVPEXTRATEST).o $(DLIBCRYPTO) -- @target=$(EVPEXTRATEST); $(BUILD_CMD) -+ +@target=$(EVPEXTRATEST); $(BUILD_CMD) - - $(ECDSATEST)$(EXE_EXT): $(ECDSATEST).o $(DLIBCRYPTO) -- @target=$(ECDSATEST); $(BUILD_CMD) -+ +@target=$(ECDSATEST); $(BUILD_CMD) - - $(ECDHTEST)$(EXE_EXT): $(ECDHTEST).o $(DLIBCRYPTO) -- @target=$(ECDHTEST); $(BUILD_CMD) -+ +@target=$(ECDHTEST); $(BUILD_CMD) - - $(IGETEST)$(EXE_EXT): $(IGETEST).o $(DLIBCRYPTO) -- @target=$(IGETEST); $(BUILD_CMD) -+ +@target=$(IGETEST); $(BUILD_CMD) - - $(JPAKETEST)$(EXE_EXT): $(JPAKETEST).o $(DLIBCRYPTO) -- @target=$(JPAKETEST); $(BUILD_CMD) -+ +@target=$(JPAKETEST); $(BUILD_CMD) - - $(ASN1TEST)$(EXE_EXT): $(ASN1TEST).o $(DLIBCRYPTO) -- @target=$(ASN1TEST); $(BUILD_CMD) -+ +@target=$(ASN1TEST); $(BUILD_CMD) - - $(SRPTEST)$(EXE_EXT): $(SRPTEST).o $(DLIBCRYPTO) -- @target=$(SRPTEST); $(BUILD_CMD) -+ +@target=$(SRPTEST); $(BUILD_CMD) - - $(V3NAMETEST)$(EXE_EXT): $(V3NAMETEST).o $(DLIBCRYPTO) -- @target=$(V3NAMETEST); $(BUILD_CMD) -+ +@target=$(V3NAMETEST); $(BUILD_CMD) - - $(HEARTBEATTEST)$(EXE_EXT): $(HEARTBEATTEST).o $(DLIBCRYPTO) -- @target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC) -+ +@target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC) - - $(CONSTTIMETEST)$(EXE_EXT): $(CONSTTIMETEST).o -- @target=$(CONSTTIMETEST) $(BUILD_CMD) -+ +@target=$(CONSTTIMETEST) $(BUILD_CMD) - - #$(AESTEST).o: $(AESTEST).c - # $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c -@@ -529,7 +529,7 @@ - # fi - - dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO) -- @target=dummytest; $(BUILD_CMD) -+ +@target=dummytest; $(BUILD_CMD) - - # DO NOT DELETE THIS LINE -- make depend depends on it. - diff --git a/system/openssl/0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch b/system/openssl/0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch deleted file mode 100644 index daa6df02f..000000000 --- a/system/openssl/0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 4785c095dbfb3630ddf6685f23e3a19c7c804cbc Mon Sep 17 00:00:00 2001 -From: William Pitcock <nenolod@dereferenced.org> -Date: Thu, 5 Feb 2015 09:02:00 +0200 -Subject: [PATCH] add ircv3 tls-3.1 extension support to s_client - ---- - apps/s_client.c | 24 ++++++++++++++++++++++-- - 1 file changed, 22 insertions(+), 2 deletions(-) - -diff --git a/apps/s_client.c b/apps/s_client.c -index 8aee02a..0a28b89 100644 ---- a/apps/s_client.c -+++ b/apps/s_client.c -@@ -401,7 +401,7 @@ static void sc_usage(void) - BIO_printf(bio_err, - " 'prot' defines which one to assume. Currently,\n"); - BIO_printf(bio_err, -- " only \"smtp\", \"pop3\", \"imap\", \"ftp\" and \"xmpp\"\n"); -+ " only \"smtp\", \"pop3\", \"imap\", \"ftp\", \"xmpp\" and \"ircv3\"\n"); - BIO_printf(bio_err, " are supported.\n"); - #ifndef OPENSSL_NO_ENGINE - BIO_printf(bio_err, -@@ -640,7 +640,8 @@ enum { - PROTO_POP3, - PROTO_IMAP, - PROTO_FTP, -- PROTO_XMPP -+ PROTO_XMPP, -+ PROTO_IRCV3, - }; - - int MAIN(int, char **); -@@ -1062,6 +1063,8 @@ int MAIN(int argc, char **argv) - starttls_proto = PROTO_FTP; - else if (strcmp(*argv, "xmpp") == 0) - starttls_proto = PROTO_XMPP; -+ else if (strcmp(*argv, "ircv3") == 0) -+ starttls_proto = PROTO_IRCV3; - else - goto bad; - } -@@ -1646,6 +1649,23 @@ int MAIN(int argc, char **argv) - goto shut; - mbuf[0] = 0; - } -+ if (starttls_proto == PROTO_IRCV3) { -+ int seen = 0; -+ BIO_printf(sbio,"CAP REQ :tls\r\n"); -+ -+ while (!strstr(mbuf,"CAP")) { -+ seen = BIO_read(sbio,mbuf,BUFSIZZ); -+ mbuf[seen] = 0; -+ } -+ if (!strstr(mbuf,"ACK")) -+ goto shut; -+ BIO_printf(sbio,"CAP END\r\nSTARTTLS\r\n"); -+ while (!strstr(sbuf, "670")) { -+ seen = BIO_read(sbio,sbuf,BUFSIZZ); -+ sbuf[seen] = 0; -+ } -+ mbuf[0] = 0; -+ } - - for (;;) { - FD_ZERO(&readfds); --- -2.2.2 - diff --git a/system/openssl/0008-maintain-abi-compat-with-no-freelist-and-regular-bui.patch b/system/openssl/0008-maintain-abi-compat-with-no-freelist-and-regular-bui.patch deleted file mode 100644 index ff3d25eff..000000000 --- a/system/openssl/0008-maintain-abi-compat-with-no-freelist-and-regular-bui.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 7457e26d3a78c7cd923242d87d04febadddea086 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> -Date: Thu, 5 Feb 2015 10:06:31 +0200 -Subject: [PATCH] maintain abi compat with no-freelist and regular build - ---- - ssl/ssl.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/ssl/ssl.h b/ssl/ssl.h -index 2b0f662..636cb5d 100644 ---- a/ssl/ssl.h -+++ b/ssl/ssl.h -@@ -1113,6 +1113,10 @@ struct ssl_ctx_st { - unsigned int freelist_max_len; - struct ssl3_buf_freelist_st *wbuf_freelist; - struct ssl3_buf_freelist_st *rbuf_freelist; -+# else -+ unsigned int freelist_dummy0; -+ void *freelist_dummy1; -+ void *freelist_dummy2; - # endif - # ifndef OPENSSL_NO_SRP - SRP_CTX srp_ctx; /* ctx for SRP authentication */ --- -2.2.2 - diff --git a/system/openssl/0009-no-rpath.patch b/system/openssl/0009-no-rpath.patch deleted file mode 100644 index 56df75b79..000000000 --- a/system/openssl/0009-no-rpath.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.shared 2005-06-23 22:47:54.000000000 +0200 -+++ b/Makefile.shared 2005-11-16 22:35:37.000000000 +0100 -@@ -153,7 +153,7 @@ - NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ - SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" - --DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)" -+DO_GNU_APP=LDFLAGS="$(CFLAGS)" - - #This is rather special. It's a special target with which one can link - #applications without bothering with any features that have anything to diff --git a/system/openssl/0010-ssl-env-zlib.patch b/system/openssl/0010-ssl-env-zlib.patch deleted file mode 100644 index 9eae15d72..000000000 --- a/system/openssl/0010-ssl-env-zlib.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -ru openssl-1.0.2a.orig/doc/ssl/SSL_COMP_add_compression_method.pod openssl-1.0.2a/doc/ssl/SSL_COMP_add_compression_method.pod ---- openssl-1.0.2a.orig/doc/ssl/SSL_COMP_add_compression_method.pod 2015-01-15 16:43:14.000000000 -0200 -+++ openssl-1.0.2a/doc/ssl/SSL_COMP_add_compression_method.pod 2015-03-27 15:18:47.280054883 -0200 -@@ -47,6 +47,13 @@ - been standardized, the compression API will most likely be changed. Using - it in the current state is not recommended. - -+It is also not recommended to use compression if data transfered contain -+untrusted parts that can be manipulated by an attacker as he could then -+get information about the encrypted data. See the CRIME attack. For -+that reason the default loading of the zlib compression method is -+disabled and enabled only if the environment variable B<OPENSSL_DEFAULT_ZLIB> -+is present during the library initialization. -+ - =head1 RETURN VALUES - - SSL_COMP_add_compression_method() may return the following values: -diff -ru openssl-1.0.2a.orig/ssl/ssl_ciph.c openssl-1.0.2a/ssl/ssl_ciph.c ---- openssl-1.0.2a.orig/ssl/ssl_ciph.c 2015-03-19 15:30:36.000000000 -0200 -+++ openssl-1.0.2a/ssl/ssl_ciph.c 2015-03-27 15:23:05.960057092 -0200 -@@ -141,6 +141,8 @@ - */ - - #include <stdio.h> -+#include <stdlib.h> -+#include <sys/auxv.h> - #include <openssl/objects.h> - #ifndef OPENSSL_NO_COMP - # include <openssl/comp.h> -@@ -481,7 +483,7 @@ - - MemCheck_off(); - ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp); -- if (ssl_comp_methods != NULL) { -+ if (ssl_comp_methods != NULL && getauxval(AT_SECURE) == 0 && getenv("OPENSSL_DEFAULT_ZLIB") != NULL) { - comp = (SSL_COMP *)OPENSSL_malloc(sizeof(SSL_COMP)); - if (comp != NULL) { - comp->method = COMP_zlib(); diff --git a/system/openssl/1001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch b/system/openssl/1001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch deleted file mode 100644 index ef46faa84..000000000 --- a/system/openssl/1001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 83c96cbc76604daccbc31cea9411555aea96fd6d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> -Date: Thu, 5 Feb 2015 09:16:51 +0200 -Subject: [PATCH] crypto/hmac: support EVP_MD_CTX_FLAG_ONESHOT and set it - properly - -Some engines (namely VIA C7 Padlock) work only if EVP_MD_CTX_FLAG_ONESHOT -is set before final update. This is because some crypto accelerators cannot -perform non-finalizing transform of the digest. - -The usage of EVP_MD_CTX_FLAG_ONESHOT is used semantically slightly -differently here. It is set before the final EVP_DigestUpdate call, not -necessarily before EVP_DigestInit call. This will not cause any problems -though. ---- - crypto/hmac/hmac.c | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c -index 1fc9e2c..6f16578 100644 ---- a/crypto/hmac/hmac.c -+++ b/crypto/hmac/hmac.c -@@ -109,7 +109,8 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, - j = EVP_MD_block_size(md); - OPENSSL_assert(j <= (int)sizeof(ctx->key)); - if (j < len) { -- if (!EVP_DigestInit_ex(&ctx->md_ctx, md, impl)) -+ EVP_MD_CTX_set_flags(&ctx->md_ctx, EVP_MD_CTX_FLAG_ONESHOT); -+ if (!EVP_DigestInit_ex(&ctx->md_ctx, md, impl)) - goto err; - if (!EVP_DigestUpdate(&ctx->md_ctx, key, len)) - goto err; -@@ -129,6 +130,7 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, - if (reset) { - for (i = 0; i < HMAC_MAX_MD_CBLOCK; i++) - pad[i] = 0x36 ^ ctx->key[i]; -+ EVP_MD_CTX_clear_flags(&ctx->i_ctx, EVP_MD_CTX_FLAG_ONESHOT); - if (!EVP_DigestInit_ex(&ctx->i_ctx, md, impl)) - goto err; - if (!EVP_DigestUpdate(&ctx->i_ctx, pad, EVP_MD_block_size(md))) -@@ -136,6 +138,7 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, - - for (i = 0; i < HMAC_MAX_MD_CBLOCK; i++) - pad[i] = 0x5c ^ ctx->key[i]; -+ EVP_MD_CTX_clear_flags(&ctx->o_ctx, EVP_MD_CTX_FLAG_ONESHOT); - if (!EVP_DigestInit_ex(&ctx->o_ctx, md, impl)) - goto err; - if (!EVP_DigestUpdate(&ctx->o_ctx, pad, EVP_MD_block_size(md))) -@@ -143,6 +146,7 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, - } - if (!EVP_MD_CTX_copy_ex(&ctx->md_ctx, &ctx->i_ctx)) - goto err; -+ EVP_MD_CTX_clear_flags(&ctx->md_ctx, EVP_MD_CTX_FLAG_ONESHOT); - return 1; - err: - return 0; -@@ -177,6 +181,7 @@ int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len) - goto err; - if (!EVP_MD_CTX_copy_ex(&ctx->md_ctx, &ctx->o_ctx)) - goto err; -+ EVP_MD_CTX_set_flags(&ctx->md_ctx,EVP_MD_CTX_FLAG_ONESHOT); - if (!EVP_DigestUpdate(&ctx->md_ctx, buf, i)) - goto err; - if (!EVP_DigestFinal_ex(&ctx->md_ctx, md, len)) -@@ -233,8 +238,9 @@ unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, - if (md == NULL) - md = m; - HMAC_CTX_init(&c); -- if (!HMAC_Init(&c, key, key_len, evp_md)) -+ if (!HMAC_Init_ex(&c, key, key_len, evp_md, NULL)) - goto err; -+ HMAC_CTX_set_flags(&c,EVP_MD_CTX_FLAG_ONESHOT); - if (!HMAC_Update(&c, d, n)) - goto err; - if (!HMAC_Final(&c, md, md_len)) -@@ -247,7 +253,7 @@ unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, - - void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags) - { -- EVP_MD_CTX_set_flags(&ctx->i_ctx, flags); -- EVP_MD_CTX_set_flags(&ctx->o_ctx, flags); -+ EVP_MD_CTX_set_flags(&ctx->i_ctx, flags & ~EVP_MD_CTX_FLAG_ONESHOT); -+ EVP_MD_CTX_set_flags(&ctx->o_ctx, flags & ~EVP_MD_CTX_FLAG_ONESHOT); - EVP_MD_CTX_set_flags(&ctx->md_ctx, flags); - } --- -2.2.2 - diff --git a/system/openssl/1002-backport-changes-from-upstream-padlock-module.patch b/system/openssl/1002-backport-changes-from-upstream-padlock-module.patch deleted file mode 100644 index f63bbcd1c..000000000 --- a/system/openssl/1002-backport-changes-from-upstream-padlock-module.patch +++ /dev/null @@ -1,200 +0,0 @@ -From ba17588a940ee712c3ef6d458adb1087f0c84521 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> -Date: Thu, 5 Feb 2015 09:28:10 +0200 -Subject: [PATCH] backport changes from upstream padlock module. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Includes support for VIA Nano 64-bit mode. - -Signed-off-by: Timo Teräs <timo.teras@iki.fi> ---- - engines/e_padlock.c | 142 +++++++++++++++++++++++++++++++++++++++++++++------- - 1 file changed, 125 insertions(+), 17 deletions(-) - -diff --git a/engines/e_padlock.c b/engines/e_padlock.c -index 2898e4c..94406cb 100644 ---- a/engines/e_padlock.c -+++ b/engines/e_padlock.c -@@ -101,7 +101,10 @@ - */ - # undef COMPILE_HW_PADLOCK - # if !defined(I386_ONLY) && !defined(OPENSSL_NO_INLINE_ASM) --# if (defined(__GNUC__) && (defined(__i386__) || defined(__i386))) || \ -+# if (defined(__GNUC__) && __GNUC__>=2 && \ -+ (defined(__i386__) || defined(__i386) || \ -+ defined(__x86_64__) || defined(__x86_64)) \ -+ ) || \ - (defined(_MSC_VER) && defined(_M_IX86)) - # define COMPILE_HW_PADLOCK - # endif -@@ -303,6 +306,7 @@ static volatile struct padlock_cipher_data *padlock_saved_context; - * ======================================================= - */ - # if defined(__GNUC__) && __GNUC__>=2 -+# if defined(__i386__) || defined(__i386) - /* - * As for excessive "push %ebx"/"pop %ebx" found all over. - * When generating position-independent code GCC won't let -@@ -379,22 +383,6 @@ static int padlock_available(void) - return padlock_use_ace + padlock_use_rng; - } - --# ifndef OPENSSL_NO_AES --# ifndef AES_ASM --/* Our own htonl()/ntohl() */ --static inline void padlock_bswapl(AES_KEY *ks) --{ -- size_t i = sizeof(ks->rd_key) / sizeof(ks->rd_key[0]); -- unsigned int *key = ks->rd_key; -- -- while (i--) { -- asm volatile ("bswapl %0":"+r" (*key)); -- key++; -- } --} --# endif --# endif -- - /* - * Force key reload from memory to the CPU microcode. Loading EFLAGS from the - * stack clears EFLAGS[30] which does the trick. -@@ -448,6 +436,110 @@ static inline void *name(size_t cnt, \ - : "edx", "cc", "memory"); \ - return iv; \ - } -+#endif -+ -+#elif defined(__x86_64__) || defined(__x86_64) -+ -+/* Load supported features of the CPU to see if -+ the PadLock is available. */ -+static int -+padlock_available(void) -+{ -+ char vendor_string[16]; -+ unsigned int eax, edx; -+ -+ /* Are we running on the Centaur (VIA) CPU? */ -+ eax = 0x00000000; -+ vendor_string[12] = 0; -+ asm volatile ( -+ "cpuid\n" -+ "movl %%ebx,(%1)\n" -+ "movl %%edx,4(%1)\n" -+ "movl %%ecx,8(%1)\n" -+ : "+a"(eax) : "r"(vendor_string) : "rbx", "rcx", "rdx"); -+ if (strcmp(vendor_string, "CentaurHauls") != 0) -+ return 0; -+ -+ /* Check for Centaur Extended Feature Flags presence */ -+ eax = 0xC0000000; -+ asm volatile ("cpuid" -+ : "+a"(eax) : : "rbx", "rcx", "rdx"); -+ if (eax < 0xC0000001) -+ return 0; -+ -+ /* Read the Centaur Extended Feature Flags */ -+ eax = 0xC0000001; -+ asm volatile ("cpuid" -+ : "+a"(eax), "=d"(edx) : : "rbx", "rcx"); -+ -+ /* Fill up some flags */ -+ padlock_use_ace = ((edx & (0x3<<6)) == (0x3<<6)); -+ padlock_use_rng = ((edx & (0x3<<2)) == (0x3<<2)); -+ -+ return padlock_use_ace + padlock_use_rng; -+} -+ -+/* Force key reload from memory to the CPU microcode. -+ Loading EFLAGS from the stack clears EFLAGS[30] -+ which does the trick. */ -+static inline void -+padlock_reload_key(void) -+{ -+ asm volatile ("pushfq; popfq"); -+} -+ -+#ifndef OPENSSL_NO_AES -+/* -+ * This is heuristic key context tracing. At first one -+ * believes that one should use atomic swap instructions, -+ * but it's not actually necessary. Point is that if -+ * padlock_saved_context was changed by another thread -+ * after we've read it and before we compare it with cdata, -+ * our key *shall* be reloaded upon thread context switch -+ * and we are therefore set in either case... -+ */ -+static inline void -+padlock_verify_context(struct padlock_cipher_data *cdata) -+{ -+ asm volatile ( -+ "pushfq\n" -+" btl $30,(%%rsp)\n" -+" jnc 1f\n" -+" cmpq %2,%1\n" -+" je 1f\n" -+" popfq\n" -+" subq $8,%%rsp\n" -+"1: addq $8,%%rsp\n" -+" movq %2,%0" -+ :"+m"(padlock_saved_context) -+ : "r"(padlock_saved_context), "r"(cdata) : "cc"); -+} -+ -+/* Template for padlock_xcrypt_* modes */ -+/* BIG FAT WARNING: -+ * The offsets used with 'leal' instructions -+ * describe items of the 'padlock_cipher_data' -+ * structure. -+ */ -+#define PADLOCK_XCRYPT_ASM(name,rep_xcrypt) \ -+static inline void *name(size_t cnt, \ -+ struct padlock_cipher_data *cdata, \ -+ void *out, const void *inp) \ -+{ void *iv; \ -+ asm volatile ( "leaq 16(%0),%%rdx\n" \ -+ " leaq 32(%0),%%rbx\n" \ -+ rep_xcrypt "\n" \ -+ : "=a"(iv), "=c"(cnt), "=D"(out), "=S"(inp) \ -+ : "0"(cdata), "1"(cnt), "2"(out), "3"(inp) \ -+ : "rbx", "rdx", "cc", "memory"); \ -+ return iv; \ -+} -+#endif -+ -+#endif /* cpu */ -+ -+ -+# ifndef OPENSSL_NO_AES - - /* Generate all functions with appropriate opcodes */ - /* rep xcryptecb */ -@@ -458,7 +550,23 @@ PADLOCK_XCRYPT_ASM(padlock_xcrypt_ecb, ".byte 0xf3,0x0f,0xa7,0xc8") - PADLOCK_XCRYPT_ASM(padlock_xcrypt_cfb, ".byte 0xf3,0x0f,0xa7,0xe0") - /* rep xcryptofb */ - PADLOCK_XCRYPT_ASM(padlock_xcrypt_ofb, ".byte 0xf3,0x0f,0xa7,0xe8") -+ -+# ifndef AES_ASM -+/* Our own htonl()/ntohl() */ -+static inline void padlock_bswapl(AES_KEY *ks) -+{ -+ size_t i = sizeof(ks->rd_key) / sizeof(ks->rd_key[0]); -+ unsigned int *key = ks->rd_key; -+ -+ while (i--) { -+ asm volatile ("bswapl %0":"+r" (*key)); -+ key++; -+ } -+} -+# endif -+ - # endif -+ - /* The RNG call itself */ - static inline unsigned int padlock_xstore(void *addr, unsigned int edx_in) - { --- -2.2.2 - diff --git a/system/openssl/1003-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch b/system/openssl/1003-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch deleted file mode 100644 index 5a2cdd633..000000000 --- a/system/openssl/1003-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch +++ /dev/null @@ -1,782 +0,0 @@ -From 728af0306505f1ff91364ac2175fb6bf5da90ec3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> -Date: Thu, 5 Feb 2015 09:41:12 +0200 -Subject: [PATCH] engines/e_padlock: implement sha1/sha224/sha256 acceleration - -Limited support for VIA C7 that works only when EVP_MD_CTX_FLAG_ONESHOT -is used appropriately (as done by EVP_Digest, and my previous HMAC patch). - -Full support for VIA Nano including partial transformation and 64-bit mode. - -Benchmarks from VIA Nano 1.6GHz, done with including the previous HMAC and -apps/speed patches done. From single run, error margin of about 100-200k. - -No padlock - -type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes -sha1 20057.60k 51514.05k 99721.39k 130167.81k 142811.14k -sha256 7757.72k 16907.18k 28937.05k 35181.23k 37568.51k -hmac(sha1) 8582.53k 27644.69k 70402.30k 114602.67k 140167.85k - -With the patch - -sha1 37713.77k 114562.71k 259637.33k 379907.41k 438818.13k -sha256 34262.86k 103233.75k 232476.07k 338386.60k 389860.01k -hmac(sha1) 8424.70k 31475.11k 104036.10k 245559.30k 406667.26k ---- - engines/e_padlock.c | 663 ++++++++++++++++++++++++++++++++++++++++++++++++---- - 1 file changed, 614 insertions(+), 49 deletions(-) - -diff --git a/engines/e_padlock.c b/engines/e_padlock.c -index 94406cb..5e99114 100644 ---- a/engines/e_padlock.c -+++ b/engines/e_padlock.c -@@ -3,6 +3,9 @@ - * Written by Michal Ludvig <michal@logix.cz> - * http://www.logix.cz/michal - * -+ * SHA support by Timo Teras <timo.teras@iki.fi>. Portions based on -+ * code originally written by Michal Ludvig. -+ * - * Big thanks to Andy Polyakov for a help with optimization, - * assembler fixes, port to MS Windows and a lot of other - * valuable work on this engine! -@@ -63,7 +66,9 @@ - */ - - #include <stdio.h> -+#include <stdint.h> - #include <string.h> -+#include <netinet/in.h> - - #include <openssl/opensslconf.h> - #include <openssl/crypto.h> -@@ -73,11 +78,32 @@ - #ifndef OPENSSL_NO_AES - # include <openssl/aes.h> - #endif -+#ifndef OPENSSL_NO_SHA -+# include <openssl/sha.h> -+#endif - #include <openssl/rand.h> - #include <openssl/err.h> - - #ifndef OPENSSL_NO_HW --# ifndef OPENSSL_NO_HW_PADLOCK -+# ifndef OPENSSL_NO_HW_PADLOCK -+ -+/* PadLock RNG is disabled by default */ -+# define PADLOCK_NO_RNG 1 -+ -+/* No ASM routines for SHA in MSC yet */ -+# ifdef _MSC_VER -+# define OPENSSL_NO_SHA -+# endif -+ -+/* 64-bit mode does not need software SHA1 as fallback, we can -+ * do all operations with padlock */ -+# if defined(__x86_64__) || defined(__x86_64) -+# define PADLOCK_NEED_FALLBACK_SHA 0 -+# else -+# define PADLOCK_NEED_FALLBACK_SHA 1 -+# endif -+ -+# define PADLOCK_MAX_FINALIZING_LENGTH 0x1FFFFFFE - - /* Attempt to have a single source for both 0.9.7 and 0.9.8 :-) */ - # if (OPENSSL_VERSION_NUMBER >= 0x00908000L) -@@ -151,60 +177,42 @@ void ENGINE_load_padlock(void) - static int padlock_available(void); - static int padlock_init(ENGINE *e); - -+# ifndef PADLOCK_NO_RNG - /* RNG Stuff */ - static RAND_METHOD padlock_rand; -- --/* Cipher Stuff */ --# ifndef OPENSSL_NO_AES --static int padlock_ciphers(ENGINE *e, const EVP_CIPHER **cipher, -- const int **nids, int nid); - # endif - - /* Engine names */ - static const char *padlock_id = "padlock"; - static char padlock_name[100]; - -+static int padlock_bind_helper(ENGINE *e); -+ - /* Available features */ --static int padlock_use_ace = 0; /* Advanced Cryptography Engine */ --static int padlock_use_rng = 0; /* Random Number Generator */ -+enum padlock_flags { -+ PADLOCK_RNG = 0x01, -+ PADLOCK_ACE = 0x02, -+ PADLOCK_ACE2 = 0x04, -+ PADLOCK_PHE = 0x08, -+ PADLOCK_PMM = 0x10, -+ PADLOCK_NANO = 0x20, -+}; -+enum padlock_flags padlock_flags; -+ -+#define PADLOCK_HAVE_RNG (padlock_flags & PADLOCK_RNG) -+#define PADLOCK_HAVE_ACE (padlock_flags & (PADLOCK_ACE|PADLOCK_ACE2)) -+#define PADLOCK_HAVE_ACE1 (padlock_flags & PADLOCK_ACE) -+#define PADLOCK_HAVE_ACE2 (padlock_flags & PADLOCK_ACE2) -+#define PADLOCK_HAVE_PHE (padlock_flags & PADLOCK_PHE) -+#define PADLOCK_HAVE_PMM (padlock_flags & PADLOCK_PMM) -+#define PADLOCK_HAVE_NANO (padlock_flags & PADLOCK_NANO) -+ - # ifndef OPENSSL_NO_AES - static int padlock_aes_align_required = 1; - # endif - - /* ===== Engine "management" functions ===== */ - --/* Prepare the ENGINE structure for registration */ --static int padlock_bind_helper(ENGINE *e) --{ -- /* Check available features */ -- padlock_available(); -- --# if 1 /* disable RNG for now, see commentary in -- * vicinity of RNG code */ -- padlock_use_rng = 0; --# endif -- -- /* Generate a nice engine name with available features */ -- BIO_snprintf(padlock_name, sizeof(padlock_name), -- "VIA PadLock (%s, %s)", -- padlock_use_rng ? "RNG" : "no-RNG", -- padlock_use_ace ? "ACE" : "no-ACE"); -- -- /* Register everything or return with an error */ -- if (!ENGINE_set_id(e, padlock_id) || -- !ENGINE_set_name(e, padlock_name) || -- !ENGINE_set_init_function(e, padlock_init) || --# ifndef OPENSSL_NO_AES -- (padlock_use_ace && !ENGINE_set_ciphers(e, padlock_ciphers)) || --# endif -- (padlock_use_rng && !ENGINE_set_RAND(e, &padlock_rand))) { -- return 0; -- } -- -- /* Everything looks good */ -- return 1; --} -- - # ifdef OPENSSL_NO_DYNAMIC_ENGINE - - /* Constructor */ -@@ -229,7 +237,7 @@ static ENGINE *ENGINE_padlock(void) - /* Check availability of the engine */ - static int padlock_init(ENGINE *e) - { -- return (padlock_use_rng || padlock_use_ace); -+ return padlock_flags; - } - - /* -@@ -377,10 +385,20 @@ static int padlock_available(void) - "=d"(edx)::"ecx"); - - /* Fill up some flags */ -- padlock_use_ace = ((edx & (0x3 << 6)) == (0x3 << 6)); -- padlock_use_rng = ((edx & (0x3 << 2)) == (0x3 << 2)); -- -- return padlock_use_ace + padlock_use_rng; -+ padlock_flags |= ((edx & (0x3<<3)) ? PADLOCK_RNG : 0); -+ padlock_flags |= ((edx & (0x3<<7)) ? PADLOCK_ACE : 0); -+ padlock_flags |= ((edx & (0x3<<9)) ? PADLOCK_ACE2 : 0); -+ padlock_flags |= ((edx & (0x3<<11)) ? PADLOCK_PHE : 0); -+ padlock_flags |= ((edx & (0x3<<13)) ? PADLOCK_PMM : 0); -+ -+ /* Check for VIA Nano CPU */ -+ eax = 0x00000001; -+ asm volatile ("pushl %%ebx; cpuid; popl %%ebx" -+ : "+a"(eax) : : "ecx", "edx"); -+ if ((eax | 0x000F) == 0x06FF) -+ padlock_flags |= PADLOCK_NANO; -+ -+ return padlock_flags; - } - - /* -@@ -473,10 +491,14 @@ padlock_available(void) - : "+a"(eax), "=d"(edx) : : "rbx", "rcx"); - - /* Fill up some flags */ -- padlock_use_ace = ((edx & (0x3<<6)) == (0x3<<6)); -- padlock_use_rng = ((edx & (0x3<<2)) == (0x3<<2)); -- -- return padlock_use_ace + padlock_use_rng; -+ padlock_flags |= ((edx & (0x3<<3)) ? PADLOCK_RNG : 0); -+ padlock_flags |= ((edx & (0x3<<7)) ? PADLOCK_ACE : 0); -+ padlock_flags |= ((edx & (0x3<<9)) ? PADLOCK_ACE2 : 0); -+ padlock_flags |= ((edx & (0x3<<11)) ? PADLOCK_PHE : 0); -+ padlock_flags |= ((edx & (0x3<<13)) ? PADLOCK_PMM : 0); -+ padlock_flags |= PADLOCK_NANO; -+ -+ return padlock_flags; - } - - /* Force key reload from memory to the CPU microcode. -@@ -1293,6 +1315,496 @@ padlock_aes_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out_arg, - - # endif /* OPENSSL_NO_AES */ - -+#ifndef OPENSSL_NO_SHA -+ -+static inline void -+padlock_copy_bswap(void *dst, void *src, size_t count) -+{ -+ uint32_t *udst = dst, *usrc = src; -+ int i = 0; -+ -+ for (i = 0; i < count; i++) -+ udst[i] = htonl(usrc[i]); -+} -+ -+static unsigned long padlock_sha_prepare_padding( -+ EVP_MD_CTX *ctx, -+ unsigned char *padding, -+ unsigned char *data, size_t data_len, -+ uint64_t total) -+{ -+ unsigned int padding_len; -+ -+ padding_len = data_len < 56 ? SHA_CBLOCK : 2 * SHA_CBLOCK; -+ if (data_len) -+ memcpy(padding, data, data_len); -+ -+ memset(padding + data_len, 0, padding_len - data_len); -+ padding[data_len] = 0x80; -+ *(uint32_t *)(padding + padding_len - 8) = htonl(total >> 32); -+ *(uint32_t *)(padding + padding_len - 4) = htonl(total & 0xffffffff); -+ -+ return data_len < 56 ? 1 : 2; -+} -+ -+#define PADLOCK_SHA_ALIGN(dd) (uint32_t*)(((uintptr_t)(dd) + 15) & ~15) -+#define PADLOCK_SHA_HWCTX (128+16) -+ -+static void -+padlock_sha1(void *hwctx, const void *buf, unsigned long total, unsigned long now) -+{ -+ unsigned long pos = total - now; -+ -+ asm volatile ("xsha1" -+ : "+S"(buf), "+D"(hwctx), "+a"(pos), "+c"(total) -+ : : "memory"); -+} -+ -+static void -+padlock_sha1_partial(void *hwctx, const void *buf, unsigned long blocks) -+{ -+ asm volatile ("xsha1" -+ : "+S"(buf), "+D"(hwctx), "+c"(blocks) -+ : "a"(-1L) : "memory"); -+} -+ -+static int padlock_sha1_init(EVP_MD_CTX *ctx) -+{ -+ return SHA1_Init(ctx->md_data); -+} -+ -+#if PADLOCK_NEED_FALLBACK_SHA -+ -+static int padlock_sha1_update_eden(EVP_MD_CTX *ctx, const void *data, -+ size_t len) -+{ -+ unsigned char hwctx[PADLOCK_SHA_HWCTX]; -+ uint32_t *aligned = PADLOCK_SHA_ALIGN(hwctx); -+ SHA_CTX *c = ctx->md_data; -+ uint_fast64_t total; -+ const unsigned char *p = data; -+ unsigned long l = 0; -+ -+ /* Calculate total length (Nl,Nh) is length in bits */ -+ total = (((uint_fast64_t) c->Nh) << 29) + (c->Nl >> 3); -+ total += len; -+ -+ if ((ctx->flags & EVP_MD_CTX_FLAG_ONESHOT) && -+ (total <= PADLOCK_MAX_FINALIZING_LENGTH)) { -+ if (c->num != 0) { -+ l = (len < SHA_CBLOCK - c->num) ? len : (SHA_CBLOCK - c->num); -+ if (!SHA1_Update(c, data, l)) -+ return 0; -+ p += l; -+ if (c->num != 0) { -+ p = (unsigned char *) c->data; -+ len = c->num; -+ l = 0; -+ } -+ } -+ memcpy(aligned, &c->h0, 5 * sizeof(SHA_LONG)); -+ padlock_sha1(aligned, p, total, len - l); -+ memcpy(&c->h0, aligned, 5 * sizeof(SHA_LONG)); -+ c->num = -1; -+ return 1; -+ } -+ -+ return SHA1_Update(c, data, len); -+} -+#endif -+ -+static int padlock_sha1_update(EVP_MD_CTX *ctx, const void *data, -+ size_t len) -+{ -+ unsigned char hwctx[PADLOCK_SHA_HWCTX]; -+ uint32_t *aligned = PADLOCK_SHA_ALIGN(hwctx); -+ SHA_CTX *c = ctx->md_data; -+ uint_fast64_t total; -+ unsigned char *p; -+ unsigned long n; -+ -+ /* Calculate total length (Nl,Nh) is length in bits */ -+ total = (((uint_fast64_t) c->Nh) << 29) + (c->Nl >> 3); -+ total += len; -+ c->Nh = total >> 29; -+ c->Nl = (total << 3) & 0xffffffffUL; -+ -+ memcpy(aligned, &c->h0, 5 * sizeof(SHA_LONG)); -+ -+ /* Check partial data */ -+ n = c->num; -+ if (n) { -+ p = (unsigned char *) c->data; -+ if (len >= SHA_CBLOCK || len+n >= SHA_CBLOCK) { -+ memcpy(p+n, data, SHA_CBLOCK-n); -+ padlock_sha1_partial(aligned, p, 1); -+ n = SHA_CBLOCK - n; -+ data += n; -+ len -= n; -+ c->num = 0; -+ memset(p, 0, SHA_CBLOCK); -+ } else { -+ memcpy(p+n, data, len); -+ c->num += (unsigned int)len; -+ return 1; -+ } -+ } -+ -+ /* Can we finalize straight away? */ -+ if ((ctx->flags & EVP_MD_CTX_FLAG_ONESHOT) && -+ (total <= PADLOCK_MAX_FINALIZING_LENGTH)) { -+ padlock_sha1(aligned, data, total, len); -+ memcpy(&c->h0, aligned, 5 * sizeof(SHA_LONG)); -+ c->num = -1; -+ return 1; -+ } -+ -+ /* Use nonfinalizing update */ -+ n = len / SHA_CBLOCK; -+ if (n != 0) { -+ padlock_sha1_partial(aligned, data, n); -+ data += n * SHA_CBLOCK; -+ len -= n * SHA_CBLOCK; -+ } -+ memcpy(&c->h0, aligned, 5 * sizeof(SHA_LONG)); -+ -+ /* Buffer remaining bytes */ -+ if (len) { -+ memcpy(c->data, data, len); -+ c->num = len; -+ } -+ -+ return 1; -+} -+ -+static int padlock_sha1_final(EVP_MD_CTX *ctx, unsigned char *md) -+{ -+ unsigned char hwctx[PADLOCK_SHA_HWCTX]; -+ uint32_t *aligned = PADLOCK_SHA_ALIGN(hwctx); -+ uint64_t total; -+ SHA_CTX *c = ctx->md_data; -+ -+ if (c->num == -1) { -+ padlock_copy_bswap(md, &c->h0, 5); -+ c->num = 0; -+ return 1; -+ } -+ -+ total = (((uint_fast64_t) c->Nh) << 29) + (c->Nl >> 3); -+#if PADLOCK_NEED_FALLBACK_SHA -+ if ((!PADLOCK_HAVE_NANO) && (total > PADLOCK_MAX_FINALIZING_LENGTH)) -+ return SHA1_Final(md, c); -+#endif -+ -+ memcpy(aligned, &c->h0, 5 * sizeof(SHA_LONG)); -+ if (total > PADLOCK_MAX_FINALIZING_LENGTH) { -+ unsigned char padding[2 * SHA_CBLOCK]; -+ unsigned long n; -+ -+ n = padlock_sha_prepare_padding(ctx, padding, -+ (unsigned char *) c->data, c->num, total << 3); -+ padlock_sha1_partial(aligned, padding, n); -+ } else { -+ padlock_sha1(aligned, c->data, total, c->num); -+ } -+ padlock_copy_bswap(md, aligned, 5); -+ c->num = 0; -+ -+ return 1; -+} -+ -+static EVP_MD padlock_sha1_md = { -+ NID_sha1, -+ NID_sha1WithRSAEncryption, -+ SHA_DIGEST_LENGTH, -+ EVP_MD_FLAG_PKEY_METHOD_SIGNATURE, -+ padlock_sha1_init, -+ padlock_sha1_update, -+ padlock_sha1_final, -+ NULL, -+ NULL, -+ EVP_PKEY_RSA_method, -+ SHA_CBLOCK, -+ sizeof(SHA_CTX), -+}; -+ -+static EVP_MD padlock_dss1_md = { -+ NID_dsa, -+ NID_dsaWithSHA1, -+ SHA_DIGEST_LENGTH, -+ 0, -+ padlock_sha1_init, -+ padlock_sha1_update, -+ padlock_sha1_final, -+ NULL, -+ NULL, -+ EVP_PKEY_DSA_method, -+ SHA_CBLOCK, -+ sizeof(SHA_CTX), -+}; -+ -+ -+#if !defined(OPENSSL_NO_SHA256) -+ -+static void -+padlock_sha256(void *hwctx, const void *buf, unsigned long total, unsigned long now) -+{ -+ unsigned long pos = total - now; -+ -+ asm volatile ("xsha256" -+ : "+S"(buf), "+D"(hwctx), "+a"(pos), "+c"(total) -+ : : "memory"); -+} -+ -+static void -+padlock_sha256_partial(void *hwctx, const void *buf, unsigned long blocks) -+{ -+ asm volatile ("xsha256" -+ : "+S"(buf), "+D"(hwctx), "+c"(blocks) -+ : "a"(-1L) : "memory"); -+} -+ -+#if PADLOCK_NEED_FALLBACK_SHA -+ -+static int padlock_sha256_update_eden(EVP_MD_CTX *ctx, const void *data, -+ size_t len) -+{ -+ unsigned char hwctx[PADLOCK_SHA_HWCTX]; -+ uint32_t *aligned = PADLOCK_SHA_ALIGN(hwctx); -+ SHA256_CTX *c = ctx->md_data; -+ uint_fast64_t total; -+ const unsigned char *p = data; -+ unsigned int l = 0; -+ -+ /* Calculate total length (Nl,Nh) is length in bits */ -+ total = (((uint_fast64_t) c->Nh) << 29) + (c->Nl >> 3); -+ total += len; -+ -+ if ((ctx->flags & EVP_MD_CTX_FLAG_ONESHOT) && -+ (total <= PADLOCK_MAX_FINALIZING_LENGTH)) { -+ if (c->num != 0) { -+ l = (len < SHA256_CBLOCK - c->num) ? len : (SHA256_CBLOCK - c->num); -+ if (!SHA256_Update(c, data, l)) -+ return 0; -+ p += l; -+ if (c->num != 0) { -+ p = (unsigned char *) c->data; -+ len = c->num; -+ l = 0; -+ } -+ } -+ memcpy(aligned, c->h, sizeof(c->h)); -+ padlock_sha256(aligned, p, total, len - l); -+ memcpy(c->h, aligned, sizeof(c->h)); -+ c->num = -1; -+ return 1; -+ } -+ -+ return SHA256_Update(c, data, len); -+} -+ -+#endif -+ -+static int padlock_sha256_update(EVP_MD_CTX *ctx, const void *data, -+ size_t len) -+{ -+ unsigned char hwctx[PADLOCK_SHA_HWCTX]; -+ uint32_t *aligned = PADLOCK_SHA_ALIGN(hwctx); -+ SHA256_CTX *c = ctx->md_data; -+ uint_fast64_t total; -+ unsigned char *p; -+ unsigned long n; -+ -+ /* Calculate total length (Nl,Nh) is length in bits */ -+ total = (((uint_fast64_t) c->Nh) << 29) + (c->Nl >> 3); -+ total += len; -+ c->Nh = total >> 29; -+ c->Nl = (total << 3) & 0xffffffffUL; -+ -+ memcpy(aligned, c->h, sizeof(c->h)); -+ -+ /* Check partial data */ -+ n = c->num; -+ if (n) { -+ p = (unsigned char *) c->data; -+ if (len >= SHA256_CBLOCK || len+n >= SHA256_CBLOCK) { -+ memcpy(p+n, data, SHA256_CBLOCK-n); -+ padlock_sha256_partial(aligned, p, 1); -+ n = SHA256_CBLOCK - n; -+ data += n; -+ len -= n; -+ c->num = 0; -+ memset(p, 0, SHA256_CBLOCK); -+ } else { -+ memcpy(p+n, data, len); -+ c->num += (unsigned int)len; -+ return 1; -+ } -+ } -+ -+ /* Can we finalize straight away? */ -+ if ((ctx->flags & EVP_MD_CTX_FLAG_ONESHOT) && -+ (total <= PADLOCK_MAX_FINALIZING_LENGTH)) { -+ padlock_sha256(aligned, data, total, len); -+ memcpy(c->h, aligned, sizeof(c->h)); -+ c->num = -1; -+ return 1; -+ } -+ -+ /* Use nonfinalizing update */ -+ n = len / SHA256_CBLOCK; -+ if (n != 0) { -+ padlock_sha256_partial(aligned, data, n); -+ data += n * SHA256_CBLOCK; -+ len -= n * SHA256_CBLOCK; -+ } -+ memcpy(c->h, aligned, sizeof(c->h)); -+ -+ /* Buffer remaining bytes */ -+ if (len) { -+ memcpy(c->data, data, len); -+ c->num = len; -+ } -+ -+ return 1; -+} -+ -+static int padlock_sha256_final(EVP_MD_CTX *ctx, unsigned char *md) -+{ -+ unsigned char hwctx[PADLOCK_SHA_HWCTX]; -+ uint32_t *aligned = PADLOCK_SHA_ALIGN(hwctx); -+ uint64_t total; -+ SHA256_CTX *c = ctx->md_data; -+ -+ if (c->num == -1) { -+ padlock_copy_bswap(md, c->h, sizeof(c->h)/sizeof(c->h[0])); -+ c->num = 0; -+ return 1; -+ } -+ -+ total = (((uint_fast64_t) c->Nh) << 29) + (c->Nl >> 3); -+#if PADLOCK_NEED_FALLBACK_SHA -+ if ((!PADLOCK_HAVE_NANO) && (total > PADLOCK_MAX_FINALIZING_LENGTH)) -+ return SHA256_Final(md, c); -+#endif -+ -+ memcpy(aligned, c->h, sizeof(c->h)); -+ if (total > PADLOCK_MAX_FINALIZING_LENGTH) { -+ unsigned char padding[2 * SHA_CBLOCK]; -+ unsigned long n; -+ -+ n = padlock_sha_prepare_padding(ctx, padding, -+ (unsigned char *) c->data, c->num, total << 3); -+ padlock_sha256_partial(aligned, padding, n); -+ } else { -+ padlock_sha256(aligned, c->data, total, c->num); -+ } -+ padlock_copy_bswap(md, aligned, sizeof(c->h)/sizeof(c->h[0])); -+ c->num = 0; -+ return 1; -+} -+ -+#if !defined(OPENSSL_NO_SHA224) -+ -+static int padlock_sha224_init(EVP_MD_CTX *ctx) -+{ -+ return SHA224_Init(ctx->md_data); -+} -+ -+static EVP_MD padlock_sha224_md = { -+ NID_sha224, -+ NID_sha224WithRSAEncryption, -+ SHA224_DIGEST_LENGTH, -+ 0, -+ padlock_sha224_init, -+ padlock_sha256_update, -+ padlock_sha256_final, -+ NULL, -+ NULL, -+ EVP_PKEY_RSA_method, -+ SHA_CBLOCK, -+ sizeof(SHA256_CTX), -+}; -+#endif /* !OPENSSL_NO_SHA224 */ -+ -+static int padlock_sha256_init(EVP_MD_CTX *ctx) -+{ -+ return SHA256_Init(ctx->md_data); -+} -+ -+static EVP_MD padlock_sha256_md = { -+ NID_sha256, -+ NID_sha256WithRSAEncryption, -+ SHA256_DIGEST_LENGTH, -+ 0, -+ padlock_sha256_init, -+ padlock_sha256_update, -+ padlock_sha256_final, -+ NULL, -+ NULL, -+ EVP_PKEY_RSA_method, -+ SHA_CBLOCK, -+ sizeof(SHA256_CTX), -+}; -+#endif /* !OPENSSL_NO_SHA256 */ -+ -+static int padlock_digest_nids[] = { -+#if !defined(OPENSSL_NO_SHA) -+ NID_sha1, -+ NID_dsa, -+#endif -+#if !defined(OPENSSL_NO_SHA256) -+#if !defined(OPENSSL_NO_SHA224) -+ NID_sha224, -+#endif -+ NID_sha256, -+#endif -+}; -+ -+static int padlock_digest_nids_num = sizeof(padlock_digest_nids)/sizeof(padlock_digest_nids[0]); -+ -+static int -+padlock_digests (ENGINE *e, const EVP_MD **digest, const int **nids, int nid) -+{ -+ /* No specific digest => return a list of supported nids ... */ -+ if (!digest) { -+ *nids = padlock_digest_nids; -+ return padlock_digest_nids_num; -+ } -+ -+ /* ... or the requested "digest" otherwise */ -+ switch (nid) { -+#if !defined(OPENSSL_NO_SHA) -+ case NID_sha1: -+ *digest = &padlock_sha1_md; -+ break; -+ case NID_dsa: -+ *digest = &padlock_dss1_md; -+ break; -+#endif -+#if !defined(OPENSSL_NO_SHA256) -+#if !defined(OPENSSL_NO_SHA224) -+ case NID_sha224: -+ *digest = &padlock_sha224_md; -+ break; -+#endif /* OPENSSL_NO_SHA224 */ -+ case NID_sha256: -+ *digest = &padlock_sha256_md; -+ break; -+#endif /* OPENSSL_NO_SHA256 */ -+ default: -+ /* Sorry, we don't support this NID */ -+ *digest = NULL; -+ return 0; -+ } -+ -+ return 1; -+} -+ -+#endif /* OPENSSL_NO_SHA */ -+ -+#ifndef PADLOCK_NO_RNG -+ - /* ===== Random Number Generator ===== */ - /* - * This code is not engaged. The reason is that it does not comply -@@ -1356,6 +1868,59 @@ static RAND_METHOD padlock_rand = { - padlock_rand_bytes, /* pseudorand */ - padlock_rand_status, /* rand status */ - }; -+#endif /* PADLOCK_NO_RNG */ -+ -+/* Prepare the ENGINE structure for registration */ -+static int -+padlock_bind_helper(ENGINE *e) -+{ -+ /* Check available features */ -+ padlock_available(); -+ -+ /* Generate a nice engine name with available features */ -+ BIO_snprintf(padlock_name, sizeof(padlock_name), -+ "VIA PadLock: %s%s%s%s%s%s", -+ padlock_flags ? "" : "not supported", -+ PADLOCK_HAVE_RNG ? "RNG " : "", -+ PADLOCK_HAVE_ACE ? (PADLOCK_HAVE_ACE2 ? "ACE2 " : "ACE ") : "", -+ PADLOCK_HAVE_PHE ? "PHE " : "", -+ PADLOCK_HAVE_PMM ? "PMM " : "", -+ PADLOCK_HAVE_NANO ? "NANO " : "" -+ ); -+ -+#if PADLOCK_NEED_FALLBACK_SHA && !defined(OPENSSL_NO_SHA) -+ if (!PADLOCK_HAVE_NANO) { -+ padlock_sha1_md.update = padlock_sha1_update_eden; -+ padlock_dss1_md.update = padlock_sha1_update_eden; -+#if !defined(OPENSSL_NO_SHA256) -+#if !defined(OPENSSL_NO_SHA224) -+ padlock_sha224_md.update = padlock_sha256_update_eden; -+#endif -+ padlock_sha256_md.update = padlock_sha256_update_eden; -+#endif -+ } -+#endif -+ -+ /* Register everything or return with an error */ -+ if (!ENGINE_set_id(e, padlock_id) || -+ !ENGINE_set_name(e, padlock_name) || -+ !ENGINE_set_init_function(e, padlock_init) -+#ifndef OPENSSL_NO_AES -+ || (PADLOCK_HAVE_ACE && !ENGINE_set_ciphers (e, padlock_ciphers)) -+#endif -+#ifndef OPENSSL_NO_SHA -+ || (PADLOCK_HAVE_PHE && !ENGINE_set_digests (e, padlock_digests)) -+#endif -+#ifndef PADLOCK_NO_RNG -+ || (PADLOCK_HAVE_RNG && !ENGINE_set_RAND (e, &padlock_rand)) -+#endif -+ ) { -+ return 0; -+ } -+ -+ /* Everything looks good */ -+ return 1; -+} - - # else /* !COMPILE_HW_PADLOCK */ - # ifndef OPENSSL_NO_DYNAMIC_ENGINE --- -2.2.2 - diff --git a/system/openssl/1004-crypto-engine-autoload-padlock-dynamic-engine.patch b/system/openssl/1004-crypto-engine-autoload-padlock-dynamic-engine.patch deleted file mode 100644 index 66f37451e..000000000 --- a/system/openssl/1004-crypto-engine-autoload-padlock-dynamic-engine.patch +++ /dev/null @@ -1,33 +0,0 @@ -From a58658f191e83f4c6417d2cc879fa572f7978537 Mon Sep 17 00:00:00 2001 -From: Natanael Copa <ncopa@alpinelinux.org> -Date: Thu, 4 Feb 2016 16:28:15 +0100 -Subject: [PATCH] crypto/engine: autoload padlock dynamic engine - ---- - crypto/engine/eng_all.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/crypto/engine/eng_all.c b/crypto/engine/eng_all.c -index 48ad0d2..822aa23 100644 ---- a/crypto/engine/eng_all.c -+++ b/crypto/engine/eng_all.c -@@ -120,6 +120,16 @@ void ENGINE_load_builtin_engines(void) - ENGINE_load_capi(); - # endif - #endif -+#ifdef OPENSSL_NO_STATIC_ENGINE -+ { -+ ENGINE *e = ENGINE_by_id("padlock"); -+ if (e != NULL) { -+ ENGINE_add(e); -+ ENGINE_free(e); -+ ERR_clear_error(); -+ } -+ } -+#endif - ENGINE_register_all_complete(); - } - --- -2.7.0 - diff --git a/system/openssl/APKBUILD b/system/openssl/APKBUILD index 3a777064b..070d3d0e2 100644 --- a/system/openssl/APKBUILD +++ b/system/openssl/APKBUILD @@ -1,30 +1,19 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=openssl -pkgver=1.0.2t +pkgver=1.1.1d pkgrel=0 -pkgdesc="Toolkit for SSL v2/v3 and TLS v1" +pkgdesc="Toolkit for SSL and TLS" url="https://www.openssl.org/" arch="all" license="OpenSSL" depends="" -depends_dev="zlib-dev" checkdepends="perl" makedepends_build="perl" -makedepends_host="zlib-dev" -makedepends="$makedepends_host $makedepends_build" -subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc libcrypto1.0:libcrypto - libssl1.0:libssl" +subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc libcrypto1.1:libcrypto + libssl1.1:libssl" source="https://www.openssl.org/source/${pkgname}-${pkgver}.tar.gz - 0003-use-termios.patch - 0004-fix-default-ca-path-for-apps.patch - 0005-fix-parallel-build.patch - 0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch - 0008-maintain-abi-compat-with-no-freelist-and-regular-bui.patch - 0009-no-rpath.patch - 0010-ssl-env-zlib.patch - 1001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch - 1002-backport-changes-from-upstream-padlock-module.patch - 1003-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch + CVE-2019-1551.patch + ppc64.patch " # secfixes: @@ -67,6 +56,8 @@ source="https://www.openssl.org/source/${pkgname}-${pkgver}.tar.gz # 1.0.2t-r0: # - CVE-2019-1547 # - CVE-2019-1563 +# 1.1.1d-r0: +# - CVE-2019-1551 build() { # openssl will prepend crosscompile always core CC et al @@ -79,10 +70,10 @@ build() { aarch64*) _target="linux-aarch64" ;; arm*) _target="linux-armv4" ;; ppc) _target="linux-ppc" ;; - ppc64) _target="linux-ppc64"; _optflags="no-asm" ;; + ppc64) _target="linux-ppc64" ;; ppc64le) _target="linux-ppc64le" ;; i528 | pmmx | x86) _target="linux-elf" ;; - x86_64) _target="linux-x86_64"; _optflags="enable-ec_nistp_64_gcc_128" ;; + x86_64) _target="linux-x86_64" ;; s390x) _target="linux64-s390x";; *) msg "Unable to determine architecture from (CARCH=$CARCH)" ; return 1 ;; esac @@ -94,37 +85,40 @@ build() { perl ./Configure $_target --prefix=/usr \ --libdir=lib \ --openssldir=/etc/ssl \ - shared zlib enable-montasm enable-md2 $_optflags \ - -DOPENSSL_NO_BUF_FREELISTS \ - $CPPFLAGS $CFLAGS $LDFLAGS -Wa,--noexecstack \ - enable-ssl2 - - make && make build-shared + shared no-zlib enable-md2 no-weak-ssl-ciphers \ + $CPPFLAGS $CFLAGS $LDFLAGS -Wa,--noexecstack + make } check() { - make -j1 test + make test } package() { - make INSTALL_PREFIX="$pkgdir" MANDIR=/usr/share/man MANSUFFIX=ssl install - # remove the script c_rehash + make DESTDIR="$pkgdir" install rm "$pkgdir"/usr/bin/c_rehash + + for _manfile in "$pkgdir"/usr/share/man/man1/*; do + case _manfile in + openssl*) ;; + *) mv $_manfile "$pkgdir"/usr/share/man/man1/openssl-$(basename $_manfile) + esac + done } libcrypto() { - pkgdesc="Crypto library from openssl" + pkgdesc="OpenSSL cryptography library" mkdir -p "$subpkgdir"/lib "$subpkgdir"/usr/lib for i in "$pkgdir"/usr/lib/libcrypto*; do mv $i "$subpkgdir"/lib/ ln -s ../../lib/${i##*/} "$subpkgdir"/usr/lib/${i##*/} done - mv "$pkgdir"/usr/lib/engines "$subpkgdir"/usr/lib/ + mv "$pkgdir"/usr/lib/engines-1.1 "$subpkgdir"/usr/lib/ } libssl() { - pkgdesc="SSL shared libraries" + pkgdesc="OpenSSL socket library" mkdir -p "$subpkgdir"/lib "$subpkgdir"/usr/lib for i in "$pkgdir"/usr/lib/libssl*; do @@ -133,14 +127,6 @@ libssl() { done } -sha512sums="0b88868933f42fab87e8b22449435a1091cc6e75f986aad6c173e01ad123161fcae8c226759073701bc65c9f2f0b6ce6a63a61203008ed873cfb6e484f32bc71 openssl-1.0.2t.tar.gz -58e42058a0c8086c49d681b1e226da39a8cf8cb88c51cf739dec2ff12e1bb5d7208ac5033264b186d58e9bdfe992fe9ddb95701d01caf1824396b2cefe30c0a4 0003-use-termios.patch -c67472879a31b5dbdd313892df6d37e7c93e8c0237d406c30d50b1016c2618ead3c13277f5dc723ef1ceed092d36e3c15a9777daa844f59b9fa2b0a4f04fd9ae 0004-fix-default-ca-path-for-apps.patch -5d4191482f8bbf62c75fe6bc2d9587388022c3310703c2a913788a983b1d1406e706cf3916a5792604f0b0f220a87432d3b82b442cea9915f2abb6fdd8478fcb 0005-fix-parallel-build.patch -820d4ce1c222696fe3f1dd0d11815c06262ec230fdb174532fd507286667a0aefbf858ea5edac4245a54b950cd0556545ecd0c5cf494692a2ba131c667e7bcd5 0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch -17ad683bb91a3a3c5bcc456c8aed7f0b42414c6de06ebafa4753af93c42d9827c9978a43d4d53d741a45df7f7895c6f6163172af57cc7b391cfd15f45ce6c351 0008-maintain-abi-compat-with-no-freelist-and-regular-bui.patch -5dbbc01985190ae1254350fb12565beb6abb916b6a7bb1f0f22d9762b1e575d124aaf9aa4cfe5f908e420978f691072d48c61a72660f09dfd6d9a2f83f862bc1 0009-no-rpath.patch -5febe20948e3f12d981e378e1f4ea538711657aacb6865a1aa91339d4a04277e250f490a1f2abc2c6f290bdc2b1bffdba1d00983b4c09f7ea983eef8163f9420 0010-ssl-env-zlib.patch -8c181760d7a149aa18d246d50f1c0438ffb63c98677b05306dfc00400ad0429b47d31e7c8d85126005c67f743d23e7a8a81174ffe98556f4caf9cf6b04d9ff17 1001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch -a3555440b5f544bfd6b9ad97557d8f4c1d673f6a35219f65056a72035d186be5f354717ddf9784899b602464d48657b090ade24379552d43af97609c0f48c389 1002-backport-changes-from-upstream-padlock-module.patch -6353c7a94016c20db5d683dde37775f6780952ecdb1a5f39f878d04ba37f6ad79ae10fb6d65d181d912505a5d1e22463004cd855d548b364c00b120da2b0fdbc 1003-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch" +sha512sums="2bc9f528c27fe644308eb7603c992bac8740e9f0c3601a130af30c9ffebbf7e0f5c28b76a00bbb478bad40fbe89b4223a58d604001e1713da71ff4b7fe6a08a7 openssl-1.1.1d.tar.gz +11ca61515a89766241fe0fae27f3b39767128915f288ea88840bf93e8b50ac416024cb2153efcdf2658d3e82a8e4250a0c069333dbd7347475f9dafcc45370b5 CVE-2019-1551.patch +66bbb0ae769643c8a0b1501d9c8466f08f0d8b3b2bc4fcc2c0c054ab1971ced85c07aa0e4b8168a4394d0ae407dfbd26066a7a068602ce5b58e459b12ce6d36a ppc64.patch" diff --git a/system/openssl/CVE-2019-1551.patch b/system/openssl/CVE-2019-1551.patch new file mode 100644 index 000000000..8daf04ebf --- /dev/null +++ b/system/openssl/CVE-2019-1551.patch @@ -0,0 +1,757 @@ +From 419102400a2811582a7a3d4a4e317d72e5ce0a8f Mon Sep 17 00:00:00 2001 +From: Andy Polyakov <appro@openssl.org> +Date: Wed, 4 Dec 2019 12:48:21 +0100 +Subject: [PATCH] Fix an overflow bug in rsaz_512_sqr + +There is an overflow bug in the x64_64 Montgomery squaring procedure used in +exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis +suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a +result of this defect would be very difficult to perform and are not believed +likely. Attacks against DH512 are considered just feasible. However, for an +attack the target would have to re-use the DH512 private key, which is not +recommended anyway. Also applications directly using the low level API +BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. + +CVE-2019-1551 + +Reviewed-by: Paul Dale <paul.dale@oracle.com> +Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> +(Merged from https://github.com/openssl/openssl/pull/10575) +--- + crypto/bn/asm/rsaz-x86_64.pl | 381 ++++++++++++++++++----------------- + 1 file changed, 197 insertions(+), 184 deletions(-) + +diff --git a/crypto/bn/asm/rsaz-x86_64.pl b/crypto/bn/asm/rsaz-x86_64.pl +index b1797b649f..7534d5cd03 100755 +--- a/crypto/bn/asm/rsaz-x86_64.pl ++++ b/crypto/bn/asm/rsaz-x86_64.pl +@@ -116,7 +116,7 @@ rsaz_512_sqr: # 25-29% faster than rsaz_512_mul + subq \$128+24, %rsp + .cfi_adjust_cfa_offset 128+24 + .Lsqr_body: +- movq $mod, %rbp # common argument ++ movq $mod, %xmm1 # common off-load + movq ($inp), %rdx + movq 8($inp), %rax + movq $n0, 128(%rsp) +@@ -134,7 +134,8 @@ $code.=<<___; + .Loop_sqr: + movl $times,128+8(%rsp) + #first iteration +- movq %rdx, %rbx ++ movq %rdx, %rbx # 0($inp) ++ mov %rax, %rbp # 8($inp) + mulq %rdx + movq %rax, %r8 + movq 16($inp), %rax +@@ -173,31 +174,29 @@ $code.=<<___; + mulq %rbx + addq %rax, %r14 + movq %rbx, %rax +- movq %rdx, %r15 +- adcq \$0, %r15 ++ adcq \$0, %rdx + +- addq %r8, %r8 #shlq \$1, %r8 +- movq %r9, %rcx +- adcq %r9, %r9 #shld \$1, %r8, %r9 ++ xorq %rcx,%rcx # rcx:r8 = r8 << 1 ++ addq %r8, %r8 ++ movq %rdx, %r15 ++ adcq \$0, %rcx + + mulq %rax +- movq %rax, (%rsp) +- addq %rdx, %r8 +- adcq \$0, %r9 ++ addq %r8, %rdx ++ adcq \$0, %rcx + +- movq %r8, 8(%rsp) +- shrq \$63, %rcx ++ movq %rax, (%rsp) ++ movq %rdx, 8(%rsp) + + #second iteration +- movq 8($inp), %r8 + movq 16($inp), %rax +- mulq %r8 ++ mulq %rbp + addq %rax, %r10 + movq 24($inp), %rax + movq %rdx, %rbx + adcq \$0, %rbx + +- mulq %r8 ++ mulq %rbp + addq %rax, %r11 + movq 32($inp), %rax + adcq \$0, %rdx +@@ -205,7 +204,7 @@ $code.=<<___; + movq %rdx, %rbx + adcq \$0, %rbx + +- mulq %r8 ++ mulq %rbp + addq %rax, %r12 + movq 40($inp), %rax + adcq \$0, %rdx +@@ -213,7 +212,7 @@ $code.=<<___; + movq %rdx, %rbx + adcq \$0, %rbx + +- mulq %r8 ++ mulq %rbp + addq %rax, %r13 + movq 48($inp), %rax + adcq \$0, %rdx +@@ -221,7 +220,7 @@ $code.=<<___; + movq %rdx, %rbx + adcq \$0, %rbx + +- mulq %r8 ++ mulq %rbp + addq %rax, %r14 + movq 56($inp), %rax + adcq \$0, %rdx +@@ -229,39 +228,39 @@ $code.=<<___; + movq %rdx, %rbx + adcq \$0, %rbx + +- mulq %r8 ++ mulq %rbp + addq %rax, %r15 +- movq %r8, %rax ++ movq %rbp, %rax + adcq \$0, %rdx + addq %rbx, %r15 +- movq %rdx, %r8 +- movq %r10, %rdx +- adcq \$0, %r8 ++ adcq \$0, %rdx + +- add %rdx, %rdx +- lea (%rcx,%r10,2), %r10 #shld \$1, %rcx, %r10 +- movq %r11, %rbx +- adcq %r11, %r11 #shld \$1, %r10, %r11 ++ xorq %rbx, %rbx # rbx:r10:r9 = r10:r9 << 1 ++ addq %r9, %r9 ++ movq %rdx, %r8 ++ adcq %r10, %r10 ++ adcq \$0, %rbx + + mulq %rax ++ addq %rcx, %rax ++ movq 16($inp), %rbp ++ adcq \$0, %rdx + addq %rax, %r9 ++ movq 24($inp), %rax + adcq %rdx, %r10 +- adcq \$0, %r11 ++ adcq \$0, %rbx + + movq %r9, 16(%rsp) + movq %r10, 24(%rsp) +- shrq \$63, %rbx + + #third iteration +- movq 16($inp), %r9 +- movq 24($inp), %rax +- mulq %r9 ++ mulq %rbp + addq %rax, %r12 + movq 32($inp), %rax + movq %rdx, %rcx + adcq \$0, %rcx + +- mulq %r9 ++ mulq %rbp + addq %rax, %r13 + movq 40($inp), %rax + adcq \$0, %rdx +@@ -269,7 +268,7 @@ $code.=<<___; + movq %rdx, %rcx + adcq \$0, %rcx + +- mulq %r9 ++ mulq %rbp + addq %rax, %r14 + movq 48($inp), %rax + adcq \$0, %rdx +@@ -277,9 +276,7 @@ $code.=<<___; + movq %rdx, %rcx + adcq \$0, %rcx + +- mulq %r9 +- movq %r12, %r10 +- lea (%rbx,%r12,2), %r12 #shld \$1, %rbx, %r12 ++ mulq %rbp + addq %rax, %r15 + movq 56($inp), %rax + adcq \$0, %rdx +@@ -287,36 +284,40 @@ $code.=<<___; + movq %rdx, %rcx + adcq \$0, %rcx + +- mulq %r9 +- shrq \$63, %r10 ++ mulq %rbp + addq %rax, %r8 +- movq %r9, %rax ++ movq %rbp, %rax + adcq \$0, %rdx + addq %rcx, %r8 +- movq %rdx, %r9 +- adcq \$0, %r9 ++ adcq \$0, %rdx + +- movq %r13, %rcx +- leaq (%r10,%r13,2), %r13 #shld \$1, %r12, %r13 ++ xorq %rcx, %rcx # rcx:r12:r11 = r12:r11 << 1 ++ addq %r11, %r11 ++ movq %rdx, %r9 ++ adcq %r12, %r12 ++ adcq \$0, %rcx + + mulq %rax ++ addq %rbx, %rax ++ movq 24($inp), %r10 ++ adcq \$0, %rdx + addq %rax, %r11 ++ movq 32($inp), %rax + adcq %rdx, %r12 +- adcq \$0, %r13 ++ adcq \$0, %rcx + + movq %r11, 32(%rsp) + movq %r12, 40(%rsp) +- shrq \$63, %rcx + + #fourth iteration +- movq 24($inp), %r10 +- movq 32($inp), %rax ++ mov %rax, %r11 # 32($inp) + mulq %r10 + addq %rax, %r14 + movq 40($inp), %rax + movq %rdx, %rbx + adcq \$0, %rbx + ++ mov %rax, %r12 # 40($inp) + mulq %r10 + addq %rax, %r15 + movq 48($inp), %rax +@@ -325,9 +326,8 @@ $code.=<<___; + movq %rdx, %rbx + adcq \$0, %rbx + ++ mov %rax, %rbp # 48($inp) + mulq %r10 +- movq %r14, %r12 +- leaq (%rcx,%r14,2), %r14 #shld \$1, %rcx, %r14 + addq %rax, %r8 + movq 56($inp), %rax + adcq \$0, %rdx +@@ -336,32 +336,33 @@ $code.=<<___; + adcq \$0, %rbx + + mulq %r10 +- shrq \$63, %r12 + addq %rax, %r9 + movq %r10, %rax + adcq \$0, %rdx + addq %rbx, %r9 +- movq %rdx, %r10 +- adcq \$0, %r10 ++ adcq \$0, %rdx + +- movq %r15, %rbx +- leaq (%r12,%r15,2),%r15 #shld \$1, %r14, %r15 ++ xorq %rbx, %rbx # rbx:r13:r14 = r13:r14 << 1 ++ addq %r13, %r13 ++ movq %rdx, %r10 ++ adcq %r14, %r14 ++ adcq \$0, %rbx + + mulq %rax ++ addq %rcx, %rax ++ adcq \$0, %rdx + addq %rax, %r13 ++ movq %r12, %rax # 40($inp) + adcq %rdx, %r14 +- adcq \$0, %r15 ++ adcq \$0, %rbx + + movq %r13, 48(%rsp) + movq %r14, 56(%rsp) +- shrq \$63, %rbx + + #fifth iteration +- movq 32($inp), %r11 +- movq 40($inp), %rax + mulq %r11 + addq %rax, %r8 +- movq 48($inp), %rax ++ movq %rbp, %rax # 48($inp) + movq %rdx, %rcx + adcq \$0, %rcx + +@@ -369,97 +370,99 @@ $code.=<<___; + addq %rax, %r9 + movq 56($inp), %rax + adcq \$0, %rdx +- movq %r8, %r12 +- leaq (%rbx,%r8,2), %r8 #shld \$1, %rbx, %r8 + addq %rcx, %r9 + movq %rdx, %rcx + adcq \$0, %rcx + ++ mov %rax, %r14 # 56($inp) + mulq %r11 +- shrq \$63, %r12 + addq %rax, %r10 + movq %r11, %rax + adcq \$0, %rdx + addq %rcx, %r10 +- movq %rdx, %r11 +- adcq \$0, %r11 ++ adcq \$0, %rdx + +- movq %r9, %rcx +- leaq (%r12,%r9,2), %r9 #shld \$1, %r8, %r9 ++ xorq %rcx, %rcx # rcx:r8:r15 = r8:r15 << 1 ++ addq %r15, %r15 ++ movq %rdx, %r11 ++ adcq %r8, %r8 ++ adcq \$0, %rcx + + mulq %rax ++ addq %rbx, %rax ++ adcq \$0, %rdx + addq %rax, %r15 ++ movq %rbp, %rax # 48($inp) + adcq %rdx, %r8 +- adcq \$0, %r9 ++ adcq \$0, %rcx + + movq %r15, 64(%rsp) + movq %r8, 72(%rsp) +- shrq \$63, %rcx + + #sixth iteration +- movq 40($inp), %r12 +- movq 48($inp), %rax + mulq %r12 + addq %rax, %r10 +- movq 56($inp), %rax ++ movq %r14, %rax # 56($inp) + movq %rdx, %rbx + adcq \$0, %rbx + + mulq %r12 + addq %rax, %r11 + movq %r12, %rax +- movq %r10, %r15 +- leaq (%rcx,%r10,2), %r10 #shld \$1, %rcx, %r10 + adcq \$0, %rdx +- shrq \$63, %r15 + addq %rbx, %r11 +- movq %rdx, %r12 +- adcq \$0, %r12 ++ adcq \$0, %rdx + +- movq %r11, %rbx +- leaq (%r15,%r11,2), %r11 #shld \$1, %r10, %r11 ++ xorq %rbx, %rbx # rbx:r10:r9 = r10:r9 << 1 ++ addq %r9, %r9 ++ movq %rdx, %r12 ++ adcq %r10, %r10 ++ adcq \$0, %rbx + + mulq %rax ++ addq %rcx, %rax ++ adcq \$0, %rdx + addq %rax, %r9 ++ movq %r14, %rax # 56($inp) + adcq %rdx, %r10 +- adcq \$0, %r11 ++ adcq \$0, %rbx + + movq %r9, 80(%rsp) + movq %r10, 88(%rsp) + + #seventh iteration +- movq 48($inp), %r13 +- movq 56($inp), %rax +- mulq %r13 ++ mulq %rbp + addq %rax, %r12 +- movq %r13, %rax +- movq %rdx, %r13 +- adcq \$0, %r13 ++ movq %rbp, %rax ++ adcq \$0, %rdx + +- xorq %r14, %r14 +- shlq \$1, %rbx +- adcq %r12, %r12 #shld \$1, %rbx, %r12 +- adcq %r13, %r13 #shld \$1, %r12, %r13 +- adcq %r14, %r14 #shld \$1, %r13, %r14 ++ xorq %rcx, %rcx # rcx:r12:r11 = r12:r11 << 1 ++ addq %r11, %r11 ++ movq %rdx, %r13 ++ adcq %r12, %r12 ++ adcq \$0, %rcx + + mulq %rax ++ addq %rbx, %rax ++ adcq \$0, %rdx + addq %rax, %r11 ++ movq %r14, %rax # 56($inp) + adcq %rdx, %r12 +- adcq \$0, %r13 ++ adcq \$0, %rcx + + movq %r11, 96(%rsp) + movq %r12, 104(%rsp) + + #eighth iteration +- movq 56($inp), %rax ++ xorq %rbx, %rbx # rbx:r13 = r13 << 1 ++ addq %r13, %r13 ++ adcq \$0, %rbx ++ + mulq %rax +- addq %rax, %r13 ++ addq %rcx, %rax + adcq \$0, %rdx +- +- addq %rdx, %r14 +- +- movq %r13, 112(%rsp) +- movq %r14, 120(%rsp) ++ addq %r13, %rax ++ adcq %rbx, %rdx + + movq (%rsp), %r8 + movq 8(%rsp), %r9 +@@ -469,6 +472,10 @@ $code.=<<___; + movq 40(%rsp), %r13 + movq 48(%rsp), %r14 + movq 56(%rsp), %r15 ++ movq %xmm1, %rbp ++ ++ movq %rax, 112(%rsp) ++ movq %rdx, 120(%rsp) + + call __rsaz_512_reduce + +@@ -500,9 +507,9 @@ $code.=<<___; + .Loop_sqrx: + movl $times,128+8(%rsp) + movq $out, %xmm0 # off-load +- movq %rbp, %xmm1 # off-load + #first iteration + mulx %rax, %r8, %r9 ++ mov %rax, %rbx + + mulx 16($inp), %rcx, %r10 + xor %rbp, %rbp # cf=0, of=0 +@@ -510,40 +517,39 @@ $code.=<<___; + mulx 24($inp), %rax, %r11 + adcx %rcx, %r9 + +- mulx 32($inp), %rcx, %r12 ++ .byte 0xc4,0x62,0xf3,0xf6,0xa6,0x20,0x00,0x00,0x00 # mulx 32($inp), %rcx, %r12 + adcx %rax, %r10 + +- mulx 40($inp), %rax, %r13 ++ .byte 0xc4,0x62,0xfb,0xf6,0xae,0x28,0x00,0x00,0x00 # mulx 40($inp), %rax, %r13 + adcx %rcx, %r11 + +- .byte 0xc4,0x62,0xf3,0xf6,0xb6,0x30,0x00,0x00,0x00 # mulx 48($inp), %rcx, %r14 ++ mulx 48($inp), %rcx, %r14 + adcx %rax, %r12 + adcx %rcx, %r13 + +- .byte 0xc4,0x62,0xfb,0xf6,0xbe,0x38,0x00,0x00,0x00 # mulx 56($inp), %rax, %r15 ++ mulx 56($inp), %rax, %r15 + adcx %rax, %r14 + adcx %rbp, %r15 # %rbp is 0 + +- mov %r9, %rcx +- shld \$1, %r8, %r9 +- shl \$1, %r8 +- +- xor %ebp, %ebp +- mulx %rdx, %rax, %rdx +- adcx %rdx, %r8 +- mov 8($inp), %rdx +- adcx %rbp, %r9 ++ mulx %rdx, %rax, $out ++ mov %rbx, %rdx # 8($inp) ++ xor %rcx, %rcx ++ adox %r8, %r8 ++ adcx $out, %r8 ++ adox %rbp, %rcx ++ adcx %rbp, %rcx + + mov %rax, (%rsp) + mov %r8, 8(%rsp) + + #second iteration +- mulx 16($inp), %rax, %rbx ++ .byte 0xc4,0xe2,0xfb,0xf6,0x9e,0x10,0x00,0x00,0x00 # mulx 16($inp), %rax, %rbx + adox %rax, %r10 + adcx %rbx, %r11 + +- .byte 0xc4,0x62,0xc3,0xf6,0x86,0x18,0x00,0x00,0x00 # mulx 24($inp), $out, %r8 ++ mulx 24($inp), $out, %r8 + adox $out, %r11 ++ .byte 0x66 + adcx %r8, %r12 + + mulx 32($inp), %rax, %rbx +@@ -561,24 +567,25 @@ $code.=<<___; + .byte 0xc4,0x62,0xc3,0xf6,0x86,0x38,0x00,0x00,0x00 # mulx 56($inp), $out, %r8 + adox $out, %r15 + adcx %rbp, %r8 ++ mulx %rdx, %rax, $out + adox %rbp, %r8 ++ .byte 0x48,0x8b,0x96,0x10,0x00,0x00,0x00 # mov 16($inp), %rdx + +- mov %r11, %rbx +- shld \$1, %r10, %r11 +- shld \$1, %rcx, %r10 +- +- xor %ebp,%ebp +- mulx %rdx, %rax, %rcx +- mov 16($inp), %rdx ++ xor %rbx, %rbx ++ adcx %rcx, %rax ++ adox %r9, %r9 ++ adcx %rbp, $out ++ adox %r10, %r10 + adcx %rax, %r9 +- adcx %rcx, %r10 +- adcx %rbp, %r11 ++ adox %rbp, %rbx ++ adcx $out, %r10 ++ adcx %rbp, %rbx + + mov %r9, 16(%rsp) + .byte 0x4c,0x89,0x94,0x24,0x18,0x00,0x00,0x00 # mov %r10, 24(%rsp) + + #third iteration +- .byte 0xc4,0x62,0xc3,0xf6,0x8e,0x18,0x00,0x00,0x00 # mulx 24($inp), $out, %r9 ++ mulx 24($inp), $out, %r9 + adox $out, %r12 + adcx %r9, %r13 + +@@ -586,7 +593,7 @@ $code.=<<___; + adox %rax, %r13 + adcx %rcx, %r14 + +- mulx 40($inp), $out, %r9 ++ .byte 0xc4,0x62,0xc3,0xf6,0x8e,0x28,0x00,0x00,0x00 # mulx 40($inp), $out, %r9 + adox $out, %r14 + adcx %r9, %r15 + +@@ -594,27 +601,28 @@ $code.=<<___; + adox %rax, %r15 + adcx %rcx, %r8 + +- .byte 0xc4,0x62,0xc3,0xf6,0x8e,0x38,0x00,0x00,0x00 # mulx 56($inp), $out, %r9 ++ mulx 56($inp), $out, %r9 + adox $out, %r8 + adcx %rbp, %r9 ++ mulx %rdx, %rax, $out + adox %rbp, %r9 ++ mov 24($inp), %rdx + +- mov %r13, %rcx +- shld \$1, %r12, %r13 +- shld \$1, %rbx, %r12 +- +- xor %ebp, %ebp +- mulx %rdx, %rax, %rdx ++ xor %rcx, %rcx ++ adcx %rbx, %rax ++ adox %r11, %r11 ++ adcx %rbp, $out ++ adox %r12, %r12 + adcx %rax, %r11 +- adcx %rdx, %r12 +- mov 24($inp), %rdx +- adcx %rbp, %r13 ++ adox %rbp, %rcx ++ adcx $out, %r12 ++ adcx %rbp, %rcx + + mov %r11, 32(%rsp) +- .byte 0x4c,0x89,0xa4,0x24,0x28,0x00,0x00,0x00 # mov %r12, 40(%rsp) ++ mov %r12, 40(%rsp) + + #fourth iteration +- .byte 0xc4,0xe2,0xfb,0xf6,0x9e,0x20,0x00,0x00,0x00 # mulx 32($inp), %rax, %rbx ++ mulx 32($inp), %rax, %rbx + adox %rax, %r14 + adcx %rbx, %r15 + +@@ -629,25 +637,25 @@ $code.=<<___; + mulx 56($inp), $out, %r10 + adox $out, %r9 + adcx %rbp, %r10 ++ mulx %rdx, %rax, $out + adox %rbp, %r10 ++ mov 32($inp), %rdx + +- .byte 0x66 +- mov %r15, %rbx +- shld \$1, %r14, %r15 +- shld \$1, %rcx, %r14 +- +- xor %ebp, %ebp +- mulx %rdx, %rax, %rdx ++ xor %rbx, %rbx ++ adcx %rcx, %rax ++ adox %r13, %r13 ++ adcx %rbp, $out ++ adox %r14, %r14 + adcx %rax, %r13 +- adcx %rdx, %r14 +- mov 32($inp), %rdx +- adcx %rbp, %r15 ++ adox %rbp, %rbx ++ adcx $out, %r14 ++ adcx %rbp, %rbx + + mov %r13, 48(%rsp) + mov %r14, 56(%rsp) + + #fifth iteration +- .byte 0xc4,0x62,0xc3,0xf6,0x9e,0x28,0x00,0x00,0x00 # mulx 40($inp), $out, %r11 ++ mulx 40($inp), $out, %r11 + adox $out, %r8 + adcx %r11, %r9 + +@@ -658,18 +666,19 @@ $code.=<<___; + mulx 56($inp), $out, %r11 + adox $out, %r10 + adcx %rbp, %r11 ++ mulx %rdx, %rax, $out ++ mov 40($inp), %rdx + adox %rbp, %r11 + +- mov %r9, %rcx +- shld \$1, %r8, %r9 +- shld \$1, %rbx, %r8 +- +- xor %ebp, %ebp +- mulx %rdx, %rax, %rdx ++ xor %rcx, %rcx ++ adcx %rbx, %rax ++ adox %r15, %r15 ++ adcx %rbp, $out ++ adox %r8, %r8 + adcx %rax, %r15 +- adcx %rdx, %r8 +- mov 40($inp), %rdx +- adcx %rbp, %r9 ++ adox %rbp, %rcx ++ adcx $out, %r8 ++ adcx %rbp, %rcx + + mov %r15, 64(%rsp) + mov %r8, 72(%rsp) +@@ -682,18 +691,19 @@ $code.=<<___; + .byte 0xc4,0x62,0xc3,0xf6,0xa6,0x38,0x00,0x00,0x00 # mulx 56($inp), $out, %r12 + adox $out, %r11 + adcx %rbp, %r12 ++ mulx %rdx, %rax, $out + adox %rbp, %r12 ++ mov 48($inp), %rdx + +- mov %r11, %rbx +- shld \$1, %r10, %r11 +- shld \$1, %rcx, %r10 +- +- xor %ebp, %ebp +- mulx %rdx, %rax, %rdx ++ xor %rbx, %rbx ++ adcx %rcx, %rax ++ adox %r9, %r9 ++ adcx %rbp, $out ++ adox %r10, %r10 + adcx %rax, %r9 +- adcx %rdx, %r10 +- mov 48($inp), %rdx +- adcx %rbp, %r11 ++ adcx $out, %r10 ++ adox %rbp, %rbx ++ adcx %rbp, %rbx + + mov %r9, 80(%rsp) + mov %r10, 88(%rsp) +@@ -703,31 +713,31 @@ $code.=<<___; + adox %rax, %r12 + adox %rbp, %r13 + +- xor %r14, %r14 +- shld \$1, %r13, %r14 +- shld \$1, %r12, %r13 +- shld \$1, %rbx, %r12 +- +- xor %ebp, %ebp +- mulx %rdx, %rax, %rdx +- adcx %rax, %r11 +- adcx %rdx, %r12 ++ mulx %rdx, %rax, $out ++ xor %rcx, %rcx + mov 56($inp), %rdx +- adcx %rbp, %r13 ++ adcx %rbx, %rax ++ adox %r11, %r11 ++ adcx %rbp, $out ++ adox %r12, %r12 ++ adcx %rax, %r11 ++ adox %rbp, %rcx ++ adcx $out, %r12 ++ adcx %rbp, %rcx + + .byte 0x4c,0x89,0x9c,0x24,0x60,0x00,0x00,0x00 # mov %r11, 96(%rsp) + .byte 0x4c,0x89,0xa4,0x24,0x68,0x00,0x00,0x00 # mov %r12, 104(%rsp) + + #eighth iteration + mulx %rdx, %rax, %rdx +- adox %rax, %r13 +- adox %rbp, %rdx ++ xor %rbx, %rbx ++ adcx %rcx, %rax ++ adox %r13, %r13 ++ adcx %rbp, %rdx ++ adox %rbp, %rbx ++ adcx %r13, %rax ++ adcx %rdx, %rbx + +- .byte 0x66 +- add %rdx, %r14 +- +- movq %r13, 112(%rsp) +- movq %r14, 120(%rsp) + movq %xmm0, $out + movq %xmm1, %rbp + +@@ -741,6 +751,9 @@ $code.=<<___; + movq 48(%rsp), %r14 + movq 56(%rsp), %r15 + ++ movq %rax, 112(%rsp) ++ movq %rbx, 120(%rsp) ++ + call __rsaz_512_reducex + + addq 64(%rsp), %r8 +-- +2.17.1 + diff --git a/system/openssl/ppc64.patch b/system/openssl/ppc64.patch new file mode 100644 index 000000000..5f79c4ddc --- /dev/null +++ b/system/openssl/ppc64.patch @@ -0,0 +1,96 @@ +From 34ab13b7d8e3e723adb60be8142e38b7c9cd382a Mon Sep 17 00:00:00 2001 +From: Andy Polyakov <appro@openssl.org> +Date: Sun, 5 May 2019 18:25:50 +0200 +Subject: [PATCH] crypto/perlasm/ppc-xlate.pl: add linux64v2 flavour +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This is a big endian ELFv2 configuration. ELFv2 was already being +used for little endian, and big endian was traditionally ELFv1 +but there are practical configurations that use ELFv2 with big +endian nowadays (Adélie Linux, Void Linux, possibly Gentoo, etc.) + +Reviewed-by: Paul Dale <paul.dale@oracle.com> +Reviewed-by: Richard Levitte <levitte@openssl.org> +(Merged from https://github.com/openssl/openssl/pull/8883) +--- + crypto/perlasm/ppc-xlate.pl | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/crypto/perlasm/ppc-xlate.pl b/crypto/perlasm/ppc-xlate.pl +index e52f2f6ea62..5fcd0526dff 100755 +--- a/crypto/perlasm/ppc-xlate.pl ++++ b/crypto/perlasm/ppc-xlate.pl +@@ -49,7 +49,7 @@ + /osx/ && do { $name = "_$name"; + last; + }; +- /linux.*(32|64le)/ ++ /linux.*(32|64(le|v2))/ + && do { $ret .= ".globl $name"; + if (!$$type) { + $ret .= "\n.type $name,\@function"; +@@ -80,7 +80,7 @@ + }; + my $text = sub { + my $ret = ($flavour =~ /aix/) ? ".csect\t.text[PR],7" : ".text"; +- $ret = ".abiversion 2\n".$ret if ($flavour =~ /linux.*64le/); ++ $ret = ".abiversion 2\n".$ret if ($flavour =~ /linux.*64(le|v2)/); + $ret; + }; + my $machine = sub { +@@ -186,7 +186,7 @@ + + # Some ABIs specify vrsave, special-purpose register #256, as reserved + # for system use. +-my $no_vrsave = ($flavour =~ /aix|linux64le/); ++my $no_vrsave = ($flavour =~ /aix|linux64(le|v2)/); + my $mtspr = sub { + my ($f,$idx,$ra) = @_; + if ($idx == 256 && $no_vrsave) { +@@ -318,7 +318,7 @@ sub vfour { + if ($label) { + my $xlated = ($GLOBALS{$label} or $label); + print "$xlated:"; +- if ($flavour =~ /linux.*64le/) { ++ if ($flavour =~ /linux.*64(le|v2)/) { + if ($TYPES{$label} =~ /function/) { + printf "\n.localentry %s,0\n",$xlated; + } + +From 098404128383ded87ba390dd74ecd9e2ffa6f530 Mon Sep 17 00:00:00 2001 +From: Andy Polyakov <appro@openssl.org> +Date: Sun, 5 May 2019 18:30:55 +0200 +Subject: [PATCH] Configure: use ELFv2 ABI on some ppc64 big endian systems + +If _CALL_ELF is defined to be 2, it's an ELFv2 system. +Conditionally switch to the v2 perlasm scheme. + +Reviewed-by: Paul Dale <paul.dale@oracle.com> +Reviewed-by: Richard Levitte <levitte@openssl.org> +(Merged from https://github.com/openssl/openssl/pull/8883) +--- + Configure | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/Configure b/Configure +index 22082deb4c7..e303d98deb3 100755 +--- a/Configure ++++ b/Configure +@@ -1411,8 +1410,15 @@ + my %predefined_C = compiler_predefined($config{CROSS_COMPILE}.$config{CC}); + my %predefined_CXX = $config{CXX} + ? compiler_predefined($config{CROSS_COMPILE}.$config{CXX}) + : (); + ++unless ($disabled{asm}) { ++ # big endian systems can use ELFv2 ABI ++ if ($target eq "linux-ppc64") { ++ $target{perlasm_scheme} = "linux64v2" if ($predefined_C{_CALL_ELF} == 2); ++ } ++} ++ + # Check for makedepend capabilities. + if (!$disabled{makedepend}) { + if ($config{target} =~ /^(VC|vms)-/) { diff --git a/system/patch/APKBUILD b/system/patch/APKBUILD index 5831ede3a..b299382c9 100644 --- a/system/patch/APKBUILD +++ b/system/patch/APKBUILD @@ -1,4 +1,4 @@ -# Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Maintainer: Kiyoshi Aman <adelie@aerdan.vulpine.house> pkgname=patch pkgver=2.7.6 pkgrel=4 diff --git a/system/perl-encode-eucjpascii/APKBUILD b/system/perl-encode-eucjpascii/APKBUILD index adb4c21de..02ed7b7e3 100644 --- a/system/perl-encode-eucjpascii/APKBUILD +++ b/system/perl-encode-eucjpascii/APKBUILD @@ -1,4 +1,4 @@ -# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> # Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org> pkgname=perl-encode-eucjpascii _pkgreal=Encode-EUCJPASCII diff --git a/system/perl-encode-hanextra/APKBUILD b/system/perl-encode-hanextra/APKBUILD index f00fb7a15..6d52e5647 100644 --- a/system/perl-encode-hanextra/APKBUILD +++ b/system/perl-encode-hanextra/APKBUILD @@ -1,4 +1,4 @@ -# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> # Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org> pkgname=perl-encode-hanextra _pkgreal=Encode-HanExtra diff --git a/system/perl-encode-iso2022/APKBUILD b/system/perl-encode-iso2022/APKBUILD index d9e9928a0..b59b3a5cb 100644 --- a/system/perl-encode-iso2022/APKBUILD +++ b/system/perl-encode-iso2022/APKBUILD @@ -1,4 +1,4 @@ -# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> # Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org> pkgname=perl-encode-iso2022 _pkgreal=Encode-ISO2022 diff --git a/system/perl-encode-jisx0213/APKBUILD b/system/perl-encode-jisx0213/APKBUILD index 9d939a39b..5a956d1aa 100644 --- a/system/perl-encode-jisx0213/APKBUILD +++ b/system/perl-encode-jisx0213/APKBUILD @@ -1,4 +1,4 @@ -# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> # Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org> pkgname=perl-encode-jisx0213 _pkgreal=Encode-JISX0213 diff --git a/system/perl-http-message/APKBUILD b/system/perl-http-message/APKBUILD index 39f8523dc..839df093e 100644 --- a/system/perl-http-message/APKBUILD +++ b/system/perl-http-message/APKBUILD @@ -1,5 +1,5 @@ # Automatically generated by apkbuild-cpan, template 1 -# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> # Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org> pkgname=perl-http-message _pkgreal=HTTP-Message diff --git a/system/perl-json/APKBUILD b/system/perl-json/APKBUILD index ee0c36dc8..e3ce567bb 100644 --- a/system/perl-json/APKBUILD +++ b/system/perl-json/APKBUILD @@ -1,4 +1,4 @@ -# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> # Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org> pkgname=perl-json _pkgreal=JSON diff --git a/system/perl-mime-charset/APKBUILD b/system/perl-mime-charset/APKBUILD index 2dd9090bc..4a04e17e9 100644 --- a/system/perl-mime-charset/APKBUILD +++ b/system/perl-mime-charset/APKBUILD @@ -1,4 +1,4 @@ -# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> # Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org> pkgname=perl-mime-charset _pkgreal=MIME-Charset diff --git a/system/perl-pod2-base/APKBUILD b/system/perl-pod2-base/APKBUILD index 5ba39c600..05703bcf6 100644 --- a/system/perl-pod2-base/APKBUILD +++ b/system/perl-pod2-base/APKBUILD @@ -1,4 +1,4 @@ -# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> # Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org> pkgname=perl-pod2-base _pkgreal=POD2-Base diff --git a/system/perl-sgmls/APKBUILD b/system/perl-sgmls/APKBUILD index a4991b8f2..e6ceae295 100644 --- a/system/perl-sgmls/APKBUILD +++ b/system/perl-sgmls/APKBUILD @@ -1,4 +1,4 @@ -# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> # Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org> pkgname=perl-sgmls _pkgreal=SGMLSpm diff --git a/system/perl-test-fatal/APKBUILD b/system/perl-test-fatal/APKBUILD index f6336e2af..e97893fda 100644 --- a/system/perl-test-fatal/APKBUILD +++ b/system/perl-test-fatal/APKBUILD @@ -1,5 +1,5 @@ # Automatically generated by apkbuild-cpan, template 1 -# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> # Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org> pkgname=perl-test-fatal _pkgreal=Test-Fatal diff --git a/system/perl-test-needs/APKBUILD b/system/perl-test-needs/APKBUILD index 439a52ade..0d098b55c 100644 --- a/system/perl-test-needs/APKBUILD +++ b/system/perl-test-needs/APKBUILD @@ -1,4 +1,4 @@ -# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> # Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org> pkgname=perl-test-needs _pkgreal=Test-Needs diff --git a/system/perl-try-tiny/APKBUILD b/system/perl-try-tiny/APKBUILD index 36129e2a3..4078a2f5e 100644 --- a/system/perl-try-tiny/APKBUILD +++ b/system/perl-try-tiny/APKBUILD @@ -1,5 +1,5 @@ # Automatically generated by apkbuild-cpan, template 1 -# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> # Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org> pkgname=perl-try-tiny _pkgreal=Try-Tiny diff --git a/system/perl-unicode-linebreak/APKBUILD b/system/perl-unicode-linebreak/APKBUILD index 5bff8e644..907b970b3 100644 --- a/system/perl-unicode-linebreak/APKBUILD +++ b/system/perl-unicode-linebreak/APKBUILD @@ -1,4 +1,4 @@ -# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> # Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org> pkgname=perl-unicode-linebreak _pkgreal=Unicode-LineBreak diff --git a/system/perl-uri/APKBUILD b/system/perl-uri/APKBUILD index 13763a256..1f3cbec5c 100644 --- a/system/perl-uri/APKBUILD +++ b/system/perl-uri/APKBUILD @@ -1,4 +1,4 @@ -# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> # Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org> pkgname=perl-uri _pkgreal=URI diff --git a/system/perl/APKBUILD b/system/perl/APKBUILD index 4df8d9e58..f65edd034 100644 --- a/system/perl/APKBUILD +++ b/system/perl/APKBUILD @@ -1,6 +1,6 @@ # Contributor: Leonardo Arena <rnalrd@alpinelinux.org> # Contributor: Valery Kartel <valery.kartel@gmail.com> -# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> # Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org> # Proxy-For: solar pkgname=perl @@ -37,7 +37,6 @@ _archlib=/usr/lib/perl5/core_perl prepare() { chmod +w "$builddir"/*.c default_prepare - cd "$builddir" sed -e 's/less -R/less/g' \ -e 's/libswanted="\(.*\) nsl\(.*\)"/libswanted="\1\2"/g' \ -i ./Configure || @@ -50,7 +49,6 @@ prepare() { } build() { - cd "$builddir" BUILD_ZLIB=0 BUILD_BZIP2=0 BZIP2_LIB=/usr/lib @@ -89,12 +87,10 @@ build() { } check() { - cd "$builddir" make test } package() { - cd "$builddir" make DESTDIR="$pkgdir" install if [ -n "$(find $pkgdir/usr/local -type f)" ]; then error "files found under /usr/local" diff --git a/system/python3/APKBUILD b/system/python3/APKBUILD index f5d28b236..b8c72f3a7 100644 --- a/system/python3/APKBUILD +++ b/system/python3/APKBUILD @@ -1,4 +1,4 @@ -# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=python3 pkgver=3.6.9 diff --git a/system/rsync/APKBUILD b/system/rsync/APKBUILD index 926c741d0..e93da8552 100644 --- a/system/rsync/APKBUILD +++ b/system/rsync/APKBUILD @@ -1,5 +1,5 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> -# Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Maintainer: Kiyoshi Aman <adelie@aerdan.vulpine.house> pkgname=rsync pkgver=3.1.3 pkgrel=1 diff --git a/system/sed/APKBUILD b/system/sed/APKBUILD index 8b90aaee0..545d10970 100644 --- a/system/sed/APKBUILD +++ b/system/sed/APKBUILD @@ -1,5 +1,5 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> -# Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Maintainer: Kiyoshi Aman <adelie@aerdan.vulpine.house> pkgname=sed pkgver=4.7 pkgrel=0 diff --git a/system/uucp/APKBUILD b/system/uucp/APKBUILD index d17de7902..422f28ae5 100644 --- a/system/uucp/APKBUILD +++ b/system/uucp/APKBUILD @@ -1,5 +1,5 @@ -# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> -# Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Contributor: Kiyoshi Aman <adelie@aerdan.vulpine.house> +# Maintainer: Kiyoshi Aman <adelie@aerdan.vulpine.house> pkgname=uucp pkgver=1.07 pkgrel=0 diff --git a/system/vim/APKBUILD b/system/vim/APKBUILD index 0e17d805a..80698a759 100644 --- a/system/vim/APKBUILD +++ b/system/vim/APKBUILD @@ -2,7 +2,7 @@ # Contributor: Łukasz Jendrysik <scadu@yandex.com> # Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> # Contributor: Natanael Copa <ncopa@alpinelinux.org> -# Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Maintainer: Kiyoshi Aman <adelie@aerdan.vulpine.house> pkgname=vim pkgver=8.1.2311 pkgrel=0 diff --git a/system/zsh/APKBUILD b/system/zsh/APKBUILD index a85083fc4..3bc96b226 100644 --- a/system/zsh/APKBUILD +++ b/system/zsh/APKBUILD @@ -4,7 +4,7 @@ # Maintainer: Dan Theisen <djt@hxx.in> pkgname=zsh pkgver=5.7.1 -pkgrel=2 +pkgrel=3 pkgdesc="A very advanced and programmable command interpreter (shell)" url="https://www.zsh.org/" arch="all" @@ -98,6 +98,7 @@ build() { --enable-unicode9 \ --enable-multibyte \ --enable-function-subdirs \ + --enable-zprofile=/etc/zsh/zprofile \ --enable-zsh-secure-free \ --with-tcsetpgrp make @@ -179,5 +180,5 @@ _submv() { sha512sums="a6aa88e1955a80229a4784a128866e325f79a8b5f73c922ab480048411036f1835cbb31daa30ab38bd16ab2a50040eda8f4f1f64704b21b6acc3051b1dbf18d0 zsh-5.7.1.tar.xz d820fcf65bb3c52f23e968110b5df1188fc0b64079312f64d22ffe35de3b4f3055d4d629b3b0f97a1bfaddf62dbc80676af31c3a1a79645632082abfc854cf97 skel -e90723eb790581419498f3ab86fb5d6cab4aaede8c87eb79ead7047d259b643cfb47f4d1beb06d03e038cfda3a20ef9dd4c1b417270ab55c688e166fe30ef4f6 zprofile +63167188e22bf8933eb420a5ba068ab897531b90c8d8b8ec892f26a9180267a971013046a72b810d5b9d3add427cf650df608b0e008cd0789681ed1371b172c3 zprofile 1675e016f97333cad89b587f4292d81b6bc10e27b75482e3e0c3808539c95bd49b907b6579fb98d817f77f2f2384c0df5afa3e2b6f43b6ae9b466925cd9ccffc zshrc" diff --git a/system/zsh/zprofile b/system/zsh/zprofile index 50cbdaaaa..df7a3f76e 100644 --- a/system/zsh/zprofile +++ b/system/zsh/zprofile @@ -2,8 +2,6 @@ # /etc/zprofile and ~/.zprofile are run for login shells # -export PATH="$PATH:$HOME/bin" - _src_etc_profile() { # Make /etc/profile happier, and have possible ~/.zshenv options like |