Move source to fedorahosted
Use git tarball from fedorahosted as source.
This commit is contained in:
parent
734f352fec
commit
a49aff492f
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
config
|
||||
crontab
|
||||
run-parts
|
||||
crontabs.4
|
||||
*~
|
||||
*.tar.*
|
||||
/crontabs-1.11-1.20101022git.tar.gz
|
||||
|
15
crontab
15
crontab
@ -1,15 +0,0 @@
|
||||
SHELL=/bin/bash
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
MAILTO=root
|
||||
|
||||
# For details see man 4 crontabs
|
||||
|
||||
# Example of job definition:
|
||||
# .---------------- minute (0 - 59)
|
||||
# | .------------- hour (0 - 23)
|
||||
# | | .---------- day of month (1 - 31)
|
||||
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
|
||||
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
|
||||
# | | | | |
|
||||
# * * * * * command to be executed
|
||||
|
@ -1,18 +1,18 @@
|
||||
%define snap_release 20101022git
|
||||
Summary: Root crontab files used to schedule the execution of programs
|
||||
Name: crontabs
|
||||
Version: 1.10
|
||||
Release: 34%{?dist}
|
||||
Version: 1.11
|
||||
Release: 1.%{snap_release}%{?dist}
|
||||
License: Public Domain and GPLv2
|
||||
Group: System Environment/Base
|
||||
# no URL - it's only a one script which is used by different packages
|
||||
Source0: crontab
|
||||
Source1: run-parts
|
||||
Source2: crontabs.4
|
||||
URL: https://fedorahosted.org/crontabs
|
||||
Source0: https://fedorahosted.org/releases/c/r/crontabs/%{name}-%{version}-1.%{snap_release}.tar.gz
|
||||
BuildArch: noarch
|
||||
Requires: /etc/cron.d
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
%description
|
||||
This package is used by Fedora mainly for executing files by cron.
|
||||
|
||||
The crontabs package contains root crontab files and directories.
|
||||
You will need to install cron daemon to run the jobs from the crontabs.
|
||||
The cron daemon such as cronie or fcron checks the crontab files to
|
||||
@ -23,7 +23,8 @@ Crontabs handles a basic system function, so it should be installed on
|
||||
your system.
|
||||
|
||||
%prep
|
||||
#empty
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
#empty
|
||||
|
||||
@ -33,9 +34,9 @@ mkdir -p $RPM_BUILD_ROOT/etc/cron.{hourly,daily,weekly,monthly}
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man4/
|
||||
|
||||
install -m644 %SOURCE0 $RPM_BUILD_ROOT/etc/crontab
|
||||
install -m755 %SOURCE1 $RPM_BUILD_ROOT/usr/bin/run-parts
|
||||
install -m644 %SOURCE2 $RPM_BUILD_ROOT/%{_mandir}/man4/
|
||||
install -m644 ./crontab $RPM_BUILD_ROOT/etc/crontab
|
||||
install -m755 ./run-parts $RPM_BUILD_ROOT/usr/bin/run-parts
|
||||
install -m644 ./crontabs.4 $RPM_BUILD_ROOT/%{_mandir}/man4/
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
@ -51,6 +52,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%dir /etc/cron.monthly
|
||||
|
||||
%changelog
|
||||
* Fri Oct 22 2010 Marcela Mašláňová <mmaslano@redhat.com> 1.11-1
|
||||
- use sources from source fedorahosted
|
||||
|
||||
* Mon Oct 18 2010 Marcela Mašláňová <mmaslano@redhat.com> 1.10-34
|
||||
- add --list option into run-parts
|
||||
|
||||
|
76
run-parts
76
run-parts
@ -1,76 +0,0 @@
|
||||
#!/bin/bash
|
||||
# run-parts - concept taken from Debian
|
||||
|
||||
# keep going when something fails
|
||||
set +e
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Usage: run-parts [--list] <dir>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while [ $# -gt 1 ]; do
|
||||
case $1 in
|
||||
--list)
|
||||
list=1
|
||||
shift
|
||||
;;
|
||||
--)
|
||||
# -- end of options
|
||||
shift
|
||||
break
|
||||
;;
|
||||
*)
|
||||
# directory
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ! -d $1 ]; then
|
||||
echo "Not a directory: $1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ignore *~ and *, scripts
|
||||
for i in $(LC_ALL=C; echo $1/*[^~,]) ; do
|
||||
[ -d $i ] && continue
|
||||
# Don't run *.{rpmsave,rpmorig,rpmnew,swp,cfsaved} scripts
|
||||
[ "${i%.cfsaved}" != "${i}" ] && continue
|
||||
[ "${i%.rpmsave}" != "${i}" ] && continue
|
||||
[ "${i%.rpmorig}" != "${i}" ] && continue
|
||||
[ "${i%.rpmnew}" != "${i}" ] && continue
|
||||
[ "${i%.swp}" != "${i}" ] && continue
|
||||
[ "${i%,v}" != "${i}" ] && continue
|
||||
|
||||
# jobs.deny prevents specific files from being executed
|
||||
# jobs.allow prohibits all non-named jobs from being run.
|
||||
# can be used in conjunction but there's no reason to do so.
|
||||
if [ -r $1/jobs.deny ]; then
|
||||
grep -q "^$(basename $i)$" $1/jobs.deny && continue
|
||||
fi
|
||||
if [ -r $1/jobs.allow ]; then
|
||||
grep -q "^$(basename $i)$" $1/jobs.allow || continue
|
||||
fi
|
||||
|
||||
if [ -x $i ]; then
|
||||
if [ -r $1/whitelist ]; then
|
||||
grep -q "^$(basename $i)$" $1/whitelist && continue
|
||||
fi
|
||||
# list executable files in directory
|
||||
if [ ${list:-0} != 0 ]; then
|
||||
echo $i;
|
||||
else # run executable files
|
||||
logger -p cron.notice -t "run-parts($1)[$$]" "starting $(basename $i)"
|
||||
$i 2>&1 | awk -v "progname=$i" \
|
||||
'progname {
|
||||
print progname ":\n"
|
||||
progname="";
|
||||
}
|
||||
{ print; }'
|
||||
logger -i -p cron.notice -t "run-parts($1)" "finished $(basename $i)"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user