All of lore.kernel.org
 help / color / mirror / Atom feed
* rfkill(8) move and improvements
@ 2017-06-25 13:04 Sami Kerola
  2017-06-29 14:04 ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Sami Kerola @ 2017-06-25 13:04 UTC (permalink / raw)
  To: Johannes Berg, Marcel Holtmann, Tim Gardner, Karel Zak
  Cc: linux-wireless, util-linux

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/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: rfkill(8) move and improvements
  2017-06-25 13:04 rfkill(8) move and improvements Sami Kerola
@ 2017-06-29 14:04 ` Johannes Berg
  2017-06-29 21:23   ` Sami Kerola
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2017-06-29 14:04 UTC (permalink / raw)
  To: Sami Kerola, Marcel Holtmann, Tim Gardner, Karel Zak
  Cc: linux-wireless, util-linux

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: rfkill(8) move and improvements
  2017-06-29 14:04 ` Johannes Berg
@ 2017-06-29 21:23   ` Sami Kerola
  2017-06-30  7:47     ` Karel Zak
  0 siblings, 1 reply; 8+ messages in thread
From: Sami Kerola @ 2017-06-29 21:23 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Marcel Holtmann, Karel Zak, linux-wireless, util-linux

On 29 June 2017 at 15:04, Johannes Berg <johannes@sipsolutions.net> 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/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: rfkill(8) move and improvements
  2017-06-29 21:23   ` Sami Kerola
@ 2017-06-30  7:47     ` Karel Zak
  2017-07-01  9:06       ` Sami Kerola
  0 siblings, 1 reply; 8+ messages in thread
From: Karel Zak @ 2017-06-30  7:47 UTC (permalink / raw)
  To: kerolasa; +Cc: Johannes Berg, Marcel Holtmann, linux-wireless, util-linux

On Thu, Jun 29, 2017 at 10:23:12PM +0100, Sami Kerola wrote:
> On 29 June 2017 at 15:04, Johannes Berg <johannes@sipsolutions.net> 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  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: rfkill(8) move and improvements
  2017-06-30  7:47     ` Karel Zak
@ 2017-07-01  9:06       ` Sami Kerola
  2017-08-30 19:40         ` Sami Kerola
  0 siblings, 1 reply; 8+ messages in thread
From: Sami Kerola @ 2017-07-01  9:06 UTC (permalink / raw)
  To: Karel Zak; +Cc: Johannes Berg, Marcel Holtmann, linux-wireless, util-linux

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 <johannes@sipsolutions.net> 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/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: rfkill(8) move and improvements
  2017-07-01  9:06       ` Sami Kerola
@ 2017-08-30 19:40         ` Sami Kerola
  2017-08-31  9:46           ` Karel Zak
  2017-08-31  9:47           ` Karel Zak
  0 siblings, 2 replies; 8+ messages in thread
From: Sami Kerola @ 2017-08-30 19:40 UTC (permalink / raw)
  To: Karel Zak; +Cc: Johannes Berg, Marcel Holtmann, linux-wireless, util-linux

On 1 July 2017 at 10:06, Sami Kerola <kerolasa@iki.fi> 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/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: rfkill(8) move and improvements
  2017-08-30 19:40         ` Sami Kerola
@ 2017-08-31  9:46           ` Karel Zak
  2017-08-31  9:47           ` Karel Zak
  1 sibling, 0 replies; 8+ messages in thread
From: Karel Zak @ 2017-08-31  9:46 UTC (permalink / raw)
  To: kerolasa; +Cc: util-linux

On Wed, Aug 30, 2017 at 08:40:01PM +0100, Sami Kerola wrote:
> On 1 July 2017 at 10:06, Sami Kerola <kerolasa@iki.fi> 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. Changes:

* removed sys-utils/rfkill.py (nowhere used by build-system, also
  missing in Fedora package)

* added --disable-rfkill to make it possible to resolve conflicts with
  the original version

* usage() cleanup (USAGE_COMMANDS,  USAGE_COLUMNS, etc..)

* cleanup returns; it's always better to return 0,1,<0 in functions
  and use EXIT_* in the main() only (well, except err())

Please, tests it (now I'm on workstation without any relevant HW).

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: rfkill(8) move and improvements
  2017-08-30 19:40         ` Sami Kerola
  2017-08-31  9:46           ` Karel Zak
@ 2017-08-31  9:47           ` Karel Zak
  1 sibling, 0 replies; 8+ messages in thread
From: Karel Zak @ 2017-08-31  9:47 UTC (permalink / raw)
  To: kerolasa; +Cc: Johannes Berg, Marcel Holtmann, linux-wireless, util-linux

On Wed, Aug 30, 2017 at 08:40:01PM +0100, Sami Kerola wrote:
> On 1 July 2017 at 10:06, Sami Kerola <kerolasa@iki.fi> 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  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-08-31  9:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-25 13:04 rfkill(8) move and improvements Sami Kerola
2017-06-29 14:04 ` Johannes Berg
2017-06-29 21:23   ` Sami Kerola
2017-06-30  7:47     ` Karel Zak
2017-07-01  9:06       ` Sami Kerola
2017-08-30 19:40         ` Sami Kerola
2017-08-31  9:46           ` Karel Zak
2017-08-31  9:47           ` Karel Zak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.