Import Debian version 0.1 debian/0.1
authorSteve McIntyre <steve@einval.com>
Wed, 31 Aug 2005 12:30:52 +0000 (13:30 +0100)
committerSteve McIntyre <steve@einval.com>
Fri, 7 Jun 2019 17:53:27 +0000 (18:53 +0100)
apt-update (0.1) stable; urgency=low

  * Initial release.

17 files changed:
apt-dist-upgrade [new file with mode: 0755]
apt-update [new file with mode: 0755]
apt-update-roots [new file with mode: 0644]
build-stamp [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/conffiles [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/tmp/DEBIAN/conffiles [new file with mode: 0644]
debian/tmp/DEBIAN/control [new file with mode: 0644]
debian/tmp/DEBIAN/md5sums [new file with mode: 0644]
debian/tmp/etc/apt-update-roots [new file with mode: 0644]
debian/tmp/etc/cron.daily/apt-update [new file with mode: 0755]
debian/tmp/usr/sbin/apt-dist-upgrade [new file with mode: 0755]
debian/tmp/usr/share/doc/apt-update/changelog.gz [new file with mode: 0644]
debian/tmp/usr/share/doc/apt-update/copyright [new file with mode: 0644]

diff --git a/apt-dist-upgrade b/apt-dist-upgrade
new file mode 100755 (executable)
index 0000000..0346060
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# apt-dist-upgrade
+#
+# Simple wrapper script around apt-get; upgrade all of the chroots in
+# one command
+# 
+# Assumes that apt is configured correctly before we start...
+#
+# Steve McIntyre 26/12/2004
+
+unset LANGUAGE
+unset LANG
+unset LC_ALL
+
+. /etc/apt-update-roots
+
+for CHROOT in $CHROOTS
+do
+  if [ $CHROOT = / ] ; then
+      CHR=""
+  else
+      CHR="chroot $CHROOT"
+  fi
+  echo "Running apt-get dist-upgrade in $CHROOT"
+  $CHR apt-get clean
+  $CHR apt-get dist-upgrade
+done
diff --git a/apt-update b/apt-update
new file mode 100755 (executable)
index 0000000..b19f78f
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# apt-update
+#
+# Simple wrapper script for cron to use - check for updated packages
+# and mail admin with any recommended upgrades.
+# 
+# Assumes that apt is configured correctly before we start...
+#
+# Steve McIntyre 26/09/2001
+
+. /etc/apt-update-roots
+
+for CHROOT in $CHROOTS
+do
+  if [ $CHROOT = / ] ; then
+      CHR=""
+  else
+      CHR="chroot $CHROOT"
+  fi
+  $CHR apt-get clean
+  $CHR apt-get update >/dev/null
+  error=$?
+  if [ $error -ne 0 ] ; then
+      echo $CHR update failed with error $error
+      echo
+  fi
+
+  $CHR apt-get -s -u upgrade | grep ^Inst >/dev/null
+  error=$?
+  if [ $error -eq 0 ] ; then
+    # Grep returned zero, so we have matches, i.e. some packages to upgrade
+       HOST=`uname -n`
+
+       (echo "On $HOST ($CHROOT) the following packages need upgrading:"
+               $CHR apt-get -s -u upgrade | awk '/^Inst/ {print $2}' ) | mail -s "$HOST $CHR needs software updates" postmaster
+  fi
+done
diff --git a/apt-update-roots b/apt-update-roots
new file mode 100644 (file)
index 0000000..31364e3
--- /dev/null
@@ -0,0 +1 @@
+CHROOTS="/"
diff --git a/build-stamp b/build-stamp
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..7ee6521
--- /dev/null
@@ -0,0 +1,9 @@
+apt-update (0.1) stable; urgency=low
+
+  * Initial release.
+
+ -- Steve McIntyre <steve@einval.com>  Wed, 31 Aug 2005 13:30:52 +0100
+
+Local variables:
+mode: debian-changelog
+End:
diff --git a/debian/conffiles b/debian/conffiles
new file mode 100644 (file)
index 0000000..34d227f
--- /dev/null
@@ -0,0 +1,2 @@
+/etc/apt-update-roots
+/etc/cron.daily/apt-update
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..8931887
--- /dev/null
@@ -0,0 +1,12 @@
+Source: apt-update
+Section: base
+Build-Depends-Indep: debhelper
+Priority: standard
+Maintainer: Steve McIntyre <steve@einval.com>
+Standards-Version: 3.6.2.1
+
+Package: apt-update
+Architecture: all
+Description: Useful apt wrappers
+ Cron wrapper for buildd machines
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..57cf6a3
--- /dev/null
@@ -0,0 +1,5 @@
+Copyright (c) 2005- Steve McIntyre
+
+GPL - see /usr/share/common-licenses/GPLv2
+
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..e97137b
--- /dev/null
@@ -0,0 +1,51 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
+# This version is for a hypothetical package that builds an
+# architecture-dependant package, as well as an architecture-independant
+# package.
+
+# Uncomment this to turn on verbose mode. 
+#export DH_VERBOSE=1
+
+build: build-stamp
+build-stamp:
+       dh_testdir
+
+       touch build-stamp
+
+clean:
+       rm -f debian/files
+       find . -name '*~' | xargs rm -vf
+
+# Build architecture-independent files here.
+binary-indep: build
+
+# Build architecture-dependent files here.
+binary-arch: build
+#      dh_testversion
+       dh_testdir
+       dh_testroot
+       dh_clean -k
+       dh_installdirs -A etc/cron.daily usr/sbin
+
+       install -m 755 apt-update debian/tmp/etc/cron.daily
+       install -m 755 apt-dist-upgrade debian/tmp/usr/sbin
+       install -m 444 apt-update-roots debian/tmp/etc
+
+       dh_installdocs
+       dh_installchangelogs
+       dh_movefiles
+       dh_strip
+       dh_compress
+       dh_gencontrol
+
+       dh_installdeb
+       dh_fixperms
+       dh_md5sums
+       dh_builddeb
+
+source diff:                                                                  
+       @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary
diff --git a/debian/tmp/DEBIAN/conffiles b/debian/tmp/DEBIAN/conffiles
new file mode 100644 (file)
index 0000000..34d227f
--- /dev/null
@@ -0,0 +1,2 @@
+/etc/apt-update-roots
+/etc/cron.daily/apt-update
diff --git a/debian/tmp/DEBIAN/control b/debian/tmp/DEBIAN/control
new file mode 100644 (file)
index 0000000..70522f1
--- /dev/null
@@ -0,0 +1,9 @@
+Package: apt-update
+Version: 0.1
+Section: base
+Priority: standard
+Architecture: all
+Installed-Size: 20
+Maintainer: Steve McIntyre <steve@einval.com>
+Description: Useful apt wrappers
+ Cron wrapper for buildd machines
diff --git a/debian/tmp/DEBIAN/md5sums b/debian/tmp/DEBIAN/md5sums
new file mode 100644 (file)
index 0000000..a81412b
--- /dev/null
@@ -0,0 +1,5 @@
+afd60a027a7d1fde64ad5dc1d90b78df  etc/cron.daily/apt-update
+20a9d926383c29159b1471e09eae3ab8  etc/apt-update-roots
+bb05114018cc7ab26f7d93a76b5d6e42  usr/sbin/apt-dist-upgrade
+ecba137529ebdecd0e9196e88a6ba3aa  usr/share/doc/apt-update/copyright
+715dd34dd7949697dc08be6b373d64e6  usr/share/doc/apt-update/changelog.gz
diff --git a/debian/tmp/etc/apt-update-roots b/debian/tmp/etc/apt-update-roots
new file mode 100644 (file)
index 0000000..31364e3
--- /dev/null
@@ -0,0 +1 @@
+CHROOTS="/"
diff --git a/debian/tmp/etc/cron.daily/apt-update b/debian/tmp/etc/cron.daily/apt-update
new file mode 100755 (executable)
index 0000000..b19f78f
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# apt-update
+#
+# Simple wrapper script for cron to use - check for updated packages
+# and mail admin with any recommended upgrades.
+# 
+# Assumes that apt is configured correctly before we start...
+#
+# Steve McIntyre 26/09/2001
+
+. /etc/apt-update-roots
+
+for CHROOT in $CHROOTS
+do
+  if [ $CHROOT = / ] ; then
+      CHR=""
+  else
+      CHR="chroot $CHROOT"
+  fi
+  $CHR apt-get clean
+  $CHR apt-get update >/dev/null
+  error=$?
+  if [ $error -ne 0 ] ; then
+      echo $CHR update failed with error $error
+      echo
+  fi
+
+  $CHR apt-get -s -u upgrade | grep ^Inst >/dev/null
+  error=$?
+  if [ $error -eq 0 ] ; then
+    # Grep returned zero, so we have matches, i.e. some packages to upgrade
+       HOST=`uname -n`
+
+       (echo "On $HOST ($CHROOT) the following packages need upgrading:"
+               $CHR apt-get -s -u upgrade | awk '/^Inst/ {print $2}' ) | mail -s "$HOST $CHR needs software updates" postmaster
+  fi
+done
diff --git a/debian/tmp/usr/sbin/apt-dist-upgrade b/debian/tmp/usr/sbin/apt-dist-upgrade
new file mode 100755 (executable)
index 0000000..0346060
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# apt-dist-upgrade
+#
+# Simple wrapper script around apt-get; upgrade all of the chroots in
+# one command
+# 
+# Assumes that apt is configured correctly before we start...
+#
+# Steve McIntyre 26/12/2004
+
+unset LANGUAGE
+unset LANG
+unset LC_ALL
+
+. /etc/apt-update-roots
+
+for CHROOT in $CHROOTS
+do
+  if [ $CHROOT = / ] ; then
+      CHR=""
+  else
+      CHR="chroot $CHROOT"
+  fi
+  echo "Running apt-get dist-upgrade in $CHROOT"
+  $CHR apt-get clean
+  $CHR apt-get dist-upgrade
+done
diff --git a/debian/tmp/usr/share/doc/apt-update/changelog.gz b/debian/tmp/usr/share/doc/apt-update/changelog.gz
new file mode 100644 (file)
index 0000000..671a204
Binary files /dev/null and b/debian/tmp/usr/share/doc/apt-update/changelog.gz differ
diff --git a/debian/tmp/usr/share/doc/apt-update/copyright b/debian/tmp/usr/share/doc/apt-update/copyright
new file mode 100644 (file)
index 0000000..57cf6a3
--- /dev/null
@@ -0,0 +1,5 @@
+Copyright (c) 2005- Steve McIntyre
+
+GPL - see /usr/share/common-licenses/GPLv2
+