Patchwork gnu: i3status: Update to 2.10.

login
register
mail settings
Submitter Al McElrath
Date May 2, 2016, 11:07 p.m.
Message ID <87shy083fc.fsf@atonesir.com>
Download mbox | patch
Permalink /patch/11976/
State New
Headers show

Comments

Al McElrath - May 2, 2016, 11:07 p.m.
Attached is a patch to update i3status to 2.10.

The Makefile runs "setcap cap_net_admin=ep
$(DESTDIR)$(PREFIX)/bin/i3status)", which wasn't working in the prior
version, either. It makes the "%speed" element of the "ethernet" module
functional. I'm not sure how to handle that one. The package is
otherwise functional.
Leo Famulari - May 3, 2016, 12:28 p.m.
On Mon, May 02, 2016 at 04:07:19PM -0700, Al McElrath wrote:
> 
> Attached is a patch to update i3status to 2.10.

Thanks, I'm looking forward to testing this!
Leo Famulari - May 6, 2016, 6:01 p.m.
On Mon, May 02, 2016 at 04:07:19PM -0700, Al McElrath wrote:
> 
> Attached is a patch to update i3status to 2.10.

Thanks, it works! The changed library dependencies seem to be
working for me. Applied as 766a22fb4d1, preceded by a switch to https
URLs (I had to rebase your patch to adopt the changed home-page link
text).

> The Makefile runs "setcap cap_net_admin=ep
> $(DESTDIR)$(PREFIX)/bin/i3status)", which wasn't working in the prior
> version, either. It makes the "%speed" element of the "ethernet" module
> functional. I'm not sure how to handle that one. The package is
> otherwise functional.

I'm not sure what counts as "functional". For me, it shows the link
speed: 1000 Mbits. Should it dynamically show the bandwidth usage?

In any case, I tried making it a setuid binary, but that didn't seem to
create a change, and it's probably a bad idea anyways, since they only
ask for the cap_net_admin. Is i3status designed to be setuid?

I don't know how to set just this capability in Guix.

Advice appreciated!
Leo Famulari - May 6, 2016, 7:44 p.m.
On Fri, May 06, 2016 at 02:01:08PM -0400, Leo Famulari wrote:
> On Mon, May 02, 2016 at 04:07:19PM -0700, Al McElrath wrote:
> > 
> > Attached is a patch to update i3status to 2.10.
> 
> Thanks, it works! The changed library dependencies seem to be
> working for me. Applied as 766a22fb4d1, preceded by a switch to https
> URLs (I had to rebase your patch to adopt the changed home-page link
> text).

Oops, I didn't notice that the patch lacked a changelog entry, and
committed without it. We will both have to be more careful in the
future!

It should have been like this:

* gnu/packages/wm.scm (i3status): Update to 2.10.

> 
> > The Makefile runs "setcap cap_net_admin=ep
> > $(DESTDIR)$(PREFIX)/bin/i3status)", which wasn't working in the prior
> > version, either. It makes the "%speed" element of the "ethernet" module
> > functional. I'm not sure how to handle that one. The package is
> > otherwise functional.
> 
> I'm not sure what counts as "functional". For me, it shows the link
> speed: 1000 Mbits. Should it dynamically show the bandwidth usage?
> 
> In any case, I tried making it a setuid binary, but that didn't seem to
> create a change, and it's probably a bad idea anyways, since they only
> ask for the cap_net_admin. Is i3status designed to be setuid?
> 
> I don't know how to set just this capability in Guix.
> 
> Advice appreciated!
Al McElrath - May 9, 2016, 8:26 a.m.
Sorry I missed the changelog entry.

I actually can't test the %speed element because it only works with
wired connections (I'm on wireless right now). The man page just says it
should show the link speed. I don't think it's a big deal because the
man page is rather clear about how to make it work, and maybe it's not
something we want to assign by default anyway. i3status definitely
doesn't need setuid.

Thanks for reviewing and fixing up the patch!


Leo Famulari <leo@famulari.name> writes:

> On Fri, May 06, 2016 at 02:01:08PM -0400, Leo Famulari wrote:
>> On Mon, May 02, 2016 at 04:07:19PM -0700, Al McElrath wrote:
>> > 
>> > Attached is a patch to update i3status to 2.10.
>> 
>> Thanks, it works! The changed library dependencies seem to be
>> working for me. Applied as 766a22fb4d1, preceded by a switch to https
>> URLs (I had to rebase your patch to adopt the changed home-page link
>> text).
>
> Oops, I didn't notice that the patch lacked a changelog entry, and
> committed without it. We will both have to be more careful in the
> future!
>
> It should have been like this:
>
> * gnu/packages/wm.scm (i3status): Update to 2.10.
>
>> 
>> > The Makefile runs "setcap cap_net_admin=ep
>> > $(DESTDIR)$(PREFIX)/bin/i3status)", which wasn't working in the prior
>> > version, either. It makes the "%speed" element of the "ethernet" module
>> > functional. I'm not sure how to handle that one. The package is
>> > otherwise functional.
>> 
>> I'm not sure what counts as "functional". For me, it shows the link
>> speed: 1000 Mbits. Should it dynamically show the bandwidth usage?
>> 
>> In any case, I tried making it a setuid binary, but that didn't seem to
>> create a change, and it's probably a bad idea anyways, since they only
>> ask for the cap_net_admin. Is i3status designed to be setuid?
>> 
>> I don't know how to set just this capability in Guix.
>> 
>> Advice appreciated!
>

Patch

From f2c9bac0efab13aa33fb0d25ef9bd944f2b9d3ea Mon Sep 17 00:00:00 2001
From: Al McElrath <hello@yrns.org>
Date: Tue, 5 Apr 2016 16:21:19 -0700
Subject: [PATCH] gnu: i3status: Update to 2.10.

---
 gnu/packages/wm.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 60842ef..6c27ab0 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -6,6 +6,7 @@ 
 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
 ;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Al McElrath <hello@yrns.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,6 +34,7 @@ 
   #:use-module (gnu packages base)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages qt)
@@ -108,14 +110,14 @@  the leaves of a full binary tree.")
 (define-public i3status
   (package
     (name "i3status")
-    (version "2.9")
+    (version "2.10")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://i3wm.org/i3status/i3status-"
                                   version ".tar.bz2"))
               (sha256
                (base32
-                "1qwxbrga2fi5wf742hh9ajwa8b2kpzkjjnhjlz4wlpv21i80kss2"))))
+                "1497dsvb32z9xljmxz95dnyvsbayn188ilm3l4ys8m5h25vd1xfs"))))
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
@@ -128,9 +130,12 @@  the leaves of a full binary tree.")
        ("libconfuse" ,libconfuse)
        ("libyajl" ,libyajl)
        ("alsa-lib" ,alsa-lib)
-       ("wireless-tools" ,wireless-tools)
+       ("pulseaudio" ,pulseaudio)
+       ("libnl" ,libnl)
        ("libcap" ,libcap)
        ("asciidoc" ,asciidoc)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
     (home-page "http://i3wm.org/i3status/")
     (synopsis "Status bar for i3bar, dzen2, xmobar or similar programs")
     (description "i3status is a small program for generating a status bar for
-- 
2.8.0