cronie: update to 1.7.2 and overhaul recipe (#10371)

This commit is contained in:
augiedoggie
2024-04-23 21:06:27 -06:00
committed by GitHub
parent eca94b8c0c
commit 6fa70448db
9 changed files with 174 additions and 64 deletions

View File

@@ -0,0 +1,12 @@
#!/bin/sh
# Check whether 0anacron was run today already
if test -r /var/spool/anacron/cron.daily; then
day=`cat /var/spool/anacron/cron.daily`
fi
if [ `date +%Y%m%d` = "$day" ]; then
exit 0
fi
# TODO add check to see if we're running on battery and exit
anacron -s

View File

@@ -0,0 +1,6 @@
# Run the hourly jobs
SHELL=/bin/bash
PATH=/boot/home/config/non-packaged/bin:/boot/home/config/bin:/boot/system/non-packaged/bin:/boot/system/bin
MAILTO=""
# If you change the username of UID 0 then you must change "user" below to match
01 * * * * user run-parts /etc/cron.hourly

View File

@@ -0,0 +1,16 @@
# /etc/anacrontab: configuration file for anacron
# See anacron(8) and anacrontab(5) for details.
SHELL=/bin/bash
PATH=/boot/home/config/non-packaged/bin:/boot/home/config/bin:/boot/system/non-packaged/bin:/boot/system/bin
MAILTO=""
# the maximal random delay added to the base delay of the jobs
RANDOM_DELAY=45
# the jobs will be started during the following hours only
START_HOURS_RANGE=3-22
#period in days delay in minutes job-identifier command
1 5 cron.daily nice run-parts /etc/cron.daily
7 25 cron.weekly nice run-parts /etc/cron.weekly
@monthly 45 cron.monthly nice run-parts /etc/cron.monthly

View File

@@ -0,0 +1 @@
# without this file, only users listed in /etc/cron.allow can use crontab

View File

@@ -0,0 +1,8 @@
job x-vnd.cronie-crond {
launch @CROND_BIN@ -n -P -s
on initial_volumes_mounted
no_safemode
legacy
}

View File

@@ -0,0 +1,5 @@
# /etc/crontab: configuration file for cron
# See cron(8) and crontab(5) for details.
# m h dom mon dow user command

View File

@@ -1,64 +0,0 @@
SUMMARY="A cron daemon"
DESCRIPTION="Cronie is a standard UNIX daemon cron based on the original vixie-cron"
HOMEPAGE="https://github.com/cronie-crond/cronie/"
COPYRIGHT="2004-2018 Paul Vixie"
LICENSE="BSD (2-clause)
BSD (3-clause)
GNU GPL v2"
REVISION="1"
SOURCE_URI="https://github.com/cronie-crond/cronie/archive/cronie-$portVersion.tar.gz"
CHECKSUM_SHA256="1ddbc8f8d07dfe1d45998b0a0cbd9a216cd4d7bc64d1626b2bc8b3a69e4641d1"
SOURCE_DIR="cronie-cronie-$portVersion"
ARCHITECTURES="all ?x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
cronie$secondaryArchSuffix = $portVersion
cmd:anacron$commandSuffix = $portVersion
cmd:crond$commandSuffix = $portVersion
cmd:cronnext$commandSuffix = $portVersion
cmd:crontab$commandSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
# lib:libpam$secondaryArchSuffix
"
CONFLICTS="
dcron
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
# devel:libpam$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:autoheader
cmd:automake
cmd:make
cmd:gcc$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
"
BUILD()
{
autogen.sh
runConfigure --omit-dirs binDir ./configure \
--bindir=$commandBinDir \
--enable-anacron
make $jobArgs
}
INSTALL()
{
make install
}

View File

@@ -0,0 +1,114 @@
SUMMARY="Standard UNIX cron daemon that runs specified programs at scheduled times"
DESCRIPTION="Cronie contains the standard UNIX daemon crond that runs specified programs at \
scheduled times and related tools. The source is based on the original vixie-cron and has \
security and configuration enhancements."
HOMEPAGE="https://github.com/cronie-crond/cronie/"
COPYRIGHT="
1988-1994 Paul Vixie
1998-2024 Marcela Mašláňová, Colin Dean, Tomáš Mráz, Marco Migliori, Sami Kerola, and others
"
LICENSE="
BSD (2-clause)
BSD (3-clause)
GNU GPL v2
ISC
MIT
"
REVISION="1"
SOURCE_URI="https://github.com/cronie-crond/cronie/archive/cronie-$portVersion.tar.gz"
CHECKSUM_SHA256="241ecc1dcd8d4b2a6744fe93509932254d20b7bb9d979d27429809493806357f"
SOURCE_DIR="cronie-cronie-$portVersion"
ADDITIONAL_FILES="
0anacron
0hourly
anacrontab
cron.deny
crontab
cronie.launch.in
"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
GLOBAL_WRITABLE_FILES="
settings/etc/anacrontab keep-old
settings/etc/cron.deny keep-old
settings/etc/cron.d/0hourly keep-old
settings/etc/cron.hourly/0anacron keep-old
settings/etc/cron.daily directory keep-old
settings/etc/cron.weekly directory keep-old
settings/etc/cron.monthly directory keep-old
settings/etc/crontab keep-old
var/run directory keep-old
var/spool/cron directory keep-old
var/spool/anacron directory keep-old
"
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
cronie$secondaryArchSuffix = $portVersion
cmd:anacron$commandSuffix = $portVersion
cmd:crond$commandSuffix = $portVersion
cmd:cronnext$commandSuffix = $portVersion
cmd:crontab$commandSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
cmd:nice
cmd:run_parts
"
CONFLICTS="
dcron
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:autoheader
cmd:automake
cmd:gawk
cmd:make
cmd:gcc$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
"
BUILD()
{
./autogen.sh
runConfigure --omit-dirs "binDir sysconfDir" ./configure \
--bindir=$commandBinDir \
--sysconfdir=$settingsDir/etc \
--with-editor=nano \
--enable-anacron
make $jobArgs
}
INSTALL()
{
make install
chmod u+s $commandBinDir/crontab
install -d $localStateDir/spool/{ana,}cron $localStateDir/run
install -d $settingsDir/etc/cron.{d,hourly,daily,weekly,monthly}
install -Dm0644 $portDir/additional-files/cron.deny $settingsDir/etc/cron.deny
install -Dm0644 $portDir/additional-files/crontab $settingsDir/etc/crontab
install -Dm0644 $portDir/additional-files/anacrontab $settingsDir/etc/anacrontab
install -Dm0644 $portDir/additional-files/0hourly $settingsDir/etc/cron.d/0hourly
install -Dm0755 $portDir/additional-files/0anacron $settingsDir/etc/cron.hourly/0anacron
install -d $dataDir/launch
sed -e "s|@CROND_BIN@|$commandBinDir/crond|" \
$portDir/additional-files/cronie.launch.in > $dataDir/launch/cronie.launch
}

View File

@@ -0,0 +1,12 @@
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.