gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: systemd/udev/hotplug installation on Ubuntu 19.10


From: Gary E. Miller
Subject: Re: systemd/udev/hotplug installation on Ubuntu 19.10
Date: Fri, 1 May 2020 14:47:40 -0700

Yo John!

On Fri, 1 May 2020 15:59:59 -0400
John Ackermann N8UR <address@hidden> wrote:

> On 5/1/20 2:12 PM, Gary E. Miller wrote:
> > Yo John!
> > 
> > On Fri, 1 May 2020 10:47:03 -0400
> > John Ackermann N8UR <address@hidden> wrote:
> >   
> >> Just built gpsd from head.  Trying to get the udev hotplug stuff
> >> working, ultimately for multiple receivers, but for now just one
> >> would be nice.  
> > 
> > IN general not a good idea.  
> 
> I'll take your word for that and stop worrying hotplug -- I don't
> really need it, but it appeared from the installation instructions
> that it ought to work, so I thought I'd give it a try.  I won't waste
> a lot more time on it.

gpsd hotplug usually works fine for people.  But every disto does
hotplug differently so easy to fall in a rabbit hole.

> >> Following the troubleshooting guide, I tried "make udev-install"
> >> and no target was found.  So I did "sudo scons udev-install" which
> >> did install the udev rules in /lib/udev/rules.d  
> > 
> > sudo is bad for you.  You should already know that all installs and
> > system configuration needs root.    
> 
> I actually don't know that.  This is the first time I've ever
> encountered or heard of it as a problem.  Virtually all the software
> I've built from github or elsewhere tells you to build unprivileged,
> and then install with sudo make install or whatever.

sudo is security theater.  A cure worse than the disease.  If I put
something in gpsd to hack you, there would be no preventing it.  The
easist case is I put the hack in the "scons install".

> By default, Ubuntu doesn't allow direct login as root, or su to root.

Yes, many Ubuntu defaults are bad.  Easy to fix.

> The only way to get anything like root is "sudo -i" so there's no way
> *not* to use sudo. :-)  See https://help.ubuntu.com/community/RootSudo

    sudo /bin/bash
    passwd
    exit

Then "su -" works just fine, forever.  Then you should remove sudo.

> I just rebuilt using sudo -i (closest I can get to root per above) to
> get a root shell and did exactly this line from build.adoc:
> 
> scons && scons check && sudo scons udev-install

Note the line above that says:

"these lines will do, and need to be run as root:"

I just pushed a fix to that doc mistake.

> NOTE: that "sudo" was in build.adoc so the documentation conflicts
> with your statement above...

I can only stamp out so much silliness.  More doc patches welcome.

> but if I were running the build process
> as an unprivileged user, it's exactly what I would expect to see in
> the instructions for the install step.  I'm not sure what it
> accomplishes if you're already root.

Nothing, so doc fixed.

> Now, when a device is plugged the kernel reports that it is detected
> and a device (/dev/ttyACM0) has been assigned.  But that's usually
> the last related message.

I never use hotplug with gpsd.  I recommend no one use hotplug with
gpsd.

> I'm not going to spend any more time on this if hotplug is generally
> considered a bad idea anyway.

Good.  If anyone figures it out, as always, I'll take patches.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpXmfeK0zdhg.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]