Move source to fedorahosted

Use git tarball from fedorahosted as source.
This commit is contained in:
Marcela Mašláňová 2010-10-22 15:04:57 +02:00
parent 734f352fec
commit a49aff492f
5 changed files with 19 additions and 109 deletions

7
.gitignore vendored
View File

@ -1,4 +1,3 @@
config
crontab
run-parts
crontabs.4
*~
*.tar.*
/crontabs-1.11-1.20101022git.tar.gz

15
crontab
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,3 +1 @@
3a9b01f4bf9205b5c62cb16782a13d48 run-parts
714d6ada56f1e41e614693f50a8034ef crontab
e1f6e832d90ea9a4ff8f23232b8252a6 crontabs.4
51ad7b320057001d4209bff948edee0a crontabs-1.11-1.20101022git.tar.gz