Bug 821351 - yumex-3.0.5 broken with option 'run backend with sudo'
Summary: yumex-3.0.5 broken with option 'run backend with sudo'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: yumex
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Lauridsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-14 08:24 UTC by Freddy Willemsen
Modified: 2012-06-06 11:58 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-24 23:53:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Freddy Willemsen 2012-05-14 08:24:16 UTC
Description of problem:
yumex-3.0.5 apparently switched to Policykit for authentication. I use to have 'run backend with sudo' enabled. If that is present in your .yumex.conf file, yumex fails with message: /usr/bin/yumex-yum-backend: command not found

Version-Release number of selected component (if applicable):
yumex-3.0.5-1

How reproducible:
Update yumex to yumex-3.0.5-1 Add 'use_sudo = 1' to .yumex.conf.

Steps to Reproduce:
1. Update/Install yumex-3.0.5-1
2. Add 'use_sudo = 1' to .yumex.conf.
3. Start yumex
  
Actual results:
fails with message: /usr/bin/yumex-yum-backend: command not found

Expected results:
No errors

Additional info:
Tested this on Fedora17 as well. Same issue there.

Comment 1 Tim Lauridsen 2012-05-14 15:34:35 UTC
Thanks for testing

fixed upstream
https://github.com/timlau/yumex/commit/39c22ebab282bc8a74eeb00db8d3159be08453f3

I will make a new build with this patch

Comment 2 Fedora Update System 2012-05-14 16:37:47 UTC
yumex-3.0.5-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/yumex-3.0.5-2.fc16

Comment 3 Fedora Update System 2012-05-14 16:38:11 UTC
yumex-3.0.5-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/yumex-3.0.5-2.fc17

Comment 4 Fedora Update System 2012-05-14 16:38:35 UTC
yumex-3.0.5-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/yumex-3.0.5-2.el6

Comment 5 Freddy Willemsen 2012-05-14 17:24:48 UTC
Thanks for the quick response and fix.

Confirmed, the update fixes the issue on at least Fedora 16 and Fedora 17. Tested with both 'use_sudo = 1' and use_sudo not set (Thus requiring authentication).

Comment 6 Fedora Update System 2012-05-15 02:09:40 UTC
Package yumex-3.0.5-2.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing yumex-3.0.5-2.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-5872/yumex-3.0.5-2.el6
then log in and leave karma (feedback).

Comment 7 nucleo 2012-05-15 09:45:19 UTC
I have in sudoers:
username ALL=SOFTWARE, NOPASSWD: /usr/bin/yumex-yum-backend

But when running yumex-3.0.5-2.fc17 I got errors:

12:40:16 : INFO - Running backend launcher with sudo
12:40:16 : INFO - YUM: sudo: sorry, a password is required to run sudo
12:40:18 : ERROR - ERROR: Fatal Error : backend-not-running
12:40:18 : ERROR - ERROR: backend not running as expected (yumex will close)
12:40:18 : INFO - yum backend process is ended
12:40:18 : INFO - yum backend process is ended
Program Terminated


yumex-3.0.4-2.fc17 works fine:

12:43:55 : INFO - Running backend launcher with sudo
12:43:55 : INFO - YUM: Yum Version : 3.4.3
12:43:55 : INFO - YUM: No plugin match for: refresh-packagekit
12:43:56 : INFO - Getting available updates
12:43:57 : INFO - 3 packages returned
12:43:57 : INFO - Getting available obsoletes
12:43:57 : INFO - 0 packages returned
12:43:57 : INFO - Adding Packages to view
12:43:57 : INFO - Added 3 Packages to view
12:43:59 : INFO - Closing rpm db and releasing yum lock
12:43:59 : INFO - yum backend process is ended

Comment 8 Tim Lauridsen 2012-05-15 16:03:05 UTC
There has been some changes, because of the switch to PolicyKit
so the /usr/bin/yumex-yum-backend script is no longer used.
if use_sudo=1 then the following command is executed

/usr/bin/sudo -n /usr/share/yumex/backend-launcher.py

So this should do it:

username ALL=SOFTWARE, NOPASSWD: /usr/share/yumex/backend-launcher.py

Comment 9 nucleo 2012-05-15 16:20:32 UTC
Page http://www.yum-extender.org/cms/node/21 needs update then.

Comment 10 Tim Lauridsen 2012-05-15 17:57:03 UTC
Yes, It does, but I have not got to it yes.

I will make a post about it soon, It is now possible to configure PolicyKit to 
start yumex without asking for password by placing a

10-yumex-without-pw.pkla file in  /etc/polkit-1/localauthority/50-local.d/

with the following content:

[Run Yumex without password]
Identity=unix-user:username
Action=org.yum-extender.backend.*
ResultAny=no
ResultInactive=no
ResultActive=yes

Just replace username with your own user and yumex will start without password.

Comment 11 nucleo 2012-05-16 21:45:56 UTC
Both working "NOPASSWD: /usr/share/yumex/backend-launcher.py" with use_sudo=1 and 10-yumex-without-pw.pkla with use_sudo=0.

Comment 12 Fedora Update System 2012-05-24 23:53:07 UTC
yumex-3.0.5-2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 lgwalts 2012-05-26 00:54:10 UTC
I did not see this problem untill the update of 2105-05-24 yumex-3.0-2.fc16.  Unfortunately the issue affected two machines before I stopped the updates.  use_sudo does not appear in the yumex.conf.

Comment 14 Fedora Update System 2012-05-26 08:01:25 UTC
yumex-3.0.5-2.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2012-06-02 02:38:25 UTC
yumex-3.0.5-2.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Adam Hough 2012-06-05 04:07:50 UTC
(In reply to comment #14)
> yumex-3.0.5-2.fc17 has been pushed to the Fedora 17 stable repository.  If
> problems still persist, please make note of it in this bug report.

 ~ $ rpm -qi yumex
Name        : yumex
Version     : 3.0.5
Release     : 2.fc17
Architecture: noarch
Install Date: Mon 04 Jun 2012 01:05:24 AM CDT
Group       : Applications/System
Size        : 1376913
License     : GPLv2+
Signature   : RSA/SHA256, Mon 14 May 2012 06:51:22 PM CDT, Key ID 50e94c991aca3465
Source RPM  : yumex-3.0.5-2.fc17.src.rpm
Build Date  : Mon 14 May 2012 10:44:16 AM CDT
Build Host  : x86-14.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://www.yum-extender.org
Summary     : Yum Extender graphical package management tool
Description :
Graphical User Interface for Yum.
 ~ $ yumex 

** (process:14783): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'

** (process:14783): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'

** (process:14783): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags'
Gtk-Message: Failed to load module "pk-gtk-module"
/usr/lib/python2.7/site-packages/guihelpers/__init__.py:256: GtkWarning: gtk_scrolled_window_add(): cannot add non scrollable widget use gtk_scrolled_window_add_with_viewport() instead
  self.add_from_file(filename)
23:06:41 : DEBUG - network interface p10p1 (r8169) is connected
23:06:41 : INFO - Connected to an network
23:06:41 : DEBUG - network interface p10p1 (r8169) is connected
23:06:41 : INFO - Starting yum child process
23:06:41 : INFO - YUM: Error executing command as another user: Not authorized
23:06:41 : INFO - YUM: This incident has been reported.
23:06:43 : ERROR - ERROR: Fatal Error : backend-not-running
23:06:43 : ERROR - ERROR: backend not running as expected (yumex will close)
23:06:43 : INFO - yum backend process is ended
23:06:44 : INFO - yum backend process is ended

Comment 17 Adam Hough 2012-06-06 04:23:43 UTC
Ignore my previous comment.  Looks like I caused that some how.

Comment 18 Tim Lauridsen 2012-06-06 11:58:00 UTC
@Adam:

This happens if you press cancel on PolicyKit dialog asking for a password :)


Note You need to log in before you can comment on or make changes to this bug.