From c49018492acfbbd6434d2a047f458e9be6611a95 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 18 May 2011 10:28:52 +0200 Subject: [PATCH] gnome-shell: add two patches from Fedora. --- ...ling-of-AP-flags-and-enhance-for-802.patch | 80 +++++++++++++++++++ ...ff-by-one-when-incrementally-adding-.patch | 31 +++++++ srcpkgs/gnome-shell/template | 2 + 3 files changed, 113 insertions(+) create mode 100644 srcpkgs/gnome-shell/patches/0001-network-fix-handling-of-AP-flags-and-enhance-for-802.patch create mode 100644 srcpkgs/gnome-shell/patches/appDisplay-Fix-off-by-one-when-incrementally-adding-.patch diff --git a/srcpkgs/gnome-shell/patches/0001-network-fix-handling-of-AP-flags-and-enhance-for-802.patch b/srcpkgs/gnome-shell/patches/0001-network-fix-handling-of-AP-flags-and-enhance-for-802.patch new file mode 100644 index 0000000000..2296d37c89 --- /dev/null +++ b/srcpkgs/gnome-shell/patches/0001-network-fix-handling-of-AP-flags-and-enhance-for-802.patch @@ -0,0 +1,80 @@ +From 101a07a3d79223cc153a6c65f22acd76cbae4818 Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Tue, 3 May 2011 12:21:45 -0500 +Subject: [PATCH 1/3] network: fix handling of AP flags and enhance for 802.1x + +All WPA APs were getting set as WPA2 due to the check for privacy; +WPA/WPA2 APs *must* set the Privacy bit according to the standard, +so we'd never end up in the case for NMAccessPointSecurity.WPA. + +Fix that, and also add flags for WPA[2] Enterprise which we'll +use a bit later for the first-time connect case for 802.1x enabled +access points. +--- + js/ui/status/network.js | 38 +++++++++++++++++++++----------------- + 1 files changed, 21 insertions(+), 17 deletions(-) + +diff --git a/js/ui/status/network.js b/js/ui/status/network.js +index bf8e272..6f0cdac 100644 +--- a/js/ui/status/network.js ++++ b/js/ui/status/network.js +@@ -33,8 +33,10 @@ const NMAccessPointSecurity = { + UNKNOWN: 0, + NONE: 1, + WEP: 2, +- WPA: 3, +- WPA2: 4 ++ WPA_PSK: 3, ++ WPA2_PSK: 4, ++ WPA_ENT: 5, ++ WPA2_ENT: 6 + }; + + // small optimization, to avoid using [] all the time +@@ -1129,26 +1131,28 @@ NMDeviceWireless.prototype = { + _getApSecurityType: function(accessPoint) { + if (accessPoint._secType) + return accessPoint._secType; +- // XXX: have this checked by someone familiar with IEEE 802.1x + + let flags = accessPoint.flags; + let wpa_flags = accessPoint.wpa_flags; + let rsn_flags = accessPoint.rsn_flags; + let type; +- if ( !(flags & NM80211ApFlags.PRIVACY) +- && (wpa_flags == NM80211ApSecurityFlags.NONE) +- && (rsn_flags == NM80211ApSecurityFlags.NONE)) +- type = NMAccessPointSecurity.NONE; +- else if ( (flags & NM80211ApFlags.PRIVACY) +- && (wpa_flags == NM80211ApSecurityFlags.NONE) +- && (rsn_flags == NM80211ApSecurityFlags.NONE)) +- type = NMAccessPointSecurity.WEP; +- else if ( !(flags & NM80211ApFlags.PRIVACY) +- && (wpa_flags != NM80211ApSecurity.NONE) +- && (rsn_flags != NM80211ApSecurity.NONE)) +- type = NMAccessPointSecurity.WPA; +- else +- type = NMAccessPointSecurity.WPA2; ++ if (rsn_flags != NM80211ApSecurityFlags.NONE) { ++ /* RSN check first so that WPA+WPA2 APs are treated as RSN/WPA2 */ ++ if (rsn_flags & NM80211ApSecurityFlags.KEY_MGMT_802_1X) ++ type = NMAccessPointSecurity.WPA2_ENT; ++ else if (rsn_flags & NM80211ApSecurityFlags.KEY_MGMT_PSK) ++ type = NMAccessPointSecurity.WPA2_PSK; ++ } else if (wpa_flags != NM80211ApSecurityFlags.NONE) { ++ if (wpa_flags & NM80211ApSecurityFlags.KEY_MGMT_802_1X) ++ type = NMAccessPointSecurity.WPA_ENT; ++ else if (wpa_flags & NM80211ApSecurityFlags.KEY_MGMT_PSK) ++ type = NMAccessPointSecurity.WPA_PSK; ++ } else { ++ if (flags & NM80211ApFlags.PRIVACY) ++ type = NMAccessPointSecurity.WEP; ++ else ++ type = NMAccessPointSecurity.NONE; ++ } + + // cache the found value to avoid checking flags all the time + accessPoint._secType = type; +-- +1.7.5 + diff --git a/srcpkgs/gnome-shell/patches/appDisplay-Fix-off-by-one-when-incrementally-adding-.patch b/srcpkgs/gnome-shell/patches/appDisplay-Fix-off-by-one-when-incrementally-adding-.patch new file mode 100644 index 0000000000..4329abb501 --- /dev/null +++ b/srcpkgs/gnome-shell/patches/appDisplay-Fix-off-by-one-when-incrementally-adding-.patch @@ -0,0 +1,31 @@ +From 4e9ef93c0691dab6d90935353e6de981cbddac54 Mon Sep 17 00:00:00 2001 +From: Owen W. Taylor +Date: Wed, 27 Apr 2011 07:50:10 -0400 +Subject: [PATCH] appDisplay: Fix off-by-one when incrementally adding + application icons + +A "cosmetic" code arrangement I requested in code review resulted +in one too few items being removed from the queue for each incremental +chunk of icons added. Fix. + +https://bugzilla.gnome.org/show_bug.cgi?id=648739 +--- + js/ui/appDisplay.js | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js +index cd502ef..6fe12a4 100644 +--- a/js/ui/appDisplay.js ++++ b/js/ui/appDisplay.js +@@ -126,7 +126,7 @@ AlphabeticalView.prototype = { + if (currentTimeMillis - startTimeMillis > MAX_APPLICATION_WORK_MILLIS) + break; + } +- this._pendingAppIds.splice(0, i); ++ this._pendingAppIds.splice(0, i + 1); + if (this._pendingAppIds.length > 0) { + return true; + } else { +-- +1.7.4.4 + diff --git a/srcpkgs/gnome-shell/template b/srcpkgs/gnome-shell/template index 13b393fc42..5f3a552a28 100644 --- a/srcpkgs/gnome-shell/template +++ b/srcpkgs/gnome-shell/template @@ -1,6 +1,8 @@ # Template file for 'gnome-shell' pkgname=gnome-shell version=3.0.1 +revision=1 +patch_args="-Np1" distfiles="${GNOME_SITE}/$pkgname/3.0/$pkgname-$version.tar.bz2" build_style=gnu_configure configure_args="--disable-schemas-install --disable-schemas-compile