diff options
Diffstat (limited to 'gnu/packages/patches')
69 files changed, 2590 insertions, 3865 deletions
diff --git a/gnu/packages/patches/ao-cad-aarch64-support.patch b/gnu/packages/patches/ao-cad-aarch64-support.patch deleted file mode 100644 index 291369cd9b..0000000000 --- a/gnu/packages/patches/ao-cad-aarch64-support.patch +++ /dev/null @@ -1,18 +0,0 @@ -Support in ao-cad for aarch64. - -Submitted upstream at https://github.com/mkeeter/ao/issues/69 - ---- ao/ui/vendor/efsw/src/efsw/inotify-nosys.h.orig 2017-12-14 16:27:16.125871099 -0600 -+++ ao/ui/vendor/efsw/src/efsw/inotify-nosys.h 2017-12-14 16:26:39.786022981 -0600 -@@ -69,6 +69,11 @@ - # define __NR_inotify_add_watch (__NR_SYSCALL_BASE+317) - # define __NR_inotify_rm_watch (__NR_SYSCALL_BASE+318) - -+#elif defined (__aarch64__) -+# define __NR_inotify_init 1043 -+# define __NR_inotify_add_watch 27 -+# define __NR_inotify_rm_watch 28 -+ - #elif defined (__frv__) - # define __NR_inotify_init 291 - # define __NR_inotify_add_watch 292 diff --git a/gnu/packages/patches/aria2-CVE-2019-3500.patch b/gnu/packages/patches/aria2-CVE-2019-3500.patch new file mode 100644 index 0000000000..891c9047ba --- /dev/null +++ b/gnu/packages/patches/aria2-CVE-2019-3500.patch @@ -0,0 +1,55 @@ +Fix CVE-2019-3500: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3500 +https://github.com/aria2/aria2/issues/1329 + +Patch copied from upstream source repository: + +https://github.com/aria2/aria2/commit/37368130ca7de5491a75fd18a20c5c5cc641824a + +From 37368130ca7de5491a75fd18a20c5c5cc641824a Mon Sep 17 00:00:00 2001 +From: Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> +Date: Sat, 5 Jan 2019 09:32:40 +0900 +Subject: [PATCH] Mask headers + +--- + src/HttpConnection.cc | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) + +diff --git a/src/HttpConnection.cc b/src/HttpConnection.cc +index 77cb9d27a..be5b97723 100644 +--- a/src/HttpConnection.cc ++++ b/src/HttpConnection.cc +@@ -102,11 +102,17 @@ std::string HttpConnection::eraseConfidentialInfo(const std::string& request) + std::string result; + std::string line; + while (getline(istr, line)) { +- if (util::startsWith(line, "Authorization: Basic")) { +- result += "Authorization: Basic ********\n"; ++ if (util::istartsWith(line, "Authorization: ")) { ++ result += "Authorization: <snip>\n"; + } +- else if (util::startsWith(line, "Proxy-Authorization: Basic")) { +- result += "Proxy-Authorization: Basic ********\n"; ++ else if (util::istartsWith(line, "Proxy-Authorization: ")) { ++ result += "Proxy-Authorization: <snip>\n"; ++ } ++ else if (util::istartsWith(line, "Cookie: ")) { ++ result += "Cookie: <snip>\n"; ++ } ++ else if (util::istartsWith(line, "Set-Cookie: ")) { ++ result += "Set-Cookie: <snip>\n"; + } + else { + result += line; +@@ -154,8 +160,8 @@ std::unique_ptr<HttpResponse> HttpConnection::receiveResponse() + const auto& proc = outstandingHttpRequests_.front()->getHttpHeaderProcessor(); + if (proc->parse(socketRecvBuffer_->getBuffer(), + socketRecvBuffer_->getBufferLength())) { +- A2_LOG_INFO( +- fmt(MSG_RECEIVE_RESPONSE, cuid_, proc->getHeaderString().c_str())); ++ A2_LOG_INFO(fmt(MSG_RECEIVE_RESPONSE, cuid_, ++ eraseConfidentialInfo(proc->getHeaderString()).c_str())); + auto result = proc->getResult(); + if (result->getStatusCode() / 100 == 1) { + socketRecvBuffer_->drain(proc->getLastBytesProcessed()); diff --git a/gnu/packages/patches/biber-fix-encoding-write.patch b/gnu/packages/patches/biber-fix-encoding-write.patch new file mode 100644 index 0000000000..56cd11212e --- /dev/null +++ b/gnu/packages/patches/biber-fix-encoding-write.patch @@ -0,0 +1,31 @@ +From 2a9b15aefb842a734637f3d230936ea1b7c60096 Mon Sep 17 00:00:00 2001 +From: Philip Kime <Philip@kime.org.uk> +Date: Thu, 8 Nov 2018 22:02:09 +0100 +Subject: [PATCH] Fix to address #239 + +--- + lib/Biber.pm | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/Biber.pm b/lib/Biber.pm +index 8b1f80a5..d97fca29 100644 +--- a/lib/Biber.pm ++++ b/lib/Biber.pm +@@ -311,6 +311,8 @@ sub parse_ctrlfile { + unless (eval {$checkbuf = File::Slurper::read_text($ctrl_file_path, 'latin1')}) { + biber_error("$ctrl_file_path is not UTF-8 or even latin1, how horrible."); + } ++ # Write ctrl file as UTF-8 ++ File::Slurper::write_text($ctrl_file_path, NFC($checkbuf));# Unicode NFC boundary + } + + $checkbuf = NFD($checkbuf);# Unicode NFD boundary +@@ -319,8 +321,6 @@ sub parse_ctrlfile { + unlink($output) unless $output eq '-';# ignore deletion of STDOUT marker + biber_error("$ctrl_file_path is malformed, last biblatex run probably failed. Deleted $output"); + } +- # Write ctrl file as UTF-8 +- File::Slurper::write_text($ctrl_file_path, NFC($checkbuf));# Unicode NFC boundary + + # Validate if asked to + if (Biber::Config->getoption('validate_control')) { diff --git a/gnu/packages/patches/blender-newer-ffmpeg.patch b/gnu/packages/patches/blender-newer-ffmpeg.patch deleted file mode 100644 index 363489bc70..0000000000 --- a/gnu/packages/patches/blender-newer-ffmpeg.patch +++ /dev/null @@ -1,80 +0,0 @@ -https://sources.debian.org/data/main/b/blender/2.79.b+dfsg0-4/debian/patches/0008-fix_building_with_latest_versions_of_FFmpeg.patch - -From: Bastien Montagne <montagne29@wanadoo.fr> -Date: Tue, 8 May 2018 16:00:52 +0200 -Subject: fix_building_with_latest_versions_of_FFmpeg - -Some years-old deprecated stuff has now been removed. - -Correct solution is probably to use valid defines etc. in own code, but -this is more FFMEPG maintainer task (since it also may change how old -FFMPEG we do support...). ---- - intern/ffmpeg/ffmpeg_compat.h | 39 ++++++++++++++++++++++++++ - source/blender/blenkernel/intern/writeffmpeg.c | 3 +- - 2 files changed, 41 insertions(+), 1 deletion(-) - -diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h -index 9c06c8a..f7f437c 100644 ---- a/intern/ffmpeg/ffmpeg_compat.h -+++ b/intern/ffmpeg/ffmpeg_compat.h -@@ -109,6 +109,45 @@ int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt) - - #endif - -+/* XXX TODO Probably fix to correct modern flags in code? Not sure how old FFMPEG we want to support though, -+ * so for now this will do. */ -+ -+#ifndef FF_MIN_BUFFER_SIZE -+# ifdef AV_INPUT_BUFFER_MIN_SIZE -+# define FF_MIN_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE -+# endif -+#endif -+ -+#ifndef FF_INPUT_BUFFER_PADDING_SIZE -+# ifdef AV_INPUT_BUFFER_PADDING_SIZE -+# define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE -+# endif -+#endif -+ -+#ifndef CODEC_FLAG_GLOBAL_HEADER -+# ifdef AV_CODEC_FLAG_GLOBAL_HEADER -+# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER -+# endif -+#endif -+ -+#ifndef CODEC_FLAG_GLOBAL_HEADER -+# ifdef AV_CODEC_FLAG_GLOBAL_HEADER -+# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER -+# endif -+#endif -+ -+#ifndef CODEC_FLAG_INTERLACED_DCT -+# ifdef AV_CODEC_FLAG_INTERLACED_DCT -+# define CODEC_FLAG_INTERLACED_DCT AV_CODEC_FLAG_INTERLACED_DCT -+# endif -+#endif -+ -+#ifndef CODEC_FLAG_INTERLACED_ME -+# ifdef AV_CODEC_FLAG_INTERLACED_ME -+# define CODEC_FLAG_INTERLACED_ME AV_CODEC_FLAG_INTERLACED_ME -+# endif -+#endif -+ - /* FFmpeg upstream 1.0 is the first who added AV_ prefix. */ - #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 59, 100) - # define AV_CODEC_ID_NONE CODEC_ID_NONE -diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c -index a19e414..04d508a 100644 ---- a/source/blender/blenkernel/intern/writeffmpeg.c -+++ b/source/blender/blenkernel/intern/writeffmpeg.c -@@ -605,7 +605,8 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int - c->rc_buffer_aggressivity = 1.0; - #endif - -- c->me_method = ME_EPZS; -+ /* Deprecated and not doing anything since July 2015, deleted in recent ffmpeg */ -+ //c->me_method = ME_EPZS; - - codec = avcodec_find_encoder(c->codec_id); - if (!codec) diff --git a/gnu/packages/patches/combinatorial-blas-awpm.patch b/gnu/packages/patches/combinatorial-blas-awpm.patch new file mode 100644 index 0000000000..86d4ab2dcf --- /dev/null +++ b/gnu/packages/patches/combinatorial-blas-awpm.patch @@ -0,0 +1,67 @@ +Install BipartiteMatchings headers for SuperLU_DIST. + +--- a/BipartiteMatchings/ApproxWeightPerfectMatching.h ++++ b/BipartiteMatchings/ApproxWeightPerfectMatching.h +@@ -9,7 +9,7 @@ + #ifndef ApproxWeightPerfectMatching_h + #define ApproxWeightPerfectMatching_h + +-#include "../CombBLAS.h" ++#include "CombBLAS.h" + #include "BPMaximalMatching.h" + #include "BPMaximumMatching.h" + #include <parallel/algorithm> +--- a/BipartiteMatchings/BPMaximalMatching.h ++++ b/BipartiteMatchings/BPMaximalMatching.h +@@ -1,7 +1,7 @@ + #ifndef BP_MAXIMAL_MATCHING_H + #define BP_MAXIMAL_MATCHING_H + +-#include "../CombBLAS.h" ++#include "CombBLAS.h" + #include <iostream> + #include <functional> + #include <algorithm> +--- a/BipartiteMatchings/BPMaximumMatching.h ++++ b/BipartiteMatchings/BPMaximumMatching.h +@@ -1,7 +1,7 @@ + #ifndef BP_MAXIMUM_MATCHING_H + #define BP_MAXIMUM_MATCHING_H + +-#include "../CombBLAS.h" ++#include "CombBLAS.h" + #include <mpi.h> + #include <sys/time.h> + #include <iostream> +--- a/BipartiteMatchings/MatchingDefs.h ++++ b/BipartiteMatchings/MatchingDefs.h +@@ -9,7 +9,7 @@ + #ifndef MatchingDefs_h + #define MatchingDefs_h + +-#include "../CombBLAS.h" ++#include "CombBLAS.h" + #include <iostream> + + namespace combblas { +--- a/BipartiteMatchings/Utility.h ++++ b/BipartiteMatchings/Utility.h +@@ -1,7 +1,7 @@ + #ifndef BP_UTILITY_H + #define BP_UTILITY_H + +-#include "../CombBLAS.h" ++#include "CombBLAS.h" + + namespace combblas { + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -68,6 +68,7 @@ set_property(TARGET CombBLAS PROPERTY VERSION ${CombBLAS_VERSION}) + # installation + install(DIRECTORY include/ DESTINATION include) + install(DIRECTORY psort-1.0/include/ DESTINATION include) ++install(DIRECTORY BipartiteMatchings DESTINATION include FILES_MATCHING PATTERN "*.h") + install(TARGETS CombBLAS EXPORT CombBLASTargets + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib diff --git a/gnu/packages/patches/combinatorial-blas-io-fix.patch b/gnu/packages/patches/combinatorial-blas-io-fix.patch new file mode 100644 index 0000000000..0ad28e5e0b --- /dev/null +++ b/gnu/packages/patches/combinatorial-blas-io-fix.patch @@ -0,0 +1,14 @@ +IO not appropriate in the context of a sorting routine, and in any case the +proper headers are not included, so gcc emits an undefined symbol error. +Remove the "printf" statement. + +--- CombBLAS_beta_16_2/usort/include/usort/seqUtils.tcc ++++ CombBLAS_beta_16_2/usort/include/usort/seqUtils.tcc +@@ -142,7 +142,6 @@ + } + if ( (a[nmax]==a[nmin]) && (ctr==0) ) + { +- printf("All the numbers are identical, the list is sorted\n"); + return; + } + diff --git a/gnu/packages/patches/datamash-arm-tests.patch b/gnu/packages/patches/datamash-arm-tests.patch deleted file mode 100644 index a24c5320ad..0000000000 --- a/gnu/packages/patches/datamash-arm-tests.patch +++ /dev/null @@ -1,71 +0,0 @@ -See https://lists.gnu.org/archive/html/bug-datamash/2018-03/msg00003.html and -https://lists.gnu.org/archive/html/bug-datamash/2018-03/txt4DmvR7p6J9.txt - -From d446dba317aa067440d6312d955d523129949327 Mon Sep 17 00:00:00 2001 -From: Assaf Gordon <address@hidden> -Date: Thu, 22 Mar 2018 11:00:34 -0600 -Subject: [PATCH 1/2] tests: fix --format='%4000f' expected output - -Can be 1.000009... or 1.000008999, depending on representation. - -* tests/datamash-output-format.pl: Check only the first 5 digits. ---- - tests/datamash-output-format.pl | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/tests/datamash-output-format.pl b/tests/datamash-output-format.pl -index 52c68a2..ca99bb0 100755 ---- a/tests/datamash-output-format.pl -+++ b/tests/datamash-output-format.pl -@@ -98,12 +98,13 @@ my @Tests = - {OUT => "0" x 3999 . "1\n"}], - - # due to binary floating representation, some decimal point digits won't be -- # zero (e.g. 1.0000090000000000000000000000000523453254320000000...). -- # The OUT_SUBST replaces exactly 3994 digits (as expected from the format) -+ # zero (e.g. 1.0000090000000000000000000000000523453254320000000... or -+ # 1.000008999999...). -+ # The OUT_SUBST replaces exactly 3995 digits (as expected from the format) - # with an "X". - ['m2', '--format "%.4000f" sum 1', {IN_PIPE=>$in1}, -- {OUT => "1.000009X\n"}, -- {OUT_SUBST => 's/^(1\.000009)([0-9]{3994})$/\1X/'}], -+ {OUT => "1.00000X\n"}, -+ {OUT_SUBST => 's/^(1\.00000)([0-9]{3995})$/\1X/'}], - - ); - --- -2.7.4 - - -From f4871963974a96d6e69cb80b9c2fac7ff0c1d472 Mon Sep 17 00:00:00 2001 -From: Assaf Gordon <address@hidden> -Date: Thu, 22 Mar 2018 11:18:13 -0600 -Subject: [PATCH 2/2] tests: disable --format="%a" test - -Valid output can differ (e.g. 0x8.000p-3 vs 0x1.000p+0). - -* tests/datamash-output-format.pl: Disable 'a1' test. ---- - tests/datamash-output-format.pl | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/tests/datamash-output-format.pl b/tests/datamash-output-format.pl -index ca99bb0..5e90ae0 100755 ---- a/tests/datamash-output-format.pl -+++ b/tests/datamash-output-format.pl -@@ -90,7 +90,9 @@ my @Tests = - ['e2', '--format "%.3e" sum 1', {IN_PIPE=>$in1}, {OUT=>"1.000e+00\n"}], - - # Test Custom formats: %a -- ['a1', '--format "%0.3a" sum 1', {IN_PIPE=>$in1}, {OUT=>"0x8.000p-3\n"}], -+ # Disable the test for now. Valid output can differ (e.g. 0x8.000p-3 and -+ # 0x1.000p0 ). -+ # ['a1', '--format "%0.3a" sum 1', {IN_PIPE=>$in1}, {OUT=>"0x8.000p-3\n"}], - - - # Custom formats can use lots of memory --- -2.7.4 - diff --git a/gnu/packages/patches/docker-engine-test-noinstall.patch b/gnu/packages/patches/docker-engine-test-noinstall.patch new file mode 100644 index 0000000000..85d56a3465 --- /dev/null +++ b/gnu/packages/patches/docker-engine-test-noinstall.patch @@ -0,0 +1,23 @@ +Last-Update: 2018-06-18 +Forwarded: not-needed +Author: Dmitry Smirnov <onlyjob@debian.org> +Description: prevents test-time installation that causes FTBFS. +~~~~ + go test net: open /usr/lib/go-1.10/pkg/linux_amd64/net.a: permission denied +~~~~ + +--- a/hack/test/unit ++++ b/hack/test/unit +@@ -18,12 +18,8 @@ + + exclude_paths="/vendor/|/integration" + pkg_list=$(go list $TESTDIRS | grep -vE "($exclude_paths)") + +-# install test dependencies once before running tests for each package. This +-# significantly reduces the runtime. +-go test -i "${BUILDFLAGS[@]}" $pkg_list +- + for pkg in $pkg_list; do + go test "${BUILDFLAGS[@]}" \ + -cover \ + -coverprofile=profile.out \ diff --git a/gnu/packages/patches/docker-fix-tests.patch b/gnu/packages/patches/docker-fix-tests.patch new file mode 100644 index 0000000000..3e3e318e25 --- /dev/null +++ b/gnu/packages/patches/docker-fix-tests.patch @@ -0,0 +1,28 @@ +Author: Danny Milosavljevic <dannym@scratchpost.org> +The socket name ended up too long inside the container. +Use a shorter one. +--- a/pkg/authorization/authz_unix_test.go 2019-01-10 01:55:02.997985947 +0100 ++++ b/pkg/authorization/authz_unix_test.go 2019-01-10 02:03:21.177439757 +0100 +@@ -24,7 +24,7 @@ + ) + + const ( +- pluginAddress = "authz-test-plugin.sock" ++ pluginAddress = "/tmp/authz-test-plugin.sock" + ) + + func TestAuthZRequestPluginError(t *testing.T) { +@@ -263,12 +263,7 @@ + + // createTestPlugin creates a new sample authorization plugin + func createTestPlugin(t *testing.T) *authorizationPlugin { +- pwd, err := os.Getwd() +- if err != nil { +- t.Fatal(err) +- } +- +- client, err := plugins.NewClient("unix:///"+path.Join(pwd, pluginAddress), &tlsconfig.Options{InsecureSkipVerify: true}) ++ client, err := plugins.NewClient("unix:///"+path.Join("/", pluginAddress), &tlsconfig.Options{InsecureSkipVerify: true}) + if err != nil { + t.Fatalf("Failed to create client %v", err) + } diff --git a/gnu/packages/patches/emacs-wordnut-require-adaptive-wrap.patch b/gnu/packages/patches/emacs-wordnut-require-adaptive-wrap.patch new file mode 100644 index 0000000000..be10254c33 --- /dev/null +++ b/gnu/packages/patches/emacs-wordnut-require-adaptive-wrap.patch @@ -0,0 +1,20 @@ +Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> + +This patch forces the use of adaptive-wrap. This feature is optional but we +prefer to enable it by default. + +diff --git a/wordnut.el b/wordnut.el +index 0ae86ad..72f9221 100644 +--- a/wordnut.el ++++ b/wordnut.el +@@ -4,6 +4,7 @@ + (require 'subr-x) + (require 'outline) + (require 'imenu) ++(require 'adaptive-wrap) + + (require 'wordnut-history) + +-- +2.17.1 + diff --git a/gnu/packages/patches/file-CVE-2018-10360.patch b/gnu/packages/patches/file-CVE-2018-10360.patch new file mode 100644 index 0000000000..9285611c04 --- /dev/null +++ b/gnu/packages/patches/file-CVE-2018-10360.patch @@ -0,0 +1,27 @@ +https://github.com/file/file/commit/a642587a9c9e2dd7feacdf513c3643ce26ad3c22.patch +The leading part of the patch starting at line 27 was trimmed off. +This patch should be OK to drop with file@5.35. + +From a642587a9c9e2dd7feacdf513c3643ce26ad3c22 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas <christos@zoulas.com> +Date: Sat, 9 Jun 2018 16:00:06 +0000 +Subject: [PATCH] Avoid reading past the end of buffer (Rui Reis) + +--- + src/readelf.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/readelf.c b/src/readelf.c +index 79c83f9f5..1f41b4611 100644 +--- a/src/readelf.c ++++ b/src/readelf.c +@@ -842,7 +842,8 @@ do_core_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, + + cname = (unsigned char *) + &nbuf[doff + prpsoffsets(i)]; +- for (cp = cname; *cp && isprint(*cp); cp++) ++ for (cp = cname; cp < nbuf + size && *cp ++ && isprint(*cp); cp++) + continue; + /* + * Linux apparently appends a space at the end diff --git a/gnu/packages/patches/glibc-memchr-overflow-i686.patch b/gnu/packages/patches/glibc-memchr-overflow-i686.patch deleted file mode 100644 index 0b1b5b9f96..0000000000 --- a/gnu/packages/patches/glibc-memchr-overflow-i686.patch +++ /dev/null @@ -1,74 +0,0 @@ -Extracted from glibc upstream git repository. Changes to the ChangeLog have -been removed. This patch is needed to fix spurious segmentation faults on -i686. - -From 3abeeec5f46ff036bd9df60bb096e20314ccd078 Mon Sep 17 00:00:00 2001 -From: Adhemerval Zanella <adhemerval.zanella@linaro.org> -Date: Tue, 14 Mar 2017 14:16:13 -0300 -Subject: [PATCH] Fix i686 memchr overflow calculation (BZ#21182) - -This patch fixes the regression added by 23d2770 for final address -overflow calculation. The subtraction of the considered size (16) -at line 120 is at wrong place, for sizes less than 16 subsequent -overflow check will not take in consideration an invalid size (since -the subtraction will be negative). Also, the lea instruction also -does not raise the carry flag (CF) that is used in subsequent jbe -to check for overflow. - -The fix is to follow x86_64 logic from 3daef2c where the overflow -is first check and a sub instruction is issued. In case of resulting -negative size, CF will be set by the sub instruction and a NULL -result will be returned. The patch also add similar tests reported -in bug report. - -Checked on i686-linux-gnu and x86_64-linux-gnu. - - * string/test-memchr.c (do_test): Add BZ#21182 checks for address - near end of a page. - * sysdeps/i386/i686/multiarch/memchr-sse2.S (__memchr): Fix - overflow calculation. ---- - string/test-memchr.c | 6 ++++++ - sysdeps/i386/i686/multiarch/memchr-sse2.S | 2 +- - 3 files changed, 15 insertions(+), 1 deletion(-) - -diff --git a/string/test-memchr.c b/string/test-memchr.c -index 2403c9242b..669e092e7d 100644 ---- a/string/test-memchr.c -+++ b/string/test-memchr.c -@@ -210,6 +210,12 @@ test_main (void) - do_test (0, i, i + 1, i + 1, 0); - } - -+ /* BZ#21182 - wrong overflow calculation for i686 implementation -+ with address near end of the page. */ -+ for (i = 2; i < 16; ++i) -+ /* page_size is in fact getpagesize() * 2. */ -+ do_test (page_size / 2 - i, i, i, 1, 0x9B); -+ - do_random_tests (); - return ret; - } -diff --git a/sysdeps/i386/i686/multiarch/memchr-sse2.S b/sysdeps/i386/i686/multiarch/memchr-sse2.S -index 910679cfc0..e41f324a77 100644 ---- a/sysdeps/i386/i686/multiarch/memchr-sse2.S -+++ b/sysdeps/i386/i686/multiarch/memchr-sse2.S -@@ -117,7 +117,6 @@ L(crosscache): - - # ifndef USE_AS_RAWMEMCHR - jnz L(match_case2_prolog1) -- lea -16(%edx), %edx - /* Calculate the last acceptable address and check for possible - addition overflow by using satured math: - edx = ecx + edx -@@ -125,6 +124,7 @@ L(crosscache): - add %ecx, %edx - sbb %eax, %eax - or %eax, %edx -+ sub $16, %edx - jbe L(return_null) - lea 16(%edi), %edi - # else --- -2.12.2 - diff --git a/gnu/packages/patches/gnucash-disable-failing-tests.patch b/gnu/packages/patches/gnucash-disable-failing-tests.patch deleted file mode 100644 index e0fdd86b5d..0000000000 --- a/gnu/packages/patches/gnucash-disable-failing-tests.patch +++ /dev/null @@ -1,39 +0,0 @@ -test-stress-options.scm does not exist, and test-qof passes when run in the -build directory after the gnucash build. - -diff -ur gnucash-3.3.old/gnucash/report/standard-reports/test/CMakeLists.txt gnucash-3.3/gnucash/report/standard-reports/test/CMakeLists.txt ---- gnucash-3.3.old/gnucash/report/standard-reports/test/CMakeLists.txt 2018-10-04 09:29:00.916641417 -0400 -+++ gnucash-3.3/gnucash/report/standard-reports/test/CMakeLists.txt 2018-10-04 09:30:52.962504860 -0400 -@@ -13,10 +13,6 @@ - test-income-gst.scm - ) - --set(scm_test_with_textual_ports_SOURCES -- test-stress-options.scm --) -- - set(GUILE_DEPENDS - scm-gnc-module - scm-app-utils -@@ -31,9 +27,6 @@ - - if (HAVE_SRFI64) - gnc_add_scheme_tests("${scm_test_with_srfi64_SOURCES}") -- if (HAVE_TEXT_PORTS) -- gnc_add_scheme_tests("${scm_test_with_textual_ports_SOURCES}") -- endif (HAVE_TEXT_PORTS) - endif (HAVE_SRFI64) - - gnc_add_scheme_tests("${scm_test_standard_reports_SOURCES}") -diff -ur gnucash-3.3.old/libgnucash/engine/test/CMakeLists.txt gnucash-3.3/libgnucash/engine/test/CMakeLists.txt ---- gnucash-3.3.old/libgnucash/engine/test/CMakeLists.txt 2018-10-04 09:29:00.876640751 -0400 -+++ gnucash-3.3/libgnucash/engine/test/CMakeLists.txt 2018-10-05 10:46:22.542962546 -0400 -@@ -54,8 +54,6 @@ - # This test does not run on Win32 - if (NOT WIN32) - set(SOURCES ${test_qof_SOURCES} ${CMAKE_SOURCE_DIR}/common/test-core/unittest-support.c) -- add_engine_test(test-qof "${SOURCES}") -- target_compile_definitions(test-qof PRIVATE TESTPROG=test_qof) - - set(SOURCES ${test_engine_SOURCES} ${CMAKE_SOURCE_DIR}/common/test-core/unittest-support.c) - add_engine_test(test-engine "${SOURCES}") diff --git a/gnu/packages/patches/gnucash-fix-test-transaction-failure.patch b/gnu/packages/patches/gnucash-fix-test-transaction-failure.patch new file mode 100644 index 0000000000..7b1b29f06c --- /dev/null +++ b/gnu/packages/patches/gnucash-fix-test-transaction-failure.patch @@ -0,0 +1,54 @@ +# This patch was submitted upstream to: https://bugs.gnucash.org/show_bug.cgi?id=797008. +From c20d74bebca516d0e391724202aad511967fe109 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer <maxim.cournoyer@gmail.com> +Date: Wed, 2 Jan 2019 14:46:28 -0500 +Subject: [PATCH] tests: Fix a test failure in test-transaction.scm. + +With the New Year upon us, a test which was hard-coded to use 2018 now +failed. + +Fixes issue #797008 (see: +https://bugs.gnucash.org/show_bug.cgi?id=797008). + +* gnucash/report/standard-reports/test/test-transaction.scm: +(trep-tests): Use the current year in the test string instead of a +static one. +--- + gnucash/report/standard-reports/test/test-transaction.scm | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/gnucash/report/standard-reports/test/test-transaction.scm b/gnucash/report/standard-reports/test/test-transaction.scm +index 755aba298..ae3fbd5c1 100644 +--- a/gnucash/report/standard-reports/test/test-transaction.scm ++++ b/gnucash/report/standard-reports/test/test-transaction.scm +@@ -5,6 +5,7 @@ + (use-modules (gnucash report stylesheets)) + (use-modules (gnucash report report-system)) + (use-modules (gnucash report report-system test test-extras)) ++(use-modules (srfi srfi-19)) + (use-modules (srfi srfi-64)) + (use-modules (gnucash engine test srfi64-extras)) + (use-modules (sxml simple)) +@@ -643,7 +644,8 @@ + (set-option! options "General" "Show original currency amount" #t) + (set-option! options "Sorting" "Primary Key" 'date) + (set-option! options "Sorting" "Primary Subtotal for Date Key" 'none) +- (let* ((sxml (options->sxml options "dual columns"))) ++ (let* ((sxml (options->sxml options "dual columns")) ++ (current-year (date->string (current-date) "~y"))) + (test-equal "dual amount column, with original currency headers" + (list "Date" "Num" "Description" "Memo/Notes" "Account" + "Debit (USD)" "Credit (USD)" "Debit" "Credit") +@@ -652,7 +654,8 @@ + (list "Grand Total" "$2,280.00" "$2,280.00") + (get-row-col sxml -1 #f)) + (test-equal "dual amount column, first transaction correct" +- (list "01/03/18" "$103 income" "Root.Asset.Bank" "$103.00" "$103.00") ++ (list (string-append "01/03/" current-year) "$103 income" ++ "Root.Asset.Bank" "$103.00" "$103.00") + (get-row-col sxml 1 #f))) + ) + +-- +2.19.0 + diff --git a/gnu/packages/patches/gnucash-price-quotes-perl.patch b/gnu/packages/patches/gnucash-price-quotes-perl.patch deleted file mode 100644 index 3101ddb007..0000000000 --- a/gnu/packages/patches/gnucash-price-quotes-perl.patch +++ /dev/null @@ -1,24 +0,0 @@ -After wrapping gnc-fq-check and gnc-fq-helper we can no longer execute them -with perl, so execute them directly instead. - -diff -ur gnucash-3.2.old/libgnucash/scm/price-quotes.scm gnucash-3.2/libgnucash/scm/price-quotes.scm ---- gnucash-3.2.old/libgnucash/scm/price-quotes.scm 2018-09-15 00:48:33.718389646 -0400 -+++ gnucash-3.2/libgnucash/scm/price-quotes.scm 2018-09-15 13:51:49.249862724 -0400 -@@ -74,7 +74,7 @@ - (define (start-program) - (if (not (string-null? gnc:*finance-quote-check*)) - (set! program (gnc-spawn-process-async -- (list "perl" "-w" gnc:*finance-quote-check*) #t)))) -+ (list gnc:*finance-quote-check*) #t)))) - - (define (get-sources) - (if (not (null? program)) -@@ -158,7 +158,7 @@ - (define (start-quoter) - (if (not (string-null? gnc:*finance-quote-helper*)) - (set! quoter (gnc-spawn-process-async -- (list "perl" "-w" gnc:*finance-quote-helper*) #t)))) -+ (list gnc:*finance-quote-helper*) #t)))) - - (define (get-quotes) - (if (not (null? quoter)) diff --git a/gnu/packages/patches/icecat-avoid-bundled-libraries.patch b/gnu/packages/patches/icecat-avoid-bundled-libraries.patch index 33203b1a33..d9a7dfe550 100644 --- a/gnu/packages/patches/icecat-avoid-bundled-libraries.patch +++ b/gnu/packages/patches/icecat-avoid-bundled-libraries.patch @@ -1,7 +1,7 @@ Fixes needed when avoiding bundled libraries. ---- icecat-60.2.0/xpcom/build/moz.build.orig 2018-09-13 17:46:49.000000000 -0400 -+++ icecat-60.2.0/xpcom/build/moz.build 2018-09-22 04:26:50.659564554 -0400 +--- icecat-60.5.0/xpcom/build/moz.build.orig 2018-09-13 17:46:49.000000000 -0400 ++++ icecat-60.5.0/xpcom/build/moz.build 2018-09-22 04:26:50.659564554 -0400 @@ -99,10 +99,5 @@ '/docshell/base', ] @@ -13,8 +13,8 @@ Fixes needed when avoiding bundled libraries. - if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': CXXFLAGS += CONFIG['TK_CFLAGS'] ---- icecat-60.2.0/storage/moz.build.orig 2018-09-13 17:51:11.000000000 -0400 -+++ icecat-60.2.0/storage/moz.build 2018-09-22 04:26:50.659564554 -0400 +--- icecat-60.5.0/storage/moz.build.orig 2018-09-13 17:51:11.000000000 -0400 ++++ icecat-60.5.0/storage/moz.build 2018-09-22 04:26:50.659564554 -0400 @@ -117,7 +117,6 @@ DEFINES['MOZ_MEMORY_TEMP_STORE_PRAGMA'] = True @@ -23,8 +23,8 @@ Fixes needed when avoiding bundled libraries. '/dom/base', ] ---- icecat-60.2.0/dom/indexedDB/moz.build.orig 2018-09-13 17:49:42.000000000 -0400 -+++ icecat-60.2.0/dom/indexedDB/moz.build 2018-09-22 04:26:50.663564574 -0400 +--- icecat-60.5.0/dom/indexedDB/moz.build.orig 2018-09-13 17:49:42.000000000 -0400 ++++ icecat-60.5.0/dom/indexedDB/moz.build 2018-09-22 04:26:50.663564574 -0400 @@ -102,7 +102,6 @@ CXXFLAGS += ['-Wno-error=shadow'] @@ -33,8 +33,8 @@ Fixes needed when avoiding bundled libraries. '/dom/base', '/dom/storage', '/ipc/glue', ---- icecat-60.2.0/media/webrtc/trunk/webrtc/base/rtc_task_queue_gn/moz.build.orig 2018-09-13 17:40:54.000000000 -0400 -+++ icecat-60.2.0/media/webrtc/trunk/webrtc/base/rtc_task_queue_gn/moz.build 2018-09-23 21:33:12.319975105 -0400 +--- icecat-60.5.0/media/webrtc/trunk/webrtc/base/rtc_task_queue_gn/moz.build.orig 2018-09-13 17:40:54.000000000 -0400 ++++ icecat-60.5.0/media/webrtc/trunk/webrtc/base/rtc_task_queue_gn/moz.build 2018-09-23 21:33:12.319975105 -0400 @@ -130,11 +130,6 @@ DEFINES["WEBRTC_POSIX"] = True DEFINES["_FILE_OFFSET_BITS"] = "64" diff --git a/gnu/packages/patches/icecat-makeicecat.patch b/gnu/packages/patches/icecat-makeicecat.patch new file mode 100644 index 0000000000..2a11bf0b70 --- /dev/null +++ b/gnu/packages/patches/icecat-makeicecat.patch @@ -0,0 +1,154 @@ +Make some of the changes needed to the 'makeicecat' script, to allow it to run +in a snippet without network access. After this patch is applied, some +additional changes will be made using 'substitute*'. + +diff --git a/makeicecat b/makeicecat +index aa46b94..db27a86 100644 +--- a/makeicecat ++++ b/makeicecat +@@ -36,75 +36,75 @@ export DEBFULLNAME="Ruben Rodriguez" + + DATA="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/data + +-mkdir output +-cd output ++# mkdir output ++# cd output + + ############################################################################### + # Retrieve FF source code + ############################################################################### + +-rm mozilla-esr${FFMAJOR} $SOURCEDIR -rf +- +-wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz +-wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc +-gpg --recv-keys --keyserver keyserver.ubuntu.com 24C6F355 +-gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc +- +-echo Extracting Firefox tarball +-tar -xf firefox-${FFVERSION}esr.source.tar.xz +- +-mv firefox-${FFVERSION} $SOURCEDIR ++# rm mozilla-esr${FFMAJOR} $SOURCEDIR -rf ++# ++# wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz ++# wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc ++# gpg --recv-keys --keyserver keyserver.ubuntu.com 24C6F355 ++# gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc ++# ++# echo Extracting Firefox tarball ++# tar -xf firefox-${FFVERSION}esr.source.tar.xz ++# ++# mv firefox-${FFVERSION} $SOURCEDIR + + ############################################################################### + # Retrieve /debian from Ubuntu + ############################################################################### + +-rm -rf firefox.$CODENAME +-bzr branch https://code.launchpad.net/~mozillateam/firefox/firefox.$CODENAME +-cd firefox.$CODENAME +-bzr revert -r$REVISION +-echo '3.0 (native)' > debian/source/format +- +-for PATCH in ubuntu-bookmarks.patch ubuntu-ua-string-changes.patch unity-menubar.patch ubuntu-search-defaults.patch fix-make-package-tests-without-webrtc.patch revert-upstream-search-engine-changes.patch +-do +- rm debian/patches/$PATCH +- sed "/$PATCH/d" -i debian/patches/series +-done +-sed "/test-/d" -i debian/patches/series +-cd .. +- +-mv firefox.$CODENAME/debian $SOURCEDIR +-rm -rf firefox.$CODENAME ++# rm -rf firefox.$CODENAME ++# bzr branch https://code.launchpad.net/~mozillateam/firefox/firefox.$CODENAME ++# cd firefox.$CODENAME ++# bzr revert -r$REVISION ++# echo '3.0 (native)' > debian/source/format ++# ++# for PATCH in ubuntu-bookmarks.patch ubuntu-ua-string-changes.patch unity-menubar.patch ubuntu-search-defaults.patch fix-make-package-tests-without-webrtc.patch revert-upstream-search-engine-changes.patch ++# do ++# rm debian/patches/$PATCH ++# sed "/$PATCH/d" -i debian/patches/series ++# done ++# sed "/test-/d" -i debian/patches/series ++# cd .. ++# ++# mv firefox.$CODENAME/debian $SOURCEDIR ++# rm -rf firefox.$CODENAME + + ############################################################################### + # Retrieve l10n + ############################################################################### + +-mkdir l10n +-cd l10n +-while read line;do +- line=$(echo $line |cut -d' ' -f1) +- #[ $line = "es-ES" ] || continue # To speed up testing +- [ $line = "en-US" ] && continue +- hg clone https://hg.mozilla.org/l10n-central/$line +- mkdir -p $line/browser/chrome/browser/preferences +- touch $line/browser/chrome/browser/preferences/advanced-scripts.dtd +- rm -rf $line/.hg* +-done < ../$SOURCEDIR/browser/locales/shipped-locales +-cd .. +- +-mv l10n $SOURCEDIR +- +-hg clone http://hg.mozilla.org/l10n/compare-locales/ +-cd compare-locales/ +-hg checkout RELEASE_3_3_0 +-cd .. +-rm compare-locales/.hg* compare-locales/.git* -rf +-mv compare-locales $SOURCEDIR/l10n ++# mkdir l10n ++# cd l10n ++# while read line;do ++# line=$(echo $line |cut -d' ' -f1) ++# #[ $line = "es-ES" ] || continue # To speed up testing ++# [ $line = "en-US" ] && continue ++# hg clone https://hg.mozilla.org/l10n-central/$line ++# mkdir -p $line/browser/chrome/browser/preferences ++# touch $line/browser/chrome/browser/preferences/advanced-scripts.dtd ++# rm -rf $line/.hg* ++# done < ../$SOURCEDIR/browser/locales/shipped-locales ++# cd .. ++# ++# mv l10n $SOURCEDIR ++# ++# hg clone http://hg.mozilla.org/l10n/compare-locales/ ++# cd compare-locales/ ++# hg checkout RELEASE_3_3_0 ++# cd .. ++# rm compare-locales/.hg* compare-locales/.git* -rf ++# mv compare-locales $SOURCEDIR/l10n + + ####################################################### + +-cd $SOURCEDIR ++# cd $SOURCEDIR + + #for patch in $DATA/patches/*; do + # echo Patching with file: $patch +@@ -720,7 +720,7 @@ debian/rules debian/control + touch -d "yesterday" debian/control + debian/rules debian/control + +-echo | dch -b -D stable -v "$ICECATVERSION" "Converted into IceCat (http://www.gnu.org/software/gnuzilla/)" ++# echo | dch -b -D stable -v "$ICECATVERSION" "Converted into IceCat (http://www.gnu.org/software/gnuzilla/)" + sed "1s/firefox/icecat/" -i debian/changelog + + touch configure js/src/configure +@@ -734,6 +734,6 @@ sed 's/777/755/;' -i toolkit/crashreporter/google-breakpad/Makefile.in + /bin/sed 's/chmod a+w/chmod u+w/' -i ./js/src/ctypes/libffi/Makefile.in ./toolkit/crashreporter/google-breakpad/Makefile.in ./toolkit/crashreporter/google-breakpad/src/third_party/glog/Makefile.in || true + + +-cd .. +-echo Packaging tarball +-tar cfj icecat-$ICECATVERSION.tar.bz2 $SOURCEDIR ++# cd .. ++# echo Packaging tarball ++# tar cfj icecat-$ICECATVERSION.tar.bz2 $SOURCEDIR diff --git a/gnu/packages/patches/icecat-use-system-graphite2+harfbuzz.patch b/gnu/packages/patches/icecat-use-system-graphite2+harfbuzz.patch index 94c211b797..776b5f3d9a 100644 --- a/gnu/packages/patches/icecat-use-system-graphite2+harfbuzz.patch +++ b/gnu/packages/patches/icecat-use-system-graphite2+harfbuzz.patch @@ -4,8 +4,8 @@ Based on: https://svnweb.freebsd.org/ports/head/www/firefox-esr/files/patch-bug847568?revision=472833&view=co Modified for use with patch -p1, and to apply cleanly to GNU IceCat. ---- icecat-60.2.0/config/system-headers.mozbuild -+++ icecat-60.2.0/config/system-headers.mozbuild +--- icecat-60.5.0/config/system-headers.mozbuild ++++ icecat-60.5.0/config/system-headers.mozbuild @@ -1311,6 +1311,19 @@ 'pixman.h', ] @@ -26,8 +26,8 @@ Modified for use with patch -p1, and to apply cleanly to GNU IceCat. if CONFIG['MOZ_SYSTEM_LIBVPX']: system_headers += [ 'vpx_mem/vpx_mem.h', ---- icecat-60.2.0/dom/base/moz.build -+++ icecat-60.2.0/dom/base/moz.build +--- icecat-60.5.0/dom/base/moz.build ++++ icecat-60.5.0/dom/base/moz.build @@ -474,6 +474,9 @@ if CONFIG['MOZ_X11']: CXXFLAGS += CONFIG['TK_CFLAGS'] @@ -38,8 +38,8 @@ Modified for use with patch -p1, and to apply cleanly to GNU IceCat. GENERATED_FILES += [ 'PropertyUseCounterMap.inc', 'UseCounterList.h', ---- icecat-60.2.0/gfx/graphite2/moz-gr-update.sh -+++ icecat-60.2.0/gfx/graphite2/moz-gr-update.sh +--- icecat-60.5.0/gfx/graphite2/moz-gr-update.sh ++++ icecat-60.5.0/gfx/graphite2/moz-gr-update.sh @@ -1,6 +1,7 @@ #!/bin/bash @@ -66,8 +66,8 @@ Modified for use with patch -p1, and to apply cleanly to GNU IceCat. echo echo If gfx/graphite2/src/files.mk has changed, please make corresponding ---- icecat-60.2.0/gfx/moz.build -+++ icecat-60.2.0/gfx/moz.build +--- icecat-60.5.0/gfx/moz.build ++++ icecat-60.5.0/gfx/moz.build @@ -10,6 +10,12 @@ with Files('**'): if CONFIG['MOZ_TREE_CAIRO']: DIRS += ['cairo'] @@ -90,8 +90,8 @@ Modified for use with patch -p1, and to apply cleanly to GNU IceCat. 'ots/src', 'thebes', 'ipc', ---- icecat-60.2.0/gfx/skia/generate_mozbuild.py -+++ icecat-60.2.0/gfx/skia/generate_mozbuild.py +--- icecat-60.5.0/gfx/skia/generate_mozbuild.py ++++ icecat-60.5.0/gfx/skia/generate_mozbuild.py @@ -148,6 +148,9 @@ '-Wno-unused-private-field', ] @@ -102,8 +102,8 @@ Modified for use with patch -p1, and to apply cleanly to GNU IceCat. if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk3', 'android'): CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS'] ---- icecat-60.2.0/gfx/skia/moz.build -+++ icecat-60.2.0/gfx/skia/moz.build +--- icecat-60.5.0/gfx/skia/moz.build ++++ icecat-60.5.0/gfx/skia/moz.build @@ -822,6 +822,9 @@ '-Wno-unused-private-field', ] @@ -114,8 +114,8 @@ Modified for use with patch -p1, and to apply cleanly to GNU IceCat. if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk3', 'android'): CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS'] ---- icecat-60.2.0/gfx/thebes/moz.build -+++ icecat-60.2.0/gfx/thebes/moz.build +--- icecat-60.5.0/gfx/thebes/moz.build ++++ icecat-60.5.0/gfx/thebes/moz.build @@ -272,7 +272,13 @@ LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES'] @@ -131,8 +131,8 @@ Modified for use with patch -p1, and to apply cleanly to GNU IceCat. if CONFIG['CC_TYPE'] == 'clang': # Suppress warnings from Skia header files. ---- icecat-60.2.0/intl/unicharutil/util/moz.build -+++ icecat-60.2.0/intl/unicharutil/util/moz.build +--- icecat-60.5.0/intl/unicharutil/util/moz.build ++++ icecat-60.5.0/intl/unicharutil/util/moz.build @@ -25,4 +25,7 @@ UNIFIED_SOURCES += [ 'nsUnicodeProperties.cpp', ] @@ -141,8 +141,8 @@ Modified for use with patch -p1, and to apply cleanly to GNU IceCat. + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] + FINAL_LIBRARY = 'xul' ---- icecat-60.2.0/netwerk/dns/moz.build -+++ icecat-60.2.0/netwerk/dns/moz.build +--- icecat-60.5.0/netwerk/dns/moz.build ++++ icecat-60.5.0/netwerk/dns/moz.build @@ -76,3 +76,6 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc'): @@ -150,9 +150,9 @@ Modified for use with patch -p1, and to apply cleanly to GNU IceCat. + +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] ---- icecat-60.2.0/old-configure.in -+++ icecat-60.2.0/old-configure.in -@@ -3995,6 +3995,27 @@ +--- icecat-60.5.0/old-configure.in ++++ icecat-60.5.0/old-configure.in +@@ -3971,6 +3971,27 @@ AC_SUBST(MOZ_LINUX_32_SSE2_STARTUP_ERROR) dnl ======================================================== @@ -180,8 +180,8 @@ Modified for use with patch -p1, and to apply cleanly to GNU IceCat. dnl Check for pixman and cairo dnl ======================================================== ---- icecat-60.2.0/toolkit/library/moz.build -+++ icecat-60.2.0/toolkit/library/moz.build +--- icecat-60.5.0/toolkit/library/moz.build ++++ icecat-60.5.0/toolkit/library/moz.build @@ -235,6 +235,12 @@ if CONFIG['MOZ_SYSTEM_PNG']: OS_LIBS += CONFIG['MOZ_PNG_LIBS'] @@ -195,8 +195,8 @@ Modified for use with patch -p1, and to apply cleanly to GNU IceCat. if CONFIG['MOZ_SYSTEM_HUNSPELL']: OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS'] ---- icecat-60.2.0/toolkit/moz.configure -+++ icecat-60.2.0/toolkit/moz.configure +--- icecat-60.5.0/toolkit/moz.configure ++++ icecat-60.5.0/toolkit/moz.configure @@ -1051,6 +1051,26 @@ add_old_configure_assignment('FT2_CFLAGS', ft2_info.cflags) diff --git a/gnu/packages/patches/icecat-use-system-media-libs.patch b/gnu/packages/patches/icecat-use-system-media-libs.patch index 648585a6f0..00c95fb82e 100644 --- a/gnu/packages/patches/icecat-use-system-media-libs.patch +++ b/gnu/packages/patches/icecat-use-system-media-libs.patch @@ -8,8 +8,8 @@ Changes to files within the bundled libraries are omitted, since those files are removed from Guix sources. Modified for use with patch -p1, and to apply cleanly to GNU IceCat. ---- icecat-60.2.0/build/moz.configure/old.configure -+++ icecat-60.2.0/build/moz.configure/old.configure +--- icecat-60.5.0/build/moz.configure/old.configure ++++ icecat-60.5.0/build/moz.configure/old.configure @@ -273,7 +273,12 @@ '--with-system-libvpx', '--with-system-nspr', @@ -23,8 +23,8 @@ cleanly to GNU IceCat. '--with-system-zlib', '--with-thumb', '--with-thumb-interwork', ---- icecat-60.2.0/config/external/moz.build -+++ icecat-60.2.0/config/external/moz.build +--- icecat-60.5.0/config/external/moz.build ++++ icecat-60.5.0/config/external/moz.build @@ -23,12 +23,21 @@ external_dirs += ['modules/xz-embedded'] @@ -61,8 +61,8 @@ cleanly to GNU IceCat. 'media/mp4parse-rust', 'media/psshparser' ] ---- icecat-60.2.0/config/system-headers.mozbuild -+++ icecat-60.2.0/config/system-headers.mozbuild +--- icecat-60.5.0/config/system-headers.mozbuild ++++ icecat-60.5.0/config/system-headers.mozbuild @@ -1324,6 +1324,28 @@ 'harfbuzz/hb.h', ] @@ -92,19 +92,19 @@ cleanly to GNU IceCat. if CONFIG['MOZ_SYSTEM_LIBVPX']: system_headers += [ 'vpx_mem/vpx_mem.h', ---- icecat-60.2.0/dom/media/AudioStream.cpp -+++ icecat-60.2.0/dom/media/AudioStream.cpp -@@ -121,7 +121,9 @@ - : mMonitor("AudioStream") - , mChannels(0) - , mOutChannels(0) +--- icecat-60.5.0/dom/media/AudioStream.cpp ++++ icecat-60.5.0/dom/media/AudioStream.cpp +@@ -128,7 +128,9 @@ + : mMonitor("AudioStream"), + mChannels(0), + mOutChannels(0), +#ifndef MOZ_SYSTEM_SOUNDTOUCH - , mTimeStretcher(nullptr) + mTimeStretcher(nullptr), +#endif - , mDumpFile(nullptr) - , mState(INITIALIZED) - , mDataSource(aSource) -@@ -142,9 +144,11 @@ + mDumpFile(nullptr), + mState(INITIALIZED), + mDataSource(aSource), +@@ -147,9 +149,11 @@ if (mDumpFile) { fclose(mDumpFile); } @@ -116,8 +116,8 @@ cleanly to GNU IceCat. #if defined(XP_WIN) if (XRE_IsContentProcess()) { audio::AudioNotificationReceiver::Unregister(this); -@@ -168,7 +172,11 @@ - { +@@ -170,7 +174,11 @@ + nsresult AudioStream::EnsureTimeStretcherInitializedUnlocked() { mMonitor.AssertCurrentThreadOwns(); if (!mTimeStretcher) { +#ifdef MOZ_SYSTEM_SOUNDTOUCH @@ -128,8 +128,8 @@ cleanly to GNU IceCat. mTimeStretcher->setSampleRate(mAudioClock.GetInputRate()); mTimeStretcher->setChannels(mOutChannels); mTimeStretcher->setPitch(1.0); ---- icecat-60.2.0/dom/media/AudioStream.h -+++ icecat-60.2.0/dom/media/AudioStream.h +--- icecat-60.5.0/dom/media/AudioStream.h ++++ icecat-60.5.0/dom/media/AudioStream.h @@ -15,7 +15,11 @@ #include "mozilla/TimeStamp.h" #include "mozilla/UniquePtr.h" @@ -142,7 +142,7 @@ cleanly to GNU IceCat. #if defined(XP_WIN) #include "mozilla/audio/AudioNotificationReceiver.h" -@@ -297,7 +301,11 @@ +@@ -293,7 +297,11 @@ uint32_t mChannels; uint32_t mOutChannels; AudioClock mAudioClock; @@ -154,8 +154,8 @@ cleanly to GNU IceCat. // Output file for dumping audio FILE* mDumpFile; ---- icecat-60.2.0/dom/media/moz.build -+++ icecat-60.2.0/dom/media/moz.build +--- icecat-60.5.0/dom/media/moz.build ++++ icecat-60.5.0/dom/media/moz.build @@ -327,6 +327,21 @@ DEFINES['MOZILLA_INTERNAL_API'] = True @@ -178,8 +178,8 @@ cleanly to GNU IceCat. if CONFIG['MOZ_ANDROID_HLS_SUPPORT']: DEFINES['MOZ_ANDROID_HLS_SUPPORT'] = True ---- icecat-60.2.0/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp -+++ icecat-60.2.0/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp +--- icecat-60.5.0/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp ++++ icecat-60.5.0/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp @@ -15,9 +15,13 @@ #include <windows.h> #endif @@ -194,7 +194,7 @@ cleanly to GNU IceCat. namespace mozilla { -@@ -64,6 +68,12 @@ +@@ -60,6 +64,12 @@ sLinkStatus = LinkStatus_FAILED; @@ -207,17 +207,17 @@ cleanly to GNU IceCat. // We retrieve the path of the lgpllibs library as this is where mozavcodec // and mozavutil libs are located. PathString lgpllibsname = GetLibraryName(nullptr, "lgpllibs"); -@@ -73,6 +83,7 @@ - PathString path = - GetLibraryFilePathname(lgpllibsname.get(), - (PRFuncPtr)&soundtouch::SoundTouch::getVersionId); +@@ -68,6 +78,7 @@ + } + PathString path = GetLibraryFilePathname( + lgpllibsname.get(), (PRFuncPtr)&soundtouch::SoundTouch::getVersionId); +#endif if (path.IsEmpty()) { return false; } ---- icecat-60.2.0/old-configure.in -+++ icecat-60.2.0/old-configure.in -@@ -2451,6 +2451,111 @@ +--- icecat-60.5.0/old-configure.in ++++ icecat-60.5.0/old-configure.in +@@ -2417,6 +2417,111 @@ fi fi # COMPILE_ENVIRONMENT @@ -329,8 +329,8 @@ cleanly to GNU IceCat. dnl system libvpx Support dnl ======================================================== MOZ_ARG_WITH_BOOL(system-libvpx, ---- icecat-60.2.0/toolkit/library/moz.build -+++ icecat-60.2.0/toolkit/library/moz.build +--- icecat-60.5.0/toolkit/library/moz.build ++++ icecat-60.5.0/toolkit/library/moz.build @@ -244,6 +244,21 @@ if CONFIG['MOZ_SYSTEM_HUNSPELL']: OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS'] @@ -353,9 +353,9 @@ cleanly to GNU IceCat. if CONFIG['MOZ_SYSTEM_LIBEVENT']: OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS'] ---- icecat-60.2.0/xpcom/build/XPCOMInit.cpp -+++ icecat-60.2.0/xpcom/build/XPCOMInit.cpp -@@ -138,7 +138,9 @@ +--- icecat-60.5.0/xpcom/build/XPCOMInit.cpp ++++ icecat-60.5.0/xpcom/build/XPCOMInit.cpp +@@ -139,7 +139,9 @@ #include "mozilla/ipc/GeckoChildProcessHost.h" @@ -365,16 +365,15 @@ cleanly to GNU IceCat. #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING) #if defined(HAVE_STDINT_H) // mozilla-config.h defines HAVE_STDINT_H, and then it's defined *again* in -@@ -639,11 +641,13 @@ +@@ -635,10 +637,12 @@ // this oddness. mozilla::SetICUMemoryFunctions(); +#ifndef MOZ_OGG_NO_MEM_REPORTING // Do the same for libogg. - ogg_set_mem_functions(OggReporter::CountingMalloc, - OggReporter::CountingCalloc, - OggReporter::CountingRealloc, - OggReporter::CountingFree); + ogg_set_mem_functions( + OggReporter::CountingMalloc, OggReporter::CountingCalloc, + OggReporter::CountingRealloc, OggReporter::CountingFree); +#endif #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING) diff --git a/gnu/packages/patches/kinit-kdeinit-extra_libs.patch b/gnu/packages/patches/kinit-kdeinit-extra_libs.patch new file mode 100644 index 0000000000..8dcd4d3e95 --- /dev/null +++ b/gnu/packages/patches/kinit-kdeinit-extra_libs.patch @@ -0,0 +1,55 @@ +Search the "extra libs" in GUIX_KF5INIT_LIB_PATH (which basically is a +collection of all /lib directories). We can not hard-code the full path to the +libsKF5Plasam, since adding palse-workspace + +Adopted from NixOS +pkgs/development/libraries/kde-frameworks/kinit/kdeinit-extra_libs.patch + +=================================================================== +--- kinit-5.32.0/src/kdeinit/kinit-5.32.0/src/kdeinit/.orig ++++ kinit-5.32.0/src/kdeinit/kinit.cpp +@@ -96,11 +96,9 @@ + "libKF5Parts.5.dylib", + "libKF5Plasma.5.dylib" + #else +- "libKF5KIOCore.so.5", +- "libKF5Parts.so.5", +-//#ifdef __KDE_HAVE_GCC_VISIBILITY // Removed for KF5, we'll see. +- "libKF5Plasma.so.5" +-//#endif ++ "GUIX_PKGS_KF5_KIO/lib/libKF5KIOCore.so.5", ++ "GUIX_PKGS_KF5_PARTS/lib/libKF5Parts.so.5", ++ "GUIX_PKGS_KF5_PLASMA/lib/libKF5Plasma.so.5" + #endif + }; + #endif +@@ -1533,20 +1531,6 @@ static int initXconnection() + } + #endif + +-#ifndef Q_OS_OSX +-// Find a shared lib in the lib dir, e.g. libkio.so. +-// Completely unrelated to plugins. +-static QString findSharedLib(const QString &lib) +-{ +- QString path = QFile::decodeName(CMAKE_INSTALL_PREFIX "/" LIB_INSTALL_DIR "/") + lib; +- if (QFile::exists(path)) { +- return path; +- } +- // We could also look in LD_LIBRARY_PATH, but really, who installs the main libs in different prefixes? +- return QString(); +-} +-#endif +- + extern "C" { + + static void secondary_child_handler(int) +@@ -1689,7 +1693,7 @@ + if (!d.suicide && qEnvironmentVariableIsEmpty("KDE_IS_PRELINKED")) { + const int extrasCount = sizeof(extra_libs) / sizeof(extra_libs[0]); + for (int i = 0; i < extrasCount; i++) { +- const QString extra = findSharedLib(QString::fromLatin1(extra_libs[i])); ++ const QString extra = QString::fromLatin1(extra_libs[i]); + if (!extra.isEmpty()) { + QLibrary l(extra); + l.setLoadHints(QLibrary::ExportExternalSymbolsHint); diff --git a/gnu/packages/patches/kinit-kdeinit-libpath.patch b/gnu/packages/patches/kinit-kdeinit-libpath.patch new file mode 100644 index 0000000000..6382e8804b --- /dev/null +++ b/gnu/packages/patches/kinit-kdeinit-libpath.patch @@ -0,0 +1,37 @@ +Search libraries in GUIX_KF5INIT_LIB_PATH. + +Based on an idea by NixOs +pkgs/development/libraries/kde-frameworks/kinit/kinit-libpath.patch + +=================================================================== +--- kinit-5.32.0/src/kdeinit/kinit.cpp.orig 2017-10-22 21:02:20.908765455 +0200 ++++ kinit-5.32.0/src/kdeinit/kinit.cpp 2017-10-22 21:03:25.312818248 +0200 +@@ -623,20 +623,18 @@ + if (libpath_relative) { + // NB: Because Qt makes the actual dlopen() call, the + // RUNPATH of kdeinit is *not* respected - see + // https://sourceware.org/bugzilla/show_bug.cgi?id=13945 + // - so we try hacking it in ourselves +- QString install_lib_dir = QFile::decodeName( +- CMAKE_INSTALL_PREFIX "/" LIB_INSTALL_DIR "/"); +- QString orig_libpath = libpath; +- libpath = install_lib_dir + libpath; +- l.setFileName(libpath); +- if (!l.load()) { +- libpath = orig_libpath; +- l.setFileName(libpath); +- l.load(); +- } ++ // Try to load the library relative to the active profiles. ++ QByteArrayList profiles = qgetenv("KDEINIT5_LIBRARY_PATH").split(':'); ++ for (const QByteArray &profile: profiles) { ++ if (!profile.isEmpty()) { ++ l.setFileName(QFile::decodeName(profile) + QStringLiteral("/") + libpath); ++ if (l.load()) break; ++ } ++ } + } else { + l.load(); + } + if (!l.isLoaded()) { + QString ltdlError(l.errorString()); diff --git a/gnu/packages/patches/kio-search-smbd-on-PATH.patch b/gnu/packages/patches/kio-search-smbd-on-PATH.patch new file mode 100644 index 0000000000..47e20cfc0b --- /dev/null +++ b/gnu/packages/patches/kio-search-smbd-on-PATH.patch @@ -0,0 +1,30 @@ +Adopted from NixOS +pkgs/development/libraries/kde-frameworks/kio/samba-search-path.patch + +=================================================================== +--- kio-5.17.0.orig/src/core/ksambashare.cpp ++++ kio-5.17.0/src/core/ksambashare.cpp +@@ -67,13 +67,18 @@ KSambaSharePrivate::~KSambaSharePrivate( + + bool KSambaSharePrivate::isSambaInstalled() + { +- if (QFile::exists(QStringLiteral("/usr/sbin/smbd")) +- || QFile::exists(QStringLiteral("/usr/local/sbin/smbd"))) { +- return true; ++ const QByteArray pathEnv = qgetenv("PATH"); ++ if (!pathEnv.isEmpty()) { ++ QLatin1Char pathSep(':'); ++ QStringList paths = QFile::decodeName(pathEnv).split(pathSep, QString::SkipEmptyParts); ++ for (QStringList::iterator it = paths.begin(); it != paths.end(); ++it) { ++ it->append("/smbd"); ++ if (QFile::exists(*it)) { ++ return true; ++ } ++ } + } + +- //qDebug() << "Samba is not installed!"; +- + return false; + } + diff --git a/gnu/packages/patches/kmscon-runtime-keymap-switch.patch b/gnu/packages/patches/kmscon-runtime-keymap-switch.patch new file mode 100644 index 0000000000..656c76fa40 --- /dev/null +++ b/gnu/packages/patches/kmscon-runtime-keymap-switch.patch @@ -0,0 +1,229 @@ +From 360d44d67e7be46108bec982ff2e79b89f04a9a3 Mon Sep 17 00:00:00 2001 +From: Mathieu Othacehe <m.othacehe@gmail.com> +Date: Thu, 15 Nov 2018 14:34:40 +0900 +Subject: [PATCH] add runtime keymap switch support. + +--- + src/pty.c | 23 ++++++++++- + src/uterm_input.c | 2 + + src/uterm_input_internal.h | 5 +++ + src/uterm_input_uxkb.c | 83 ++++++++++++++++++++++++++++++++++++++ + 4 files changed, 111 insertions(+), 2 deletions(-) + +diff --git a/src/pty.c b/src/pty.c +index 1443f4a..f64cb5b 100644 +--- a/src/pty.c ++++ b/src/pty.c +@@ -46,6 +46,8 @@ + + #define KMSCON_NREAD 16384 + ++#define INPUT_KEYMAP_UPDATE_FILE "/tmp/kmscon-%d-keymap-update" ++ + struct kmscon_pty { + unsigned long ref; + struct ev_eloop *eloop; +@@ -241,9 +243,22 @@ static bool pty_is_open(struct kmscon_pty *pty) + return pty->fd >= 0; + } + ++static int kmscon_keymap_update(pid_t pid) ++{ ++ char *file; ++ int ret; ++ ++ ret = asprintf(&file, INPUT_KEYMAP_UPDATE_FILE, pid); ++ if (ret < 0) ++ return ret; ++ ++ return setenv("KEYMAP_UPDATE", file, 1); ++} ++ + static void __attribute__((noreturn)) + exec_child(const char *term, const char *colorterm, char **argv, +- const char *seat, const char *vtnr, bool env_reset) ++ const char *seat, const char *vtnr, bool env_reset, ++ pid_t kmscon_pid) + { + char **env; + char **def_argv; +@@ -277,6 +292,8 @@ exec_child(const char *term, const char *colorterm, char **argv, + if (vtnr) + setenv("XDG_VTNR", vtnr, 1); + ++ kmscon_keymap_update(kmscon_pid); ++ + execve(argv[0], argv, environ); + + log_err("failed to exec child %s: %m", argv[0]); +@@ -383,12 +400,14 @@ static int pty_spawn(struct kmscon_pty *pty, int master, + unsigned short width, unsigned short height) + { + pid_t pid; ++ pid_t kmscon_pid; + struct winsize ws; + + memset(&ws, 0, sizeof(ws)); + ws.ws_col = width; + ws.ws_row = height; + ++ kmscon_pid = getpid(); + pid = fork(); + switch (pid) { + case -1: +@@ -397,7 +416,7 @@ static int pty_spawn(struct kmscon_pty *pty, int master, + case 0: + setup_child(master, &ws); + exec_child(pty->term, pty->colorterm, pty->argv, pty->seat, +- pty->vtnr, pty->env_reset); ++ pty->vtnr, pty->env_reset, kmscon_pid); + exit(EXIT_FAILURE); + default: + log_debug("forking child %d", pid); +diff --git a/src/uterm_input.c b/src/uterm_input.c +index 6fcbc4b..990a09d 100644 +--- a/src/uterm_input.c ++++ b/src/uterm_input.c +@@ -178,6 +178,8 @@ static void input_new_dev(struct uterm_input *input, + if (ret) + goto err_rcodepoints; + ++ uxkb_dev_keymap_update(dev); ++ + if (input->awake > 0) { + ret = input_wake_up_dev(dev); + if (ret) +diff --git a/src/uterm_input_internal.h b/src/uterm_input_internal.h +index 04e6cc9..ec44459 100644 +--- a/src/uterm_input_internal.h ++++ b/src/uterm_input_internal.h +@@ -39,6 +39,8 @@ + #include "shl_misc.h" + #include "uterm_input.h" + ++#define INPUT_KEYMAP_UPDATE_FILE "/tmp/kmscon-%d-keymap-update" ++ + enum uterm_input_device_capability { + UTERM_DEVICE_HAS_KEYS = (1 << 0), + UTERM_DEVICE_HAS_LEDS = (1 << 1), +@@ -62,6 +64,8 @@ struct uterm_input_dev { + + bool repeating; + struct ev_timer *repeat_timer; ++ struct ev_fd *fd_update; ++ int rupdate_fd; + }; + + struct uterm_input { +@@ -95,6 +99,7 @@ void uxkb_desc_destroy(struct uterm_input *input); + + int uxkb_dev_init(struct uterm_input_dev *dev); + void uxkb_dev_destroy(struct uterm_input_dev *dev); ++int uxkb_dev_keymap_update(struct uterm_input_dev *dev); + int uxkb_dev_process(struct uterm_input_dev *dev, + uint16_t key_state, + uint16_t code); +diff --git a/src/uterm_input_uxkb.c b/src/uterm_input_uxkb.c +index 925c755..4760972 100644 +--- a/src/uterm_input_uxkb.c ++++ b/src/uterm_input_uxkb.c +@@ -31,6 +31,9 @@ + #include <stdlib.h> + #include <string.h> + #include <unistd.h> ++#include <sys/types.h> ++#include <sys/stat.h> ++#include <fcntl.h> + #include <xkbcommon/xkbcommon.h> + #include "shl_hook.h" + #include "shl_llog.h" +@@ -178,6 +181,86 @@ static void timer_event(struct ev_timer *timer, uint64_t num, void *data) + shl_hook_call(dev->input->hook, dev->input, &dev->repeat_event); + } + ++static void uxkb_keymap_update_handler(struct ev_fd *fd, int mask, void *data) ++{ ++ struct uterm_input_dev *dev = data; ++ char in; ++ char keymap[3][255]; ++ int pos = 0; ++ int curr_keymap = 0; ++ int ret; ++ char *model, *layout, *variant; ++ ++ if (!(mask & EV_READABLE)) ++ return; ++ ++ memset(keymap, 0, sizeof(keymap)); ++ ++ model = keymap[0]; ++ layout = keymap[1]; ++ variant = keymap[2]; ++ ++ do { ++ ret = read(dev->rupdate_fd, &in, sizeof(in)); ++ if (ret <= 0) ++ break; ++ ++ keymap[curr_keymap][pos++] = in; ++ ++ if (in == '\0') { ++ curr_keymap++; ++ pos = 0; ++ } ++ } while (1); ++ ++ llog_info(dev->input, "HANDLER CALLED %s|%s|%s\n", ++ model, layout, variant); ++ uxkb_desc_init(dev->input, model, layout, variant, NULL, NULL); ++ ++ dev->state = xkb_state_new(dev->input->keymap); ++ if (!dev->state) { ++ llog_error(dev->input, "cannot create XKB state"); ++ return; ++ } ++} ++ ++int uxkb_dev_keymap_update(struct uterm_input_dev *dev) ++{ ++ int ret; ++ char *file; ++ int pid = getpid(); ++ ++ ret = asprintf(&file, INPUT_KEYMAP_UPDATE_FILE, pid); ++ if (ret < 0) ++ return ret; ++ ++ ret = mkfifo(file, S_IRWXU); ++ if (ret < 0) { ++ llog_warn(dev->input, "could not open fifo"); ++ return -EFAULT; ++ } ++ dev->rupdate_fd = open(file, O_RDONLY | O_NONBLOCK); ++ if (dev->rupdate_fd < 0) { ++ llog_warn(dev->input, "cannot open file %s (%d): %m", ++ file, errno); ++ return -EFAULT; ++ } ++ ++ setenv("KEYMAP_UPDATE", file, 1); ++ ++ ret = ev_eloop_new_fd(dev->input->eloop, &dev->fd_update, ++ dev->rupdate_fd, EV_READABLE, ++ uxkb_keymap_update_handler, dev); ++ if (ret) { ++ llog_error(dev->input, "could not init keymap update"); ++ close(dev->rupdate_fd); ++ dev->rupdate_fd = -1; ++ return ret; ++ } ++ ++ return 0; ++} ++ + int uxkb_dev_init(struct uterm_input_dev *dev) + { + int ret; +-- +2.17.1 + diff --git a/gnu/packages/patches/kodi-skip-test-449.patch b/gnu/packages/patches/kodi-skip-test-449.patch new file mode 100644 index 0000000000..a418239a7c --- /dev/null +++ b/gnu/packages/patches/kodi-skip-test-449.patch @@ -0,0 +1,53 @@ +This test fails regularly between 18.0rc3 and 18.0rc5.2 + +449/520 Test #449: TestWebServer.CanHeadFile................................................***Failed 0.90 sec +Note: Google Test filter = TestWebServer.CanHeadFile +[==========] Running 1 test from 1 test case. +[----------] Global test environment set-up. +[----------] 1 test from TestWebServer +[ RUN ] TestWebServer.CanHeadFile +/tmp/guix-build-kodi-18.0rc5.2.drv-0/kodi-18.0rc5.2-checkout/xbmc/network/test/TestWebServer.cpp:156: Failure + Expected: "4" +To be equal to: httpHeader.GetValue("Content-Length").c_str() + Which is: "0" +[ FAILED ] TestWebServer.CanHeadFile (6 ms) +[----------] 1 test from TestWebServer (6 ms total) + +[----------] Global test environment tear-down +[==========] 1 test from 1 test case ran. (635 ms total) +[ PASSED ] 0 tests. +[ FAILED ] 1 test, listed below: +[ FAILED ] TestWebServer.CanHeadFile + +--- + xbmc/network/test/TestWebServer.cpp | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/xbmc/network/test/TestWebServer.cpp b/xbmc/network/test/TestWebServer.cpp +index a87d9f4..b2240f4 100644 +--- a/xbmc/network/test/TestWebServer.cpp ++++ b/xbmc/network/test/TestWebServer.cpp +@@ -520,13 +520,13 @@ TEST_F(TestWebServer, CanNotHeadNonExistingFile) + ASSERT_FALSE(curl.Exists(CURL(GetUrlOfTestFile("file_does_not_exist")))); + } + +-TEST_F(TestWebServer, CanHeadFile) +-{ +- CCurlFile curl; +- ASSERT_TRUE(curl.Exists(CURL(GetUrlOfTestFile(TEST_FILES_HTML)))); +- +- CheckHtmlTestFileResponse(curl); +-} ++//TEST_F(TestWebServer, CanHeadFile) ++//{ ++// CCurlFile curl; ++// ASSERT_TRUE(curl.Exists(CURL(GetUrlOfTestFile(TEST_FILES_HTML)))); ++// ++// CheckHtmlTestFileResponse(curl); ++//} + + TEST_F(TestWebServer, CanNotGetNonExistingFile) + { +-- +2.20.1 + diff --git a/gnu/packages/patches/kpackage-allow-external-paths.patch b/gnu/packages/patches/kpackage-allow-external-paths.patch new file mode 100644 index 0000000000..c1c9efde7f --- /dev/null +++ b/gnu/packages/patches/kpackage-allow-external-paths.patch @@ -0,0 +1,13 @@ +diff --git a/src/kpackage/package.cpp b/src/kpackage/package.cpp +index 5aec9fd..b15c933 100644 +--- a/src/kpackage/package.cpp ++++ b/src/kpackage/package.cpp +@@ -820,7 +820,7 @@ PackagePrivate::PackagePrivate() + : QSharedData(), + fallbackPackage(nullptr), + metadata(nullptr), +- externalPaths(false), ++ externalPaths(true), + valid(false), + checkedValid(false) + { diff --git a/gnu/packages/patches/libarchive-CVE-2018-1000877.patch b/gnu/packages/patches/libarchive-CVE-2018-1000877.patch new file mode 100644 index 0000000000..5b68884a0f --- /dev/null +++ b/gnu/packages/patches/libarchive-CVE-2018-1000877.patch @@ -0,0 +1,45 @@ +Fix CVE-2018-1000877: + +https://bugs.launchpad.net/ubuntu/+source/libarchive/+bug/1794909 +https://github.com/libarchive/libarchive/pull/1105 +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000877 +https://security-tracker.debian.org/tracker/CVE-2018-1000877 + +Patch copied from upstream source repository: + +https://github.com/libarchive/libarchive/commit/021efa522ad729ff0f5806c4ce53e4a6cc1daa31 + +From 021efa522ad729ff0f5806c4ce53e4a6cc1daa31 Mon Sep 17 00:00:00 2001 +From: Daniel Axtens <dja@axtens.net> +Date: Tue, 20 Nov 2018 17:56:29 +1100 +Subject: [PATCH] Avoid a double-free when a window size of 0 is specified + +new_size can be 0 with a malicious or corrupted RAR archive. + +realloc(area, 0) is equivalent to free(area), so the region would +be free()d here and the free()d again in the cleanup function. + +Found with a setup running AFL, afl-rb, and qsym. +--- + libarchive/archive_read_support_format_rar.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c +index 23452222..6f419c27 100644 +--- a/libarchive/archive_read_support_format_rar.c ++++ b/libarchive/archive_read_support_format_rar.c +@@ -2300,6 +2300,11 @@ parse_codes(struct archive_read *a) + new_size = DICTIONARY_MAX_SIZE; + else + new_size = rar_fls((unsigned int)rar->unp_size) << 1; ++ if (new_size == 0) { ++ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, ++ "Zero window size is invalid."); ++ return (ARCHIVE_FATAL); ++ } + new_window = realloc(rar->lzss.window, new_size); + if (new_window == NULL) { + archive_set_error(&a->archive, ENOMEM, +-- +2.20.1 + diff --git a/gnu/packages/patches/libarchive-CVE-2018-1000878.patch b/gnu/packages/patches/libarchive-CVE-2018-1000878.patch new file mode 100644 index 0000000000..fef0881320 --- /dev/null +++ b/gnu/packages/patches/libarchive-CVE-2018-1000878.patch @@ -0,0 +1,86 @@ +Fix CVE-2018-1000878: + +https://bugs.launchpad.net/ubuntu/+source/libarchive/+bug/1794909 +https://github.com/libarchive/libarchive/pull/1105 +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000878 +https://security-tracker.debian.org/tracker/CVE-2018-1000878 + +Patch copied from upstream source repository: + +https://github.com/libarchive/libarchive/commit/bfcfe6f04ed20db2504db8a254d1f40a1d84eb28 + +From bfcfe6f04ed20db2504db8a254d1f40a1d84eb28 Mon Sep 17 00:00:00 2001 +From: Daniel Axtens <dja@axtens.net> +Date: Tue, 4 Dec 2018 00:55:22 +1100 +Subject: [PATCH] rar: file split across multi-part archives must match + +Fuzzing uncovered some UAF and memory overrun bugs where a file in a +single file archive reported that it was split across multiple +volumes. This was caused by ppmd7 operations calling +rar_br_fillup. This would invoke rar_read_ahead, which would in some +situations invoke archive_read_format_rar_read_header. That would +check the new file name against the old file name, and if they didn't +match up it would free the ppmd7 buffer and allocate a new +one. However, because the ppmd7 decoder wasn't actually done with the +buffer, it would continue to used the freed buffer. Both reads and +writes to the freed region can be observed. + +This is quite tricky to solve: once the buffer has been freed it is +too late, as the ppmd7 decoder functions almost universally assume +success - there's no way for ppmd_read to signal error, nor are there +good ways for functions like Range_Normalise to propagate them. So we +can't detect after the fact that we're in an invalid state - e.g. by +checking rar->cursor, we have to prevent ourselves from ever ending up +there. So, when we are in the dangerous part or rar_read_ahead that +assumes a valid split, we set a flag force read_header to either go +down the path for split files or bail. This means that the ppmd7 +decoder keeps a valid buffer and just runs out of data. + +Found with a combination of AFL, afl-rb and qsym. +--- + libarchive/archive_read_support_format_rar.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c +index 6f419c27..a8cc5c94 100644 +--- a/libarchive/archive_read_support_format_rar.c ++++ b/libarchive/archive_read_support_format_rar.c +@@ -258,6 +258,7 @@ struct rar + struct data_block_offsets *dbo; + unsigned int cursor; + unsigned int nodes; ++ char filename_must_match; + + /* LZSS members */ + struct huffman_code maincode; +@@ -1560,6 +1561,12 @@ read_header(struct archive_read *a, struct archive_entry *entry, + } + return ret; + } ++ else if (rar->filename_must_match) ++ { ++ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, ++ "Mismatch of file parts split across multi-volume archive"); ++ return (ARCHIVE_FATAL); ++ } + + rar->filename_save = (char*)realloc(rar->filename_save, + filename_size + 1); +@@ -2933,12 +2940,14 @@ rar_read_ahead(struct archive_read *a, size_t min, ssize_t *avail) + else if (*avail == 0 && rar->main_flags & MHD_VOLUME && + rar->file_flags & FHD_SPLIT_AFTER) + { ++ rar->filename_must_match = 1; + ret = archive_read_format_rar_read_header(a, a->entry); + if (ret == (ARCHIVE_EOF)) + { + rar->has_endarc_header = 1; + ret = archive_read_format_rar_read_header(a, a->entry); + } ++ rar->filename_must_match = 0; + if (ret != (ARCHIVE_OK)) + return NULL; + return rar_read_ahead(a, min, avail); +-- +2.20.1 + diff --git a/gnu/packages/patches/libarchive-CVE-2018-1000880.patch b/gnu/packages/patches/libarchive-CVE-2018-1000880.patch new file mode 100644 index 0000000000..6834cabda0 --- /dev/null +++ b/gnu/packages/patches/libarchive-CVE-2018-1000880.patch @@ -0,0 +1,51 @@ +Fix CVE-2018-1000880: + +https://bugs.launchpad.net/ubuntu/+source/libarchive/+bug/1794909 +https://github.com/libarchive/libarchive/pull/1105 +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000880 +https://security-tracker.debian.org/tracker/CVE-2018-1000880 + +Patch copied from upstream source repository: + +https://github.com/libarchive/libarchive/commit/9c84b7426660c09c18cc349f6d70b5f8168b5680 + +From 9c84b7426660c09c18cc349f6d70b5f8168b5680 Mon Sep 17 00:00:00 2001 +From: Daniel Axtens <dja@axtens.net> +Date: Tue, 4 Dec 2018 16:33:42 +1100 +Subject: [PATCH] warc: consume data once read + +The warc decoder only used read ahead, it wouldn't actually consume +data that had previously been printed. This means that if you specify +an invalid content length, it will just reprint the same data over +and over and over again until it hits the desired length. + +This means that a WARC resource with e.g. +Content-Length: 666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666665 +but only a few hundred bytes of data, causes a quasi-infinite loop. + +Consume data in subsequent calls to _warc_read. + +Found with an AFL + afl-rb + qsym setup. +--- + libarchive/archive_read_support_format_warc.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libarchive/archive_read_support_format_warc.c b/libarchive/archive_read_support_format_warc.c +index e8753853..e8fc8428 100644 +--- a/libarchive/archive_read_support_format_warc.c ++++ b/libarchive/archive_read_support_format_warc.c +@@ -386,6 +386,11 @@ _warc_read(struct archive_read *a, const void **buf, size_t *bsz, int64_t *off) + return (ARCHIVE_EOF); + } + ++ if (w->unconsumed) { ++ __archive_read_consume(a, w->unconsumed); ++ w->unconsumed = 0U; ++ } ++ + rab = __archive_read_ahead(a, 1U, &nrd); + if (nrd < 0) { + *bsz = 0U; +-- +2.20.1 + diff --git a/gnu/packages/patches/libextractor-CVE-2018-20430.patch b/gnu/packages/patches/libextractor-CVE-2018-20430.patch new file mode 100644 index 0000000000..570cd7c006 --- /dev/null +++ b/gnu/packages/patches/libextractor-CVE-2018-20430.patch @@ -0,0 +1,60 @@ +Fix CVE-2018-20430: + +https://gnunet.org/bugs/view.php?id=5493 +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20430 +https://security-tracker.debian.org/tracker/CVE-2018-20430 + +Patch copied from upstream source repository: + +https://gnunet.org/git/libextractor.git/commit/?id=b405d707b36e0654900cba78e89f49779efea110 + +From b405d707b36e0654900cba78e89f49779efea110 Mon Sep 17 00:00:00 2001 +From: Christian Grothoff <christian@grothoff.org> +Date: Thu, 20 Dec 2018 22:47:53 +0100 +Subject: [PATCH] fix #5493 (out of bounds read) + +--- + src/common/convert.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/common/convert.c b/src/common/convert.c +index c0edf21..2be2108 100644 +--- a/src/common/convert.c ++++ b/src/common/convert.c +@@ -36,8 +36,8 @@ + * string is returned. + */ + char * +-EXTRACTOR_common_convert_to_utf8 (const char *input, +- size_t len, ++EXTRACTOR_common_convert_to_utf8 (const char *input, ++ size_t len, + const char *charset) + { + #if HAVE_ICONV +@@ -52,7 +52,7 @@ EXTRACTOR_common_convert_to_utf8 (const char *input, + i = input; + cd = iconv_open ("UTF-8", charset); + if (cd == (iconv_t) - 1) +- return strdup (i); ++ return strndup (i, len); + if (len > 1024 * 1024) + { + iconv_close (cd); +@@ -67,11 +67,11 @@ EXTRACTOR_common_convert_to_utf8 (const char *input, + } + itmp = tmp; + finSize = tmpSize; +- if (iconv (cd, (char **) &input, &len, &itmp, &finSize) == SIZE_MAX) ++ if (iconv (cd, (char **) &input, &len, &itmp, &finSize) == ((size_t) -1)) + { + iconv_close (cd); + free (tmp); +- return strdup (i); ++ return strndup (i, len); + } + ret = malloc (tmpSize - finSize + 1); + if (ret == NULL) +-- +2.20.1 + diff --git a/gnu/packages/patches/libextractor-CVE-2018-20431.patch b/gnu/packages/patches/libextractor-CVE-2018-20431.patch new file mode 100644 index 0000000000..855c5ba64b --- /dev/null +++ b/gnu/packages/patches/libextractor-CVE-2018-20431.patch @@ -0,0 +1,53 @@ +Fix CVE-2018-20431: + +https://gnunet.org/bugs/view.php?id=5494 +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20431 +https://security-tracker.debian.org/tracker/CVE-2018-20431 + +Patch copied from upstream source repository: + +https://gnunet.org/git/libextractor.git/commit/?id=489c4a540bb2c4744471441425b8932b97a153e7 + +To apply the patch to libextractor 1.8 release tarball, +hunk #1 which patches ChangeLog is removed. + +From 489c4a540bb2c4744471441425b8932b97a153e7 Mon Sep 17 00:00:00 2001 +From: Christian Grothoff <christian@grothoff.org> +Date: Thu, 20 Dec 2018 23:02:28 +0100 +Subject: [PATCH] fix #5494 + +--- + ChangeLog | 3 ++- + src/plugins/ole2_extractor.c | 9 +++++++-- + 2 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/src/plugins/ole2_extractor.c b/src/plugins/ole2_extractor.c +index 53fa1b9..a48b726 100644 +--- a/src/plugins/ole2_extractor.c ++++ b/src/plugins/ole2_extractor.c +@@ -173,7 +173,7 @@ struct ProcContext + EXTRACTOR_MetaDataProcessor proc; + + /** +- * Closure for 'proc'. ++ * Closure for @e proc. + */ + void *proc_cls; + +@@ -213,7 +213,12 @@ process_metadata (gpointer key, + + if (G_VALUE_TYPE(gval) == G_TYPE_STRING) + { +- contents = strdup (g_value_get_string (gval)); ++ const char *gvals; ++ ++ gvals = g_value_get_string (gval); ++ if (NULL == gvals) ++ return; ++ contents = strdup (gvals); + } + else + { +-- +2.20.1 + diff --git a/gnu/packages/patches/libssh-hostname-parser-bug.patch b/gnu/packages/patches/libssh-hostname-parser-bug.patch deleted file mode 100644 index de2336e86d..0000000000 --- a/gnu/packages/patches/libssh-hostname-parser-bug.patch +++ /dev/null @@ -1,17 +0,0 @@ -It does not handle the case for the unsupported opcode (-1) -which would cause a segfault when accessing the "seen" array. - -diff --git a/src/config.c b/src/config.c -index c5313ec8..72e07639 100644 ---- a/src/config.c -+++ b/src/config.c -@@ -218,7 +218,8 @@ static int ssh_config_parse_line(ssh_session session, const char *line, - } - - opcode = ssh_config_get_opcode(keyword); -- if (*parsing == 1 && opcode != SOC_HOST) { -+ if (*parsing == 1 && opcode != SOC_HOST && -+ opcode > SOC_UNSUPPORTED && opcode < SOC_END) { - if (seen[opcode] != 0) { - return 0; - } diff --git a/gnu/packages/patches/linkchecker-mark-more-tests-that-require-the-network.patch b/gnu/packages/patches/linkchecker-mark-more-tests-that-require-the-network.patch new file mode 100644 index 0000000000..f3e488cec2 --- /dev/null +++ b/gnu/packages/patches/linkchecker-mark-more-tests-that-require-the-network.patch @@ -0,0 +1,182 @@ +From f24c88a0732024028fffe0372039a847e91722ea Mon Sep 17 00:00:00 2001 +From: Christopher Baines <mail@cbaines.net> +Date: Tue, 1 Jan 2019 22:36:29 +0000 +Subject: [PATCH] Mark more tests that require the network + +I believe all these tests require the network, at least they seem to +fail if it's I run them without connecting my computer to the web. + +I'm looking at this as part of packaging linkchecker for GNU Guix, +where the package is build and the tests are run in a isolated +environment, intentionally without network access, to avoid issues +with non-reproducible package builds. +--- + tests/checker/test_http.py | 2 ++ + tests/checker/test_http_misc.py | 2 ++ + tests/checker/test_http_redirect.py | 2 ++ + tests/checker/test_httpbin.py | 5 +++++ + tests/checker/test_misc.py | 4 ++++ + tests/checker/test_whitespace.py | 3 +++ + 6 files changed, 18 insertions(+) + +diff --git a/tests/checker/test_http.py b/tests/checker/test_http.py +index e4c1e097..8a8af567 100644 +--- a/tests/checker/test_http.py ++++ b/tests/checker/test_http.py +@@ -20,6 +20,7 @@ + + import pytest + ++from tests import need_network + from .httpserver import HttpServerTest, CookieRedirectHttpRequestHandler + + class TestHttp (HttpServerTest): +@@ -29,6 +30,7 @@ def __init__(self, methodName='runTest'): + super(TestHttp, self).__init__(methodName=methodName) + self.handler = CookieRedirectHttpRequestHandler + ++ @need_network + def test_html (self): + confargs = dict(recursionlevel=1) + self.file_test("http.html", confargs=confargs) +diff --git a/tests/checker/test_http_misc.py b/tests/checker/test_http_misc.py +index 9922d85f..c6b6afdb 100644 +--- a/tests/checker/test_http_misc.py ++++ b/tests/checker/test_http_misc.py +@@ -20,11 +20,13 @@ + import os + import sys + from .httpserver import HttpServerTest ++from tests import need_network + from linkcheck.network import iputil + + class TestHttpMisc (HttpServerTest): + """Test http:// misc link checking.""" + ++ @need_network + def test_html (self): + self.swf_test() + self.obfuscate_test() +diff --git a/tests/checker/test_http_redirect.py b/tests/checker/test_http_redirect.py +index f212d98e..2253a70d 100644 +--- a/tests/checker/test_http_redirect.py ++++ b/tests/checker/test_http_redirect.py +@@ -17,6 +17,7 @@ + """ + Test http checking. + """ ++from tests import need_network + from .httpserver import HttpServerTest, CookieRedirectHttpRequestHandler + + class TestHttpRedirect (HttpServerTest): +@@ -26,6 +27,7 @@ def __init__(self, methodName='runTest'): + super(TestHttpRedirect, self).__init__(methodName=methodName) + self.handler = CookieRedirectHttpRequestHandler + ++ @need_network + def test_redirect (self): + self.redirect1() + self.redirect2() +diff --git a/tests/checker/test_httpbin.py b/tests/checker/test_httpbin.py +index 0319c2f6..4c8fa846 100644 +--- a/tests/checker/test_httpbin.py ++++ b/tests/checker/test_httpbin.py +@@ -18,6 +18,7 @@ + Test http stuff with httpbin.org. + """ + import re ++from tests import need_network + from . import LinkCheckTest + + +@@ -30,6 +31,7 @@ def get_httpbin_url(path): + class TestHttpbin(LinkCheckTest): + """Test http:// link redirection checking.""" + ++ @need_network + def test_http_link(self): + linkurl = u"http://www.example.com" + nlinkurl = self.norm(linkurl) +@@ -48,6 +50,7 @@ def test_http_link(self): + ] + self.direct(url, resultlines, recursionlevel=1) + ++ @need_network + def test_basic_auth(self): + user = u"testuser" + password = u"testpassword" +@@ -67,6 +70,7 @@ def test_basic_auth(self): + ] + self.direct(url, resultlines, confargs=confargs) + ++ @need_network + def test_http_refresh_header(self): + linkurl = u"http://www.example.com" + nlinkurl = self.norm(linkurl) +@@ -85,6 +89,7 @@ def test_http_refresh_header(self): + ] + self.direct(url, resultlines, recursionlevel=1) + ++ @need_network + def test_http_content_location_header(self): + linkurl = u"http://www.example.com" + nlinkurl = self.norm(linkurl) +diff --git a/tests/checker/test_misc.py b/tests/checker/test_misc.py +index 2e4cfd07..f9591f9d 100644 +--- a/tests/checker/test_misc.py ++++ b/tests/checker/test_misc.py +@@ -17,6 +17,7 @@ + """ + Test miscellaneous html tag parsing and URL types + """ ++from tests import need_network + from . import LinkCheckTest + + +@@ -25,15 +26,18 @@ class TestMisc (LinkCheckTest): + Test misc link types. + """ + ++ @need_network + def test_misc (self): + self.file_test("misc.html") + + def test_html5 (self): + self.file_test("html5.html") + ++ @need_network + def test_archive (self): + self.file_test("archive.html") + ++ @need_network + def test_itms_services(self): + url = u"itms-services:?action=download-manifest&url=http://www.example.com/" + resultlines = [ +diff --git a/tests/checker/test_whitespace.py b/tests/checker/test_whitespace.py +index 609c108a..fc2727d6 100644 +--- a/tests/checker/test_whitespace.py ++++ b/tests/checker/test_whitespace.py +@@ -17,6 +17,7 @@ + """ + Test whitespace handling. + """ ++from tests import need_network + from . import LinkCheckTest + + +@@ -25,6 +26,7 @@ class TestWhitespace (LinkCheckTest): + Test whitespace in URLs. + """ + ++ @need_network + def test_leading_whitespace (self): + # Leading whitespace + url = u" http://www.example.org/" +@@ -50,6 +52,7 @@ def test_leading_whitespace (self): + ] + self.direct(url, resultlines) + ++ @need_network + def test_trailing_whitespace (self): + # Trailing whitespace + url = u"http://www.example.org/ " diff --git a/gnu/packages/patches/mcron-install.patch b/gnu/packages/patches/mcron-install.patch deleted file mode 100644 index 3cd291f576..0000000000 --- a/gnu/packages/patches/mcron-install.patch +++ /dev/null @@ -1,22 +0,0 @@ -This patch allows us to install the Vixie-compatible binaries as -non-root without creating /var/run, etc. - ---- mcron-1.0.6/makefile.in 2010-06-19 20:44:17.000000000 +0200 -+++ mcron-1.0.6/makefile.in 2010-07-04 16:16:25.000000000 +0200 -@@ -1004,15 +1004,11 @@ mcron.c : main.scm crontab.scm makefile. - @rm -f mcron.escaped.scm > /dev/null 2>&1 - - install-exec-hook: -- @if [ "x@NO_VIXIE_CLOBBER@" != "xyes" -a "`id -u`" -eq "0" ]; then \ -+ @if [ "x@NO_VIXIE_CLOBBER@" != "xyes" ]; then \ - rm -f $(fpp)cron$(EXEEXT) > /dev/null 2>&1; \ - $(INSTALL) --mode='u=rwx' mcron$(EXEEXT) $(fpp)cron$(EXEEXT); \ - rm -f $(fpp)crontab$(EXEEXT) > /dev/null 2>&1; \ - $(INSTALL) --mode='u=rwxs,og=rx' mcron$(EXEEXT) $(fpp)crontab$(EXEEXT); \ -- $(INSTALL) -d --mode='u=rwx' $(DESTDIR)/var/cron; \ -- $(INSTALL) -d --mode='u=rwx,og=rx' $(DESTDIR)/var/run; \ -- $(INSTALL) -d --mode='u=rwx,og=rx' $(DESTDIR)@GUILE_SITE@; \ -- $(INSTALL) -d --mode='u=rwx,og=rx' $(DESTDIR)@GUILE_SITE@/mcron; \ - elif [ "x@NO_VIXIE_CLOBBER@" = "xyes" ]; then \ - echo "Not installing Vixie-style programs"; \ - else \ diff --git a/gnu/packages/patches/meandmyshadow-define-paths-earlier.patch b/gnu/packages/patches/meandmyshadow-define-paths-earlier.patch deleted file mode 100644 index 505cbd23fe..0000000000 --- a/gnu/packages/patches/meandmyshadow-define-paths-earlier.patch +++ /dev/null @@ -1,50 +0,0 @@ -From: Tobias Geerinckx-Rice <me@tobias.gr> -Date: Wed, 31 Oct 2018 02:24:26 +0100 -Subject: [PATCH] gnu: meandmyshadow: Define paths earlier. - -The following patch was taken verbatim from the upstream repository[0] -and will be included in the next release. - -[0]: https://github.com/acmepjz/meandmyshadow/pull/29 ---- -From 4847e6b5755258a1e0534f2d4b91dce2ce3b459e Mon Sep 17 00:00:00 2001 -From: Dmitry Marakasov <amdmi3@amdmi3.ru> -Date: Wed, 24 Oct 2018 23:31:19 +0300 -Subject: [PATCH] Define paths earlier in CMakeLists.txt - -At the very least, paths should be defined before Configure_File(), otherwise empty DATAROOTDIR is substituted in config.h ---- - CMakeLists.txt | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e79639a..6321d9d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -2,6 +2,13 @@ Project (meandmyshadow) - CMake_Minimum_Required (VERSION 3.1) - Set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") - -+#Path options -+Set (BINDIR "bin" CACHE STRING "Where to install binaries") -+Set (DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "Sets the root of data directories to a non-default location") -+Set (ICONDIR "${DATAROOTDIR}/icons" CACHE STRING "Sets the icon directory for desktop entry to a non-default location.") -+Set (DESKTOPDIR "${DATAROOTDIR}/applications" CACHE STRING "Sets the desktop file directory for desktop entry to a non-default location.") -+ -+#Options - Option (DEBUG_MODE "Compile the game with debug mode enabled" OFF) - Option (DISABLED_DEBUG_STUFF "Enable this you'll see a lot of annoying script debug messages which will lag the game." OFF) - -@@ -164,12 +171,6 @@ Target_Link_Libraries ( - ${LUA_LIBRARIES} - ) - --#Path options --Set (BINDIR "bin" CACHE STRING "Where to install binaries") --Set (DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "Sets the root of data directories to a non-default location") --Set (ICONDIR "${DATAROOTDIR}/icons" CACHE STRING "Sets the icon directory for desktop entry to a non-default location.") --Set (DESKTOPDIR "${DATAROOTDIR}/applications" CACHE STRING "Sets the desktop file directory for desktop entry to a non-default location.") -- - #Install locations - Install (DIRECTORY ${PROJECT_SOURCE_DIR}/data DESTINATION ${DATAROOTDIR}/meandmyshadow/) - Install (FILES AUTHORS DESTINATION ${DATAROOTDIR}/meandmyshadow/) diff --git a/gnu/packages/patches/net-tools-bitrot.patch b/gnu/packages/patches/net-tools-bitrot.patch deleted file mode 100644 index 89ab6f19eb..0000000000 --- a/gnu/packages/patches/net-tools-bitrot.patch +++ /dev/null @@ -1,108 +0,0 @@ -Starting with libc 2.20, this file would fail to build with "NULL undeclared". -Include the fine header to solve that. - ---- net-tools-1.60/lib/ec_hw.c 1999-11-20 22:02:53.000000000 +0100 -+++ net-tools-1.60/lib/ec_hw.c 2014-10-06 22:48:43.811027768 +0200 -@@ -16,6 +16,7 @@ - - #if HAVE_HWEC - -+#include <stddef.h> - #include <net/if_arp.h> - #include "net-support.h" - - -Avoid "label at end of compound statement" errors. - ---- net-tools-1.60/lib/inet_sr.c 2000-02-20 22:46:45.000000000 +0100 -+++ net-tools-1.60/lib/inet_sr.c 2014-10-06 22:51:22.575023126 +0200 -@@ -104,7 +104,6 @@ static int INET_setroute(int action, int - isnet = 1; break; - case 2: - isnet = 0; break; -- default: - } - - /* Fill in the other fields. */ - ---- net-tools-1.60/hostname.c 2001-04-08 19:04:23.000000000 +0200 -+++ net-tools-1.60/hostname.c 2014-10-06 23:01:04.235006119 +0200 -@@ -77,7 +77,6 @@ static void setnname(char *nname) - case EINVAL: - fprintf(stderr, _("%s: name too long\n"), program_name); - break; -- default: - } - exit(1); - } -@@ -97,7 +96,6 @@ static void sethname(char *hname) - case EINVAL: - fprintf(stderr, _("%s: name too long\n"), program_name); - break; -- default: - } - exit(1); - }; -@@ -116,7 +114,6 @@ static void setdname(char *dname) - case EINVAL: - fprintf(stderr, _("%s: name too long\n"), program_name); - break; -- default: - } - exit(1); - }; -@@ -173,7 +170,6 @@ static void showhname(char *hname, int c - *p = '\0'; - printf("%s\n", hp->h_name); - break; -- default: - } - } - - -Work around the assumption that an 'x25_address' typedef exists. - ---- net-tools-1.60/lib/x25_sr.c 2000-05-20 15:38:10.000000000 +0200 -+++ net-tools-1.60/lib/x25_sr.c 2014-10-06 22:59:35.787008705 +0200 -@@ -77,7 +77,7 @@ static int X25_setroute(int action, int - rt.sigdigits=sigdigits; - - /* x25_route_struct.address isn't type struct sockaddr_x25, Why? */ -- memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address)); -+ memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address)); - - while (*args) { - if (!strcmp(*args,"device") || !strcmp(*args,"dev")) { - - -Fix the multi-line string literal syntax. - ---- net-tools-1.60/mii-tool.c 2000-05-21 16:31:17.000000000 +0200 -+++ net-tools-1.60/mii-tool.c 2014-10-06 23:07:42.002994489 +0200 -@@ -379,16 +379,16 @@ static void watch_one_xcvr(int skfd, cha - /*--------------------------------------------------------------------*/ - - const char *usage = --"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...] -- -V, --version display version information -- -v, --verbose more verbose output -- -R, --reset reset MII to poweron state -- -r, --restart restart autonegotiation -- -w, --watch monitor for link status changes -- -l, --log with -w, write events to syslog -- -A, --advertise=media,... advertise only specified media -- -F, --force=media force specified media technology --media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, -+"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n\ -+ -V, --version display version information\n\ -+ -v, --verbose more verbose output\n\ -+ -R, --reset reset MII to poweron state\n\ -+ -r, --restart restart autonegotiation\n\ -+ -w, --watch monitor for link status changes\n\ -+ -l, --log with -w, write events to syslog\n\ -+ -A, --advertise=media,... advertise only specified media\n\ -+ -F, --force=media force specified media technology\n\ -+media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n\ - (to advertise both HD and FD) 100baseTx, 10baseT\n"; - - int main(int argc, char **argv) diff --git a/gnu/packages/patches/nyx-show-header-stats-with-python3.patch b/gnu/packages/patches/nyx-show-header-stats-with-python3.patch deleted file mode 100644 index 5b20f180f7..0000000000 --- a/gnu/packages/patches/nyx-show-header-stats-with-python3.patch +++ /dev/null @@ -1,70 +0,0 @@ -From: Tobias Geerinckx-Rice <me@tobias.gr> -Date: Fri, 22 Jun 2018 02:56:39 +0200 -Subject: nyx: Show header stats. - -The following patch was taken verbatim from the upstream repository and -will be included in the next release. ---- -commit 3494111cc81ad4985e81d0c1ea5e451d8f7a2bcc -Author: Damian Johnson <atagar@torproject.org> -Date: Mon Feb 5 20:07:40 2018 -0800 - - Header stats missing with python3 - - Ick! took me a while to find this. Python3 changed division from providing ints - to floats. This in turn caused our header panel to call addstr with float x/y - coordinates, which made that funciton fail silently. End result is that when - the header panel showed two columns of stats the right column was missing. - - Caught thanks to Stijn. - -diff --git a/nyx/panel/header.py b/nyx/panel/header.py -index 09e3838..fb6f2f7 100644 ---- a/nyx/panel/header.py -+++ b/nyx/panel/header.py -@@ -155,7 +155,7 @@ class HeaderPanel(nyx.panel.DaemonPanel): - # space available for content - - interface = nyx_interface() -- left_width = max(subwindow.width / 2, 77) if is_wide else subwindow.width -+ left_width = max(subwindow.width // 2, 77) if is_wide else subwindow.width - right_width = subwindow.width - left_width - - _draw_platform_section(subwindow, 0, 0, left_width, vals) -diff --git a/web/changelog/index.html b/web/changelog/index.html -index 333fa84..196d82b 100644 ---- a/web/changelog/index.html -+++ b/web/changelog/index.html -@@ -74,6 +74,12 @@ - </ul> - </li> - -+ <li><span class="component">Header</span> -+ <ul> -+ <li>Right column of stats missing when using python 3.x</li> -+ </ul> -+ </li> -+ - <li><span class="component">Connections</span> - <ul> - <li>Geoip information unavailable for inbound connections</li> -diff --git a/web/changelog/legacy.html b/web/changelog/legacy.html -index a380806..02d405f 100644 ---- a/web/changelog/legacy.html -+++ b/web/changelog/legacy.html -@@ -137,13 +137,13 @@ - </ul> - </li> - -- <li><span class="component">Startup</span> -+ <li><span class="component">Graph</span> - <ul> - <li>Crash when pausing if we showed accounting stats</li> - </ul> - </li> - -- <li><span class="component">Startup</span> -+ <li><span class="component">Logging</span> - <ul> - <li>Skip reading from malformed tor log files</li> - <li>Unable to log GUARD events</li> diff --git a/gnu/packages/patches/ocaml-findlib-make-install.patch b/gnu/packages/patches/ocaml-findlib-make-install.patch deleted file mode 100644 index 238f9ca3ce..0000000000 --- a/gnu/packages/patches/ocaml-findlib-make-install.patch +++ /dev/null @@ -1,20 +0,0 @@ -Ocaml wants to install its "core" libraries in OCAML_CORE_STDLIB. That -does not work in a store-based distribution. - -A solution was already provided by Nix - - https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/ocaml/findlib/install_topfind.patch - -regenerated for Guix. - ---- findlib-1.5.3/src/findlib/Makefile 2014-09-16 13:21:46.000000000 +0200 -+++ findlib-1.5.3/src/findlib/Makefile.new 2014-10-01 14:30:54.141082521 +0200 -@@ -89,7 +89,7 @@ - install: all - mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)" - mkdir -p "$(prefix)$(OCAMLFIND_BIN)" -- test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_CORE_STDLIB)" -+ test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_SITELIB)" - files=`$(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib.cmxa findlib.a findlib.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload.a findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \ - cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)" - f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \ diff --git a/gnu/packages/patches/ocaml-graph-honor-source-date-epoch.patch b/gnu/packages/patches/ocaml-graph-honor-source-date-epoch.patch deleted file mode 100644 index 9f8713e3d3..0000000000 --- a/gnu/packages/patches/ocaml-graph-honor-source-date-epoch.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 354ef78aac0b887fae3c10b28eb2b0d83f66bdfe Mon Sep 17 00:00:00 2001 -From: Julien Lepiller <julien@lepiller.eu> -Date: Mon, 2 Jan 2017 17:05:24 +0100 -Subject: [PATCH] Honor SOURCE_DATE_EPOCH - ---- - Makefile.in | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/Makefile.in b/Makefile.in -index a32b4b8..ef4c174 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -113,11 +113,16 @@ graph.cmx: $(CMI) $(CMX) - $(OCAMLOPT) $(INCLUDES) -pack -o $@ $^ - - VERSION=1.8.7 -+ifdef SOURCE_DATE_EPOCH -+BUILD_DATE=$(shell date -u -d "@$(SOURCE_DATE_EPOCH)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" 2>/dev/null || date) -+else -+BUILD_DATE=$(shell date) -+endif - - src/version.ml: Makefile - rm -f $@ - echo "let version = \""$(VERSION)"\"" > $@ -- echo "let date = \""`date`"\"" >> $@ -+ echo "let date = \""$(BUILD_DATE)"\"" >> $@ - - # gtk2 graph editor - ################### --- -2.11.0 - diff --git a/gnu/packages/patches/opencv-rgbd-aarch64-test-fix.patch b/gnu/packages/patches/opencv-rgbd-aarch64-test-fix.patch new file mode 100644 index 0000000000..7792f8d1bf --- /dev/null +++ b/gnu/packages/patches/opencv-rgbd-aarch64-test-fix.patch @@ -0,0 +1,40 @@ +https://github.com/opencv/opencv_contrib/commit/8aaa91c3dc835690477d7777e66948dbf5a87edc.patch + +From 8aaa91c3dc835690477d7777e66948dbf5a87edc Mon Sep 17 00:00:00 2001 +From: Tomoaki Teshima <tomoaki.teshima@gmail.com> +Date: Mon, 5 Nov 2018 20:32:23 +0900 +Subject: [PATCH] avoid test failing on Aarch64 * loosen the threshold in + Rgbd_Normals.compute * make the minimum tvec larger in + RGBD_Odometry_Rgbd.algorithmic + +--- + modules/rgbd/test/test_normal.cpp | 2 +- + modules/rgbd/test/test_odometry.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules/rgbd/test/test_normal.cpp b/modules/rgbd/test/test_normal.cpp +index f2233553a7..ed54f2cd98 100644 +--- a/modules/rgbd/test/test_normal.cpp ++++ b/modules/rgbd/test/test_normal.cpp +@@ -211,7 +211,7 @@ class CV_RgbdNormalsTest: public cvtest::BaseTest + std::cout << std::endl << "*** FALS" << std::endl; + errors[0][0] = 0.006f; + errors[0][1] = 0.03f; +- errors[1][0] = 0.00008f; ++ errors[1][0] = 0.0001f; + errors[1][1] = 0.02f; + break; + case 1: +diff --git a/modules/rgbd/test/test_odometry.cpp b/modules/rgbd/test/test_odometry.cpp +index 62b654a1ec..f5a2084504 100644 +--- a/modules/rgbd/test/test_odometry.cpp ++++ b/modules/rgbd/test/test_odometry.cpp +@@ -213,7 +213,7 @@ void CV_OdometryTest::generateRandomTransformation(Mat& rvec, Mat& tvec) + normalize(rvec, rvec, rng.uniform(0.007f, maxRotation)); + + randu(tvec, Scalar(-1000), Scalar(1000)); +- normalize(tvec, tvec, rng.uniform(0.007f, maxTranslation)); ++ normalize(tvec, tvec, rng.uniform(0.008f, maxTranslation)); + } + + void CV_OdometryTest::run(int) diff --git a/gnu/packages/patches/openldap-CVE-2017-9287.patch b/gnu/packages/patches/openldap-CVE-2017-9287.patch deleted file mode 100644 index 5ca2a60c60..0000000000 --- a/gnu/packages/patches/openldap-CVE-2017-9287.patch +++ /dev/null @@ -1,37 +0,0 @@ -Fix CVE-2017-9287: - -https://www.openldap.org/its/?findid=8655 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9287 - -Patch copied from upstream source repository: - -https://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=commit;h=0cee1ffb6021b1aae3fcc9581699da1c85a6dd6e - -From 0cee1ffb6021b1aae3fcc9581699da1c85a6dd6e Mon Sep 17 00:00:00 2001 -From: Ryan Tandy <ryan@nardis.ca> -Date: Wed, 17 May 2017 20:07:39 -0700 -Subject: [PATCH] ITS#8655 fix double free on paged search with pagesize 0 - -Fixes a double free when a search includes the Paged Results control -with a page size of 0 and the search base matches the filter. ---- - servers/slapd/back-mdb/search.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/servers/slapd/back-mdb/search.c b/servers/slapd/back-mdb/search.c -index 301d1a498c..43442aa242 100644 ---- a/servers/slapd/back-mdb/search.c -+++ b/servers/slapd/back-mdb/search.c -@@ -1066,7 +1066,8 @@ notfound: - /* check size limit */ - if ( get_pagedresults(op) > SLAP_CONTROL_IGNORED ) { - if ( rs->sr_nentries >= ((PagedResultsState *)op->o_pagedresults_state)->ps_size ) { -- mdb_entry_return( op, e ); -+ if (e != base) -+ mdb_entry_return( op, e ); - e = NULL; - send_paged_response( op, rs, &lastid, tentries ); - goto done; --- -2.13.0 - diff --git a/gnu/packages/patches/openssh-CVE-2018-20685.patch b/gnu/packages/patches/openssh-CVE-2018-20685.patch new file mode 100644 index 0000000000..463c08a9d4 --- /dev/null +++ b/gnu/packages/patches/openssh-CVE-2018-20685.patch @@ -0,0 +1,44 @@ +Fix CVE-2018-20685: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20685 + +Patch copied from upstream source repository: + +https://github.com/openssh/openssh-portable/commit/6010c0303a422a9c5fa8860c061bf7105eb7f8b2 + +From 6010c0303a422a9c5fa8860c061bf7105eb7f8b2 Mon Sep 17 00:00:00 2001 +From: "djm@openbsd.org" <djm@openbsd.org> +Date: Fri, 16 Nov 2018 03:03:10 +0000 +Subject: [PATCH] upstream: disallow empty incoming filename or ones that refer + to the + +current directory; based on report/patch from Harry Sintonen + +OpenBSD-Commit-ID: f27651b30eaee2df49540ab68d030865c04f6de9 +--- + scp.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/scp.c b/scp.c +index 60682c68..4f3fdcd3 100644 +--- a/scp.c ++++ b/scp.c +#@@ -1,4 +1,4 @@ +#-/* $OpenBSD: scp.c,v 1.197 2018/06/01 04:31:48 dtucker Exp $ */ +#+/* $OpenBSD: scp.c,v 1.198 2018/11/16 03:03:10 djm Exp $ */ +# /* +# * scp - secure remote copy. This is basically patched BSD rcp which +# * uses ssh to do the data transfer (instead of using rcmd). +@@ -1106,7 +1106,8 @@ sink(int argc, char **argv) + SCREWUP("size out of range"); + size = (off_t)ull; + +- if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) { ++ if (*cp == '\0' || strchr(cp, '/') != NULL || ++ strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) { + run_err("error: unexpected filename: %s", cp); + exit(1); + } +-- +2.20.1 + diff --git a/gnu/packages/patches/owncloud-disable-updatecheck.patch b/gnu/packages/patches/owncloud-disable-updatecheck.patch index 69a984a104..3469398eb4 100644 --- a/gnu/packages/patches/owncloud-disable-updatecheck.patch +++ b/gnu/packages/patches/owncloud-disable-updatecheck.patch @@ -10,14 +10,14 @@ Last-Update: 2014-02-17 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/src/libsync/configfile.cpp +++ b/src/libsync/configfile.cpp -@@ -417,11 +417,14 @@ bool ConfigFile::skipUpdateCheck( const - QString con( connection ); - if( connection.isEmpty() ) con = defaultConnection(); - +@@ -522,11 +522,14 @@ bool ConfigFile::skipUpdateCheck(const Q + if (connection.isEmpty()) + con = defaultConnection(); + - QVariant fallback = getValue(QLatin1String(skipUpdateCheckC), con, false); + QVariant fallback = getValue(QLatin1String(skipUpdateCheckC), con, true); fallback = getValue(QLatin1String(skipUpdateCheckC), QString(), fallback); - + QVariant value = getPolicySetting(QLatin1String(skipUpdateCheckC), fallback); - return value.toBool(); + if ( !value.toBool() ) @@ -25,25 +25,25 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ + + return true; } - - void ConfigFile::setSkipUpdateCheck( bool skip, const QString& connection ) + + void ConfigFile::setSkipUpdateCheck(bool skip, const QString &connection) --- a/src/gui/generalsettings.cpp +++ b/src/gui/generalsettings.cpp -@@ -124,6 +124,7 @@ void GeneralSettings::loadMiscSettings() - +@@ -146,6 +149,7 @@ void GeneralSettings::loadMiscSettings() + void GeneralSettings::slotUpdateInfo() { + /* Guix doesn't want an autoupdater - // Note: the sparkle-updater is not an OCUpdater - OCUpdater *updater = qobject_cast<OCUpdater*>(Updater::instance()); - if (ConfigFile().skipUpdateCheck()) { -@@ -140,6 +141,9 @@ void GeneralSettings::slotUpdateInfo() - // can't have those infos from sparkle currently - _ui->updatesGroupBox->setVisible(false); - } + if (ConfigFile().skipUpdateCheck() || !Updater::instance()) { + // updater disabled on compile + _ui->updaterWidget->setVisible(false); +@@ -174,6 +178,9 @@ void GeneralSettings::slotUpdateInfo() + _ui->updateChannel->setCurrentIndex(ConfigFile().updateChannel() == "beta" ? 1 : 0); + connect(_ui->updateChannel, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), + this, &GeneralSettings::slotUpdateChannelChanged, Qt::UniqueConnection); + */ + //hide the update group box for Guix. -+ _ui->updatesGroupBox->setVisible(false); ++ _ui->updaterWidget->setVisible(false); } - - void GeneralSettings::saveMiscSettings() + + void GeneralSettings::slotUpdateChannelChanged(int index) diff --git a/gnu/packages/patches/p11-kit-jks-timestamps.patch b/gnu/packages/patches/p11-kit-jks-timestamps.patch new file mode 100644 index 0000000000..8cb8ed8684 --- /dev/null +++ b/gnu/packages/patches/p11-kit-jks-timestamps.patch @@ -0,0 +1,42 @@ +Fix test failures induced by setting the SOURCE_DATE_EPOCH variable. + +Taken from upstream: <https://github.com/p11-glue/p11-kit/pull/213>. + +From 2a474e1fe8f4bd8b4ed7622e5cf3b2718a202562 Mon Sep 17 00:00:00 2001 +From: Daiki Ueno <dueno@redhat.com> +Date: Mon, 28 Jan 2019 13:03:15 +0100 +Subject: [PATCH] extract-jks: Prefer _p11_extract_jks_timestamp to + SOURCE_DATE_EPOCH + +Give _p11_extract_jks_timestamp precedence over SOURCE_DATE_EPOCH so +that the test results are not affected by the envvar settings. +--- + trust/extract-jks.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/trust/extract-jks.c b/trust/extract-jks.c +index ad8dc35..a6f855f 100644 +--- a/trust/extract-jks.c ++++ b/trust/extract-jks.c +@@ -250,7 +250,9 @@ prepare_jks_buffer (p11_enumerate *ex, + * when this was this certificate was added to the keystore, however + * we don't have that information. Java uses time in milliseconds + */ +- { ++ if (_p11_extract_jks_timestamp) ++ now = _p11_extract_jks_timestamp; ++ else { + char *source_date_epoch; + source_date_epoch = secure_getenv ("SOURCE_DATE_EPOCH"); + if (source_date_epoch) { +@@ -276,9 +278,7 @@ prepare_jks_buffer (p11_enumerate *ex, + return false; + } + now = epoch; +- } else if (_p11_extract_jks_timestamp) +- now = _p11_extract_jks_timestamp; +- else ++ } else + now = time (NULL); + } + diff --git a/gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch b/gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch deleted file mode 100644 index 53f8fde9de..0000000000 --- a/gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch +++ /dev/null @@ -1,16 +0,0 @@ -Drop SPARQLWrapper from the required install inputs under Python 2, as it -creates a circular dependency. - -diff -u rdflib-4.1.2.alt/setup.py rdflib-4.1.2/setup.py ---- rdflib-4.1.2.alt/setup.py 2014-03-04 12:40:26.000000000 +0100 -+++ rdflib-4.1.2/setup.py 2015-01-23 21:52:59.000000000 +0100 -@@ -52,7 +52,7 @@ - kwargs['test_suite'] = "nose.collector" - kwargs['install_requires'] = [ - 'isodate', -- 'pyparsing', 'SPARQLWrapper'] -+ 'pyparsing'] - - if sys.version_info[1]<7: # Python 2.6 - kwargs['install_requires'].append('ordereddict') - diff --git a/gnu/packages/patches/qemu-CVE-2018-16872.patch b/gnu/packages/patches/qemu-CVE-2018-16872.patch new file mode 100644 index 0000000000..094e823ee4 --- /dev/null +++ b/gnu/packages/patches/qemu-CVE-2018-16872.patch @@ -0,0 +1,88 @@ +Fixes CVE-2018-16872: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-16872 + +Patch copied from upstream source repository: + +https://git.qemu.org/?p=qemu.git;a=commitdiff;h=bab9df35ce73d1c8e19a37e2737717ea1c984dc1 + +From bab9df35ce73d1c8e19a37e2737717ea1c984dc1 Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann <kraxel@redhat.com> +Date: Thu, 13 Dec 2018 13:25:11 +0100 +Subject: [PATCH] usb-mtp: use O_NOFOLLOW and O_CLOEXEC. + +Open files and directories with O_NOFOLLOW to avoid symlinks attacks. +While being at it also add O_CLOEXEC. + +usb-mtp only handles regular files and directories and ignores +everything else, so users should not see a difference. + +Because qemu ignores symlinks, carrying out a successful symlink attack +requires swapping an existing file or directory below rootdir for a +symlink and winning the race against the inotify notification to qemu. + +Fixes: CVE-2018-16872 +Cc: Prasad J Pandit <ppandit@redhat.com> +Cc: Bandan Das <bsd@redhat.com> +Reported-by: Michael Hanselmann <public@hansmi.ch> +Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> +Reviewed-by: Michael Hanselmann <public@hansmi.ch> +Message-id: 20181213122511.13853-1-kraxel@redhat.com +--- + hw/usb/dev-mtp.c | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c +index 100b7171f4..36c43b8c20 100644 +--- a/hw/usb/dev-mtp.c ++++ b/hw/usb/dev-mtp.c +@@ -653,13 +653,18 @@ static void usb_mtp_object_readdir(MTPState *s, MTPObject *o) + { + struct dirent *entry; + DIR *dir; ++ int fd; + + if (o->have_children) { + return; + } + o->have_children = true; + +- dir = opendir(o->path); ++ fd = open(o->path, O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW); ++ if (fd < 0) { ++ return; ++ } ++ dir = fdopendir(fd); + if (!dir) { + return; + } +@@ -1007,7 +1012,7 @@ static MTPData *usb_mtp_get_object(MTPState *s, MTPControl *c, + + trace_usb_mtp_op_get_object(s->dev.addr, o->handle, o->path); + +- d->fd = open(o->path, O_RDONLY); ++ d->fd = open(o->path, O_RDONLY | O_CLOEXEC | O_NOFOLLOW); + if (d->fd == -1) { + usb_mtp_data_free(d); + return NULL; +@@ -1031,7 +1036,7 @@ static MTPData *usb_mtp_get_partial_object(MTPState *s, MTPControl *c, + c->argv[1], c->argv[2]); + + d = usb_mtp_data_alloc(c); +- d->fd = open(o->path, O_RDONLY); ++ d->fd = open(o->path, O_RDONLY | O_CLOEXEC | O_NOFOLLOW); + if (d->fd == -1) { + usb_mtp_data_free(d); + return NULL; +@@ -1658,7 +1663,7 @@ static void usb_mtp_write_data(MTPState *s) + 0, 0, 0, 0); + goto done; + } +- d->fd = open(path, O_CREAT | O_WRONLY, mask); ++ d->fd = open(path, O_CREAT | O_WRONLY | O_CLOEXEC | O_NOFOLLOW, mask); + if (d->fd == -1) { + usb_mtp_queue_result(s, RES_STORE_FULL, d->trans, + 0, 0, 0, 0); +-- +2.20.1 + diff --git a/gnu/packages/patches/qemu-CVE-2019-6778.patch b/gnu/packages/patches/qemu-CVE-2019-6778.patch new file mode 100644 index 0000000000..315f2922da --- /dev/null +++ b/gnu/packages/patches/qemu-CVE-2019-6778.patch @@ -0,0 +1,43 @@ +Fixes CVE-2019-6778: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6778 + +Patch copied from upstream source repository: + +https://git.qemu.org/?p=qemu.git;a=commitdiff;h=a7104eda7dab99d0cdbd3595c211864cba415905 + +From a7104eda7dab99d0cdbd3595c211864cba415905 Mon Sep 17 00:00:00 2001 +From: Prasad J Pandit <pjp@fedoraproject.org> +Date: Sun, 13 Jan 2019 23:29:48 +0530 +Subject: [PATCH] slirp: check data length while emulating ident function + +While emulating identification protocol, tcp_emu() does not check +available space in the 'sc_rcv->sb_data' buffer. It could lead to +heap buffer overflow issue. Add check to avoid it. + +Reported-by: Kira <864786842@qq.com> +Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> +Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> +--- + slirp/tcp_subr.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c +index 4a9a5b5edc..23a841f26e 100644 +--- a/slirp/tcp_subr.c ++++ b/slirp/tcp_subr.c +@@ -634,6 +634,11 @@ tcp_emu(struct socket *so, struct mbuf *m) + socklen_t addrlen = sizeof(struct sockaddr_in); + struct sbuf *so_rcv = &so->so_rcv; + ++ if (m->m_len > so_rcv->sb_datalen ++ - (so_rcv->sb_wptr - so_rcv->sb_data)) { ++ return 1; ++ } ++ + memcpy(so_rcv->sb_wptr, m->m_data, m->m_len); + so_rcv->sb_wptr += m->m_len; + so_rcv->sb_rptr += m->m_len; +-- +2.20.1 + diff --git a/gnu/packages/patches/readline-7.0-mingw.patch b/gnu/packages/patches/readline-7.0-mingw.patch deleted file mode 100644 index 1dc491d556..0000000000 --- a/gnu/packages/patches/readline-7.0-mingw.patch +++ /dev/null @@ -1,28 +0,0 @@ -Configure checks for chown; add missing shields in code. - -Upstream status: not yet presented upstream. - ---- readline-7.0/histfile.c.orig 2016-12-06 20:04:10.058901731 +0100 -+++ readline-7.0/histfile.c 2016-12-06 20:05:09.220083801 +0100 -@@ -610,8 +610,10 @@ - user is running this, it's a no-op. If the shell is running after sudo - with a shared history file, we don't want to leave the history file - owned by root. */ -+#if HAVE_CHOWN - if (rv == 0 && exists) - r = chown (filename, finfo.st_uid, finfo.st_gid); -+#endif - - xfree (filename); - FREE (tempname); -@@ -757,8 +759,10 @@ - user is running this, it's a no-op. If the shell is running after sudo - with a shared history file, we don't want to leave the history file - owned by root. */ -+#if HAVE_CHOWN - if (rv == 0 && exists) - mode = chown (histname, finfo.st_uid, finfo.st_gid); -+#endif - - FREE (histname); - FREE (tempname); diff --git a/gnu/packages/patches/scotch-graph-diam-64.patch b/gnu/packages/patches/scotch-graph-diam-64.patch deleted file mode 100644 index 2ae31e3c3b..0000000000 --- a/gnu/packages/patches/scotch-graph-diam-64.patch +++ /dev/null @@ -1,27 +0,0 @@ -Fixes test_scotch_graph_diam test with -DINTSIZE64. - -Reported upstream at -https://gforge.inria.fr/tracker/index.php?func=detail&aid=21650&group_id=248&atid=1081 - ---- scotch-6.0.5a/src/libscotch/library.h -+++ scotch-6.0.5a/src/libscotch/library.h -@@ -187,6 +187,7 @@ SCOTCH_Num SCOTCH_graphBase (SCOTCH_Graph * const, const SCO - int SCOTCH_graphCheck (const SCOTCH_Graph * const); - void SCOTCH_graphSize (const SCOTCH_Graph * const, SCOTCH_Num * const, SCOTCH_Num * const); - void SCOTCH_graphData (const SCOTCH_Graph * const, SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num ** const, SCOTCH_Num ** const, SCOTCH_Num ** const, SCOTCH_Num ** const, SCOTCH_Num * const, SCOTCH_Num ** const, SCOTCH_Num ** const); -+SCOTCH_Num SCOTCH_graphDiamPV (SCOTCH_Graph * const); - void SCOTCH_graphStat (const SCOTCH_Graph * const, SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, double * const, double * const, SCOTCH_Num * const, SCOTCH_Num * const, double * const, double * const, SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, double * const, double * const); - int SCOTCH_graphCoarsen (const SCOTCH_Graph * const, const SCOTCH_Num, const double, const SCOTCH_Num, SCOTCH_Graph * const, SCOTCH_Num * const); - int SCOTCH_graphCoarsenMatch (const SCOTCH_Graph * const, SCOTCH_Num * const, const double, const SCOTCH_Num, SCOTCH_Num * const); ---- scotch-6.0.5a/src/libscotch/library_graph_diam.c -+++ scotch-6.0.5a/src/libscotch/library_graph_diam.c -@@ -72,8 +72,7 @@ - - SCOTCH_Num - SCOTCH_graphDiamPV ( --SCOTCH_Graph * const grafptr, --const SCOTCH_Num baseval) -+SCOTCH_Graph * const grafptr) - { - return ((SCOTCH_Num) graphDiamPV ((Graph * const) grafptr)); - } diff --git a/gnu/packages/patches/scotch-graph-induce-type-64.patch b/gnu/packages/patches/scotch-graph-induce-type-64.patch deleted file mode 100644 index d2eee52a7b..0000000000 --- a/gnu/packages/patches/scotch-graph-induce-type-64.patch +++ /dev/null @@ -1,19 +0,0 @@ -Fixes return type of SCOTCH_graphInduceList and SCOTCH_graphInducePart -so that the definition matches with -DINTSIZE64. - -Reported upstream at -https://gforge.inria.fr/tracker/index.php?func=detail&aid=21608&group_id=248&atid=1081 - ---- scotch_6.0.5a/src/libscotch/library.h.orig 2018-02-11 10:52:38.000000000 -0600 -+++ scotch_6.0.5a/src/libscotch/library.h 2018-02-23 16:56:41.000000000 -0600 -@@ -199,8 +199,8 @@ - int SCOTCH_graphGeomSaveChac (const SCOTCH_Graph * const, const SCOTCH_Geom * const, FILE * const, FILE * const, const char * const); - int SCOTCH_graphGeomSaveMmkt (const SCOTCH_Graph * const, const SCOTCH_Geom * const, FILE * const, FILE * const, const char * const); - int SCOTCH_graphGeomSaveScot (const SCOTCH_Graph * const, const SCOTCH_Geom * const, FILE * const, FILE * const, const char * const); --int SCOTCH_graphInduceList (const SCOTCH_Graph * const, const SCOTCH_Num, const SCOTCH_Num * const, SCOTCH_Graph * const); --int SCOTCH_graphInducePart (const SCOTCH_Graph * const, const SCOTCH_Num, const SCOTCH_GraphPart2 * const, const SCOTCH_GraphPart2, SCOTCH_Graph * const); -+SCOTCH_Num SCOTCH_graphInduceList (const SCOTCH_Graph * const, const SCOTCH_Num, const SCOTCH_Num * const, SCOTCH_Graph * const); -+SCOTCH_Num SCOTCH_graphInducePart (const SCOTCH_Graph * const, const SCOTCH_Num, const SCOTCH_GraphPart2 * const, const SCOTCH_GraphPart2, SCOTCH_Graph * const); - - int SCOTCH_graphMapInit (const SCOTCH_Graph * const, SCOTCH_Mapping * const, const SCOTCH_Arch * const, SCOTCH_Num * const); - void SCOTCH_graphMapExit (const SCOTCH_Graph * const, SCOTCH_Mapping * const); diff --git a/gnu/packages/patches/scotch-integer-declarations.patch b/gnu/packages/patches/scotch-integer-declarations.patch new file mode 100644 index 0000000000..978625c1c0 --- /dev/null +++ b/gnu/packages/patches/scotch-integer-declarations.patch @@ -0,0 +1,37 @@ +diff --git a/src/libscotch/library.h b/src/libscotch/library.h +index 1891c19..ecc0533 100644 +--- a/src/libscotch/library.h ++++ b/src/libscotch/library.h +@@ -67,6 +67,8 @@ + + /*+ Integer type. +*/ + ++#include <stdint.h> ++ + typedef DUMMYIDX SCOTCH_Idx; + + typedef DUMMYINT SCOTCH_Num; +diff --git a/src/libscotchmetis/library_metis.h b/src/libscotchmetis/library_metis.h +index e6767e1..04e71c3 100644 +--- a/src/libscotchmetis/library_metis.h ++++ b/src/libscotchmetis/library_metis.h +@@ -99,6 +99,7 @@ typedef enum { + */ + + #ifndef SCOTCH_H /* In case "scotch.h" not included before */ ++#include <stdint.h> + typedef DUMMYINT SCOTCH_Num; + #endif /* SCOTCH_H */ + +diff --git a/src/libscotchmetis/library_parmetis.h b/src/libscotchmetis/library_parmetis.h +index 6d2f0b0..3c803fc 100644 +--- a/src/libscotchmetis/library_parmetis.h ++++ b/src/libscotchmetis/library_parmetis.h +@@ -106,6 +106,7 @@ typedef enum { + */ + + #ifndef SCOTCH_H /* In case "scotch.h" not included before */ ++#include <stdint.h> + typedef DUMMYINT SCOTCH_Num; + #endif /* SCOTCH_H */ + diff --git a/gnu/packages/patches/scotch-test-threading.patch b/gnu/packages/patches/scotch-test-threading.patch deleted file mode 100644 index de8cc49c41..0000000000 --- a/gnu/packages/patches/scotch-test-threading.patch +++ /dev/null @@ -1,22 +0,0 @@ -Fix this test so that it succeeds when the library is not compiled with -SCOTCH_PTHREAD. - ---- scotch_6.0.4/src/check/test_common_thread.c 2014-09-28 11:39:59.000000000 -0500 -+++ scotch_6.0.4/src/check/test_common_thread.c 2015-01-10 00:52:00.076229542 -0600 -@@ -175,14 +175,14 @@ - char * argv[]) - { - TestThreadGroup groudat; --#if ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) -+#if ((defined COMMON_PTHREAD) && (defined SCOTCH_PTHREAD)) - TestThread * restrict thrdtab; - int thrdnbr; - #endif /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */ - - SCOTCH_errorProg (argv[0]); - --#if ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) -+#if ((defined COMMON_PTHREAD) && (defined SCOTCH_PTHREAD)) - thrdnbr = SCOTCH_PTHREAD_NUMBER; - - groudat.redusum = COMPVAL (thrdnbr); diff --git a/gnu/packages/patches/streamlink-update-test.patch b/gnu/packages/patches/streamlink-update-test.patch new file mode 100644 index 0000000000..2d90009192 --- /dev/null +++ b/gnu/packages/patches/streamlink-update-test.patch @@ -0,0 +1,70 @@ +https://github.com/streamlink/streamlink/commit/a3123346824ee7b9c461110f292ea6987ea9a78d.patch +This is taken from upstream, and can be removed at the next release + +From c6f3994e177a42792238f2edd07ba9053c10abc9 Mon Sep 17 00:00:00 2001 +From: back-to <backto@protonmail.ch> +Date: Sat, 21 Jul 2018 14:30:51 +0200 +Subject: [PATCH] tests.localization: use en_CA instead of en_US for + test_equivalent + +**python-iso3166** got an update which breaks the Streamlink tests. +https://pypi.org/project/iso3166/#history + +**python-iso3166** and **pycountry** have now a different `name` for _the United States of America_ + +> python-iso3166: United States of America +https://github.com/deactivated/python-iso3166/commit/e5f8b37f18b01fcb5fa0e8130d8296fc7a7b5a9f + +> pycountry: United States +https://bitbucket.org/flyingcircus/pycountry/src/5aa4bb47e33798cb631a81521b7b5b18f7d6c919/src/pycountry/databases/iso3166-1.json?at=default&fileviewer=file-view-default#iso3166-1.json-1572:1578 + +https://www.iso.org/obp/ui/#iso:code:3166:US + +--- + +use **en_CA** instead of **en_US** for backwards compatibility, +as changing the **US** name would fail with older versions of **python-iso3166** / **pycountry** +--- + tests/test_localization.py | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/tests/test_localization.py b/tests/test_localization.py +index 0b81ae591..90bb3ac31 100644 +--- a/tests/test_localization.py ++++ b/tests/test_localization.py +@@ -32,11 +32,12 @@ def test_bad_language_code(self): + self.assertRaises(LookupError, l10n.Localization, "enUS") + + def test_equivalent(self): +- l = l10n.Localization("en_US") ++ l = l10n.Localization("en_CA") + self.assertTrue(l.equivalent(language="eng")) + self.assertTrue(l.equivalent(language="en")) +- self.assertTrue(l.equivalent(language="en", country="US")) +- self.assertTrue(l.equivalent(language="en", country="United States")) ++ self.assertTrue(l.equivalent(language="en", country="CA")) ++ self.assertTrue(l.equivalent(language="en", country="CAN")) ++ self.assertTrue(l.equivalent(language="en", country="Canada")) + + def test_equivalent_remap(self): + l = l10n.Localization("fr_FR") +@@ -48,7 +49,7 @@ def test_not_equivalent(self): + self.assertFalse(l.equivalent(language="eng")) + self.assertFalse(l.equivalent(language="en")) + self.assertFalse(l.equivalent(language="en", country="US")) +- self.assertFalse(l.equivalent(language="en", country="United States")) ++ self.assertFalse(l.equivalent(language="en", country="Canada")) + self.assertFalse(l.equivalent(language="en", country="ES")) + self.assertFalse(l.equivalent(language="en", country="Spain")) + +@@ -71,8 +72,8 @@ def test_get_country(self): + l10n.Localization.get_country("USA").alpha2) + self.assertEqual("GB", + l10n.Localization.get_country("GB").alpha2) +- self.assertEqual("United States", +- l10n.Localization.get_country("United States").name) ++ self.assertEqual("Canada", ++ l10n.Localization.get_country("Canada").name) + + def test_get_country_miss(self): + self.assertRaises(LookupError, l10n.Localization.get_country, "XE") diff --git a/gnu/packages/patches/superlu-dist-awpm-grid.patch b/gnu/packages/patches/superlu-dist-awpm-grid.patch new file mode 100644 index 0000000000..d6cb8e521d --- /dev/null +++ b/gnu/packages/patches/superlu-dist-awpm-grid.patch @@ -0,0 +1,36 @@ +Create the CombBLAS::SpParMat with the MPI_Comm from the input 'gridinfo_t'. +This prevents a warning/error from CombBLAS about using MPI_COMM_WORLD. + +--- a/SRC/AWPM_CombBLAS.hpp ++++ b/SRC/AWPM_CombBLAS.hpp +@@ -52,7 +52,7 @@ + { + printf("AWPM only supports square process grid. Retuning without a permutation.\n"); + } +- combblas::SpParMat < int_t, double, combblas::SpDCCols<int_t,double> > Adcsc; ++ combblas::SpParMat < int_t, double, combblas::SpDCCols<int_t,double> > Adcsc(grid->comm); + std::vector< std::vector < std::tuple<int_t,int_t,double> > > data(procs); + + /* ------------------------------------------------------------ +@@ -100,11 +100,10 @@ + combblas::AWPM(Adcsc, mateRow2Col, mateCol2Row,true); + + // now gather the matching vector +- MPI_Comm World = mateRow2Col.getcommgrid()->GetWorld(); + int * rdispls = new int[procs]; + int sendcnt = mateRow2Col.LocArrSize(); + int * recvcnt = new int[procs]; +- MPI_Allgather(&sendcnt, 1, MPI_INT, recvcnt, 1, MPI_INT, World); ++ MPI_Allgather(&sendcnt, 1, MPI_INT, recvcnt, 1, MPI_INT, grid->comm); + rdispls[0] = 0; + for(int i=0; i<procs-1; ++i) + { +@@ -112,7 +111,7 @@ + } + int_t *senddata = (int_t *)mateRow2Col.GetLocArr(); + +- MPI_Allgatherv(senddata, sendcnt, combblas::MPIType<int_t>(), ScalePermstruct->perm_r, recvcnt, rdispls, combblas::MPIType<int_t>(), World); ++ MPI_Allgatherv(senddata, sendcnt, combblas::MPIType<int_t>(), ScalePermstruct->perm_r, recvcnt, rdispls, combblas::MPIType<int_t>(), grid->comm); + + delete[] rdispls; + delete[] recvcnt; diff --git a/gnu/packages/patches/u-boot-pinebook-a64-update-dts.patch b/gnu/packages/patches/u-boot-pinebook-a64-update-dts.patch deleted file mode 100644 index 9d0a08c8bf..0000000000 --- a/gnu/packages/patches/u-boot-pinebook-a64-update-dts.patch +++ /dev/null @@ -1,1485 +0,0 @@ -From 1b39a1834ed182bbd8036a5cd74a9ea111fa4691 Mon Sep 17 00:00:00 2001 -From: Andre Przywara <andre.przywara@arm.com> -Date: Mon, 29 Oct 2018 00:56:47 +0000 -Subject: [PATCH 03/13] sunxi: A64: Update .dts/.dtsi files -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Update the .dts/.dtsi file from the Linux sunxi/dt64-for-4.20 tree: -commit 679294497be31596e1c9c61507746d72b6b05f26 -Author: Rodrigo Exterckötter Tjäder <rodrigo@tjader.xyz> -Date: Wed Sep 26 19:48:24 2018 +0000 - arm64: dts: allwinner: a64: a64-olinuxino: set the PHY TX delay - -Signed-off-by: Andre Przywara <andre.przywara@arm.com> -Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> -Reviewed-by: Jagan Teki <jagan@openedev.com> ---- - arch/arm/dts/sun50i-a64-amarula-relic.dts | 168 +++++++++++++- - arch/arm/dts/sun50i-a64-bananapi-m64.dts | 34 ++- - arch/arm/dts/sun50i-a64-nanopi-a64.dts | 89 +++++++- - arch/arm/dts/sun50i-a64-olinuxino.dts | 103 ++++++++- - arch/arm/dts/sun50i-a64-orangepi-win.dts | 179 ++++++++++++++- - arch/arm/dts/sun50i-a64-pine64.dts | 32 ++- - arch/arm/dts/sun50i-a64-sopine-baseboard.dts | 32 ++- - arch/arm/dts/sun50i-a64-sopine.dtsi | 15 ++ - arch/arm/dts/sun50i-a64.dtsi | 313 +++++++++++++++++++++++++-- - 9 files changed, 920 insertions(+), 45 deletions(-) - -diff --git a/arch/arm/dts/sun50i-a64-amarula-relic.dts b/arch/arm/dts/sun50i-a64-amarula-relic.dts -index f3b4e93ece..6cb2b7f0c8 100644 ---- a/arch/arm/dts/sun50i-a64-amarula-relic.dts -+++ b/arch/arm/dts/sun50i-a64-amarula-relic.dts -@@ -22,11 +22,11 @@ - stdout-path = "serial0:115200n8"; - }; - -- reg_vcc3v3: vcc3v3 { -- compatible = "regulator-fixed"; -- regulator-name = "vcc3v3"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -+ wifi_pwrseq: wifi-pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ clocks = <&rtc 1>; -+ clock-names = "ext_clock"; -+ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* WL-PMU-EN: PL2 */ - }; - }; - -@@ -34,10 +34,34 @@ - status = "okay"; - }; - -+&mmc1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc1_pins>; -+ vmmc-supply = <®_dcdc1>; -+ /* -+ * Schematic shows both dldo4 and eldo1 connected for vcc-io-wifi, but -+ * dldo4 connection shows DNP(Do Not Populate) and eldo1 connected with -+ * 0Ohm register to vcc-io-wifi so eldo1 is used. -+ */ -+ vqmmc-supply = <®_eldo1>; -+ mmc-pwrseq = <&wifi_pwrseq>; -+ bus-width = <4>; -+ non-removable; -+ status = "okay"; -+ -+ brcmf: wifi@1 { -+ reg = <1>; -+ compatible = "brcm,bcm4329-fmac"; -+ interrupt-parent = <&r_pio>; -+ interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* WL-WAKE-AP: PL3 */ -+ interrupt-names = "host-wake"; -+ }; -+}; -+ - &mmc2 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc2_pins>; -- vmmc-supply = <®_vcc3v3>; -+ vmmc-supply = <®_dcdc1>; - bus-width = <8>; - non-removable; - cap-mmc-hw-reset; -@@ -48,9 +72,138 @@ - status = "okay"; - }; - -+&r_rsb { -+ status = "okay"; -+ -+ axp803: pmic@3a3 { -+ compatible = "x-powers,axp803"; -+ reg = <0x3a3>; -+ interrupt-parent = <&r_intc>; -+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -+ x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */ -+ }; -+}; -+ -+#include "axp803.dtsi" -+ -+®_aldo1 { -+ regulator-always-on; -+ regulator-min-microvolt = <2800000>; -+ regulator-max-microvolt = <2800000>; -+ regulator-name = "avdd-csi"; -+}; -+ -+®_aldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-pl"; -+}; -+ -+®_aldo3 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "vcc-pll-avcc"; -+}; -+ -+®_dcdc1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-3v3"; -+}; -+ -+®_dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1040000>; -+ regulator-max-microvolt = <1300000>; -+ regulator-name = "vdd-cpux"; -+}; -+ -+/* DCDC3 is polyphased with DCDC2 */ -+ -+®_dcdc5 { -+ regulator-always-on; -+ regulator-min-microvolt = <1500000>; -+ regulator-max-microvolt = <1500000>; -+ regulator-name = "vcc-dram"; -+}; -+ -+®_dcdc6 { -+ regulator-always-on; -+ regulator-min-microvolt = <1100000>; -+ regulator-max-microvolt = <1100000>; -+ regulator-name = "vdd-sys"; -+}; -+ -+®_dldo1 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-hdmi-dsi-sensor"; -+}; -+ -+®_dldo2 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-mipi"; -+}; -+ -+®_dldo3 { -+ regulator-min-microvolt = <2800000>; -+ regulator-max-microvolt = <2800000>; -+ regulator-name = "dovdd-csi"; -+}; -+ -+®_dldo4 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-wifi-io"; -+}; -+ -+®_drivevbus { -+ regulator-name = "usb0-vbus"; -+ status = "okay"; -+}; -+ -+®_eldo1 { -+ regulator-always-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-name = "cpvdd"; -+}; -+ -+®_eldo3 { -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-name = "dvdd-csi"; -+}; -+ -+®_fldo1 { -+ regulator-min-microvolt = <1200000>; -+ regulator-max-microvolt = <1200000>; -+ regulator-name = "vcc-1v2-hsic"; -+}; -+ -+/* -+ * The A64 chip cannot work without this regulator off, although -+ * it seems to be only driving the AR100 core. -+ * Maybe we don't still know well about CPUs domain. -+ */ -+®_fldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1100000>; -+ regulator-max-microvolt = <1100000>; -+ regulator-name = "vdd-cpus"; -+}; -+ -+®_rtc_ldo { -+ regulator-name = "vcc-rtc"; -+}; -+ - &uart0 { - pinctrl-names = "default"; -- pinctrl-0 = <&uart0_pins_a>; -+ pinctrl-0 = <&uart0_pb_pins>; - status = "okay"; - }; - -@@ -61,5 +214,6 @@ - - &usbphy { - usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ -+ usb0_vbus-supply = <®_drivevbus>; - status = "okay"; - }; -diff --git a/arch/arm/dts/sun50i-a64-bananapi-m64.dts b/arch/arm/dts/sun50i-a64-bananapi-m64.dts -index 0716b14411..ef1c90401b 100644 ---- a/arch/arm/dts/sun50i-a64-bananapi-m64.dts -+++ b/arch/arm/dts/sun50i-a64-bananapi-m64.dts -@@ -60,6 +60,17 @@ - stdout-path = "serial0:115200n8"; - }; - -+ hdmi-connector { -+ compatible = "hdmi-connector"; -+ type = "a"; -+ -+ port { -+ hdmi_con_in: endpoint { -+ remote-endpoint = <&hdmi_out_con>; -+ }; -+ }; -+ }; -+ - leds { - compatible = "gpio-leds"; - -@@ -86,6 +97,10 @@ - }; - }; - -+&de { -+ status = "okay"; -+}; -+ - &ehci0 { - status = "okay"; - }; -@@ -103,6 +118,17 @@ - status = "okay"; - }; - -+&hdmi { -+ hvcc-supply = <®_dldo1>; -+ status = "okay"; -+}; -+ -+&hdmi_out { -+ hdmi_out_con: endpoint { -+ remote-endpoint = <&hdmi_con_in>; -+ }; -+}; -+ - &i2c1 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins>; -@@ -151,7 +177,7 @@ - - &mmc2 { - pinctrl-names = "default"; -- pinctrl-0 = <&mmc2_pins>; -+ pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>; - vmmc-supply = <®_dcdc1>; - bus-width = <8>; - non-removable; -@@ -296,9 +322,13 @@ - regulator-name = "vcc-rtc"; - }; - -+&simplefb_hdmi { -+ vcc-hdmi-supply = <®_dldo1>; -+}; -+ - &uart0 { - pinctrl-names = "default"; -- pinctrl-0 = <&uart0_pins_a>; -+ pinctrl-0 = <&uart0_pb_pins>; - status = "okay"; - }; - -diff --git a/arch/arm/dts/sun50i-a64-nanopi-a64.dts b/arch/arm/dts/sun50i-a64-nanopi-a64.dts -index e2dce48fa2..31884dbc88 100644 ---- a/arch/arm/dts/sun50i-a64-nanopi-a64.dts -+++ b/arch/arm/dts/sun50i-a64-nanopi-a64.dts -@@ -51,12 +51,44 @@ - compatible = "friendlyarm,nanopi-a64", "allwinner,sun50i-a64"; - - aliases { -+ ethernet0 = &emac; - serial0 = &uart0; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; -+ -+ hdmi-connector { -+ compatible = "hdmi-connector"; -+ type = "a"; -+ -+ port { -+ hdmi_con_in: endpoint { -+ remote-endpoint = <&hdmi_out_con>; -+ }; -+ }; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ blue { -+ label = "nanopi-a64:blue:status"; -+ gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */ -+ }; -+ }; -+ -+ wifi_pwrseq: wifi_pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ clocks = <&rtc 1>; -+ clock-names = "ext_clock"; -+ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ -+ }; -+}; -+ -+&de { -+ status = "okay"; - }; - - &ehci0 { -@@ -67,6 +99,26 @@ - status = "okay"; - }; - -+&emac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&rgmii_pins>; -+ phy-mode = "rgmii"; -+ phy-handle = <&ext_rgmii_phy>; -+ phy-supply = <®_dcdc1>; -+ status = "okay"; -+}; -+ -+&hdmi { -+ hvcc-supply = <®_dldo1>; -+ status = "okay"; -+}; -+ -+&hdmi_out { -+ hdmi_out_con: endpoint { -+ remote-endpoint = <&hdmi_con_in>; -+ }; -+}; -+ - /* i2c1 connected with gpio headers like pine64, bananapi */ - &i2c1 { - pinctrl-names = "default"; -@@ -78,6 +130,13 @@ - bias-pull-up; - }; - -+&mdio { -+ ext_rgmii_phy: ethernet-phy@1 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <7>; -+ }; -+}; -+ - &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins>; -@@ -88,6 +147,24 @@ - status = "okay"; - }; - -+&mmc1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc1_pins>; -+ vmmc-supply = <®_dcdc1>; -+ vqmmc-supply = <®_dldo4>; -+ mmc-pwrseq = <&wifi_pwrseq>; -+ bus-width = <4>; -+ non-removable; -+ status = "okay"; -+ -+ rtl8189etv: wifi@1 { -+ reg = <1>; -+ interrupt-parent = <&r_pio>; -+ interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */ -+ interrupt-names = "host-wake"; -+ }; -+}; -+ - &ohci0 { - status = "okay"; - }; -@@ -125,9 +202,9 @@ - - ®_dcdc1 { - regulator-always-on; -- regulator-min-microvolt = <3000000>; -- regulator-max-microvolt = <3000000>; -- regulator-name = "vcc-3v"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-3v3"; - }; - - ®_dcdc2 { -@@ -195,9 +272,13 @@ - regulator-name = "vcc-rtc"; - }; - -+&simplefb_hdmi { -+ vcc-hdmi-supply = <®_dldo1>; -+}; -+ - &uart0 { - pinctrl-names = "default"; -- pinctrl-0 = <&uart0_pins_a>; -+ pinctrl-0 = <&uart0_pb_pins>; - status = "okay"; - }; - -diff --git a/arch/arm/dts/sun50i-a64-olinuxino.dts b/arch/arm/dts/sun50i-a64-olinuxino.dts -index 3b3081b10e..f7a4bccaa5 100644 ---- a/arch/arm/dts/sun50i-a64-olinuxino.dts -+++ b/arch/arm/dts/sun50i-a64-olinuxino.dts -@@ -51,6 +51,7 @@ - compatible = "olimex,a64-olinuxino", "allwinner,sun50i-a64"; - - aliases { -+ ethernet0 = &emac; - serial0 = &uart0; - }; - -@@ -58,12 +59,74 @@ - stdout-path = "serial0:115200n8"; - }; - -+ hdmi-connector { -+ compatible = "hdmi-connector"; -+ type = "a"; -+ -+ port { -+ hdmi_con_in: endpoint { -+ remote-endpoint = <&hdmi_out_con>; -+ }; -+ }; -+ }; -+ -+ reg_usb1_vbus: usb1-vbus { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb1-vbus"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-boot-on; -+ enable-active-high; -+ gpio = <&pio 6 9 GPIO_ACTIVE_HIGH>; /* PG9 */ -+ status = "okay"; -+ }; -+ - wifi_pwrseq: wifi_pwrseq { - compatible = "mmc-pwrseq-simple"; - reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ - }; - }; - -+&de { -+ status = "okay"; -+}; -+ -+&ehci0 { -+ status = "okay"; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&emac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&rgmii_pins>; -+ phy-mode = "rgmii"; -+ phy-handle = <&ext_rgmii_phy>; -+ phy-supply = <®_dcdc1>; -+ allwinner,tx-delay-ps = <600>; -+ status = "okay"; -+}; -+ -+&hdmi { -+ hvcc-supply = <®_dldo1>; -+ status = "okay"; -+}; -+ -+&hdmi_out { -+ hdmi_out_con: endpoint { -+ remote-endpoint = <&hdmi_con_in>; -+ }; -+}; -+ -+&mdio { -+ ext_rgmii_phy: ethernet-phy@1 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <1>; -+ }; -+}; -+ - &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins>; -@@ -92,6 +155,14 @@ - }; - }; - -+&ohci0 { -+ status = "okay"; -+}; -+ -+&ohci1 { -+ status = "okay"; -+}; -+ - &r_rsb { - status = "okay"; - -@@ -100,6 +171,7 @@ - reg = <0x3a3>; - interrupt-parent = <&r_intc>; - interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -+ x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */ - }; - }; - -@@ -142,10 +214,14 @@ - - /* DCDC3 is polyphased with DCDC2 */ - -+/* -+ * The board uses DDR3L DRAM chips. 1.36V is the closest to the nominal -+ * 1.35V that the PMIC can drive. -+ */ - ®_dcdc5 { - regulator-always-on; -- regulator-min-microvolt = <1500000>; -- regulator-max-microvolt = <1500000>; -+ regulator-min-microvolt = <1360000>; -+ regulator-max-microvolt = <1360000>; - regulator-name = "vcc-ddr3"; - }; - -@@ -180,6 +256,11 @@ - regulator-name = "vcc-wifi-io"; - }; - -+®_drivevbus { -+ regulator-name = "usb0-vbus"; -+ status = "okay"; -+}; -+ - ®_eldo1 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; -@@ -214,8 +295,24 @@ - regulator-name = "vcc-rtc"; - }; - -+&simplefb_hdmi { -+ vcc-hdmi-supply = <®_dldo1>; -+}; -+ - &uart0 { - pinctrl-names = "default"; -- pinctrl-0 = <&uart0_pins_a>; -+ pinctrl-0 = <&uart0_pb_pins>; -+ status = "okay"; -+}; -+ -+&usb_otg { -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ -+&usbphy { - status = "okay"; -+ usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ -+ usb0_vbus-supply = <®_drivevbus>; -+ usb1_vbus-supply = <®_usb1_vbus>; - }; -diff --git a/arch/arm/dts/sun50i-a64-orangepi-win.dts b/arch/arm/dts/sun50i-a64-orangepi-win.dts -index bf42690a33..b0c64f7579 100644 ---- a/arch/arm/dts/sun50i-a64-orangepi-win.dts -+++ b/arch/arm/dts/sun50i-a64-orangepi-win.dts -@@ -1,5 +1,6 @@ - /* - * Copyright (C) 2017 Jagan Teki <jteki@openedev.com> -+ * Copyright (C) 2017-2018 Samuel Holland <samuel@sholland.org> - * - * This file is dual-licensed: you can use it either under the terms - * of the GPL or the X11 license, at your option. Note that this dual -@@ -51,23 +52,127 @@ - compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64"; - - aliases { -+ ethernet0 = &emac; - serial0 = &uart0; -+ serial1 = &uart1; -+ serial2 = &uart2; -+ serial3 = &uart3; -+ serial4 = &uart4; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; -+ -+ hdmi-connector { -+ compatible = "hdmi-connector"; -+ type = "a"; -+ -+ port { -+ hdmi_con_in: endpoint { -+ remote-endpoint = <&hdmi_out_con>; -+ }; -+ }; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ status { -+ label = "orangepi:green:status"; -+ gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ -+ }; -+ }; -+ -+ reg_gmac_3v3: gmac-3v3 { -+ compatible = "regulator-fixed"; -+ regulator-name = "gmac-3v3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-boot-on; -+ enable-active-high; -+ gpio = <&pio 3 14 GPIO_ACTIVE_HIGH>; /* PD14 */ -+ status = "okay"; -+ }; -+ -+ reg_usb1_vbus: usb1-vbus { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb1-vbus"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-boot-on; -+ enable-active-high; -+ gpio = <&pio 3 7 GPIO_ACTIVE_HIGH>; /* PD7 */ -+ status = "okay"; -+ }; -+ -+ wifi_pwrseq: wifi_pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */ -+ }; -+}; -+ -+&de { -+ status = "okay"; -+}; -+ -+&ehci0 { -+ status = "okay"; - }; - - &ehci1 { - status = "okay"; - }; - -+&emac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&rgmii_pins>; -+ phy-mode = "rgmii"; -+ phy-handle = <&ext_rgmii_phy>; -+ phy-supply = <®_gmac_3v3>; -+ status = "okay"; -+}; -+ -+&hdmi { -+ hvcc-supply = <®_dldo1>; -+ status = "okay"; -+}; -+ -+&hdmi_out { -+ hdmi_out_con: endpoint { -+ remote-endpoint = <&hdmi_con_in>; -+ }; -+}; -+ -+&mdio { -+ ext_rgmii_phy: ethernet-phy@1 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <1>; -+ }; -+}; -+ - &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins>; - vmmc-supply = <®_dcdc1>; -- cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; -+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ -+ disable-wp; -+ bus-width = <4>; -+ status = "okay"; -+}; -+ -+&mmc1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc1_pins>; -+ vmmc-supply = <®_dldo2>; -+ vqmmc-supply = <®_dldo4>; -+ mmc-pwrseq = <&wifi_pwrseq>; -+ bus-width = <4>; -+ non-removable; -+ status = "okay"; -+}; -+ -+&ohci0 { - status = "okay"; - }; - -@@ -89,9 +194,8 @@ - #include "axp803.dtsi" - - ®_aldo1 { -- regulator-always-on; -- regulator-min-microvolt = <1800000>; -- regulator-max-microvolt = <3300000>; -+ regulator-min-microvolt = <2800000>; -+ regulator-max-microvolt = <2800000>; - regulator-name = "afvcc-csi"; - }; - -@@ -163,12 +267,23 @@ - regulator-name = "vcc-wifi-io"; - }; - -+®_drivevbus { -+ regulator-name = "usb0-vbus"; -+ status = "okay"; -+}; -+ - ®_eldo1 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-name = "cpvdd"; - }; - -+®_eldo3 { -+ regulator-min-microvolt = <1500000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-name = "dvdd-csi"; -+}; -+ - ®_fldo1 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; -@@ -191,13 +306,65 @@ - regulator-name = "vcc-rtc"; - }; - -+&simplefb_hdmi { -+ vcc-hdmi-supply = <®_dldo1>; -+}; -+ -+&spi0 { -+ status = "okay"; -+ -+ spi-flash@0 { -+ compatible = "mxicy,mx25l1606e", "jedec,spi-nor"; -+ reg = <0>; -+ spi-max-frequency = <80000000>; -+ m25p,fast-read; -+ status = "okay"; -+ }; -+}; -+ -+/* On debug connector */ - &uart0 { - pinctrl-names = "default"; -- pinctrl-0 = <&uart0_pins_a>; -+ pinctrl-0 = <&uart0_pb_pins>; - status = "okay"; - }; - --&usbphy { -+/* Bluetooth */ -+&uart1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; -+ status = "okay"; -+}; -+ -+/* On Pi-2 connector, RTS/CTS optional */ -+&uart2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart2_pins>; -+ status = "disabled"; -+}; -+ -+/* On Pi-2 connector, RTS/CTS optional */ -+&uart3 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart3_pins>; -+ status = "disabled"; -+}; -+ -+/* On Pi-2 connector (labeled for SPI1), RTS/CTS optional */ -+&uart4 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart4_pins>; -+ status = "disabled"; -+}; -+ -+&usb_otg { -+ dr_mode = "otg"; - status = "okay"; - }; - -+&usbphy { -+ usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ -+ usb0_vbus-supply = <®_drivevbus>; -+ usb1_vbus-supply = <®_usb1_vbus>; -+ status = "okay"; -+}; -diff --git a/arch/arm/dts/sun50i-a64-pine64.dts b/arch/arm/dts/sun50i-a64-pine64.dts -index a75825798a..c077b6c1f4 100644 ---- a/arch/arm/dts/sun50i-a64-pine64.dts -+++ b/arch/arm/dts/sun50i-a64-pine64.dts -@@ -62,6 +62,21 @@ - chosen { - stdout-path = "serial0:115200n8"; - }; -+ -+ hdmi-connector { -+ compatible = "hdmi-connector"; -+ type = "a"; -+ -+ port { -+ hdmi_con_in: endpoint { -+ remote-endpoint = <&hdmi_out_con>; -+ }; -+ }; -+ }; -+}; -+ -+&de { -+ status = "okay"; - }; - - &ehci0 { -@@ -82,6 +97,17 @@ - - }; - -+&hdmi { -+ hvcc-supply = <®_dldo1>; -+ status = "okay"; -+}; -+ -+&hdmi_out { -+ hdmi_out_con: endpoint { -+ remote-endpoint = <&hdmi_con_in>; -+ }; -+}; -+ - &i2c1 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins>; -@@ -229,6 +255,10 @@ - regulator-name = "vcc-rtc"; - }; - -+&simplefb_hdmi { -+ vcc-hdmi-supply = <®_dldo1>; -+}; -+ - /* On Euler connector */ - &spdif { - status = "disabled"; -@@ -237,7 +267,7 @@ - /* On Exp and Euler connectors */ - &uart0 { - pinctrl-names = "default"; -- pinctrl-0 = <&uart0_pins_a>; -+ pinctrl-0 = <&uart0_pb_pins>; - status = "okay"; - }; - -diff --git a/arch/arm/dts/sun50i-a64-sopine-baseboard.dts b/arch/arm/dts/sun50i-a64-sopine-baseboard.dts -index abe179de35..53fcc9098d 100644 ---- a/arch/arm/dts/sun50i-a64-sopine-baseboard.dts -+++ b/arch/arm/dts/sun50i-a64-sopine-baseboard.dts -@@ -61,6 +61,17 @@ - stdout-path = "serial0:115200n8"; - }; - -+ hdmi-connector { -+ compatible = "hdmi-connector"; -+ type = "a"; -+ -+ port { -+ hdmi_con_in: endpoint { -+ remote-endpoint = <&hdmi_out_con>; -+ }; -+ }; -+ }; -+ - reg_vcc1v8: vcc1v8 { - compatible = "regulator-fixed"; - regulator-name = "vcc1v8"; -@@ -69,6 +80,10 @@ - }; - }; - -+&de { -+ status = "okay"; -+}; -+ - &ehci0 { - status = "okay"; - }; -@@ -86,6 +101,17 @@ - status = "okay"; - }; - -+&hdmi { -+ hvcc-supply = <®_dldo1>; -+ status = "okay"; -+}; -+ -+&hdmi_out { -+ hdmi_out_con: endpoint { -+ remote-endpoint = <&hdmi_con_in>; -+ }; -+}; -+ - &mdio { - ext_rgmii_phy: ethernet-phy@1 { - compatible = "ethernet-phy-ieee802.3-c22"; -@@ -134,9 +160,13 @@ - regulator-name = "vcc-wifi"; - }; - -+&simplefb_hdmi { -+ vcc-hdmi-supply = <®_dldo1>; -+}; -+ - &uart0 { - pinctrl-names = "default"; -- pinctrl-0 = <&uart0_pins_a>; -+ pinctrl-0 = <&uart0_pb_pins>; - status = "okay"; - }; - -diff --git a/arch/arm/dts/sun50i-a64-sopine.dtsi b/arch/arm/dts/sun50i-a64-sopine.dtsi -index 43418bd881..6723b8695e 100644 ---- a/arch/arm/dts/sun50i-a64-sopine.dtsi -+++ b/arch/arm/dts/sun50i-a64-sopine.dtsi -@@ -45,6 +45,8 @@ - - #include "sun50i-a64.dtsi" - -+#include <dt-bindings/gpio/gpio.h> -+ - &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins>; -@@ -52,6 +54,7 @@ - non-removable; - disable-wp; - bus-width = <4>; -+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ - status = "okay"; - }; - -@@ -66,6 +69,18 @@ - }; - }; - -+&spi0 { -+ status = "okay"; -+ -+ flash@0 { -+ #address-cells = <1>; -+ #size-cells = <1>; -+ compatible = "jedec,spi-nor"; -+ reg = <0>; -+ spi-max-frequency = <40000000>; -+ }; -+}; -+ - #include "axp803.dtsi" - - ®_aldo2 { -diff --git a/arch/arm/dts/sun50i-a64.dtsi b/arch/arm/dts/sun50i-a64.dtsi -index 7a083637c4..f3a66f8882 100644 ---- a/arch/arm/dts/sun50i-a64.dtsi -+++ b/arch/arm/dts/sun50i-a64.dtsi -@@ -43,9 +43,12 @@ - */ - - #include <dt-bindings/clock/sun50i-a64-ccu.h> -+#include <dt-bindings/clock/sun8i-de2.h> - #include <dt-bindings/clock/sun8i-r-ccu.h> - #include <dt-bindings/interrupt-controller/arm-gic.h> - #include <dt-bindings/reset/sun50i-a64-ccu.h> -+#include <dt-bindings/reset/sun8i-de2.h> -+#include <dt-bindings/reset/sun8i-r-ccu.h> - - / { - interrupt-parent = <&gic>; -@@ -57,17 +60,21 @@ - #size-cells = <1>; - ranges; - --/* -- * The pipeline mixer0-lcd0 depends on clock CLK_MIXER0 from DE2 CCU. -- * However there is no support for this clock on A64 yet, so we depend -- * on the upstream clocks here to keep them (and thus CLK_MIXER0) up. -- */ - simplefb_lcd: framebuffer-lcd { - compatible = "allwinner,simple-framebuffer", - "simple-framebuffer"; - allwinner,pipeline = "mixer0-lcd0"; - clocks = <&ccu CLK_TCON0>, -- <&ccu CLK_DE>, <&ccu CLK_BUS_DE>; -+ <&display_clocks CLK_MIXER0>; -+ status = "disabled"; -+ }; -+ -+ simplefb_hdmi: framebuffer-hdmi { -+ compatible = "allwinner,simple-framebuffer", -+ "simple-framebuffer"; -+ allwinner,pipeline = "mixer1-lcd1-hdmi"; -+ clocks = <&display_clocks CLK_MIXER1>, -+ <&ccu CLK_TCON1>, <&ccu CLK_HDMI>; - status = "disabled"; - }; - }; -@@ -81,6 +88,7 @@ - device_type = "cpu"; - reg = <0>; - enable-method = "psci"; -+ next-level-cache = <&L2>; - }; - - cpu1: cpu@1 { -@@ -88,6 +96,7 @@ - device_type = "cpu"; - reg = <1>; - enable-method = "psci"; -+ next-level-cache = <&L2>; - }; - - cpu2: cpu@2 { -@@ -95,6 +104,7 @@ - device_type = "cpu"; - reg = <2>; - enable-method = "psci"; -+ next-level-cache = <&L2>; - }; - - cpu3: cpu@3 { -@@ -102,7 +112,20 @@ - device_type = "cpu"; - reg = <3>; - enable-method = "psci"; -+ next-level-cache = <&L2>; - }; -+ -+ L2: l2-cache { -+ compatible = "cache"; -+ cache-level = <2>; -+ }; -+ }; -+ -+ de: display-engine { -+ compatible = "allwinner,sun50i-a64-display-engine"; -+ allwinner,pipelines = <&mixer0>, -+ <&mixer1>; -+ status = "disabled"; - }; - - osc24M: osc24M_clk { -@@ -168,10 +191,92 @@ - #size-cells = <1>; - ranges; - -+ de2@1000000 { -+ compatible = "allwinner,sun50i-a64-de2"; -+ reg = <0x1000000 0x400000>; -+ allwinner,sram = <&de2_sram 1>; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ ranges = <0 0x1000000 0x400000>; -+ -+ display_clocks: clock@0 { -+ compatible = "allwinner,sun50i-a64-de2-clk"; -+ reg = <0x0 0x100000>; -+ clocks = <&ccu CLK_DE>, -+ <&ccu CLK_BUS_DE>; -+ clock-names = "mod", -+ "bus"; -+ resets = <&ccu RST_BUS_DE>; -+ #clock-cells = <1>; -+ #reset-cells = <1>; -+ }; -+ -+ mixer0: mixer@100000 { -+ compatible = "allwinner,sun50i-a64-de2-mixer-0"; -+ reg = <0x100000 0x100000>; -+ clocks = <&display_clocks CLK_BUS_MIXER0>, -+ <&display_clocks CLK_MIXER0>; -+ clock-names = "bus", -+ "mod"; -+ resets = <&display_clocks RST_MIXER0>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ mixer0_out: port@1 { -+ reg = <1>; -+ -+ mixer0_out_tcon0: endpoint { -+ remote-endpoint = <&tcon0_in_mixer0>; -+ }; -+ }; -+ }; -+ }; -+ -+ mixer1: mixer@200000 { -+ compatible = "allwinner,sun50i-a64-de2-mixer-1"; -+ reg = <0x200000 0x100000>; -+ clocks = <&display_clocks CLK_BUS_MIXER1>, -+ <&display_clocks CLK_MIXER1>; -+ clock-names = "bus", -+ "mod"; -+ resets = <&display_clocks RST_MIXER1>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ mixer1_out: port@1 { -+ reg = <1>; -+ -+ mixer1_out_tcon1: endpoint { -+ remote-endpoint = <&tcon1_in_mixer1>; -+ }; -+ }; -+ }; -+ }; -+ }; -+ - syscon: syscon@1c00000 { -- compatible = "allwinner,sun50i-a64-system-controller", -- "syscon"; -+ compatible = "allwinner,sun50i-a64-system-control"; - reg = <0x01c00000 0x1000>; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ ranges; -+ -+ sram_c: sram@18000 { -+ compatible = "mmio-sram"; -+ reg = <0x00018000 0x28000>; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ ranges = <0 0x00018000 0x28000>; -+ -+ de2_sram: sram-section@0 { -+ compatible = "allwinner,sun50i-a64-sram-c"; -+ reg = <0x0000 0x28000>; -+ }; -+ }; - }; - - dma: dma-controller@1c02000 { -@@ -185,6 +290,75 @@ - #dma-cells = <1>; - }; - -+ tcon0: lcd-controller@1c0c000 { -+ compatible = "allwinner,sun50i-a64-tcon-lcd", -+ "allwinner,sun8i-a83t-tcon-lcd"; -+ reg = <0x01c0c000 0x1000>; -+ interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>; -+ clocks = <&ccu CLK_BUS_TCON0>, <&ccu CLK_TCON0>; -+ clock-names = "ahb", "tcon-ch0"; -+ clock-output-names = "tcon-pixel-clock"; -+ resets = <&ccu RST_BUS_TCON0>, <&ccu RST_BUS_LVDS>; -+ reset-names = "lcd", "lvds"; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ tcon0_in: port@0 { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <0>; -+ -+ tcon0_in_mixer0: endpoint@0 { -+ reg = <0>; -+ remote-endpoint = <&mixer0_out_tcon0>; -+ }; -+ }; -+ -+ tcon0_out: port@1 { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <1>; -+ }; -+ }; -+ }; -+ -+ tcon1: lcd-controller@1c0d000 { -+ compatible = "allwinner,sun50i-a64-tcon-tv", -+ "allwinner,sun8i-a83t-tcon-tv"; -+ reg = <0x01c0d000 0x1000>; -+ interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>; -+ clocks = <&ccu CLK_BUS_TCON1>, <&ccu CLK_TCON1>; -+ clock-names = "ahb", "tcon-ch1"; -+ resets = <&ccu RST_BUS_TCON1>; -+ reset-names = "lcd"; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ tcon1_in: port@0 { -+ reg = <0>; -+ -+ tcon1_in_mixer1: endpoint { -+ remote-endpoint = <&mixer1_out_tcon1>; -+ }; -+ }; -+ -+ tcon1_out: port@1 { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <1>; -+ -+ tcon1_out_hdmi: endpoint@1 { -+ reg = <1>; -+ remote-endpoint = <&hdmi_in_tcon1>; -+ }; -+ }; -+ }; -+ }; -+ - mmc0: mmc@1c0f000 { - compatible = "allwinner,sun50i-a64-mmc"; - reg = <0x01c0f000 0x1000>; -@@ -227,6 +401,11 @@ - #size-cells = <0>; - }; - -+ sid: eeprom@1c14000 { -+ compatible = "allwinner,sun50i-a64-sid"; -+ reg = <0x1c14000 0x400>; -+ }; -+ - usb_otg: usb@1c19000 { - compatible = "allwinner,sun8i-a33-musb"; - reg = <0x01c19000 0x0400>; -@@ -356,7 +535,7 @@ - }; - - mmc2_pins: mmc2-pins { -- pins = "PC1", "PC5", "PC6", "PC8", "PC9", -+ pins = "PC5", "PC6", "PC8", "PC9", - "PC10","PC11", "PC12", "PC13", - "PC14", "PC15", "PC16"; - function = "mmc2"; -@@ -364,6 +543,18 @@ - bias-pull-up; - }; - -+ mmc2_ds_pin: mmc2-ds-pin { -+ pins = "PC1"; -+ function = "mmc2"; -+ drive-strength = <30>; -+ bias-pull-up; -+ }; -+ -+ pwm_pin: pwm_pin { -+ pins = "PD22"; -+ function = "pwm"; -+ }; -+ - rmii_pins: rmii_pins { - pins = "PD10", "PD11", "PD13", "PD14", "PD17", - "PD18", "PD19", "PD20", "PD22", "PD23"; -@@ -394,7 +585,7 @@ - function = "spi1"; - }; - -- uart0_pins_a: uart0 { -+ uart0_pb_pins: uart0-pb-pins { - pins = "PB8", "PB9"; - function = "uart0"; - }; -@@ -474,15 +665,6 @@ - status = "disabled"; - }; - -- pwm: pwm@1c21400 { -- compatible = "allwinner,sun50i-a64-pwm", -- "allwinner,sun5i-a13-pwm"; -- reg = <0x01c21400 0x8>; -- clocks = <&osc24M>; -- #pwm-cells = <3>; -- status = "disabled"; -- }; -- - uart0: serial@1c28000 { - compatible = "snps,dw-apb-uart"; - reg = <0x01c28000 0x400>; -@@ -617,8 +799,6 @@ - clocks = <&ccu CLK_BUS_EMAC>; - clock-names = "stmmaceth"; - status = "disabled"; -- #address-cells = <1>; -- #size-cells = <0>; - - mdio: mdio { - compatible = "snps,dwmac-mdio"; -@@ -638,11 +818,69 @@ - #interrupt-cells = <3>; - }; - -+ pwm: pwm@1c21400 { -+ compatible = "allwinner,sun50i-a64-pwm", -+ "allwinner,sun5i-a13-pwm"; -+ reg = <0x01c21400 0x400>; -+ clocks = <&osc24M>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pwm_pin>; -+ #pwm-cells = <3>; -+ status = "disabled"; -+ }; -+ -+ hdmi: hdmi@1ee0000 { -+ compatible = "allwinner,sun50i-a64-dw-hdmi", -+ "allwinner,sun8i-a83t-dw-hdmi"; -+ reg = <0x01ee0000 0x10000>; -+ reg-io-width = <1>; -+ interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>; -+ clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>, -+ <&ccu CLK_HDMI>; -+ clock-names = "iahb", "isfr", "tmds"; -+ resets = <&ccu RST_BUS_HDMI1>; -+ reset-names = "ctrl"; -+ phys = <&hdmi_phy>; -+ phy-names = "hdmi-phy"; -+ status = "disabled"; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ hdmi_in: port@0 { -+ reg = <0>; -+ -+ hdmi_in_tcon1: endpoint { -+ remote-endpoint = <&tcon1_out_hdmi>; -+ }; -+ }; -+ -+ hdmi_out: port@1 { -+ reg = <1>; -+ }; -+ }; -+ }; -+ -+ hdmi_phy: hdmi-phy@1ef0000 { -+ compatible = "allwinner,sun50i-a64-hdmi-phy"; -+ reg = <0x01ef0000 0x10000>; -+ clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>, -+ <&ccu 7>; -+ clock-names = "bus", "mod", "pll-0"; -+ resets = <&ccu RST_BUS_HDMI0>; -+ reset-names = "phy"; -+ #phy-cells = <0>; -+ }; -+ - rtc: rtc@1f00000 { - compatible = "allwinner,sun6i-a31-rtc"; - reg = <0x01f00000 0x54>; - interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>; -+ clock-output-names = "rtc-osc32k", "rtc-osc32k-out"; -+ clocks = <&osc32k>; -+ #clock-cells = <1>; - }; - - r_intc: interrupt-controller@1f00c00 { -@@ -664,6 +902,29 @@ - #reset-cells = <1>; - }; - -+ r_i2c: i2c@1f02400 { -+ compatible = "allwinner,sun50i-a64-i2c", -+ "allwinner,sun6i-a31-i2c"; -+ reg = <0x01f02400 0x400>; -+ interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; -+ clocks = <&r_ccu CLK_APB0_I2C>; -+ resets = <&r_ccu RST_APB0_I2C>; -+ status = "disabled"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ }; -+ -+ r_pwm: pwm@1f03800 { -+ compatible = "allwinner,sun50i-a64-pwm", -+ "allwinner,sun5i-a13-pwm"; -+ reg = <0x01f03800 0x400>; -+ clocks = <&osc24M>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&r_pwm_pin>; -+ #pwm-cells = <3>; -+ status = "disabled"; -+ }; -+ - r_pio: pinctrl@1f02c00 { - compatible = "allwinner,sun50i-a64-r-pinctrl"; - reg = <0x01f02c00 0x400>; -@@ -675,6 +936,16 @@ - interrupt-controller; - #interrupt-cells = <3>; - -+ r_i2c_pl89_pins: r-i2c-pl89-pins { -+ pins = "PL8", "PL9"; -+ function = "s_i2c"; -+ }; -+ -+ r_pwm_pin: pwm { -+ pins = "PL10"; -+ function = "s_pwm"; -+ }; -+ - r_rsb_pins: rsb { - pins = "PL0", "PL1"; - function = "s_rsb"; --- -2.11.0 - diff --git a/gnu/packages/patches/u-boot-pinebook-dts.patch b/gnu/packages/patches/u-boot-pinebook-dts.patch deleted file mode 100644 index 48c004fdfc..0000000000 --- a/gnu/packages/patches/u-boot-pinebook-dts.patch +++ /dev/null @@ -1,388 +0,0 @@ -From b972831c3cd24f3c9bb0995ed61db8f8239f3391 Mon Sep 17 00:00:00 2001 -From: Vasily Khoruzhick <anarsoul@gmail.com> -Date: Mon, 5 Nov 2018 20:24:31 -0800 -Subject: [PATCH 10/13] sunxi: DT: add support for Pinebook - -Pinebook is a laptop produced by Pine64, with USB-connected keyboard, -USB-connected touchpad and an eDP LCD panel connected via a RGB-eDP -bridge from Analogix. - -Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> -Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> -Tested-by: Maxime Ripard <maxime.ripard@bootlin.com> -Cc: Vagrant Cascadian <vagrant@debian.org> -Reviewed-by: Jagan Teki <jagan@openedev.com> ---- - arch/arm/dts/Makefile | 1 + - arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi | 15 ++ - arch/arm/dts/sun50i-a64-pinebook.dts | 294 +++++++++++++++++++++++++++ - configs/pinebook_defconfig | 22 ++ - 4 files changed, 332 insertions(+) - create mode 100644 arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi - create mode 100644 arch/arm/dts/sun50i-a64-pinebook.dts - create mode 100644 configs/pinebook_defconfig - -diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index 3093c1185e..eae6b9ee5d 100644 ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -406,6 +406,7 @@ dtb-$(CONFIG_MACH_SUN50I) += \ - sun50i-a64-orangepi-win.dtb \ - sun50i-a64-pine64-plus.dtb \ - sun50i-a64-pine64.dtb \ -+ sun50i-a64-pinebook.dtb \ - sun50i-a64-sopine-baseboard.dtb - dtb-$(CONFIG_MACH_SUN9I) += \ - sun9i-a80-optimus.dtb \ -diff --git a/arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi b/arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi -new file mode 100644 -index 0000000000..a99b7171d0 ---- /dev/null -+++ b/arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi -@@ -0,0 +1,15 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (C) 2018 Vasily Khoruzhick <anarsoul@gmail.com> -+ * -+ */ -+ -+/* The ANX6345 eDP-bridge is on r_i2c */ -+&r_i2c { -+ anx6345: edp-bridge@38 { -+ compatible = "analogix,anx6345"; -+ reg = <0x38>; -+ reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */ -+ status = "okay"; -+ }; -+}; -diff --git a/arch/arm/dts/sun50i-a64-pinebook.dts b/arch/arm/dts/sun50i-a64-pinebook.dts -new file mode 100644 -index 0000000000..ec537c5297 ---- /dev/null -+++ b/arch/arm/dts/sun50i-a64-pinebook.dts -@@ -0,0 +1,294 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.xyz> -+ * Copyright (C) 2018 Vasily Khoruzhick <anarsoul@gmail.com> -+ * -+ */ -+ -+/dts-v1/; -+ -+#include "sun50i-a64.dtsi" -+ -+#include <dt-bindings/gpio/gpio.h> -+#include <dt-bindings/input/input.h> -+#include <dt-bindings/pwm/pwm.h> -+ -+/ { -+ model = "Pinebook"; -+ compatible = "pine64,pinebook", "allwinner,sun50i-a64"; -+ -+ aliases { -+ serial0 = &uart0; -+ ethernet0 = &rtl8723cs; -+ }; -+ -+ vdd_bl: regulator@0 { -+ compatible = "regulator-fixed"; -+ regulator-name = "bl-3v3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ -+ enable-active-high; -+ }; -+ -+ backlight: backlight { -+ compatible = "pwm-backlight"; -+ pwms = <&pwm 0 50000 0>; -+ brightness-levels = <0 5 10 15 20 30 40 55 70 85 100>; -+ default-brightness-level = <2>; -+ enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */ -+ power-supply = <&vdd_bl>; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ -+ framebuffer-lcd { -+ panel-supply = <®_dc1sw>; -+ dvdd25-supply = <®_dldo2>; -+ dvdd12-supply = <®_fldo1>; -+ }; -+ }; -+ -+ gpio_keys { -+ compatible = "gpio-keys"; -+ -+ lid_switch { -+ label = "Lid Switch"; -+ gpios = <&r_pio 0 12 GPIO_ACTIVE_LOW>; /* PL12 */ -+ linux,input-type = <EV_SW>; -+ linux,code = <SW_LID>; -+ linux,can-disable; -+ wakeup-source; -+ }; -+ }; -+ -+ reg_vcc3v3: vcc3v3 { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc3v3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ }; -+ -+ wifi_pwrseq: wifi_pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ -+ }; -+}; -+ -+&ehci0 { -+ phys = <&usbphy 0>; -+ phy-names = "usb"; -+ status = "okay"; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&mmc0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc0_pins>; -+ vmmc-supply = <®_dcdc1>; -+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; -+ disable-wp; -+ bus-width = <4>; -+ status = "okay"; -+}; -+ -+&mmc1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc1_pins>; -+ vmmc-supply = <®_dldo4>; -+ vqmmc-supply = <®_eldo1>; -+ mmc-pwrseq = <&wifi_pwrseq>; -+ bus-width = <4>; -+ non-removable; -+ status = "okay"; -+ -+ rtl8723cs: wifi@1 { -+ reg = <1>; -+ }; -+}; -+ -+&mmc2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>; -+ vmmc-supply = <®_dcdc1>; -+ vqmmc-supply = <®_eldo1>; -+ bus-width = <8>; -+ non-removable; -+ cap-mmc-hw-reset; -+ mmc-hs200-1_8v; -+ status = "okay"; -+}; -+ -+&ohci0 { -+ phys = <&usbphy 0>; -+ phy-names = "usb"; -+ status = "okay"; -+}; -+ -+&ohci1 { -+ status = "okay"; -+}; -+ -+&pwm { -+ status = "okay"; -+}; -+ -+&r_rsb { -+ status = "okay"; -+ -+ axp803: pmic@3a3 { -+ compatible = "x-powers,axp803"; -+ reg = <0x3a3>; -+ interrupt-parent = <&r_intc>; -+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -+ }; -+}; -+ -+/* The ANX6345 eDP-bridge is on r_i2c */ -+&r_i2c { -+ clock-frequency = <100000>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&r_i2c_pl89_pins>; -+ status = "okay"; -+}; -+ -+#include "axp803.dtsi" -+ -+®_aldo1 { -+ regulator-min-microvolt = <2800000>; -+ regulator-max-microvolt = <2800000>; -+ regulator-name = "vcc-csi"; -+}; -+ -+®_aldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-pl"; -+}; -+ -+®_aldo3 { -+ regulator-always-on; -+ regulator-min-microvolt = <2700000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-pll-avcc"; -+}; -+ -+®_dc1sw { -+ regulator-name = "vcc-lcd"; -+}; -+ -+®_dcdc1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-3v3"; -+}; -+ -+®_dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1300000>; -+ regulator-name = "vdd-cpux"; -+}; -+ -+/* DCDC3 is polyphased with DCDC2 */ -+ -+®_dcdc5 { -+ regulator-always-on; -+ regulator-min-microvolt = <1200000>; -+ regulator-max-microvolt = <1200000>; -+ regulator-name = "vcc-dram"; -+}; -+ -+®_dcdc6 { -+ regulator-always-on; -+ regulator-min-microvolt = <1100000>; -+ regulator-max-microvolt = <1100000>; -+ regulator-name = "vdd-sys"; -+}; -+ -+®_dldo1 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-hdmi"; -+}; -+ -+®_dldo2 { -+ regulator-min-microvolt = <2500000>; -+ regulator-max-microvolt = <2500000>; -+ regulator-name = "vcc-edp"; -+}; -+ -+®_dldo3 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "avdd-csi"; -+}; -+ -+®_dldo4 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-wifi"; -+}; -+ -+®_eldo1 { -+ regulator-always-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-name = "cpvdd"; -+}; -+ -+®_eldo3 { -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-name = "vdd-1v8-csi"; -+}; -+ -+®_fldo1 { -+ regulator-min-microvolt = <1200000>; -+ regulator-max-microvolt = <1200000>; -+ regulator-name = "vcc-1v2-hsic"; -+}; -+ -+®_fldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1100000>; -+ regulator-max-microvolt = <1100000>; -+ regulator-name = "vdd-cpus"; -+}; -+ -+®_ldo_io0 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-usb"; -+ status = "okay"; -+}; -+ -+®_rtc_ldo { -+ regulator-name = "vcc-rtc"; -+}; -+ -+&simplefb_hdmi { -+ vcc-hdmi-supply = <®_dldo1>; -+}; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pb_pins>; -+ status = "okay"; -+}; -+ -+&usb_otg { -+ dr_mode = "host"; -+}; -+ -+&usbphy { -+ usb0_vbus-supply = <®_ldo_io0>; -+ usb1_vbus-supply = <®_ldo_io0>; -+ status = "okay"; -+}; -diff --git a/configs/pinebook_defconfig b/configs/pinebook_defconfig -new file mode 100644 -index 0000000000..5294dbd2eb ---- /dev/null -+++ b/configs/pinebook_defconfig -@@ -0,0 +1,22 @@ -+CONFIG_ARM=y -+CONFIG_ARCH_SUNXI=y -+CONFIG_SPL=y -+CONFIG_MACH_SUN50I=y -+CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y -+CONFIG_DRAM_CLK=552 -+CONFIG_DRAM_ZQ=3881949 -+CONFIG_MMC_SUNXI_SLOT_EXTRA=2 -+CONFIG_R_I2C_ENABLE=y -+# CONFIG_CMD_FLASH is not set -+# CONFIG_SPL_DOS_PARTITION is not set -+# CONFIG_SPL_EFI_PARTITION is not set -+CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pinebook" -+CONFIG_DM_REGULATOR=y -+CONFIG_DM_REGULATOR_FIXED=y -+CONFIG_DM_PWM=y -+CONFIG_PWM_SUNXI=y -+CONFIG_USB_EHCI_HCD=y -+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y -+# CONFIG_USB_GADGET is not set -+CONFIG_VIDEO_BRIDGE=y -+CONFIG_VIDEO_BRIDGE_ANALOGIX_ANX6345=y --- -2.11.0 - diff --git a/gnu/packages/patches/u-boot-pinebook-mmc-calibration.patch b/gnu/packages/patches/u-boot-pinebook-mmc-calibration.patch deleted file mode 100644 index 118bdf8e0c..0000000000 --- a/gnu/packages/patches/u-boot-pinebook-mmc-calibration.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 20940ef2a397446a209350900d3bd618c3fd5b94 Mon Sep 17 00:00:00 2001 -From: Vasily Khoruzhick <anarsoul@gmail.com> -Date: Mon, 5 Nov 2018 20:24:28 -0800 -Subject: [PATCH 07/13] mmc: sunxi: add support for automatic delay calibration - -A64 and H6 support automatic delay calibration and Linux driver uses it -instead of hardcoded delays. Add support for it to u-boot driver. - -Fixes eMMC instability on Pinebook - -Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> -Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> -Tested-by: Maxime Ripard <maxime.ripard@bootlin.com> -Reviewed-by: Andre Przywara <andre.przywara@arm.com> -Cc: Vagrant Cascadian <vagrant@debian.org> -Reviewed-by: Jagan Teki <jagan@openedev.com> ---- - arch/arm/include/asm/arch-sunxi/mmc.h | 6 +++++- - drivers/mmc/sunxi_mmc.c | 21 ++++++++++++++++++++- - 2 files changed, 25 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/include/asm/arch-sunxi/mmc.h b/arch/arm/include/asm/arch-sunxi/mmc.h -index d98c53faaa..f2deafddd2 100644 ---- a/arch/arm/include/asm/arch-sunxi/mmc.h -+++ b/arch/arm/include/asm/arch-sunxi/mmc.h -@@ -46,7 +46,9 @@ struct sunxi_mmc { - u32 cbda; /* 0x94 */ - u32 res2[26]; - #if defined(CONFIG_SUNXI_GEN_SUN6I) || defined(CONFIG_MACH_SUN50I_H6) -- u32 res3[64]; -+ u32 res3[17]; -+ u32 samp_dl; -+ u32 res4[46]; - #endif - u32 fifo; /* 0x100 / 0x200 FIFO access address */ - }; -@@ -130,5 +132,7 @@ struct sunxi_mmc { - #define SUNXI_MMC_COMMON_CLK_GATE (1 << 16) - #define SUNXI_MMC_COMMON_RESET (1 << 18) - -+#define SUNXI_MMC_CAL_DL_SW_EN (0x1 << 7) -+ - struct mmc *sunxi_mmc_init(int sdc_no); - #endif /* _SUNXI_MMC_H */ -diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c -index 39f15eb423..147eb9b4d5 100644 ---- a/drivers/mmc/sunxi_mmc.c -+++ b/drivers/mmc/sunxi_mmc.c -@@ -99,11 +99,16 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz) - { - unsigned int pll, pll_hz, div, n, oclk_dly, sclk_dly; - bool new_mode = false; -+ bool calibrate = false; - u32 val = 0; - - if (IS_ENABLED(CONFIG_MMC_SUNXI_HAS_NEW_MODE) && (priv->mmc_no == 2)) - new_mode = true; - -+#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN50I_H6) -+ calibrate = true; -+#endif -+ - /* - * The MMC clock has an extra /2 post-divider when operating in the new - * mode. -@@ -174,7 +179,11 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz) - val = CCM_MMC_CTRL_MODE_SEL_NEW; - setbits_le32(&priv->reg->ntsr, SUNXI_MMC_NTSR_MODE_SEL_NEW); - #endif -- } else { -+ } else if (!calibrate) { -+ /* -+ * Use hardcoded delay values if controller doesn't support -+ * calibration -+ */ - val = CCM_MMC_CTRL_OCLK_DLY(oclk_dly) | - CCM_MMC_CTRL_SCLK_DLY(sclk_dly); - } -@@ -228,6 +237,16 @@ static int mmc_config_clock(struct sunxi_mmc_priv *priv, struct mmc *mmc) - rval &= ~SUNXI_MMC_CLK_DIVIDER_MASK; - writel(rval, &priv->reg->clkcr); - -+#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN50I_H6) -+ /* A64 supports calibration of delays on MMC controller and we -+ * have to set delay of zero before starting calibration. -+ * Allwinner BSP driver sets a delay only in the case of -+ * using HS400 which is not supported by mainline U-Boot or -+ * Linux at the moment -+ */ -+ writel(SUNXI_MMC_CAL_DL_SW_EN, &priv->reg->samp_dl); -+#endif -+ - /* Re-enable Clock */ - rval |= SUNXI_MMC_CLK_ENABLE; - writel(rval, &priv->reg->clkcr); --- -2.11.0 - diff --git a/gnu/packages/patches/u-boot-pinebook-r_i2c-controller.patch b/gnu/packages/patches/u-boot-pinebook-r_i2c-controller.patch deleted file mode 100644 index 824a16b9db..0000000000 --- a/gnu/packages/patches/u-boot-pinebook-r_i2c-controller.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 31a4ac4d79d75baeede3edfa95515fd4169ef502 Mon Sep 17 00:00:00 2001 -From: Vasily Khoruzhick <anarsoul@gmail.com> -Date: Mon, 5 Nov 2018 20:24:30 -0800 -Subject: [PATCH 09/13] sun50i: A64: add support for R_I2C controller - -Allwinner A64 has a I2C controller, which is in the R_ MMIO zone and has -two groups of pinmuxes on PL bank, so it's called R_I2C. - -Add support for this I2C controller and the pinmux which doesn't conflict -with RSB. - -Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> -Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> -Tested-by: Maxime Ripard <maxime.ripard@bootlin.com> -Cc: Vagrant Cascadian <vagrant@debian.org> -Acked-by: Jagan Teki <jagan@openedev.com> ---- - arch/arm/include/asm/arch-sunxi/gpio.h | 1 + - arch/arm/mach-sunxi/Kconfig | 1 + - board/sunxi/board.c | 6 ++++++ - 3 files changed, 8 insertions(+) - -diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h b/arch/arm/include/asm/arch-sunxi/gpio.h -index 6a5eafc3d3..2daf23f6f5 100644 ---- a/arch/arm/include/asm/arch-sunxi/gpio.h -+++ b/arch/arm/include/asm/arch-sunxi/gpio.h -@@ -211,6 +211,7 @@ enum sunxi_gpio_number { - #define SUN8I_H3_GPL_R_TWI 2 - #define SUN8I_A23_GPL_R_TWI 3 - #define SUN8I_GPL_R_UART 2 -+#define SUN50I_GPL_R_TWI 2 - - #define SUN9I_GPN_R_RSB 3 - -diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig -index 6277abc3cc..560dc9b25d 100644 ---- a/arch/arm/mach-sunxi/Kconfig -+++ b/arch/arm/mach-sunxi/Kconfig -@@ -278,6 +278,7 @@ config MACH_SUN50I - select ARM64 - select DM_I2C - select PHY_SUN4I_USB -+ select SUN6I_PRCM - select SUNXI_DE2 - select SUNXI_GEN_SUN6I - select SUPPORT_SPL -diff --git a/board/sunxi/board.c b/board/sunxi/board.c -index b196d48674..64ccbc7245 100644 ---- a/board/sunxi/board.c -+++ b/board/sunxi/board.c -@@ -168,10 +168,16 @@ void i2c_init_board(void) - #endif - - #ifdef CONFIG_R_I2C_ENABLE -+#ifdef CONFIG_MACH_SUN50I -+ clock_twi_onoff(5, 1); -+ sunxi_gpio_set_cfgpin(SUNXI_GPL(8), SUN50I_GPL_R_TWI); -+ sunxi_gpio_set_cfgpin(SUNXI_GPL(9), SUN50I_GPL_R_TWI); -+#else - clock_twi_onoff(5, 1); - sunxi_gpio_set_cfgpin(SUNXI_GPL(0), SUN8I_H3_GPL_R_TWI); - sunxi_gpio_set_cfgpin(SUNXI_GPL(1), SUN8I_H3_GPL_R_TWI); - #endif -+#endif - } - - #if defined(CONFIG_ENV_IS_IN_MMC) && defined(CONFIG_ENV_IS_IN_FAT) --- -2.11.0 - diff --git a/gnu/packages/patches/u-boot-pinebook-syscon-node.patch b/gnu/packages/patches/u-boot-pinebook-syscon-node.patch deleted file mode 100644 index 9289645bec..0000000000 --- a/gnu/packages/patches/u-boot-pinebook-syscon-node.patch +++ /dev/null @@ -1,38 +0,0 @@ -From ababb5920e8992c9bb7956df3cc85dc68d27dfe8 Mon Sep 17 00:00:00 2001 -From: Andre Przywara <andre.przywara@arm.com> -Date: Mon, 29 Oct 2018 00:56:48 +0000 -Subject: [PATCH 04/13] sunxi: A64: Re-add syscon to DT node - -The sun50i-a64.dtsi changes introduced in Linux v4.19-rc1 changed the -compatible name for the syscon controller, dropping the generic "syscon" -fallback. Using this new DT node will make the Ethernet driver in every -older kernel (or non-Linux kernels) fail to initialise the MAC device. - -To allow booting distribution kernels (from installer images via UEFI, -for instance), re-add the syscon compatible string as a fallback. This -works with both older and newer kernels. - -Signed-off-by: Andre Przywara <andre.przywara@arm.com> -Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> -Reviewed-by: Jagan Teki <jagan@openedev.com> ---- - arch/arm/dts/sun50i-a64.dtsi | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/dts/sun50i-a64.dtsi b/arch/arm/dts/sun50i-a64.dtsi -index f3a66f8882..ff41abc96a 100644 ---- a/arch/arm/dts/sun50i-a64.dtsi -+++ b/arch/arm/dts/sun50i-a64.dtsi -@@ -259,7 +259,8 @@ - }; - - syscon: syscon@1c00000 { -- compatible = "allwinner,sun50i-a64-system-control"; -+ compatible = "allwinner,sun50i-a64-system-control", -+ "syscon"; - reg = <0x01c00000 0x1000>; - #address-cells = <1>; - #size-cells = <1>; --- -2.11.0 - diff --git a/gnu/packages/patches/u-boot-pinebook-video-bridge.patch b/gnu/packages/patches/u-boot-pinebook-video-bridge.patch deleted file mode 100644 index 8c6ca8a992..0000000000 --- a/gnu/packages/patches/u-boot-pinebook-video-bridge.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 8336a43792a103c13d939b3925cb75322911f7fb Mon Sep 17 00:00:00 2001 -From: Vasily Khoruzhick <anarsoul@gmail.com> -Date: Mon, 5 Nov 2018 20:24:29 -0800 -Subject: [PATCH 08/13] dm: video: bridge: don't fail to activate bridge if - reset or sleep GPIO is missing - -Both GPIOs are optional, so we shouldn't fail if any is missing. -Without this fix reset is not deasserted if sleep GPIO is missing. - -Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> -Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> -Tested-by: Maxime Ripard <maxime.ripard@bootlin.com> -Reviewed-by: Andre Przywara <andre.przywara@arm.com> -Cc: Vagrant Cascadian <vagrant@debian.org> ---- - drivers/video/bridge/video-bridge-uclass.c | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) - -diff --git a/drivers/video/bridge/video-bridge-uclass.c b/drivers/video/bridge/video-bridge-uclass.c -index cd4959cc71..5fecb4cfd5 100644 ---- a/drivers/video/bridge/video-bridge-uclass.c -+++ b/drivers/video/bridge/video-bridge-uclass.c -@@ -106,13 +106,19 @@ static int video_bridge_pre_probe(struct udevice *dev) - int video_bridge_set_active(struct udevice *dev, bool active) - { - struct video_bridge_priv *uc_priv = dev_get_uclass_priv(dev); -- int ret; -+ int ret = 0; - - debug("%s: %d\n", __func__, active); -- ret = dm_gpio_set_value(&uc_priv->sleep, !active); -- if (ret) -- return ret; -- if (active) { -+ if (uc_priv->sleep.dev) { -+ ret = dm_gpio_set_value(&uc_priv->sleep, !active); -+ if (ret) -+ return ret; -+ } -+ -+ if (!active) -+ return 0; -+ -+ if (uc_priv->reset.dev) { - ret = dm_gpio_set_value(&uc_priv->reset, true); - if (ret) - return ret; --- -2.11.0 - diff --git a/gnu/packages/patches/unrtf-CVE-2016-10091.patch b/gnu/packages/patches/unrtf-CVE-2016-10091.patch deleted file mode 100644 index badd1b8ed6..0000000000 --- a/gnu/packages/patches/unrtf-CVE-2016-10091.patch +++ /dev/null @@ -1,189 +0,0 @@ -Fix CVE-2016-10091 (stack-based buffer overflows in cmd_* functions): - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10091 -https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=849705 -http://seclists.org/oss-sec/2016/q4/787 - -Patch adapted from Debian: - -https://anonscm.debian.org/cgit/collab-maint/unrtf.git/commit/?h=jessie&id=7500a48fb0fbad3ab963fb17560b2f90a8a485c8 - -The Debian patch adapts this upstream commit so that it can be applied -to the 0.21.9 release tarball: - -http://hg.savannah.gnu.org/hgweb/unrtf/rev/3b16893a6406 - -From 7dd568ed8a6a5acb6c04f2b40f457d63a00435f3 Mon Sep 17 00:00:00 2001 -From: Willi Mann <willi@debian.org> -Date: Sat, 31 Dec 2016 20:31:38 +0100 -Subject: [PATCH] Add patch from upstream to fix CVE-2016-10091 (buffer - overflow in various cmd_ functions) - -diff --git a/src/attr.c b/src/attr.c -index 02b5c81..e2951ea 100644 ---- a/src/attr.c -+++ b/src/attr.c -@@ -746,7 +746,7 @@ char * - assemble_string(char *string, int nr) - { - -- char *s, tmp[12];/* Number of characters that can be in int type (including '\0') - AF */ -+ char *s, tmp[20]; - int i = 0, j = 0; - - if (string == NULL) -@@ -762,7 +762,7 @@ assemble_string(char *string, int nr) - } - - if (string[i] != '\0') { -- sprintf(tmp, "%d", nr); -+ snprintf(tmp, 20, "%d", nr); - strcpy(&s[j], tmp); - j = j + strlen(tmp); - } -diff --git a/src/convert.c b/src/convert.c -index c76d7d6..8eacdcb 100644 ---- a/src/convert.c -+++ b/src/convert.c -@@ -472,7 +472,7 @@ static const int fcharsetparmtocp(int parm) - } - - // Translate code page to encoding name hopefully suitable as iconv input --static char *cptoencoding(parm) -+static char *cptoencoding(int parm) - { - // Note that CP0 is supposed to mean current system default, which does - // not make any sense as a stored value, we don't handle it. -@@ -964,7 +964,7 @@ cmd_cf (Word *w, int align, char has_param, int num) - } - else - { -- sprintf(str,"#%02x%02x%02x", -+ snprintf(str, 40, "#%02x%02x%02x", - color_table[num].r, - color_table[num].g, - color_table[num].b); -@@ -993,7 +993,7 @@ cmd_cb (Word *w, int align, char has_param, int num) - } - else - { -- sprintf(str,"#%02x%02x%02x", -+ snprintf(str, 40, "#%02x%02x%02x", - color_table[num].r, - color_table[num].g, - color_table[num].b); -@@ -1018,7 +1018,7 @@ cmd_fs (Word *w, int align, char has_param, int points) { - /* Note, fs20 means 10pt */ - points /= 2; - -- sprintf(str,"%d",points); -+ snprintf(str, 20, "%d", points); - attr_push(ATTR_FONTSIZE,str); - - return FALSE; -@@ -1166,7 +1166,7 @@ cmd_f (Word *w, int align, char has_param, int num) - { - // TOBEDONE: WHAT'S THIS ??? - name = my_malloc(12); -- sprintf(name, "%d", num); -+ snprintf(name, 12, "%d", num); - } - - /* we are going to output entities, so should not output font */ -@@ -1218,7 +1218,7 @@ cmd_highlight (Word *w, int align, char has_param, int num) - } - else - { -- sprintf(str,"#%02x%02x%02x", -+ snprintf(str, 40, "#%02x%02x%02x", - color_table[num].r, - color_table[num].g, - color_table[num].b); -@@ -1373,9 +1373,9 @@ cmd_ftech (Word *w, int align, char has_param, int param) { - - static int - cmd_expand (Word *w, int align, char has_param, int param) { -- char str[10]; -+ char str[20]; - if (has_param) { -- sprintf(str, "%d", param/4); -+ snprintf(str, 20, "%d", param / 4); - if (!param) - attr_pop(ATTR_EXPAND); - else -@@ -1394,7 +1394,7 @@ cmd_expand (Word *w, int align, char has_param, int param) { - - static int - cmd_emboss (Word *w, int align, char has_param, int param) { -- char str[10]; -+ char str[20]; - if (has_param && !param) - #ifdef SUPPORT_UNNESTED - attr_find_pop(ATTR_EMBOSS); -@@ -1403,7 +1403,7 @@ cmd_emboss (Word *w, int align, char has_param, int param) { - #endif - else - { -- sprintf(str, "%d", param); -+ snprintf(str, 20, "%d", param); - attr_push(ATTR_EMBOSS, str); - } - return FALSE; -@@ -1419,12 +1419,12 @@ cmd_emboss (Word *w, int align, char has_param, int param) { - - static int - cmd_engrave (Word *w, int align, char has_param, int param) { -- char str[10]; -+ char str[20]; - if (has_param && !param) - attr_pop(ATTR_ENGRAVE); - else - { -- sprintf(str, "%d", param); -+ snprintf(str, 20, "%d", param); - attr_push(ATTR_ENGRAVE, str); - } - return FALSE; -@@ -1976,7 +1976,7 @@ static int cmd_u (Word *w, int align, char has_param, int param) { - - short done=0; - long unicode_number = (long) param; /* On 16bit architectures int is too small to store unicode characters. - AF */ -- char tmp[12]; /* Number of characters that can be in int type (including '\0'). If int size is greater than 4 bytes change this value. - AF */ -+ char tmp[20]; /* Number of characters that can be in int type (including '\0'). If int size is greater than 4 bytes change this value. - AF */ - const char *alias; - #define DEBUG 0 - #if DEBUG -@@ -2006,7 +2006,7 @@ static int cmd_u (Word *w, int align, char has_param, int param) { - /* RTF spec: Unicode values beyond 32767 are represented by negative numbers */ - unicode_number += 65536; - } -- sprintf(tmp, "%ld", unicode_number); -+ snprintf(tmp, 20, "%ld", unicode_number); - - if (safe_printf(1, op->unisymbol_print, tmp)) fprintf(stderr, TOO_MANY_ARGS, "unisymbol_print"); - done++; -diff --git a/src/output.c b/src/output.c -index 86d8b5c..4cdbfa6 100644 ---- a/src/output.c -+++ b/src/output.c -@@ -320,7 +320,7 @@ op_begin_std_fontsize (OutputPersonality *op, int size) - if (!found_std_expr) { - if (op->fontsize_begin) { - char expr[16]; -- sprintf (expr, "%d", size); -+ snprintf(expr, 16, "%d", size); - if (safe_printf (1, op->fontsize_begin, expr)) fprintf(stderr, TOO_MANY_ARGS, "fontsize_begin"); - } else { - /* If we cannot write out a change for the exact -@@ -440,7 +440,7 @@ op_end_std_fontsize (OutputPersonality *op, int size) - if (!found_std_expr) { - if (op->fontsize_end) { - char expr[16]; -- sprintf (expr, "%d", size); -+ snprintf(expr, 16, "%d", size); - if (safe_printf(1, op->fontsize_end, expr)) fprintf(stderr, TOO_MANY_ARGS, "fontsize_end"); - } else { - /* If we cannot write out a change for the exact -- -.11.0 - diff --git a/gnu/packages/patches/vboot-utils-fix-format-load-address.patch b/gnu/packages/patches/vboot-utils-fix-format-load-address.patch new file mode 100644 index 0000000000..899531e40e --- /dev/null +++ b/gnu/packages/patches/vboot-utils-fix-format-load-address.patch @@ -0,0 +1,33 @@ +This patch was copied from Debian. + +Description: Fix format load_address for 32 bits architectures + The offset and load_address are 64bits integers + On 32bits we have to use strtoull (instead of strtoul) to parse number + into 64bits unsigned integers. Without this the parsed numbers are + truncated to 2^32-1. +Author: Sophie Brun <sophie@freexian.com> +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=881997 +Forwarded: https://bugs.chromium.org/p/chromium/issues/detail?id=786969 +Last-Update: 2017-11-20 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/futility/cmd_bdb.c ++++ b/futility/cmd_bdb.c +@@ -637,7 +637,7 @@ static int do_bdb(int argc, char *argv[] + } + break; + case OPT_OFFSET: +- offset = strtoul(optarg, &e, 0); ++ offset = strtoull(optarg, &e, 0); + if (!*optarg || (e && *e)) { + fprintf(stderr, "Invalid --offset\n"); + parse_error = 1; +@@ -658,7 +658,7 @@ static int do_bdb(int argc, char *argv[] + } + break; + case OPT_LOAD_ADDRESS: +- load_address = strtoul(optarg, &e, 0); ++ load_address = strtoull(optarg, &e, 0); + if (!*optarg || (e && *e)) { + fprintf(stderr, "Invalid --load_address\n"); + parse_error = 1; diff --git a/gnu/packages/patches/vboot-utils-fix-tests-show-contents.patch b/gnu/packages/patches/vboot-utils-fix-tests-show-contents.patch new file mode 100644 index 0000000000..8e0c691a22 --- /dev/null +++ b/gnu/packages/patches/vboot-utils-fix-tests-show-contents.patch @@ -0,0 +1,142 @@ +This patch was copied from Debian. + +Description: Fix tests/futility/test_show_contents.sh + Tests compare generated files containing the file path and upstream files + ("expected output") containing path like + "/mnt/host/source/src/platform/vboot_reference/tests/". They can't + match. Drop these lines mentioning paths in the generated files and in + the upstream provided files to avoid failures. +Author: Sophie Brun <sophie@freexian.com> +Last-Update: 2017-11-14 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/tests/futility/expect_output/show.tests_devkeys_kernel.keyblock ++++ b/tests/futility/expect_output/show.tests_devkeys_kernel.keyblock +@@ -1,4 +1,3 @@ +-Key block: /mnt/host/source/src/platform/vboot_reference/tests/devkeys/kernel.keyblock + Signature: ignored + Size: 0x4b8 + Flags: 7 !DEV DEV !REC +--- a/tests/futility/expect_output/show.tests_devkeys_root_key.vbprivk ++++ b/tests/futility/expect_output/show.tests_devkeys_root_key.vbprivk +@@ -1,4 +1,3 @@ +-Private Key file: /mnt/host/source/src/platform/vboot_reference/tests/devkeys/root_key.vbprivk + Vboot API: 1.0 + Algorithm: 11 RSA8192 SHA512 + Key sha1sum: b11d74edd286c144e1135b49e7f0bc20cf041f10 +--- a/tests/futility/expect_output/show.tests_devkeys_root_key.vbpubk ++++ b/tests/futility/expect_output/show.tests_devkeys_root_key.vbpubk +@@ -1,4 +1,3 @@ +-Public Key file: /mnt/host/source/src/platform/vboot_reference/tests/devkeys/root_key.vbpubk + Vboot API: 1.0 + Algorithm: 11 RSA8192 SHA512 + Key Version: 1 +--- a/tests/futility/expect_output/show.tests_futility_data_bios_mario_mp.bin ++++ b/tests/futility/expect_output/show.tests_futility_data_bios_mario_mp.bin +@@ -1,4 +1,3 @@ +-BIOS: /mnt/host/source/src/platform/vboot_reference/tests/futility/data/bios_mario_mp.bin + GBB header: GBB Area + Version: 1.0 + Flags: 0x00000000 +--- a/tests/futility/expect_output/show.tests_futility_data_bios_zgb_mp.bin ++++ b/tests/futility/expect_output/show.tests_futility_data_bios_zgb_mp.bin +@@ -1,4 +1,3 @@ +-BIOS: /mnt/host/source/src/platform/vboot_reference/tests/futility/data/bios_zgb_mp.bin + GBB header: GBB + Version: 1.0 + Flags: 0x00000000 +--- a/tests/futility/expect_output/show.tests_futility_data_fw_gbb.bin ++++ b/tests/futility/expect_output/show.tests_futility_data_fw_gbb.bin +@@ -1,4 +1,3 @@ +-GBB header: /mnt/host/source/src/platform/vboot_reference/tests/futility/data/fw_gbb.bin + Version: 1.1 + Flags: 0x00000039 + Regions: offset size +--- a/tests/futility/expect_output/show.tests_futility_data_fw_vblock.bin ++++ b/tests/futility/expect_output/show.tests_futility_data_fw_vblock.bin +@@ -1,4 +1,3 @@ +-Key block: /mnt/host/source/src/platform/vboot_reference/tests/futility/data/fw_vblock.bin + Signature: ignored + Size: 0x8b8 + Flags: 7 !DEV DEV !REC +--- a/tests/futility/expect_output/show.tests_futility_data_kern_preamble.bin ++++ b/tests/futility/expect_output/show.tests_futility_data_kern_preamble.bin +@@ -1,4 +1,3 @@ +-Kernel partition: /mnt/host/source/src/platform/vboot_reference/tests/futility/data/kern_preamble.bin + Key block: + Signature: ignored + Size: 0x5b8 +--- a/tests/futility/expect_output/show.tests_futility_data_sample.vbprik2 ++++ b/tests/futility/expect_output/show.tests_futility_data_sample.vbprik2 +@@ -1,4 +1,3 @@ +-Private key file: /mnt/host/source/src/platform/vboot_reference/tests/futility/data/sample.vbprik2 + Vboot API: 2.1 + Desc: "sample vb21 keypair" + Signature Algorithm: 5 RSA8192 +--- a/tests/futility/expect_output/show.tests_futility_data_sample.vbpubk2 ++++ b/tests/futility/expect_output/show.tests_futility_data_sample.vbpubk2 +@@ -1,4 +1,3 @@ +-Public Key file: /mnt/host/source/src/platform/vboot_reference/tests/futility/data/sample.vbpubk2 + Vboot API: 2.1 + Desc: "sample vb21 keypair" + Signature Algorithm: 5 RSA8192 +--- a/tests/futility/expect_output/show.tests_testkeys_key_rsa2048.pem ++++ b/tests/futility/expect_output/show.tests_testkeys_key_rsa2048.pem +@@ -1,3 +1,2 @@ +-Private Key file: /mnt/host/source/src/platform/vboot_reference/tests/testkeys/key_rsa2048.pem + Key length: 2048 + Key sha1sum: bfb2fa9188a87bf766dd7c313ea6802553b646b6 +--- a/tests/futility/expect_output/show.tests_testkeys_key_rsa8192.pub.pem ++++ b/tests/futility/expect_output/show.tests_testkeys_key_rsa8192.pub.pem +@@ -1,3 +1,2 @@ +-Public Key file: /mnt/host/source/src/platform/vboot_reference/tests/testkeys/key_rsa8192.pub.pem + Key length: 8192 + Key sha1sum: f1afa44a1aed0d0e9ff630579df920a725e9de5e +--- a/tests/futility/test_show_contents.sh ++++ b/tests/futility/test_show_contents.sh +@@ -29,7 +29,7 @@ for file in $SHOW_FILES; do + outfile="show.${file//\//_}" + gotfile="${OUTDIR}/${outfile}" + wantfile="${SRCDIR}/tests/futility/expect_output/${outfile}" +- ${FUTILITY} show "${SRCDIR}/${file}" | tee "${gotfile}" ++ ${FUTILITY} show "${SRCDIR}/${file}" | grep -v "tests/" | tee "${gotfile}" + + # Uncomment this to update the expected output + #cp ${gotfile} ${wantfile} +@@ -48,7 +48,7 @@ for file in $VBUTIL_KEY_FILES; do + outfile="vbutil_key.${file//\//_}" + gotfile="${OUTDIR}/${outfile}" + wantfile="${SRCDIR}/tests/futility/expect_output/${outfile}" +- ${FUTILITY} vbutil_key --unpack "${SRCDIR}/${file}" | tee "${gotfile}" ++ ${FUTILITY} vbutil_key --unpack "${SRCDIR}/${file}" | grep -v "tests/" | tee "${gotfile}" + + # Uncomment this to update the expected output + #cp ${gotfile} ${wantfile} +@@ -64,7 +64,7 @@ gotfile="${OUTDIR}/${outfile}" + wantfile="${SRCDIR}/tests/futility/expect_output/${outfile}" + ${FUTILITY} vbutil_keyblock --unpack "${SRCDIR}/${file}" \ + --signpubkey "${SRCDIR}/tests/devkeys/kernel_subkey.vbpubk" \ +- | tee "${gotfile}" ++ | grep -v "tests/" | tee "${gotfile}" + + # Uncomment this to update the expected output + #cp ${gotfile} ${wantfile} +--- a/tests/futility/expect_output/vbutil_key.tests_devkeys_root_key.vbprivk ++++ b/tests/futility/expect_output/vbutil_key.tests_devkeys_root_key.vbprivk +@@ -1,2 +1 @@ +-Private Key file: /mnt/host/source/src/platform/vboot_reference/tests/devkeys/root_key.vbprivk + Algorithm: 11 RSA8192 SHA512 +--- a/tests/futility/expect_output/vbutil_keyblock.tests_devkeys_kernel.keyblock ++++ b/tests/futility/expect_output/vbutil_keyblock.tests_devkeys_kernel.keyblock +@@ -1,4 +1,3 @@ +-Key block file: /mnt/host/source/src/platform/vboot_reference/tests/devkeys/kernel.keyblock + Signature valid + Flags: 7 !DEV DEV !REC + Data key algorithm: 4 RSA2048 SHA256 +--- a/tests/futility/expect_output/vbutil_key.tests_devkeys_root_key.vbpubk ++++ b/tests/futility/expect_output/vbutil_key.tests_devkeys_root_key.vbpubk +@@ -1,4 +1,3 @@ +-Public Key file: /mnt/host/source/src/platform/vboot_reference/tests/devkeys/root_key.vbpubk + Algorithm: 11 RSA8192 SHA512 + Key Version: 1 + Key sha1sum: b11d74edd286c144e1135b49e7f0bc20cf041f10 diff --git a/gnu/packages/patches/vboot-utils-skip-test-workbuf.patch b/gnu/packages/patches/vboot-utils-skip-test-workbuf.patch new file mode 100644 index 0000000000..9618c76f83 --- /dev/null +++ b/gnu/packages/patches/vboot-utils-skip-test-workbuf.patch @@ -0,0 +1,21 @@ +This patch was copied from Debian. + +Description: skip the workbuf test if VB2_WORKBUF_ALIGN different from 16 +Author: Sophie Brun <sophie@freexian.com> +Last-Update: 2015-12-03 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/tests/vb2_common_tests.c ++++ b/tests/vb2_common_tests.c +@@ -70,6 +70,11 @@ static void test_workbuf(void) + /* NOTE: There are several magic numbers below which assume that + * VB2_WORKBUF_ALIGN == 16 */ + ++ /* Skip the tests if VB2_WORKBUF_ALIGN != 16 */ ++ if (VB2_WORKBUF_ALIGN != 16) { ++ return; ++ } ++ + /* Init */ + vb2_workbuf_init(&wb, p0, 64); + TEST_EQ(vb2_offset_of(p0, wb.buf), 0, "Workbuf init aligned"); diff --git a/gnu/packages/patches/vinagre-newer-freerdp.patch b/gnu/packages/patches/vinagre-newer-freerdp.patch new file mode 100644 index 0000000000..ab79fefc5c --- /dev/null +++ b/gnu/packages/patches/vinagre-newer-freerdp.patch @@ -0,0 +1,320 @@ +https://gitlab.gnome.org/GNOME/vinagre/merge_requests/4.patch + +From 83ec3835c36d5cd2c957512c18d21a33b4136c95 Mon Sep 17 00:00:00 2001 +From: Ondrej Holy <oholy@redhat.com> +Date: Tue, 20 Nov 2018 14:57:17 +0100 +Subject: [PATCH 1/2] Fix build with recent FreeRDP versions + +Vinagre is not buildable with recent FreeRDP versions and similar patches +are used by distributions to fix that. I have also removed some old +compatibility codes, because it wasn't buildable against 1.0, nor 1.1 +anyway and 1.2 has never been officially released and is superseded by 2.0. + +https://gitlab.gnome.org/GNOME/vinagre/issues/4 +--- + configure.ac | 7 +- + plugins/rdp/vinagre-rdp-tab.c | 129 +++++++--------------------------- + 2 files changed, 27 insertions(+), 109 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 5b51a82..61617f1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -58,16 +58,15 @@ AS_IF([test "x$have_ssh" = "xyes"], + AM_CONDITIONAL([VINAGRE_ENABLE_SSH], [test "x$have_ssh" = "xyes"]) + + # Whether to enable support for RDP. +-RDP_DEPS="freerdp x11" ++RDP_DEPS="freerdp2 x11" ++ + AC_ARG_ENABLE([rdp], + [AS_HELP_STRING([--disable-rdp], + [Disable Remote Desktop Protocol (RDP) support])]) + + AS_IF([test "x$enable_rdp" != "xno"], + [PKG_CHECK_EXISTS([$RDP_DEPS], +- [have_rdp=yes +- PKG_CHECK_EXISTS(freerdp >= 1.1, +- [AC_DEFINE([HAVE_FREERDP_1_1], [1], [FreeRDP is of version 1.1 or newer])], [])], ++ [have_rdp=yes], + [have_rdp=no])], + [have_rdp=no]) + +diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c +index 5b98c24..28e3eb6 100644 +--- a/plugins/rdp/vinagre-rdp-tab.c ++++ b/plugins/rdp/vinagre-rdp-tab.c +@@ -29,12 +29,7 @@ + #include <freerdp/types.h> + #include <freerdp/freerdp.h> + #include <freerdp/gdi/gdi.h> +-#if HAVE_FREERDP_1_1 + #include <freerdp/locale/keyboard.h> +-#else +-#include <freerdp/kbd/vkcodes.h> +-#include <gdk/gdkx.h> +-#endif + + #include "vinagre-rdp-tab.h" + #include "vinagre-rdp-connection.h" +@@ -44,12 +39,6 @@ + + #define SELECT_TIMEOUT 50 + +-#if !HAVE_FREERDP_1_1 +-typedef boolean BOOL; +-typedef uint8 UINT8; +-typedef uint16 UINT16; +-#endif +- + struct _VinagreRdpTabPrivate + { + freerdp *freerdp_session; +@@ -476,16 +465,18 @@ frdp_drawing_area_draw (GtkWidget *area, + return TRUE; + } + +-static void ++static BOOL + frdp_begin_paint (rdpContext *context) + { + rdpGdi *gdi = context->gdi; + + gdi->primary->hdc->hwnd->invalid->null = 1; + gdi->primary->hdc->hwnd->ninvalid = 0; ++ ++ return TRUE; + } + +-static void ++static BOOL + frdp_end_paint (rdpContext *context) + { + VinagreRdpTab *rdp_tab = ((frdpContext *) context)->rdp_tab; +@@ -495,7 +486,7 @@ frdp_end_paint (rdpContext *context) + gint x, y, w, h; + + if (gdi->primary->hdc->hwnd->invalid->null) +- return; ++ return TRUE; + + x = gdi->primary->hdc->hwnd->invalid->x; + y = gdi->primary->hdc->hwnd->invalid->y; +@@ -517,6 +508,8 @@ frdp_end_paint (rdpContext *context) + { + gtk_widget_queue_draw_area (priv->display, x, y, w, h); + } ++ ++ return TRUE; + } + + static BOOL +@@ -524,7 +517,6 @@ frdp_pre_connect (freerdp *instance) + { + rdpSettings *settings = instance->settings; + +-#if HAVE_FREERDP_1_1 + settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE; + settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE; + settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE; +@@ -549,32 +541,6 @@ frdp_pre_connect (freerdp *instance) + settings->OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE; + settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE; + settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE; +-#else +- settings->order_support[NEG_DSTBLT_INDEX] = true; +- settings->order_support[NEG_PATBLT_INDEX] = true; +- settings->order_support[NEG_SCRBLT_INDEX] = true; +- settings->order_support[NEG_OPAQUE_RECT_INDEX] = true; +- settings->order_support[NEG_DRAWNINEGRID_INDEX] = false; +- settings->order_support[NEG_MULTIDSTBLT_INDEX] = false; +- settings->order_support[NEG_MULTIPATBLT_INDEX] = false; +- settings->order_support[NEG_MULTISCRBLT_INDEX] = false; +- settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = true; +- settings->order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = false; +- settings->order_support[NEG_LINETO_INDEX] = true; +- settings->order_support[NEG_POLYLINE_INDEX] = true; +- settings->order_support[NEG_MEMBLT_INDEX] = true; +- settings->order_support[NEG_MEM3BLT_INDEX] = false; +- settings->order_support[NEG_MEMBLT_V2_INDEX] = true; +- settings->order_support[NEG_MEM3BLT_V2_INDEX] = false; +- settings->order_support[NEG_SAVEBITMAP_INDEX] = false; +- settings->order_support[NEG_GLYPH_INDEX_INDEX] = true; +- settings->order_support[NEG_FAST_INDEX_INDEX] = true; +- settings->order_support[NEG_FAST_GLYPH_INDEX] = false; +- settings->order_support[NEG_POLYGON_SC_INDEX] = false; +- settings->order_support[NEG_POLYGON_CB_INDEX] = false; +- settings->order_support[NEG_ELLIPSE_SC_INDEX] = false; +- settings->order_support[NEG_ELLIPSE_CB_INDEX] = false; +-#endif + + return TRUE; + } +@@ -587,15 +553,7 @@ frdp_post_connect (freerdp *instance) + rdpGdi *gdi; + int stride; + +- gdi_init (instance, +-#if defined(FREERDP_VERSION_MAJOR) && defined(FREERDP_VERSION_MINOR) && \ +- !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && \ +- FREERDP_VERSION_MINOR >= 2)) +- CLRBUF_24BPP, +-#else +- CLRBUF_32BPP, +-#endif +- NULL); ++ gdi_init (instance, PIXEL_FORMAT_BGRA32); + gdi = instance->context->gdi; + + instance->update->BeginPaint = frdp_begin_paint; +@@ -705,21 +663,15 @@ frdp_key_pressed (GtkWidget *widget, + VinagreRdpTab *rdp_tab = (VinagreRdpTab *) user_data; + VinagreRdpTabPrivate *priv = rdp_tab->priv; + frdpEventKey *frdp_event; +-#if HAVE_FREERDP_1_1 + UINT16 scancode; +-#endif + + frdp_event = g_new0 (frdpEventKey, 1); + frdp_event->type = FRDP_EVENT_TYPE_KEY; + frdp_event->flags = event->type == GDK_KEY_PRESS ? KBD_FLAGS_DOWN : KBD_FLAGS_RELEASE; + +-#if HAVE_FREERDP_1_1 + scancode = freerdp_keyboard_get_rdp_scancode_from_x11_keycode (event->hardware_keycode); + frdp_event->code = RDP_SCANCODE_CODE(scancode); + frdp_event->extended = RDP_SCANCODE_EXTENDED(scancode); +-#else +- frdp_event->code = freerdp_kbd_get_scancode_by_keycode (event->hardware_keycode, &frdp_event->extended); +-#endif + + if (frdp_event->extended) + frdp_event->flags |= KBD_FLAGS_EXTENDED; +@@ -934,11 +886,13 @@ frdp_authenticate (freerdp *instance, + return TRUE; + } + +-static BOOL ++static DWORD + frdp_certificate_verify (freerdp *instance, +- char *subject, +- char *issuer, +- char *fingerprint) ++ const char *common_name, ++ const char *subject, ++ const char *issuer, ++ const char *fingerprint, ++ BOOL host_mismatch) + { + VinagreTab *tab = VINAGRE_TAB (((frdpContext *) instance->context)->rdp_tab); + GtkBuilder *builder; +@@ -968,17 +922,18 @@ frdp_certificate_verify (freerdp *instance, + gtk_widget_hide (dialog); + + +- return response == GTK_RESPONSE_YES; ++ return (response == GTK_RESPONSE_YES) ? 1 : 0; + } + +- +-#if HAVE_FREERDP_1_1 +-static BOOL ++static DWORD + frdp_changed_certificate_verify (freerdp *instance, +- char *subject, +- char *issuer, +- char *new_fingerprint, +- char *old_fingerprint) ++ const char *common_name, ++ const char *subject, ++ const char *issuer, ++ const char *new_fingerprint, ++ const char *old_subject, ++ const char *old_issuer, ++ const char *old_fingerprint) + { + VinagreTab *tab = VINAGRE_TAB (((frdpContext *) instance->context)->rdp_tab); + GtkBuilder *builder; +@@ -1023,9 +978,8 @@ frdp_changed_certificate_verify (freerdp *instance, + gtk_widget_hide (dialog); + + +- return response == GTK_RESPONSE_YES; ++ return (response == GTK_RESPONSE_YES) ? 1 : 0; + } +-#endif + + static void + init_freerdp (VinagreRdpTab *rdp_tab) +@@ -1053,15 +1007,9 @@ init_freerdp (VinagreRdpTab *rdp_tab) + priv->freerdp_session->PostConnect = frdp_post_connect; + priv->freerdp_session->Authenticate = frdp_authenticate; + priv->freerdp_session->VerifyCertificate = frdp_certificate_verify; +-#if HAVE_FREERDP_1_1 + priv->freerdp_session->VerifyChangedCertificate = frdp_changed_certificate_verify; +-#endif + +-#if HAVE_FREERDP_1_1 + priv->freerdp_session->ContextSize = sizeof (frdpContext); +-#else +- priv->freerdp_session->context_size = sizeof (frdpContext); +-#endif + + freerdp_context_new (priv->freerdp_session); + ((frdpContext *) priv->freerdp_session->context)->rdp_tab = rdp_tab; +@@ -1070,53 +1018,24 @@ init_freerdp (VinagreRdpTab *rdp_tab) + settings = priv->freerdp_session->settings; + + /* Security settings */ +-#if HAVE_FREERDP_1_1 + settings->RdpSecurity = TRUE; + settings->TlsSecurity = TRUE; + settings->NlaSecurity = TRUE; + settings->EncryptionMethods = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS; + settings->EncryptionLevel = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE; +-#else +- settings->rdp_security = true; +- settings->tls_security = true; +- settings->nla_security = true; +- settings->encryption = true; +- settings->encryption_method = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS; +- settings->encryption_level = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE; +-#endif +-#include <freerdp/version.h> +-#if (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 2 && FREERDP_VERSION_REVISION >= 1) || (FREERDP_VERSION_MAJOR == 2) + settings->UseRdpSecurityLayer = FALSE; +-#else +- settings->DisableEncryption = FALSE; +-#endif + + /* Set display size */ +-#if HAVE_FREERDP_1_1 + settings->DesktopWidth = width; + settings->DesktopHeight = height; +-#else +- settings->width = width; +- settings->height = height; +-#endif + + /* Set hostname */ +-#if HAVE_FREERDP_1_1 + settings->WindowTitle = g_strdup (hostname); + settings->ServerHostname = g_strdup (hostname); + settings->ServerPort = port; +-#else +- settings->window_title = g_strdup (hostname); +- settings->hostname = g_strdup (hostname); +- settings->port = port; +-#endif + + /* Set keyboard layout */ +-#if HAVE_FREERDP_1_1 + freerdp_keyboard_init (KBD_US); +-#else +- freerdp_kbd_init (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), KBD_US); +-#endif + + /* Allow font smoothing by default */ + settings->AllowFontSmoothing = TRUE; +-- +2.18.1 + diff --git a/gnu/packages/patches/vinagre-newer-rdp-parameters.patch b/gnu/packages/patches/vinagre-newer-rdp-parameters.patch new file mode 100644 index 0000000000..99bcee5a98 --- /dev/null +++ b/gnu/packages/patches/vinagre-newer-rdp-parameters.patch @@ -0,0 +1,212 @@ +https://gitlab.gnome.org/GNOME/vinagre/merge_requests/4.patch + +From 141f9383129795da267a8111897fb3a0a324b080 Mon Sep 17 00:00:00 2001 +From: Ondrej Holy <oholy@redhat.com> +Date: Thu, 22 Nov 2018 17:22:35 +0100 +Subject: [PATCH 2/2] Handle new RDP certificate parameters + +The freerdp2 certificate callbacks contains more parameters, let's +present some of them to user also. +--- + data/vinagre.ui | 80 ++++++++++++++++++++++++++++++----- + plugins/rdp/vinagre-rdp-tab.c | 26 +++++------- + 2 files changed, 80 insertions(+), 26 deletions(-) + +diff --git a/data/vinagre.ui b/data/vinagre.ui +index 3135336..d7ce258 100644 +--- a/data/vinagre.ui ++++ b/data/vinagre.ui +@@ -885,7 +885,7 @@ Do you trust the new certificate?</property> + <property name="vexpand">True</property> + <property name="xalign">0</property> + <property name="xpad">12</property> +- <property name="label" translatable="yes" comments="Subject of the certificate.">Subject:</property> ++ <property name="label" translatable="yes" comments="Subject of the certificate.">New subject:</property> + </object> + <packing> + <property name="left_attach">0</property> +@@ -901,7 +901,7 @@ Do you trust the new certificate?</property> + <property name="vexpand">True</property> + <property name="xalign">0</property> + <property name="xpad">12</property> +- <property name="label" translatable="yes" comments="Issuer of the certificate.">Issuer:</property> ++ <property name="label" translatable="yes" comments="Issuer of the certificate.">New issuer:</property> + </object> + <packing> + <property name="left_attach">0</property> +@@ -927,7 +927,55 @@ Do you trust the new certificate?</property> + </packing> + </child> + <child> +- <object class="GtkLabel" id="certificate_changed_subject"> ++ <object class="GtkLabel"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="vexpand">True</property> ++ <property name="xalign">0</property> ++ <property name="xpad">12</property> ++ <property name="label" translatable="yes" comments="Subject of the old certificate.">Old subject:</property> ++ </object> ++ <packing> ++ <property name="left_attach">0</property> ++ <property name="top_attach">3</property> ++ <property name="width">1</property> ++ <property name="height">1</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkLabel"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="vexpand">True</property> ++ <property name="xalign">0</property> ++ <property name="xpad">12</property> ++ <property name="label" translatable="yes" comments="Issuer of the old certificate.">Old issuer:</property> ++ </object> ++ <packing> ++ <property name="left_attach">0</property> ++ <property name="top_attach">4</property> ++ <property name="width">1</property> ++ <property name="height">1</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkLabel"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="vexpand">True</property> ++ <property name="xalign">0</property> ++ <property name="xpad">12</property> ++ <property name="label" translatable="yes" comments="Fingerprint of the old certificate.">Old fingerprint:</property> ++ </object> ++ <packing> ++ <property name="left_attach">0</property> ++ <property name="top_attach">5</property> ++ <property name="width">1</property> ++ <property name="height">1</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkLabel" id="certificate_changed_new_subject"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> +@@ -942,7 +990,7 @@ Do you trust the new certificate?</property> + </packing> + </child> + <child> +- <object class="GtkLabel" id="certificate_changed_issuer"> ++ <object class="GtkLabel" id="certificate_changed_new_issuer"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> +@@ -972,21 +1020,33 @@ Do you trust the new certificate?</property> + </packing> + </child> + <child> +- <object class="GtkLabel" id="certificate_changed_old_fingerprint_label"> ++ <object class="GtkLabel" id="certificate_changed_old_subject"> + <property name="visible">True</property> + <property name="can_focus">False</property> +- <property name="vexpand">True</property> ++ <property name="hexpand">True</property> + <property name="xalign">0</property> +- <property name="xpad">12</property> +- <property name="label" translatable="yes" comments="Fingerprint of the old certificate.">Old fingerprint:</property> + </object> + <packing> +- <property name="left_attach">0</property> ++ <property name="left_attach">1</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> ++ <child> ++ <object class="GtkLabel" id="certificate_changed_old_issuer"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="hexpand">True</property> ++ <property name="xalign">0</property> ++ </object> ++ <packing> ++ <property name="left_attach">1</property> ++ <property name="top_attach">4</property> ++ <property name="width">1</property> ++ <property name="height">1</property> ++ </packing> ++ </child> + <child> + <object class="GtkLabel" id="certificate_changed_old_fingerprint"> + <property name="visible">True</property> +@@ -997,7 +1057,7 @@ Do you trust the new certificate?</property> + </object> + <packing> + <property name="left_attach">1</property> +- <property name="top_attach">3</property> ++ <property name="top_attach">5</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> +diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c +index 28e3eb6..30a8698 100644 +--- a/plugins/rdp/vinagre-rdp-tab.c ++++ b/plugins/rdp/vinagre-rdp-tab.c +@@ -917,6 +917,7 @@ frdp_certificate_verify (freerdp *instance, + widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_fingerprint")); + gtk_label_set_text (GTK_LABEL (widget), fingerprint); + ++ /* FIXME: Warn user in case of host_mismatch. */ + + response = gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_hide (dialog); +@@ -939,7 +940,6 @@ frdp_changed_certificate_verify (freerdp *instance, + GtkBuilder *builder; + GtkWidget *dialog; + GtkWidget *widget; +- GtkWidget *label; + gint response; + + builder = vinagre_utils_get_builder (); +@@ -950,29 +950,23 @@ frdp_changed_certificate_verify (freerdp *instance, + _("Connect"), GTK_RESPONSE_YES, NULL); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES); + +- widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_subject")); ++ widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_new_subject")); + gtk_label_set_text (GTK_LABEL (widget), subject); + +- widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_issuer")); ++ widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_new_issuer")); + gtk_label_set_text (GTK_LABEL (widget), issuer); + + widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_new_fingerprint")); + gtk_label_set_text (GTK_LABEL (widget), new_fingerprint); + +- widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_old_fingerprint")); +- label = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_old_fingerprint_label")); +- if (old_fingerprint != NULL && old_fingerprint[0] != '\0') +- { +- gtk_label_set_text (GTK_LABEL (widget), old_fingerprint); +- gtk_widget_show (widget); +- gtk_widget_show (label); +- } +- else +- { +- gtk_widget_hide (widget); +- gtk_widget_hide (label); +- } ++ widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_old_subject")); ++ gtk_label_set_text (GTK_LABEL (widget), old_subject); + ++ widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_old_issuer")); ++ gtk_label_set_text (GTK_LABEL (widget), old_issuer); ++ ++ widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_old_fingerprint")); ++ gtk_label_set_text (GTK_LABEL (widget), old_fingerprint); + + response = gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_hide (dialog); +-- +2.18.1 + diff --git a/gnu/packages/patches/vinagre-revert-1.patch b/gnu/packages/patches/vinagre-revert-1.patch deleted file mode 100644 index 5a983770b7..0000000000 --- a/gnu/packages/patches/vinagre-revert-1.patch +++ /dev/null @@ -1,56 +0,0 @@ -Patch taken from Debian: revert changes that prevent building against freerdp -version 1.1 branch. - -From 8ebc0685b85e0d1f70eb00171f2e7712de3d44bd Mon Sep 17 00:00:00 2001 -From: Michael Biebl <biebl@debian.org> -Date: Thu, 22 Sep 2016 01:15:55 +0200 -Subject: [PATCH 1/2] Revert "Improve FreeRDP authentication failure handling" - -This reverts commit d7b4f88943e8615d252d27e1efc58cb64a9e1821. ---- - plugins/rdp/vinagre-rdp-tab.c | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c -index b731f9b..8572bc3 100644 ---- a/plugins/rdp/vinagre-rdp-tab.c -+++ b/plugins/rdp/vinagre-rdp-tab.c -@@ -1195,8 +1195,8 @@ open_freerdp (VinagreRdpTab *rdp_tab) - VinagreTab *tab = VINAGRE_TAB (rdp_tab); - GtkWindow *window = GTK_WINDOW (vinagre_tab_get_window (tab)); - gboolean success = TRUE; -+ gboolean authentication_error = FALSE; - gboolean cancelled = FALSE; -- guint authentication_errors = 0; - - priv->events = g_queue_new (); - -@@ -1205,12 +1205,14 @@ open_freerdp (VinagreRdpTab *rdp_tab) - - do - { -+ authentication_error = FALSE; -+ - /* Run FreeRDP session */ - success = freerdp_connect (priv->freerdp_session); - if (!success) - { -- authentication_errors += freerdp_get_last_error (priv->freerdp_session->context) == 0x20009 || -- freerdp_get_last_error (priv->freerdp_session->context) == 0x2000c; -+ authentication_error = freerdp_get_last_error (priv->freerdp_session->context) == 0x20009 || -+ freerdp_get_last_error (priv->freerdp_session->context) == 0x2000c; - - cancelled = freerdp_get_last_error (priv->freerdp_session->context) == 0x2000b; - -@@ -1218,7 +1220,7 @@ open_freerdp (VinagreRdpTab *rdp_tab) - init_freerdp (rdp_tab); - } - } -- while (!success && authentication_errors < 3); -+ while (!success && authentication_error); - - if (!success) - { --- -2.9.3 - diff --git a/gnu/packages/patches/vinagre-revert-2.patch b/gnu/packages/patches/vinagre-revert-2.patch deleted file mode 100644 index 686ee203e4..0000000000 --- a/gnu/packages/patches/vinagre-revert-2.patch +++ /dev/null @@ -1,448 +0,0 @@ -Patch taken from Debian: revert changes that prevent building against freerdp -version 1.1 branch. - -From bb1828b6b7eb29bb037bcc687cf10f916ddc7561 Mon Sep 17 00:00:00 2001 -From: Michael Biebl <biebl@debian.org> -Date: Thu, 22 Sep 2016 01:18:16 +0200 -Subject: [PATCH 2/2] Revert "Store credentials for RDP" - -This reverts commit 60dea279a24c7f0e398b89a0a60d45e80087ed1d. ---- - plugins/rdp/vinagre-rdp-connection.c | 22 +--- - plugins/rdp/vinagre-rdp-plugin.c | 29 +---- - plugins/rdp/vinagre-rdp-tab.c | 231 +++++++++++++++++------------------ - 3 files changed, 123 insertions(+), 159 deletions(-) - -diff --git a/plugins/rdp/vinagre-rdp-connection.c b/plugins/rdp/vinagre-rdp-connection.c -index f0ff02b..c5f6ed1 100644 ---- a/plugins/rdp/vinagre-rdp-connection.c -+++ b/plugins/rdp/vinagre-rdp-connection.c -@@ -127,25 +127,9 @@ rdp_parse_item (VinagreConnection *conn, xmlNode *root) - static void - rdp_parse_options_widget (VinagreConnection *conn, GtkWidget *widget) - { -- const gchar *text; -- GtkWidget *u_entry, *d_entry, *spin_button, *scaling_button; -- gboolean scaling; -- guint width, height; -- -- d_entry = g_object_get_data (G_OBJECT (widget), "domain_entry"); -- if (!d_entry) -- { -- g_warning ("Wrong widget passed to rdp_parse_options_widget()"); -- return; -- } -- -- text = gtk_entry_get_text (GTK_ENTRY (d_entry)); -- vinagre_cache_prefs_set_string ("rdp-connection", "domain", text); -- -- g_object_set (conn, -- "domain", text != NULL && *text != '\0' ? text : NULL, -- NULL); -- -+ GtkWidget *u_entry, *spin_button, *scaling_button; -+ gboolean scaling; -+ guint width, height; - - u_entry = g_object_get_data (G_OBJECT (widget), "username_entry"); - if (!u_entry) -diff --git a/plugins/rdp/vinagre-rdp-plugin.c b/plugins/rdp/vinagre-rdp-plugin.c -index 4751102..f41da37 100644 ---- a/plugins/rdp/vinagre-rdp-plugin.c -+++ b/plugins/rdp/vinagre-rdp-plugin.c -@@ -100,7 +100,7 @@ vinagre_rdp_plugin_init (VinagreRdpPlugin *plugin) - static GtkWidget * - impl_get_connect_widget (VinagreProtocol *plugin, VinagreConnection *conn) - { -- GtkWidget *grid, *label, *u_entry, *d_entry, *spin_button, *check; -+ GtkWidget *grid, *label, *u_entry, *spin_button, *check; - gchar *str; - gint width, height; - -@@ -146,29 +146,10 @@ impl_get_connect_widget (VinagreProtocol *plugin, VinagreConnection *conn) - g_free (str); - - -- label = gtk_label_new_with_mnemonic (_("_Domain:")); -- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); -- gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1); -- gtk_widget_set_margin_left (label, 12); -- -- d_entry = gtk_entry_new (); -- /* Translators: This is the tooltip for the domain field in a RDP connection */ -- gtk_widget_set_tooltip_text (d_entry, _("Optional.")); -- g_object_set_data (G_OBJECT (grid), "domain_entry", d_entry); -- gtk_grid_attach (GTK_GRID (grid), d_entry, 1, 3, 1, 1); -- gtk_label_set_mnemonic_widget (GTK_LABEL (label), d_entry); -- str = g_strdup (VINAGRE_IS_CONNECTION (conn) ? -- vinagre_connection_get_domain (conn) : -- vinagre_cache_prefs_get_string ("rdp-connection", "domain", "")); -- gtk_entry_set_text (GTK_ENTRY (d_entry), str); -- gtk_entry_set_activates_default (GTK_ENTRY (d_entry), TRUE); -- g_free (str); -- -- - /* Host width */ - label = gtk_label_new_with_mnemonic (_("_Width:")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); -- gtk_grid_attach (GTK_GRID (grid), label, 0, 4, 1, 1); -+ gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1); - gtk_widget_set_margin_left (label, 12); - - spin_button = gtk_spin_button_new_with_range (MIN_SIZE, MAX_SIZE, 1); -@@ -176,7 +157,7 @@ impl_get_connect_widget (VinagreProtocol *plugin, VinagreConnection *conn) - gtk_widget_set_tooltip_text (spin_button, _("Set width of the remote desktop")); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin_button), DEFAULT_WIDTH); - g_object_set_data (G_OBJECT (grid), "width_spin_button", spin_button); -- gtk_grid_attach (GTK_GRID (grid), spin_button, 1, 4, 1, 1); -+ gtk_grid_attach (GTK_GRID (grid), spin_button, 1, 3, 1, 1); - gtk_label_set_mnemonic_widget (GTK_LABEL (label), spin_button); - width = VINAGRE_IS_CONNECTION (conn) ? - vinagre_connection_get_width (conn) : -@@ -188,7 +169,7 @@ impl_get_connect_widget (VinagreProtocol *plugin, VinagreConnection *conn) - /* Host height */ - label = gtk_label_new_with_mnemonic (_("_Height:")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); -- gtk_grid_attach (GTK_GRID (grid), label, 0, 5, 1, 1); -+ gtk_grid_attach (GTK_GRID (grid), label, 0, 4, 1, 1); - gtk_widget_set_margin_left (label, 12); - - spin_button = gtk_spin_button_new_with_range (MIN_SIZE, MAX_SIZE, 1); -@@ -196,7 +177,7 @@ impl_get_connect_widget (VinagreProtocol *plugin, VinagreConnection *conn) - gtk_widget_set_tooltip_text (spin_button, _("Set height of the remote desktop")); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin_button), DEFAULT_HEIGHT); - g_object_set_data (G_OBJECT (grid), "height_spin_button", spin_button); -- gtk_grid_attach (GTK_GRID (grid), spin_button, 1, 5, 1, 1); -+ gtk_grid_attach (GTK_GRID (grid), spin_button, 1, 4, 1, 1); - gtk_label_set_mnemonic_widget (GTK_LABEL (label), spin_button); - height = VINAGRE_IS_CONNECTION (conn) ? - vinagre_connection_get_height (conn) : -diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c -index 8572bc3..f3d9c08 100644 ---- a/plugins/rdp/vinagre-rdp-tab.c -+++ b/plugins/rdp/vinagre-rdp-tab.c -@@ -70,8 +70,6 @@ struct _VinagreRdpTabPrivate - gboolean scaling; - double scale; - double offset_x, offset_y; -- -- guint authentication_attempts; - }; - - G_DEFINE_TYPE (VinagreRdpTab, vinagre_rdp_tab, VINAGRE_TYPE_TAB) -@@ -611,7 +609,6 @@ frdp_post_connect (freerdp *instance) - 0, 0, - gdi->width, gdi->height); - -- vinagre_tab_save_credentials_in_keyring (VINAGRE_TAB (rdp_tab)); - vinagre_tab_add_recent_used (VINAGRE_TAB (rdp_tab)); - vinagre_tab_set_state (VINAGRE_TAB (rdp_tab), VINAGRE_TAB_STATE_CONNECTED); - -@@ -862,76 +859,114 @@ frdp_mouse_moved (GtkWidget *widget, - return TRUE; - } - -+static void -+entry_text_changed_cb (GtkEntry *entry, -+ GtkBuilder *builder) -+{ -+ const gchar *text; -+ GtkWidget *widget; -+ gsize username_length; -+ gsize password_length; -+ -+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "username_entry")); -+ text = gtk_entry_get_text (GTK_ENTRY (widget)); -+ username_length = strlen (text); -+ -+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "password_entry")); -+ text = gtk_entry_get_text (GTK_ENTRY (widget)); -+ password_length = strlen (text); -+ -+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "ok_button")); -+ gtk_widget_set_sensitive (widget, password_length > 0 && username_length > 0); -+} -+ - static gboolean - frdp_authenticate (freerdp *instance, - char **username, - char **password, - char **domain) - { -- VinagreTab *tab = VINAGRE_TAB (((frdpContext *) instance->context)->rdp_tab); -- VinagreRdpTab *rdp_tab = VINAGRE_RDP_TAB (tab); -- VinagreRdpTabPrivate *priv = rdp_tab->priv; -- VinagreConnection *conn = vinagre_tab_get_conn (tab); -- GtkWindow *window = GTK_WINDOW (vinagre_tab_get_window (tab)); -- gboolean save_in_keyring = FALSE; -- gchar *keyring_domain = NULL; -- gchar *keyring_username = NULL; -- gchar *keyring_password = NULL; -+ VinagreTab *tab = VINAGRE_TAB (((frdpContext *) instance->context)->rdp_tab); -+ VinagreConnection *conn = vinagre_tab_get_conn (tab); -+ const gchar *user_name; -+ const gchar *domain_name; -+ GtkBuilder *builder; -+ GtkWidget *dialog; -+ GtkWidget *widget; -+ GtkWidget *username_entry; -+ GtkWidget *password_entry; -+ GtkWidget *domain_entry; -+ gboolean save_credential_check_visible; -+ gboolean domain_label_visible; -+ gboolean domain_entry_visible; -+ gint response; - -- priv->authentication_attempts++; -+ builder = vinagre_utils_get_builder (); - -- if (priv->authentication_attempts == 1) -- { -- vinagre_tab_find_credentials_in_keyring (tab, &keyring_domain, &keyring_username, &keyring_password); -- if (keyring_password != NULL && keyring_username != NULL) -- { -- *domain = keyring_domain; -- *username = keyring_username; -- *password = keyring_password; -+ dialog = GTK_WIDGET (gtk_builder_get_object (builder, "auth_required_dialog")); -+ gtk_window_set_modal ((GtkWindow *) dialog, TRUE); -+ gtk_window_set_transient_for ((GtkWindow *) dialog, GTK_WINDOW (vinagre_tab_get_window (tab))); - -- return TRUE; -- } -- else -- { -- g_free (keyring_domain); -- g_free (keyring_username); -- g_free (keyring_password); -- } -+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "host_label")); -+ gtk_label_set_text (GTK_LABEL (widget), vinagre_connection_get_host (conn)); -+ -+ username_entry = GTK_WIDGET (gtk_builder_get_object (builder, "username_entry")); -+ password_entry = GTK_WIDGET (gtk_builder_get_object (builder, "password_entry")); -+ domain_entry = GTK_WIDGET (gtk_builder_get_object (builder, "domain_entry")); -+ -+ if (*username != NULL && *username[0] != '\0') -+ { -+ gtk_entry_set_text (GTK_ENTRY (username_entry), *username); -+ gtk_widget_grab_focus (password_entry); - } - -- if (vinagre_utils_request_credential (window, -- "RDP", -- vinagre_connection_get_host (conn), -- vinagre_connection_get_domain (conn), -- vinagre_connection_get_username (conn), -- TRUE, -- TRUE, -- TRUE, -- 20, -- domain, -- username, -- password, -- &save_in_keyring)) -+ g_signal_connect (username_entry, "changed", G_CALLBACK (entry_text_changed_cb), builder); -+ g_signal_connect (password_entry, "changed", G_CALLBACK (entry_text_changed_cb), builder); -+ -+ -+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "save_credential_check")); -+ save_credential_check_visible = gtk_widget_get_visible (widget); -+ gtk_widget_set_visible (widget, FALSE); -+ -+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "domain_label")); -+ domain_label_visible = gtk_widget_get_visible (widget); -+ gtk_widget_set_visible (widget, TRUE); -+ -+ domain_entry_visible = gtk_widget_get_visible (domain_entry); -+ gtk_widget_set_visible (domain_entry, TRUE); -+ -+ -+ response = gtk_dialog_run (GTK_DIALOG (dialog)); -+ gtk_widget_hide (dialog); -+ -+ -+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "save_credential_check")); -+ gtk_widget_set_visible (widget, save_credential_check_visible); -+ -+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "domain_label")); -+ gtk_widget_set_visible (widget, domain_label_visible); -+ -+ gtk_widget_set_visible (domain_entry, domain_entry_visible); -+ -+ -+ if (response == GTK_RESPONSE_OK) - { -- if (*domain && **domain != '\0') -- vinagre_connection_set_domain (conn, *domain); -+ domain_name = gtk_entry_get_text (GTK_ENTRY (domain_entry)); -+ if (g_strcmp0 (*domain, domain_name) != 0) -+ *domain = g_strdup (domain_name); - -- if (*username && **username != '\0') -- vinagre_connection_set_username (conn, *username); -+ user_name = gtk_entry_get_text (GTK_ENTRY (username_entry)); -+ if (g_strcmp0 (*username, user_name) != 0) -+ *username = g_strdup (user_name); - -- if (*password && **password != '\0') -- vinagre_connection_set_password (conn, *password); -+ *password = g_strdup (gtk_entry_get_text (GTK_ENTRY (password_entry))); - -- vinagre_tab_set_save_credentials (tab, save_in_keyring); -+ return TRUE; - } - else - { -- vinagre_tab_remove_from_notebook (tab); -- - return FALSE; - } -- -- return TRUE; - } - - static BOOL -@@ -1028,25 +1063,30 @@ frdp_changed_certificate_verify (freerdp *instance, - #endif - - static void --init_freerdp (VinagreRdpTab *rdp_tab) -+open_freerdp (VinagreRdpTab *rdp_tab) - { - VinagreRdpTabPrivate *priv = rdp_tab->priv; -- rdpSettings *settings; - VinagreTab *tab = VINAGRE_TAB (rdp_tab); - VinagreConnection *conn = vinagre_tab_get_conn (tab); -- gboolean scaling; -- gchar *hostname; -- gint width, height; -- gint port; -+ rdpSettings *settings; -+ GtkWindow *window = GTK_WINDOW (vinagre_tab_get_window (tab)); -+ gboolean success = TRUE; -+ gboolean fullscreen, scaling; -+ gchar *hostname, *username; -+ gint port, width, height; - - g_object_get (conn, - "port", &port, - "host", &hostname, - "width", &width, - "height", &height, -+ "fullscreen", &fullscreen, - "scaling", &scaling, -+ "username", &username, - NULL); - -+ priv->events = g_queue_new (); -+ - /* Setup FreeRDP session */ - priv->freerdp_session = freerdp_new (); - priv->freerdp_session->PreConnect = frdp_pre_connect; -@@ -1111,6 +1151,17 @@ init_freerdp (VinagreRdpTab *rdp_tab) - settings->port = port; - #endif - -+ /* Set username */ -+ username = g_strstrip (username); -+ if (username != NULL && username[0] != '\0') -+ { -+#if HAVE_FREERDP_1_1 -+ settings->Username = g_strdup (username); -+#else -+ settings->username = g_strdup (username); -+#endif -+ } -+ - /* Set keyboard layout */ - #if HAVE_FREERDP_1_1 - freerdp_keyboard_init (KBD_US); -@@ -1120,24 +1171,6 @@ init_freerdp (VinagreRdpTab *rdp_tab) - - /* Allow font smoothing by default */ - settings->AllowFontSmoothing = TRUE; --} -- --static void --init_display (VinagreRdpTab *rdp_tab) --{ -- VinagreRdpTabPrivate *priv = rdp_tab->priv; -- VinagreTab *tab = VINAGRE_TAB (rdp_tab); -- VinagreConnection *conn = vinagre_tab_get_conn (tab); -- GtkWindow *window = GTK_WINDOW (vinagre_tab_get_window (tab)); -- gboolean fullscreen, scaling; -- gint width, height; -- -- g_object_get (conn, -- "width", &width, -- "height", &height, -- "fullscreen", &fullscreen, -- "scaling", &scaling, -- NULL); - - /* Setup display for FreeRDP session */ - priv->display = gtk_drawing_area_new (); -@@ -1186,54 +1219,20 @@ init_display (VinagreRdpTab *rdp_tab) - priv->key_release_handler_id = g_signal_connect (GTK_WIDGET (tab), "key-release-event", - G_CALLBACK (frdp_key_pressed), - rdp_tab); --} -- --static void --open_freerdp (VinagreRdpTab *rdp_tab) --{ -- VinagreRdpTabPrivate *priv = rdp_tab->priv; -- VinagreTab *tab = VINAGRE_TAB (rdp_tab); -- GtkWindow *window = GTK_WINDOW (vinagre_tab_get_window (tab)); -- gboolean success = TRUE; -- gboolean authentication_error = FALSE; -- gboolean cancelled = FALSE; -- -- priv->events = g_queue_new (); -- -- init_freerdp (rdp_tab); -- init_display (rdp_tab); -- -- do -- { -- authentication_error = FALSE; - -- /* Run FreeRDP session */ -- success = freerdp_connect (priv->freerdp_session); -- if (!success) -- { -- authentication_error = freerdp_get_last_error (priv->freerdp_session->context) == 0x20009 || -- freerdp_get_last_error (priv->freerdp_session->context) == 0x2000c; -- -- cancelled = freerdp_get_last_error (priv->freerdp_session->context) == 0x2000b; -- -- freerdp_free (priv->freerdp_session); -- init_freerdp (rdp_tab); -- } -- } -- while (!success && authentication_error); -+ /* Run FreeRDP session */ -+ success = freerdp_connect (priv->freerdp_session); - - if (!success) - { - gtk_window_unfullscreen (window); -- if (!cancelled) -- vinagre_utils_show_error_dialog (_("Error connecting to host."), -- NULL, -- window); -+ vinagre_utils_show_error_dialog (_("Error connecting to host."), -+ NULL, -+ window); - g_idle_add ((GSourceFunc) idle_close, rdp_tab); - } - else - { -- priv->authentication_attempts = 0; - priv->update_id = g_idle_add ((GSourceFunc) update, rdp_tab); - } - } --- -2.9.3 - diff --git a/gnu/packages/patches/x265-detect512-all-arches.patch b/gnu/packages/patches/x265-detect512-all-arches.patch deleted file mode 100644 index 4d39d868fd..0000000000 --- a/gnu/packages/patches/x265-detect512-all-arches.patch +++ /dev/null @@ -1,37 +0,0 @@ -https://sources.debian.org/data/main/x/x265/2.9-3/debian/patches/0003-detect512-is-needed-on-all-architectures.patch - -From: Adam Sampson <unknown@bitbucket> -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/patches/xboing-CVE-2004-0149.patch b/gnu/packages/patches/xboing-CVE-2004-0149.patch deleted file mode 100644 index b40146b434..0000000000 --- a/gnu/packages/patches/xboing-CVE-2004-0149.patch +++ /dev/null @@ -1,134 +0,0 @@ -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0149 -https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=174924 ---- - demo.c | 2 +- - editor.c | 12 ++++++------ - file.c | 2 +- - highscore.c | 6 +++--- - misc.c | 2 +- - preview.c | 2 +- - 6 files changed, 13 insertions(+), 13 deletions(-) - -diff --git a/demo.c b/demo.c -index 9084e70..f4fc2cd 100644 ---- a/demo.c -+++ b/demo.c -@@ -154,7 +154,7 @@ static void DoBlocks(display, window) - - /* Construct the demo level filename */ - if ((str = getenv("XBOING_LEVELS_DIR")) != NULL) -- sprintf(levelPath, "%s/demo.data", str); -+ snprintf(levelPath, sizeof(levelPath),"%s/demo.data", str); - else - sprintf(levelPath, "%s/demo.data", LEVEL_INSTALL_DIR); - -diff --git a/editor.c b/editor.c -index f2bb9ed..66d0679 100644 ---- a/editor.c -+++ b/editor.c -@@ -213,7 +213,7 @@ static void DoLoadLevel(display, window) - - /* Construct the Edit level filename */ - if ((str = getenv("XBOING_LEVELS_DIR")) != NULL) -- sprintf(levelPath, "%s/editor.data", str); -+ snprintf(levelPath,sizeof(levelPath)-1, "%s/editor.data", str); - else - sprintf(levelPath, "%s/editor.data", LEVEL_INSTALL_DIR); - -@@ -958,8 +958,8 @@ static void LoadALevel(display) - if ((num > 0) && (num <= MAX_NUM_LEVELS)) - { - /* Construct the Edit level filename */ -- if ((str2 = getenv("XBOING_LEVELS_DIR")) != NULL) -- sprintf(levelPath, "%s/level%02ld.data", str2, (u_long) num); -+ if ((str2 = getenv("XBOING_LEVELS_DIR")) != NULL) -+ snprintf(levelPath, sizeof(levelPath)-1,"%s/level%02ld.data", str2, (u_long) num); - else - sprintf(levelPath, "%s/level%02ld.data", - LEVEL_INSTALL_DIR, (u_long) num); -@@ -1017,9 +1017,9 @@ static void SaveALevel(display) - num = atoi(str); - if ((num > 0) && (num <= MAX_NUM_LEVELS)) - { -- /* Construct the Edit level filename */ -- if ((str2 = getenv("XBOING_LEVELS_DIR")) != NULL) -- sprintf(levelPath, "%s/level%02ld.data", str2, (u_long) num); -+ /* Construct the Edit level filename */ -+ if ((str2 = getenv("XBOING_LEVELS_DIR")) != NULL) -+ snprintf(levelPath, sizeof(levelPath)-1,"%s/level%02ld.data", str2, (u_long) num); - else - sprintf(levelPath, "%s/level%02ld.data", - LEVEL_INSTALL_DIR, (u_long) num); -diff --git a/file.c b/file.c -index 4c043cd..99a0854 100644 ---- a/file.c -+++ b/file.c -@@ -139,7 +139,7 @@ void SetupStage(display, window) - - /* Construct the level filename */ - if ((str = getenv("XBOING_LEVELS_DIR")) != NULL) -- sprintf(levelPath, "%s/level%02ld.data", str, newLevel); -+ snprintf(levelPath,sizeof(levelPath), "%s/level%02ld.data", str, newLevel); - else - sprintf(levelPath, "%s/level%02ld.data", LEVEL_INSTALL_DIR, newLevel); - -diff --git a/highscore.c b/highscore.c -index f0db3e9..792273e 100644 ---- a/highscore.c -+++ b/highscore.c -@@ -1023,7 +1023,7 @@ int ReadHighScoreTable(type) - { - /* Use the environment variable if it exists */ - if ((str = getenv("XBOING_SCORE_FILE")) != NULL) -- strcpy(filename, str); -+ strncpy(filename, str, sizeof(filename)-1); - else - strcpy(filename, HIGH_SCORE_FILE); - } -@@ -1095,7 +1095,7 @@ int WriteHighScoreTable(type) - { - /* Use the environment variable if it exists */ - if ((str = getenv("XBOING_SCORE_FILE")) != NULL) -- strcpy(filename, str); -+ strncpy(filename, str, sizeof(filename)-1); - else - strcpy(filename, HIGH_SCORE_FILE); - } -@@ -1218,7 +1218,7 @@ static int LockUnlock(cmd) - - /* Use the environment variable if it exists */ - if ((str = getenv("XBOING_SCORE_FILE")) != NULL) -- strcpy(filename, str); -+ strncpy(filename, str, sizeof(filename)-1); - else - strcpy(filename, HIGH_SCORE_FILE); - -diff --git a/misc.c b/misc.c -index f3ab37e..7f3ddce 100644 ---- a/misc.c -+++ b/misc.c -@@ -427,7 +427,7 @@ char *GetHomeDir() - */ - - if ((ptr = getenv("HOME")) != NULL) -- (void) strcpy(dest, ptr); -+ (void) strncpy(dest, ptr,sizeof(dest)-1); - else - { - /* HOME variable is not present so get USER var */ -diff --git a/preview.c b/preview.c -index 41c1187..687f566 100644 ---- a/preview.c -+++ b/preview.c -@@ -139,7 +139,7 @@ static void DoLoadLevel(display, window) - - /* Construct the Preview level filename */ - if ((str = getenv("XBOING_LEVELS_DIR")) != NULL) -- sprintf(levelPath, "%s/level%02d.data", str, lnum); -+ snprintf(levelPath, sizeof(levelPath)-1, "%s/level%02d.data", str, lnum); - else - sprintf(levelPath, "%s/level%02d.data", LEVEL_INSTALL_DIR, lnum); - --- -2.15.1 - |