summaryrefslogtreecommitdiffstats
path: root/patches/source
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2024-02-21 20:00:08 +0000
committer Eric Hameleers <alien@slackware.com>2024-02-22 13:39:58 +0100
commit14f2469b121428fbb670e743e5ae23c7d5771f7f (patch)
treedd08f5f637c1db09002492a03fde856e0c7b010e /patches/source
parentbdfa16c82f02acbe3a6ce4b13e2adf685b856454 (diff)
downloadcurrent-14f2469b121428fbb670e743e5ae23c7d5771f7f.tar.gz
current-14f2469b121428fbb670e743e5ae23c7d5771f7f.tar.xz
Wed Feb 21 20:00:08 UTC 202420240221200008_15.0
patches/packages/dcron-4.5-x86_64-12_slack15.0.txz: Rebuilt. This is a bugfix release. run-parts: skip *.orig files. Thanks to metaed. patches/packages/mozilla-thunderbird-115.8.0-x86_64-1_slack15.0.txz: Upgraded. This release contains security fixes and improvements. For more information, see: https://www.mozilla.org/en-US/thunderbird/115.8.0/releasenotes/ https://www.mozilla.org/en-US/security/advisories/mfsa2024-07/ https://www.cve.org/CVERecord?id=CVE-2024-1546 https://www.cve.org/CVERecord?id=CVE-2024-1547 https://www.cve.org/CVERecord?id=CVE-2024-1548 https://www.cve.org/CVERecord?id=CVE-2024-1549 https://www.cve.org/CVERecord?id=CVE-2024-1550 https://www.cve.org/CVERecord?id=CVE-2024-1551 https://www.cve.org/CVERecord?id=CVE-2024-1552 https://www.cve.org/CVERecord?id=CVE-2024-1553 (* Security fix *)
Diffstat (limited to 'patches/source')
-rw-r--r--patches/source/dcron/crond.default10
-rw-r--r--patches/source/dcron/crontab.root22
-rwxr-xr-xpatches/source/dcron/dcron.SlackBuild157
-rw-r--r--patches/source/dcron/doinst.sh30
-rw-r--r--patches/source/dcron/patches/0002-README-var-spool-cron-crontabs-root.patch26
-rw-r--r--patches/source/dcron/patches/0003-CHANGELOG-tweak.patch34
-rw-r--r--patches/source/dcron/patches/0006-Fixed-a-bug-whereby-syncs-killed-all-waiting-jobs.patch35
-rw-r--r--patches/source/dcron/patches/0007-Update-main.c.patch27
-rw-r--r--patches/source/dcron/patches/crontab.c.O_EXCL.diff12
-rw-r--r--patches/source/dcron/patches/defs.h.TMPDIR.diff12
-rw-r--r--patches/source/dcron/rc.crond40
-rw-r--r--patches/source/dcron/run-parts46
-rw-r--r--patches/source/dcron/run-parts.836
-rw-r--r--patches/source/dcron/slack-desc19
14 files changed, 506 insertions, 0 deletions
diff --git a/patches/source/dcron/crond.default b/patches/source/dcron/crond.default
new file mode 100644
index 000000000..032030060
--- /dev/null
+++ b/patches/source/dcron/crond.default
@@ -0,0 +1,10 @@
+# Default log level is "notice". If you want cron to actually log activity
+# to /var/log/cron, then change "-l notice" to "-l info" to increase the
+# logging level.
+#
+# Valid log levels are:
+# alert, crit, debug, emerg, err, error (deprecated synonym for err),
+# info, notice, panic (deprecated synonym for emerg), warning,
+# warn (deprecated synonym for warning).
+
+CROND_OPTS="-l notice"
diff --git a/patches/source/dcron/crontab.root b/patches/source/dcron/crontab.root
new file mode 100644
index 000000000..5b0ce8cbf
--- /dev/null
+++ b/patches/source/dcron/crontab.root
@@ -0,0 +1,22 @@
+# If you don't want the output of a cron job mailed to you, you have to direct
+# any output to /dev/null. We'll do this here since these jobs should run
+# properly on a newly installed system. If a script fails, run-parts will
+# mail a notice to root.
+#
+# Run the hourly, daily, weekly, and monthly cron jobs.
+# Jobs that need different timing may be entered into the crontab as before,
+# but most really don't need greater granularity than this. If the exact
+# times of the hourly, daily, weekly, and monthly cron jobs do not suit your
+# needs, feel free to adjust them.
+#
+# Run hourly cron jobs at 47 minutes after the hour:
+47 * * * * /usr/bin/run-parts /etc/cron.hourly 1> /dev/null
+#
+# Run daily cron jobs at 4:40 every day:
+40 4 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null
+#
+# Run weekly cron jobs at 4:30 on the first day of the week:
+30 4 * * 0 /usr/bin/run-parts /etc/cron.weekly 1> /dev/null
+#
+# Run monthly cron jobs at 4:20 on the first day of the month:
+20 4 1 * * /usr/bin/run-parts /etc/cron.monthly 1> /dev/null
diff --git a/patches/source/dcron/dcron.SlackBuild b/patches/source/dcron/dcron.SlackBuild
new file mode 100755
index 000000000..f5153c569
--- /dev/null
+++ b/patches/source/dcron/dcron.SlackBuild
@@ -0,0 +1,157 @@
+#!/bin/sh
+
+# Copyright 2009, 2010, 2012, 2016, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=dcron
+VERSION=${VERSION:-$(echo dcron-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-12_slack15.0}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-dcron
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf dcron
+tar xvf $CWD/dcron-$VERSION.tar.?z* || exit 1
+cd dcron-$VERSION
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \+ -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \+
+
+# Apply patches from git:
+zcat $CWD/patches/0002-README-var-spool-cron-crontabs-root.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/0003-CHANGELOG-tweak.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/0006-Fixed-a-bug-whereby-syncs-killed-all-waiting-jobs.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/0007-Update-main.c.patch.gz | patch -p1 --verbose || exit 1
+
+# Define TMPDIR as /run/cron instead of /tmp:
+# This eliminates possibility of stale $TMPDIR/cron.??????/ dirs as
+# they won't survive a reboot when they're in a subdir of /run
+zcat $CWD/patches/defs.h.TMPDIR.diff.gz | patch -p1 --verbose || exit 1
+
+# Fix problem where user creates /var/spool/cron/crontabs/<user>.new
+# using 'crontab -', exits with control-c, and then crontab refuses to
+# overwrite the junk file. It would be better if dcron would wipe
+# the junk file in the event it were not closed correctly, but oh well.
+zcat $CWD/patches/crontab.c.O_EXCL.diff.gz | patch -p1 --verbose || exit 1
+
+CFLAGS+="$SLKCFLAGS" make \
+ PREFIX=/usr \
+ BINDIR=/usr/bin \
+ SBINDIR=/usr/sbin \
+ MANDIR=/usr/man \
+ CRONTAB_GROUP=root \
+ || exit 1
+
+# This works now, but predictability is a good thing...
+#make install DESTDIR=$PKG
+
+strip --strip-unneeded crond crontab
+
+mkdir -p $PKG/usr/sbin
+cat crond > $PKG/usr/sbin/crond
+chmod 0755 $PKG/usr/sbin/crond
+
+mkdir -p $PKG/usr/bin
+cat crontab > $PKG/usr/bin/crontab
+chmod 4711 $PKG/usr/bin/crontab
+
+zcat $CWD/run-parts.gz > $PKG/usr/bin/run-parts
+chmod 0755 $PKG/usr/bin/run-parts
+
+mkdir -p $PKG/usr/man/man{1,8}
+cat crontab.1 | gzip -9c > $PKG/usr/man/man1/crontab.1.gz
+cat crond.8 | gzip -9c > $PKG/usr/man/man8/crond.8.gz
+cat $CWD/run-parts.8.gz > $PKG/usr/man/man8/run-parts.8.gz
+
+# Add the init script:
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.crond > $PKG/etc/rc.d/rc.crond.new
+chmod 755 $PKG/etc/rc.d/rc.crond.new
+
+# Add the default file:
+mkdir -p $PKG/etc/default
+cat $CWD/crond.default > $PKG/etc/default/crond.new
+
+# Create some other stuff we need
+mkdir -p $PKG/etc/cron.{hourly,daily,weekly,monthly}
+mkdir -p $PKG/var/spool/cron/crontabs
+mkdir -p $PKG/var/spool/cron/cronstamps
+chmod 0751 $PKG/var/spool/cron
+chmod 0750 $PKG/var/spool/cron/crontabs $PKG/var/spool/cron/cronstamps
+zcat $CWD/crontab.root > $PKG/var/spool/cron/crontabs/root.new
+chmod 0600 $PKG/var/spool/cron/crontabs/root.new
+
+# dcron will whine about "unable to scan" this directory, so we'll create it
+mkdir -p $PKG/etc/cron.d
+
+mkdir -p $PKG/usr/doc/dcron-$VERSION
+cp -a \
+ CHANGELOG README \
+ extra \
+ $PKG/usr/doc/dcron-$VERSION
+chown -R root:root $PKG/usr/doc/dcron-$VERSION/*
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/dcron-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/dcron/doinst.sh b/patches/source/dcron/doinst.sh
new file mode 100644
index 000000000..0d5f1ee87
--- /dev/null
+++ b/patches/source/dcron/doinst.sh
@@ -0,0 +1,30 @@
+config() {
+ for infile in $1; do
+ NEW="$infile"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+ done
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/rc.d/rc.crond.new
+config etc/default/crond.new
+config var/spool/cron/crontabs/root.new
+rm -f var/spool/cron/crontabs/root.new
diff --git a/patches/source/dcron/patches/0002-README-var-spool-cron-crontabs-root.patch b/patches/source/dcron/patches/0002-README-var-spool-cron-crontabs-root.patch
new file mode 100644
index 000000000..57b8966da
--- /dev/null
+++ b/patches/source/dcron/patches/0002-README-var-spool-cron-crontabs-root.patch
@@ -0,0 +1,26 @@
+From 500f3d402a94c6950946515d76ebd72872a6d0e2 Mon Sep 17 00:00:00 2001
+From: Jim Pryor <profjim@jimpryor.net>
+Date: Sun, 1 May 2011 18:56:17 -0400
+Subject: [PATCH 2/9] README: /var/spool/cron/crontabs/root
+
+Signed-off-by: Jim Pryor <profjim@jimpryor.net>
+---
+ README | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/README b/README
+index de02958..e33b1aa 100644
+--- a/README
++++ b/README
+@@ -115,7 +115,7 @@ are normally in /var/spool/cron/cronstamps. These directories normally have perm
+
+ Here is the superuser's crontab, created using `sudo crontab -e`:
+
+- -rw------- 0 root root 513 Jan 6 18:58 /var/spool/cron/root
++ -rw------- 0 root root 513 Jan 6 18:58 /var/spool/cron/crontabs/root
+
+ TESTING
+ -------
+--
+2.13.2
+
diff --git a/patches/source/dcron/patches/0003-CHANGELOG-tweak.patch b/patches/source/dcron/patches/0003-CHANGELOG-tweak.patch
new file mode 100644
index 000000000..56f3c750e
--- /dev/null
+++ b/patches/source/dcron/patches/0003-CHANGELOG-tweak.patch
@@ -0,0 +1,34 @@
+From 2e3717c48ead5a962e2c29bc818672fff36f73f6 Mon Sep 17 00:00:00 2001
+From: Jim Pryor <profjim@jimpryor.net>
+Date: Sun, 1 May 2011 19:21:21 -0400
+Subject: [PATCH 3/9] CHANGELOG tweak
+
+Signed-off-by: Jim Pryor <profjim@jimpryor.net>
+---
+ CHANGELOG | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/CHANGELOG b/CHANGELOG
+index a1ea4a7..0710c3b 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -19,12 +19,12 @@ git
+
+ * Documentation and error message updates.
+
+-v4.5 30-Apr-2011
++v4.5 1-May-2011
+ * Some cron jobs were running multiple times. Now we make sure not to
+ ArmJobs that are already running; and not to resynchronize while jobs are
+- running; and to poll the DST setting. (Fixes Arch FS#18681; thanks to Paul
+- Gideon Dann for identifying the second issue; and Tilman Sauerbeck for
+- identifying the third.)
++ running; and to poll the DST setting. (Fixes Arch FS#18681; thanks to Vincent
++ Cappe and Paul Gideon Dann for identifying the second issue; and Tilman
++ Sauerbeck for identifying the third.)
+
+ * @monthly was wrongly being parsed the same as @yearly (fixes Arch
+ FS#19123). Thanks to Peter Johnson, Paul Gideon Dann, and Tilman Sauerbeck.
+--
+2.13.2
+
diff --git a/patches/source/dcron/patches/0006-Fixed-a-bug-whereby-syncs-killed-all-waiting-jobs.patch b/patches/source/dcron/patches/0006-Fixed-a-bug-whereby-syncs-killed-all-waiting-jobs.patch
new file mode 100644
index 000000000..090e2e5f5
--- /dev/null
+++ b/patches/source/dcron/patches/0006-Fixed-a-bug-whereby-syncs-killed-all-waiting-jobs.patch
@@ -0,0 +1,35 @@
+From 65d2649a7c8b72561eefcec239f97e7fd386114e Mon Sep 17 00:00:00 2001
+From: Corey Theiss <corey.theiss@maclaren.com>
+Date: Mon, 24 Mar 2014 16:25:31 -0400
+Subject: [PATCH 6/9] Fixed a bug whereby syncs killed all waiting jobs.
+
+---
+ database.c | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/database.c b/database.c
+index dd971ce..02c5c92 100644
+--- a/database.c
++++ b/database.c
+@@ -1232,8 +1232,17 @@ CheckJobs(void)
+ }
+ }
+ }
++ nStillRunning += file->cf_Running;
++ }
++ /* For the purposes of this check, increase the "still running" counter if a file has lines that are waiting */
++ if (file->cf_Running == 0) {
++ for (line = file->cf_LineBase; line; line = line->cl_Next) {
++ if (line->cl_Pid == -2) {
++ nStillRunning += 1;
++ break;
++ }
++ }
+ }
+- nStillRunning += file->cf_Running;
+ }
+ return(nStillRunning);
+ }
+--
+2.13.2
+
diff --git a/patches/source/dcron/patches/0007-Update-main.c.patch b/patches/source/dcron/patches/0007-Update-main.c.patch
new file mode 100644
index 000000000..d120f37c0
--- /dev/null
+++ b/patches/source/dcron/patches/0007-Update-main.c.patch
@@ -0,0 +1,27 @@
+From abf8c4bf53a84ef3de530519a3bbb6b599595f2c Mon Sep 17 00:00:00 2001
+From: robdewit <rdewit@wise-guys.nl>
+Date: Tue, 31 Mar 2015 14:24:15 +0200
+Subject: [PATCH 7/9] Update main.c
+
+Removed bug where cron.update is not picked up while jobs are still running. (We have long running cronjobs and experienced long overdue cron.update files)
+---
+ main.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/main.c b/main.c
+index 595f07a..0eba280 100644
+--- a/main.c
++++ b/main.c
+@@ -338,7 +338,8 @@ main(int ac, char **av)
+ SynchronizeDir(SCDir, "root", 0);
+ ReadTimestamps(NULL);
+ }
+- } else {
++ }
++ if (rescan < 60) {
+ CheckUpdates(CDir, NULL, t1, t2);
+ CheckUpdates(SCDir, "root", t1, t2);
+ }
+--
+2.13.2
+
diff --git a/patches/source/dcron/patches/crontab.c.O_EXCL.diff b/patches/source/dcron/patches/crontab.c.O_EXCL.diff
new file mode 100644
index 000000000..f705487ec
--- /dev/null
+++ b/patches/source/dcron/patches/crontab.c.O_EXCL.diff
@@ -0,0 +1,12 @@
+diff -Nur dcron-4.5.orig//crontab.c dcron-4.5/crontab.c
+--- dcron-4.5.orig//crontab.c 2011-05-01 07:22:09.000000000 -0500
++++ dcron-4.5/crontab.c 2011-08-22 16:26:46.778225447 -0500
+@@ -199,7 +199,7 @@
+ * Read from repFd, write to fd for "$CDir/$USER.new"
+ */
+ snprintf(path, sizeof(path), "%s.new", pas->pw_name);
+- if ((fd = open(path, O_CREAT|O_TRUNC|O_EXCL|O_APPEND|O_WRONLY, 0600)) >= 0) {
++ if ((fd = open(path, O_CREAT|O_TRUNC|O_APPEND|O_WRONLY, 0600)) >= 0) {
+ while ((n = read(repFd, buf, sizeof(buf))) > 0) {
+ write(fd, buf, n);
+ }
diff --git a/patches/source/dcron/patches/defs.h.TMPDIR.diff b/patches/source/dcron/patches/defs.h.TMPDIR.diff
new file mode 100644
index 000000000..0210c55c9
--- /dev/null
+++ b/patches/source/dcron/patches/defs.h.TMPDIR.diff
@@ -0,0 +1,12 @@
+diff -Nur dcron-4.5.orig//defs.h dcron-4.5/defs.h
+--- dcron-4.5.orig//defs.h 2011-05-01 07:22:09.000000000 -0500
++++ dcron-4.5/defs.h 2011-08-22 16:28:35.343956248 -0500
+@@ -73,7 +73,7 @@
+ #define CRONUPDATE "cron.update"
+ #endif
+ #ifndef TMPDIR
+-#define TMPDIR "/tmp"
++#define TMPDIR "/run/cron"
+ #endif
+
+ #ifndef SENDMAIL
diff --git a/patches/source/dcron/rc.crond b/patches/source/dcron/rc.crond
new file mode 100644
index 000000000..d9076b330
--- /dev/null
+++ b/patches/source/dcron/rc.crond
@@ -0,0 +1,40 @@
+#!/bin/sh
+# /etc/rc.d/rc.crond - start/stop the cron daemon
+
+# To change the default options, edit /etc/default/crond.
+if [ -r /etc/default/crond ]; then
+ . /etc/default/crond
+fi
+
+start_crond() {
+ if ! /usr/bin/pgrep --ns $$ --euid root -f "^/usr/sbin/crond" 1> /dev/null 2> /dev/null ; then
+ echo "Starting crond: /usr/sbin/crond $CROND_OPTS"
+ mkdir -p /run/cron
+ /usr/sbin/crond $CROND_OPTS
+ fi
+}
+
+stop_crond() {
+ echo "Stopping crond."
+ /usr/bin/pkill --ns $$ --euid root -f "^/usr/sbin/crond" 2> /dev/null
+}
+
+restart_crond() {
+ stop_crond
+ sleep 1
+ start_crond
+}
+
+case "$1" in
+'start')
+ start_crond
+ ;;
+'stop')
+ stop_crond
+ ;;
+'restart')
+ restart_crond
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac
diff --git a/patches/source/dcron/run-parts b/patches/source/dcron/run-parts
new file mode 100644
index 000000000..97e7efed4
--- /dev/null
+++ b/patches/source/dcron/run-parts
@@ -0,0 +1,46 @@
+#!/bin/sh
+# run-parts: Runs all the scripts found in a directory.
+
+# keep going when something fails
+set +e
+
+if [ $# -lt 1 ]; then
+ echo "Usage: run-parts <directory>"
+ exit 1
+fi
+
+if [ ! -d $1 ]; then
+ echo "Not a directory: $1"
+ echo "Usage: run-parts <directory>"
+ exit 1
+fi
+
+# There are several types of files that we would like to
+# ignore automatically, as they are likely to be backups
+# of other scripts:
+IGNORE_SUFFIXES="~ ^ , .bak .new .orig .rpmsave .rpmorig .rpmnew .swp"
+
+# Main loop:
+for SCRIPT in $1/* ; do
+ # If this is not a regular file, skip it:
+ if [ ! -f $SCRIPT ]; then
+ continue
+ fi
+ # Determine if this file should be skipped by suffix:
+ SKIP=false
+ for SUFFIX in $IGNORE_SUFFIXES ; do
+ if [ ! "$(basename $SCRIPT $SUFFIX)" = "$(basename $SCRIPT)" ]; then
+ SKIP=true
+ break
+ fi
+ done
+ if [ "$SKIP" = "true" ]; then
+ continue
+ fi
+ # If we've made it this far, then run the script if it's executable:
+ if [ -x $SCRIPT ]; then
+ $SCRIPT || echo "$SCRIPT failed."
+ fi
+done
+
+exit 0
diff --git a/patches/source/dcron/run-parts.8 b/patches/source/dcron/run-parts.8
new file mode 100644
index 000000000..2d5e5f6ad
--- /dev/null
+++ b/patches/source/dcron/run-parts.8
@@ -0,0 +1,36 @@
+.\" -*- nroff -*-
+.ds g \" empty
+.ds G \" empty
+.\" Like TP, but if specified indent is more than half
+.\" the current line-length - indent, use the default indent.
+.de Tp
+.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
+.el .TP "\\$1"
+..
+.TH RUN-PARTS 8 "14 Apr 2002" "Slackware Version 8.1.0
+.SH NAME
+run-parts \- run scripts found in a directory
+.SH SYNOPSIS
+.B run-parts <directory>
+.LP
+.SH DESCRIPTION
+.B run-parts
+is a utility that will run scripts that are found in a directory. For example,
+it might be useful to create an /etc/cron.daily directory and put scripts in
+there for daily cron jobs. Then
+.B run-parts
+can be called once a day from root's crontab to run all the scripts found in
+/etc/cron.daily:
+
+40 4 * * * run-parts /etc/cron.daily
+
+.B run-parts
+automatically skips files with certain suffixes that are generally associated
+with backup or extra files. Any file that ends in one of these will be silently
+ignored: ~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp
+.SH AUTHOR
+Patrick J. Volkerding <volkerdi@slackware.com>, with ideas borrowed from the
+Red Hat and Debian versions of this utility.
+.SH "SEE ALSO"
+.BR crond(8),
+.BR crontab(8).
diff --git a/patches/source/dcron/slack-desc b/patches/source/dcron/slack-desc
new file mode 100644
index 000000000..4238f013b
--- /dev/null
+++ b/patches/source/dcron/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+dcron: dcron (Dillon's Cron daemon)
+dcron:
+dcron: The cron daemon runs in the background and executes tasks on behalf of
+dcron: users at the appropriate time. Many timed system tasks are started
+dcron: with cron, such as the nightly indexing with updatedb.
+dcron:
+dcron: dcron was written entirely from scratch by Matthew Dillon.
+dcron:
+dcron:
+dcron:
+dcron: