You are not logged in.

#1 2018-07-20 11:53:05

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

[SOLVED]'redshift' doesn't work due to 'geoclue2' issue

[SOLVED]
When I'm trying to run

redshift -l geoclue2

I get that output:

~/ redshift -l geoclue2
Using method `randr'.
Waiting for initial location to become available...
Unable to start GeoClue client: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: 'redshift' disallowed, no agent for UID 1001.
Access to the current location was denied by GeoClue!
Make sure that location services are enabled and that Redshift is permitted
to use location services. See https://github.com/jonls/redshift#faq for more
information.
Unable to get location from provider.

I moved on the suggested link and then trying to fix this issue I added next lines on my file /etc/geoclue/geoclue.conf

[redshift]
allowed=true
system=false
users=

...but it still didn't work for me.

Last edited by Lupo Alberto (2018-07-31 17:09:20)

Offline

#2 2018-07-20 11:58:49

topernic
Member
Registered: 2014-12-16
Posts: 8

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

I had the same problem.
I just edited geoclue.conf to use manual location and input the coordinates.

Offline

#3 2018-07-20 12:05:57

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

topernic wrote:

I had the same problem.
I just edited geoclue.conf to use manual location and input the coordinates.

Thanks for your advice, but I wanna be "a cool dude" cool

Last edited by Lupo Alberto (2018-07-20 12:06:26)

Offline

#4 2018-07-20 13:11:25

loqs
Member
Registered: 2014-03-06
Posts: 18,056

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

Offline

#5 2018-07-20 13:33:21

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

Thanks.
I ain't developer or programmer myself therefore I used a light way and downgraded geoclue2 to the previous version:

pacman -U geoclue2-2.4.7-1-x86_64.pkg.tar.xz

...and now it works.

Last edited by Lupo Alberto (2018-07-20 13:40:21)

Offline

#6 2018-07-20 18:10:36

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

Is there a correct way to disguise a certain version of the package in Archlinux?

Offline

#7 2018-07-20 18:35:27

loqs
Member
Registered: 2014-03-06
Posts: 18,056

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

Lupo Alberto wrote:

Is there a correct way to disguise a certain version of the package in Archlinux?

Pacman#Skip_package_from_being_upgraded

Offline

#8 2018-07-20 18:48:32

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

loqs, thanks, but I wanna mask the  certain version of the package. In this case I don't want to install the wrong version of geoclue2-2.4.10-1 but when this package will be fixed I want to install it.

Offline

#9 2018-07-20 18:54:11

loqs
Member
Registered: 2014-03-06
Posts: 18,056

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

If you are asking to provide pacman with a blacklist of versions not to be used I do not believe there is such a feature.

Offline

#10 2018-07-20 19:02:14

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

loqs wrote:

If you are asking to provide pacman with a blacklist of versions not to be used I do not believe there is such a feature.

I think, unfortunately, you are right.
P.S. But Gentoo had  this possibility ten years ago.

Offline

#11 2018-07-21 06:39:47

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

I've solved or at least I think I've solved this issue for myself.
I just did so

pacman -U geoclue2-2.4.7-1-x86_64.pkg.tar.xz
pacman -S --dbonly geoclue2

and now my system think that it has last version of the package and don't proposes me to update this package to the "wrong" version.

Last edited by Lupo Alberto (2018-07-21 06:41:27)

Offline

#12 2018-07-21 07:24:13

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,098

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

Wow, that's one of the dumbest things I've seen lately. Don't do that.

Offline

#13 2018-07-21 07:32:47

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

Scimmia wrote:

Wow, that's one of the dumbest things I've seen lately. Don't do that.

Could you argue somehow?

Offline

#14 2018-07-21 07:35:10

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,098

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

Argue that breaking pacman's database is bad? It should be self-evident.

Offline

#15 2018-07-21 07:39:27

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

Scimmia wrote:

Argue that breaking pacman's database is bad? It should be self-evident.

But for me it's not self-evident.
For which purpose this option exist in pacman? How it can break pacman's database?

Offline

#16 2018-07-21 13:30:41

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,098

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

I didn't say it "can", you *have* broken pacman's database. You've lied to it about what's installed.

Offline

#17 2018-07-21 14:02:45

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

I've just solved the task staying front of me.
And when I'll get next version of geoclue2 solving redshift's issue I install it.
How would you do it?
P.S.

Lupo Alberto wrote:

For which purpose this option exist in pacman?

Offline

#18 2018-07-21 14:04:01

seth
Member
Registered: 2012-09-03
Posts: 58,878

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

Lupo Alberto wrote:

For which purpose this option exist in pacman?

Transitional steps to fix broken things.
The proper way to skip package updates is the "IgnorePkg" key in pacman.conf - in case there're future conflicts (because packages require a specific version of a dependency) you'll still notice that instead of running into issues unwarned.

Doing this now, very temporarily (ie. until the next update) and for this one package will likely not kill you but in general it's a really bad idea to cheat on the package manager, ie. you're asking for trouble.

Offline

#19 2018-07-21 14:11:45

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

Scimmia, though I must admite you are partly right.
Those programms that need geoclue-2.4.10-1 will be  deceived

Last edited by Lupo Alberto (2018-07-21 14:16:27)

Offline

#20 2018-07-21 14:15:44

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

seth wrote:

Transitional steps to fix broken things.
The proper way to skip package updates is the "IgnorePkg" key in pacman.conf - in case there're future conflicts (because packages require a specific version of a dependency) you'll still notice that instead of running into issues unwarned.

Doing this now, very temporarily (ie. until the next update) and for this one package will likely not kill you but in general it's a really bad idea to cheat on the package manager, ie. you're asking for trouble.

Thank you very much. You say all what I would to say but can't say it right.

Last edited by Lupo Alberto (2018-07-21 14:32:38)

Offline

#21 2018-07-21 15:48:53

loqs
Member
Registered: 2014-03-06
Posts: 18,056

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

I would suggest building  a fixed package locally using the following would be a better interim solution

git clone git://git.archlinux.org/svntogit/packages.git --single-branch --branch "packages/geoclue2"
cd packages/trunk/
#replace PKGBUILD with one below
makepkg -rsi
# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: György Balló <ballogy@freestart.hu>

pkgname=geoclue2
pkgver=2.4.10
pkgrel=1
pkgdesc="Modular geoinformation service built on the D-Bus messaging system"
arch=(x86_64)
url="https://www.freedesktop.org/wiki/Software/GeoClue/"
license=(LGPL)
depends=(libsoup json-glib libmm-glib avahi libnotify)
makedepends=(intltool python2 systemd gobject-introspection gnome-common git)
backup=(etc/geoclue/geoclue.conf)
_commit=09dca5cac852fb8938ea2a654fc25fa1bbd82592  # tags/2.4.10^0
source=("git+https://anongit.freedesktop.org/git/geoclue#commit=$_commit")
sha256sums=('SKIP')

# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
# Note: These are for Arch Linux use ONLY. For your own distribution, please
# get your own set of keys. Feel free to contact foutrelis@archlinux.org for
# more information.
_google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM

# Mozilla API keys (see https://location.services.mozilla.com/api)
# Note: These are for Arch Linux use ONLY. For your own distribution, please
# get your own set of keys. Feel free to contact heftig@archlinux.org for
# more information.
_mozilla_api_key=16674381-f021-49de-8622-3021c5942aff

pkgver() {
  cd geoclue
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd geoclue
  git cherry-pick -n 1debd9a68b0f7cbfeef99428b6d9c3dfacdc6976
  git cherry-pick -n c8d7689687189a4b9b1676dca58e7fcf4ef21783
  sed -e "s/key=geoclue/key=$_mozilla_api_key/" \
      -e "s/key=YOUR_KEY/key=$_google_api_key/" \
      -i data/geoclue.conf.in
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd geoclue
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --libexecdir=/usr/lib --disable-static --enable-gtk-doc
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd geoclue
  make DESTDIR="$pkgdir" install
}

Last edited by loqs (2018-07-21 15:49:07)

Offline

#22 2018-07-21 17:18:01

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

loqs, could you say what kind of changes you made in the default PKGBUILD? Or just point the strings that solved this issue.

Last edited by Lupo Alberto (2018-07-21 17:19:34)

Offline

#23 2018-07-21 17:37:24

loqs
Member
Registered: 2014-03-06
Posts: 18,056

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

Added those two lines in the prepare function you can just add them to the existing PKGBUILD instead the result should be identical

  git cherry-pick -n 1debd9a68b0f7cbfeef99428b6d9c3dfacdc6976
  git cherry-pick -n c8d7689687189a4b9b1676dca58e7fcf4ef21783

Edit:
The second line cherry-picks the commit that fixes the issue.
The first line cherry-picks a dependant commit of the fix so the fix can apply cleanly.

Last edited by loqs (2018-07-21 17:41:57)

Offline

#24 2018-07-21 18:00:18

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

loqs, thanks for your advice. I'll try it right now.
P.S. Unfortunately, I got same mistakes like I had early.

Last edited by Lupo Alberto (2018-07-21 18:27:56)

Offline

#25 2018-07-21 18:48:36

loqs
Member
Registered: 2014-03-06
Posts: 18,056

Re: [SOLVED]'redshift' doesn't work due to 'geoclue2' issue

That is problematic as that was supposed to be the fix from upstream.
Edit:
Did you restart geoclue2?

Last edited by loqs (2018-07-21 19:40:25)

Offline

Board footer

Powered by FluxBB