We have moved to a new Sailfish OS Forum. Please start new discussions there.
1

sudo make me a sandwich

asked 2017-11-30 22:25:41 +0300

too gravatar image

updated 2017-12-08 21:11:48 +0300

That was my second though after following events on fingerterm(1)

[nemo@Sailfish ~]$ pkcon install libkeepalive-glib-tools 
...
Vakava virhe: Failed to obtain authentication.

Ok, I thought -- since I have not allowed untrusted sw, some keys are not recognized or something...

... but let's try anyway, it will not work though:

[nemo@Sailfish ~]$ devel-su
Password: ****************
[root@Sailfish nemo]# pkcon install libkeepalive-glib-tools
....
(hmm, lost final message due to display rotation, but package was now installed)

Whoa! what just happened? Did I install untrusted software?

EDIT (2017-12-08): Now I know (with default repositories) the software installed by pkcon are trusted (what I'd like to have is a way to easily install untrusted (one at a time) software after careful "inspection")

The next steps that I've done so far:

  • cat /var/log/zypp/history
  • rpm -qil libkeepalive-glib
  • rpm -qil libkeepalive-glib-tools
  • /usr/bin/keepalive-tool -h

And on Desktop Linux:

Next to look how this keepalive-tool is to be used, but anyone who knows whether this sw is considered as untrusted please tell me. And if there is a tool to run to tell this information please tell that too.

EDIT: First try: keepalive-tool -t 86300 -- ping -D -i 15 9.9.9.9 seems to work -- no extra sleeping. next to try keeping ssh connection up overnight and see whether there is (noticeable) increase in battery consumption...

(and for the ones who did not know this before: https://xkcd.com/149/ )

edit retag flag offensive close delete

Comments

8

what is your question exactly about?

coderus ( 2017-12-01 00:06:45 +0300 )edit
2

That is a good guestion ;) ... the question changed while writing above so finally it got little mixed up. However spiiroin answered it perfectly to my expectation.

too ( 2017-12-01 10:40:14 +0300 )edit
2

Could you please adjust the title of this question to be more appropriate, so other users searching for similar topics can find it? Thanks.

ghling ( 2017-12-01 11:04:35 +0300 )edit

Have to think about that -- When changing title, then content might need adjustment -- and in that case the content should match to the answers given...

So this is a (second) hard thing. Alternative is to create a wiki page which contains just the relevant text. Does this add additional noise to the search results?

too ( 2017-12-01 13:17:51 +0300 )edit

BTW, on Fedora you can install signed package from the default repositories with pkcon as a normal user (eq. without root privileges/sudo). :)

Any package in the default repos should be safe to install & the signature makes sure the package is actually what you install. So really no need to require additional privileges just for that. That's also the same reson why you can install applications from Gnome Software without first gaining sudo/root privileges, making the application install process quite a bit less hassle.

MartinK ( 2017-12-08 01:13:05 +0300 )edit

2 Answers

Sort by » oldest newest most voted
8

answered 2017-12-01 09:27:45 +0300

spiiroin gravatar image

Nemo-keepalive library is part of sfos and installed by default on every sfos device. The related tools are built from the same sources by the same build machinery, but packaged separately and not installed by default.

So what happened is that

  1. You tried to install something as "regular user" - which failed because root privileges are required for operations like this
  2. You acquired root privileges with devel-su
  3. Installing a package from repository provided by jolla succeeded

So, no - you did not install "untrusted sw from 3rd party repository".

As to the keepalive-tool usage... If the intent is to block suspend indefinitely, just do not specify the timeout i.e.

keepalive-tool -- ping -D -i 15 9.9.9.9
edit flag offensive delete publish link more

Comments

But the library in question is libkeepalive-glib-tools , not nemo-keepalive?

tortoisedoc ( 2017-12-01 10:06:22 +0300 )edit
2

It is still the same source tree, all packages built from it are equally "official". See around: https://git.merproject.org/mer-core/nemo-keepalive/blob/master/rpm/keepalive.spec#L125

Name:       libkeepalive
%package glib-tools

-> produces "libkeepalive-glib-tools.version.rpm"

(Whether the division etc in there makes sense = probably not, but: Start from "we need something for qml apps" requirement, implement Qt/C++ and QML bindings and then realize glib/C api would be needed too ... and end up having two parallel implementations for effectively the same thing in the same source tree.)

spiiroin ( 2017-12-01 10:23:17 +0300 )edit

I briefly grasped through the code and thought that no timeout meant zero (0) timeout...

too ( 2017-12-01 10:41:28 +0300 )edit

One question more -- I re-run pkcon install libkeepalive-glib-tools, it went through saying 'installing packages (but not saying any specific packages 'Installed'). Now I don't know wheter my initial attempt ever installed any packages or whether the '-tools' package was already there (what I guess from the answer it did install something, but I cannot be sure) (As I said in my "question" I (may have!) lost some output due to window rotation (and how fingerterm(1) handled that)

If this is the case it would be nice if pkgcon install ... clearly printed there was nothing to be installed so one could know...

too ( 2017-12-01 12:42:08 +0300 )edit
2

@too: pkcon is pretty sparse on output as packagekit is not really used by users directly but mostly used over the library interface or over DBUS. And it shows on the CLI tools.

So I recommend using zypper, which is a proper CLI package management tool with output you would expect if you ever worked wit something similar (yum/dnf/apt-get/etc.).

It's available from the default repos and you can install it with the pkcon:

pkcon install zypper
MartinK ( 2017-12-08 01:06:31 +0300 )edit
5

answered 2017-11-30 23:43:05 +0300

tortoisedoc gravatar image

with great power comes great responsibility!

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2017-11-30 22:25:41 +0300

Seen: 1,206 times

Last updated: Dec 08 '17