From de68ad095db7cdd06c45c53c47e7cbcb3fdf8bf6 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 9 Oct 2018 05:32:35 +0200 Subject: gnu: zstd: Update to 1.3.6. * gnu/packages/compression.scm (zstd): Update to 1.3.6. [source]: Remove merged patches. * gnu/packages/patches/zstd-fix-stdin-list-test.patch, gnu/packages/patches/zstd-fix-stdin-list-without-tty.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Remove them. --- gnu/local.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index ea2d650e28..821e83a675 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1247,9 +1247,7 @@ dist_patch_DATA = \ %D%/packages/patches/xinetd-CVE-2013-4342.patch \ %D%/packages/patches/xmodmap-asprintf.patch \ %D%/packages/patches/zathura-pdf-mupdf-link-to-jpeg-libraries.patch \ - %D%/packages/patches/zathura-plugindir-environment-variable.patch \ - %D%/packages/patches/zstd-fix-stdin-list-without-tty.patch \ - %D%/packages/patches/zstd-fix-stdin-list-test.patch + %D%/packages/patches/zathura-plugindir-environment-variable.patch MISC_DISTRO_FILES = \ %D%/packages/ld-wrapper.in -- cgit v1.2.3 From e4c399fe155b2d268e41656edc0a55f718cb1100 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 9 Oct 2018 20:27:37 +0300 Subject: gnu: clisp: Update to 2.49.92. * gnu/packages/lisp.scm (clisp): Update to 2.49.92. [source]: Switch to git-fetch. Remove unneeded patch. [arguments]: Remove '--enable-portability' flag, add CFLAGS for armhf-linux. Update list of files needing substitutions in custom 'patch-sh-and-pwd phase. [home-page]: Update to new home-page. * gnu/packages/patches/clisp-glibc-2.26.patch: Remove file. & gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/lisp.scm | 36 +++++++++++++++++------------ gnu/packages/patches/clisp-glibc-2.26.patch | 20 ---------------- 3 files changed, 21 insertions(+), 36 deletions(-) delete mode 100644 gnu/packages/patches/clisp-glibc-2.26.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 821e83a675..af3773c893 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -621,7 +621,6 @@ dist_patch_DATA = \ %D%/packages/patches/clementine-fix-sqlite.patch \ %D%/packages/patches/clementine-remove-crypto++-dependency.patch \ %D%/packages/patches/clementine-use-openssl.patch \ - %D%/packages/patches/clisp-glibc-2.26.patch \ %D%/packages/patches/clisp-remove-failing-test.patch \ %D%/packages/patches/clucene-pkgconfig.patch \ %D%/packages/patches/clx-remove-demo.patch \ diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 82ba6eedf0..ef98de057a 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -35,7 +35,6 @@ #:use-module (gnu packages m4) #:use-module (guix download) #:use-module (guix git-download) - #:use-module (guix hg-download) #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system asdf) @@ -256,28 +255,31 @@ supporting ASDF, Sockets, Gray streams, MOP, and other useful components.") (define-public clisp (package (name "clisp") - (version "2.49-60") + (version "2.49-92") (source (origin - (method hg-fetch) - (uri (hg-reference - (url "http://hg.code.sf.net/p/clisp/clisp") - (changeset "clisp_2_49_60-2017-06-25"))) - (file-name (string-append name "-" version "-checkout")) + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/gnu-clisp/clisp") + (commit "clisp-2.49.92-2018-02-18"))) + (file-name (git-file-name name version)) (sha256 - (base32 "0qjv3z274rbdmb941hy03hl63f4z7bmci234f8dyz4skgfr82d3i")) - (patches (search-patches "clisp-glibc-2.26.patch" - "clisp-remove-failing-test.patch")))) + (base32 "0k2dmgl0miz3767iks4p0mvp6xw0ysyxhjpklyh11j010rmh6hqb")) + (patches (search-patches "clisp-remove-failing-test.patch")))) (build-system gnu-build-system) (inputs `(("libffcall" ,libffcall) ("ncurses" ,ncurses) ("readline" ,readline) ("libsigsegv" ,libsigsegv))) (arguments - '(#:configure-flags '("--enable-portability" - "--with-dynamic-ffi" - "--with-dynamic-modules" - "--with-module=rawsock") + `(#:configure-flags '(,@(if (string-prefix? "armhf-linux" + (or (%current-system) + (%current-target-system))) + '("CFLAGS=-falign-functions=4") + '()) + "--with-dynamic-ffi" + "--with-dynamic-modules" + "--with-module=rawsock") #:build #f #:phases (modify-phases %standard-phases @@ -288,6 +290,10 @@ supporting ASDF, Sockets, Gray streams, MOP, and other useful components.") ;; many places where our automatic patching misses them. Therefore ;; we do the following, in this early (post-unpack) phase, to solve ;; the problem from its root. + (substitute* '("src/clisp-link.in" + "src/unix.d" + "src/makemake.in") + (("/bin/sh") (which "sh"))) (substitute* (find-files "." "configure|Makefile") (("/bin/sh") "sh")) (substitute* '("src/clisp-link.in") @@ -295,7 +301,7 @@ supporting ASDF, Sockets, Gray streams, MOP, and other useful components.") #t))) ;; Makefiles seem to have race conditions. #:parallel-build? #f)) - (home-page "http://www.clisp.org/") + (home-page "https://clisp.sourceforge.io/") (synopsis "A Common Lisp implementation") (description "GNU CLISP is an implementation of ANSI Common Lisp. Common Lisp is a diff --git a/gnu/packages/patches/clisp-glibc-2.26.patch b/gnu/packages/patches/clisp-glibc-2.26.patch deleted file mode 100644 index c8920ceccc..0000000000 --- a/gnu/packages/patches/clisp-glibc-2.26.patch +++ /dev/null @@ -1,20 +0,0 @@ -This patch comes from Debian. - -Description: cfree is not present in glibc-2.26, stop wrapping it -Author: Adam Conrad -Bug: https://sourceforge.net/p/clisp/bugs/717/ -Bug-Debian: https://bugs.debian.org/880686 -Applied-Upstream: https://sourceforge.net/p/clisp/clisp/ci/3bc928712d150ff1e5f6b2bfb7838655f3ff52fa/ -Reviewed-By: Sébastien Villemot -Last-Update: 2017-11-27 - ---- clisp-2.49.20170913.orig/modules/bindings/glibc/linux.lisp -+++ clisp-2.49.20170913/modules/bindings/glibc/linux.lisp -@@ -649,7 +649,6 @@ - (def-call-out calloc (:arguments (nmemb size_t) (size size_t)) - (:return-type c-pointer)) - (def-call-out free (:arguments (ptr c-pointer)) (:return-type nil)) --(def-call-out cfree (:arguments (ptr c-pointer)) (:return-type nil)) - (def-call-out valloc (:arguments (size size_t)) (:return-type c-pointer)) - - (def-call-out abort (:arguments) (:return-type nil)) -- cgit v1.2.3 From dfe05297f3922a0403a9d788bc4d87502e148d87 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 15 Oct 2018 06:04:49 +0200 Subject: gnu: x265: Update to 2.9. * gnu/packages/video.scm (x265): Update to 2.9. [source]: Remove x265-fix-ppc64le-build.patch. * gnu/packages/patches/x265-fix-ppc64le-build.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/patches/x265-fix-ppc64le-build.patch | 25 ----------------------- gnu/packages/video.scm | 7 +++---- 3 files changed, 3 insertions(+), 30 deletions(-) delete mode 100644 gnu/packages/patches/x265-fix-ppc64le-build.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index af3773c893..4c0485c04f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1228,7 +1228,6 @@ dist_patch_DATA = \ %D%/packages/patches/wpa-supplicant-krack-followups.patch \ %D%/packages/patches/wxmaxima-do-not-use-old-gnuplot-parameters.patch \ %D%/packages/patches/x265-arm-asm-primitives.patch \ - %D%/packages/patches/x265-fix-ppc64le-build.patch \ %D%/packages/patches/xapian-revert-5489fb2f8.patch \ %D%/packages/patches/xboing-CVE-2004-0149.patch \ %D%/packages/patches/xf86-video-ark-remove-mibstore.patch \ diff --git a/gnu/packages/patches/x265-fix-ppc64le-build.patch b/gnu/packages/patches/x265-fix-ppc64le-build.patch deleted file mode 100644 index f71d2436ab..0000000000 --- a/gnu/packages/patches/x265-fix-ppc64le-build.patch +++ /dev/null @@ -1,25 +0,0 @@ -https://sources.debian.org/data/main/x/x265/2.8-3/debian/patches/0003-Fix-build-error-on-on-ppc64le.patch - -This patch also fixes building on armhf-linux and aarch64-linux - -From: Jayashree -Date: Fri, 25 May 2018 10:26:05 +0530 -Subject: Fix build error on on ppc64le - ---- - source/common/param.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/source/common/param.cpp b/source/common/param.cpp -index 31bcbc7..4a6d0c8 100644 ---- a/source/common/param.cpp -+++ b/source/common/param.cpp -@@ -633,7 +633,7 @@ int x265_param_parse(x265_param* p, const char* name, const char* value) - if (bValueWasNull) - p->cpuid = atobool(value); - else -- p->cpuid = parseCpuName(value, bError); -+ p->cpuid = parseCpuName(value, bError, false); - #endif - } - OPT("fps") diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 3e191ef6da..e281bf8fff 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -392,7 +392,7 @@ and creating Matroska files from other media files (@code{mkvmerge}).") (define-public x265 (package (name "x265") - (version "2.8") + (version "2.9") (source (origin (method url-fetch) @@ -400,9 +400,8 @@ and creating Matroska files from other media files (@code{mkvmerge}).") "x265_" version ".tar.gz")) (sha256 (base32 - "0qx8mavwdzdpkkby7n29i9av7zsnklavacwfz537mf62q2pzjnbf")) - (patches (search-patches "x265-fix-ppc64le-build.patch" - "x265-arm-asm-primitives.patch")) + "090hp4216isis8q5gb7bwzia8rfyzni54z21jnwm97x3hiy6ibpb")) + (patches (search-patches "x265-arm-asm-primitives.patch")) (modules '((guix build utils))) (snippet '(begin (delete-file-recursively "source/compat/getopt") -- cgit v1.2.3 From b7028a16e6fe4f9634cd7d550b3a79450fc4e0db Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 15 Oct 2018 11:33:51 +0300 Subject: gnu: x265: Fix building on armhf-linux and aarch64-linux. * gnu/packages/video.scm (x265)[source]: Update list of patches. [arguments]: Change configure flag to ensure PIC for all architectures. * gnu/packages/patches/x265-arm-asm-primitives.patch: Remove file. * gnu/packages/patches/x265-detect512-all-arches.patch: New file. * gnu/local.mk (dist_patch_DATA): Update patch registry. --- gnu/local.mk | 2 +- gnu/packages/patches/x265-arm-asm-primitives.patch | 360 --------------------- .../patches/x265-detect512-all-arches.patch | 37 +++ gnu/packages/video.scm | 10 +- 4 files changed, 41 insertions(+), 368 deletions(-) delete mode 100644 gnu/packages/patches/x265-arm-asm-primitives.patch create mode 100644 gnu/packages/patches/x265-detect512-all-arches.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 4c0485c04f..1fa2eaba31 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1227,7 +1227,7 @@ dist_patch_DATA = \ %D%/packages/patches/wpa-supplicant-fix-nonce-reuse.patch \ %D%/packages/patches/wpa-supplicant-krack-followups.patch \ %D%/packages/patches/wxmaxima-do-not-use-old-gnuplot-parameters.patch \ - %D%/packages/patches/x265-arm-asm-primitives.patch \ + %D%/packages/patches/x265-detect512-all-arches.patch \ %D%/packages/patches/xapian-revert-5489fb2f8.patch \ %D%/packages/patches/xboing-CVE-2004-0149.patch \ %D%/packages/patches/xf86-video-ark-remove-mibstore.patch \ diff --git a/gnu/packages/patches/x265-arm-asm-primitives.patch b/gnu/packages/patches/x265-arm-asm-primitives.patch deleted file mode 100644 index f49aafe577..0000000000 --- a/gnu/packages/patches/x265-arm-asm-primitives.patch +++ /dev/null @@ -1,360 +0,0 @@ -From . -This fixes build errors like: - - cd /tmp/guix-build-x265-2.8.drv-0/x265_2.8/build/encoder && /gnu/store/cd5q2pni1d95fs3cdabbclyh9hqhw2nq-gcc-5.5.0/bin/c++ -DEXPORT_C_API=1 -DHAVE_ARMV6=1 -DHAVE_INT_TYPES_H=1 -DHAVE_NEON -DHIGH_BIT_DEPTH=0 -DX265_ARCH_ARM=1 -DX265_DEPTH=8 -DX265_NS=x265 -D__STDC_LIMIT_MACROS=1 -I/tmp/guix-build-x265-2.8.drv-0/x265_2.8/source/. -I/tmp/guix-build-x265-2.8.drv-0/x265_2.8/source/common -I/tmp/guix-build-x265-2.8.drv-0/x265_2.8/source/encoder -I/tmp/guix-build-x265-2.8.drv-0/x265_2.8/build -O2 -g -DNDEBUG -Wall -Wextra -Wshadow -std=gnu++98 -fPIC -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC -Wno-array-bounds -ffast-math -fno-exceptions -Wno-uninitialized -o CMakeFiles/encoder.dir/search.cpp.o -c /tmp/guix-build-x265-2.8.drv-0/x265_2.8/source/encoder/search.cpp - /tmp/guix-build-x265-2.8.drv-0/x265_2.8/source/common/arm/asm-primitives.cpp:437:38: error: incompatible types in assignment of ?void(const pixel*, intptr_t, int16_t*, intptr_t) {aka void(const unsigned char*, int, short int*, int)}? to ?void (* [2])(const pixel*, intptr_t, int16_t*, intptr_t) {aka void (* [2])(const unsigned char*, int, short int*, int)}? - p.pu[LUMA_64x48].convert_p2s = PFX(filterPixelToShort_64x48_neon); - ^ - -Downloaded from upstream bug report: -https://bitbucket.org/multicoreware/x265/issues/406 - -Signed-off-by: Bernd Kuhls - ---- ./source/common/arm/asm-primitives.cpp.orig 2018-05-21 02:33:10.000000000 -0600 -+++ ./source/common/arm/asm-primitives.cpp 2018-05-28 20:38:37.302378303 -0600 -@@ -48,77 +48,77 @@ void setupAssemblyPrimitives(EncoderPrim - p.ssim_4x4x2_core = PFX(ssim_4x4x2_core_neon); - - // addAvg -- p.pu[LUMA_4x4].addAvg = PFX(addAvg_4x4_neon); -- p.pu[LUMA_4x8].addAvg = PFX(addAvg_4x8_neon); -- p.pu[LUMA_4x16].addAvg = PFX(addAvg_4x16_neon); -- p.pu[LUMA_8x4].addAvg = PFX(addAvg_8x4_neon); -- p.pu[LUMA_8x8].addAvg = PFX(addAvg_8x8_neon); -- p.pu[LUMA_8x16].addAvg = PFX(addAvg_8x16_neon); -- p.pu[LUMA_8x32].addAvg = PFX(addAvg_8x32_neon); -- p.pu[LUMA_12x16].addAvg = PFX(addAvg_12x16_neon); -- p.pu[LUMA_16x4].addAvg = PFX(addAvg_16x4_neon); -- p.pu[LUMA_16x8].addAvg = PFX(addAvg_16x8_neon); -- p.pu[LUMA_16x12].addAvg = PFX(addAvg_16x12_neon); -- p.pu[LUMA_16x16].addAvg = PFX(addAvg_16x16_neon); -- p.pu[LUMA_16x32].addAvg = PFX(addAvg_16x32_neon); -- p.pu[LUMA_16x64].addAvg = PFX(addAvg_16x64_neon); -- p.pu[LUMA_24x32].addAvg = PFX(addAvg_24x32_neon); -- p.pu[LUMA_32x8].addAvg = PFX(addAvg_32x8_neon); -- p.pu[LUMA_32x16].addAvg = PFX(addAvg_32x16_neon); -- p.pu[LUMA_32x24].addAvg = PFX(addAvg_32x24_neon); -- p.pu[LUMA_32x32].addAvg = PFX(addAvg_32x32_neon); -- p.pu[LUMA_32x64].addAvg = PFX(addAvg_32x64_neon); -- p.pu[LUMA_48x64].addAvg = PFX(addAvg_48x64_neon); -- p.pu[LUMA_64x16].addAvg = PFX(addAvg_64x16_neon); -- p.pu[LUMA_64x32].addAvg = PFX(addAvg_64x32_neon); -- p.pu[LUMA_64x48].addAvg = PFX(addAvg_64x48_neon); -- p.pu[LUMA_64x64].addAvg = PFX(addAvg_64x64_neon); -+ p.pu[LUMA_4x4].addAvg[ALIGNED] = PFX(addAvg_4x4_neon); -+ p.pu[LUMA_4x8].addAvg[ALIGNED] = PFX(addAvg_4x8_neon); -+ p.pu[LUMA_4x16].addAvg[ALIGNED] = PFX(addAvg_4x16_neon); -+ p.pu[LUMA_8x4].addAvg[ALIGNED] = PFX(addAvg_8x4_neon); -+ p.pu[LUMA_8x8].addAvg[ALIGNED] = PFX(addAvg_8x8_neon); -+ p.pu[LUMA_8x16].addAvg[ALIGNED] = PFX(addAvg_8x16_neon); -+ p.pu[LUMA_8x32].addAvg[ALIGNED] = PFX(addAvg_8x32_neon); -+ p.pu[LUMA_12x16].addAvg[ALIGNED] = PFX(addAvg_12x16_neon); -+ p.pu[LUMA_16x4].addAvg[ALIGNED] = PFX(addAvg_16x4_neon); -+ p.pu[LUMA_16x8].addAvg[ALIGNED] = PFX(addAvg_16x8_neon); -+ p.pu[LUMA_16x12].addAvg[ALIGNED] = PFX(addAvg_16x12_neon); -+ p.pu[LUMA_16x16].addAvg[ALIGNED] = PFX(addAvg_16x16_neon); -+ p.pu[LUMA_16x32].addAvg[ALIGNED] = PFX(addAvg_16x32_neon); -+ p.pu[LUMA_16x64].addAvg[ALIGNED] = PFX(addAvg_16x64_neon); -+ p.pu[LUMA_24x32].addAvg[ALIGNED] = PFX(addAvg_24x32_neon); -+ p.pu[LUMA_32x8].addAvg[ALIGNED] = PFX(addAvg_32x8_neon); -+ p.pu[LUMA_32x16].addAvg[ALIGNED] = PFX(addAvg_32x16_neon); -+ p.pu[LUMA_32x24].addAvg[ALIGNED] = PFX(addAvg_32x24_neon); -+ p.pu[LUMA_32x32].addAvg[ALIGNED] = PFX(addAvg_32x32_neon); -+ p.pu[LUMA_32x64].addAvg[ALIGNED] = PFX(addAvg_32x64_neon); -+ p.pu[LUMA_48x64].addAvg[ALIGNED] = PFX(addAvg_48x64_neon); -+ p.pu[LUMA_64x16].addAvg[ALIGNED] = PFX(addAvg_64x16_neon); -+ p.pu[LUMA_64x32].addAvg[ALIGNED] = PFX(addAvg_64x32_neon); -+ p.pu[LUMA_64x48].addAvg[ALIGNED] = PFX(addAvg_64x48_neon); -+ p.pu[LUMA_64x64].addAvg[ALIGNED] = PFX(addAvg_64x64_neon); - - // chroma addAvg -- p.chroma[X265_CSP_I420].pu[CHROMA_420_4x2].addAvg = PFX(addAvg_4x2_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_4x4].addAvg = PFX(addAvg_4x4_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_4x8].addAvg = PFX(addAvg_4x8_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_4x16].addAvg = PFX(addAvg_4x16_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_6x8].addAvg = PFX(addAvg_6x8_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x2].addAvg = PFX(addAvg_8x2_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x4].addAvg = PFX(addAvg_8x4_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x6].addAvg = PFX(addAvg_8x6_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x8].addAvg = PFX(addAvg_8x8_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x16].addAvg = PFX(addAvg_8x16_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x32].addAvg = PFX(addAvg_8x32_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_12x16].addAvg = PFX(addAvg_12x16_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_16x4].addAvg = PFX(addAvg_16x4_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_16x8].addAvg = PFX(addAvg_16x8_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_16x12].addAvg = PFX(addAvg_16x12_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_16x16].addAvg = PFX(addAvg_16x16_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_16x32].addAvg = PFX(addAvg_16x32_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_24x32].addAvg = PFX(addAvg_24x32_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_32x8].addAvg = PFX(addAvg_32x8_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_32x16].addAvg = PFX(addAvg_32x16_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_32x24].addAvg = PFX(addAvg_32x24_neon); -- p.chroma[X265_CSP_I420].pu[CHROMA_420_32x32].addAvg = PFX(addAvg_32x32_neon); -- -- p.chroma[X265_CSP_I422].pu[CHROMA_422_4x8].addAvg = PFX(addAvg_4x8_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_4x16].addAvg = PFX(addAvg_4x16_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_4x32].addAvg = PFX(addAvg_4x32_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_6x16].addAvg = PFX(addAvg_6x16_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x4].addAvg = PFX(addAvg_8x4_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x8].addAvg = PFX(addAvg_8x8_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x12].addAvg = PFX(addAvg_8x12_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x16].addAvg = PFX(addAvg_8x16_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x32].addAvg = PFX(addAvg_8x32_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x64].addAvg = PFX(addAvg_8x64_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_12x32].addAvg = PFX(addAvg_12x32_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_16x8].addAvg = PFX(addAvg_16x8_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_16x16].addAvg = PFX(addAvg_16x16_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_16x24].addAvg = PFX(addAvg_16x24_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_16x32].addAvg = PFX(addAvg_16x32_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_16x64].addAvg = PFX(addAvg_16x64_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_24x64].addAvg = PFX(addAvg_24x64_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_32x16].addAvg = PFX(addAvg_32x16_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_32x32].addAvg = PFX(addAvg_32x32_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_32x48].addAvg = PFX(addAvg_32x48_neon); -- p.chroma[X265_CSP_I422].pu[CHROMA_422_32x64].addAvg = PFX(addAvg_32x64_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_4x2].addAvg[ALIGNED] = PFX(addAvg_4x2_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_4x4].addAvg[ALIGNED] = PFX(addAvg_4x4_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_4x8].addAvg[ALIGNED] = PFX(addAvg_4x8_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_4x16].addAvg[ALIGNED] = PFX(addAvg_4x16_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_6x8].addAvg[ALIGNED] = PFX(addAvg_6x8_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x2].addAvg[ALIGNED] = PFX(addAvg_8x2_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x4].addAvg[ALIGNED] = PFX(addAvg_8x4_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x6].addAvg[ALIGNED] = PFX(addAvg_8x6_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x8].addAvg[ALIGNED] = PFX(addAvg_8x8_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x16].addAvg[ALIGNED] = PFX(addAvg_8x16_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x32].addAvg[ALIGNED] = PFX(addAvg_8x32_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_12x16].addAvg[ALIGNED] = PFX(addAvg_12x16_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_16x4].addAvg[ALIGNED] = PFX(addAvg_16x4_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_16x8].addAvg[ALIGNED] = PFX(addAvg_16x8_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_16x12].addAvg[ALIGNED] = PFX(addAvg_16x12_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_16x16].addAvg[ALIGNED] = PFX(addAvg_16x16_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_16x32].addAvg[ALIGNED] = PFX(addAvg_16x32_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_24x32].addAvg[ALIGNED] = PFX(addAvg_24x32_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_32x8].addAvg[ALIGNED] = PFX(addAvg_32x8_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_32x16].addAvg[ALIGNED] = PFX(addAvg_32x16_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_32x24].addAvg[ALIGNED] = PFX(addAvg_32x24_neon); -+ p.chroma[X265_CSP_I420].pu[CHROMA_420_32x32].addAvg[ALIGNED] = PFX(addAvg_32x32_neon); -+ -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_4x8].addAvg[ALIGNED] = PFX(addAvg_4x8_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_4x16].addAvg[ALIGNED] = PFX(addAvg_4x16_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_4x32].addAvg[ALIGNED] = PFX(addAvg_4x32_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_6x16].addAvg[ALIGNED] = PFX(addAvg_6x16_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x4].addAvg[ALIGNED] = PFX(addAvg_8x4_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x8].addAvg[ALIGNED] = PFX(addAvg_8x8_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x12].addAvg[ALIGNED] = PFX(addAvg_8x12_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x16].addAvg[ALIGNED] = PFX(addAvg_8x16_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x32].addAvg[ALIGNED] = PFX(addAvg_8x32_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x64].addAvg[ALIGNED] = PFX(addAvg_8x64_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_12x32].addAvg[ALIGNED] = PFX(addAvg_12x32_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_16x8].addAvg[ALIGNED] = PFX(addAvg_16x8_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_16x16].addAvg[ALIGNED] = PFX(addAvg_16x16_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_16x24].addAvg[ALIGNED] = PFX(addAvg_16x24_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_16x32].addAvg[ALIGNED] = PFX(addAvg_16x32_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_16x64].addAvg[ALIGNED] = PFX(addAvg_16x64_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_24x64].addAvg[ALIGNED] = PFX(addAvg_24x64_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_32x16].addAvg[ALIGNED] = PFX(addAvg_32x16_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_32x32].addAvg[ALIGNED] = PFX(addAvg_32x32_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_32x48].addAvg[ALIGNED] = PFX(addAvg_32x48_neon); -+ p.chroma[X265_CSP_I422].pu[CHROMA_422_32x64].addAvg[ALIGNED] = PFX(addAvg_32x64_neon); - - // quant - p.quant = PFX(quant_neon); -@@ -402,7 +402,7 @@ void setupAssemblyPrimitives(EncoderPrim - p.scale2D_64to32 = PFX(scale2D_64to32_neon); - - // scale1D_128to64 -- p.scale1D_128to64 = PFX(scale1D_128to64_neon); -+ p.scale1D_128to64[ALIGNED] = PFX(scale1D_128to64_neon); - - // copy_count - p.cu[BLOCK_4x4].copy_cnt = PFX(copy_cnt_4_neon); -@@ -411,37 +411,37 @@ void setupAssemblyPrimitives(EncoderPrim - p.cu[BLOCK_32x32].copy_cnt = PFX(copy_cnt_32_neon); - - // filterPixelToShort -- p.pu[LUMA_4x4].convert_p2s = PFX(filterPixelToShort_4x4_neon); -- p.pu[LUMA_4x8].convert_p2s = PFX(filterPixelToShort_4x8_neon); -- p.pu[LUMA_4x16].convert_p2s = PFX(filterPixelToShort_4x16_neon); -- p.pu[LUMA_8x4].convert_p2s = PFX(filterPixelToShort_8x4_neon); -- p.pu[LUMA_8x8].convert_p2s = PFX(filterPixelToShort_8x8_neon); -- p.pu[LUMA_8x16].convert_p2s = PFX(filterPixelToShort_8x16_neon); -- p.pu[LUMA_8x32].convert_p2s = PFX(filterPixelToShort_8x32_neon); -- p.pu[LUMA_12x16].convert_p2s = PFX(filterPixelToShort_12x16_neon); -- p.pu[LUMA_16x4].convert_p2s = PFX(filterPixelToShort_16x4_neon); -- p.pu[LUMA_16x8].convert_p2s = PFX(filterPixelToShort_16x8_neon); -- p.pu[LUMA_16x12].convert_p2s = PFX(filterPixelToShort_16x12_neon); -- p.pu[LUMA_16x16].convert_p2s = PFX(filterPixelToShort_16x16_neon); -- p.pu[LUMA_16x32].convert_p2s = PFX(filterPixelToShort_16x32_neon); -- p.pu[LUMA_16x64].convert_p2s = PFX(filterPixelToShort_16x64_neon); -- p.pu[LUMA_24x32].convert_p2s = PFX(filterPixelToShort_24x32_neon); -- p.pu[LUMA_32x8].convert_p2s = PFX(filterPixelToShort_32x8_neon); -- p.pu[LUMA_32x16].convert_p2s = PFX(filterPixelToShort_32x16_neon); -- p.pu[LUMA_32x24].convert_p2s = PFX(filterPixelToShort_32x24_neon); -- p.pu[LUMA_32x32].convert_p2s = PFX(filterPixelToShort_32x32_neon); -- p.pu[LUMA_32x64].convert_p2s = PFX(filterPixelToShort_32x64_neon); -- p.pu[LUMA_48x64].convert_p2s = PFX(filterPixelToShort_48x64_neon); -- p.pu[LUMA_64x16].convert_p2s = PFX(filterPixelToShort_64x16_neon); -- p.pu[LUMA_64x32].convert_p2s = PFX(filterPixelToShort_64x32_neon); -- p.pu[LUMA_64x48].convert_p2s = PFX(filterPixelToShort_64x48_neon); -- p.pu[LUMA_64x64].convert_p2s = PFX(filterPixelToShort_64x64_neon); -+ p.pu[LUMA_4x4].convert_p2s[ALIGNED] = PFX(filterPixelToShort_4x4_neon); -+ p.pu[LUMA_4x8].convert_p2s[ALIGNED] = PFX(filterPixelToShort_4x8_neon); -+ p.pu[LUMA_4x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_4x16_neon); -+ p.pu[LUMA_8x4].convert_p2s[ALIGNED] = PFX(filterPixelToShort_8x4_neon); -+ p.pu[LUMA_8x8].convert_p2s[ALIGNED] = PFX(filterPixelToShort_8x8_neon); -+ p.pu[LUMA_8x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_8x16_neon); -+ p.pu[LUMA_8x32].convert_p2s[ALIGNED] = PFX(filterPixelToShort_8x32_neon); -+ p.pu[LUMA_12x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_12x16_neon); -+ p.pu[LUMA_16x4].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x4_neon); -+ p.pu[LUMA_16x8].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x8_neon); -+ p.pu[LUMA_16x12].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x12_neon); -+ p.pu[LUMA_16x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x16_neon); -+ p.pu[LUMA_16x32].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x32_neon); -+ p.pu[LUMA_16x64].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x64_neon); -+ p.pu[LUMA_24x32].convert_p2s[ALIGNED] = PFX(filterPixelToShort_24x32_neon); -+ p.pu[LUMA_32x8].convert_p2s[ALIGNED] = PFX(filterPixelToShort_32x8_neon); -+ p.pu[LUMA_32x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_32x16_neon); -+ p.pu[LUMA_32x24].convert_p2s[ALIGNED] = PFX(filterPixelToShort_32x24_neon); -+ p.pu[LUMA_32x32].convert_p2s[ALIGNED] = PFX(filterPixelToShort_32x32_neon); -+ p.pu[LUMA_32x64].convert_p2s[ALIGNED] = PFX(filterPixelToShort_32x64_neon); -+ p.pu[LUMA_48x64].convert_p2s[ALIGNED] = PFX(filterPixelToShort_48x64_neon); -+ p.pu[LUMA_64x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_64x16_neon); -+ p.pu[LUMA_64x32].convert_p2s[ALIGNED] = PFX(filterPixelToShort_64x32_neon); -+ p.pu[LUMA_64x48].convert_p2s[ALIGNED] = PFX(filterPixelToShort_64x48_neon); -+ p.pu[LUMA_64x64].convert_p2s[ALIGNED] = PFX(filterPixelToShort_64x64_neon); - - // Block_fill -- p.cu[BLOCK_4x4].blockfill_s = PFX(blockfill_s_4x4_neon); -- p.cu[BLOCK_8x8].blockfill_s = PFX(blockfill_s_8x8_neon); -- p.cu[BLOCK_16x16].blockfill_s = PFX(blockfill_s_16x16_neon); -- p.cu[BLOCK_32x32].blockfill_s = PFX(blockfill_s_32x32_neon); -+ p.cu[BLOCK_4x4].blockfill_s[ALIGNED] = PFX(blockfill_s_4x4_neon); -+ p.cu[BLOCK_8x8].blockfill_s[ALIGNED] = PFX(blockfill_s_8x8_neon); -+ p.cu[BLOCK_16x16].blockfill_s[ALIGNED] = PFX(blockfill_s_16x16_neon); -+ p.cu[BLOCK_32x32].blockfill_s[ALIGNED] = PFX(blockfill_s_32x32_neon); - - // Blockcopy_ss - p.cu[BLOCK_4x4].copy_ss = PFX(blockcopy_ss_4x4_neon); -@@ -495,21 +495,21 @@ void setupAssemblyPrimitives(EncoderPrim - p.chroma[X265_CSP_I422].cu[BLOCK_422_32x64].copy_sp = PFX(blockcopy_sp_32x64_neon); - - // pixel_add_ps -- p.cu[BLOCK_4x4].add_ps = PFX(pixel_add_ps_4x4_neon); -- p.cu[BLOCK_8x8].add_ps = PFX(pixel_add_ps_8x8_neon); -- p.cu[BLOCK_16x16].add_ps = PFX(pixel_add_ps_16x16_neon); -- p.cu[BLOCK_32x32].add_ps = PFX(pixel_add_ps_32x32_neon); -- p.cu[BLOCK_64x64].add_ps = PFX(pixel_add_ps_64x64_neon); -+ p.cu[BLOCK_4x4].add_ps[ALIGNED] = PFX(pixel_add_ps_4x4_neon); -+ p.cu[BLOCK_8x8].add_ps[ALIGNED] = PFX(pixel_add_ps_8x8_neon); -+ p.cu[BLOCK_16x16].add_ps[ALIGNED] = PFX(pixel_add_ps_16x16_neon); -+ p.cu[BLOCK_32x32].add_ps[ALIGNED] = PFX(pixel_add_ps_32x32_neon); -+ p.cu[BLOCK_64x64].add_ps[ALIGNED] = PFX(pixel_add_ps_64x64_neon); - - // chroma add_ps -- p.chroma[X265_CSP_I420].cu[BLOCK_420_4x4].add_ps = PFX(pixel_add_ps_4x4_neon); -- p.chroma[X265_CSP_I420].cu[BLOCK_420_8x8].add_ps = PFX(pixel_add_ps_8x8_neon); -- p.chroma[X265_CSP_I420].cu[BLOCK_420_16x16].add_ps = PFX(pixel_add_ps_16x16_neon); -- p.chroma[X265_CSP_I420].cu[BLOCK_420_32x32].add_ps = PFX(pixel_add_ps_32x32_neon); -- p.chroma[X265_CSP_I422].cu[BLOCK_422_4x8].add_ps = PFX(pixel_add_ps_4x8_neon); -- p.chroma[X265_CSP_I422].cu[BLOCK_422_8x16].add_ps = PFX(pixel_add_ps_8x16_neon); -- p.chroma[X265_CSP_I422].cu[BLOCK_422_16x32].add_ps = PFX(pixel_add_ps_16x32_neon); -- p.chroma[X265_CSP_I422].cu[BLOCK_422_32x64].add_ps = PFX(pixel_add_ps_32x64_neon); -+ p.chroma[X265_CSP_I420].cu[BLOCK_420_4x4].add_ps[ALIGNED] = PFX(pixel_add_ps_4x4_neon); -+ p.chroma[X265_CSP_I420].cu[BLOCK_420_8x8].add_ps[ALIGNED] = PFX(pixel_add_ps_8x8_neon); -+ p.chroma[X265_CSP_I420].cu[BLOCK_420_16x16].add_ps[ALIGNED] = PFX(pixel_add_ps_16x16_neon); -+ p.chroma[X265_CSP_I420].cu[BLOCK_420_32x32].add_ps[ALIGNED] = PFX(pixel_add_ps_32x32_neon); -+ p.chroma[X265_CSP_I422].cu[BLOCK_422_4x8].add_ps[ALIGNED] = PFX(pixel_add_ps_4x8_neon); -+ p.chroma[X265_CSP_I422].cu[BLOCK_422_8x16].add_ps[ALIGNED] = PFX(pixel_add_ps_8x16_neon); -+ p.chroma[X265_CSP_I422].cu[BLOCK_422_16x32].add_ps[ALIGNED] = PFX(pixel_add_ps_16x32_neon); -+ p.chroma[X265_CSP_I422].cu[BLOCK_422_32x64].add_ps[ALIGNED] = PFX(pixel_add_ps_32x64_neon); - - // cpy2Dto1D_shr - p.cu[BLOCK_4x4].cpy2Dto1D_shr = PFX(cpy2Dto1D_shr_4x4_neon); -@@ -518,10 +518,10 @@ void setupAssemblyPrimitives(EncoderPrim - p.cu[BLOCK_32x32].cpy2Dto1D_shr = PFX(cpy2Dto1D_shr_32x32_neon); - - // ssd_s -- p.cu[BLOCK_4x4].ssd_s = PFX(pixel_ssd_s_4x4_neon); -- p.cu[BLOCK_8x8].ssd_s = PFX(pixel_ssd_s_8x8_neon); -- p.cu[BLOCK_16x16].ssd_s = PFX(pixel_ssd_s_16x16_neon); -- p.cu[BLOCK_32x32].ssd_s = PFX(pixel_ssd_s_32x32_neon); -+ p.cu[BLOCK_4x4].ssd_s[ALIGNED] = PFX(pixel_ssd_s_4x4_neon); -+ p.cu[BLOCK_8x8].ssd_s[ALIGNED] = PFX(pixel_ssd_s_8x8_neon); -+ p.cu[BLOCK_16x16].ssd_s[ALIGNED] = PFX(pixel_ssd_s_16x16_neon); -+ p.cu[BLOCK_32x32].ssd_s[ALIGNED] = PFX(pixel_ssd_s_32x32_neon); - - // sse_ss - p.cu[BLOCK_4x4].sse_ss = PFX(pixel_sse_ss_4x4_neon); -@@ -548,10 +548,10 @@ void setupAssemblyPrimitives(EncoderPrim - p.chroma[X265_CSP_I422].cu[BLOCK_422_32x64].sub_ps = PFX(pixel_sub_ps_32x64_neon); - - // calc_Residual -- p.cu[BLOCK_4x4].calcresidual = PFX(getResidual4_neon); -- p.cu[BLOCK_8x8].calcresidual = PFX(getResidual8_neon); -- p.cu[BLOCK_16x16].calcresidual = PFX(getResidual16_neon); -- p.cu[BLOCK_32x32].calcresidual = PFX(getResidual32_neon); -+ p.cu[BLOCK_4x4].calcresidual[ALIGNED] = PFX(getResidual4_neon); -+ p.cu[BLOCK_8x8].calcresidual[ALIGNED] = PFX(getResidual8_neon); -+ p.cu[BLOCK_16x16].calcresidual[ALIGNED] = PFX(getResidual16_neon); -+ p.cu[BLOCK_32x32].calcresidual[ALIGNED] = PFX(getResidual32_neon); - - // sse_pp - p.cu[BLOCK_4x4].sse_pp = PFX(pixel_sse_pp_4x4_neon); -@@ -722,31 +722,31 @@ void setupAssemblyPrimitives(EncoderPrim - p.pu[LUMA_64x64].sad_x4 = PFX(sad_x4_64x64_neon); - - // pixel_avg_pp -- p.pu[LUMA_4x4].pixelavg_pp = PFX(pixel_avg_pp_4x4_neon); -- p.pu[LUMA_4x8].pixelavg_pp = PFX(pixel_avg_pp_4x8_neon); -- p.pu[LUMA_4x16].pixelavg_pp = PFX(pixel_avg_pp_4x16_neon); -- p.pu[LUMA_8x4].pixelavg_pp = PFX(pixel_avg_pp_8x4_neon); -- p.pu[LUMA_8x8].pixelavg_pp = PFX(pixel_avg_pp_8x8_neon); -- p.pu[LUMA_8x16].pixelavg_pp = PFX(pixel_avg_pp_8x16_neon); -- p.pu[LUMA_8x32].pixelavg_pp = PFX(pixel_avg_pp_8x32_neon); -- p.pu[LUMA_12x16].pixelavg_pp = PFX(pixel_avg_pp_12x16_neon); -- p.pu[LUMA_16x4].pixelavg_pp = PFX(pixel_avg_pp_16x4_neon); -- p.pu[LUMA_16x8].pixelavg_pp = PFX(pixel_avg_pp_16x8_neon); -- p.pu[LUMA_16x12].pixelavg_pp = PFX(pixel_avg_pp_16x12_neon); -- p.pu[LUMA_16x16].pixelavg_pp = PFX(pixel_avg_pp_16x16_neon); -- p.pu[LUMA_16x32].pixelavg_pp = PFX(pixel_avg_pp_16x32_neon); -- p.pu[LUMA_16x64].pixelavg_pp = PFX(pixel_avg_pp_16x64_neon); -- p.pu[LUMA_24x32].pixelavg_pp = PFX(pixel_avg_pp_24x32_neon); -- p.pu[LUMA_32x8].pixelavg_pp = PFX(pixel_avg_pp_32x8_neon); -- p.pu[LUMA_32x16].pixelavg_pp = PFX(pixel_avg_pp_32x16_neon); -- p.pu[LUMA_32x24].pixelavg_pp = PFX(pixel_avg_pp_32x24_neon); -- p.pu[LUMA_32x32].pixelavg_pp = PFX(pixel_avg_pp_32x32_neon); -- p.pu[LUMA_32x64].pixelavg_pp = PFX(pixel_avg_pp_32x64_neon); -- p.pu[LUMA_48x64].pixelavg_pp = PFX(pixel_avg_pp_48x64_neon); -- p.pu[LUMA_64x16].pixelavg_pp = PFX(pixel_avg_pp_64x16_neon); -- p.pu[LUMA_64x32].pixelavg_pp = PFX(pixel_avg_pp_64x32_neon); -- p.pu[LUMA_64x48].pixelavg_pp = PFX(pixel_avg_pp_64x48_neon); -- p.pu[LUMA_64x64].pixelavg_pp = PFX(pixel_avg_pp_64x64_neon); -+ p.pu[LUMA_4x4].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_4x4_neon); -+ p.pu[LUMA_4x8].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_4x8_neon); -+ p.pu[LUMA_4x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_4x16_neon); -+ p.pu[LUMA_8x4].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_8x4_neon); -+ p.pu[LUMA_8x8].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_8x8_neon); -+ p.pu[LUMA_8x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_8x16_neon); -+ p.pu[LUMA_8x32].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_8x32_neon); -+ p.pu[LUMA_12x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_12x16_neon); -+ p.pu[LUMA_16x4].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x4_neon); -+ p.pu[LUMA_16x8].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x8_neon); -+ p.pu[LUMA_16x12].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x12_neon); -+ p.pu[LUMA_16x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x16_neon); -+ p.pu[LUMA_16x32].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x32_neon); -+ p.pu[LUMA_16x64].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x64_neon); -+ p.pu[LUMA_24x32].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_24x32_neon); -+ p.pu[LUMA_32x8].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_32x8_neon); -+ p.pu[LUMA_32x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_32x16_neon); -+ p.pu[LUMA_32x24].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_32x24_neon); -+ p.pu[LUMA_32x32].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_32x32_neon); -+ p.pu[LUMA_32x64].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_32x64_neon); -+ p.pu[LUMA_48x64].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_48x64_neon); -+ p.pu[LUMA_64x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_64x16_neon); -+ p.pu[LUMA_64x32].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_64x32_neon); -+ p.pu[LUMA_64x48].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_64x48_neon); -+ p.pu[LUMA_64x64].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_64x64_neon); - - // planecopy - p.planecopy_cp = PFX(pixel_planecopy_cp_neon); diff --git a/gnu/packages/patches/x265-detect512-all-arches.patch b/gnu/packages/patches/x265-detect512-all-arches.patch new file mode 100644 index 0000000000..4d39d868fd --- /dev/null +++ b/gnu/packages/patches/x265-detect512-all-arches.patch @@ -0,0 +1,37 @@ +https://sources.debian.org/data/main/x/x265/2.9-3/debian/patches/0003-detect512-is-needed-on-all-architectures.patch + +From: Adam Sampson +Date: Sun, 14 Oct 2018 14:04:18 +0200 +Subject: detect512 is needed on all architectures + +--- + source/common/cpu.cpp | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/source/common/cpu.cpp b/source/common/cpu.cpp +index 0681ff5..fa687da 100644 +--- a/source/common/cpu.cpp ++++ b/source/common/cpu.cpp +@@ -110,6 +110,11 @@ const cpu_name_t cpu_names[] = + { "", 0 }, + }; + ++bool detect512() ++{ ++ return(enable512); ++} ++ + #if X265_ARCH_X86 + + extern "C" { +@@ -123,10 +128,6 @@ uint64_t PFX(cpu_xgetbv)(int xcr); + #pragma warning(disable: 4309) // truncation of constant value + #endif + +-bool detect512() +-{ +- return(enable512); +-} + uint32_t cpu_detect(bool benableavx512 ) + { + diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index e281bf8fff..88357dfb45 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -401,7 +401,7 @@ and creating Matroska files from other media files (@code{mkvmerge}).") (sha256 (base32 "090hp4216isis8q5gb7bwzia8rfyzni54z21jnwm97x3hiy6ibpb")) - (patches (search-patches "x265-arm-asm-primitives.patch")) + (patches (search-patches "x265-detect512-all-arches.patch")) (modules '((guix build utils))) (snippet '(begin (delete-file-recursively "source/compat/getopt") @@ -409,12 +409,8 @@ and creating Matroska files from other media files (@code{mkvmerge}).") (build-system cmake-build-system) (arguments `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built - ;; Currently the source code doesn't check for aarch64. - ,@(if (any (cute string-prefix? <> (or (%current-system) - (%current-target-system))) - '("armhf" "aarch64")) - '(#:configure-flags '("-DENABLE_PIC=TRUE")) - '()) + ;; Ensure position independent code for everyone. + #:configure-flags '("-DENABLE_PIC=TRUE") #:phases (modify-phases %standard-phases (add-before 'configure 'prepare-build -- cgit v1.2.3 From f1376bfabe81608db85d439351f00505b97e944f Mon Sep 17 00:00:00 2001 From: Clément Lassieur Date: Tue, 16 Oct 2018 10:58:06 +0200 Subject: gnu: emacs-exwm: Update to 0.20. * gnu/packages/emacs.scm (emacs-exwm): Update to 0.20. [source]: Remove emacs-exwm-fix-fullscreen-issue.patch. * gnu/local.mk (dist_patch_DATA): Remove patch. * gnu/packages/patches/emacs-exwm-fix-fullscreen-issue.patch: Remove patch. --- gnu/local.mk | 1 - gnu/packages/emacs.scm | 5 ++-- .../patches/emacs-exwm-fix-fullscreen-issue.patch | 27 ---------------------- 3 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 gnu/packages/patches/emacs-exwm-fix-fullscreen-issue.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 1fa2eaba31..b8248e8da0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -659,7 +659,6 @@ dist_patch_DATA = \ %D%/packages/patches/elogind-glibc-2.27.patch \ %D%/packages/patches/einstein-build.patch \ %D%/packages/patches/emacs-exec-path.patch \ - %D%/packages/patches/emacs-exwm-fix-fullscreen-issue.patch \ %D%/packages/patches/emacs-fix-scheme-indent-function.patch \ %D%/packages/patches/emacs-json-reformat-fix-tests.patch \ %D%/packages/patches/emacs-highlight-stages-add-gexp.patch \ diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index fe9047691e..d30a4cc568 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -6615,7 +6615,7 @@ It should enable you to implement low-level X11 applications.") (define-public emacs-exwm (package (name "emacs-exwm") - (version "0.19") + (version "0.20") (synopsis "Emacs X window manager") (source (origin (method url-fetch) @@ -6623,8 +6623,7 @@ It should enable you to implement low-level X11 applications.") version ".tar")) (sha256 (base32 - "11xd2w4h3zdwkdxypvmcz8s7q72cn76lfr9js77jbizyj6b04lr0")) - (patches (search-patches "emacs-exwm-fix-fullscreen-issue.patch")))) + "0nhhzbkm0mkj7sd1dy2c19cmn56gyaj9nl8kgy86h4fp63hjaz04")))) (build-system emacs-build-system) (propagated-inputs `(("emacs-xelb" ,emacs-xelb))) diff --git a/gnu/packages/patches/emacs-exwm-fix-fullscreen-issue.patch b/gnu/packages/patches/emacs-exwm-fix-fullscreen-issue.patch deleted file mode 100644 index 5c9bd36598..0000000000 --- a/gnu/packages/patches/emacs-exwm-fix-fullscreen-issue.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 13a14579cc1bb772735f895dd5b4b90c6812f3ee Mon Sep 17 00:00:00 2001 -From: Chris Feng -Date: Sun, 29 Jul 2018 00:00:00 +0000 -Subject: [PATCH] Fix issues with destroying full screen X windows - -* exwm-manage.el (exwm-manage--unmanage-window): Set the Emacs window -of an full screen X window as non-dedicated before killing its buffer -so as not to cause other side effects. ---- - exwm-manage.el | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/exwm-manage.el b/exwm-manage.el -index a0a9e05..349157f 100644 ---- a/exwm-manage.el -+++ b/exwm-manage.el -@@ -392,6 +392,10 @@ manager is shutting down." - :window window :parent exwm--root :x 0 :y 0)) - (xcb:+request exwm--connection - (make-instance 'xcb:DestroyWindow :window container)))) -+ (when (exwm-layout--fullscreen-p) -+ (let ((window (get-buffer-window))) -+ (when window -+ (set-window-dedicated-p window nil)))) - (exwm-manage--set-client-list) - (xcb:flush exwm--connection)) - (let ((kill-buffer-func -- cgit v1.2.3 From 90aeaee861845142843a0f988fa4ff016c723cdb Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 6 Oct 2018 16:47:05 +0200 Subject: gnu: python: Fix CVE-2018-14647. * gnu/packages/patches/python-CVE-2018-14647.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/python.scm (python-3/fixed): New variable. (python-3.6)[replacement]: New field. (python-minimal, python-debug, wrap-python3): Use PACKAGE/INHERIT instead of standard inheritance. --- gnu/local.mk | 1 + gnu/packages/patches/python-CVE-2018-14647.patch | 61 ++++++++++++++++++++++++ gnu/packages/python.scm | 26 ++++++++-- 3 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/python-CVE-2018-14647.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index b8248e8da0..d30bbedee6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1076,6 +1076,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-3-deterministic-build-info.patch \ %D%/packages/patches/python-3-search-paths.patch \ %D%/packages/patches/python-3-fix-tests.patch \ + %D%/packages/patches/python-CVE-2018-14647.patch \ %D%/packages/patches/python-axolotl-AES-fix.patch \ %D%/packages/patches/python-cairocffi-dlopen-path.patch \ %D%/packages/patches/python-fix-tests.patch \ diff --git a/gnu/packages/patches/python-CVE-2018-14647.patch b/gnu/packages/patches/python-CVE-2018-14647.patch new file mode 100644 index 0000000000..24f8d21820 --- /dev/null +++ b/gnu/packages/patches/python-CVE-2018-14647.patch @@ -0,0 +1,61 @@ +Fix CVE-2018-14647: +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-14647 +https://bugs.python.org/issue34623 + +Taken from upstream: +https://github.com/python/cpython/commit/f7666e828cc3d5873136473ea36ba2013d624fa1 + +diff --git Include/pyexpat.h Include/pyexpat.h +index 44259bf6d7..07020b5dc9 100644 +--- Include/pyexpat.h ++++ Include/pyexpat.h +@@ -3,7 +3,7 @@ + + /* note: you must import expat.h before importing this module! */ + +-#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.0" ++#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.1" + #define PyExpat_CAPSULE_NAME "pyexpat.expat_CAPI" + + struct PyExpat_CAPI +@@ -48,6 +48,8 @@ struct PyExpat_CAPI + enum XML_Status (*SetEncoding)(XML_Parser parser, const XML_Char *encoding); + int (*DefaultUnknownEncodingHandler)( + void *encodingHandlerData, const XML_Char *name, XML_Encoding *info); ++ /* might be none for expat < 2.1.0 */ ++ int (*SetHashSalt)(XML_Parser parser, unsigned long hash_salt); + /* always add new stuff to the end! */ + }; + +diff --git Modules/_elementtree.c Modules/_elementtree.c +index 707ab2912b..53f05f937f 100644 +--- Modules/_elementtree.c ++++ Modules/_elementtree.c +@@ -3261,6 +3261,11 @@ _elementtree_XMLParser___init___impl(XMLParserObject *self, PyObject *html, + PyErr_NoMemory(); + return -1; + } ++ /* expat < 2.1.0 has no XML_SetHashSalt() */ ++ if (EXPAT(SetHashSalt) != NULL) { ++ EXPAT(SetHashSalt)(self->parser, ++ (unsigned long)_Py_HashSecret.expat.hashsalt); ++ } + + if (target) { + Py_INCREF(target); +diff --git Modules/pyexpat.c Modules/pyexpat.c +index 47c3e86c20..aa21d93c11 100644 +--- Modules/pyexpat.c ++++ Modules/pyexpat.c +@@ -1887,6 +1887,11 @@ MODULE_INITFUNC(void) + capi.SetStartDoctypeDeclHandler = XML_SetStartDoctypeDeclHandler; + capi.SetEncoding = XML_SetEncoding; + capi.DefaultUnknownEncodingHandler = PyUnknownEncodingHandler; ++#if XML_COMBINED_VERSION >= 20100 ++ capi.SetHashSalt = XML_SetHashSalt; ++#else ++ capi.SetHashSalt = NULL; ++#endif + + /* export using capsule */ + capi_object = PyCapsule_New(&capi, PyExpat_CAPSULE_NAME, NULL); diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 8261fefd93..3e39866087 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -357,6 +357,7 @@ data types.") (package (inherit python-2) (name "python") (version "3.6.5") + (replacement python-3/fixed) (source (origin (method url-fetch) (uri (string-append "https://www.python.org/ftp/python/" @@ -456,6 +457,24 @@ data types.") ;; Current 3.x version. (define-public python-3 python-3.6) +(define python-3/fixed + (package + (inherit python-3) + (source (origin + (inherit (package-source python-3)) + (patches (append (origin-patches (package-source python-3)) + (search-patches "python-CVE-2018-14647.patch"))))) + (arguments + (substitute-keyword-arguments (package-arguments python-3) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'delete-broken-test + (lambda _ + ;; Delete test which fails on recent kernels: + ;; . + (delete-file "Lib/test/test_socket.py") + #t)))))))) + ;; Current major version. (define-public python python-3) @@ -474,7 +493,7 @@ data types.") ("zlib" ,zlib))))) (define-public python-minimal - (package (inherit python) + (package/inherit python (name "python-minimal") (outputs '("out")) @@ -486,8 +505,7 @@ data types.") ("zlib" ,zlib))))) (define-public python-debug - (package - (inherit python) + (package/inherit python (name "python-debug") (outputs '("out" "debug")) (build-system gnu-build-system) @@ -506,7 +524,7 @@ for more information."))) (define* (wrap-python3 python #:optional (name (string-append (package-name python) "-wrapper"))) - (package (inherit python) + (package/inherit python (name name) (source #f) (build-system trivial-build-system) -- cgit v1.2.3 From a55ebe2e3a7b438b4eec06c594440d3a0fb06a25 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 6 Oct 2018 18:50:47 +0200 Subject: gnu: python2: Add upstream security fixes. This addresses CVE-2018-{1060,1061,14647,1000802}. * gnu/packages/patches/python2-CVE-2018-1000802.patch, gnu/packages/patches/python2-CVE-2018-1060.patch, gnu/packages/patches/python2-CVE-2018-1061.patch, gnu/packages/patches/python2-CVE-2018-14647.patch: New files. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/python.scm (python-2/fixed): New variable. (python-2.7)[replacement]: New field. (python2-minimal): Use PACKAGE/INHERIT. --- gnu/local.mk | 4 ++ .../patches/python2-CVE-2018-1000802.patch | 47 +++++++++++++++++ gnu/packages/patches/python2-CVE-2018-1060.patch | 20 +++++++ gnu/packages/patches/python2-CVE-2018-1061.patch | 20 +++++++ gnu/packages/patches/python2-CVE-2018-14647.patch | 61 ++++++++++++++++++++++ gnu/packages/python.scm | 15 +++++- 6 files changed, 166 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python2-CVE-2018-1000802.patch create mode 100644 gnu/packages/patches/python2-CVE-2018-1060.patch create mode 100644 gnu/packages/patches/python2-CVE-2018-1061.patch create mode 100644 gnu/packages/patches/python2-CVE-2018-14647.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index d30bbedee6..402505e229 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1068,6 +1068,10 @@ dist_patch_DATA = \ %D%/packages/patches/pygpgme-disable-problematic-tests.patch \ %D%/packages/patches/pyqt-configure.patch \ %D%/packages/patches/pyqt-public-sip.patch \ + %D%/packages/patches/python2-CVE-2018-1060.patch \ + %D%/packages/patches/python2-CVE-2018-1061.patch \ + %D%/packages/patches/python2-CVE-2018-14647.patch \ + %D%/packages/patches/python2-CVE-2018-1000802.patch \ %D%/packages/patches/python-2-deterministic-build-info.patch \ %D%/packages/patches/python-2.7-adjust-tests.patch \ %D%/packages/patches/python-2.7-search-paths.patch \ diff --git a/gnu/packages/patches/python2-CVE-2018-1000802.patch b/gnu/packages/patches/python2-CVE-2018-1000802.patch new file mode 100644 index 0000000000..0d5bc77c84 --- /dev/null +++ b/gnu/packages/patches/python2-CVE-2018-1000802.patch @@ -0,0 +1,47 @@ +Fix CVE-2018-1000802: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000802 + +Taken from upstream commit (sans NEWS): +https://github.com/python/cpython/commit/d8b103b8b3ef9644805341216963a64098642435 + +diff --git a/Lib/shutil.py b/Lib/shutil.py +index 3462f7c5e9..0ab1a06f52 100644 +--- a/Lib/shutil.py ++++ b/Lib/shutil.py +@@ -413,17 +413,21 @@ def _make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0, + + return archive_name + +-def _call_external_zip(base_dir, zip_filename, verbose=False, dry_run=False): ++def _call_external_zip(base_dir, zip_filename, verbose, dry_run, logger): + # XXX see if we want to keep an external call here + if verbose: + zipoptions = "-r" + else: + zipoptions = "-rq" +- from distutils.errors import DistutilsExecError +- from distutils.spawn import spawn ++ cmd = ["zip", zipoptions, zip_filename, base_dir] ++ if logger is not None: ++ logger.info(' '.join(cmd)) ++ if dry_run: ++ return ++ import subprocess + try: +- spawn(["zip", zipoptions, zip_filename, base_dir], dry_run=dry_run) +- except DistutilsExecError: ++ subprocess.check_call(cmd) ++ except subprocess.CalledProcessError: + # XXX really should distinguish between "couldn't find + # external 'zip' command" and "zip failed". + raise ExecError, \ +@@ -458,7 +462,7 @@ def _make_zipfile(base_name, base_dir, verbose=0, dry_run=0, logger=None): + zipfile = None + + if zipfile is None: +- _call_external_zip(base_dir, zip_filename, verbose, dry_run) ++ _call_external_zip(base_dir, zip_filename, verbose, dry_run, logger) + else: + if logger is not None: + logger.info("creating '%s' and adding '%s' to it", diff --git a/gnu/packages/patches/python2-CVE-2018-1060.patch b/gnu/packages/patches/python2-CVE-2018-1060.patch new file mode 100644 index 0000000000..5eb7ccfbc9 --- /dev/null +++ b/gnu/packages/patches/python2-CVE-2018-1060.patch @@ -0,0 +1,20 @@ +Fix CVE-2018-1060: +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1060 + +Taken from upstream commit (sans test and NEWS): +https://github.com/python/cpython/commit/e052d40cea15f582b50947f7d906b39744dc62a2 + +diff --git a/Lib/poplib.py b/Lib/poplib.py +index b91e5f72d2ca..a238510b38fc 100644 +--- a/Lib/poplib.py ++++ b/Lib/poplib.py +@@ -274,7 +274,7 @@ def rpop(self, user): + return self._shortcmd('RPOP %s' % user) + + +- timestamp = re.compile(r'\+OK.*(<[^>]+>)') ++ timestamp = re.compile(br'\+OK.[^<]*(<.*>)') + + def apop(self, user, secret): + """Authorisation + diff --git a/gnu/packages/patches/python2-CVE-2018-1061.patch b/gnu/packages/patches/python2-CVE-2018-1061.patch new file mode 100644 index 0000000000..6caab24b4d --- /dev/null +++ b/gnu/packages/patches/python2-CVE-2018-1061.patch @@ -0,0 +1,20 @@ +Fix CVE-2018-1061: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1061 + +Taken from upstream commit (sans test and NEWS): +https://github.com/python/cpython/commit/e052d40cea15f582b50947f7d906b39744dc62a2 + +diff --git a/Lib/difflib.py b/Lib/difflib.py +index 1c6fbdbedcb7..788a92df3f89 100644 +--- a/Lib/difflib.py ++++ b/Lib/difflib.py +@@ -1103,7 +1103,7 @@ def _qformat(self, aline, bline, atags, btags): + + import re + +-def IS_LINE_JUNK(line, pat=re.compile(r"\s*#?\s*$").match): ++def IS_LINE_JUNK(line, pat=re.compile(r"\s*(?:#\s*)?$").match): + r""" + Return 1 for ignorable line: iff `line` is blank or contains a single '#'. + diff --git a/gnu/packages/patches/python2-CVE-2018-14647.patch b/gnu/packages/patches/python2-CVE-2018-14647.patch new file mode 100644 index 0000000000..6226b06aca --- /dev/null +++ b/gnu/packages/patches/python2-CVE-2018-14647.patch @@ -0,0 +1,61 @@ +Fix CVE-2018-14647: +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-14647 +https://bugs.python.org/issue34623 + +Taken from upstream: +https://github.com/python/cpython/commit/18b20bad75b4ff0486940fba4ec680e96e70f3a2 + +diff --git a/Include/pyexpat.h b/Include/pyexpat.h +index 5340ef5fa3..3fc5fa54da 100644 +--- a/Include/pyexpat.h ++++ b/Include/pyexpat.h +@@ -3,7 +3,7 @@ + + /* note: you must import expat.h before importing this module! */ + +-#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.0" ++#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.1" + #define PyExpat_CAPSULE_NAME "pyexpat.expat_CAPI" + + struct PyExpat_CAPI +@@ -43,6 +43,8 @@ struct PyExpat_CAPI + XML_Parser parser, XML_UnknownEncodingHandler handler, + void *encodingHandlerData); + void (*SetUserData)(XML_Parser parser, void *userData); ++ /* might be none for expat < 2.1.0 */ ++ int (*SetHashSalt)(XML_Parser parser, unsigned long hash_salt); + /* always add new stuff to the end! */ + }; + +diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c +index f7f992dd3a..b38e0ab329 100644 +--- a/Modules/_elementtree.c ++++ b/Modules/_elementtree.c +@@ -2574,6 +2574,11 @@ xmlparser(PyObject* self_, PyObject* args, PyObject* kw) + PyErr_NoMemory(); + return NULL; + } ++ /* expat < 2.1.0 has no XML_SetHashSalt() */ ++ if (EXPAT(SetHashSalt) != NULL) { ++ EXPAT(SetHashSalt)(self->parser, ++ (unsigned long)_Py_HashSecret.prefix); ++ } + + ALLOC(sizeof(XMLParserObject), "create expatparser"); + +diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c +index 2b4d31293c..1f8c0d70a5 100644 +--- a/Modules/pyexpat.c ++++ b/Modules/pyexpat.c +@@ -2042,6 +2042,11 @@ MODULE_INITFUNC(void) + capi.SetProcessingInstructionHandler = XML_SetProcessingInstructionHandler; + capi.SetUnknownEncodingHandler = XML_SetUnknownEncodingHandler; + capi.SetUserData = XML_SetUserData; ++#if XML_COMBINED_VERSION >= 20100 ++ capi.SetHashSalt = XML_SetHashSalt; ++#else ++ capi.SetHashSalt = NULL; ++#endif + + /* export using capsule */ + capi_object = PyCapsule_New(&capi, PyExpat_CAPSULE_NAME, NULL); diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 3e39866087..e3a04b0344 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -148,6 +148,7 @@ (package (name "python2") (version "2.7.14") + (replacement python-2/fixed) (source (origin (method url-fetch) @@ -344,6 +345,18 @@ data types.") ;; Current 2.x version. (define-public python-2 python-2.7) +(define python-2/fixed + (package + (inherit python-2) + (source (origin + (inherit (package-source python-2)) + (patches (append + (origin-patches (package-source python-2)) + (search-patches "python2-CVE-2018-1060.patch" + "python2-CVE-2018-1061.patch" + "python2-CVE-2018-14647.patch" + "python2-CVE-2018-1000802.patch"))))))) + (define-public python2-called-python ;; Both 2.x and 3.x used to be called "python". In commit ;; a7714d42de2c3082f3609d1e63c83d703fb39cf9 (March 2018), we renamed the @@ -482,7 +495,7 @@ data types.") ;; Python (Tk -> libxcb -> Python.) (define-public python2-minimal - (package (inherit python-2) + (package/inherit python-2 (name "python2-minimal") (outputs '("out")) -- cgit v1.2.3