summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2016-05-02 10:04:55 +0200
committer Eric Hameleers <alien@slackware.com>2016-05-02 10:04:55 +0200
commitebe8a1e1ce5e6d8b2ced3e6c282694eeb63f7877 (patch)
tree7950615139821b0c8108c8d13195317c5d097f92
parent3e6b9539aae9f7d6c3da49d4f4042fa133be9c44 (diff)
downloadktown-ebe8a1e1ce5e6d8b2ced3e6c282694eeb63f7877.tar.gz
ktown-ebe8a1e1ce5e6d8b2ced3e6c282694eeb63f7877.tar.xz
Patch for kcoreaddons: a regression caused rand() to be not seeded.
KRandom saw a regression in KCoreAddon's 5.21.0 release, which impacts a wide range of applications and use cases. Since the rand() was not seeded, the numbers generated were predictable, which is ugly in games and probably alarming for bluetooth pairing.
-rw-r--r--kde/build/kcoreaddons1
-rw-r--r--kde/patch/kcoreaddons.patch5
-rw-r--r--kde/patch/kcoreaddons/kcoreaddons.kdebug_362161.patch27
3 files changed, 33 insertions, 0 deletions
diff --git a/kde/build/kcoreaddons b/kde/build/kcoreaddons
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/kde/build/kcoreaddons
@@ -0,0 +1 @@
+2
diff --git a/kde/patch/kcoreaddons.patch b/kde/patch/kcoreaddons.patch
new file mode 100644
index 0000000..ee8ddde
--- /dev/null
+++ b/kde/patch/kcoreaddons.patch
@@ -0,0 +1,5 @@
+# KDEBUG #362161 (fixed in Frameworks 5.22.0):
+# Fixes regression introduced in 9ae6d765b37135bbfe3a8b936e5a88b8a435e424
+# Since the rand() was not seeded, the numbers generated were predictable.
+cat $CWD/patch/kcoreaddons/kcoreaddons.kdebug_362161.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kcoreaddons/kcoreaddons.kdebug_362161.patch b/kde/patch/kcoreaddons/kcoreaddons.kdebug_362161.patch
new file mode 100644
index 0000000..31bbcf7
--- /dev/null
+++ b/kde/patch/kcoreaddons/kcoreaddons.kdebug_362161.patch
@@ -0,0 +1,27 @@
+From: Albert Astals Cid <aacid@kde.org>
+Date: Tue, 26 Apr 2016 21:41:27 +0000
+Subject: Missing rand() -> qrand
+X-Git-Url: http://quickgit.kde.org/?p=kcoreaddons.git&a=commitdiff&h=78212436643af95779facd9593c82fb149c2213d
+---
+Missing rand() -> qrand
+
+Fixes regression introduced in 9ae6d765b37135bbfe3a8b936e5a88b8a435e424
+
+Reviewed by Aleix
+
+BUGS: 362161
+---
+
+
+--- a/src/lib/randomness/krandom.cpp
++++ b/src/lib/randomness/krandom.cpp
+@@ -51,7 +51,7 @@
+ }
+ qsrand(seed);
+ }
+- return rand();
++ return qrand();
+ }
+
+ QString KRandom::randomString(int length)
+