This is an automated email from the git hooks/post-receive script. abe pushed a commit to branch master in repository debsums.
commit 2a24128de0489fb74a5dcc8c4440766abe1c177b Author: Francois Marier <[email protected]> Date: Sat Oct 4 16:32:36 2008 +1300 Made the daily cron optional based on the debconf question --- debian/changelog | 29 ++++++++++++++++------------- debian/{debsums.cron.daily => cron.daily} | 4 ++++ debian/default | 9 +++++++++ debian/postinst | 27 +++++++++++++++++++++++---- 4 files changed, 52 insertions(+), 17 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6ccd81b..ca76d93 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,18 +1,21 @@ -debsums (2.0.38) UNRELEASED; urgency=low +debsums (2.0.38) unstable; urgency=low * Fix the cronjob when the ignore file is empty or missing (closes: #499532) - * Use ionice to reduce the impact of having the cronjob running. - * New Ukranian debconf translation - * Updated Swedish debconf translation - * Updated German debconf translation (closes: #500470) - * Updated Japanese debconf translation (closes: #500466) - * Updated Vietnamese debconf translation (closes: #500666) - * Updated Italian debconf translation (closes: #500825) - * Updated Russian debconf translation (closes: #500828) - * Updated Portugese debconf translation (closes: #500945) - * Updated Brazillian Portugese debconf translation (closes: #500975) - - -- Francois Marier <[email protected]> Fri, 03 Oct 2008 22:22:29 +1300 + * Make the daily cronjob optional through debconf (closes: #499840) + * Use ionice to reduce the impact of having the cronjob running + + * Debconf templates: + - New Ukranian translation + - Updated Swedish translation + - Updated German translation (closes: #500470) + - Updated Japanese translation (closes: #500466) + - Updated Vietnamese translation (closes: #500666) + - Updated Italian translation (closes: #500825) + - Updated Russian translation (closes: #500828) + - Updated Portugese translation (closes: #500945) + - Updated Brazillian Portugese translation (closes: #500975) + + -- Francois Marier <[email protected]> Sat, 04 Oct 2008 16:29:00 +1300 debsums (2.0.37) unstable; urgency=low diff --git a/debian/debsums.cron.daily b/debian/cron.daily similarity index 81% rename from debian/debsums.cron.daily rename to debian/cron.daily index 64a61b3..53a600b 100755 --- a/debian/debsums.cron.daily +++ b/debian/cron.daily @@ -5,6 +5,10 @@ ignorefile="/etc/debsums-ignore" [ -x $debsums ] || exit 0 +# source our config +. /etc/default/debsums +[ "z$DAILY_CHECK" = "zyes" ] || exit 0 + # See ionice(1) if [ -x /usr/bin/ionice ] && /usr/bin/ionice -c3 true 2>/dev/null; then diff --git a/debian/default b/debian/default new file mode 100644 index 0000000..5decabc --- /dev/null +++ b/debian/default @@ -0,0 +1,9 @@ +# Defaults for debsums cron jobs +# sourced by /etc/cron.d/debsums + +# +# This is a POSIX shell fragment +# + +# Set this to no to disable the daily checksum verification +DAILY_CHECK=yes diff --git a/debian/postinst b/debian/postinst index 745e979..2993955 100755 --- a/debian/postinst +++ b/debian/postinst @@ -1,17 +1,36 @@ #!/bin/sh -e +. /usr/share/debconf/confmodule + +DF=/etc/default/debsums APT_CONF=/etc/apt/apt.conf.d/90debsums -. /usr/share/debconf/confmodule db_get debsums/apt-autogen - -if [ "$RET" = true ]; -then +if [ "$RET" = true ]; then echo 'DPkg::Post-Invoke { "if [ -x /usr/bin/debsums ]; then /usr/bin/debsums --generate=nocheck -sp /var/cache/apt/archives; fi"; };' >$APT_CONF else rm -f $APT_CONF fi +db_get debsums/dailycron || true +if [ "$RET" = true ]; then + if [ -f $DF ]; then + TEMPFILE=`mktemp` || exit 1 + sed $DF -e "s,^ *DAILY_CHECK=.*,DAILY_CHECK=\"yes\"," > $TEMPFILE + mv -f $TEMPFILE $DF + chmod 644 $DF + rm -f $TEMPFILE + fi +else + if [ -f $DF ]; then + TEMPFILE=`mktemp` || exit 1 + sed $DF -e "s,^ *DAILY_CHECK=.*,DAILY_CHECK=\"no\"," > $TEMPFILE + mv -f $TEMPFILE $DF + chmod 644 $DF + rm -f $TEMPFILE + fi +fi + # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/debsums.git _______________________________________________ Pkg-perl-cvs-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits
