Package: apticron Version: 1.1.20 Tags: patch Hi,
I've installed apticron on a couple of servers, and some of these do not have iputils, or apt-listchanges. In some environments it's desirable to not install packages that are not strictly needed. Since apticron can perform its core functionality (notification that updates are available) just fine without these two packages, I've created this patch: - If /sbin/ip is available list the IP-addresses, otherwise just the hostname; - If /usr/bin/apt-listchanges is available, include the changes in the mail, otherwise just include a note that tells you to install apt-listchanges to see the changes. I hope this can be included; it allows the admin to choose for themselves whether they need the functionality or not. Thanks! Thijs
diff -Nru /tmp/wtYW9KX2AQ/apticron-1.1.20/apticron /tmp/VWhpF2wW3q/apticron-1.1.21/apticron --- /tmp/wtYW9KX2AQ/apticron-1.1.20/apticron 2006-10-26 00:36:17.000000000 +0200 +++ /tmp/VWhpF2wW3q/apticron-1.1.21/apticron 2007-02-10 13:19:29.000000000 +0100 @@ -26,7 +26,7 @@ [ -e /etc/apticron/apticron.conf ] && . /etc/apticron/apticron.conf -if [ -z "$IPADDRESSES" ]; then +if [ -z "$IPADDRESSES" ] && [ -x /sbin/ip ]; then # Set the IPv4 addresses IPADDRESSES=`(echo $( /bin/hostname -i ) ; /sbin/ip -f inet addr show scope global | \ @@ -107,10 +107,15 @@ EOF - if [ -z "$LISTCHANGES_PROFILE" ] ; then - /usr/bin/apt-listchanges --which=both --headers -f text $DEBS + if [ -x /usr/bin/apt-listchanges ] ; then + if [ -z "$LISTCHANGES_PROFILE" ] ; then + /usr/bin/apt-listchanges --which=both --headers -f text $DEBS + else + /usr/bin/apt-listchanges -f text --profile=$LISTCHANGES_PROFILE $DEBS + fi else - /usr/bin/apt-listchanges -f text --profile=$LISTCHANGES_PROFILE $DEBS + echo "Install 'apt-listchanges' to see what's new in these packages." + echo fi /bin/cat <<EOF diff -Nru /tmp/wtYW9KX2AQ/apticron-1.1.20/debian/changelog /tmp/VWhpF2wW3q/apticron-1.1.21/debian/changelog --- /tmp/wtYW9KX2AQ/apticron-1.1.20/debian/changelog 2007-01-02 01:40:10.000000000 +0100 +++ /tmp/VWhpF2wW3q/apticron-1.1.21/debian/changelog 2007-02-10 13:20:41.000000000 +0100 @@ -1,3 +1,10 @@ +apticron (1.1.21) unstable; urgency=low + + * Downgrade iputils and apt-listchanges from depends to + recommends; only use these tools when available. + + -- Thijs Kinkhorst <[EMAIL PROTECTED]> Sat, 10 Feb 2007 13:20:07 +0100 + apticron (1.1.20) unstable; urgency=low * Fix problem with debconf pt translation. Thanks to Christian Perrier. diff -Nru /tmp/wtYW9KX2AQ/apticron-1.1.20/debian/control /tmp/VWhpF2wW3q/apticron-1.1.21/debian/control --- /tmp/wtYW9KX2AQ/apticron-1.1.20/debian/control 2006-10-26 00:42:41.000000000 +0200 +++ /tmp/VWhpF2wW3q/apticron-1.1.21/debian/control 2007-02-10 13:21:57.000000000 +0100 @@ -8,7 +8,8 @@ Package: apticron Architecture: all -Depends: apt-listchanges (>= 2.59), mailx, debconf | debconf-2.0, iproute, apt (>= 0.6.8) +Depends: mailx, debconf | debconf-2.0, apt (>= 0.6.8) +Recommends: apt-listchanges, iproute Description: cron-script to mail impending apt updates apticron is a simple script to mail about impending apt updates such as security updates. If you need to schedule more complex APT tasks we recommend
signature.asc
Description: This is a digitally signed message part

