[23025] in Source-Commits
/svn/athena r22688 - trunk/debathena/scripts
daemon@ATHENA.MIT.EDU (ghudson@MIT.EDU)
Wed Jan 2 11:53:55 2008
Date: Wed, 2 Jan 2008 11:53:19 -0500 (EST)
From: ghudson@MIT.EDU
Message-Id: <200801021653.LAA20598@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: ghudson
Date: 2008-01-02 11:53:18 -0500 (Wed, 02 Jan 2008)
New Revision: 22688
Modified:
trunk/debathena/scripts/all-schroots
trunk/debathena/scripts/clean-schroots
trunk/debathena/scripts/da
trunk/debathena/scripts/dadch
trunk/debathena/scripts/daequivsupload
trunk/debathena/scripts/daupload-release
trunk/debathena/scripts/sbuildhack
trunk/debathena/scripts/upgrade-schroot
Log:
Add leading comments documenting (hopefully correctly) the scripts
snapshotted from /mit/debathena/bin.
* debathena/scripts/dadch,
debathena/scripts/clean-schroot,
debathena/scripts/da,
debathena/scripts/daequivsupload,
debathena/scripts/upgrade-schroot,
debathena/scripts/daupload-release,
debathena/scripts/sbuildhack,
debathena/scripts/all-schroots: Comment.
Modified: trunk/debathena/scripts/all-schroots
===================================================================
--- trunk/debathena/scripts/all-schroots 2007-12-31 18:23:00 UTC (rev 22687)
+++ trunk/debathena/scripts/all-schroots 2008-01-02 16:53:18 UTC (rev 22688)
@@ -1,4 +1,14 @@
#!/bin/sh
+
+# Usage: all-schroots [-A] PROGRAM ARGUMENTS
+
+# Runs PROGRAM over each of the build schroots, like so:
+#
+# PROGRAM SCHROOTNAME ARGUMENTS
+#
+# If -A is specified, only runs the program over one schroot per
+# Debian/Ubuntu version.
+
if [ "$1" = "-A" ]; then
shift
Modified: trunk/debathena/scripts/clean-schroots
===================================================================
--- trunk/debathena/scripts/clean-schroots 2007-12-31 18:23:00 UTC (rev 22687)
+++ trunk/debathena/scripts/clean-schroots 2008-01-02 16:53:18 UTC (rev 22688)
@@ -1,4 +1,10 @@
#!/bin/sh
+
+# Usage: clean-schroots
+
+# Remove any LVM snapshots and chroots left behind by schroot. Not
+# normally necessary as schroot should clean up after itself.
+
if [ -z "$vg" ]; then
vg=/dev/dink
fi
Modified: trunk/debathena/scripts/da
===================================================================
--- trunk/debathena/scripts/da 2007-12-31 18:23:00 UTC (rev 22687)
+++ trunk/debathena/scripts/da 2008-01-02 16:53:18 UTC (rev 22688)
@@ -1,12 +1,33 @@
#!/bin/sh
+
+# Usage: da [-A] PROGRAM ARGUMENTS
+
+# Runs PROGRAM over each of the build schroot names, like so:
+#
+# PROGRAM SCHROOTNAME ARGUMENTS
+#
+# On one architecture of each Debian/Ubuntu version, passes the -A
+# option before ARGUMENTS. If -A is passed to this script, the
+# program only gets run over one schroot per Debian/Ubuntu version.
+# At the end of the run, the script will display which schroots the
+# command succeeded and failed for.
+
+# Typically this script is used to build Debathena packages, in which
+# case PROGRAM is sbuildhack and ARGUMENTS is a path to a .dsc file.
+
A=0
if [ "$1" = -A ]; then A=1; shift; fi
prog="$1"; shift
succ=
fail=
+
+# Display a horizontal rule on stderr.
hr () {
for i in $(seq 60); do echo -n '═' >&2; done; echo >&2
}
+
+# Run $prog with the provided arguments, with display annotations and
+# success/failure tracking.
t () {
while true; do
tput bold >&2
@@ -28,6 +49,7 @@
done
echo >&2
}
+
t sarge-i386 -A "$@"
t dapper-amd64 -A "$@"
[ $A -eq 1 ] || t dapper-i386 "$@"
@@ -41,6 +63,7 @@
[ $A -eq 1 ] || t gutsy-i386 "$@"
t lenny-amd64 -A "$@"
[ $A -eq 1 ] || t lenny-i386 "$@"
+
tput bold >&2
hr
echo "Done: $prog \$dist $@" >&2
Modified: trunk/debathena/scripts/dadch
===================================================================
--- trunk/debathena/scripts/dadch 2007-12-31 18:23:00 UTC (rev 22687)
+++ trunk/debathena/scripts/dadch 2008-01-02 16:53:18 UTC (rev 22688)
@@ -1,5 +1,11 @@
#!/bin/bash
+# Usage: dadch
+
+# Wrapper around dch for Debathena. Increments the version number
+# according to Debathena rules if the current version has been
+# released, and leaves it alone otherwise.
+
if [ -e debian/changelog ]; then
debian=debian
elif [ "$(basename "$PWD")" = debian ] && [ -e changelog ]; then
Modified: trunk/debathena/scripts/daequivsupload
===================================================================
--- trunk/debathena/scripts/daequivsupload 2007-12-31 18:23:00 UTC (rev 22687)
+++ trunk/debathena/scripts/daequivsupload 2008-01-02 16:53:18 UTC (rev 22688)
@@ -1,4 +1,11 @@
#!/bin/sh
+
+# Usage: daequivsupload CHANGESFILE
+
+# Adds an equivs-generated package to all dists. Since equivs-built
+# packages are very simple, there is no need to build them separately
+# for each dist.
+
for dist in sarge etch lenny dapper edgy feisty gutsy; do
reprepro -Vb /mit/debathena/apt --ignore=wrongdistribution include "$dist" "$1"
done
Modified: trunk/debathena/scripts/daupload-release
===================================================================
--- trunk/debathena/scripts/daupload-release 2007-12-31 18:23:00 UTC (rev 22687)
+++ trunk/debathena/scripts/daupload-release 2008-01-02 16:53:18 UTC (rev 22688)
@@ -1,6 +1,18 @@
#!/bin/sh
set -e
+# Usage: daupload-release [-A] [-S] CHANGESFILE
+# daupload-beta [-A] [-S] CHANGESFILE
+
+# After a package has been built for all Debian/Ubuntu versions and
+# platforms (typically using "da sbuildhack DSCFILE"), this script
+# uploads the package into the release or beta apt repository. If -A
+# is specified, only one architecture per Debian/Ubuntu version is
+# uploaded. If -S is specified, only the source package is uploaded.
+
+# Upon completion, moves all of the generated files into the "built"
+# subdirectory.
+
case "$(basename "$0")" in
daupload-release)
repo=/mit/debathena/apt
Modified: trunk/debathena/scripts/sbuildhack
===================================================================
--- trunk/debathena/scripts/sbuildhack 2007-12-31 18:23:00 UTC (rev 22687)
+++ trunk/debathena/scripts/sbuildhack 2008-01-02 16:53:18 UTC (rev 22688)
@@ -1,5 +1,9 @@
#!/bin/sh
+# Wrapper around sbuild. The main purpose is to append a
+# distribution-dependent string like "~ubuntu7.10" to the binary
+# package version, using Sbuildhack.pm.
+
usage() {
echo "Usage: $0 <dist>-<arch> ..." >&2
exit 1
Modified: trunk/debathena/scripts/upgrade-schroot
===================================================================
--- trunk/debathena/scripts/upgrade-schroot 2007-12-31 18:23:00 UTC (rev 22687)
+++ trunk/debathena/scripts/upgrade-schroot 2008-01-02 16:53:18 UTC (rev 22688)
@@ -1,3 +1,7 @@
+# Usage: upgrade-schroot SCHROOTNAME ...
+
+# Updates the system packages in one or more schroots.
+
#!/bin/sh
for i in "$@"; do
schroot -u root -c "$1" -- sh -c 'apt-get update && apt-get -y dist-upgrade && apt-get clean'