Bug 870790 - yum-cron replacement kills an ability to pass parameters to yum
Summary: yum-cron replacement kills an ability to pass parameters to yum
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Packaging Toolset Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-28 18:42 UTC by Michal Jaegermann
Modified: 2015-08-13 20:24 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-29 11:41:24 UTC
Type: Bug


Attachments (Terms of Use)

Description Michal Jaegermann 2012-10-28 18:42:09 UTC
Description of problem:

With a replacement for yum-cron rewritten in Python I do no see any way to configure what extra parameters pass to an executing yum.  Myself on different machines I am using at least the following:

-  --skip-broken
-  a list of packages NOT to be automatically updated
-  a list of repositories to include/exclude changing dynamically depending on which network a given machine happens to be connected when a yum cronjob is running.

Up to now all of the above was quite trivial. Quite possible others will have different list of requirements.

Version-Release number of selected component (if applicable):
yum-3.4.3-47.fc19

Comment 1 Fedora End Of Life 2013-04-03 16:58:30 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 2 jcpunk 2013-10-21 19:22:37 UTC
With the addition of [base] to the yum-cron.conf many of these options (and others) can be configured in that file.

I can't speak to the suitibility for your use case.

Comment 3 Michal Jaegermann 2014-01-13 18:42:23 UTC
(In reply to jcpunk from comment #2)
> With the addition of [base] to the yum-cron.conf many of these options (and
> others) can be configured in that file.

AFAICT _none_ of specific points raised in the original report is addressed by
the current yum-cron.conf.

Comment 4 James Antill 2014-01-13 20:19:06 UTC
(In reply to Michal Jaegermann from comment #0)
> -  --skip-broken

Add skip_broken=true to the [base] section of yum-cron.conf

> -  a list of packages NOT to be automatically updated

Add exclude=what blah foo to the [base] section of yum-cron.conf

> -  a list of repositories to include/exclude changing dynamically depending
> on which network a given machine happens to be connected when a yum cronjob
> is running.

This is somewhat harder, but a patch adding an option  to enable/disable known repos. would likely be accepted upstream (Eg. allowing you to enable updates-testing).

But it can still be done somewhat by changing yum_config_file in the main section, and having that setup so that different repos. are included (I understand this is far from optimal though).

> Up to now all of the above was quite trivial. Quite possible others will
> have different list of requirements.

 The old yum-cron was basically a single line in cron calling yum with -y, so at worst you can still do that (there was a bit more to it, but not enough that people didn't just write it themselves anyway before).
 If you have other requests though, or want to talk about the enable/disable repos. thing, it's probably better to bring them up on the mailing list.

Comment 5 Michal Jaegermann 2014-01-13 22:14:48 UTC
(In reply to James Antill from comment #4)
> (In reply to Michal Jaegermann from comment #0)
> > -  --skip-broken
> 
> Add skip_broken=true to the [base] section of yum-cron.conf
> 
> > -  a list of packages NOT to be automatically updated
> 
> Add exclude=what blah foo to the [base] section of yum-cron.conf

Ah, no.  You see, that is the point.  What you suggest hides excluded packages from _any_ updates and not only automatic ones performed by yum cron.  That is far from the same thing.  You really think that adding "exclude=kernel*" to yum.conf would be a great idea?  If not then I rest my case.  The same applies in a different extent to other configuration changes.   For example with "old" yum-cron I was using different set of repositories if I detected that I am on a local network (or more precisely - local repos with the highest priorities were conditionally showing up too, automagically, on machines which one day could be here and the next one somewhere else).

If I could script a dynamic yum configuration switching based on a broad criteria that would likely cover all my use cases but currently I do not see how to do that for yum-cron only either.  If I need to perform such mods manually then just deinstalling yum-cron is simpler.  Another option is to revert to an older version and add "exclude=yum-cron" in yum.conf.

Comment 6 Pat Riehecky 2014-01-13 23:27:44 UTC
> What you suggest hides excluded packages from _any_ updates and not only automatic ones performed by yum cron.

It was suggested that these excludes be added to yum-cron.conf, not yum.conf

my BZ #999150 shows this behavior added to yum cron

Comment 7 Michal Jaegermann 2014-01-14 00:48:17 UTC
(In reply to Pat Riehecky from comment #6)
> 
> It was suggested that these excludes be added to yum-cron.conf, not yum.conf
> 
> my BZ #999150 shows this behavior added to yum cron

My bad; but ... where this is documented?  Surely not in 'man yum-cron' and even comments in /etc/yum/yum-cron-hourly.conf do not suggest that such possibility may exist or, important too, for how long.  Not mentioning a (non)existence of hooks allowing adjustments depending on dynamic criteria.
Morevoer - AFAICS if I want, say, not to run 0yum-hourly.cron I do not have "config way" even to achieve that.

Comment 8 Zdeněk Pavlas 2014-01-14 12:28:34 UTC
Hi, I believe this has been in yum-cron.conf for some time:

> [base]
> # This section overrides yum.conf
> ...

I've also considered the "enabled=0/1" option exactly to be able to turn off yum-cron-hourly.

http://lists.baseurl.org/pipermail/yum-devel/2014-January/010504.html

Another possibility is to fork yum-cron-hourly.service from yum-cron-hourly.service, so we'd have two services to be enabled/disabled independently.  Maybe that's better solution..

Comment 9 Fedora End Of Life 2015-05-29 08:48:08 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Fedora End Of Life 2015-06-29 11:41:24 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 11 Daniel Forsberg 2015-08-13 20:24:44 UTC
Hi,

This is still a problem in both latest Fedora and RHEL 7 

The possibility to enable and disable repos would be great at least.


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