Bug 758574 - Permission denied error on 'yum search -C' by unprivileged user
Summary: Permission denied error on 'yum search -C' by unprivileged user
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: yum-langpacks
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-30 06:06 UTC by Amit Shah
Modified: 2014-03-17 03:29 UTC (History)
12 users (show)

Fixed In Version: yum-langpacks-0.2.4-2.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-17 20:53:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Use the already decompressed comps file. (942 bytes, patch)
2011-12-15 11:15 UTC, Zdeněk Pavlas
no flags Details | Diff

Description Amit Shah 2011-11-30 06:06:23 UTC
Description of problem:


$ yum search -C jabber
Loaded plugins: langpacks, presto, refresh-packagekit


[Errno 13] Permission denied: '/var/cache/yum/x86_64/16/fedora/8e5f7c264cbd50659a18cd4f87fe75ea728fdc187d4e5e041898070c9dccf5e8-comps-f16.xml'

$ ls -l /var/cache/yum/x86_64/16/fedora/ -lZ

-rw-r--r--. root root unconfined_u:object_r:rpm_var_cache_t:s0 8e5f7c264cbd50659a18cd4f87fe75ea728fdc187d4e5e041898070c9dccf5e8-comps-f16.xml


'yum search' without the -C option works fine.  Also, this used to work on F15.  After the upgrade to F16, this stopped working.

Comment 1 Zdeněk Pavlas 2011-11-30 07:53:38 UTC
*** Bug 749239 has been marked as a duplicate of this bug. ***

Comment 2 Amit Shah 2011-11-30 08:01:07 UTC
(In reply to comment #1)
> *** Bug 749239 has been marked as a duplicate of this bug. ***

Doesn't look like 749239 is a dup of this one?

Comment 3 Zdeněk Pavlas 2011-11-30 11:31:24 UTC
749239 is a bug in error handling of this bug, but really a separate issue.  Reopened that- sorry for the notification noise.

Comment 4 seth vidal 2011-11-30 18:05:59 UTC
just don't use the -C option?

given how caching and user-local copies of the repodata have evolved -C is not very much needed

Comment 5 Amit Shah 2011-12-01 05:12:51 UTC
(In reply to comment #4)
> just don't use the -C option?
> 
> given how caching and user-local copies of the repodata have evolved -C is not
> very much needed

Without -C, the metadata is downloaded each time, even if the root user had recently downloaded all the metadata.

If things aren't supposed to work this way, maybe some config change is needed, (this is an installation that's been upgraded from previous releases, not a new install)?

Comment 6 Zdeněk Pavlas 2011-12-01 07:55:06 UTC
This bug is caused by different handling of group_gz metadata files in Yum and Yum-langpacks.  Yum downloads and keeps the .gz file, opening it with gzip.open().  But Yum-langpacks tries to decompress it to the same (often rdonly) directory.  Possible fixes are:

a) change yum such that it prefers .gz file for download but unpacks it immediately after the download.

b) change yum-langpacks to use in-place decompression.

Comment 7 seth vidal 2011-12-01 14:35:18 UTC
Without -C it's not downloaded each time. For the user it is copied from the most recent copy of the systemwide yum cache. If that copy is current enough then it is used, if not  new one is fetched.

Comment 8 Amit Shah 2011-12-15 09:54:59 UTC
(In reply to comment #7)
> Without -C it's not downloaded each time. For the user it is copied from the
> most recent copy of the systemwide yum cache. If that copy is current enough
> then it is used, if not  new one is fetched.

OK, I can confirm this behaviour.

However, I'd like for -C to exist.

Example use-cases

1) when I'm on mobile broadband, I just want to query the db for a particular package or look up its info.  In that case, I don't want to use up any bandwidth or incur charges just for querying the db.

2) When I get an rpm from some source (e.g. latest kernel from koji), I want to just 'yum install -C ./kernel*.rpm' without having to fetch latest metadata.

Comment 9 Zdeněk Pavlas 2011-12-15 11:14:24 UTC
I think this should be fixed in langpacks.py, patch added.

Comment 10 Zdeněk Pavlas 2011-12-15 11:15:27 UTC
Created attachment 547184 [details]
Use the already decompressed comps file.

Comment 11 Bill Nottingham 2011-12-15 19:13:19 UTC
Thanks, applied to git.

Comment 12 Fedora Update System 2011-12-15 19:26:56 UTC
yum-langpacks-0.2.4-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/yum-langpacks-0.2.4-2.fc16

Comment 13 Fedora Update System 2011-12-15 19:30:02 UTC
yum-langpacks-0.2.4-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/yum-langpacks-0.2.4-2.fc15

Comment 14 Fedora Update System 2011-12-16 20:04:15 UTC
Package yum-langpacks-0.2.4-2.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing yum-langpacks-0.2.4-2.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-17200/yum-langpacks-0.2.4-2.fc15
then log in and leave karma (feedback).

Comment 15 Fedora Update System 2011-12-17 20:53:20 UTC
yum-langpacks-0.2.4-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 16 Fedora Update System 2012-01-04 01:59:11 UTC
yum-langpacks-0.2.4-2.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


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