[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Autobyhand support for task overrides



(Please CC me on replies as I'm not subscribed.)

As discussed with Joerg on IRC, I have prepared a patch for DAK for this.
The patch is attached, but I've also rsynced my bzr clone to:
   http://people.debian.org/~fjp/tmp/dak/
(could not find out how to bzr push over SSH).

The patch is based on the autobyhand script for tag overrides (byhand-tag).

Joey (as tasksel maintainer) has already OKed a corresponding patch for 
tasksel to include the overrides data in uploads. He's also checked the 
patch for DAK and did not see any problems.

I've done local testing of the byhand-task script, and it correctly 
processes a tarball generated by tasksel.

Please consider applying.

Cheers,
FJP

=== modified file 'ChangeLog'
--- ChangeLog	2008-05-27 19:16:39 +0000
+++ ChangeLog	2008-05-28 14:42:33 +0000
@@ -1,3 +1,7 @@
+2008-05-28  Frans Pop  <fjp@debian.org>
+
+	* add autobyhand support for task overrides (from tasksel)
+
 2008-05-27  Joerg Jaspert  <joerg@debian.org>
 
 	* config/debian/pseudo-packages.maintainers: Change ftp.debian.org

=== modified file 'config/debian/dak.conf'
--- config/debian/dak.conf	2008-05-01 21:45:34 +0000
+++ config/debian/dak.conf	2008-05-28 14:40:58 +0000
@@ -692,6 +692,13 @@
     Extension "tar.gz";
     Script "/srv/ftp.debian.org/dak/scripts/debian/byhand-tag";
   };
+
+  "task-overrides" {
+    Source "tasksel";
+    Section "byhand";
+    Extension "tar.gz";
+    Script "/srv/ftp.debian.org/dak/scripts/debian/byhand-task";
+  };
 };
 
 Dir

=== added file 'scripts/debian/byhand-task'
--- scripts/debian/byhand-task	1970-01-01 00:00:00 +0000
+++ scripts/debian/byhand-task	2008-05-28 15:20:56 +0000
@@ -0,0 +1,37 @@
+#!/bin/sh -ue
+
+# Tarball to read, compressed with gzip
+INPUT="${1:?"Usage: $0 filename"}"
+
+# Regular expression used to validate tag lines
+CHECKRE='^[a-z0-9A-Z.+-]+[[:space:]]+Task[[:space:]]+[a-z0-9:. ,{}+-]+$'
+
+# This must end with /
+TARGET=/srv/ftp.debian.org/scripts/external-overrides/
+
+# Read the main directory from the tarball
+DIR="`tar ztf \"$INPUT\" | tac | tail -n 1`"
+
+# Create temporary files where to store the validated data
+umask 002
+OUTMAIN="`mktemp \"$TARGET\"task.new.XXXXXX`"
+
+# If we fail somewhere, cleanup the temporary files
+cleanup() {
+        rm -f "$OUTMAIN"
+}
+trap cleanup EXIT
+
+# Extract the data into the temporary files
+tar -O -zxf "$INPUT" "$DIR"task | grep -E "$CHECKRE" > "$OUTMAIN"
+
+# Move the data to the final location
+mv "$OUTMAIN"           "$TARGET"task
+
+chmod 644 "$TARGET"task
+
+(cd $TARGET && ./mk-extra-overrides.sh)
+
+trap - EXIT
+
+exit 0

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: