Compare commits

...
Sign in to create a new pull request.

11 commits

Author SHA1 Message Date
Fedora Release Engineering
a4849672a5 dist-git conversion 2010-07-29 16:26:05 +00:00
Bill Nottingham
f180091b6f Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:12:38 +00:00
Alec Thomas Habig
01d7ed4eaa Update to 0.7 2008-01-10 19:57:29 +00:00
Alec Thomas Habig
ca65ed2537 Bugfixes. 2007-10-16 15:07:35 +00:00
Alec Thomas Habig
65a2e0248f Added a lockfile to prevent multiple instances of the cron scripts from
running and hanging, see bug 311661
2007-09-30 17:06:16 +00:00
Alec Thomas Habig
b81f4e9c95 Fixed bug in cron.daily script which was preventing updates from running.
Integrated checkonly patch into souce tarball.
2007-09-03 15:02:13 +00:00
Alec Thomas Habig
84696d42da Added Frank Wittig's patch to set check-only via an entry in the new file
/etc/sysconfig/yum-cron
2007-08-28 16:47:04 +00:00
Alec Thomas Habig
a81648f76a Fixed GPL -> GPLv2 2007-08-21 19:52:48 +00:00
Alec Thomas Habig
99141d9bb9 Added dist tag - far easier to invoke dist tages than learn how to work
around the build system :)
2007-08-21 19:14:04 +00:00
Alec Thomas Habig
b7023434b6 initial import to FC-6 2007-08-21 18:53:53 +00:00
bbb0c0b43a Initialize branch FC-6 for yum-cron 2007-08-20 23:00:47 +00:00
5 changed files with 146 additions and 21 deletions

View file

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
yum-cron-0.7.tar.gz

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: yum-cron
# $Id$
NAME := yum-cron
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View file

@ -0,0 +1 @@
ca247a404ac604d84f06b8a428c95648 yum-cron-0.7.tar.gz

144
yum-cron.spec Normal file
View file

@ -0,0 +1,144 @@
Summary: Files needed to run yum updates as a cron job
Name: yum-cron
Version: 0.7
Release: 1%{?dist}
URL: http://linux.duke.edu/yum/
# This is a Red Hat maintained package which is specific to
# our distribution. Thus the source is only available from
# within this srpm.
Source0: %{name}-%{version}.tar.gz
License: GPLv2
Group: System Environment/Base
BuildArch: noarch
Requires: yum >= 3.0 vixie-cron crontabs yum-downloadonly mailx
Requires(post): /sbin/chkconfig
Requires(post): /sbin/service
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
Requires(postun): /sbin/service
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%description
These are the files needed to run yum updates as a cron job. They
originated in yum-2.6.1-0.fc5, but were left out of FC6's yum.
Install this package if you want auto yum updates nightly via cron
rather than the newer yum-updatesd daemon.
%prep
%setup -q
%build
%install
rm -rf $RPM_BUILD_ROOT
install -D -m 755 yum.cron.daily $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily/yum.cron
install -D -m 755 yum.cron.weekly $RPM_BUILD_ROOT/%{_sysconfdir}/cron.weekly/yum.cron
install -D -m 755 yum-cron $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/yum-cron
install -D -m 644 yum-daily.yum $RPM_BUILD_ROOT/%{_sysconfdir}/yum/yum-daily.yum
install -D -m 644 yum-cron.sysconf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/yum-cron
%clean
rm -rf $RPM_BUILD_ROOT
%post
# Make sure chkconfig knows about the service
/sbin/chkconfig --add yum-cron
# if an upgrade:
if [ "$1" -ge "1" ]; then
# if there's a /etc/rc.d/init.d/yum file left, assume that there was an
# older instance of yum-cron which used this naming convention. Clean
# it up, do a conditional restart
if [ -f /etc/init.d/yum ]; then
# was it on?
/sbin/chkconfig yum
RETVAL=$?
if [ $RETVAL = 0 ]; then
# if it was, stop it, then turn on new yum-cron
/sbin/service yum stop 1> /dev/null 2>&1
/sbin/service yum-cron start 1> /dev/null 2>&1
/sbin/chkconfig yum-cron on
fi
# remove it from the service list
/sbin/chkconfig --del yum
fi
fi
exit 0
%preun
# if this will be a complete removeal of yum-cron rather than an upgrade,
# remove the service from chkconfig control
if [ $1 = 0 ]; then
/sbin/chkconfig --del yum-cron
/sbin/service yum-cron stop 1> /dev/null 2>&1
fi
exit 0
%postun
# If there's a yum-cron package left after uninstalling one, do a
# conditional restart of the service
if [ "$1" -ge "1" ]; then
/sbin/service yum-cron condrestart 1> /dev/null 2>&1
fi
exit 0
%files
%defattr(-,root,root)
%doc COPYING README
%{_sysconfdir}/cron.daily/yum.cron
%{_sysconfdir}/cron.weekly/yum.cron
%config(noreplace) %{_sysconfdir}/yum/yum-daily.yum
%{_sysconfdir}/rc.d/init.d/yum-cron
%config(noreplace) %{_sysconfdir}/sysconfig/yum-cron
%changelog
* Tue Jan 8 2008 Alec Habig <ahabig@umn.edu> - 0.7-1
- Add DEBUG_LEVEL, ERROR_LEVEL sysconfig options (bug 426047)
- Add MAILTO, RANDOMWAIT, and SYSTEMNAME sysconfig options (bug 426755)
* Mon Oct 15 2007 Alec Habig <ahabig@umn.edu> - 0.6-1
- Fixes for bug 327401: checkonly formatting fix and make lockfile
grabbing an atomic action using mkdir instead of touch
- Added downloadonly option (bug 333131)
- Don't update yum if set to checkonly (bug 333111)
* Sat Sep 29 2007 Alec Habig <ahabig@umn.edu> - 0.5-1
- Added a lockfile to prevent multiple instances of the cron scripts
from running and hanging, see bug 311661
* Mon Sep 3 2007 Alec Habig <ahabig@umn.edu> - 0.4-1
- Fix bug in cron.daily which was preventing updates from running
- Integrate Frank's checkonly patches into the source
* Mon Aug 27 2007 Frank Wittig <fw@weisshuhn.de> - 0.3-3
- Actual update action is now configurable. It does check-only now if
configured. Default behaviour is to do updates.
* Tue Aug 21 2007 Alec Habig <ahabig@umn.edu> - 0.3-2
- Changed over to dist tags, to play more nciely with the Fedora build system
- License changed "GPL" to "GPLv2" since rpmlint now cares
* Mon Aug 20 2007 Alec Habig <ahabig@umn.edu> - 0.3-1
- Bumped version for release to fedora-extras
* Mon Jul 30 2007 Alec Habig <ahabig@umn.edu> - 0.2-5
- spec file updates in response to review.
* Thu Jun 28 2007 Alec Habig <ahabig@umn.edu> - 0.2-4
- Check for existence of old "yum"-named init script. If so, assume
it's an upgrade, remove them, and do a condrestart.
* Tue Jun 19 2007 Alec Habig <ahabig@umn.edu> - 0.2-3
- the yum-daily.yum script marked noreplace since it's a config-y file.
Not so sure we want to do this, but it keeps rpmlint happy.
- service starting/stopping changed to conform to standards.
* Tue Jun 19 2007 Alec Habig <ahabig@umn.edu> - 0.2-2
- More specfile work, functionality and installed files not changed
* Tue Jun 19 2007 Alec Habig <ahabig@umn.edu> - 0.2-1
- Upgrade spec file to meet fedora-extras requirements
- rename init script yum-cron to meet rpmlint guidelines
- See bugzilla #212507 for the history of this package
* Tue Oct 31 2006 Alec Habig <ahabig@umn.edu> - 0.1-1
- Initial packaging of old scripts as a standalone rpm for use in FC6