[yum] update to latest HEAD
James Antill
james at fedoraproject.org
Thu Jan 23 22:02:58 UTC 2014
commit dc8445e775f2abbb8bc161e0e78507d1e9112869
Author: James Antill <james at and.org>
Date: Thu Jan 23 17:03:16 2014 -0500
update to latest HEAD
- Test for lvm binary before using. BZ 1047793.
- Split cron-daily and cron-hourly into separate packages. Add cron-security.
yum-HEAD.patch | 240 +++++++++++++++++++++++++++++++++++++++++++++++++-------
yum.spec | 70 +++++++++++++++-
2 files changed, 276 insertions(+), 34 deletions(-)
---
diff --git a/yum-HEAD.patch b/yum-HEAD.patch
index 0cbbe39..24f2bb5 100644
--- a/yum-HEAD.patch
+++ b/yum-HEAD.patch
@@ -2743,10 +2743,10 @@ index 0000000..ad24788
+ generateAll(os.getcwd(), os.getcwd())
diff --git a/docs/yum-cron.8 b/docs/yum-cron.8
new file mode 100644
-index 0000000..db50fc2
+index 0000000..7ce1aef
--- /dev/null
+++ b/docs/yum-cron.8
-@@ -0,0 +1,50 @@
+@@ -0,0 +1,51 @@
+.\" yum-cron - cron interface for yum
+.TH "yum-cron" "8" "" "Nick Jacek" ""
+.SH "NAME"
@@ -2778,6 +2778,7 @@ index 0000000..db50fc2
+.nf
+/etc/yum/yum-cron.conf
+/etc/yum/yum-cron-hourly.conf
++/etc/yum/yum-cron-security.conf
+.fi
+
+.PP
@@ -2798,7 +2799,7 @@ index 0000000..db50fc2
+ the mailing list, yum at lists.baseurl.org, or consult bugzilla.
+.fi
diff --git a/docs/yum.8 b/docs/yum.8
-index 1a8202a..25493ee 100644
+index 1a8202a..c9b529e 100644
--- a/docs/yum.8
+++ b/docs/yum.8
@@ -25,6 +25,8 @@ gnome\-packagekit application\&.
@@ -3491,7 +3492,7 @@ index 1a8202a..25493ee 100644
.IP "\fByum list [all | glob_exp1] [glob_exp2] [\&.\&.\&.]\fP"
List all available and installed packages\&.
-@@ -542,6 +911,10 @@ shell\-style glob and any matches are printed\&.
+@@ -542,14 +911,18 @@ shell\-style glob and any matches are printed\&.
List the packages installed on the system that are not available in any yum
repository listed in the config file.
.IP
@@ -3502,6 +3503,16 @@ index 1a8202a..25493ee 100644
.IP "\fByum list obsoletes [glob_exp1] [\&.\&.\&.]\fP"
List the packages installed on the system that are obsoleted by packages
in any yum repository listed in the config file.
+ .IP
+ .IP "\fByum list recent\fP"
+ List packages recently added into the repositories. This is often not helpful,
+-but what you may really want to use is "yum list-updateinfo new" from the
+-security yum plugin.
++but what you may really want to use is "yum updateinfo list new" although that
++relies on updateinfo data from the repos.
+ .IP
+
+ .PP
@@ -658,7 +1031,7 @@ configuration options.
.I yum-complete-transaction (1)
.I yumdownloader (1)
@@ -4258,7 +4269,7 @@ index 0cfaa4b..0000000
-
-exit 0
diff --git a/etc/Makefile b/etc/Makefile
-index 29a7f95..49f1d81 100644
+index 29a7f95..7c023af 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -1,4 +1,6 @@
@@ -4276,7 +4287,7 @@ index 29a7f95..49f1d81 100644
mkdir -p $(DESTDIR)/etc/yum/protected.d
mkdir -p $(DESTDIR)/etc/yum/repos.d
mkdir -p $(DESTDIR)/etc/yum/vars
-@@ -24,15 +27,9 @@ install:
+@@ -24,15 +27,10 @@ install:
mkdir -p $(DESTDIR)/etc/dbus-1/system.d/
install -m 755 yum-updatesd-dbus.conf $(DESTDIR)/etc/dbus-1/system.d/yum-updatesd.conf
@@ -4297,6 +4308,7 @@ index 29a7f95..49f1d81 100644
+ install -m 644 yum.bash $(DESTDIR)/$(compdir)/yum
+ ln -s yum $(DESTDIR)/$(compdir)/yummain.py
+ install -m 644 yum-cron.conf $(YUMETC)
++ install -m 644 yum-cron-security.conf $(YUMETC)
+ install -m 644 yum-cron-hourly.conf $(YUMETC)
diff --git a/etc/yum-cron b/etc/yum-cron
deleted file mode 100755
@@ -4491,12 +4503,100 @@ index 0000000..7871a46
+
+# Uncomment to auto-import new gpg keys (dangerous)
+# assumeyes = True
+diff --git a/etc/yum-cron-security.conf b/etc/yum-cron-security.conf
+new file mode 100644
+index 0000000..b0edd9d
+--- /dev/null
++++ b/etc/yum-cron-security.conf
+@@ -0,0 +1,82 @@
++[commands]
++# What kind of update to use:
++# default = yum upgrade
++# security = yum --security upgrade
++# security-severity:Critical = yum --sec-severity=Critical upgrade
++# minimal = yum --bugfix upgrade-minimal
++# minimal-security = yum --security upgrade-minimal
++# minimal-security-severity:Critical = --sec-severity=Critical upgrade-minimal
++update_cmd = security
++
++# Whether a message should emitted when updates are available.
++update_messages = yes
++
++# Whether updates should be downloaded when they are available. Note
++# that updates_messages must also be yes for updates to be downloaded.
++download_updates = yes
++
++# Whether updates should be applied when they are available. Note
++# that both update_messages and download_updates must also be yes for
++# the update to be applied
++apply_updates = yes
++
++# Maximum amout of time to randomly sleep, in minutes. The program
++# will sleep for a random amount of time between 0 and random_sleep
++# minutes before running. This is useful for e.g. staggering the
++# times that multiple systems will access update servers. If
++# random_sleep is 0 or negative, the program will run immediately.
++# NOTE this runs after yum-cron-daily, if that is installed,
++# so we will have already waited for that (default 2 hours, 120 mins).
++# Also security updates should be smaller than all updates, anyway.
++random_sleep = 60
++
++
++[emitters]
++# Name to use for this system in messages that are emitted. If
++# system_name is None, the hostname will be used.
++system_name = None
++
++# How to send messages. Valid options are stdio and email. If
++# emit_via includes stdio, messages will be sent to stdout; this is useful
++# to have cron send the messages. If emit_via includes email, this
++# program will send email itself according to the configured options.
++# If emit_via is None or left blank, no messages will be sent.
++emit_via = stdio
++
++# The width, in characters, that messages that are emitted should be
++# formatted to.
++ouput_width = 80
++
++
++[email]
++# The address to send email messages from.
++email_from = root
++
++# List of addresses to send messages to.
++email_to = root
++
++# Name of the host to connect to to send email messages.
++email_host = localhost
++
++
++[groups]
++# List of groups to update
++group_list = None
++
++# The types of group packages to install
++group_package_types = mandatory, default
++
++[base]
++# This section overrides yum.conf
++
++# Use this to filter Yum core messages
++# -4: critical
++# -3: critical+errors
++# -2: critical+errors+warnings (default)
++debuglevel = -2
++
++# skip_broken = True
++mdpolicy = group:main
++
++# Uncomment to auto-import new gpg keys (dangerous)
++# assumeyes = True
diff --git a/etc/yum-cron.conf b/etc/yum-cron.conf
new file mode 100644
-index 0000000..b0f7839
+index 0000000..bd26d0c
--- /dev/null
+++ b/etc/yum-cron.conf
-@@ -0,0 +1,80 @@
+@@ -0,0 +1,82 @@
+[commands]
+# What kind of update to use:
+# default = yum upgrade
@@ -4523,8 +4623,10 @@ index 0000000..b0f7839
+# minutes before running. This is useful for e.g. staggering the
+# times that multiple systems will access update servers. If
+# random_sleep is 0 or negative, the program will run immediately.
-+# 6*60 = 360
-+random_sleep = 360
++# NOTE that we hold up all the other things in cron.daily as we wait,
++# so while waiting for 6+ hours is fine for us it might not be nice
++# for logrotate (so wait for 2 hours by default).
++random_sleep = 120
+
+
+[emitters]
@@ -184704,10 +184806,10 @@ index ced6ba0..0b7191c
return_code = self.doTransaction()
diff --git a/yum-cron/Makefile b/yum-cron/Makefile
new file mode 100644
-index 0000000..cd3ff5f
+index 0000000..3997b4a
--- /dev/null
+++ b/yum-cron/Makefile
-@@ -0,0 +1,24 @@
+@@ -0,0 +1,25 @@
+all:
+ echo "Nothing to do"
+
@@ -184730,6 +184832,7 @@ index 0000000..cd3ff5f
+# Install as 0yum-*.cron so it runs before items like
+# manpage update, mlocate, and prelink
+ install -D -m 755 yum-daily.cron.sh $(DESTDIR)/etc/cron.daily/0yum-daily.cron
++ install -D -m 755 yum-security.cron.sh $(DESTDIR)/etc/cron.daily/0yum-security.cron
+ install -D -m 755 yum-hourly.cron.sh $(DESTDIR)/etc/cron.hourly/0yum-hourly.cron
+ install -D -m 755 yum-cron.py $(DESTDIR)/usr/sbin/yum-cron
diff --git a/yum-cron/TODO b/yum-cron/TODO
@@ -185639,6 +185742,23 @@ index 0000000..f0b77a9
+
+# Action!
+exec /usr/sbin/yum-cron /etc/yum/yum-cron-hourly.conf
+diff --git a/yum-cron/yum-security.cron.sh b/yum-cron/yum-security.cron.sh
+new file mode 100644
+index 0000000..2937e20
+--- /dev/null
++++ b/yum-cron/yum-security.cron.sh
+@@ -0,0 +1,11 @@
++#!/bin/bash
++
++# Only run if this flag is set. The flag is created by the yum-cron init
++# script when the service is started -- this allows one to use chkconfig and
++# the standard "service stop|start" commands to enable or disable yum-cron.
++if [[ ! -f /var/lock/subsys/yum-cron ]]; then
++ exit 0
++fi
++
++# Action!
++exec /usr/sbin/yum-cron /etc/yum/yum-cron-security.conf
diff --git a/yum-updatesd.py b/yum-updatesd.py
old mode 100644
new mode 100755
@@ -186200,7 +186320,7 @@ index 1ce4720..2f3f7a3
gobject.threads_init()
dbus.glib.threads_init()
diff --git a/yum.spec b/yum.spec
-index abd203f..a3e9bcf 100644
+index abd203f..c6bc8fc 100644
--- a/yum.spec
+++ b/yum.spec
@@ -1,24 +1,100 @@
@@ -186364,16 +186484,19 @@ index abd203f..a3e9bcf 100644
Requires(postun): /sbin/service
-@@ -68,33 +160,74 @@ Requires(postun): /sbin/service
+@@ -68,20 +160,69 @@ Requires(postun): /sbin/service
yum-updatesd provides a daemon which checks for available updates and
can notify you when they are available via email, syslog or dbus.
-
%package cron
- Summary: Files needed to run yum updates as a cron job
+-Summary: Files needed to run yum updates as a cron job
++Summary: RPM package installer/updater/manager cron service
Group: System Environment/Base
-Requires: yum >= 3.0 vixie-cron crontabs yum-plugin-downloadonly findutils
+Requires: yum >= 3.4.3-84 cronie crontabs findutils
++Requires: yum-cron-BE = %{version}-%{release}
++# We'd probably like a suggests for yum-cron-daily here.
+%if %{yum_cron_systemd}
+BuildRequires: systemd-units
+Requires(post): systemd
@@ -186388,13 +186511,55 @@ index abd203f..a3e9bcf 100644
+%endif
%description cron
- These are the files needed to run yum updates as a cron job.
- Install this package if you want auto yum updates nightly via cron.
-
+-These are the files needed to run yum updates as a cron job.
+-Install this package if you want auto yum updates nightly via cron.
++These are the files needed to run any of the yum-cron update services.
++
++%package cron-daily
++Summary: Files needed to run yum updates as a daily cron job
++Group: System Environment/Base
++Provides: yum-cron-BE = %{version}-%{release}
++Requires: yum-cron > 3.4.3-131
++
++%description cron-daily
++This is the configuration file for the daily yum-cron update service, which
++lives %{_sysconfdir}/yum/yum-cron.conf.
++Install this package if you want auto yum updates nightly via cron (or something
++else, via. changing the configuration).
++By default this just downloads updates and does not apply them.
++
++%package cron-hourly
++Summary: Files needed to run yum updates as an hourly cron job
++Group: System Environment/Base
++Provides: yum-cron-BE = %{version}-%{release}
++Requires: yum-cron > 3.4.3-131
++
++%description cron-hourly
++This is the configuration file for the daily yum-cron update service, which
++lives %{_sysconfdir}/yum/yum-cron-hourly.conf.
++Install this package if you want automatic yum metadata updates hourly via
++cron (or something else, via. changing the configuration).
++
++%package cron-security
++Summary: Files needed to run security yum updates as once a day
++Group: System Environment/Base
++Provides: yum-cron-BE = %{version}-%{release}
++Requires: yum-cron > 3.4.3-131
++
++%description cron-security
++This is the configuration file for the security yum-cron update service, which
++lives here: %{_sysconfdir}/yum/yum-cron-security.conf
++Install this package if you want automatic yum security updates once a day
++via. cron (or something else, via. changing the configuration -- this will be
++confusing if it's not security updates anymore though).
++By default this will download and _apply_ the security updates, unlike
++yum-cron-daily which will just download all updates by default.
++This runs after yum-cron-daily, if that is installed.
+
+
%prep
%setup -q
-
+@@ -89,12 +230,46 @@ Install this package if you want auto yum updates nightly via cron.
%build
make
@@ -186444,7 +186609,7 @@ index abd203f..a3e9bcf 100644
# Ghost files:
mkdir -p $RPM_BUILD_ROOT/var/lib/yum/history
-@@ -102,12 +235,31 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/yum/plugins
+@@ -102,12 +277,31 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/yum/plugins
mkdir -p $RPM_BUILD_ROOT/var/lib/yum/yumdb
touch $RPM_BUILD_ROOT/var/lib/yum/uuid
@@ -186476,7 +186641,7 @@ index abd203f..a3e9bcf 100644
%post updatesd
/sbin/chkconfig --add yum-updatesd
/sbin/service yum-updatesd condrestart >/dev/null 2>&1
-@@ -119,9 +271,29 @@ if [ $1 = 0 ]; then
+@@ -119,9 +313,29 @@ if [ $1 = 0 ]; then
/sbin/service yum-updatesd stop >/dev/null 2>&1
fi
exit 0
@@ -186507,7 +186672,7 @@ index abd203f..a3e9bcf 100644
# Make sure chkconfig knows about the service
/sbin/chkconfig --add yum-cron
# if an upgrade:
-@@ -144,8 +316,13 @@ if [ "$1" -ge "1" ]; then
+@@ -144,8 +358,13 @@ if [ "$1" -ge "1" ]; then
fi
fi
exit 0
@@ -186521,7 +186686,7 @@ index abd203f..a3e9bcf 100644
# if this will be a complete removeal of yum-cron rather than an upgrade,
# remove the service from chkconfig control
if [ $1 = 0 ]; then
-@@ -153,33 +330,59 @@ if [ $1 = 0 ]; then
+@@ -153,33 +372,59 @@ if [ $1 = 0 ]; then
/sbin/service yum-cron stop 1> /dev/null 2>&1
fi
exit 0
@@ -186587,7 +186752,7 @@ index abd203f..a3e9bcf 100644
%dir /var/cache/yum
%dir /var/lib/yum
%ghost /var/lib/yum/uuid
-@@ -188,20 +391,31 @@ exit 0
+@@ -188,20 +433,46 @@ exit 0
%ghost /var/lib/yum/yumdb
%{_mandir}/man*/yum.*
%{_mandir}/man*/yum-shell*
@@ -186616,18 +186781,30 @@ index abd203f..a3e9bcf 100644
+%else
%{_sysconfdir}/rc.d/init.d/yum-cron
-%config(noreplace) %{_sysconfdir}/sysconfig/yum-cron
--
--
--
+%endif
+%{_sbindir}/yum-cron
+%{_mandir}/man*/yum-cron.*
++%files cron-daily
++%defattr(-,root,root)
++%{_sysconfdir}/cron.daily/0yum-daily.cron
++%config(noreplace) %{_sysconfdir}/yum/yum-cron.conf
+
++%files cron-hourly
++%defattr(-,root,root)
++%{_sysconfdir}/cron.hourly/0yum-hourly.cron
++%config(noreplace) %{_sysconfdir}/yum/yum-cron-hourly.conf
+
++%files cron-security
++%defattr(-,root,root)
++%{_sysconfdir}/cron.daily/0yum-security.cron
++%config(noreplace) %{_sysconfdir}/yum/yum-cron-security.conf
+
+%if %{yum_updatesd}
%files updatesd
%defattr(-, root, root)
%config(noreplace) %{_sysconfdir}/yum/yum-updatesd.conf
-@@ -210,8 +424,12 @@ exit 0
+@@ -210,8 +481,12 @@ exit 0
%{_datadir}/yum-cli/yumupd.py*
%{_sbindir}/yum-updatesd
%{_mandir}/man*/yum-updatesd*
@@ -193967,10 +194144,10 @@ index bca9651..00c17ad 100644
else:
diff --git a/yum/fssnapshots.py b/yum/fssnapshots.py
new file mode 100755
-index 0000000..567cb65
+index 0000000..e912ea1
--- /dev/null
+++ b/yum/fssnapshots.py
-@@ -0,0 +1,344 @@
+@@ -0,0 +1,347 @@
+
+
+import os
@@ -194028,6 +194205,9 @@ index 0000000..567cb65
+ names = lvm.listVgNames()
+
+ if not names: # Could be just broken...
++ if not os.path.exists("/sbin/lvm"):
++ return [] # Minimal install etc.
++
+ p = subprocess.Popen(["/sbin/lvm", "vgs", "-o", "vg_name"],
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ err = p.wait()
diff --git a/yum.spec b/yum.spec
index 19a75bf..a6d88f2 100644
--- a/yum.spec
+++ b/yum.spec
@@ -60,7 +60,7 @@ BuildRequires: bash-completion
Summary: RPM package installer/updater/manager
Name: yum
Version: 3.4.3
-Release: 132%{?dist}
+Release: 133%{?dist}
License: GPLv2+
Group: System Environment/Base
Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz
@@ -171,9 +171,11 @@ yum-updatesd provides a daemon which checks for available updates and
can notify you when they are available via email, syslog or dbus.
%package cron
-Summary: Files needed to run yum updates as a cron job
+Summary: RPM package installer/updater/manager cron service
Group: System Environment/Base
Requires: yum >= 3.4.3-84 cronie crontabs findutils
+Requires: yum-cron-BE = %{version}-%{release}
+# We'd probably like a suggests for yum-cron-daily here.
%if %{yum_cron_systemd}
BuildRequires: systemd-units
Requires(post): systemd
@@ -188,8 +190,48 @@ Requires(postun): /sbin/service
%endif
%description cron
-These are the files needed to run yum updates as a cron job.
-Install this package if you want auto yum updates nightly via cron.
+These are the files needed to run any of the yum-cron update services.
+
+%package cron-daily
+Summary: Files needed to run yum updates as a daily cron job
+Group: System Environment/Base
+Provides: yum-cron-BE = %{version}-%{release}
+Requires: yum-cron > 3.4.3-131
+
+%description cron-daily
+This is the configuration file for the daily yum-cron update service, which
+lives %{_sysconfdir}/yum/yum-cron.conf.
+Install this package if you want auto yum updates nightly via cron (or something
+else, via. changing the configuration).
+By default this just downloads updates and does not apply them.
+
+%package cron-hourly
+Summary: Files needed to run yum updates as an hourly cron job
+Group: System Environment/Base
+Provides: yum-cron-BE = %{version}-%{release}
+Requires: yum-cron > 3.4.3-131
+
+%description cron-hourly
+This is the configuration file for the daily yum-cron update service, which
+lives %{_sysconfdir}/yum/yum-cron-hourly.conf.
+Install this package if you want automatic yum metadata updates hourly via
+cron (or something else, via. changing the configuration).
+
+%package cron-security
+Summary: Files needed to run security yum updates as once a day
+Group: System Environment/Base
+Provides: yum-cron-BE = %{version}-%{release}
+Requires: yum-cron > 3.4.3-131
+
+%description cron-security
+This is the configuration file for the security yum-cron update service, which
+lives here: %{_sysconfdir}/yum/yum-cron-security.conf
+Install this package if you want automatic yum security updates once a day
+via. cron (or something else, via. changing the configuration -- this will be
+confusing if it's not security updates anymore though).
+By default this will download and _apply_ the security updates, unlike
+yum-cron-daily which will just download all updates by default.
+This runs after yum-cron-daily, if that is installed.
%prep
@@ -432,6 +474,21 @@ exit 0
%{_sbindir}/yum-cron
%{_mandir}/man*/yum-cron.*
+%files cron-daily
+%defattr(-,root,root)
+%{_sysconfdir}/cron.daily/0yum-daily.cron
+%config(noreplace) %{_sysconfdir}/yum/yum-cron.conf
+
+%files cron-hourly
+%defattr(-,root,root)
+%{_sysconfdir}/cron.hourly/0yum-hourly.cron
+%config(noreplace) %{_sysconfdir}/yum/yum-cron-hourly.conf
+
+%files cron-security
+%defattr(-,root,root)
+%{_sysconfdir}/cron.daily/0yum-security.cron
+%config(noreplace) %{_sysconfdir}/yum/yum-cron-security.conf
+
%if %{yum_updatesd}
%files updatesd
%defattr(-, root, root)
@@ -444,6 +501,11 @@ exit 0
%endif
%changelog
+* Thu Jan 23 2014 James Antill <james at fedoraproject.org> - 3.4.3-133
+- update to latest HEAD
+- Test for lvm binary before using. BZ 1047793.
+- Split cron-daily and cron-hourly into separate packages. Add cron-security.
+
* Wed Jan 22 2014 Valentina Mukhamedzhanova <vmukhame at redhat.com> - 3.4.3-132
- yum-cron: EmailEmitter failure should not be fatal. BZ 1055042
- yum-cron: Add a retry loop around doLock().
More information about the scm-commits
mailing list