[arch-projects] [netctl] [GIT] Network control utility based on systemd branch master updated. 1.16-5-g4be6904

2018-06-26 Thread Jouke Witteveen via arch-projects
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Network control utility based on systemd".

The branch, master has been updated
   via  4be6904e2518b5b13675439d6b89592e6bb4a6e3 (commit)
   via  580f80add61423343d8ec35363a5eab39989d104 (commit)
   via  e4638274ac7f84b749cdcbd8e93f06a5564280e7 (commit)
  from  1ae84f054368f012ffa3b70b873e24c35767f4d3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
commit 4be6904e2518b5b13675439d6b89592e6bb4a6e3
Author: Jouke Witteveen 
Date:   Tue Jun 26 18:26:13 2018 +0200

1.17 release updates

commit 580f80add61423343d8ec35363a5eab39989d104
Author: Jouke Witteveen 
Date:   Tue Jun 26 17:58:34 2018 +0200

Small documentation updates

commit e4638274ac7f84b749cdcbd8e93f06a5564280e7
Author: Jouke Witteveen 
Date:   Sat Jun 23 13:14:25 2018 +0200

wifi-menu: Support UTF-8 encoded SSIDs (FS#45384)

Strictly speaking, we should check with the SSIDEncoding value sent out
by the station, as specified in the 2012 version of 802.11 (page 566),
but wpa_supplicant does not (yet) expose this information and stations
may not set the field to UTF-8 and still encode their SSID accordingly.

We therefore assume SSIDs to be UTF-8 encoded (the only real alternative
is treating SSIDs as raw byte string) in wifi-menu. Note that wifi-menu
is only provided as a convenience and many/most use cases involve
writing profile files manually.

When the current character map is not set to UTF-8, wifi-menu will only
use ASCII characters in its screen output.
This can be forced using for example `LC_CTYPE=C wifi-menu`.

Thanks to Declspeck  for their activity on the
Flyspray task.

---

Summary of changes:
 Makefile  |  2 +-
 NEWS  |  4 
 docs/netctl.profile.5.txt | 10 ++
 src/wifi-menu | 46 +-
 4 files changed, 44 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
Network control utility based on systemd


[arch-projects] [netctl] [GIT] Network control utility based on systemd annotated tag 1.17 created. 1.17

2018-06-26 Thread Jouke Witteveen via arch-projects
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Network control utility based on systemd".

The annotated tag, 1.17 has been created
at  00116412c1b163ba2fe4b5ae6c77e4b09dcc68f0 (tag)
   tagging  4be6904e2518b5b13675439d6b89592e6bb4a6e3 (commit)
  replaces  1.16
 tagged by  Jouke Witteveen
on  Tue Jun 26 18:26:30 2018 +0200

- Log -
Release 1.17
-BEGIN PGP SIGNATURE-

iQFKBAABCAA0FiEEbql9KtO+F66lkufaVrYfv4JJLBUFAlsyaT4WHGoud2l0dGV2
ZWVuQGdtYWlsLmNvbQAKCRBWth+/gkksFbR+B/9D8qf1VB728c2wHC+1xnpWyLrS
9ImopurAVHECh0KGjI0wxlTWqQ61yXMEu9eejkUD7hxwMJAmzq/8BxnT/PbXMZlP
N4hdkDdhEYfgu0JULMTxuRdT6AhnRbUt/3MqZ0UP1r9CRZTiFmTIW10y6UrM5dIf
Mab36vSvYJuQI0zipyXT4NVOHj+n7cKhr34EgLyeJpDkfxBOL3h9h2bAl2Rx93ok
l42HibRFdRI72SCcxYj2yOmo3DhGUuuIn0HxwSxveS4uhReDduzdnUnbN6cB7JO0
LPkIN7iNftBR1NP8wryuN2mZ5CFatayayqvayTa/frtibeBLZBJ8EsRL726K
=g9be
-END PGP SIGNATURE-

Jouke Witteveen (5):
  Improved handling of exposed variables
  Code and comments streamlining
  wifi-menu: Support UTF-8 encoded SSIDs (FS#45384)
  Small documentation updates
  1.17 release updates

---


hooks/post-receive
-- 
Network control utility based on systemd


Re: [arch-projects] [netctl] [PATCH] wifi-menu: Support UTF-8 encoded SSIDs (FS#45384)

2018-06-26 Thread Emil Velikov via arch-projects
On 26 June 2018 at 11:34, Jouke Witteveen  wrote:
> On Tue, Jun 26, 2018 at 12:17 PM Emil Velikov  
> wrote:
>> On 23 June 2018 at 12:25, Jouke Witteveen via arch-projects
>>  wrote:
>> > Strictly speaking, we should check with the SSIDEncoding value sent out
>> > by the station, as specified in the 2012 version of 802.11 (page 566),
>> > but wpa_supplicant does not (yet) expose this information and stations
>> > may not set the field to UTF-8 and still encode their SSID accordingly.
>> >
>> I wonder if iwd (meant to be wpa_supplicant replacement) could help here.
>> Be that by exposing SSIDEncoding or setting it, as it detects UTF-8 in the 
>> SSID.
>
> As far as I can tell, only developers of iwd think of iwd as a
> wpa_supplicant replacement. Currently, it is lacking a CLI and
> documentation. Moreover, wpa_supplicant is tried and tested. While I
> try to not tie netctl in too strongly with any specific client,
> wpa_supplicant will likely be the client of choice for netctl for the
> foreseeable future.
>
I've noticed the iwctl and iwmon utils provided, although did not play
around with them.
You're on point though, sticking with wpa_supplicant for the
foreseeable future is fine.

> I submitted a patch to wpa_supplicant for exposing the UTF-8 SSID bit:
> http://lists.infradead.org/pipermail/hostap/2018-June/038658.html
> However, experimentation showed that it is not really used (yet?).
>
Vendors may start using it... one day

Thanks again for the comprehensive answers!
Emil


[arch-projects] [netctl] [PATCH] Simplify init_profiles() implementation

2018-06-26 Thread Emil Velikov via arch-projects
From: Emil Velikov 

Currently each profile is handles in two stages:
 - a unique value is returned for a set of patterns matches
 - depending on the value the profile/essid is added to global lists

A shorter and simpler solution is to omit the unnecessary value
passing/processing all together.

Cc: Jouke Witteveen 
Signed-off-by: Emil Velikov 
---
Jouke, let me know if you'd like this rebased on top of your patch.
Pardon if you're getting this twice. The initial submission was rejected
by the ML :-\
---
 src/wifi-menu | 40 ++--
 1 file changed, 14 insertions(+), 26 deletions(-)

diff --git a/src/wifi-menu b/src/wifi-menu
index 42c4c53..928cf5e 100755
--- a/src/wifi-menu
+++ b/src/wifi-menu
@@ -29,34 +29,22 @@ quote_safe() {
 fi
 }
 
-# Fill PROFILES and ESSIDS with the profile names and essids of the profiles
-# for interface $1
+# Fill GENERATED, PROFILES and ESSIDS with the profile names and essids of the
+# profiles for interface $1
 init_profiles() {
-local i=0 essid profile
+local i=0 profile
 while IFS= read -r profile; do
-essid=$(
-unset Interface ESSID
-source "$PROFILE_DIR/$profile" > /dev/null
-if [[ "$Interface" = "$1" && -n "$ESSID" ]]; then
-printf "%s" "$ESSID"
-if [[ "$Description" =~ "Automatically generated" ]]; then
-return 2
-else
-return 1
-fi
-fi
-return 0
-)
-case $? in
-2)
-GENERATED+=("$profile")
-;&
-1)
-PROFILES[i]=$profile
-ESSIDS[i]=$essid
-(( ++i ))
-;;
-esac
+unset Interface ESSID
+source "$PROFILE_DIR/$profile" > /dev/null
+if [[ "$Interface" != "$1" || -z "$ESSID" ]]; then
+continue;
+fi
+if [[ "$Description" =~ "Automatically generated" ]]; then
+GENERATED+=("$profile")
+fi
+PROFILES[i]=$profile
+ESSIDS[i]=$ESSID
+(( ++i ))
 done < <(list_profiles)
 }
 
-- 
2.18.0


Re: [arch-projects] [netctl] [PATCH] wifi-menu: Support UTF-8 encoded SSIDs (FS#45384)

2018-06-26 Thread Emil Velikov via arch-projects
Hi Jouke,

Thanks for fixing this!
Sharing a couple of ideas that come to mind.

On 23 June 2018 at 12:25, Jouke Witteveen via arch-projects
 wrote:
> Strictly speaking, we should check with the SSIDEncoding value sent out
> by the station, as specified in the 2012 version of 802.11 (page 566),
> but wpa_supplicant does not (yet) expose this information and stations
> may not set the field to UTF-8 and still encode their SSID accordingly.
>
I wonder if iwd (meant to be wpa_supplicant replacement) could help here.
Be that by exposing SSIDEncoding or setting it, as it detects UTF-8 in the SSID.


> @@ -38,6 +43,9 @@ init_profiles() {
>  unset Interface ESSID
>  source "$PROFILE_DIR/$profile" > /dev/null
>  if [[ "$Interface" = "$1" && -n "$ESSID" ]]; then
> +if [[ "$ESSID" = \"\"*\" ]]; then
> +ESSID=${ESSID:2:-1}
> +fi
FYI, I will send out a small patch which simplifying init_profiles.
It will cause a trivial conflict so I can rebase it on top of this
patch, if you prefer.

> @@ -221,6 +237,8 @@ ensure_root "$(basename "$0")"
>  if ! type dialog &> /dev/null; then
>  exit_error "Please install 'dialog' to use wifi-menu"
>  fi
> +CHARMAP=$(locale charmap)
> +cd /  # We do not want to spawn anything that can block unmounting
>
Was the "cd /" line moved by mistake?

Other than the cd nitpick, the patch looks great. FWIW
Reviewed-by: Emil Velikov 

HTH
Emil