2017-06-25 13:04:53

by Sami Kerola

[permalink] [raw]
Subject: rfkill(8) move and improvements

Hello maintainers and other,

The otherday I ran powertop and it did rfkill to save battery, which was
particularly annoying because I had not installed rfkill(8) package.
Fixing the immediate issue was relatively easy, but the ordeal made me
wonder if this tool could be moved to a package that is installed by
default to all systems, such as util-linux.

To put money where my mouth is I have done the time consuming bits of the
move. Notice that full history of the rfkill project is saved in the git
branch below, with attribution to original authors and no change to
copyleft statement.

https://github.com/kerolasa/lelux-utiliteetit/tree/rfkill

But it would not be sufficient to do just the minimal, so I took liberty
to make few additional changes. These include libsmartcols output,
bash-completion file, add syslog message when state changes happen, and
converting unix timestamps in event output to human readable format.
Perhaps the easiest is to simply to see what I have done something like:

git clone https://github.com/kerolasa/lelux-utiliteetit.git rfkill-proposal
cd rfkill-proposal
./autogen.sh && ./configure && make -j4
git checkout rfkill
./rfkill
./rfkill --help
./rfkill event
man ./sys-utils/rfkill.8
. bash-completion/rfkill
PATH="$PWD:$PATH"
rfkill <tab tab>
git show origin/rfkill-master..origin/rfkill

What do you think, would the move and proposed updates be ok?

--
Sami Kerola
http://www.iki.fi/kerolasa/


2017-06-29 14:04:05

by Johannes Berg

[permalink] [raw]
Subject: Re: rfkill(8) move and improvements

Hi Sami, all,

> The otherday I ran powertop and it did rfkill to save battery, which
> was particularly annoying because I had not installed rfkill(8)
> package.  
> Fixing the immediate issue was relatively easy, but the ordeal made
> me wonder if this tool could be moved to a package that is installed
> by default to all systems, such as util-linux.

[...]

> What do you think, would the move and proposed updates be ok?

I can't say I mind, and most of your proposed changes seem sensible,
though I haven't reviewed them in enough detail to comment on them.
Something that caught my eye here was comparing a string to _("all")
which seems wrong, since that'd mean you'd have to type the translated
version even on the command line? That seems really awkward (to put it
charitably).

However, at the same time, I have very little desire to get involved
with util-linux as yet another project, so frankly I'd probably
continue to "maintain" the current rfkill tool - which really hasn't
changed in a very long time, and hope somebody else picks up
maintenance of rfkill included in util-linux.

johannes

2017-06-30 07:47:34

by Karel Zak

[permalink] [raw]
Subject: Re: rfkill(8) move and improvements

On Thu, Jun 29, 2017 at 10:23:12PM +0100, Sami Kerola wrote:
> On 29 June 2017 at 15:04, Johannes Berg <[email protected]> wrote:
> >> The otherday I ran powertop and it did rfkill to save battery, which
> >> was particularly annoying because I had not installed rfkill(8)
> >> package.
> >> Fixing the immediate issue was relatively easy, but the ordeal made
> >> me wonder if this tool could be moved to a package that is installed
> >> by default to all systems, such as util-linux.
> >
> > [...]
> >
> >> What do you think, would the move and proposed updates be ok?
> >
> > I can't say I mind, and most of your proposed changes seem sensible,
> > though I haven't reviewed them in enough detail to comment on them.
> > Something that caught my eye here was comparing a string to _("all")
> > which seems wrong, since that'd mean you'd have to type the translated
> > version even on the command line? That seems really awkward (to put it
> > charitably).
> >
> > However, at the same time, I have very little desire to get involved
> > with util-linux as yet another project, so frankly I'd probably
> > continue to "maintain" the current rfkill tool - which really hasn't
> > changed in a very long time, and hope somebody else picks up
> > maintenance of rfkill included in util-linux.
>
> Hello Johannes,
>
> Thank you for feedback. I removed the rfkill command strings from
> translations, and gave hint to translators how to deal with them in
> usage() output. Also in same go updates are rebased on top of
> most recent upstream to get usage() --help and --version handling
> done correctly.
>
> What comes to maintenance I am fairly optimistic util-linux is a
> good home for the rfkill. Karel, what do you think?

I have no problem with it, if Johannes agree with this step. We have
definitely manpower to maintain it.

Karel

--
Karel Zak <[email protected]>
http://karelzak.blogspot.com

2017-06-29 21:23:13

by Sami Kerola

[permalink] [raw]
Subject: Re: rfkill(8) move and improvements

On 29 June 2017 at 15:04, Johannes Berg <[email protected]> wrote:
>> The otherday I ran powertop and it did rfkill to save battery, which
>> was particularly annoying because I had not installed rfkill(8)
>> package.
>> Fixing the immediate issue was relatively easy, but the ordeal made
>> me wonder if this tool could be moved to a package that is installed
>> by default to all systems, such as util-linux.
>
> [...]
>
>> What do you think, would the move and proposed updates be ok?
>
> I can't say I mind, and most of your proposed changes seem sensible,
> though I haven't reviewed them in enough detail to comment on them.
> Something that caught my eye here was comparing a string to _("all")
> which seems wrong, since that'd mean you'd have to type the translated
> version even on the command line? That seems really awkward (to put it
> charitably).
>
> However, at the same time, I have very little desire to get involved
> with util-linux as yet another project, so frankly I'd probably
> continue to "maintain" the current rfkill tool - which really hasn't
> changed in a very long time, and hope somebody else picks up
> maintenance of rfkill included in util-linux.

Hello Johannes,

Thank you for feedback. I removed the rfkill command strings from
translations, and gave hint to translators how to deal with them in
usage() output. Also in same go updates are rebased on top of
most recent upstream to get usage() --help and --version handling
done correctly.

What comes to maintenance I am fairly optimistic util-linux is a
good home for the rfkill. Karel, what do you think?

--
Sami Kerola
http://www.iki.fi/kerolasa/

2017-07-01 09:07:13

by Sami Kerola

[permalink] [raw]
Subject: Re: rfkill(8) move and improvements

On Fri, 30 Jun 2017, Karel Zak wrote:

> On Thu, Jun 29, 2017 at 10:23:12PM +0100, Sami Kerola wrote:
> > On 29 June 2017 at 15:04, Johannes Berg <[email protected]> wrote:
> > >> The otherday I ran powertop and it did rfkill to save battery, which
> > >> was particularly annoying because I had not installed rfkill(8)
> > >> package.
> > >> Fixing the immediate issue was relatively easy, but the ordeal made
> > >> me wonder if this tool could be moved to a package that is installed
> > >> by default to all systems, such as util-linux.
> > >
> > > [...]
> > >
> > >> What do you think, would the move and proposed updates be ok?
> > >
> > > I can't say I mind, and most of your proposed changes seem sensible,
> > > though I haven't reviewed them in enough detail to comment on them.
> > > Something that caught my eye here was comparing a string to _("all")
> > > which seems wrong, since that'd mean you'd have to type the translated
> > > version even on the command line? That seems really awkward (to put it
> > > charitably).
> > >
> > > However, at the same time, I have very little desire to get involved
> > > with util-linux as yet another project, so frankly I'd probably
> > > continue to "maintain" the current rfkill tool - which really hasn't
> > > changed in a very long time, and hope somebody else picks up
> > > maintenance of rfkill included in util-linux.
> >
> > Hello Johannes,
> >
> > Thank you for feedback. I removed the rfkill command strings from
> > translations, and gave hint to translators how to deal with them in
> > usage() output. Also in same go updates are rebased on top of
> > most recent upstream to get usage() --help and --version handling
> > done correctly.
> >
> > What comes to maintenance I am fairly optimistic util-linux is a
> > good home for the rfkill. Karel, what do you think?
>
> I have no problem with it, if Johannes agree with this step. We have
> definitely manpower to maintain it.

Hello,

I did couple last minute changes to my remote branch, that should now be
ready for final review.

git://github.com/kerolasa/lelux-utiliteetit.git rfkill

The changes:

1. Add commit to make rfkill_event struct read size check to be back and
forward compatible.
https://github.com/kerolasa/lelux-utiliteetit/commit/fdb76db0d32fdd77bff49b6c2a7db77763b1c4e4

2. Refer this email thread in merge commit.
https://github.com/kerolasa/lelux-utiliteetit/commit/0b6c2693debf1219cfbe39dcf70e208abc94c1af

3. Change 'yes' and 'no' in rfkill status output to 'blocked' and
'unblocked' that are more associative with command strings. Here is a
sample output:

$ rfkill
DEVICE ID TYPE SOFT HARD
ideapad_wlan 0 wlan unblocked unblocked
ideapad_bluetooth 1 bluetooth blocked unblocked
hci0 2 bluetooth blocked unblocked
phy0 3 wlan unblocked unblocked

4. Mark in configure.ac rfkill is linux only utility.
https://github.com/kerolasa/lelux-utiliteetit/commit/5f715abb96a4fa3699bcfdb35d029d7ae3a5ea07#diff-67e997bcfdac55191033d57a16d1408aR1596

5. Small wording change in --output manual page entry: s/list of all
supported/list of available/. The later matches with --help output
title, hopefully makes it easier to know what is being referred.

--
Sami Kerola
http://www.iki.fi/kerolasa/

2017-08-30 19:40:02

by Sami Kerola

[permalink] [raw]
Subject: Re: rfkill(8) move and improvements

On 1 July 2017 at 10:06, Sami Kerola <[email protected]> wrote:
> I did couple last minute changes to my remote branch, that should now be
> ready for final review.
>
> git://github.com/kerolasa/lelux-utiliteetit.git rfkill

Hello,

It's been a while. I did not get any review feedback, so I assume changes
were ok. Would it be possible to move forward with the merge to
util-linux upstream?

--
Sami Kerola
http://www.iki.fi/kerolasa/

2017-08-31 09:47:08

by Karel Zak

[permalink] [raw]
Subject: Re: rfkill(8) move and improvements

On Wed, Aug 30, 2017 at 08:40:01PM +0100, Sami Kerola wrote:
> On 1 July 2017 at 10:06, Sami Kerola <[email protected]> wrote:
> > I did couple last minute changes to my remote branch, that should now be
> > ready for final review.
> >
> > git://github.com/kerolasa/lelux-utiliteetit.git rfkill
>
> Hello,
>
> It's been a while. I did not get any review feedback, so I assume changes
> were ok. Would it be possible to move forward with the merge to
> util-linux upstream?

Merged to util-linux.

Karel

--
Karel Zak <[email protected]>
http://karelzak.blogspot.com