Accepting request 360174 from home:elvigia:branches:hardware
- Previous update did not include version 2.5 tarball or changed the version number in spec, only the changelog and removed patches. - config: set CONFIG_NO_RANDOM_POOL=y, we have a reliable· random number generator by using /dev/urandom, no need to keep an internal random number pool which draws entropy from /dev/random. - config: prefer using epoll(7) instead of select(2) by setting CONFIG_ELOOP_EPOLL=y - wpa_supplicant-getrandom.patch: Prefer to use the getrandom(2) system call to collect entropy. if it is not present disable buffering when reading /dev/urandom, otherwise each os_get_random() call will request BUFSIZ of entropy instead of the few needed bytes. OBS-URL: https://build.opensuse.org/request/show/360174 OBS-URL: https://build.opensuse.org/package/show/hardware/wpa_supplicant?expand=0&rev=60
This commit is contained in:
parent
273bca4cee
commit
d8f638566d
4
config
4
config
@ -265,7 +265,7 @@ CONFIG_BACKEND=file
|
|||||||
#CONFIG_ELOOP_POLL=y
|
#CONFIG_ELOOP_POLL=y
|
||||||
|
|
||||||
# Should we use epoll instead of select? Select is used by default.
|
# Should we use epoll instead of select? Select is used by default.
|
||||||
#CONFIG_ELOOP_EPOLL=y
|
CONFIG_ELOOP_EPOLL=y
|
||||||
|
|
||||||
# Select layer 2 packet implementation
|
# Select layer 2 packet implementation
|
||||||
# linux = Linux packet socket (default)
|
# linux = Linux packet socket (default)
|
||||||
@ -433,7 +433,7 @@ CONFIG_DEBUG_FILE=y
|
|||||||
# disabled. This will save some in binary size and CPU use. However, this
|
# disabled. This will save some in binary size and CPU use. However, this
|
||||||
# should only be considered for builds that are known to be used on devices
|
# should only be considered for builds that are known to be used on devices
|
||||||
# that meet the requirements described above.
|
# that meet the requirements described above.
|
||||||
#CONFIG_NO_RANDOM_POOL=y
|
CONFIG_NO_RANDOM_POOL=y
|
||||||
|
|
||||||
# IEEE 802.11n (High Throughput) support (mainly for AP mode)
|
# IEEE 802.11n (High Throughput) support (mainly for AP mode)
|
||||||
CONFIG_IEEE80211N=y
|
CONFIG_IEEE80211N=y
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:058dc832c096139a059e6df814080f50251a8d313c21b13364c54a1e70109122
|
|
||||||
size 2525648
|
|
3
wpa_supplicant-2.5.tar.gz
Normal file
3
wpa_supplicant-2.5.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:cce55bae483b364eae55c35ba567c279be442ed8bab5b80a3c7fb0d057b9b316
|
||||||
|
size 2607336
|
44
wpa_supplicant-getrandom.patch
Normal file
44
wpa_supplicant-getrandom.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
--- wpa_supplicant-2.4.orig/src/utils/os_unix.c
|
||||||
|
+++ wpa_supplicant-2.4/src/utils/os_unix.c
|
||||||
|
@@ -6,11 +6,15 @@
|
||||||
|
* See README for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#ifndef _GNU_SOURCE
|
||||||
|
+#define _GNU_SOURCE
|
||||||
|
+#endif
|
||||||
|
#include "includes.h"
|
||||||
|
|
||||||
|
#include <time.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
|
-
|
||||||
|
+#include <sys/syscall.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
#ifdef ANDROID
|
||||||
|
#include <sys/capability.h>
|
||||||
|
#include <sys/prctl.h>
|
||||||
|
@@ -223,6 +227,10 @@ void os_daemonize_terminate(const char *
|
||||||
|
|
||||||
|
int os_get_random(unsigned char *buf, size_t len)
|
||||||
|
{
|
||||||
|
+#ifdef SYS_getrandom
|
||||||
|
+ int gr = TEMP_FAILURE_RETRY(syscall(SYS_getrandom, buf, len, 0));
|
||||||
|
+ return (gr != -1 && gr == len) ? 0 : -1;
|
||||||
|
+#else
|
||||||
|
FILE *f;
|
||||||
|
size_t rc;
|
||||||
|
|
||||||
|
@@ -232,10 +240,13 @@ int os_get_random(unsigned char *buf, si
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ setbuf(f, NULL);
|
||||||
|
+
|
||||||
|
rc = fread(buf, 1, len, f);
|
||||||
|
fclose(f);
|
||||||
|
|
||||||
|
return rc != len ? -1 : 0;
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -1,3 +1,20 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 18 15:36:23 UTC 2016 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
- Previous update did not include version 2.5 tarball
|
||||||
|
or changed the version number in spec, only the changelog
|
||||||
|
and removed patches.
|
||||||
|
- config: set CONFIG_NO_RANDOM_POOL=y, we have a reliable·
|
||||||
|
random number generator by using /dev/urandom, no need to
|
||||||
|
keep an internal random number pool which draws entropy from
|
||||||
|
/dev/random.
|
||||||
|
- config: prefer using epoll(7) instead of select(2)
|
||||||
|
by setting CONFIG_ELOOP_EPOLL=y
|
||||||
|
- wpa_supplicant-getrandom.patch: Prefer to use the getrandom(2)
|
||||||
|
system call to collect entropy. if it is not present disable
|
||||||
|
buffering when reading /dev/urandom, otherwise each os_get_random()
|
||||||
|
call will request BUFSIZ of entropy instead of the few needed bytes.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Feb 17 13:47:43 UTC 2016 - lnussel@suse.de
|
Wed Feb 17 13:47:43 UTC 2016 - lnussel@suse.de
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
%define _rundir %{_localstatedir}/run
|
%define _rundir %{_localstatedir}/run
|
||||||
%endif
|
%endif
|
||||||
Name: wpa_supplicant
|
Name: wpa_supplicant
|
||||||
Version: 2.4
|
Version: 2.5
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: WPA supplicant implementation
|
Summary: WPA supplicant implementation
|
||||||
License: BSD-3-Clause and GPL-2.0+
|
License: BSD-3-Clause and GPL-2.0+
|
||||||
@ -40,6 +40,7 @@ Patch1: wpa_supplicant-flush-debug-output.patch
|
|||||||
# is not portable
|
# is not portable
|
||||||
Patch2: wpa_supplicant-sigusr1-changes-debuglevel.patch
|
Patch2: wpa_supplicant-sigusr1-changes-debuglevel.patch
|
||||||
Patch3: wpa_supplicant-alloc_size.patch
|
Patch3: wpa_supplicant-alloc_size.patch
|
||||||
|
Patch4: wpa_supplicant-getrandom.patch
|
||||||
BuildRequires: dbus-1-devel
|
BuildRequires: dbus-1-devel
|
||||||
BuildRequires: libnl3-devel
|
BuildRequires: libnl3-devel
|
||||||
BuildRequires: libqt4
|
BuildRequires: libqt4
|
||||||
@ -76,7 +77,7 @@ cp %{SOURCE1} wpa_supplicant/.config
|
|||||||
%patch1
|
%patch1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
%build
|
%build
|
||||||
cd wpa_supplicant
|
cd wpa_supplicant
|
||||||
CFLAGS="%{optflags}" make V=1 %{?_smp_mflags}
|
CFLAGS="%{optflags}" make V=1 %{?_smp_mflags}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user