From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C11A959CA5 for ; Tue, 15 Mar 2016 02:33:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E3C0C21C001; Tue, 15 Mar 2016 02:33:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3922321C001 for ; Tue, 15 Mar 2016 02:33:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4210A340B55 for ; Tue, 15 Mar 2016 02:33:06 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 92B4C860 for ; Tue, 15 Mar 2016 02:33:02 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1458009119.e679b9d14900dfe50a49342172d4397fbcbbb649.vapier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/cronbase/files/, sys-process/cronbase/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-process/cronbase/cronbase-0.3.3.ebuild sys-process/cronbase/cronbase-0.3.4.ebuild sys-process/cronbase/cronbase-0.3.5-r1.ebuild sys-process/cronbase/cronbase-0.3.6.ebuild sys-process/cronbase/files/run-crons-0.3.3 sys-process/cronbase/files/run-crons-0.3.4 sys-process/cronbase/files/run-crons-0.3.5 sys-process/cronbase/files/run-crons-0.3.6 X-VCS-Directories: sys-process/cronbase/ sys-process/cronbase/files/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: e679b9d14900dfe50a49342172d4397fbcbbb649 X-VCS-Branch: master Date: Tue, 15 Mar 2016 02:33:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: da5d5411-5bff-4710-810b-81bd2e9c8112 X-Archives-Hash: e850cd5b519efcd1f92a0aa57a048e7d commit: e679b9d14900dfe50a49342172d4397fbcbbb649 Author: Mike Frysinger gentoo org> AuthorDate: Tue Mar 15 02:29:37 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Tue Mar 15 02:31:59 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e679b9d1 sys-process/cronbase: drop old <0.3.7 versions sys-process/cronbase/cronbase-0.3.3.ebuild | 45 ----------- sys-process/cronbase/cronbase-0.3.4.ebuild | 33 -------- sys-process/cronbase/cronbase-0.3.5-r1.ebuild | 33 -------- sys-process/cronbase/cronbase-0.3.6.ebuild | 33 -------- sys-process/cronbase/files/run-crons-0.3.3 | 86 -------------------- sys-process/cronbase/files/run-crons-0.3.4 | 90 --------------------- sys-process/cronbase/files/run-crons-0.3.5 | 106 ------------------------- sys-process/cronbase/files/run-crons-0.3.6 | 109 -------------------------- 8 files changed, 535 deletions(-) diff --git a/sys-process/cronbase/cronbase-0.3.3.ebuild b/sys-process/cronbase/cronbase-0.3.3.ebuild deleted file mode 100644 index a1410bc..0000000 --- a/sys-process/cronbase/cronbase-0.3.3.ebuild +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -inherit user - -DESCRIPTION="base for all cron ebuilds" -HOMEPAGE="https://www.gentoo.org/" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" -IUSE="" - -pkg_setup() { - enewgroup cron 16 - enewuser cron 16 -1 /var/spool/cron cron -} - -src_install() { - newsbin "${FILESDIR}"/run-crons-${PV} run-crons || die - - diropts -m0750; keepdir /etc/cron.hourly - diropts -m0750; keepdir /etc/cron.daily - diropts -m0750; keepdir /etc/cron.weekly - diropts -m0750; keepdir /etc/cron.monthly - - diropts -m0750 -o root -g cron; keepdir /var/spool/cron - - diropts -m0750; keepdir /var/spool/cron/lastrun -} - -pkg_postinst() { - #Portage doesn't enforce proper permissions on already existing" - #directories (bug 141619). - echo - elog "Forcing proper permissions on" - elog "${ROOT}etc/cron.{hourly,daily,weekly,monthly}," - elog "${ROOT}var/spool/cron/ and ${ROOT}var/spool/cron/lastrun/" - echo - chmod 0750 "${ROOT}"etc/cron.{hourly,daily,weekly,monthly} \ - || die "chmod failed" - chmod 0750 "${ROOT}"var/spool/{cron,cron/lastrun} || die "chmod failed" - chown root:cron "${ROOT}var/spool/cron" || die "chown failed" -} diff --git a/sys-process/cronbase/cronbase-0.3.4.ebuild b/sys-process/cronbase/cronbase-0.3.4.ebuild deleted file mode 100644 index 9e09a39..0000000 --- a/sys-process/cronbase/cronbase-0.3.4.ebuild +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI="5" - -inherit user - -DESCRIPTION="base for all cron ebuilds" -HOMEPAGE="https://www.gentoo.org/" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" -IUSE="" - -S=${WORKDIR} - -pkg_setup() { - enewgroup cron 16 - enewuser cron 16 -1 /var/spool/cron cron -} - -src_install() { - newsbin "${FILESDIR}"/run-crons-${PV} run-crons - - diropts -m0750 - keepdir /etc/cron.{hourly,daily,weekly,monthly} - - keepdir /var/spool/cron/lastrun - diropts -m0750 -o root -g cron - keepdir /var/spool/cron -} diff --git a/sys-process/cronbase/cronbase-0.3.5-r1.ebuild b/sys-process/cronbase/cronbase-0.3.5-r1.ebuild deleted file mode 100644 index 9e09a39..0000000 --- a/sys-process/cronbase/cronbase-0.3.5-r1.ebuild +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI="5" - -inherit user - -DESCRIPTION="base for all cron ebuilds" -HOMEPAGE="https://www.gentoo.org/" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" -IUSE="" - -S=${WORKDIR} - -pkg_setup() { - enewgroup cron 16 - enewuser cron 16 -1 /var/spool/cron cron -} - -src_install() { - newsbin "${FILESDIR}"/run-crons-${PV} run-crons - - diropts -m0750 - keepdir /etc/cron.{hourly,daily,weekly,monthly} - - keepdir /var/spool/cron/lastrun - diropts -m0750 -o root -g cron - keepdir /var/spool/cron -} diff --git a/sys-process/cronbase/cronbase-0.3.6.ebuild b/sys-process/cronbase/cronbase-0.3.6.ebuild deleted file mode 100644 index 9e09a39..0000000 --- a/sys-process/cronbase/cronbase-0.3.6.ebuild +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI="5" - -inherit user - -DESCRIPTION="base for all cron ebuilds" -HOMEPAGE="https://www.gentoo.org/" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" -IUSE="" - -S=${WORKDIR} - -pkg_setup() { - enewgroup cron 16 - enewuser cron 16 -1 /var/spool/cron cron -} - -src_install() { - newsbin "${FILESDIR}"/run-crons-${PV} run-crons - - diropts -m0750 - keepdir /etc/cron.{hourly,daily,weekly,monthly} - - keepdir /var/spool/cron/lastrun - diropts -m0750 -o root -g cron - keepdir /var/spool/cron -} diff --git a/sys-process/cronbase/files/run-crons-0.3.3 b/sys-process/cronbase/files/run-crons-0.3.3 deleted file mode 100755 index 9b4898a..0000000 --- a/sys-process/cronbase/files/run-crons-0.3.3 +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# -# this script looks into /etc/cron.[hourly|daily|weekly|monthly] -# for scripts to be executed. The info about last run is stored in -# /var/spool/cron/lastrun - -LOCKDIR=/var/spool/cron/lastrun -LOCKFILE=${LOCKDIR}/lock - -mkdir -p ${LOCKDIR} - -# Make sure we're not running multiple instances at once. -# Try twice to lock, otherwise give up. -for ((i = 0; i < 2; i = i + 1)); do - ln -sn $$ ${LOCKFILE} 2>/dev/null && break - - # lock failed, check for a running process. - # handle both old- and new-style locking. - cronpid=$(readlink ${LOCKFILE} 2>/dev/null) || - cronpid=$(cat ${LOCKFILE} 2>/dev/null) || - continue # lockfile disappeared? try again - - # better than kill -0 because we can verify that it's really - # another run-crons process - if [[ $(/dev/null; then - # whoa, another process is really running - exit 0 - else - rm -f ${LOCKFILE} - fi -done - -# Check to make sure locking was successful -if [[ ! -L ${LOCKFILE} ]]; then - echo "Can't create or read existing ${LOCKFILE}, giving up" - exit 1 -fi - -# Set a trap to remove the lockfile when we're finished -trap "rm -f ${LOCKFILE}" 0 1 2 3 15 - - -for BASE in hourly daily weekly monthly ; do - CRONDIR=/etc/cron.${BASE} - - test -d $CRONDIR || continue - - if [ -e ${LOCKDIR}/cron.$BASE ] ; then - case $BASE in - hourly) - #>= 1 hour, 5 min -=> +65 min - TIME="-cmin +65" ;; - daily) - #>= 1 day, 5 min -=> +1445 min - TIME="-cmin +1445" ;; - weekly) - #>= 1 week, 5 min -=> +10085 min - TIME="-cmin +10085" ;; - monthly) - #>= 31 days, 5 min -=> +44645 min - TIME="-cmin +44645" ;; - esac - - find ${LOCKDIR} -name cron.$BASE $TIME -exec rm {} \; &>/dev/null || true - fi - - # if there is no touch file, make one then run the scripts - if [ ! -e ${LOCKDIR}/cron.$BASE ] ; then - touch ${LOCKDIR}/cron.$BASE - - set +e - GLOBIGNORE="*~" - for SCRIPT in $CRONDIR/* ; do - if [[ -x $SCRIPT && ! -d $SCRIPT ]]; then - [ -x /usr/bin/logger ] && /usr/bin/logger -i -p cron.info -t run-crons "(`whoami`) CMD ($SCRIPT)" - $SCRIPT - fi - done - fi -done - -# Clean out bogus cron.$BASE files with future times -touch ${LOCKDIR} -find ${LOCKDIR} -newer ${LOCKDIR} -exec /bin/rm -f {} \; &>/dev/null || true diff --git a/sys-process/cronbase/files/run-crons-0.3.4 b/sys-process/cronbase/files/run-crons-0.3.4 deleted file mode 100755 index 662bd02..0000000 --- a/sys-process/cronbase/files/run-crons-0.3.4 +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/bash -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# -# this script looks into /etc/cron.[hourly|daily|weekly|monthly] -# for scripts to be executed. The info about last run is stored in -# /var/spool/cron/lastrun - -LOCKDIR=/var/spool/cron/lastrun -LOCKFILE=${LOCKDIR}/lock - -mkdir -p ${LOCKDIR} - -# Make sure we're not running multiple instances at once. -# Try twice to lock, otherwise give up. -for ((i = 0; i < 2; i = i + 1)); do - ln -sn $$ ${LOCKFILE} 2>/dev/null && break - - # lock failed, check for a running process. - # handle both old- and new-style locking. - cronpid=$(readlink ${LOCKFILE} 2>/dev/null) || - cronpid=$(cat ${LOCKFILE} 2>/dev/null) || - continue # lockfile disappeared? try again - - # better than kill -0 because we can verify that it's really - # another run-crons process - if [[ $(/dev/null; then - # whoa, another process is really running - exit 0 - else - rm -f ${LOCKFILE} - fi -done - -# Check to make sure locking was successful -if [[ ! -L ${LOCKFILE} ]]; then - echo "Can't create or read existing ${LOCKFILE}, giving up" - exit 1 -fi - -# Set a trap to remove the lockfile when we're finished -trap "rm -f ${LOCKFILE}" 0 1 2 3 15 - - -for BASE in hourly daily weekly monthly ; do - CRONDIR=/etc/cron.${BASE} - - test -d $CRONDIR || continue - - if [ -e ${LOCKDIR}/cron.$BASE ] ; then - case $BASE in - hourly) - #>= 1 hour, 5 min -=> +65 min - TIME="-cmin +65" ;; - daily) - #>= 1 day, 5 min -=> +1445 min - TIME="-cmin +1445" ;; - weekly) - #>= 1 week, 5 min -=> +10085 min - TIME="-cmin +10085" ;; - monthly) - #>= 31 days, 5 min -=> +44645 min - TIME="-cmin +44645" ;; - esac - - find ${LOCKDIR} -name cron.$BASE $TIME -exec rm {} \; &>/dev/null || true - fi - - # if there is no touch file, make one then run the scripts - if [ ! -e ${LOCKDIR}/cron.$BASE ] ; then - touch ${LOCKDIR}/cron.$BASE - - set +e - for SCRIPT in $CRONDIR/* ; do - if [[ -x $SCRIPT && ! -d $SCRIPT ]]; then - # Filter out files people do not expect to be executed. - case ${SCRIPT} in - .*|*~) continue ;; - esac - - [ -x /usr/bin/logger ] && /usr/bin/logger -i -p cron.info -t run-crons "(`whoami`) CMD ($SCRIPT)" - $SCRIPT - fi - done - fi -done - -# Clean out bogus cron.$BASE files with future times -touch ${LOCKDIR} -find ${LOCKDIR} -newer ${LOCKDIR} -exec /bin/rm -f {} \; &>/dev/null || true diff --git a/sys-process/cronbase/files/run-crons-0.3.5 b/sys-process/cronbase/files/run-crons-0.3.5 deleted file mode 100755 index 18a6199..0000000 --- a/sys-process/cronbase/files/run-crons-0.3.5 +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/bash -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# -# this script looks into /etc/cron.[hourly|daily|weekly|monthly] -# for scripts to be executed. The info about last run is stored in -# /var/spool/cron/lastrun - -LOCKDIR=/var/spool/cron/lastrun -LOCKFILE=${LOCKDIR}/lock - -# Usage: log -# Log a message via syslog. -log() { - local level=$1 - shift - logger -i -p "cron.${level}" -t run-crons "$@" -} - -mkdir -p ${LOCKDIR} - -# Make sure we're not running multiple instances at once. -# Try twice to lock, otherwise give up. -for ((i = 0; i < 2; i = i + 1)); do - ln -sn $$ ${LOCKFILE} 2>/dev/null && break - - # lock failed, check for a running process. - # handle both old- and new-style locking. - cronpid=$(readlink ${LOCKFILE} 2>/dev/null) || - cronpid=$(cat ${LOCKFILE} 2>/dev/null) || - continue # lockfile disappeared? try again - - # better than kill -0 because we can verify that it's really - # another run-crons process - if [[ $(/dev/null; then - # whoa, another process is really running - exit 0 - else - rm -f ${LOCKFILE} - fi -done - -# Check to make sure locking was successful -if [[ ! -L ${LOCKFILE} ]]; then - echo "Can't create or read existing ${LOCKFILE}, giving up" - exit 1 -fi - -# Set a trap to remove the lockfile when we're finished -trap "rm -f ${LOCKFILE}" 0 1 2 3 15 - - -EXIT_STATUS=0 -for BASE in hourly daily weekly monthly ; do - CRONDIR=/etc/cron.${BASE} - - test -d $CRONDIR || continue - - if [ -e ${LOCKDIR}/cron.$BASE ] ; then - case $BASE in - hourly) - #>= 1 hour, 5 min -=> +65 min - TIME="-cmin +65" ;; - daily) - #>= 1 day, 5 min -=> +1445 min - TIME="-cmin +1445" ;; - weekly) - #>= 1 week, 5 min -=> +10085 min - TIME="-cmin +10085" ;; - monthly) - #>= 31 days, 5 min -=> +44645 min - TIME="-cmin +44645" ;; - esac - - find ${LOCKDIR} -name cron.$BASE $TIME -exec rm {} \; &>/dev/null || true - fi - - # if there is no touch file, make one then run the scripts - if [ ! -e ${LOCKDIR}/cron.$BASE ] ; then - touch ${LOCKDIR}/cron.$BASE - - set +e - for SCRIPT in $CRONDIR/* ; do - if [[ -x $SCRIPT && ! -d $SCRIPT ]]; then - # Filter out files people do not expect to be executed. - case ${SCRIPT} in - .*|*~) continue ;; - esac - - log info "($(whoami)) CMD (${SCRIPT})" - $SCRIPT - ret=$? - if [ ${ret} -ne 0 ] ; then - log err "CMD (${SCRIPT}) failed with exit status ${ret}" - EXIT_STATUS=1 - fi - fi - done - fi -done - -# Clean out bogus cron.$BASE files with future times -touch ${LOCKDIR} -find ${LOCKDIR} -newer ${LOCKDIR} -exec /bin/rm -f {} \; &>/dev/null || true - -exit ${EXIT_STATUS} diff --git a/sys-process/cronbase/files/run-crons-0.3.6 b/sys-process/cronbase/files/run-crons-0.3.6 deleted file mode 100755 index d39777f..0000000 --- a/sys-process/cronbase/files/run-crons-0.3.6 +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/sh -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# -# this script looks into /etc/cron.[hourly|daily|weekly|monthly] -# for scripts to be executed. The info about last run is stored in -# /var/spool/cron/lastrun - -LOCKDIR=/var/spool/cron/lastrun -LOCKFILE=${LOCKDIR}/lock - -# Usage: log -# Log a message via syslog. -log() { - local level="$1" - shift - logger -i -p "cron.${level}" -t run-crons "$@" -} - -mkdir -p ${LOCKDIR} - -# Make sure we're not running multiple instances at once. -# Try twice to lock, otherwise give up. -i=0 -while [ $(( i += 1 )) -le 2 ] ; do - ln -sn $$ ${LOCKFILE} 2>/dev/null && break - - # lock failed, check for a running process. - # handle both old- and new-style locking. - cronpid=$(readlink ${LOCKFILE} 2>/dev/null) || - cronpid=$(cat ${LOCKFILE} 2>/dev/null) || - continue # lockfile disappeared? try again - - # better than kill -0 because we can verify that it's really - # another run-crons process - cmdline1=$(cat /proc/${cronpid}/cmdline 2>/dev/null) || : - cmdline2=$(cat /proc/$$/cmdline) - if [ "${cmdline1}" = "${cmdline2}" ] ; then - # whoa, another process is really running - exit 0 - else - rm -f ${LOCKFILE} - fi -done - -# Check to make sure locking was successful -if [ ! -L "${LOCKFILE}" ] ; then - echo "Can't create or read existing ${LOCKFILE}, giving up" - exit 1 -fi - -# Set a trap to remove the lockfile when we're finished -trap "rm -f ${LOCKFILE}" EXIT HUP INT QUIT TERM - - -EXIT_STATUS=0 -for BASE in hourly daily weekly monthly ; do - CRONDIR=/etc/cron.${BASE} - - test -d $CRONDIR || continue - - if [ -e ${LOCKDIR}/cron.$BASE ] ; then - case $BASE in - hourly) - #>= 1 hour, 5 min -=> +65 min - TIME="-cmin +65" ;; - daily) - #>= 1 day, 5 min -=> +1445 min - TIME="-cmin +1445" ;; - weekly) - #>= 1 week, 5 min -=> +10085 min - TIME="-cmin +10085" ;; - monthly) - #>= 31 days, 5 min -=> +44645 min - TIME="-cmin +44645" ;; - esac - - find ${LOCKDIR} -name cron.$BASE $TIME -exec rm {} \; 2>/dev/null || : - fi - - # if there is no touch file, make one then run the scripts - if [ ! -e ${LOCKDIR}/cron.$BASE ] ; then - touch ${LOCKDIR}/cron.$BASE - - set +e - for SCRIPT in $CRONDIR/* ; do - if [ -x "${SCRIPT}" ] && [ ! -d "${SCRIPT}" ] ; then - # Filter out files people do not expect to be executed. - case ${SCRIPT} in - .*|*~) continue ;; - esac - - log info "($(whoami)) CMD (${SCRIPT})" - $SCRIPT - ret=$? - if [ ${ret} -ne 0 ] ; then - log err "CMD (${SCRIPT}) failed with exit status ${ret}" - EXIT_STATUS=1 - fi - fi - done - fi -done - -# Clean out bogus cron.$BASE files with future times -touch ${LOCKDIR} -find ${LOCKDIR} -newer ${LOCKDIR} -exec /bin/rm -f {} \; 2>/dev/null || : - -exit ${EXIT_STATUS}